Closed DUOLabs333 closed 2 years ago
You config outbound is wrong, plz see https://www.v2fly.org/config/protocols/socks.html#outboundconfigurationobject
I'm confused -- is the config for setting up a server on the phone, or connecting to an outside server?
If you connect to a local socks server, your config know nothing about remote
192.168.1.51:2015
is a remote server.
Doesn't look like a remote server. But in any case you config is wrong, you need to follow the document of core
I just clicked Type Manually [SOCKS]
and went from there. Is there something else I need to do?
我仔细看了好像确实不是你的配置问题 而是 ng 里面 socks 的老问题 我之后研究一下
@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)
My configuration has both tcp and udp enabled.
Which Shadowsocks implementation do you use? Can you post your server config as well?
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",
}
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
},
Where would I connect the local UDP port in the app?
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.
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
}
You might need to put local configuration in a specific json array "locals":[] and configure sslocal? I'm not very familiar with it
Incidentally enough, adding udp_address
seems to fix my problem with SagerNet
.
Actually never mind, it failed again after a while.
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.
在提出问题前请先自行排除服务器端问题,同时也请通过搜索确认是否有人提出过相同问题。
预期行为
描述你认为应该发生什么 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
or127.0.0.1.nip.io
). With SagerNET, I can.实际行为
描述实际发生了什么 Trying to connect leads to
Connection refused
.复现方法
日志信息
环境信息
Google Pixel, Android 10
额外信息(可选)