mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 09:25:41 +08:00
doc: add some info for trojan
This commit is contained in:
parent
792a47f0c0
commit
ff461f615b
59
README.md
59
README.md
@ -38,8 +38,8 @@ we can set up local listeners as proxy servers, and forward requests to internet
|
|||||||
- Send requests from specific local ip/interface
|
- Send requests from specific local ip/interface
|
||||||
|
|
||||||
## Protocols
|
## Protocols
|
||||||
Protocol | Listen/TCP | Listen/UDP | Forward/TCP | Forward/UDP
|
|Protocol | Listen/TCP | Listen/UDP | Forward/TCP | Forward/UDP |
|
||||||
-| :-: | :-: | :-: | :-:
|
| :-: | :-: | :-: | :-: | :-: |
|
||||||
Socks5 | √ | √ | √ | √
|
Socks5 | √ | √ | √ | √
|
||||||
Http | √ | | √ |
|
Http | √ | | √ |
|
||||||
SS | √ | √ | √ | √
|
SS | √ | √ | √ | √
|
||||||
@ -58,53 +58,27 @@ Simple-Obfs | | | √ |
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Binary:
|
Binary Download
|
||||||
|
|
||||||
- [https://github.com/nadoo/glider/releases](https://github.com/nadoo/glider/releases)
|
- [https://github.com/nadoo/glider/releases](https://github.com/nadoo/glider/releases)
|
||||||
|
|
||||||
Go Get (requires **Go 1.14+** ):
|
Go Get (requires **Go 1.14+** ):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
go get -u github.com/nadoo/glider
|
go get -u github.com/nadoo/glider
|
||||||
```
|
```
|
||||||
|
|
||||||
ArchLinux:
|
ArchLinux:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo pacman -S glider
|
sudo pacman -S glider
|
||||||
```
|
```
|
||||||
|
|
||||||
## Run
|
## Usage
|
||||||
|
|
||||||
help:
|
help:
|
||||||
```bash
|
```bash
|
||||||
glider -h
|
glider -h
|
||||||
```
|
```
|
||||||
|
|
||||||
run:
|
|
||||||
```bash
|
|
||||||
glider -verbose -listen :8443 -forward SCHEME://HOST:PORT
|
|
||||||
```
|
|
||||||
```bash
|
|
||||||
glider -config CONFIGPATH
|
|
||||||
```
|
|
||||||
```bash
|
|
||||||
glider -config CONFIGPATH -listen :8080 -verbose
|
|
||||||
```
|
|
||||||
|
|
||||||
## Config
|
|
||||||
|
|
||||||
- [ConfigFile](config)
|
|
||||||
- [glider.conf.example](config/glider.conf.example)
|
|
||||||
- [office.rule.example](config/rules.d/office.rule.example)
|
|
||||||
- [Examples](config/examples)
|
|
||||||
- [transparent proxy with dnsmasq](config/examples/8.transparent_proxy_with_dnsmasq)
|
|
||||||
- [transparent proxy without dnsmasq](config/examples/9.transparent_proxy_without_dnsmasq)
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
#### Command Line
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Click to expand</summary>
|
<summary>click to see details</summary>
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
glider 0.10.0 usage:
|
glider 0.10.0 usage:
|
||||||
@ -156,6 +130,7 @@ Available Schemes:
|
|||||||
http: http proxy
|
http: http proxy
|
||||||
ssr: ssr proxy
|
ssr: ssr proxy
|
||||||
vmess: vmess proxy
|
vmess: vmess proxy
|
||||||
|
trojan: trojan proxy
|
||||||
tls: tls transport
|
tls: tls transport
|
||||||
ws: websocket transport
|
ws: websocket transport
|
||||||
redir: redirect proxy. (used on linux as a transparent proxy with iptables redirect rules)
|
redir: redirect proxy. (used on linux as a transparent proxy with iptables redirect rules)
|
||||||
@ -170,7 +145,7 @@ Available Schemes:
|
|||||||
|
|
||||||
Available schemes for different modes:
|
Available schemes for different modes:
|
||||||
listen: mixed ss socks5 http redir redir6 tcptun udptun uottun tls unix kcp
|
listen: mixed ss socks5 http redir redir6 tcptun udptun uottun tls unix kcp
|
||||||
forward: reject ss socks5 http ssr vmess tls ws unix kcp simple-obfs
|
forward: reject ss socks5 http ssr vmess trojan tls ws unix kcp simple-obfs
|
||||||
|
|
||||||
SS scheme:
|
SS scheme:
|
||||||
ss://method:pass@host:port
|
ss://method:pass@host:port
|
||||||
@ -328,6 +303,26 @@ Examples:
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
run:
|
||||||
|
```bash
|
||||||
|
glider -verbose -listen :8443 -forward SCHEME://HOST:PORT
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
glider -config CONFIGPATH
|
||||||
|
```
|
||||||
|
```bash
|
||||||
|
glider -config CONFIGPATH -listen :8080 -verbose
|
||||||
|
```
|
||||||
|
|
||||||
|
## Config
|
||||||
|
|
||||||
|
- [ConfigFile](config)
|
||||||
|
- [glider.conf.example](config/glider.conf.example)
|
||||||
|
- [office.rule.example](config/rules.d/office.rule.example)
|
||||||
|
- [Examples](config/examples)
|
||||||
|
- [transparent proxy with dnsmasq](config/examples/8.transparent_proxy_with_dnsmasq)
|
||||||
|
- [transparent proxy without dnsmasq](config/examples/9.transparent_proxy_without_dnsmasq)
|
||||||
|
|
||||||
## Proxy & Protocol Chains
|
## Proxy & Protocol Chains
|
||||||
In glider, you can easily chain several proxy servers or protocols together, e.g:
|
In glider, you can easily chain several proxy servers or protocols together, e.g:
|
||||||
|
|
||||||
|
3
conf.go
3
conf.go
@ -118,6 +118,7 @@ func usage() {
|
|||||||
fmt.Fprintf(w, " http: http proxy\n")
|
fmt.Fprintf(w, " http: http proxy\n")
|
||||||
fmt.Fprintf(w, " ssr: ssr proxy\n")
|
fmt.Fprintf(w, " ssr: ssr proxy\n")
|
||||||
fmt.Fprintf(w, " vmess: vmess proxy\n")
|
fmt.Fprintf(w, " vmess: vmess proxy\n")
|
||||||
|
fmt.Fprintf(w, " trojan: trojan proxy\n")
|
||||||
fmt.Fprintf(w, " tls: tls transport\n")
|
fmt.Fprintf(w, " tls: tls transport\n")
|
||||||
fmt.Fprintf(w, " ws: websocket transport\n")
|
fmt.Fprintf(w, " ws: websocket transport\n")
|
||||||
fmt.Fprintf(w, " redir: redirect proxy. (used on linux as a transparent proxy with iptables redirect rules)\n")
|
fmt.Fprintf(w, " redir: redirect proxy. (used on linux as a transparent proxy with iptables redirect rules)\n")
|
||||||
@ -133,7 +134,7 @@ func usage() {
|
|||||||
|
|
||||||
fmt.Fprintf(w, "Available schemes for different modes:\n")
|
fmt.Fprintf(w, "Available schemes for different modes:\n")
|
||||||
fmt.Fprintf(w, " listen: mixed ss socks5 http redir redir6 tcptun udptun uottun tls unix kcp\n")
|
fmt.Fprintf(w, " listen: mixed ss socks5 http redir redir6 tcptun udptun uottun tls unix kcp\n")
|
||||||
fmt.Fprintf(w, " forward: reject ss socks5 http ssr vmess tls ws unix kcp simple-obfs\n")
|
fmt.Fprintf(w, " forward: reject ss socks5 http ssr vmess trojan tls ws unix kcp simple-obfs\n")
|
||||||
fmt.Fprintf(w, "\n")
|
fmt.Fprintf(w, "\n")
|
||||||
|
|
||||||
fmt.Fprintf(w, "SS scheme:\n")
|
fmt.Fprintf(w, "SS scheme:\n")
|
||||||
|
@ -154,6 +154,6 @@ func (s *Trojan) DialUDP(network, addr string) (net.PacketConn, net.Addr, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pkc := NewPktConn(c, socks.ParseAddr(addr))
|
pkc := NewPktConn(c, socks.ParseAddr(addr))
|
||||||
|
// TODO: check the addr in return value
|
||||||
return pkc, nil, nil
|
return pkc, nil, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user