Shadowsocks-libev: server_port和local_port有何区别/What Is the Difference Between server_port and local_port

Created on 22 Feb 2020  ·  2Comments  ·  Source: shadowsocks/shadowsocks-libev

[CN]

  1. server_port和local_port有何区别,用途分别是什么?
  2. 通过ss-redir代理时,client和ss-redir的server和port应该怎样设置?

[EN]

  1. What is the difference between server_port and local_port, and what're they used for?
  2. ss-local->ss-redir->ss-server, in this proxy path, how to set the server address and ports?
question

Most helpful comment

这玩意要阅读源码才知道有什么用,server_port和local_port的读入是在jconf.c的read_jconf函数内。然后根据不同的关键词搜索其它源代码中用途。

server_port

|模块|用途|
|--|--|
|ss-server|对外服务的监听端口,供redir、tunnel、local使用|
|ss-redir|连接到server的端口|
|ss-local|连接到server的端口|
|ss-tunnel|连接到server的端口|

local_port

|模块|用途|
|--|--|
|ss-server|无用|
|ss-redir|提供给iptables转发的端口|
|ss-local|提供给socks5代理的监听端口|
|ss-tunnel|提供给转发端口,类似ssh代理|

All 2 comments

这玩意要阅读源码才知道有什么用,server_port和local_port的读入是在jconf.c的read_jconf函数内。然后根据不同的关键词搜索其它源代码中用途。

server_port

|模块|用途|
|--|--|
|ss-server|对外服务的监听端口,供redir、tunnel、local使用|
|ss-redir|连接到server的端口|
|ss-local|连接到server的端口|
|ss-tunnel|连接到server的端口|

local_port

|模块|用途|
|--|--|
|ss-server|无用|
|ss-redir|提供给iptables转发的端口|
|ss-local|提供给socks5代理的监听端口|
|ss-tunnel|提供给转发端口,类似ssh代理|

Was this page helpful?
0 / 5 - 0 ratings