Closed AiziChen closed 3 years ago
贴下配置文件的内容。
main:
# Worker threads
workers: 4
# Listen port
port: 1081
# Listen address (ipv4|ipv6)
listen-address: '::'
auth:
username: quanye
password: quanyec
misc:
# task stack size (bytes)
task-stack-size: 8192
# connect timeout (ms)
connect-timeout: 5000
# read-write timeout (ms)
read-write-timeout: 60000
# stdout, stderr or file-path
log-file: stderr
# debug, info, warn or error
log-level: debug
# If present, run as a daemon with this pid file
# pid-file: /run/hev-socks5-server.pid
# If present, set rlimit nofile; else use default value
limit-nofile: 1024
我试了下把listen-address的值改成'0.0.0.0'也不行。不知道是哪里的问题。
hev_task_dns_getaddrinfo
返回没有传递 errno,请去掉 hev_task_dns_
前辍再用 perror
输出一下原始错误。
去掉 hev_task_dns_
前辍后能正常运行了。
这就很奇怪了,我这目前没有Mac系统来调试,刚才在FreeBSD上测试没有发现问题。 :confused:
我把hev-task-system/src/lib/dns/hev-task-dns-proxy.c
文件里面的SOCK_SEQPACKET
改成SOCK_STREAM
就可以了。
macOS似乎不支持SOCK_SEQPACKET
跟AF_UNIX
一起用。
https://stackoverflow.com/questions/13287333/sock-seqpacket-availability
Nice! 使用SOCK_STREAM
有风险,试试 AF_INET
+ SOCK_SEQPACKET
吧,看看行不行?
MacOS内核似乎就不支持 SOCK_SEQPACKET
。好吧,我再换个实现方式。
对,man socket后看到只支持以下三种:
SOCK_STREAM
SOCK_DGRAM
SOCK_RAW
好的。
感谢,已经解决!
在macOS平台上编译并运行,会提示:"[E] socks5 proxy addr" 我用perror函数打印这个错误,会显示:
Protocol not supported
我将ai_protocol设为0,错误同样还在。