glider/config/glider.conf.example

251 lines
7.5 KiB
Plaintext
Raw Normal View History

2017-07-23 01:46:06 +08:00
##########################################
# __ _ _ ___ ____ ___
# / /`_ | | | | | | \ | |_ | |_)
# \_\_/ |_|__ |_| |_|_/ |_|__ |_| \
#
2017-09-03 01:05:56 +08:00
# Glider is a forward proxy with multiple protocols support, and also a dns forwarding server with ipset management features(like dnsmasq).
2017-07-23 01:46:06 +08:00
#
2017-07-23 01:57:05 +08:00
# We can set up local listeners as proxy, and forward requests to internet via forwarders.
2017-07-23 01:46:06 +08:00
#
# |Forwarder ----------------->|
# Listener --> | | Internet
# |Forwarder --> Forwarder->...|
2017-07-23 01:46:06 +08:00
#
# -----------------------------------------------------------
#
# This is a sample configuration file for glider.
#
# Format is one option per line, legal options are the same
# as the options legal on the command line. See "glider -help" for details.
#
# Comment line starts with "#", values set in the format:
# KEY=VALUE
#
# -----------------------------------------------------------
# Verbose mode, print logs
verbose=True
# LISTENERS
# ---------
# Local listeners, we can set up multiple listeners on different port with
# different protocols.
# listen on 8443, serve as http/socks5 proxy on the same port.
listen=:8443
# listen on 8448 as a ss server.
# listen=ss://AEAD_CHACHA20_POLY1305:pass@:8448
# listen on 8080 as a http proxy server.
listen=http://:8080
# listen on 1080 as a socks5 proxy server.
listen=socks5://:1080
# listen on 1234 as vless proxy server.
# listen=vless://uuid@:1234
# listen on 1234 as vless proxy server, fallback to 127.0.0.1:8080 http server when client auth failed.
# listen=vless://uuid@:1234?fallback=127.0.0.1:8080
2017-07-23 01:46:06 +08:00
# listen on 1081 as a linux transparent proxy server.
# listen=redir://:1081
# listen on 1082 as a tcp tunnel, all requests to :1082 will be forward to 1.1.1.1:80
# listen=tcptun://:1082=1.1.1.1:80
2018-01-24 12:46:02 +08:00
# listen on 1083 as a udp tunnel, all requests to :1083 will be forward to 1.1.1.1:53
# listen=udptun://:1083=1.1.1.1:53
# listen on 1084 as a udp over tcp tunnel, all requests to :1084 will be forward to 1.1.1.1:53
# listen=uottun://:1084=1.1.1.1:53
2018-11-28 23:28:32 +08:00
# http over tls (HTTPS proxy)
# listen=tls://:443?cert=crtFilePath&key=keyFilePath,http://
2018-11-28 23:28:32 +08:00
# ss over tls
# listen=tls://:443?cert=crtFilePath&key=keyFilePath,ss://AEAD_CHACHA20_POLY1305:pass@
# socks5 over unix domain socket
# listen=unix:///tmp/glider.socket,socks5://
2018-12-12 21:40:31 +08:00
# socks5 over kcp
# listen=kcp://aes:key@127.0.0.1:8444?dataShards=10&parityShards=3,socks5://
2017-07-23 01:46:06 +08:00
# FORWARDERS
# ----------
# Forwarders, we can setup multiple forwarders.
# forward=SCHEME#OPTIONS
2017-07-23 01:46:06 +08:00
# FORWARDER OPTIONS
# priority: set the priority of that forwarder, default:0
# interface: set local interface or ip address used to connect remote server
2017-07-23 01:46:06 +08:00
# Socks5 proxy as forwarder
2018-07-25 08:23:58 +08:00
# forward=socks5://192.168.1.10:1080
2017-07-23 01:46:06 +08:00
# Socks5 proxy as forwarder with priority 100
# forward=socks5://192.168.1.10:1080#priority=100
# Socks5 proxy as forwarder with priority 100 and use `eth0` as source interface
# forward=socks5://192.168.1.10:1080#priority=100&interface=eth0
# Socks5 proxy as forwarder with priority 100 and use `192.168.1.100` as source ip
# forward=socks5://192.168.1.10:1080#priority=100&interface=192.168.1.100
2017-07-23 01:46:06 +08:00
# SS proxy as forwarder
# forward=ss://method:pass@1.1.1.1:8443
2017-07-23 01:46:06 +08:00
2018-05-22 20:44:09 +08:00
# SSR proxy as forwarder
# forward=ssr://method:pass@1.1.1.1:8443?protocol=auth_aes128_md5&protocol_param=xxx&obfs=tls1.2_ticket_auth&obfs_param=yyy
2020-05-04 13:53:59 +08:00
# ssh forwarder
# forward=ssh://user[:pass]@host:port[?key=keypath]
# forward=ssh://root:pass@host:port
# forward=ssh://root@host:port?key=/path/to/keyfile
2017-07-23 01:46:06 +08:00
# http proxy as forwarder
# forward=http://1.1.1.1:8080
2020-04-12 17:24:34 +08:00
# trojan as forwarder
2020-10-08 18:48:23 +08:00
# forward=trojan://PASSWORD@1.1.1.1:8080[?serverName=SERVERNAME][&skipVerify=true]
2020-04-12 17:24:34 +08:00
2020-10-01 20:59:45 +08:00
# vless forwarder
# forward=vless://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@1.1.1.1:443
2018-07-25 08:23:58 +08:00
# vmess with none security
# forward=vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@1.1.1.1:443?alterID=2
2018-07-25 08:23:58 +08:00
# vmess with aes-128-gcm security
# forward=vmess://aes-128-gcm:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@1.1.1.1:443?alterID=2
2018-07-25 08:23:58 +08:00
# vmess over tls
# forward=tls://1.1.1.1:443,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
2018-07-22 20:02:50 +08:00
2018-07-25 08:23:58 +08:00
# vmess over websocket
# forward=ws://1.1.1.1:80/path,vmess://chacha20-poly1305:5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
# vmess over ws over tls
# forward=tls://1.1.1.1:443,ws://,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
# forward=tls://1.1.1.1:443,ws://@/path,vmess://5a146038-0b56-4e95-b1dc-5c6f5a32cd98@?alterID=2
2017-07-23 01:46:06 +08:00
2018-11-28 23:28:32 +08:00
# ss over tls
# forward=tls://1.1.1.1:443,ss://AEAD_CHACHA20_POLY1305:pass@
2018-12-12 21:40:31 +08:00
# ss over kcp
# forward=kcp://aes:key@127.0.0.1:8444?dataShards=10&parityShards=3,ss://AEAD_CHACHA20_POLY1305:pass@
# ss with simple-obfs
# forward=simple-obfs://1.1.1.1:443?type=tls&host=apple.com,ss://AEAD_CHACHA20_POLY1305:pass@
# socks5 over unix domain socket
# forward=unix:///tmp/glider.socket,socks5://
2017-07-23 01:46:06 +08:00
# FORWARDER CHAIN
# ---------------
# We can setup a forward chain using 1 forward option,
# use comma to separate different upstream forward proxies.
#forward=http://1.1.1.1:8080,socks5://2.2.2.2:1080
2017-07-23 01:46:06 +08:00
# FORWARDE STRATEGY
# -----------------
# If we set up multiple forwarders, we can use them in our own strategy.
# Round Robin mode: rr
# High Availability mode: ha
2018-08-21 07:57:21 +08:00
# Latency based High Availability mode: lha
2018-08-26 01:43:28 +08:00
# Destination Hashing mode: dh
2017-07-23 01:46:06 +08:00
strategy=rr
# FORWARDER SETTINGS
# ------------------
# We can set some parameters for forwarders.
# forwarder will be set to disabled on how many failures counted(both dial and relay).
maxfailures=3
# timeout for create a connection(seconds)
# dialtimeout=3
# timeout for relay data from proxy server and client(seconds)
# DO NOT change it if you don't know what will happen.
# relaytimeout=0
2017-07-23 01:46:06 +08:00
# FORWARDERS CHECK
# ----------------
# We can check whether a forwarder is available.
# Used to connect via forwarders, if the host is unreachable, the forwarder
# will be set to disabled.
# MUST be a HTTP website server address, format: HOST[:PORT]. HTTPS NOT SUPPORTED.
checkwebsite=www.apple.com
2017-07-23 01:46:06 +08:00
# check interval(seconds)
checkinterval=30
2017-07-30 01:54:19 +08:00
# timeout to set a forwarder to be disabled(seconds)
checktimeout=10
2017-07-30 01:54:19 +08:00
# check disabled fowarders only
checkdisabledonly=false
# DNS FORWARDING SERVER
# ----------------
# we can specify different upstream dns server in rule file for different destinations.
# Setup a dns forwarding server
dns=:53
2018-08-27 00:01:09 +08:00
# global remote dns server (you can specify different dns server in rule file)
dnsserver=8.8.8.8:53
2018-08-01 00:36:11 +08:00
dnsserver=1.1.1.1:53
2018-08-27 00:01:09 +08:00
# By default, when glider received udp dns request and there's no forwarder specified,
# it will use udp to query upstream dns servers, otherwise, use tcp;
# you can set dnsalwaystcp=true to always use tcp no matter there is a forwarder or not.
# dnsalwaystcp=false
# timeout value used in multiple dnsservers switch(seconds)
dnstimeout=3
2018-08-27 00:01:09 +08:00
# maximum TTL value for entries in the CACHE(seconds)
dnsmaxttl=1800
2018-08-27 00:01:09 +08:00
# minimum TTL value for entries in the CACHE(seconds)
dnsminttl=0
2018-08-27 00:01:09 +08:00
2018-08-01 00:36:11 +08:00
# custom records
dnsrecord=www.example.com/1.2.3.4
dnsrecord=www.example.com/2606:2800:220:1:248:1893:25c8:1946
2020-10-02 19:31:03 +08:00
# SERVICES
# service=dhcpd,INTERFACE,START_IP,END_IP
# e.g.:
2020-10-04 00:10:24 +08:00
# service=dhcpd,eth1,192.168.50.100,192.168.50.199
2020-10-02 19:31:03 +08:00
2018-08-21 07:57:21 +08:00
# INTERFACE SPECIFIC
# ------------------
# Specify the outbound ip/interface.
#
# interface=""
# interface="192.168.1.100"
# interface="eth0"
2017-07-30 01:54:19 +08:00
# RULE FILES
# ----------
2018-08-21 07:57:21 +08:00
# Specify additional forward rules.
# specify rules folder, so all *.rule files under this folder will be parsed as rule file
rules-dir=rules.d
# specify a rule file
2017-07-30 01:54:19 +08:00
#rulefile=office.rule
#rulefile=home.rule
2019-03-21 21:10:00 +08:00
# INCLUDE MORE CONFIG FILES
#include=dnsrecord.inc.conf
2019-03-21 21:15:31 +08:00
#include=more.conf