User Tools

Site Tools


linux:v2ray

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
linux:v2ray [2019/07/13 22:31] – [Router Install] percylinux:v2ray [2021/10/02 22:30] – [Config file for client] percy
Line 61: Line 61:
 Testing the connection Testing the connection
   curl -x socks5://127.0.0.1:1088 google.com   curl -x socks5://127.0.0.1:1088 google.com
 +Reference 
 +  - https://www.v2ray.com/chapter_02/protocols/dokodemo.html
  
 ===== Reference ===== ===== Reference =====
Line 70: Line 71:
 { {
   "inbounds": [{   "inbounds": [{
-    "port": 2710x,+    "port": 2130x, 
 +    "listen": "127.0.0.1",
     "protocol": "vmess",     "protocol": "vmess",
     "settings": {     "settings": {
       "clients": [       "clients": [
         {         {
-          "id": "58ceb1c6-b580-4d2c-bf41-21b6a35ae62x",+          "id": "58ceb1c6-b580-4d2c-bf41-21b6a35xxxx",
           "level": 1,           "level": 1,
           "alterId": 64           "alterId": 64
Line 82: Line 84:
     },     },
  "streamSettings": {  "streamSettings": {
- "network": "mkcp",+ "network": "ws"
 + "wsSettings":
 +     "path": "/xxxxxxx" 
 + },
  "kcpSettings": {  "kcpSettings": {
    "uplinkCapacity": 50,    "uplinkCapacity": 50,
Line 110: Line 115:
       }       }
     ]     ]
-  }+  }, 
 + "log":
 +  "access": "/var/log/v2ray/access.log", 
 +  "loglevel": "info", 
 +  "error": "/var/log/v2ray/error.log" 
 + }
 } }
 </file> </file>
Line 118: Line 128:
 <code json> <code json>
 { {
-    "dns":+  "dns":
-        "hosts": { +    "servers": 
-            "domain:github.io": "pages.github.com", +      "1.1.1.1" 
-            "domain:shadowsocks.org": "electronicsrealm.com", +    ] 
-            "domain:v2ray.com": "www.vicemc.net", +  }, 
-            "domain:wikipedia.org": "www.wikimedia.org+  "inbounds":
-        }+    
-        "servers": [ +      "port": 10808, 
-            "1.1.1.1", +      "protocol": "socks", 
-            +      "settings": 
-                "address": "114.114.114.114", +        "auth": "noauth", 
-                "domains": [ +        "udp": true, 
-                    "geosite:cn+        "userLevel": 8 
-                ], +      }
-                "port": 53 +      "sniffing": 
-            }, +        "destOverride": 
-            "8.8.8.8", +          "http", 
-            "localhost"+          "tls
 +        ]
 +        "enabled": true 
 +      }, 
 +      "tag": "socks" 
 +    }
 +    
 +      "port": 10809, 
 +      "protocol": "http", 
 +      "settings": { 
 +        "userLevel": 
 +      }, 
 +      "tag": "http
 +    } 
 +  ], 
 +  "log": { 
 +    "loglevel": "warning" 
 +  }, 
 +  "outbounds":
 +    { 
 +      "mux":
 +        "enabled": false 
 +      }, 
 +      "protocol": "vmess", 
 +      "settings":
 +        "vnext":
 +          { 
 +            "address": "pjq.me", 
 +            "port": 443, 
 +            "users":
 +              { 
 +                "alterId": 64, 
 +                "id": "58ceb1c6-b580-4d2c-bf41-21bxxxxxxxxxx", 
 +                "level": 8, 
 +                "security": "aes-128-gcm" 
 +              } 
 +            ] 
 +          }
         ]         ]
-    }, +      }, 
-    "inbounds": [ +      "streamSettings": { 
-        +        "network": "ws", 
-            "listen": "127.0.0.1", +        "security": "tls", 
-            "port": 1080, +        "tlssettings": { 
-            "protocol": "socks", +          "allowInsecure": true, 
-            "settings": { +          "serverName": ""
-                "auth": "noauth", +
-                "ip": "127.0.0.1", +
-                "udp": false +
-            }, +
-            "sniffing":+
-                "destOverride":+
-                    "http", +
-                    "tls" +
-                ], +
-                "enabled": true +
-            }+
-            "tag": "socks-inbound"+
         },         },
