Skip to content

作为插件配合 shadowsocks-rust 使用时监听端口不正确的问题 #15

Description

@pexcn

以下是配置文件的关键部分:

        // 服务端
        {
            "server": "0.0.0.0",
            "server_port": 2047,
            "password": "${SHADOWSOCKS_PASSWORD}",
            "method": "chacha20-ietf-poly1305",
            "mode": "tcp_only",
            "plugin": "qtun-server",
            "plugin_opts": "acme_host=my.domain.com"
        },

        // 客户端
        {
            "server": "xxx.xxx.xxx.xxx",
            "server_port": 2047,
            "password": "${SHADOWSOCKS_PASSWORD}",
            "method": "chacha20-ietf-poly1305",
            "mode": "tcp_only",
            "plugin": "qtun-client",
            "plugin-opts": "host=my.domain.com"
        },

启动命令分别为:

ssservice server --config ./server.json -v
ssservice local --config ./local.json -v

日志里出现了:

2023-02-02T15:03:33.354735714+08:00 DEBUG [298:139989240718384] [shadowsocks::plugin] started plugin "qtun-client" on 127.0.0.1:34297 <-> xxx.xxx.xxx.xxx:2047 (302)
[2023-02-02T07:03:33Z INFO  qtun_client] listening on 127.0.0.1:8138

root@OpenWrt:~# netstat -nap | grep qtun-client
tcp        0      0 127.0.0.1:8138          0.0.0.0:*               LISTEN      5027/qtun-client
udp        0      0 :::50575                :::*                                5027/qtun-client
unix  3      [ ]         STREAM     CONNECTED     2072588 5027/qtun-client
unix  3      [ ]         STREAM     CONNECTED     2072589 5027/qtun-client

此时 qtun-client 监听的端口应该为 34297, 但实际监听了 8138.

相关问题:shadowsocks/shadowsocks-rust#1104

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions