Replies: 1 comment
-
让你这个161.77.230.211去处理~ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我的config.json配置 (此处隐藏了用户名和密码信息)
{
"log": {
"access": "logs/access.log",
"error": "logs/error.log",
"loglevel": "debug"
},
"inbounds": [
{ "tag": "P001IN","protocol": "socks","port": 40001,"listen": "0.0.0.0", "allocate": {"strategy": "always", "refresh": 5, "concurrency": 3}, "settings": {"network":"tcp,udp","udp":true}, "streamSettings": {}, "domainOverride": ["http", "tls"]},
{ "tag": "P002IN","protocol": "socks","port": 40002,"listen": "0.0.0.0", "allocate": {"strategy": "always", "refresh": 5, "concurrency": 3}, "settings": {"network":"tcp,udp","udp":true}, "streamSettings": {}, "domainOverride": ["http", "tls"]},
{ "tag": "S30001IN","protocol": "socks","port": 30001,"listen": "0.0.0.0", "allocate": {"strategy": "always", "refresh": 5, "concurrency": 3}, "settings": {"network":"tcp,udp","udp":true}, "streamSettings": {}, "domainOverride": ["http", "tls"]},
{ "tag": "S30002IN","protocol": "socks","port": 30002,"listen": "0.0.0.0", "allocate": {"strategy": "always", "refresh": 5, "concurrency": 3}, "settings": {"network":"tcp,udp","udp":true}, "streamSettings": {}, "domainOverride": ["http", "tls"]}
],
"outbounds": [
{"tag":"OS99999","protocol":"socks", "settings":{"servers":[{"address":"192.168.255.255","port":59999,"users":[{"user":"user","pass":"password","level":1}]}]},"streamSettings":{"network":"tcp"},"mux":{"enabled":false,"concurrency":-1}},
{"tag":"P001OUT","protocol":"vmess","settings":{"vnext":[{"address":"23.105.200.38","port":6885,"users":[{"id":"password","alterId":0,"email":"[email protected]","security":"auto"}]}]},"streamSettings":{"network":"tcp"},"mux":{"enabled":false,"concurrency":-1}},
{"tag":"P002OUT","protocol":"vmess","settings":{"vnext":[{"address":"45.62.105.4","port":6885,"users":[{"id":"password","alterId":0,"email":"[email protected]","security":"auto"}]}]},"streamSettings":{"network":"tcp"},"mux":{"enabled":false,"concurrency":-1}},
{"tag":"S30001OUT","protocol":"socks", "settings":{"servers":[{"address":"161.77.230.211","port":59101,"users":[{"user":"user","pass":"password","level":1}]}]},"streamSettings":{"network":"tcp"},"mux":{"enabled":false,"concurrency":-1}},
{"tag":"S30002OUT","protocol":"socks", "settings":{"servers":[{"address":"161.77.228.201","port":59101,"users":[{"user":"user","pass":"password","level":1}]}]},"streamSettings":{"network":"tcp"},"mux":{"enabled":false,"concurrency":-1}},
{"tag":"OS89999","protocol":"socks", "settings":{"servers":[{"address":"192.168.255.255","port":59999,"users":[{"user":"user","pass":"password","level":1}]}]},"streamSettings":{"network":"tcp"},"mux":{"enabled":false,"concurrency":-1}}
],
"routing": {
"domainStrategy": "IPIfNonMatch",
"settings": {
"rules": [
{"type": "field", "inboundTag": "P001IN", "outboundTag": "P001OUT"},
{"type": "field", "inboundTag": "P002IN", "outboundTag": "P002OUT"},
{"type": "field", "inboundTag": "S30001IN", "outboundTag": "S30001OUT"},
{"type": "field", "inboundTag": "H35001IN", "outboundTag": "S30001OUT"},
{"type": "field", "inboundTag": "S30002IN", "outboundTag": "S30002OUT"},
{"type": "field", "inboundTag": "H35002IN", "outboundTag": "S30002OUT"}
]}},
"dns": {
"servers": [
{ "address": "8.8.8.8", "port": 53, "protocol": "tcp" },
{ "address": "1.1.1.1", "port": 53, "protocol": "tcp" },
{ "address": "8.8.8.8", "port": 53, "protocol": "udp" },
{ "address": "1.1.1.1", "port": 53, "protocol": "udp" }
]
}
}
目前有三台电脑
Windows Xray 192.168.1.16
centos7 网关 192.168.1.233
centos7 客户机 192.168.1.234
网关(192.168.1.233 )的tun2socks 转发流量到xray上
nohup tun2socks -device tun_hk_1 -proxy socks5://192.168.1.16:30001 > /root/logs/tun/tun_hk_1.log 2>&1 &
xray位于windows 192.168.1.16上配置如开始处的config.json
客户机192.168.1.234 发出请求, 发现无法解析域名
192.168.1.234配置的网关为192.168.1.233,dns为8.8.8.8
[root@192 ~]# curl ipinfo.io curl: (6) Could not resolve host: ipinfo.io; Unknown error
tun2socks 日志
time="2024-09-22T15:57:55+08:00" level=info msg="[UDP] 10.33.1.1:38275 <-> 8.8.8.8:53"
time="2024-09-22T16:05:13+08:00" level=info msg="[UDP] 10.33.1.1:58844 <-> 8.8.8.8:53"
time="2024-09-22T16:05:13+08:00" level=info msg="[UDP] 10.33.1.1:37538 <-> 8.8.8.8:53"
xray的日志
2024/09/22 08:05:13 [Info] [3521025083] proxy/socks: client UDP connection from udp:192.168.1.233:47052
2024/09/22 08:05:13 [Debug] [3521025083] proxy/socks: send packet to udp:8.8.8.8:53 with 44 bytes
2024/09/22 08:05:13 [Debug] [3521025083] transport/internet/udp: dispatch request to: udp:8.8.8.8:53
2024/09/22 08:05:13 [Info] [3521025083] transport/internet/udp: establishing new connection for udp:8.8.8.8:53
2024/09/22 08:05:13 [Info] [3521025083] app/dispatcher: taking detour [S30001OUT] for [udp:8.8.8.8:53]
2024/09/22 08:05:13 [Info] [3521025083] transport/internet/tcp: dialing TCP to tcp:161.77.230.211:59101
2024/09/22 08:05:13 [Debug] [3521025083] transport/internet: dialing to tcp:161.77.230.211:59101
2024/09/22 08:05:13 [Info] [2516599688] proxy/socks: client UDP connection from udp:192.168.1.233:42661
2024/09/22 08:05:13 [Debug] [2516599688] proxy/socks: send packet to udp:8.8.8.8:53 with 44 bytes
2024/09/22 08:05:13 [Debug] [2516599688] transport/internet/udp: dispatch request to: udp:8.8.8.8:53
2024/09/22 08:05:13 [Info] [2516599688] transport/internet/udp: establishing new connection for udp:8.8.8.8:53
2024/09/22 08:05:13 [Info] [2516599688] app/dispatcher: taking detour [S30001OUT] for [udp:8.8.8.8:53]
2024/09/22 08:05:13 [Info] [2516599688] transport/internet/tcp: dialing TCP to tcp:161.77.230.211:59101
2024/09/22 08:05:13 [Debug] [2516599688] transport/internet: dialing to tcp:161.77.230.211:59101
2024/09/22 08:05:18 [Debug] [3521025083] proxy/socks: send packet to udp:8.8.8.8:53 with 44 bytes
2024/09/22 08:05:18 [Debug] [3521025083] transport/internet/udp: dispatch request to: udp:8.8.8.8:53
2024/09/22 08:05:18 [Debug] [2516599688] proxy/socks: send packet to udp:8.8.8.8:53 with 44 bytes
2024/09/22 08:05:18 [Debug] [2516599688] transport/internet/udp: dispatch request to: udp:8.8.8.8:53
2024/09/22 08:08:13 [Info] [2516599688] app/proxyman/inbound: connection ends > EOF
2024/09/22 08:08:13 [Info] [3521025083] app/proxyman/inbound: connection ends > EOF
我目的是想要客户机192.168.1.234 解析ipinfo.io 域名解析请求交给远程socks5 161.77.230.211 这个IP请求8.8.8.8解析。
有那些兄弟知道该如何处理吗?
Beta Was this translation helpful? Give feedback.
All reactions