frp-Android
frp-Android copied to clipboard
Socks5模式连上server后代理还是无法使用
Socks5模式连上server后代理还是无法使用,请教下是什么原因
给下配置
`serverAddr = "xxxxxx" serverPort = 7000 auth.method = "xxxx" auth.token = "xxxxx"
[[proxies]] name = "pixel" type = "tcp" remotePort = 6007 [proxies.plugin] type = "socks5" username = "taylor" password = "taylor"`
有服务端和客户端日志吗
服务端:
2024/04/15 21:32:28 [I] [service.go:533] [5bed1f62149f8a6c] client login info: ip [xxxxx:43740] version [0.56.0] hostname [] os [linux] arch [arm64] 2024/04/15 21:32:28 [I] [tcp.go:82] [5bed1f62149f8a6c] [pixel] tcp proxy listen port [6007] 2024/04/15 21:32:28 [I] [control.go:500] [5bed1f62149f8a6c] new proxy [pixel] type [tcp] success 2024/04/15 21:33:10 [I] [proxy.go:204] [5bed1f62149f8a6c] [pixel] get a user connection [xxxxxx:50984]
客户端 [1;34m2024-04-16 05:32:30.425 [I] [sub/root.go:142] startfrpc service for config file [config.toml][0m[1:34m2024-04-16 05:32:30.426 [I] [client/ service.go:294l try to connect to server.[0m[1;34m2024-04-16 05:32:30.548 [I] [client/service.go:286][5bed1f62149f8a6c] login to server success,get run id [5bed1f62149f8a6c][0m[1;34m2024-04-16 05:32:30.549 [I] [proxy/ proxy_manager.go:173][5bed1f62149f8a6c] proxy added: pixel1 [0m[1;34m2024-04-16 05:32:30.600 [I] [client/control.go:170][5bed1f62149f8a6c][pixel] start proxy success
我这里测试没问题
测试环境:
frp服务端当作中转机 运行在公网服务器使用Docker部署
docker-compose.yml
:
services:
frps:
image: snowdreamtech/frps:latest
container_name: frps
restart: unless-stopped
entrypoint: /usr/bin/frps
command: --bind_port 7000 --bind_udp_port 7001 --log_level info --token <token>
network_mode: "host"
frp-Android用作内网的socks5落地机
serverAddr = "<服务器地址>"
serverPort = 7000
auth.token = "<token>"
dnsServer = "119.29.29.29"
[log]
level = "debug"
disablePrintColor = true
[[proxies]]
name = "pixel"
type = "tcp"
remotePort = 30070
[proxies.plugin]
type = "socks5"
username = "taylor"
password = "taylor"
非内网机器使用curl通过公网服务器使用socks5协议访问内网资源
PS C:\Users\Ace> curl.exe -v -I -U taylor:taylor -x socks5h://<服务器地址>:30070 http://10.21.5.1:8080/service/
* Trying <服务器IP>:30070...
* Connected to <服务器地址> (<服务器IP>) port 30070
* SOCKS5 connect to 10.21.5.1:8080 (remotely resolved)
* SOCKS5 request granted.
* Connected to <服务器地址> (<服务器IP>) port 30070
> GET /service/ HTTP/1.1
> Host: 10.21.5.1:8080
> User-Agent: curl/8.4.0
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Server: nginx/1.18.0
Server: nginx/1.18.0
< Date: Wed, 17 Apr 2024 00:58:41 GMT
Date: Wed, 17 Apr 2024 00:58:41 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 612
Content-Length: 612
< Last-Modified: Mon, 26 Oct 2020 02:13:01 GMT
Last-Modified: Mon, 26 Oct 2020 02:13:01 GMT
< Connection: keep-alive
Connection: keep-alive
< ETag: "5f9630ad-264"
ETag: "5f9630ad-264"
< Accept-Ranges: bytes
Accept-Ranges: bytes
<
* Connection #0 to host <服务器地址> left intact
建议试试在frp-Android加上dnsServer配置 然后服务端客户端配置都加上debug日志 最后使用curl开verbose日志访问看下情况
手机切到wifi能连上,用4G就不通了。。。
这里的「手机」是指运行frp-Android的设备 还是使用代理的设备 是如何使用socks5代理的 代理访问的资源是什么 详细描述一下你的使用方式
- 手机是指运行frp-Android的设备。
- 用ads浏览器 挂 socks5代理访问的
- 运行frp-Android的设备连上wifi后使用2的场景可以使用,当设备(frp-Android的设备)切换到手机流量(境外卡4G流量)后,场景2无法使用
是另一台手机「挂 socks5代理访问」吗 「挂 socks5代理访问」了什么资源/网站 运行frps的服务器在国内还是国外