请教 Loopback 协议的使用方法,比如 Freedom 协议 发出的数据能重新路由吗? #2345
Unanswered
wy16W2pIilK1xgqN
asked this question in
Q&A
Replies: 1 comment 1 reply
-
The term "loopback" means to send the received data back to the sender and, in the context of V2Ray, to route the traffic to the input (the loopback is itself an output).
It doesn't work that way; they are both outbound protocols. Routing in V2Ray works by inbounds to outbounds, or outbounds to inbounds via loopback.
e.g. : I have two inbounds:
Then I can create following route with
Here is an example configuration {
"log": {
"loglevel": "info"
},
"inbounds": [
{
"tag": "http_proxy",
"protocol": "http",
"listen": "127.2.2.2",
"port": 2222
},
{
"tag": "vmess_proxy",
"protocol": "vmess",
"listen": "/dev/shm/vmess.sock",
"settings": {
"clients": [
{
"id": "a4c089b7-201a-4e4c-8786-2ba9f2e27a9c"
}
]
}
},
{
"tag": "quad_one",
"protocol": "dokodemo-door",
"listen": "127.1.1.1",
"port": 1111,
"settings": {
"address": "1.1.1.1",
"port": 80
}
},
{
"tag": "google",
"protocol": "dokodemo-door",
"listen": "127.8.8.8",
"port": 8888,
"settings": {
"address": "google.com",
"port": 80
}
}
],
"outbounds": [
{
"tag": "lo1",
"protocol": "loopback",
"settings": {
"inboundTag": "http_proxy"
}
},
{
"tag": "lo2",
"protocol": "loopback",
"settings": {
"inboundTag": "vmess_proxy"
}
},
{
"tag": "direct",
"protocol": "freedom"
}
],
"routing": {
"rules": [
{
"outboundTag": "lo1",
"inboundTag": [
"quad_one"
],
"type": "field"
},
{
"outboundTag": "lo2",
"inboundTag": [
"google"
],
"type": "field"
},
{
"outboundTag": "direct",
"inboundTag": [
"http_proxy",
"vmess_proxy"
],
"type": "field"
}
]
}
} After V2Ray is started, try
and
Then have a look at what happens and try to make sense of V2Ray's log. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Loopback 协议的说明只有一句,让人难以理解。
比如 Freedom 协议 发出的数据能重新路由吗?
如果可以希望能给个例子,也方便大家搜索。
🥺
Beta Was this translation helpful? Give feedback.
All reactions