2dust / v2rayNG

A V2Ray client for Android, support Xray core and v2fly core
https://1.2345345.xyz
GNU General Public License v3.0
35.79k stars 5.49k forks source link

Can't connect of localhost of SOCKS server. #1300

Closed DUOLabs333 closed 2 years ago

DUOLabs333 commented 2 years ago

在提出问题前请先自行排除服务器端问题,同时也请通过搜索确认是否有人提出过相同问题。

预期行为

描述你认为应该发生什么 I have a SOCKS proxy running. When I connect to it, I can not connect to the localhost of the server (either by 0.0.0.0 or 127.0.0.1.nip.io). With SagerNET, I can.

实际行为

描述实际发生了什么 Trying to connect leads to Connection refused.

复现方法

  1. Set up socks server (use shadowsocks)
  2. Try to connect to localhost of server
  3. Fail

日志信息

通过`adb logcat -s com.v2ray.ang GoLog V2rayConfigUtilGoLog Main`获取日志。请自行删减日志中可能出现的敏感信息。 如果问题可重现,建议先执行`adb logcat -c`清空系统日志再执行上述命令,再操作重现问题。 ``` ^C [system@system microsocks]$ adb logcat -s com.v2ray.ang GoLog V2rayConfigUtilGoLog Main --------- beginning of crash --------- beginning of system --------- beginning of main 11-29 22:29:55.054 26391 26418 I GoLog : udp:127.0.0.1:40259 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:29:55.153 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:29:55.195 26391 26418 I GoLog : [Warning] [578889687] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:29:55.850 26391 26418 I GoLog : udp:127.0.0.1:43912 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:29:55.968 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:29:55.982 26391 26418 I GoLog : [Warning] [3421634340] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:29:57.054 26391 26418 I GoLog : udp:127.0.0.1:44611 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:29:57.095 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:29:57.111 26391 27226 I GoLog : [Warning] [767527283] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:29:57.573 26391 27226 I GoLog : udp:127.0.0.1:49949 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:29:57.608 26391 26418 I GoLog : Using Prepared: 192.168.1.51 11-29 22:29:57.621 26391 27226 I GoLog : [Warning] [348544173] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:29:59.536 26391 27226 I GoLog : udp:127.0.0.1:38757 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:29:59.657 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:29:59.685 26391 26424 I GoLog : [Warning] [2762439623] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:00.062 26391 26420 I GoLog : udp:127.0.0.1:40259 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:00.171 26391 27226 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:00.189 26391 26420 I GoLog : [Warning] [578889687] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:00.766 26391 26420 I GoLog : udp:127.0.0.1:49261 accepted udp:8.8.8.8:53 [socks >> proxy] 11-29 22:30:00.881 26391 26418 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:00.897 26391 27226 I GoLog : [Warning] [1522865600] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:02.063 26391 26418 I GoLog : udp:127.0.0.1:49011 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:02.107 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:02.123 26391 26418 I GoLog : [Warning] [4020868279] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:02.579 26391 26420 I GoLog : udp:127.0.0.1:49949 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:02.627 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:02.644 26391 26418 I GoLog : [Warning] [348544173] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:04.542 26391 26418 I GoLog : udp:127.0.0.1:44772 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:04.684 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:04.695 26391 26420 I GoLog : udp:127.0.0.1:45041 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:04.699 26391 26420 I GoLog : [Warning] [4213377573] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:04.705 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:04.719 26391 26418 I GoLog : [Warning] [1969919851] app/proxyman/outbound: failed to process outbound traffic > proxy/socks: failed to establish connection to server > proxy/socks: server rejects request: 7 11-29 22:30:05.067 26391 26424 I GoLog : udp:127.0.0.1:42461 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:05.137 26391 26391 D com.v2ray.ang: tun2socks destroy 11-29 22:30:05.186 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "dns": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "hosts": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "domain:googleapis.cn": "googleapis.com" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "servers": [ 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "1.1.1.1" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: ] 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "inbounds": [ 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "listen": "127.0.0.1", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "port": 10808, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "protocol": "socks", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "settings": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "auth": "noauth", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "udp": true, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "userLevel": 8 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "sniffing": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "destOverride": [], 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "enabled": false 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "tag": "socks" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "listen": "127.0.0.1", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "port": 10809, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "protocol": "http", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "settings": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "userLevel": 8 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "tag": "http" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: ], 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "log": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "loglevel": "warning" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "outbounds": [ 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "mux": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "concurrency": 8, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "enabled": false 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "protocol": "socks", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "settings": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "servers": [ 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "address": "192.168.1.51", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "level": 8, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "method": "chacha20-poly1305", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "ota": false, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "password": "", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "port": 2015 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: ] 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "streamSettings": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "network": "tcp", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "security": "", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "tcpSettings": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "header": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "type": "none" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "tag": "proxy" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "protocol": "freedom", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "settings": {}, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "tag": "direct" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "protocol": "blackhole", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "settings": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "response": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "type": "http" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: }, 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "tag": "block" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: ], 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "routing": { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "domainMatcher": "mph", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "domainStrategy": "IPIfNonMatch", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "rules": [ 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: { 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "ip": [ 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "1.1.1.1" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: ], 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "outboundTag": "proxy", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "port": "53", 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: "type": "field" 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: ] 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.266 26391 26391 D com.v2ray.ang: } 11-29 22:30:12.270 26391 26391 I GoLog : loading core config 11-29 22:30:12.270 26391 26420 I GoLog : Preparing Domain: 192.168.1.51:2015 11-29 22:30:12.270 26391 26420 I GoLog : Prepare Result: 11-29 22:30:12.270 26391 26420 I GoLog : Domain: 192.168.1.51 11-29 22:30:12.270 26391 26420 I GoLog : Port: 2015 11-29 22:30:12.270 26391 26420 I GoLog : IPs: [192.168.1.51] 11-29 22:30:12.277 26391 26391 I GoLog : new core 11-29 22:30:12.279 26391 26391 I GoLog : start core 11-29 22:30:12.281 26391 26424 I GoLog : [Warning] core: Xray 1.4.5 started 11-29 22:30:12.306 26391 26391 D com.v2ray.ang: [/data/app/~~PRh3ag8T07ipQReKNzTs7w==/com.v2ray.ang-ROl7sIToHFOXRSCxrRX86A==/lib/arm64/libtun2socks.so, --netif-ipaddr, 26.26.26.2, --netif-netmask, 255.255.255.252, --socks-server-addr, 127.0.0.1:10808, --tunmtu, 1500, --sock-path, sock_path, --enable-udprelay, --loglevel, notice] 11-29 22:30:12.310 26391 26391 D com.v2ray.ang: Process[pid=27829, hasExited=false] 11-29 22:30:12.310 26391 26391 D com.v2ray.ang: /data/user/0/com.v2ray.ang/files/sock_path 11-29 22:30:12.361 26391 26429 D com.v2ray.ang: sendFd tries: 0 11-29 22:30:12.395 26391 26420 I GoLog : tcp:127.0.0.1:37240 accepted tcp:44.240.200.14:443 [socks >> proxy] 11-29 22:30:12.402 26391 26469 I GoLog : udp:127.0.0.1:42898 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:12.460 26391 27656 I GoLog : udp:127.0.0.1:42319 accepted udp:192.168.1.1:53 [socks >> proxy] 11-29 22:30:12.522 26391 26418 I GoLog : udp:127.0.0.1:49365 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:12.559 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.559 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.559 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.559 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.582 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.583 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.590 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.611 26391 26418 I GoLog : udp:127.0.0.1:42774 accepted udp:192.168.1.1:53 [socks >> proxy] 11-29 22:30:12.617 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.626 26391 27656 I GoLog : tcp:127.0.0.1:37256 accepted tcp:172.253.122.188:5228 [socks >> proxy] 11-29 22:30:12.626 26391 27656 I GoLog : tcp:127.0.0.1:37258 accepted tcp:31.13.71.50:5222 [socks >> proxy] 11-29 22:30:12.632 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.632 26391 26470 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.633 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.661 26391 27656 I GoLog : udp:127.0.0.1:38688 accepted udp:192.168.1.1:53 [socks >> proxy] 11-29 22:30:12.661 26391 27656 I GoLog : udp:127.0.0.1:43972 accepted udp:192.168.1.1:53 [socks >> proxy] 11-29 22:30:12.677 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.677 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.695 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:12.695 26391 26470 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:13.421 26391 26469 I GoLog : udp:127.0.0.1:41108 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:13.429 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:13.570 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:13.605 26391 26469 I GoLog : udp:127.0.0.1:40551 accepted udp:172.66.41.48:443 [socks >> proxy] 11-29 22:30:13.611 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:13.627 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:14.075 26391 26470 I GoLog : udp:127.0.0.1:37052 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:14.083 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:14.098 26391 26470 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:16.294 26391 26469 I GoLog : udp:127.0.0.1:40447 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:16.320 26391 26470 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:16.551 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:16.582 26391 27656 I GoLog : tcp:127.0.0.1:37284 accepted tcp:20.189.173.6:443 [socks >> proxy] 11-29 22:30:16.587 26391 26470 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:17.712 26391 27656 I GoLog : udp:127.0.0.1:44918 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:17.715 26391 26470 I GoLog : udp:127.0.0.1:43298 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:17.719 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:17.720 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:17.758 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:17.758 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:17.863 26391 26391 D com.v2ray.ang: SCREEN_OFF, stop querying stats 11-29 22:30:18.306 26391 26470 I GoLog : tcp:127.0.0.1:37294 accepted tcp:213.155.156.122:443 [socks >> proxy] 11-29 22:30:18.313 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:30.979 26391 26469 I GoLog : tcp:127.0.0.1:37300 accepted tcp:172.253.122.188:5228 [socks >> proxy] 11-29 22:30:31.093 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:32.826 26391 26424 I GoLog : udp:127.0.0.1:47746 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:30:32.833 26391 26470 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:32.845 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:30:32.875 26391 26424 I GoLog : tcp:127.0.0.1:37308 accepted tcp:142.250.176.206:443 [socks >> proxy] 11-29 22:30:32.881 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:15.505 26391 26391 D com.v2ray.ang: SCREEN_ON, start querying stats 11-29 22:31:26.917 26391 26469 I GoLog : udp:127.0.0.1:41081 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:31:27.007 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.047 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.131 26391 26469 I GoLog : udp:127.0.0.1:41366 accepted udp:142.250.64.68:443 [socks >> proxy] 11-29 22:31:27.148 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.167 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.695 26391 26469 I GoLog : udp:127.0.0.1:37265 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:31:27.699 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.716 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.809 26391 26424 I GoLog : udp:127.0.0.1:46307 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:31:27.819 26391 26420 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.839 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.937 26391 26420 I GoLog : udp:127.0.0.1:45322 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:31:27.938 26391 26420 I GoLog : udp:127.0.0.1:41960 accepted udp:8.8.4.4:53 [socks >> proxy] 11-29 22:31:27.986 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:27.987 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:28.022 26391 27656 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:28.024 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:28.989 26391 26424 I GoLog : udp:127.0.0.1:45357 accepted udp:1.1.1.1:53 [socks -> proxy] 11-29 22:31:29.065 26391 26469 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:29.087 26391 26424 I GoLog : Using Prepared: 192.168.1.51 11-29 22:31:33.703 26391 26391 D com.v2ray.ang: SCREEN_OFF, stop querying stats ```

