我在客户端的outbound和服务器端的inbound增加了kcp,双方的transtransport也配置了,结果就打不开,去掉这部分配置就好了。
服务器可以启动,配置文件无错误。
客户端:
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "123.123.123.123",
"port": 12345,
"users": [
{
"id": "123-123-123",
"alterId": 64
}
]
}
]
},
"streamSettings": {
"network": "kcp"
}
}
服务器端
"inbound": {
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "123-123-123",
"level": 1,
"alterId": 64
}
],
"detour": {
"to": "detour"
}
},
"streamSettings": {
"network": "kcp"
}
}
KCP 使用 UDP 端口,请确认你的主机上相应的 UDP 端口已开放(防火墙之类)。
防火墙默认是通行的
I have the exact same problem as well, comodo shows that there're out packets, but no in packets, and V2ray client tried to establish many links but all of them failed, and there's no log on the server, seems that the data didn't get to the server.
@helloyan 注意到你使用了动态端口,detour.to 指向的那个 outbound 也可以设置 "network": "kcp".
不应该是客户端的outbound服务器端的inbound吗?这两个我都设置了,而且文档也说只有vmess才支持,其他两个都不是的吧
@v2ray Could you please look at my config file as well? The servers' service running fine and the log showed no error, but the client just showed EOF and couldn't get online...
{
"log" : {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": *,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "*",
"level": 1,
"alterId": 80
}
],
"detour": {
"to": "detour"
},
"streamSettings": {
"network": "kcp"
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {},
"streamSettings": {
"network": "kcp"
}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": *,
"settings": {
"method": "chacha20-ietf",
"password": "*",
"udp": true
}
},
{
"protocol": "vmess",
"port": "*",
"tag": "detour",
"settings": {},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "kcp"
}
}
],
"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"
}
]
}
},
"transport": {
"kcpSettings": {
"uplinkCapacity": 10,
"downlinkCapacity": 9,
"congestion": true
}
}
}
{
"log": {
"loglevel": "warning"
},
"inbound": {
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": false,
"ip": "127.0.0.1"
},
"streamSettings": {
"network": "kcp"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "*",
"port": *,
"users": [
{
"id": "*",
"alterId": 80
}
]
}
]
},
"streamSettings": {
"network": "kcp"
}
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"port": "1-52",
"outboundTag": "direct"
},
{
"type": "field",
"port": "54-79",
"outboundTag": "direct"
},
{
"type": "field",
"port": "81-442",
"outboundTag": "direct"
},
{
"type": "field",
"port": "444-65535",
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"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": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
},
"transport": {
"kcpSettings": {
"uplinkCapacity": 9,
"downlinkCapacity": 100,
"congestion": true
}
}
}
servers' outbound does not need "kcp“. try to delete it.
服务器端只有inbound和inboundDetour需要设置kcp,客户端只有outbound需要设置,其它的删除了。
On Sat, Jul 16, 2016 at 3:21 PM Sherman-Liu [email protected]
wrote:
@v2ray https://github.com/v2ray Could you please look at my config file
as well? The servers' service running fine and the log showed no error, but
the client just showed EOF and couldn't get online...{
"log" : {
"access": "/var/log/v2ray/access.log",
"error": "/var/log/v2ray/error.log",
"loglevel": "warning"
},
"inbound": {
"port": _,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "_",
"level": 1,
"alterId": 80
}
],
"detour": {
"to": "detour"
},
"streamSettings": {
"network": "kcp"
}
}
},
"outbound": {
"protocol": "freedom",
"settings": {},
"streamSettings": {
"network": "kcp"
}
},
"inboundDetour": [
{
"protocol": "shadowsocks",
"port": _,
"settings": {
"method": "chacha20-ietf",
"password": "_",
"udp": true
}
},
{
"protocol": "vmess",
"port": "*",
"tag": "detour",
"settings": {},
"allocate": {
"strategy": "random",
"concurrency": 2,
"refresh": 5
},
"streamSettings": {
"network": "kcp"
}
}
],
"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"
}
]
}
},
"transport": {
"kcpSettings": {
"uplinkCapacity": 10,
"downlinkCapacity": 9,
"congestion": true
}
}
}{
"log": {
"loglevel": "warning"
},
"inbound": {
"port": 1080,
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"auth": "noauth",
"udp": false,
"ip": "127.0.0.1"
},
"streamSettings": {
"network": "kcp"
}
},
"outbound": {
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "_",
"port": *,
"users": [
{
"id": "_",
"alterId": 80
}
]
}
]
},
"streamSettings": {
"network": "kcp"
}
},
"outboundDetour": [
{
"protocol": "freedom",
"settings": {},
"tag": "direct"
}
],
"dns": {
"servers": [
"8.8.8.8",
"8.8.4.4",
"localhost"
]
},
"routing": {
"strategy": "rules",
"settings": {
"domainStrategy": "IPIfNonMatch",
"rules": [
{
"type": "field",
"port": "1-52",
"outboundTag": "direct"
},
{
"type": "field",
"port": "54-79",
"outboundTag": "direct"
},
{
"type": "field",
"port": "81-442",
"outboundTag": "direct"
},
{
"type": "field",
"port": "444-65535",
"outboundTag": "direct"
},
{
"type": "chinasites",
"outboundTag": "direct"
},
{
"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": "direct"
},
{
"type": "chinaip",
"outboundTag": "direct"
}
]
}
},
"transport": {
"kcpSettings": {
"uplinkCapacity": 9,
"downlinkCapacity": 100,
"congestion": true
}
}
}—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/207#issuecomment-233116842,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAUD23QZdpJ_OXsxoeuf9gxnyC6bZ0JAks5qWIaDgaJpZM4JMKi6
.
@tlze Umm...I figured it out, first of all let me say thank you for your suggestion, it really helped, but that's not the most lethal yet dumb mistake I made......
In this part of the servers' config.json, oringinal one I made looks like this:
"inbound": {
"port": *,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "*",
"level": 1,
"alterId": 80
}
],
"detour": {
"to": "detour"
},
"streamSettings": {
"network": "kcp"
}
}
},
The new one, looks like this:
"inbound": {
"port": *,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "*",
"level": 1,
"alterId": 80
}
],
"detour": {
"to": "detour"
}
},
"streamSettings": {
"network": "kcp"
}
},
Did you notice the difference?
I frickin' forgot to move the "streamSettings" out of the "settings" bit fat curly braces!!!!
Damn you JSON!!!!
@Sherman-Liu I am using Visual Studio Code for the whole project. It provides awesome Javascript editing experience.
This is my simple configfile, It works well.
I only hided my IP.
On Sun, Jul 17, 2016 at 12:05 AM Darien Raymond [email protected]
wrote:
@Sherman-Liu https://github.com/Sherman-Liu I am using Visual Studio
Code for the whole project. It provides awesome Javascript editing
experience.—
You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub
https://github.com/v2ray/v2ray-core/issues/207#issuecomment-233137324,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAUD2xzLh8qSEN78cY7g8Jk5gy9rFzoJks5qWQFhgaJpZM4JMKi6
.
@v2ray Okay, thanks!
@v2ray 大哥 mKCP可以和tcp 无缝集成 意思是 mKCP可以完全兼容TCP协议并且 mKCP<>TCP 直接通信?
https://github.com/v2ray/manual/blob/master/zh_cn/chapter_03/kcp.md
mKCP 在 KCP 协议的基础上进行了一些改进,可以无缝替换 TCP。
@Sherman-Liu JSON Editor online for u. http://www.bejson.com/oldbejson/jsoneditoronline/
@v2ray
KCP 使用 UDP 端口,请确认你的主机上相应的 UDP 端口已开放(防火墙之类)。
你指的什么端口,我也是配置了无法使用KCP。V2Ray占用的端口 UDP 肯定都是放行了的。
表示无法使用kcp协议
@weing104 配置贴出来看下。
我也是有这个问题
使用 ss+kcptun 在linode服务器上可以通信。换作vultr服务器就不行。
然后现在v2ray在linode上可以使用TCP,但mKCP使用不了。g了很多条网页,很大可能性是UDP被运营商封掉了。可为什么我ss+kcptun可以呢。真是奇怪,目前还没有找到答案。
v2ray 配置起来 太蛮烦。
Most helpful comment
表示无法使用kcp协议