direct_float
This escaper sends traffic directly from the local host, but the candidate bind
addresses are supplied dynamically through the publish RPC method.
The following interfaces are supported:
tcp connect
udp relay
udp connect
http(s) forward
ftp over http
This escaper supports the Cap’n Proto RPC publish command. The published data must be a map with these keys:
ipv4
Set the IPv4 bind IP address or addresses. The value may be a single bind ip or an array of them.
ipv6
Set the IPv6 bind IP address or addresses. The value may be a single bind ip or an array of them.
Published records whose expire time is already in the past are ignored.
The following egress path selection values are supported:
-
If matched, the bind ip with the same
idis used.Added in version 1.9.2.
-
If matched, the JSON map value is parsed as a bind ip and used directly.
Added in version 1.9.2.
Config Keys
The following common keys are supported:
resolver, required
-
The user custom resolve strategy will be taken into account.
-
The user tcp connect params will be taken into account.
-
Added in version 1.7.22.
cache_ipv4
recommend, type: file path
Set the cache file for published IPv4 addresses.
This is recommended because peer discovery at startup may complete only after the first requests arrive.
The file is created if it does not exist.
The cache path is resolved relative to the config file location.
default: not set
cache_ipv6
recommend, type: file path
Set the cache file for published IPv6 addresses.
This is recommended because peer discovery at startup may complete only after the first requests arrive.
The file is created if it does not exist.
The cache path is resolved relative to the config file location.
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
Configure TCP keepalive.
User-level TCP keepalive settings are also applied.
default: 60s
resolve_redirection
optional, type: resolve redirection
Set DNS redirection rules at the escaper level.
default: not set
Publish Format Example
{
"ipv4": [
{
"ip": "203.0.113.10",
"id": "hk-v4-a",
"eip": "198.51.100.10",
"area": {
"country": "HK"
}
},
"203.0.113.11"
],
"ipv6": null
}
Bind IP
Dynamic bind IPs are represented as JSON strings whose root element is a map.
For published data, the root value may also be a bare IP string. Optional metadata fields with invalid values are ignored instead of rejecting the whole record.
ip
required, type: ip addr str
Set the IP address. The address family must match the publish key described above.
id
optional, type: str
Identifier for 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
Egress IP address as seen externally.
area
optional, type: egress area
Area associated with the egress IP address.
expire
optional, type: rfc3339 datetime str
Expiration time of this dynamic IP.
default: not set
If every optional field uses its default, the root value can be just the IP itself.
Example:
{
"ip": "203.0.113.10",
"id": "hk-v4-a",
"isp": "example-isp",
"eip": "198.51.100.10",
"area": {
"country": "HK"
},
"expire": "2026-03-28T08:00:00Z"
}