mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 18:24:36 +00:00
use 80/443 as ws/wss default port (#1700)
This commit is contained in:
@@ -74,6 +74,7 @@ pub async fn socket_addrs(
|
|||||||
.or_else(default_port_number)
|
.or_else(default_port_number)
|
||||||
.ok_or(Error::InvalidUrl(url.to_string()))?;
|
.ok_or(Error::InvalidUrl(url.to_string()))?;
|
||||||
// See https://github.com/EasyTier/EasyTier/pull/947
|
// See https://github.com/EasyTier/EasyTier/pull/947
|
||||||
|
// here is for compatibility with old version
|
||||||
let port = match port {
|
let port = match port {
|
||||||
0 => match url.scheme() {
|
0 => match url.scheme() {
|
||||||
"ws" => 80,
|
"ws" => 80,
|
||||||
|
|||||||
@@ -207,8 +207,8 @@ fn default_port(scheme: &str) -> Option<u16> {
|
|||||||
match scheme {
|
match scheme {
|
||||||
"tcp" => Some(11010),
|
"tcp" => Some(11010),
|
||||||
"udp" => Some(11010),
|
"udp" => Some(11010),
|
||||||
"ws" => Some(11011),
|
"ws" => Some(80),
|
||||||
"wss" => Some(11012),
|
"wss" => Some(443),
|
||||||
"faketcp" => Some(11013),
|
"faketcp" => Some(11013),
|
||||||
"quic" => Some(11012),
|
"quic" => Some(11012),
|
||||||
"wg" => Some(11011),
|
"wg" => Some(11011),
|
||||||
|
|||||||
Reference in New Issue
Block a user