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

[solved]一个进程可以同时开socks与http吗? #129

Closed
ghost opened this issue May 1, 2016 · 9 comments
Closed

[solved]一个进程可以同时开socks与http吗? #129

ghost opened this issue May 1, 2016 · 9 comments

Comments

@ghost
Copy link

ghost commented May 1, 2016

RT,inbound 与 inboundDetour。

@v2ray
Copy link
Collaborator

v2ray commented May 1, 2016

可以的

@ghost
Copy link
Author

ghost commented May 1, 2016

@v2ray (http)inbound 与 (socks)inboundDetour 还是(socks)inbound 与 (http)inboundDetour?

@v2ray
Copy link
Collaborator

v2ray commented May 1, 2016

没有区别。inbound 有且只能有一个,inboundDetour 可以有多个,怎么写方便就怎么写。

@ghost
Copy link
Author

ghost commented May 1, 2016

@v2ray http 与 socks 的端口怎么写?这么调试都不通过……求助。

@ghost
Copy link
Author

ghost commented May 1, 2016

{
    "port": 80,
    "log": {
        "access": ""
    },
    "inbound": {
        "protocol": "socks",
        "settings": {
            "auth": "noauth",
            "udp": false,
            "ip": "0.0.0.0",
            "port": 1080
        }
    },
    "inboundDetour": {
        "protocol": "http",
        "settings": {}
    },

... ... ... ...

@v2ray
Copy link
Collaborator

v2ray commented May 1, 2016

Socks 的 settings 中没有 port 选项,猜测你把 http 的 port 搞混了。另外部份操作系统不允许监听1000以下的端口。

大概应该是这样:

{
    "port": 1080,
    "log": {
        "access": ""
    },
    "inbound": {
        "protocol": "socks",
        "settings": {
            "auth": "noauth",
            "udp": false,
            "ip": "0.0.0.0"
        }
    },
    "inboundDetour": {
        "protocol": "http",
        "port": 8080,
        "settings": {}
    },

@ghost
Copy link
Author

ghost commented May 1, 2016

还是不行……

D:\v2ray>v2ray.exe
V2Ray v1.11.2 (New Order) 20160419
An unified platform for anti-censorship.
2016/05/01 23:30:03 [Error]Failed to load server config: json: cannot unmarshal
object into Go value of type []_point.InboundDetourConfig
2016/05/01 23:30:03 [Error]Failed to read config file (D:\v2ray\config.json): D:
\v2ray\config.jsonjson: cannot unmarshal object into Go value of type []_point.I

nboundDetourConfig

{
"port": 3786,
"log": {
"access": ""
},
"inbound": {
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": false,
"ip": "0.0.0.0"
}
},
"inboundDetour": {
"protocol": "http",
"port": 8080,
"settings": {}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "1.2.3.4",
"port": 443,
"users": [
{
"id": "xxxxxxx-xxxx-xxxx-xxxxxxxx",
"alterId": 100
}
]
}
]
}
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "direct"
}
]
}
}
}

@v2ray
Copy link
Collaborator

v2ray commented May 1, 2016

InboundDetour 最外层是一个 [ ]。

{
    "port": 3786,
    "log": {
        "access": ""
    },
    "inbound": {
        "protocol": "socks",
        "settings": {
            "auth": "noauth",
            "udp": false,
            "ip": "0.0.0.0"
        }
    },
    "inboundDetour": [{
        "protocol": "http",
        "port": 8080,
        "settings": {}
    }],
    "outbound": {
        "protocol": "vmess",
        "settings": {
            "vnext": [
                {
                    "address": "1.2.3.4",
                    "port": 443,
                    "users": [
                        {
                            "id": "xxxxxxx-xxxx-xxxx-xxxxxxxx",
                            "alterId": 100
                        }
                    ]
                }
            ]
        }
    },
    "outboundDetour": [
        {
            "protocol": "freedom",
            "settings": {},
            "tag": "direct"
        }
    ],
    "routing": {
        "strategy": "rules",
        "settings": {
            "rules": [
                {
                    "type": "field",
                    "ip": [
                        "0.0.0.0/8",
                        "10.0.0.0/8",
                        "100.64.0.0/10",
                        "127.0.0.0/8",
                        "169.254.0.0/16",
                        "172.16.0.0/12",
                        "192.0.0.0/24",
                        "192.0.2.0/24",
                        "192.168.0.0/16",
                        "198.18.0.0/15",
                        "198.51.100.0/24",
                        "203.0.113.0/24",
                        "::1/128",
                        "fc00::/7",
                        "fe80::/10"
                    ],
                    "outboundTag": "direct"
                }
            ]
        }
    }
}

@ghost
Copy link
Author

ghost commented May 2, 2016

@v2ray 明白了。感谢!

@ghost ghost closed this as completed May 2, 2016
@ghost ghost changed the title 一个进程可以同时开socks与http吗? [solved]一个进程可以同时开socks与http吗? Aug 11, 2016
rosebe pushed a commit to rosebe/v2ray-core that referenced this issue Aug 27, 2020
…com/google/go-cmp-0.5.2

Bump github.com/google/go-cmp from 0.5.1 to 0.5.2
This issue was closed.
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

0 participants