frp
frp copied to clipboard
termux里fprc报lookup错误
Bug Description
版本0.44,用pkg安装的,当frpc连接服务器用域名的时候就会报超时错误,但是直接用ip地址是没问题的,出错信息如下: ~ $ frpc -c frpc-s30.ini 这是用域名w.ayok.site时的输出: 2022/08/22 06:33:01 [W] [service.go:128] login to server failed: lookup w.ayok.s ite on [::1]:53: read udp [::1]:38759->[::1]:53: read: connection refused 2022/08/22 06:33:11 [W] [service.go:128] login to server failed: lookup w.ayok.s ite on [::1]:53: read udp [::1]:49193->[::1]:53: read: connection refused 这是直接用IP地址时的输出: ~ $ frpc -c frpc-s30.ini 2022/08/22 06:51:22 [I] [service.go:349] [63423b0857eacf41] login to server succ ess, get run id [63423b0857eacf41], server udp port [7001] 2022/08/22 06:51:22 [I] [proxy_manager.go:144] [63423b0857eacf41] proxy added: [ ssh-s30 code-server-s30 postgresql-s30] 2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [ssh-s30] start prox y success 2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [code-server-s30] st art proxy success 2022/08/22 06:51:22 [I] [control.go:181] [63423b0857eacf41] [postgresql-s30] sta rt proxy success ^C2022/08/22 06:55:09 [I] [visitor_manager.go:60] [63423b0857eacf41] gracefully shutdown visitor manager 2022/08/22 06:55:09 [I] [control.go:316] [63423b0857eacf41] control writer is cl osing 我在ubuntu平台和win10的平台用frpc连接都没有问题。服务器的版本是0.38,平台是openwrt。
frpc Version
0.44
frps Version
0.38
System Architecture
termux/openwrt
Configurations
frpc.ini [common] server_addr = 175.0.122.40 server_port = 7000 token = yy987654321 protocol = kcp tcp_mux = true heartbeat_interval = 30 heartbeat_timeout = 90 login_fail_exit = false
frps.ini for openwrt config init option stdout 1 option stderr 1 option user frps option group frps option respawn 1 config conf 'common' option bind_addr 0.0.0.0 option bind_port 7000 option token yy987654321 option bind_udp_port 7001 option kcp_bind_port 7000
option vhost_http_port 800
option vhost_https_port 4430
option dashboard_addr 0.0.0.0
option dashboard_port 7500
option dashboard_user admin
option dashboard_pwd admin
option subdomain_host ayok.site
Logs
No response
Steps to reproduce
...
Affected area
- [ ] Docs
- [ ] Installation
- [ ] Performance and Scalability
- [ ] Security
- [X] User Experience
- [ ] Test and Release
- [ ] Developer Infrastructure
- [ ] Client Plugin
- [ ] Server Plugin
- [ ] Extensions
- [ ] Others
https://github.com/fatedier/frp/blob/3e721d122b2d5b33fdb90be279fcec2568ff14be/conf/frpc_full.ini#L106
加上这句dns_server = 8.8.8.8 后确实可以了,只是不太明白为什么,其它平台的不用加也可以。
以linux为例,未指定dns_server参数的话,它会去系统的/etc/resolv.conf查找dns配置,利用配置的dns地址去解析域名。termux中没这个配置文件,所以需要手动指定一下dns_server
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.