环境信息

Google Pixel, Android 10

额外信息(可选)

yuhan6665 commented 2 years ago

You config outbound is wrong, plz see https://www.v2fly.org/config/protocols/socks.html#outboundconfigurationobject

DUOLabs333 commented 2 years ago

I'm confused -- is the config for setting up a server on the phone, or connecting to an outside server?

yuhan6665 commented 2 years ago

If you connect to a local socks server, your config know nothing about remote

DUOLabs333 commented 2 years ago

192.168.1.51:2015 is a remote server.

yuhan6665 commented 2 years ago

Doesn't look like a remote server. But in any case you config is wrong, you need to follow the document of core

DUOLabs333 commented 2 years ago

I just clicked Type Manually [SOCKS] and went from there. Is there something else I need to do?

yuhan6665 commented 2 years ago

我仔细看了好像确实不是你的配置问题 而是 ng 里面 socks 的老问题 我之后研究一下

yuhan6665 commented 2 years ago

@DUOLabs333 I did some test with Socks server (Xray) and ng. Found that Socks server need to turn on UDP and configure UDP's binding address. In your case, the address should be 192.168.1.51 Can you check if you configured correctly with your Socks server (Shadowsocks)

DUOLabs333 commented 2 years ago

My configuration has both tcp and udp enabled.

