部署了个测试静态页,用了10080端口。curl访问没问题,chrome浏览器访问报错
ERR_UNSAFF_PORT查了一下,google对于部分端口在客户端是直接拦截的。请求都不会到服务器
定义在这里
谷歌官网源码:chromium.googlesource.com
github项目源码:chromium/net/base/port_util.cc at main · chromium/chromium · GitHub
这个10080端口原来是不在拦截列表里的,是后来加的,真坑啊。
最新的如下
const int kRestrictedPorts[] = {1,      // tcpmux7,      // echo9,      // discard11,     // systat13,     // daytime15,     // netstat17,     // qotd19,     // chargen20,     // ftp data21,     // ftp access22,     // ssh23,     // telnet25,     // smtp37,     // time42,     // name43,     // nicname53,     // domain69,     // tftp77,     // priv-rjs79,     // finger87,     // ttylink95,     // supdup101,    // hostriame102,    // iso-tsap103,    // gppitnp104,    // acr-nema109,    // pop2110,    // pop3111,    // sunrpc113,    // auth115,    // sftp117,    // uucp-path119,    // nntp123,    // NTP135,    // loc-srv /epmap137,    // netbios139,    // netbios143,    // imap2161,    // snmp179,    // BGP389,    // ldap427,    // SLP (Also used by Apple Filing Protocol)465,    // smtp+ssl512,    // print / exec513,    // login514,    // shell515,    // printer526,    // tempo530,    // courier531,    // chat532,    // netnews540,    // uucp548,    // AFP (Apple Filing Protocol)554,    // rtsp556,    // remotefs563,    // nntp+ssl587,    // smtp (rfc6409)601,    // syslog-conn (rfc3195)636,    // ldap+ssl989,    // ftps-data990,    // ftps993,    // ldap+ssl995,    // pop3+ssl1719,   // h323gatestat1720,   // h323hostcall1723,   // pptp2049,   // nfs3659,   // apple-sasl / PasswordServer4045,   // lockd5060,   // sip5061,   // sips6000,   // X116566,   // sane-port6665,   // Alternate IRC [Apple addition]6666,   // Alternate IRC [Apple addition]6667,   // Standard IRC [Apple addition]6668,   // Alternate IRC [Apple addition]6669,   // Alternate IRC [Apple addition]6697,   // IRC + TLS10080,  // Amanda
};