-+        "wssettings": { 
-   "timeout": 0, +          "connectionReuse": true
-   "listen": "127.0.0.1"+          "headers": { 
-   "port": 8080, +            "Host": "" 
-   "protocol": "http", +          }
-   "allowTransparent": true+          "path": "xxxxx
-   "userLevel": 0, +        
-   "tag": "http-inbound+      }
- +      "tag": "proxy"
-    ]+
-    "log": { +
-        "loglevel": "warning"+
     },     },
-    "other": {}, +    { 
-    "outbounds":+      "protocol": "freedom", 
-        { +      "settings": {}, 
-            "protocol": "vmess", +      "tag": "direct" 
-            "settings":+    }, 
-                "vnext":+    
-                    { +      "protocol": "blackhole", 
-                        "address": "ef.pjq.me", +      "settings":
-                        "port": 27105, +        "response": { 
-                        "users":+          "type": "http"
-                            { +
-                                "id": "58ceb1c6-b580-4d2c-bf41-21b6a35ae62b" +
-                            } +
-                        ] +
-                    } +
-                ] +
-            }, +
-            "streamSettings":+
-                "kcpSettings":+
-                    "congestion": true, +
-                    "downlinkCapacity": 100, +
-                    "header":+
-                        "type": "none" +
-                    }, +
-                    "uplinkCapacity": 50 +
-                }, +
-                "network": "mkcp" +
-            } +
-        }, +
-        +
-            "protocol": "freedom", +
-            "settings": {}, +
-            "tag": "direct" +
-        }, +
-        +
-            "protocol": "blackhole", +
-            "settings": {}, +
-            "tag": "blocked" +
-        +
-    ], +
-    "policy": { +
-        "levels": +
-            "0": { +
-                "downlinkOnly": 0, +
-                "uplinkOnly":+
-            } +
-        }, +
-        "system":+
-            "statsInboundDownlink": false, +
-            "statsInboundUplink": false+
         }         }
 +      },
 +      "tag": "block"
 +    }
 +  ],
 +  "policy": {
 +    "levels": {
 +      "8": {
 +        "connIdle": 300,
 +        "downlinkOnly": 1,
 +        "handshake": 4,
 +        "uplinkOnly": 1
 +      }
     },     },
-    "routing": { +    "system": { 
-        "domainStrategy": "IPOnDemand"+      "statsInboundUplink": true
-        "rules": +      "statsInboundDownlink": true
-            { +
-                "domain":+
-                    "geosite:cn" +
-                ], +
-                "outboundTag": "direct", +
-                "type": "field" +
-            }, +
-            { +
-                "ip":+
-                    "geoip:cn", +
-                    "geoip:private" +
-                ], +
-                "outboundTag": "direct", +
-                "type": "field" +
-            }, +
-            { +
-                "domain":+
-                    "geosite:category-ads" +
-                ], +
-                "outboundTag": "blocked", +
-                "type": "field" +
-            } +
-        ]+
     }     }
 +  },
 +  "routing": {
 +    "rules": [
 +      {
 +         "type": "field",
 +         "inboundTag": ["dokodemo", "http", "socks"],
 +         "outboundTag": "proxy"
 +        }
 +    ]
 +  },
 +  "stats": {},
 +  "inboundDetour":[
 +    {
 +       "protocol":"dokodemo-door",
 +       "port":1099,
 +       "tag": "dokodemo",
 +       "settings":{
 +          "address":"",
 +          "network":"tcp",
 +          "timeout":0,
 +          "followRedirect":true
 +       }
 +     }
 +  ]
 } }
 </code> </code>
 +
 +==== v2ray with nginx ====
 +- https://tlanyan.me/v2ray-traffic-mask/
 +
  
/var/www/dokuwiki/wiki/data/pages/linux/v2ray.txt · Last modified: 2021/10/02 22:32 by percy