glider is a forward proxy with multiple protocols support, and also a dns/dhcp server with ipset management features(like dnsmasq).
Go to file
2020-04-12 15:27:20 +08:00
.github/workflows general: minor changes in github actions and codes 2020-04-06 23:33:23 +08:00
common trojan: added udp support 2020-04-12 15:27:20 +08:00
config general: optimize code 2019-09-07 20:25:00 +08:00
dns ws: support set a different host header #157 2020-04-05 11:55:48 +08:00
ipset ipset: add missing package 2020-04-06 23:37:36 +08:00
proxy trojan: added udp support 2020-04-12 15:27:20 +08:00
rule general: bump version 2019-09-19 18:03:48 +08:00
strategy ws: support set a different host header #157 2020-04-05 11:55:48 +08:00
systemd dns: set ttl to minttl config for custom dns recordings 2019-01-06 20:38:15 +08:00
.gitignore general: add github actions and remove travis 2019-09-15 20:50:52 +08:00
.goreleaser.yml general: minor changes in github actions and codes 2020-04-06 23:33:23 +08:00
conf.go trojan: added trojan support 2020-04-08 01:09:51 +08:00
dev_linux.go doc: add some info for websocket 2018-07-22 20:02:50 +08:00
dev.go doc: update help msg for ws 2018-07-24 00:54:38 +08:00
go.mod ss: handle unexpect situation to avoid panic #132 2020-04-11 21:08:10 +08:00
go.sum ss: handle unexpect situation to avoid panic #132 2020-04-11 21:08:10 +08:00
LICENSE Initial commit 2017-07-13 21:53:15 +08:00
main_linux.go unix: add unix domain socket support. #59 2018-11-25 17:56:59 +08:00
main.go trojan: added trojan support 2020-04-08 01:09:51 +08:00
README.md trojan: added udp support 2020-04-12 15:27:20 +08:00

glider

Go Report Card GitHub release Actions Status

glider is a forward proxy with multiple protocols support, and also a dns forwarding server with ipset management features(like dnsmasq).

we can set up local listeners as proxy servers, and forward requests to internet via forwarders.

                |Forwarder ----------------->|
   Listener --> |                            | Internet
                |Forwarder --> Forwarder->...|

Features

  • Proxy Server( -listen )
  • Proxy Client( -forward )
  • Http and socks5 on the same port
  • Forwarder chain
  • RR/HA/LHA/DH strategy for multiple forwarders
  • Periodical proxy checking
  • Rule proxy based on destinations: Config Examples
  • Send requests from specific ip/interface
  • DNS Forwarding Server:
    • DNS Over Proxy
    • Listen on UDP and forward dns requests to remote dns server in TCP via forwarders
    • Specify different upstream dns server based on destinations(in rule file)
    • Tunnel mode: forward to a fixed upstream dns server
    • Add resolved IPs to proxy rules
    • Add resolved IPs to ipset
    • DNS cache
    • Custom dns record
  • IPSet Management (Linux kernel version >= 2.6.32):
    • Add ip/cidrs from rule files on startup
    • Add resolved ips for domains from rule files by dns forwarding server

TODO:

  • IPv6 support in ipset manager
  • Transparent UDP proxy (iptables tproxy)
  • Performance tuning
  • TUN/TAP device support
  • SSH tunnel support (maybe)

Protocols

Protocol Listen/TCP Listen/UDP Forward/TCP Forward/UDP
Socks5
Http
SS
Redir
Tcptun
Udptun
UoTtun
TLS
Unix
KCP
SSR
VMess
Trojan
WebSocket
Simple-Obfs

Install

Binary:

Go Get (requires Go 1.14+ ):

go get -u github.com/nadoo/glider

ArchLinux:

sudo pacman -S glider

Run

help:

glider -h

run:

glider -verbose -listen :8443 -forward SCHEME://HOST:PORT
glider -config CONFIGPATH
glider -config CONFIGPATH -listen :8080 -verbose

Config

Proxy & Protocol Chain

In glider, you can easily chain several proxy servers or protocols together, e.g:

  • Chain proxy servers:
forward=http://1.1.1.1:80,socks5://2.2.2.2:1080,ss://method:pass@3.3.3.3:8443@
  • Chain protocols: https proxy (http over tls)
forward=tls://1.1.1.1:443,http://
  • Chain protocols: vmess over ws over tls
forward=tls://1.1.1.1:443,ws://,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
  • Chain protocols and servers:
forward=socks5://1.1.1.1:1080,tls://2.2.2.2:443,ws://,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
  • Chain protocols in listener: https proxy server
listen=tls://:443?cert=crtFilePath&key=keyFilePath,http://

Service

  • conflag: command line and config file parse support
  • ArchLinux: a great linux distribution with glider pre-built package