yuhan6665 commented 2 years ago

Which Shadowsocks implementation do you use? Can you post your server config as well?

DUOLabs333 commented 2 years ago

shadowsocks-rust:

server.json:

{
    "server": "127.0.0.1",
    "server_port": 2014,
    "password": "**********",
    "method": "aes-256-gcm",
    "mode": "tcp_and_udp",
    "dns": "127.0.0.1",
}
yuhan6665 commented 2 years ago

I'm not very familiar with that configuration. I believe you need configure sslocal like this

        {
            // SOCKS5, SOCKS4/4a local server
            "protocol": "socks",
            // Listen address
            "local_address": "127.0.0.1",
            "local_port": 1081,
            // Enables UDP relay
            "mode": "tcp_and_udp",
            // Customizing the UDP's binding address. Depending on `mode`, if
            // - TCP is enabled, then SOCKS5's UDP Association command will return this address
            // - UDP is enabled, then SOCKS5's UDP server will listen to this address.
            "local_udp_address": "127.0.0.1",
            "local_udp_port": 2081
        },
DUOLabs333 commented 2 years ago

Where would I connect the local UDP port in the app?

yuhan6665 commented 2 years ago

I think "local_port" and "local_udp_port" can be the same, in your case 2015. "local_udp_address" should be 192.168.1.51.

DUOLabs333 commented 2 years ago

Still doesn't work: here's my client.json:

{
    "server": "127.0.0.1",
    "server_port": 2014,
    "password": "*********",
    "method": "aes-256-gcm",
    "local_address": "0.0.0.0",
    "local_port": 2015,
    "mode": "tcp_and_udp",
    "nofile": 1024,
    "local_udp_address": "0.0.0.0",
    "local_udp_port": 2015
}
yuhan6665 commented 2 years ago

You might need to put local configuration in a specific json array "locals":[] and configure sslocal? I'm not very familiar with it

DUOLabs333 commented 2 years ago

Incidentally enough, adding udp_address seems to fix my problem with SagerNet.

DUOLabs333 commented 2 years ago

Actually never mind, it failed again after a while.

DUOLabs333 commented 2 years ago

Interestingly, using the app's proxy works, which means the SOCKS proxy is connected to v2rayNG, but some reason, it isn't taking effect on the apps.