Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caddy+h2 模板不能用啊 #13

Closed
dylanbai8 opened this issue May 21, 2018 · 7 comments
Closed

Caddy+h2 模板不能用啊 #13

dylanbai8 opened this issue May 21, 2018 · 7 comments

Comments

@dylanbai8
Copy link

按模板搭建 不能用

@dylanbai8
Copy link
Author

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

@longercui
Copy link

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

@dylanbai8
Copy link
Author

谢谢!学习了!

@longercui
Copy link

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设置貌似可以从电脑代理手机翻墙,未测试过,按模板提示写上了,有人测试一下可以分享。

@KiriKira
Copy link
Owner

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

@KiriKira
Copy link
Owner

KiriKira commented May 29, 2018

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

@dylanbai8
Copy link
Author

知道了 谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants