-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,xcode 15,Socks5Tunnel.run 返回-1, 貌似tunnelFileDescriptor 无法获取到值,大神知道什么原因吗? #2
Comments
are you sure you're calling it after |
我这边也是xcode15。但是我报 -5 |
What's your tun2socks config. |
|
应该是新版本里
private func createTunnelConfig(socksPort: Int) -> String {
return """
tunnel:
mtu: 9000
socks5:
port: \(socksPort)
address: ::1
udp: 'udp'
misc:
task-stack-size: 2048
connect-timeout: 5000
read-write-timeout: 60000
log-file: stderr
log-level: info
limit-nofile: 65535
"""
}
private func createTunnelConfigFile(socksPort: Int) -> URL {
let configContent = createTunnelConfig(socksPort: socksPort)
if let documentsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first {
let fileURL = documentsDirectory.appendingPathComponent("tunnel_config.yaml")
do {
try configContent.write(to: fileURL, atomically: true, encoding: .utf8)
return fileURL
} catch {
fatalError("Error writing to file: \(error)")
}
} else {
fatalError("Error finding the documents directory.")
}
} |
I have the same problem. -5 code |
No description provided.
The text was updated successfully, but these errors were encountered: