-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
在android下运行tun遇到的问题 #856
Comments
/~https://github.com/meh/rust-tun/blob/b60d4c2ce9aa0b7518fc259c914a0459a5320888/Cargo.toml#L32-L33 It seems that it requires to explicitly enable the
|
意思是要等依赖的模块修复才能继续? |
y. |
The PR was merged. Please try to use the code from master and see if it fixes your issue. |
好,今晚回去试试,谢谢! |
|
You have to modify the |
噢,是我漏做这一步,回去再试试。 |
我尝试整合到android,启动的时候报错。
我把在android下启动sslocal的配置打印出来,大概是这样的: {
"server": "****",
"server_port": ****,
"password": "****",
"method": "2022-blake3-aes-128-gcm",
"timeout": 30,
"mode": "tcp_and_udp",
"dns": "unix://local_dns_path",
"locals": [
{
"protocol": "tun",
"tun_device_fd_from_path": "sock_path",
"tun_interface_name": "eth0", //也试过tun0
"tun_interface_address": "172.19.0.1/24"
},
{
"local_address": "127.0.0.1",
"local_port": 5450,
"local_dns_address": "local_dns_path",
"remote_dns_address": "****",
"remote_dns_port": 53,
"protocol": "dns"
}
]
} |
Remove |
好的,回去再试试。谢谢! |
@zonyitoo 按照你的建议修改配置,还是报 {
"server": "*******",
"server_port": 9999,
"password": "******",
"method": "2022-blake3-aes-128-gcm",
"timeout": 30,
"mode": "tcp_and_udp",
"dns": "unix://local_dns_path",
"locals": [
{
"local_address": "127.0.0.1",
"local_port": 1080,
"local_udp_address": "127.0.0.1",
"local_udp_port": 1080,
"mode": "tcp_and_udp"
},
{
"protocol": "tun",
"tun_device_fd_from_path": "unix://sock_path" //也试过sock_path
},
{
"local_address": "127.0.0.1",
"local_port": 5450,
"local_dns_address": "local_dns_path",
"remote_dns_address": "*****",
"remote_dns_port": 53,
"protocol": "dns"
}
]
} |
Actually it should be set from command line argument shadowsocks-rust/src/service/local.rs Lines 335 to 343 in c14b1c5
|
@zonyitoo 需要设置mtu参数,
|
直接在代码里写死mtu值,启动不断报处理异常:
|
Try again with this commit, Android's tun packet doesn't have packet informations. |
终于可以在android下跑起来了。
这条日志,是github官方客户端在打开的时候,发起的dot dns查询,对应的dns服务器地址是dns.google。 除了这个,还有访问YouTube客户端(客户端走udp的),很久才加载到内容,换回旧程序,加载内容明显要快上许多。这个我怀疑是dns查询走的路由导致的。 |
No idea. It requires further inspection. |
@zonyitoo 我想了解一下,TUN服务会按照配置文件中,dns的设置信息来处理请求吗? 我配置的远端dns是127.0.0.53,并且在acl配置127.0.0.53/32在代理列表中,TUN会怎么处理dns请求? |
The The |
那真的是不知怎么回事。 |
This issue was inactive for a long time. If the problem still exists in the latest version, consider open a new issue. |
本来想试试能不能用tun来替换ss android下的tun2socks,但是没办法编译通过。
The text was updated successfully, but these errors were encountered: