1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 01:57:12 -05:00

simplify case

This commit is contained in:
v2ray 2016-08-17 23:05:47 +02:00
parent 49056d9942
commit bb3ceb3d7b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -107,31 +107,9 @@ func calcPto(dst v2net.Destination) string {
We will return "CRASH"turn "unknown" if we can't guess it, cause Dial to fail.
*/
case 80:
fallthrough
case 8080:
fallthrough
case 8880:
fallthrough
case 2052:
fallthrough
case 2082:
fallthrough
case 2086:
fallthrough
case 2095:
case 80, 8080, 8880, 2052, 2082, 2086, 2095:
return "ws"
case 443:
fallthrough
case 2053:
fallthrough
case 2083:
fallthrough
case 2087:
fallthrough
case 2096:
fallthrough
case 8443:
case 443, 2053, 2083, 2087, 2096, 8443:
return "wss"
default:
return "unknown"