mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 01:15: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
|
||||
|
||||
## Protocols
|
||||
Protocol | Listen/TCP | Listen/UDP | Forward/TCP | Forward/UDP
|
||||
-| :-: | :-: | :-: | :-:
|
||||
|Protocol | Listen/TCP | Listen/UDP | Forward/TCP | Forward/UDP |
|
||||
| :-: | :-: | :-: | :-: | :-: |
|
||||
Socks5 | √ | √ | √ | √
|
||||
Http | √ | | √ |
|
||||
SS | √ | √ | √ | √
|
||||
@ -58,53 +58,27 @@ Simple-Obfs | | | √ |
|
||||
|
||||
## Install
|
||||
|
||||
Binary:
|
||||
|
||||
Binary Download
|
||||
- [https://github.com/nadoo/glider/releases](https://github.com/nadoo/glider/releases)
|
||||
|
||||
Go Get (requires **Go 1.14+** ):
|
||||
|
||||
```bash
|
||||
go get -u github.com/nadoo/glider
|
||||
```
|
||||
|
||||
ArchLinux:
|
||||
|
||||
```bash
|
||||
sudo pacman -S glider
|
||||
```
|
||||
|
||||
## Run
|
||||
## Usage
|
||||
|
||||
help:
|
||||
```bash
|
||||
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>
|
||||
<summary>Click to expand</summary>
|
||||
<summary>click to see details</summary>
|
||||
|
||||
```bash
|
||||
glider 0.10.0 usage:
|
||||
@ -156,6 +130,7 @@ Available Schemes:
|
||||
http: http proxy
|
||||
ssr: ssr proxy
|
||||
vmess: vmess proxy
|
||||
trojan: trojan proxy
|
||||
tls: tls transport
|
||||
ws: websocket transport
|
||||
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:
|
||||
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://method:pass@host:port
|
||||
@ -328,6 +303,26 @@ Examples:
|
||||
|
||||
</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
|
||||
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, " ssr: ssr 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, " ws: websocket transport\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, " 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, "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))
|
||||
|
||||
// TODO: check the addr in return value
|
||||
return pkc, nil, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user