{"action":"created","issue":{"url":"https://api.github.com/repos/v2ray/v2ray-core/issues/426","repository_url":"https://api.github.com/repos/v2ray/v2ray-core","labels_url":"https://api.github.com/repos/v2ray/v2ray-core/issues/426/labels{/name}","comments_url":"https://api.github.com/repos/v2ray/v2ray-core/issues/426/comments","events_url":"https://api.github.com/repos/v2ray/v2ray-core/issues/426/events","html_url":"https://github.com/v2ray/v2ray-core/issues/426","id":219555822,"number":426,"title":"[请教]关于路由部分的设置有点绕，望借鉴下大家的经验 :)","user":{"login":"BenhoNNNN","id":12547424,"avatar_url":"https://avatars0.githubusercontent.com/u/12547424?v=3","gravatar_id":"","url":"https://api.github.com/users/BenhoNNNN","html_url":"https://github.com/BenhoNNNN","followers_url":"https://api.github.com/users/BenhoNNNN/followers","following_url":"https://api.github.com/users/BenhoNNNN/following{/other_user}","gists_url":"https://api.github.com/users/BenhoNNNN/gists{/gist_id}","starred_url":"https://api.github.com/users/BenhoNNNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenhoNNNN/subscriptions","organizations_url":"https://api.github.com/users/BenhoNNNN/orgs","repos_url":"https://api.github.com/users/BenhoNNNN/repos","events_url":"https://api.github.com/users/BenhoNNNN/events{/privacy}","received_events_url":"https://api.github.com/users/BenhoNNNN/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-05T11:46:42Z","updated_at":"2017-04-05T11:54:46Z","closed_at":null,"body":"**1)  你正在使用哪个版本的 V2Ray？**\r\nv2.20.2\r\n\r\n**2)  你的使用场景是什么？**\r\nClients ==Socks5/http==> Server1 ==vmess==> Server2 ==free==>\r\n\r\n**3)  你看到的现象是什么？**\r\n原来流量进入 1111(Socks5) 或 3333(http) 端口，全部从 Server2 出；\r\n流量进入端口 2222(http) ，全部从 Server1 出。\r\n增加了路由规则（如下）后，\r\n```\r\n                {\r\n                    \"type\": \"chinaip\",\r\n                    \"outboundTag\": \"direct\"\r\n                },\r\n```\r\n流量进入 1111(Socks5)  与 3333(http) 端口，自动按照境内外IP分别从Server1 与 Server2 出。\r\n\r\n**4)  你期待看到的正确表现是怎样的？**\r\n最小改动配置实现：\r\n流量进入 1111(Socks5) 全部从 Server2 出；\r\n流量进入 2222(http) 全部从 Server1 出；\r\n流量进入 3333(http) 自动按照境内外IP分流，分别从 Server1 与 Server2 出；\r\n\r\n\r\n**5)  附上Server1(Client)配置文件**\r\n```\r\n{\r\n    \"inbound\": {\r\n        \"protocol\": \"socks\",\r\n        \"port\": 1111\r\n    },\r\n    \"inboundDetour\": [\r\n        {\r\n            \"protocol\": \"http\",\r\n            \"port\": 2222,\r\n            \"tag\": \"zhilian\"\r\n        },\r\n        {\r\n            \"protocol\": \"http\",\r\n            \"port\": 3333\r\n        }\r\n    ],\r\n    \"outbound\": {\r\n        \"protocol\": \"vmess\"\r\n    },\r\n    \"outboundDetour\": [\r\n        {\r\n            \"protocol\": \"freedom\",\r\n            \"tag\": \"direct\"\r\n        },\r\n        {\r\n            \"protocol\": \"blackhole\",\r\n            \"tag\": \"blocked\"\r\n        }\r\n    ],\r\n    \"dns\": {\r\n        \"servers\": [\r\n            \"8.8.8.8\",\r\n            \"223.5.5.5\"\r\n        ]\r\n    },\r\n    \"routing\": {\r\n        \"strategy\": \"rules\",\r\n        \"settings\": {\r\n            \"domainStrategy\": \"IPIfNonMatch\",\r\n            \"rules\": [\r\n                {\r\n                    \"type\": \"chinaip\",\r\n                    \"outboundTag\": \"direct\"\r\n                },\r\n                {\r\n                    \"type\": \"field\",\r\n                    \"inboundTag\": [\r\n                        \"zhilian\"\r\n                    ],\r\n                    \"outboundTag\": \"direct\"\r\n                },\r\n                {\r\n                    \"type\": \"field\",\r\n                    \"domain\": [\r\n                        \"whitelist.com\"\r\n                    ],\r\n                    \"outboundTag\": \"direct\"\r\n                },\r\n                {\r\n                    \"type\": \"field\",\r\n                    \"domain\": [\r\n                        \"blacklist.com\"\r\n                    ],\r\n                    \"outboundTag\": \"blocked\"\r\n                },\r\n                {\r\n                    \"type\": \"field\",\r\n                    \"ip\": [\r\n                        \"192.168.0.0/16\"\r\n                    ],\r\n                    \"outboundTag\": \"direct\"\r\n                }\r\n            ]\r\n        }\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/v2ray/v2ray-core/issues/comments/291838293","html_url":"https://github.com/v2ray/v2ray-core/issues/426#issuecomment-291838293","issue_url":"https://api.github.com/repos/v2ray/v2ray-core/issues/426","id":291838293,"user":{"login":"BenhoNNNN","id":12547424,"avatar_url":"https://avatars0.githubusercontent.com/u/12547424?v=3","gravatar_id":"","url":"https://api.github.com/users/BenhoNNNN","html_url":"https://github.com/BenhoNNNN","followers_url":"https://api.github.com/users/BenhoNNNN/followers","following_url":"https://api.github.com/users/BenhoNNNN/following{/other_user}","gists_url":"https://api.github.com/users/BenhoNNNN/gists{/gist_id}","starred_url":"https://api.github.com/users/BenhoNNNN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BenhoNNNN/subscriptions","organizations_url":"https://api.github.com/users/BenhoNNNN/orgs","repos_url":"https://api.github.com/users/BenhoNNNN/repos","events_url":"https://api.github.com/users/BenhoNNNN/events{/privacy}","received_events_url":"https://api.github.com/users/BenhoNNNN/received_events","type":"User","site_admin":false},"created_at":"2017-04-05T11:54:46Z","updated_at":"2017-04-05T11:54:46Z","body":"json配置文件“精简”后，好像看得清楚了些……\r\n```\r\n    \"inbound\": {\r\n        \"protocol\": \"socks\",\r\n        \"port\": 1111\r\n        \"tag\": \"2vmess\"\r\n    },\r\n\r\n... ...\r\n\r\n    \"outbound\": {\r\n        \"protocol\": \"vmess\"\r\n        \"tag\": \"vmess\"\r\n    },\r\n\r\n... ...\r\n\r\n                {\r\n                    \"type\": \"field\",\r\n                    \"inboundTag\": [\r\n                        \"2vmess\"\r\n                    ],\r\n                    \"outboundTag\": \"vmess\"\r\n                },\r\n```\r\n我先试试……"}}
{"actor":{"display_login":"BenhoNNNN"}}