mirror of
https://github.com/bytedance/g3.git
synced 2026-05-05 07:10:51 +00:00
g3proxy: support load of geoip_db
This commit is contained in:
parent
c9204ee844
commit
d3d466bf8b
7 changed files with 80 additions and 3 deletions
|
|
@ -20,7 +20,10 @@ geo_rules
|
|||
|
||||
**optional**, **type**: seq
|
||||
|
||||
If the resolved upstream ip address lpm match the network in the rules, that escaper will be selected.
|
||||
Set the GeoIP rules to select next escaper.
|
||||
|
||||
Remember to set :ref:`geoip_db <configuration_geoip_db>` in main conf to enable GeoIP lookup.
|
||||
If not set, this escaper will just behave like :ref:`route_resolved <configuration_escaper_route_resolved>` escaper.
|
||||
|
||||
Each rule is in *map* format, with two keys:
|
||||
|
||||
|
|
|
|||
22
g3proxy/doc/configuration/geoip_db.rst
Normal file
22
g3proxy/doc/configuration/geoip_db.rst
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
.. _configuration_geoip_db:
|
||||
|
||||
GeoIP DB
|
||||
========
|
||||
|
||||
.. versionadded:: 1.7.25
|
||||
|
||||
This will set the db path for all GeoIP databases.
|
||||
|
||||
country
|
||||
-------
|
||||
|
||||
**optional**, **type**: :ref:`file path <conf_value_file_path>`
|
||||
|
||||
Set the db file path for the country database.
|
||||
|
||||
asn
|
||||
---
|
||||
|
||||
**optional**, **type**: :ref:`file path <conf_value_file_path>`
|
||||
|
||||
Set the db file path for the asn database.
|
||||
|
|
@ -24,6 +24,8 @@ is make up of the following entries:
|
|||
+-----------+----------+-------+------------------------------------------------+
|
||||
|controller |Seq |no |Controller config |
|
||||
+-----------+----------+-------+------------------------------------------------+
|
||||
|geoip_db |Map |yes |GeoIP Database |
|
||||
+-----------+----------+-------+------------------------------------------------+
|
||||
|resolver |Mix [#m]_ |yes |Resolver config, see :doc:`resolvers/index` |
|
||||
+-----------+----------+-------+------------------------------------------------+
|
||||
|escaper |Mix [#m]_ |yes |Escaper config, see :doc:`escapers/index` |
|
||||
|
|
@ -49,6 +51,7 @@ Example config: :doc:`example config for rd-relay service <example>`
|
|||
runtime
|
||||
log/index
|
||||
stat
|
||||
geoip_db
|
||||
resolvers/index
|
||||
escapers/index
|
||||
auditors/index
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ Set the time duration before offline all servers after received daemon quit sign
|
|||
All listen server sockets will be closed after this duration, so it should be more than the time used to
|
||||
start the new daemon process if you depends on it for graceful restart.
|
||||
|
||||
**default**: 4s
|
||||
**default**: 8s
|
||||
|
||||
.. versionchanged:: 1.7.25 change default value from 4s to 8s
|
||||
|
||||
task_wait_delay
|
||||
---------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue