Giter VIP home page Giter VIP logo

Comments (7)

dylanbai8 avatar dylanbai8 commented on August 21, 2024

host 必须与域名相同 换成别的就不行了?

from vtemplate.

longercui avatar longercui commented on August 21, 2024

模板需要细微调整,总体来说不错。caddy和nginx熟练前最好不要尝试,问题多多。还有,TCP+TLS
速度慢,不推荐。GCE用mkcp飞快,tls就慢多了。如果IP没有被墙,不用那么小心。之前用SSR很快被人共账号,带宽占满,V2Ray不会,测试一段时间再来说说。

from vtemplate.

dylanbai8 avatar dylanbai8 commented on August 21, 2024

谢谢!学习了!

from vtemplate.

longercui avatar longercui commented on August 21, 2024

ws+tls+ngnix配置模板问题有点大,我发我的成功配置过来。
{
"log": {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "error"
},
"policy": {
"levels": {
"0": {
"uplinkOnly": 0,
"downlinkOnly": 0,
"connIdle": 150,
"handshake": 4
}
}
},
"inbound": {
"listen": "...",
"port": ,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": ".
.
.",
"level": 0,
"alterId": **
},
{
"id": "
...",
"level": 0,
"alterId": **
},
{
"id": "
...",
"level": 0,
"alterId": **
}
]
},
"streamSettings": {
"network": "ws",
"security": "auto",
"wsSettings": {
"path": "/
",
"headers": {
"Host": "
."
}
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {}
},
"outboundDetour": [
{
"protocol": "blackhole",
"settings": {},
"tag": "blocked"
}
],
"routing": {
"strategy": "rules",
"settings": {
"rules": [
{
"type": "field",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"outboundTag": "blocked"
}
]
}
}
}
所有的*号要修改,这是服务器版,下面是客户端版
{
"log": {
"access": "E:\v2ray-o\logs\access-wstls.log",
"error": "E:\v2ray-o\logs\error-wstls.log",
"loglevel": "debug"
},
"policy": {
"levels": {
"0": {
"uplinkOnly": 0,
"downlinkOnly": 0,
"connIdle": 150,
"handshake": 4
}
}
},
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"domain": "grosite:cn",
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"127.0.0.0/8",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10",
"geoip:cn"
],
"outboundTag": "direct",
"port": null,
"type": "field"
}
]
},
"strategy": "rules"
},
"inbound": {
"listen": "0.0.0.0",
"port": 1080,
"protocol": "socks",
"settings": {
"auth": "noauth",
"clients": null,
"ip": "127.0.0.1",
"udp": false
},
"streamSettings": null
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"users": [
{
"id": "
----",
"level": 0,
"alterId": ,
"security": "aes-128-gcm"
}
],
"address": "
.",
"port": 443
}
]
},
"streamSettings": {
"tlsSettings": {
"allowInsecure": false
},
"wsSettings": {
"headers": {
"Host": "
."
},
"path": "/
"
},
"network": "ws",
"security": "tls"
},
"tag": "proxy"
},
"inboundDetour": [
{
"port": 1087,
"listen": "192.168.1.2",
"protocol": "http",
"settings": {
"timeout": 300
}
}
],
"outboundDetour": [
{
"protocol": "freedom",
"settings": {
"response": null
},
"tag": "direct"
},
{
"protocol": "blackhole",
"settings": {
"response": {
"type": "http"
}
},
"tag": "blockout"
}
]
}
inboundDetour设置貌似可以从电脑代理手机翻墙,未测试过,按模板提示写上了,有人测试一下可以分享。

from vtemplate.

KiriKira avatar KiriKira commented on August 21, 2024

是的,host应该相同,实际上也没必要不相同。

from vtemplate.

KiriKira avatar KiriKira commented on August 21, 2024

@longercui nginx 用的模板并非开箱即用,主要原因是提交的人没有把按 host 分流和按 path 分流分成两个文件,需要按自己的需求修改。如果你对此有其他意见或者建议,请提交 pull request.

from vtemplate.

dylanbai8 avatar dylanbai8 commented on August 21, 2024

知道了 谢谢

from vtemplate.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.