-
Notifications
You must be signed in to change notification settings - Fork 284
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
请求加上loopback的outbound出口 #428
Comments
没研究过loop back怎么用,能给个链接吗。 |
基本上就是这样,然后route里边写出口为loopback就行,官方介绍在这里,但那个inboundTag好像没啥用,自定义route的话 |
请问还需要配置StreamSettings吗? |
就我实际使用中来说是不需要的,它文档里边好像也没有streamSettings的设置 |
我记得xray好像不支持loopback吧 |
所以没测试, 因为换了V2RAY内核的话, 我又要配置VPS才能上来GITHUB了, 如果生成的json没问题的话我就贴代码了 |
麻烦把这个outbound markdown一下,我试试先 |
只适用于 1.56的版本, 对应Openwrt 19.0(不含)以前的版本
替换/etc/init.d/v2ray
|
emm,我的意思是,那段json,主要是我的是21.02.0,没得这个文件 |
21.02的话, 我得装个虚拟机才行, 我的软路由都是18的版本的,
|
实测可行,我的usecase是反向代理回来,然后试了下不要Inboundtag自己写route rule,或者直接在inboundTag里填那个reverse的tag,都可以用 |
xc
Reverse的tag是哪里来的?也是从Inbound吗? 反向代理的设置页面没有看到tag的设置项呀 |
Reverse里边有个tag,比如我的是这样的
|
看懂了, 我再改改, 不过luci-app-v2ray_2.0.0的代码有点辣眼睛, 没那么快 |
没事,慢慢来,不急,谢谢 |
我在虚拟机用19.07的OpenWrt测试过, 可以生成json文件, 但是因为我自己使用xray-core,也没条件测试反向代理 |
嗷, 看了一下,应该不是json文件错误, 你试试将每个入站连接,出站连接和DNS设置的TAG都填写一下 |
@WordsWorthLess 你修改的新代码在哪里可以获得?我也要用Xray的VLESS协议。全局配置了 V2Ray 文件 与配置文件后,吃尽设备内存。本来以为是Xray本身问题。但通过Shell运行Xray并出现吃尽内存的问题。 |
https://github.com/kuoruan/luci-app-v2ray/files/7218449/luci-app-v2ray_2.0.0-all.zip |
这个生成配置文件Json错误。发生在VMESS本协议中: 错误的outbounds....
"sockopt": {
"domainStrategy": "UseIP",
"mark": 255,
"tcpFastOpen": true
}
},
"proxy", 正确应该为:....
"sockopt": {
"domainStrategy": "UseIP",
"mark": 255,
"tcpFastOpen": true
},
}
"tag": "proxy",
"mux": {
"enabled": true,
"concurrency": 8
} |
我试了一下,没发现问题啊, 新添加的outbound都可以正确配置好 |
配置生成的完整内容 {
"log": {
"loglevel": "debug",
"error": ""
},
"dns": {
"tag": "dns_list",
"servers": [
{
"address": "223.5.5.5",
"port": 53,
"domains": [
"geosite:cn"
],
"expectIPs": [
"geoip:cn"
]
},
{
"address": "8.8.8.8",
"port": 53,
"domains": [
"geosite:geolocation-!cn"
]
},
{
"address": "208.67.222.222",
"port": 53,
"domains": [
]
},
"localhost"
]
},
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [
{
"type": "field",
"domain": [
"geosite:cn",
"openwrt.org"
],
"outboundTag": "direct"
},
{
"type": "field",
"ip": [
"geoip:private",
"geoip:cn"
],
"outboundTag": "direct"
},
{
"type": "field",
"port": "123",
"network": "udp",
"outboundTag": "direct"
},
{
"type": "field",
"domain": [
"geosite:category-ads"
],
"protocol": [
"http",
"tls"
],
"outboundTag": "block"
},
{
"type": "field",
"domain": [
"geosite:geolocation-!cn"
],
"outboundTag": "proxy"
},
{
"type": "field",
"ip": [
"0.0.0.0/0"
],
"outboundTag": "proxy"
}
]
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 10809,
"protocol": "dokodemo-door",
"settings": {
"followRedirect": true,
"network": "tcp"
},
"streamSettings": {
"sockopt": {
"tproxy": "redirect"
}
},
"tag": "transparent",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
},
{
"listen": "0.0.0.0",
"port": 10808,
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": true
},
"streamSettings": {
"sockopt": {
}
},
"tag": "socks",
"sniffing": {
"enabled": true,
"destOverride": [
"http",
"tls"
]
}
}
],
"outbounds": [
{
"protocol": "freedom",
"settings": {
"domainStrategy": "UseIP"
},
"streamSettings": {
"sockopt": {
"mark": 255
}
},
"tag": "direct"
},
{
"protocol": "blackhole",
"settings": {
},
"streamSettings": {
"sockopt": {
"mark": 255
}
},
"tag": "block"
},
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "*****",
"port": 45618,
"users": [
{
"id": "****",
"alterId": 10,
"security": "auto"
}
]
}
]
},
"streamSettings": {
"network": "tcp",
"serverName": "*****",
"alpn": [
"h2",
"http/1.1"
],
"allowInsecure": false,
"allowInsecureCiphers": false,
"disableSystemRoot": false,
"certificates": [
]
},
"tcpSettings": {
},
"sockopt": {
"domainStrategy": "UseIP",
"mark": 255,
"tcpFastOpen": true
}
},
// 以下是错误的内容
"proxy",
{
"enabled": true,
"concurrency": 8
}
]
} 补充其实并不是出现在某个协议,似乎是只要不勾选【xTLS - 启用】时就会生成错误的JSON |
|
编译可安装版本。因个人所需而修改。不能保证全部可用。
请试用: |
我的XRAY还停留在1.42版,新版的dns有什么新功能都没仔细研究过了
代码未验证过,大概就是这么写,可能有些错误,但是应该不难改 |
使用场景为反向代理到服务器,用户通过服务器访问回家里的服务,这时用direct的话没办法方便地像从家里一样访问外网,这时loopback就很有用了。谢谢。
The text was updated successfully, but these errors were encountered: