mirror of
https://github.com/bytedance/g3.git
synced 2026-05-05 15:31:21 +00:00
87 lines
2.1 KiB
ReStructuredText
87 lines
2.1 KiB
ReStructuredText
.. _configuration_escaper_route_geoip:
|
|
|
|
route_geoip
|
|
===========
|
|
|
|
This escaper allows to select a next escaper based on GeoIP rules of the resolved upstream ip address.
|
|
|
|
There is no path selection support for this escaper.
|
|
|
|
The resolve method in Happy Eyeballs algorithm is used.
|
|
|
|
The following common keys are supported:
|
|
|
|
* :ref:`resolver <conf_escaper_common_resolver>`, **required**
|
|
* :ref:`resolve_strategy <conf_escaper_common_resolve_strategy>`
|
|
* :ref:`default_next <conf_escaper_common_default_next>`
|
|
|
|
ip_locate_service
|
|
-----------------
|
|
|
|
**optional**, **type**: :ref:`ip locate service <conf_value_ip_locate_service>`
|
|
|
|
Set the config for the remote IP locate service.
|
|
|
|
**default**: set with default config
|
|
|
|
.. versionadded:: 1.9.1
|
|
|
|
geo_rules
|
|
---------
|
|
|
|
**optional**, **type**: seq
|
|
|
|
Set the GeoIP rules to select next escaper.
|
|
|
|
Each rule is in *map* format, with two keys:
|
|
|
|
* next
|
|
|
|
**required**, **type**: str
|
|
|
|
Set the next escaper.
|
|
|
|
* networks
|
|
|
|
**optional**, **type**: :ref:`ip network <conf_value_ip_network_str>` | seq
|
|
|
|
Each element should be valid network string. Both IPv4 and IPv6 are supported.
|
|
|
|
Each network should not be set for different next escapers.
|
|
|
|
* as_numbers
|
|
|
|
**optional**, **type**: u32 | seq
|
|
|
|
Each element should be valid AS number.
|
|
|
|
Each as number should not be set for different next escapers.
|
|
|
|
* countries
|
|
|
|
**optional**, **type**: :ref:`iso country code <conf_value_iso_country_code>` | seq
|
|
|
|
Each element should be valid ISO country code.
|
|
|
|
Each country should not be set for different next escapers.
|
|
|
|
* continents
|
|
|
|
**optional**, **type**: :ref:`continent code <conf_value_continent_code>` | seq
|
|
|
|
Each element should be valid continent code.
|
|
|
|
Each continent should not be set for different next escapers.
|
|
|
|
resolution_delay
|
|
----------------
|
|
|
|
**optional**, **type**: :ref:`humanize duration <conf_value_humanize_duration>`
|
|
|
|
The resolution delay time for the wait of the preferred address family after another one is returned.
|
|
|
|
The meaning is the same as *resolution_delay* field in :ref:`happy eyeballs <conf_value_happy_eyeballs>`.
|
|
|
|
**default**: 50ms
|
|
|
|
.. versionadded:: 1.5.5
|