proxy_socks5

This escaper will access the target upstream through another http proxy.

The following interfaces are supported:

  • tcp connect

  • udp_relay

  • udp_connect

  • http(s) forward

The following egress path selection values is supported:

  • upstream addr

    If matched, the corresponding upstream str value will be used to override the proxy_addr config.

    Added in version 1.13.0.

The following common keys are supported:

proxy_addr

required, type: upstream str | seq

Set the target proxy address. The default port is 1080 which can be omitted.

For seq value, each of its element must be weighted upstream addr.

proxy_addr_pick_policy

optional, type: selective pick policy

Set the policy to select next proxy address.

The key for ketama/rendezvous/jump hash is <client-ip>[-<username>]-<upstream-host>.

default: random

proxy_username

optional, type: username

Set the proxy username. The User auth scheme is used by default.

proxy_password

optional, type: password

Set the proxy password. Required if username is present.

bind_ipv4

optional, type: ipv4 addr str

Set the bind ip address for inet sockets.

default: not set

bind_ipv6

optional, type: ipv6 addr str

Set the bind ip address for inet6 sockets.

default: not set

tcp_keepalive

optional, type: tcp keepalive

Set tcp keepalive.

The tcp keepalive set in user config won’t be taken into account.

default: 60s

transmute_udp_peer_ip

optional, type: map | bool

Set this option if the UDP peer IP returned from the remote proxy should be transmuted.

For map value, the key should be the returned IP, and the value should be the real IP to use. If the map is empty, the peer IP used by the tcp connection will be used.

For bool value, an empty map will be used if set to true, or disabled if set to false.

default: false

Added in version 1.7.19.

end_on_control_closed

optional, type: bool

Set to true if you want to end the UDP Associate Session whenever the peer closed the control TCP connection.

By default the session will be ended if:

  • Error occur on the TCP control connection at any time

  • Clean close of the TCP control connection if at least one UDP packet has been received

default: false

Added in version 1.9.9.