Skip to content

go-gost/gost-geo-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gost-geo-plugin

A lightweight and lightning fast gRPC bypass plugin for gost, performs IP-based geo matching against a remote CIDR list. IP lookups are powered by a built-in IP trie for maximum performance.

Why use this plugin?

The bypass controller in gost supports both IP CIDR and domain routing, but the two are independent of each other. It doesn't support resolving domains to check their IPs against CIDR rules. That is to say, when you write 203.0.113.0/24 in your configuration, even if example.com resolves to 203.0.113.1, gost will not route example.com.

To achieve a high-performance bypass controller similar to a routing table, we created gost-geo-plugin. Paired with CIDR lists, we can implement advanced routing like Geo/ASN, regardless of what domain name is resolved to the address.

Usage

gost-geo-plugin --list-url <url> [--listen-addr <addr>] [--port <port>] [--prefer-ipv6]

The list file must contain one CIDR per line:

192.0.2.0/24
198.51.100.0/24
203.0.113.0/24
233.252.0.0/24
2001:db8::/32
3fff::/20

Example config part in gost.yml.

- name: bypass-plugin-geo
  whitelist: true
  plugin:
    type: grpc
    addr: "[::1]:8000"

About

A lightweight and lightning fast gRPC bypass plugin for gost, performs IP-based geo matching against a remote CIDR list. IP lookups are powered by a built-in IP trie for maximum performance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors