-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
新增功能支持 #1186
新增功能支持 #1186
Conversation
2.重新启用部分出入口vless、vmess、socks、freedom、dokodemo、pf(本次新增入口)的timeout参数,来控制TCP链接超时时间,不配置默认使用300s或者600s(保持现有逻辑),在xray应用与内部之间系统代理执行长事物时有此需求应用场景 增加pf入口配置demo如下: { "inbounds": [ { "tag": "all-in", "port": 1234, "protocol": "pf", "settings": { "network": "tcp", "followRedirect": true, "timeout": 7200, "userLevel": 0 } } ], "log": { "loglevel": "debug" }, "outbounds": [ {} ] }
Thanks for you pr! A couple of things:
|
Is pf really a protocol? How do you configure it and why dokodemo doesn't work for you? Tcp timeout should be part of the "streamsettings" -> take a look at tcp settings under Sockopt Consider making smaller pull request for one feature separately |
FreeBSD configures transparent agents on MacOS as follows: 1.Create a new file ~/config/pf.conf with the following contents: #Define table nat-anchor "com.apple/*" #Forward all traffic on lo0 whose destination is not in the direct address list to the Xray pf listening address 127.0.0.1:1234 rdr-anchor "com.apple/*" #Route all traffic of en0 whose destination is not in the direct address list to lo0 dummynet-anchor "com.apple/" 2.Execute command: 3.xray logs |
Thanks for your info. Now I understand a bit more about pf. Essentially it is the similar port forwarding traffic with special way to read the destination address. I would propose the following: tproxy option determine how to override the dest address Xray-core/proxy/dokodemo/dokodemo.go Line 89 in 76638d7
In fact you can see we already have platform dependant code for "tproxy": "redirect"
|
According to your suggestions, the corresponding modifications have been made |
合了#1189 这个先关了 |
1.针对macos系统,增加入口pf,支持接收macos系统 pf防火墙转发过来的消息
2.重新启用部分出入口vless、vmess、socks、freedom、dokodemo、pf(本次新增入口)的timeout参数,来控制TCP链接超时时间,不配置默认使用300s或者600s(保持现有逻辑),在xray应用与内部之间系统代理执行长事物时有此需求应用场景
增加pf入口配置demo如下:
{
"inbounds": [
{
"tag": "all-in",
"port": 1234,
"protocol": "pf",
"settings": {
"network": "tcp",
"followRedirect": true,
"timeout": 7200,
"userLevel": 0
}
}
],
"log": {
"loglevel": "debug"
},
"outbounds": [
{}
]
}