Chore: update README.md

This commit is contained in:
Dreamacro 2019-12-08 12:34:05 +08:00
parent c427bc89ef
commit d8a1d88ded

281
README.md
View file

@ -6,6 +6,9 @@
<h4 align="center">A rule-based tunnel in Go.</h4> <h4 align="center">A rule-based tunnel in Go.</h4>
<p align="center"> <p align="center">
<a href="https://github.com/Dreamacro/clash/actions">
<img src="https://img.shields.io/github/workflow/status/Dreamacro/clash/Go?style=flat-square" alt="Github Actions">
</a>
<a href="https://goreportcard.com/report/github.com/Dreamacro/clash"> <a href="https://goreportcard.com/report/github.com/Dreamacro/clash">
<img src="https://goreportcard.com/badge/github.com/Dreamacro/clash?style=flat-square"> <img src="https://goreportcard.com/badge/github.com/Dreamacro/clash?style=flat-square">
</a> </a>
@ -17,7 +20,6 @@
## Features ## Features
- Local HTTP/HTTPS/SOCKS server - Local HTTP/HTTPS/SOCKS server
- Surge-like configuration format
- GeoIP rule support - GeoIP rule support
- Supports Vmess, Shadowsocks, Snell and SOCKS5 protocol - Supports Vmess, Shadowsocks, Snell and SOCKS5 protocol
- Supports Netfilter TCP redirecting - Supports Netfilter TCP redirecting
@ -70,7 +72,7 @@ $ clash -d .
``` ```
<details> <details>
<summary>This is an example configuration file</summary> <summary>This is an example configuration file (click to expand)</summary>
```yml ```yml
# port of HTTP # port of HTTP
@ -140,158 +142,160 @@ experimental:
# - 240.0.0.0/4 # - 240.0.0.0/4
Proxy: Proxy:
# shadowsocks
# The supported ciphers(encrypt methods):
# aes-128-gcm aes-192-gcm aes-256-gcm
# aes-128-cfb aes-192-cfb aes-256-cfb
# aes-128-ctr aes-192-ctr aes-256-ctr
# rc4-md5 chacha20 chacha20-ietf xchacha20
# chacha20-ietf-poly1305 xchacha20-ietf-poly1305
- name: "ss1"
type: ss
server: server
port: 443
cipher: chacha20-ietf-poly1305
password: "password"
# udp: true
# shadowsocks # old obfs configuration format remove after prerelease
# The supported ciphers(encrypt methods): - name: "ss2"
# aes-128-gcm aes-192-gcm aes-256-gcm type: ss
# aes-128-cfb aes-192-cfb aes-256-cfb server: server
# aes-128-ctr aes-192-ctr aes-256-ctr port: 443
# rc4-md5 chacha20 chacha20-ietf xchacha20 cipher: chacha20-ietf-poly1305
# chacha20-ietf-poly1305 xchacha20-ietf-poly1305 password: "password"
- name: "ss1" plugin: obfs
type: ss plugin-opts:
server: server mode: tls # or http
port: 443 # host: bing.com
cipher: chacha20-ietf-poly1305
password: "password"
# udp: true
# old obfs configuration format remove after prerelease - name: "ss3"
- name: "ss2" type: ss
type: ss server: server
server: server port: 443
port: 443 cipher: chacha20-ietf-poly1305
cipher: chacha20-ietf-poly1305 password: "password"
password: "password" plugin: v2ray-plugin
plugin: obfs plugin-opts:
plugin-opts: mode: websocket # no QUIC now
mode: tls # or http # tls: true # wss
# host: bing.com # skip-cert-verify: true
# host: bing.com
# path: "/"
# mux: true
# headers:
# custom: value
- name: "ss3" # vmess
type: ss # cipher support auto/aes-128-gcm/chacha20-poly1305/none
server: server - name: "vmess"
port: 443 type: vmess
cipher: chacha20-ietf-poly1305 server: server
password: "password" port: 443
plugin: v2ray-plugin uuid: uuid
plugin-opts: alterId: 32
mode: websocket # no QUIC now cipher: auto
# tls: true # wss # udp: true
# tls: true
# skip-cert-verify: true # skip-cert-verify: true
# host: bing.com # network: ws
# path: "/" # ws-path: /path
# mux: true # ws-headers:
# headers: # Host: v2ray.com
# custom: value
# vmess # socks5
# cipher support auto/aes-128-gcm/chacha20-poly1305/none - name: "socks"
- name: "vmess" type: socks5
type: vmess server: server
server: server port: 443
port: 443 # username: username
uuid: uuid # password: password
alterId: 32 # tls: true
cipher: auto # skip-cert-verify: true
# udp: true # udp: true
# tls: true
# skip-cert-verify: true
# network: ws
# ws-path: /path
# ws-headers:
# Host: v2ray.com
# socks5 # http
- name: "socks" - name: "http"
type: socks5 type: http
server: server server: server
port: 443 port: 443
# username: username # username: username
# password: password # password: password
# tls: true # tls: true # https
# skip-cert-verify: true # skip-cert-verify: true
# udp: true
# http # snell
- name: "http" - name: "snell"
type: http type: snell
server: server server: server
port: 443 port: 44046
# username: username psk: yourpsk
# password: password # obfs-opts:
# tls: true # https # mode: http # or tls
# skip-cert-verify: true # host: bing.com
# snell
- name: "snell"
type: snell
server: server
port: 44046
psk: yourpsk
# obfs-opts:
# mode: http # or tls
# host: bing.com
Proxy Group: Proxy Group:
# url-test select which proxy will be used by benchmarking speed to a URL. # url-test select which proxy will be used by benchmarking speed to a URL.
- name: "auto" - name: "auto"
type: url-test type: url-test
proxies: proxies:
- ss1 - ss1
- ss2 - ss2
- vmess1 - vmess1
url: 'http://www.gstatic.com/generate_204' url: 'http://www.gstatic.com/generate_204'
interval: 300 interval: 300
# fallback select an available policy by priority. The availability is tested by accessing an URL, just like an auto url-test group. # fallback select an available policy by priority. The availability is tested by accessing an URL, just like an auto url-test group.
- name: "fallback-auto" - name: "fallback-auto"
type: fallback type: fallback
proxies: proxies:
- ss1 - ss1
- ss2 - ss2
- vmess1 - vmess1
url: 'http://www.gstatic.com/generate_204' url: 'http://www.gstatic.com/generate_204'
interval: 300 interval: 300
# load-balance: The request of the same eTLD will be dial on the same proxy. # load-balance: The request of the same eTLD will be dial on the same proxy.
- name: "load-balance" - name: "load-balance"
type: load-balance type: load-balance
proxies: proxies:
- ss1 - ss1
- ss2 - ss2
- vmess1 - vmess1
url: 'http://www.gstatic.com/generate_204' url: 'http://www.gstatic.com/generate_204'
interval: 300 interval: 300
# select is used for selecting proxy or proxy group # select is used for selecting proxy or proxy group
# you can use RESTful API to switch proxy, is recommended for use in GUI. # you can use RESTful API to switch proxy, is recommended for use in GUI.
- name: Proxy - name: Proxy
type: select type: select
proxies: proxies:
- ss1 - ss1
- ss2 - ss2
- vmess1 - vmess1
- auto - auto
Rule: Rule:
- DOMAIN-SUFFIX,google.com,auto - DOMAIN-SUFFIX,google.com,auto
- DOMAIN-KEYWORD,google,auto - DOMAIN-KEYWORD,google,auto
- DOMAIN,google.com,auto - DOMAIN,google.com,auto
- DOMAIN-SUFFIX,ad.com,REJECT - DOMAIN-SUFFIX,ad.com,REJECT
# rename SOURCE-IP-CIDR and would remove after prerelease # rename SOURCE-IP-CIDR and would remove after prerelease
- SRC-IP-CIDR,192.168.1.201/32,DIRECT - SRC-IP-CIDR,192.168.1.201/32,DIRECT
# optional param "no-resolve" for IP rules (GEOIP IP-CIDR) # optional param "no-resolve" for IP rules (GEOIP IP-CIDR)
- IP-CIDR,127.0.0.0/8,DIRECT - IP-CIDR,127.0.0.0/8,DIRECT
- GEOIP,CN,DIRECT - GEOIP,CN,DIRECT
- DST-PORT,80,DIRECT - DST-PORT,80,DIRECT
- SRC-PORT,7777,DIRECT - SRC-PORT,7777,DIRECT
# FINAL would remove after prerelease # FINAL would remove after prerelease
# you also can use `FINAL,Proxy` or `FINAL,,Proxy` now # you also can use `FINAL,Proxy` or `FINAL,,Proxy` now
- MATCH,auto - MATCH,auto
``` ```
</details> </details>
## Advanced
[Provider](https://github.com/Dreamacro/clash/wiki/Provider)
## Documentations ## Documentations
https://clash.gitbook.io/ https://clash.gitbook.io/
@ -310,4 +314,5 @@ https://clash.gitbook.io/
- [x] Complementing the necessary rule operators - [x] Complementing the necessary rule operators
- [x] Redir proxy - [x] Redir proxy
- [x] UDP support - [x] UDP support
- [ ] Connection manager - [x] Connection manager
- [ ] Event API