Skip to content

Instantly share code, notes, and snippets.

@iandol
Last active April 25, 2025 03:17
Show Gist options
  • Save iandol/fea0dbcf73347a65f1c766e73461cab7 to your computer and use it in GitHub Desktop.
Save iandol/fea0dbcf73347a65f1c766e73461cab7 to your computer and use it in GitHub Desktop.

Revisions

  1. iandol revised this gist Mar 10, 2021. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions config.json
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,6 @@
    "udp": true
    }
    },
    // Run a local HTTP proxy
    {
    "port": 8880,
    "listen": "127.0.0.1",
    @@ -33,12 +32,12 @@
    "protocol": "vmess",
    "settings": {
    "vnext": [{
    "address": "123.123.123.123",
    "address": "ip.here",
    "port": 443,
    "users": [{
    "id": "88888888-4444-4444-4444-123456789123",
    "alterId": 0
    }]
    "id": "aaaaaaaaaaaaaaaaaaaaaaaaaa-bbbbbbbbbbbbbbbbbb",
    "alterId": 0
    }]
    }]
    },
    "streamSettings": {
    @@ -49,9 +48,9 @@
    "serverName": "static.cldcdn.net"
    },
    "wssettings": {
    "connectionReuse": true,
    "connectionReuse": true,
    "path": "/ray",
    "headers": {
    "headers": {
    "Host": "static.cldcdn.net"
    }
    }
    @@ -86,4 +85,4 @@
    // Everything else goes to VPN server.
    ]
    }
    }
    }
  2. iandol revised this gist Mar 10, 2021. 2 changed files with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions config.json
    Original file line number Diff line number Diff line change
    @@ -15,6 +15,7 @@
    "udp": true
    }
    },
    // Run a local HTTP proxy
    {
    "port": 8880,
    "listen": "127.0.0.1",
    File renamed without changes.
  3. iandol revised this gist Mar 10, 2021. 2 changed files with 31 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions clash-config.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    # routes http to socks
    port: 8888
    log-level: info
    proxies:
    - name: "socks"
    type: socks5
    server: 127.0.0.1
    port: 1080
    rules:
    - DOMAIN-SUFFIX,google.com,socks
    - DOMAIN-KEYWORD,google,socks
    - DOMAIN,google.com,socks
    - DOMAIN-SUFFIX,ad.com,REJECT
    - SRC-IP-CIDR,192.168.1.201/32,DIRECT
    - IP-CIDR,127.0.0.0/8,DIRECT
    - MATCH,socks
    15 changes: 15 additions & 0 deletions config.json
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,7 @@
    {
    "log": {
    "logelevel": "info"
    },
    // Run a local SOCKS proxy for apps to connect to.
    "inbounds": [{
    "port": 1080,
    @@ -11,6 +14,18 @@
    "settings": {
    "udp": true
    }
    },
    {
    "port": 8880,
    "listen": "127.0.0.1",
    "protocol": "http",
    "sniffing": {
    "enabled": true,
    "destOverride": ["http", "tls"]
    },
    "settings": {
    "allowTransparent": true
    }
    }],
    "outbounds": [{
    // Add our v2Ray server as an outbound destination.
  4. iandol created this gist Jul 6, 2020.
    73 changes: 73 additions & 0 deletions config.json
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,73 @@
    {
    // Run a local SOCKS proxy for apps to connect to.
    "inbounds": [{
    "port": 1080,
    "listen": "127.0.0.1",
    "protocol": "socks",
    "sniffing": {
    "enabled": true,
    "destOverride": ["http", "tls"]
    },
    "settings": {
    "udp": true
    }
    }],
    "outbounds": [{
    // Add our v2Ray server as an outbound destination.
    "protocol": "vmess",
    "settings": {
    "vnext": [{
    "address": "123.123.123.123",
    "port": 443,
    "users": [{
    "id": "88888888-4444-4444-4444-123456789123",
    "alterId": 0
    }]
    }]
    },
    "streamSettings": {
    "network": "ws",
    "security": "tls",
    "tlssettings": {
    "allowInsecure": false,
    "serverName": "static.cldcdn.net"
    },
    "wssettings": {
    "connectionReuse": true,
    "path": "/ray",
    "headers": {
    "Host": "static.cldcdn.net"
    }
    }
    }
    },{
    // Add a destination for traffic that should NOT go to the VPN.
    "protocol": "freedom",
    "tag": "direct",
    "settings": {}
    }],
    "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [
    {
    // Don't send LAN traffic to the VPN.
    "ip": ["geoip:private"],
    "outboundTag": "direct",
    "type": "field"
    },
    {
    // Don't send Chinese IP's to the VPN.
    "ip": ["geoip:cn"],
    "outboundTag": "direct",
    "type": "field"
    },
    {
    // Don't send .cn domains to the VPN.
    "domain": ["geosite:cn"],
    "outboundTag": "direct",
    "type": "field"
    }
    // Everything else goes to VPN server.
    ]
    }
    }