direct_float

This escaper will access the target upstream from local machine directly. The local bind ip, which is required, can be set via the publish rpc method.

The following interfaces are supported:

  • tcp connect

  • udp relay

  • udp connect

  • http(s) forward

  • ftp over http

The Cap’n Proto RPC publish command is supported on this escaper, the published data should be a map, with the keys:

  • ipv4

    Set the IPv4 bind ip address(es). The value could be an array of or just one bind ip.

  • ipv6

    Set the IPv6 bind ip address(es). The value could be an array of or just one bind ip.

The following egress path selection values is supported:

  • string id

    If matched, a bind_ip <config_escaper_dynamic_bind_ip> with the same ID will be used.

    Added in version 1.9.2.

  • json value

    If matched, the JSON MAP value will be parsed as a bind_ip <config_escaper_dynamic_bind_ip> and it will be used.

    Added in version 1.9.2.

Config Keys

The following common keys are supported:

cache_ipv4

recommend, type: file path

Set the cache file for published IPv4 IP Address(es).

It is recommended to set this as the fetch of peers at startup may be finished after the first batch of requests.

The file will be created if not existed.

default: not set

cache_ipv6

recommend, type: file path

Set the cache file for published IPv6 IP Address(es).

It is recommended to set this as the fetch of peers at startup may be finished after the first batch of requests.

The file will be created if not existed.

default: not set

egress_network_filter

optional, type: egress network acl rule

Set the network filter for the (resolved) remote ip address.

default: all permitted except for loopback and link-local addresses

tcp_keepalive

optional, type: tcp keepalive

Set tcp keepalive.

The tcp keepalive set in user config will be taken into account.

default: 60s

resolve_redirection

optional, type: resolve redirection

Set the dns redirection rules at escaper level.

default: not set

Bind IP

We use json string to represent a dynamic bind ip, with a map type as root element.

  • ip

    required, type: ip addr str

    Set the IP address. The address family should match the type of the publish key described above.

  • id

    optional, type: str

    The ID of this bind IP.

    Added in version 1.7.23.

  • isp

    optional, type: str

    ISP for the egress ip address.

  • eip

    optional, type: ip addr str

    The egress ip address from external view.

  • area

    optional, type: egress area

    Area of the egress ip address.

  • expire

    optional, type: rfc3339 datetime str

    Set the expire time of this dynamic ip.

    default: not set

If all optional fields can be set with the default value, the root element can be just a ip.