Updated Configuring example (markdown)

Larvan2
2023-02-05 23:34:05 +08:00
parent 23ea2c8dd0
commit f457310e68

@@ -1,5 +1,5 @@
## General ## General
``` ```yaml
# port:7890 # HTTP(S) 代理服务器端口 # port:7890 # HTTP(S) 代理服务器端口
# socks-port:7891 # SOCKS5 代理端口 # socks-port:7891 # SOCKS5 代理端口
mixed-port:10801 # HTTP(S) 和 SOCKS 代理混合端口 mixed-port:10801 # HTTP(S) 和 SOCKS 代理混合端口
@@ -65,7 +65,10 @@ profile:
``` ```
## Tun ## Tun
``` Supports macOS, Linux and Windows.
Built-in [Wintun](https://www.wintun.net) driver.
```yaml
tun: tun:
enable:false enable:false
stack:system # gvisor / lwip stack:system # gvisor / lwip
@@ -105,7 +108,7 @@ tun:
## ebpf ## ebpf
``` ```yaml
ebpf: ebpf:
auto-redir:# redirect 模式,仅支持 TCP auto-redir:# redirect 模式,仅支持 TCP
- eth0 - eth0
@@ -115,7 +118,7 @@ ebpf:
## sniffer ## sniffer
``` ```yaml
sniffer: sniffer:
enable:false enable:false
## 对 redir-host 类型识别的流量进行强制嗅探 ## 对 redir-host 类型识别的流量进行强制嗅探
@@ -159,7 +162,7 @@ sniffer:
``` ```
## tunnels ## tunnels
``` ```yaml
tunnels: tunnels:
# one line config # one line config
- tcp/udp,127.0.0.1:6553,114.114.114.114:53,proxy - tcp/udp,127.0.0.1:6553,114.114.114.114:53,proxy
@@ -173,7 +176,8 @@ tunnels:
## DNS 配置 ## DNS 配置
```dns: ```yaml
dns:
enable:false # 关闭将使用系统 DNS enable:false # 关闭将使用系统 DNS
prefer-h3:true # 开启 DoH 支持 HTTP/3将并发尝试 prefer-h3:true # 开启 DoH 支持 HTTP/3将并发尝试
listen:0.0.0.0:53 # 开启 DNS 服务器监听 listen:0.0.0.0:53 # 开启 DNS 服务器监听
@@ -248,7 +252,8 @@ tunnels:
``` ```
## Proxies ## Proxies
```proxies: ```yaml
proxies:
# Shadowsocks # Shadowsocks
# cipher 支持: # cipher 支持:
# aes-128-gcm aes-192-gcm aes-256-gcm # aes-128-gcm aes-192-gcm aes-256-gcm
@@ -312,8 +317,10 @@ tunnels:
plugin-opts: plugin-opts:
host:"cloud.tencent.com" host:"cloud.tencent.com"
password:"shadow_tls_password" password:"shadow_tls_password"
```
# vmess ### vmess
```yaml
# cipher 支持 auto/aes-128-gcm/chacha20-poly1305/none # cipher 支持 auto/aes-128-gcm/chacha20-poly1305/none
- name:"vmess" - name:"vmess"
type:vmess type:vmess
@@ -412,8 +419,41 @@ tunnels:
# sni:custom.com # sni:custom.com
# fingerprint:xxxx # 同 experimental.fingerprints 使用 sha256 指纹,配置协议独立的指纹,将忽略 experimental.fingerprints # fingerprint:xxxx # 同 experimental.fingerprints 使用 sha256 指纹,配置协议独立的指纹,将忽略 experimental.fingerprints
# ip-version:dual # ip-version:dual
```
### VLESS
```yaml
- name:"vless-tcp"
type:vless
server:server
port:443
uuid:uuid
network:tcp
servername:example.com # AKA SNI
# flow:xtls-rprx-direct # xtls-rprx-origin # enable XTLS
# skip-cert-verify:true
# fingerprint:xxxx
# client-fingerprint:random # Available:"chrome","firefox","safari","random"
# Snell - name:"vless-ws"
type:vless
server:server
port:443
uuid:uuid
udp:true
tls:true
network:ws
# client-fingerprint:random # Available:"chrome","firefox","safari","random"
servername:example.com # priority over wss host
# skip-cert-verify:true
# fingerprint:xxxx
ws-opts:
path:"/"
headers:
Host:example.com
```
### Snell
```yaml
# Beware that there's currently no UDP support yet # Beware that there's currently no UDP support yet
- name:"snell" - name:"snell"
type:snell type:snell
@@ -424,14 +464,16 @@ tunnels:
# obfs-opts: # obfs-opts:
# mode:http # or tls # mode:http # or tls
# host:bing.com # host:bing.com
```
# Trojan ### Trojan
```yaml
- name:"trojan" - name:"trojan"
type:trojan type:trojan
server:server server:server
port:443 port:443
password:yourpsk password:yourpsk
# client-fingerprint:random # Available:"chrome","firefox","safari","random" # client-fingerprint:chrome # Available:"chrome","firefox","safari","ios","random", currently only support TLS transport in TCP/GRPC/WS/HTTP for VLESS/Vmess and trojan.
# fingerprint:xxxx # fingerprint:xxxx
# udp:true # udp:true
# sni:example.com # aka server name # sni:example.com # aka server name
@@ -479,38 +521,12 @@ tunnels:
# sni:example.com # aka server name # sni:example.com # aka server name
# skip-cert-verify:true # skip-cert-verify:true
# fingerprint:xxxx # fingerprint:xxxx
```
# vless
- name:"vless-tcp"
type:vless
server:server
port:443
uuid:uuid
network:tcp
servername:example.com # AKA SNI
# flow:xtls-rprx-direct # xtls-rprx-origin # enable XTLS
# skip-cert-verify:true
# fingerprint:xxxx
# client-fingerprint:random # Available:"chrome","firefox","safari","random"
- name:"vless-ws"
type:vless
server:server
port:443
uuid:uuid
udp:true
tls:true
network:ws
# client-fingerprint:random # Available:"chrome","firefox","safari","random"
servername:example.com # priority over wss host
# skip-cert-verify:true
# fingerprint:xxxx
ws-opts:
path:"/"
headers:
Host:example.com
#hysteria ### Hysteria
```yaml
- name:"hysteria" - name:"hysteria"
type:hysteria type:hysteria
server:server.com server:server.com
@@ -535,17 +551,11 @@ tunnels:
# disable_mtu_discovery:false # disable_mtu_discovery:false
# fingerprint:xxxx # fingerprint:xxxx
# fast-open:true # 支持 TCP 快速打开,默认为 false # fast-open:true # 支持 TCP 快速打开,默认为 false
```
- name:"wg"
type:wireguard ### Tuic
server:162.159.192.1 ```yaml
port:2480
ip:172.16.0.2
ipv6:fd01:5ca1:ab1e:80fa:ab85:6eea:213f:f4a5
private-key:eCtXsJZ27+4PbhDkHnB923tkUn2Gj59wZw5wFA75MnU=
public-key:Cr8hWlKvtDt7nrvf+f0brNQQzabAqrjfBvas9pmowjo=
udp:true
# reserved:'U4An'
- name:tuic - name:tuic
server:www.example.com server:www.example.com
port:10443 port:10443
@@ -563,8 +573,10 @@ tunnels:
# fast-open:true # fast-open:true
# skip-cert-verify:true # skip-cert-verify:true
# max-open-streams:20 # default 100, too many open streams may hurt performance # max-open-streams:20 # default 100, too many open streams may hurt performance
```
# ShadowsocksR ### ShadowsocksR
```
# The supported ciphers (encryption methods):all stream ciphers in ss # The supported ciphers (encryption methods):all stream ciphers in ss
# The supported obfses: # The supported obfses:
# plain http_simple http_post # plain http_simple http_post
@@ -585,8 +597,25 @@ tunnels:
# udp:true # udp:true
``` ```
## Proxy-groups ### Wireguard
```yaml
- name:"wg"
type:wireguard
server:162.159.192.1
port:2480
ip:172.16.0.2
ipv6:fd01:5ca1:ab1e:80fa:ab85:6eea:213f:f4a5
private-key:eCtXsJZ27+4PbhDkHnB923tkUn2Gj59wZw5wFA75MnU=
public-key:Cr8hWlKvtDt7nrvf+f0brNQQzabAqrjfBvas9pmowjo=
udp:true
# reserved:'U4An'
``` ```
## Proxy-groups
Active health detection `urltest / fallback` (based on tcp handshake, multiple failures within a limited time will actively trigger health detection to use the node)
Support `Policy Group Filter`
```yaml
proxy-groups: proxy-groups:
# 代理链,若落地协议支持 UDP over TCP 则可支持 UDP # 代理链,若落地协议支持 UDP over TCP 则可支持 UDP
# Traffic:clash <-> http <-> vmess <-> ss1 <-> ss2 <-> Internet # Traffic:clash <-> http <-> vmess <-> ss1 <-> ss2 <-> Internet
@@ -660,7 +689,7 @@ proxy-groups:
``` ```
## Providers ## Providers
### proxy-providers ### Proxy-providers
``` ```
proxy-providers: proxy-providers:
provider1: provider1:
@@ -682,8 +711,8 @@ proxy-providers:
url:https://cp.cloudflare.com/generate_204 url:https://cp.cloudflare.com/generate_204
``` ```
### rule-providers ### Rule-providers
``` ```yaml
rule-providers: rule-providers:
rule1: rule1:
behavior:classical # domain ipcidr behavior:classical # domain ipcidr
@@ -699,7 +728,15 @@ rule-providers:
``` ```
## Rules ## Rules
```rules: - Support rule `GEOSITE`.
- Support rule-providers `RULE-SET`.
- Support `multiport` condition for rule `SRC-PORT` and `DST-PORT`.
- Support `network` condition for all rules.
- Support source IPCIDR condition for all rules, just append to the end.
- The `GEOSITE` databases via https://github.com/Loyalsoldier/v2ray-rules-dat.
```yaml
rules:
- RULE-SET,rule1,REJECT - RULE-SET,rule1,REJECT
- DOMAIN-SUFFIX,baidu.com,DIRECT - DOMAIN-SUFFIX,baidu.com,DIRECT
- DOMAIN-KEYWORD,google,ss1 - DOMAIN-KEYWORD,google,ss1
@@ -732,7 +769,7 @@ sub-rules:
``` ```
## Listeners ## Listeners
``` ```yaml
# 流量入站 # 流量入站
listeners: listeners:
- name:socks5-in-1 - name:socks5-in-1
@@ -866,17 +903,17 @@ listeners:
入口配置与 Listener 等价,传入流量将和 socks,mixed 等入口一样按照 mode 所指定的方式进行匹配处理 入口配置与 Listener 等价,传入流量将和 socks,mixed 等入口一样按照 mode 所指定的方式进行匹配处理
### ss-config: ### ss-config:
``` ```yaml
ss://2022-blake3-aes-256-gcm:vlmpIPSyHH6f4S8WVPdRIHIlzmB+GIRfoH3aNJ/t9Gg=@:23456 ss://2022-blake3-aes-256-gcm:vlmpIPSyHH6f4S8WVPdRIHIlzmB+GIRfoH3aNJ/t9Gg=@:23456
``` ```
### vmess-config: ### vmess-config:
``` ```yaml
vmess://1:9d0cb9d0-964f-4ef6-897d-6c6b3ccf9e68@:12345 vmess://1:9d0cb9d0-964f-4ef6-897d-6c6b3ccf9e68@:12345
``` ```
### tuic 服务器入口 ### tuic 服务器入口
传入流量将和 socks,mixed 等入口一样按照 mode 所指定的方式进行匹配处理 传入流量将和 socks,mixed 等入口一样按照 mode 所指定的方式进行匹配处理
``` ```yaml
tuic-server: tuic-server:
enable: true enable: true
listen: 127.0.0.1:10443 listen: 127.0.0.1:10443