Skip to content
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

在本地同时实现socks和http代理 #98

Closed
jcx70100 opened this issue Dec 18, 2018 · 3 comments
Closed

在本地同时实现socks和http代理 #98

jcx70100 opened this issue Dec 18, 2018 · 3 comments

Comments

@jcx70100
Copy link

  • 你正在使用哪个版本的 V2Ray?
  • 你的使用场景是什么?

目前使用v2ray都是用其作socks代理,现在有软件需要使用http代理,请问有没有办法在保留原来socks代理的情况下,增加http代理,使得软件根据需求选择socks代理或者http代理?

  • 你看到的不正常的现象是什么?

找了issues里面的提问还有往上的一些教程,都提到要在配置文件里面添加inboundDetour就可以,如下:

"inboundDetour": [{
        "port": 1090,
        "protocol": "http",
        "settings": {
        }
    }],

但是如此设置,重启v2ray服务后,依然无法使用http代理。但是之前的socks代理可以正常使用。

请教一下相关的大神,如何配置http代理,麻烦告知一下具体的操作,我只修改了客户端,服务端需要什么修改吗?还请大神指导一下,十分感谢!

  • 你期待看到的正确表现是怎样的?

在本地,socks和http代理可以共存使用

@jcx70100 jcx70100 changed the title 在本地同时实现socks和http 在本地同时实现socks和http代理 Dec 18, 2018
@slanterns
Copy link

服务端不需要修改
使用新版配置 inbounds 可以简化

@VictoriaRaymond
Copy link
Member

Moving to discussion as this is not an issue.

@VictoriaRaymond VictoriaRaymond transferred this issue from v2ray/v2ray-core Dec 18, 2018
@OpportunityLiu
Copy link

弄两个inbound配置就好了

{
  "inbounds": [
    {
      "port": 1080,
      "listen": "127.0.0.1",
      "tag": "socks-inbound",
      "protocol": "socks",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "auth": "noauth",
        "udp": false
      }
    },
    {
      "port": 32547,
      "listen": "127.0.0.1",
      "tag": "http-inbound",
      "protocol": "http",
      "sniffing": {
        "enabled": true,
        "destOverride": [
          "http",
          "tls"
        ]
      },
      "settings": {
        "timeout": 30,
        "allowTransparent": false,
        "userLevel": 0
      }
    }
  ],
}

@kslr kslr closed this as completed Feb 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants