yongchengchen / x

Extended (may be experimental) features outside the main gost tree.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support TCP port forward to use domain name instead of target ip.

Now can run a TCP port forward like:

./gost -L tcp://:443/bitbucket.org:443

changes on file handler/forward/local/handler.go

  1. add TTLDomainMap to store domain name => real IP and TTL info.
  2. every time handle incoming connection, will check the target addr, if addr is IP, do as normal logic
  3. if targe addr is a domain name, then will use net.LookupIP to lookup IP and cache it to TTLDomainMap, TTL as 5mins.

About

Extended (may be experimental) features outside the main gost tree.

License:MIT License


Languages

Language:Go 100.0%Language:Shell 0.0%