HTTP常见问题

wireshark4抓取ssl

需要在“编辑 / 首选项 / Protocols" 配置 TLS协议的log文件后,才能抓取SSL相关包。

恢复windows网络设置到初始值

恢复Windows的网络设置到初始值:

netsh interface ipv4 reset
netsh interface ipv6 reset
netsh winsock reset
重启。

安装ss时遇到的问题解决

摘录自:https://baozhou.wang/2018/04/27/ss-server/

1、编译提示错误:configure: error: mbed TLS libraries not found.

解决方案:是因为执行过程系统找不到 mbedtls 的扩展。由于我是编译安装的 mbedtls;因此,只要在编译过程中,指定 mbedtls 安装目录相关文件目录的位置即可 --with-mbedtls-include=/usr/local/mbedtls-2.4.2/include/ --with-mbedtls-lib=/usr/local/mbedtls-2.4.2/lib/


2、编译提示错误:configure: error: The Sodium crypto library libraries not found.

 

解决方案:是因为执行过程系统找不到 libsodium 的扩展。由于我是编译安装的 libsodium;因此,只要在编译过程中,指定 libsodium 安装目录相关文件目录的位置即可 --with-sodium-include=/usr/local/libsodium-1.0.12/include/ --with-sodium-lib=/usr/local/libsodium-1.0.12/lib/


3、编译提示错误:configure: error: The c-ares library libraries not found.

解决方案:是因为执行过程系统找不到 c-ares 的扩展。由于我是编译安装的 c-ares;因此,只要在编译过程中,指定 c-ares 安装目录相关文件目录的位置即可:--with-cares-include=/usr/local/c-ares-1.12.0/include/ --with-cares-lib=/usr/local/c-ares-1.12.0/lib/


4、启动提示错误:/usr/local/ss-libev/bin/ss-server: error while loading shared libraries: libmbedcrypto.so.0: cannot open shared object file: No such file or directory

解决方案:执行以下命令即可

1
2
[root@server ~]# echo /usr/local/libsodium-1.0.12/lib >> /etc/ld.so.conf.d/local.conf
[root@server ~]# ldconfig

 


5、启动提示错误:/usr/local/ss-libev/bin/ss-server: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory

解决方案:执行以下命令即可

1
2
[root@server ~]# echo /usr/local/c-ares-1.12.0/lib/ >> /etc/ld.so.conf.d/local.conf
[root@server ~]# ldconfig

 


6、启动提示错误:/usr/local/ss-libev/bin/ss-server: error while loading shared libraries: libmbedcrypto.so.0: cannot open shared object file: No such file or directory

解决方案:执行以下命令即可

1
2
[root@server ~]# echo /usr/local/mbedtls-2.4.2/lib >> /etc/ld.so.conf.d/local.conf 
[root@server ~]# ldconfig

 


7、启动成功后,当客户端发起请求时,提示错误:ERROR: connect: Invalid argument

解决方案:删除自定义配置文件中的 local_ 开头的两行(即:local_address 和 local_port)。

Linux如何安装Besttrace

CentOS:

yum -y install wget zip
wget https://cdn.ipip.net/17mon/besttrace4linux.zip

然后解压:

unzip besttrace*

授予权限:

chmod +x besttrace

然后就可以运行了,比如:

./besttrace 119.6.6.6

摘自:https://www.bandwagonhost.net/1186.html

如何确定是否被墙了?

被墙一般分3种:墙IP,墙端口,墙协议。

1、IP不能ping通

那么很可能IP被墙了,只有换IP

2、IP能ping通,某端口连接不上

查看端口是否国内或国外能连接上,国外端口检测工具:https://www.yougetsignal.com/tools/open-ports/,国内端口检测工具http://tool.chinaz.com/port。

如果某端口国内不能连接,国外能连接,显然是被墙了。 

如果某端口国内不能连接,国外也不能连接,那么可能是vps上的防火墙问题,通过 firewall-cmd 命令查看端口的开启情况,见文章:http://stevezhou.info/http/article_100.html​。

3128端口

3128是Squid HTTP代理服务器的默认端口

netstat命令简要说明

$ netstat -lpnt #列表端口占用情况

下面是参数说明:

-a(all) 显示所有选项,默认不显示LISTEN相关

-t(tcp) 仅显示tcp相关选项

-u(udp) 仅显示udp相关选项

-n 拒绝显示别名,能显示数字的全部转化成数字

-l 仅列出有在 Listen(监听)的服务状态

-p 显示建立相关链接的程序名

-r 显示路由信息,路由表

-e 显示扩展信息,例如udi等

-s 按各个协议进行统计

-c 每隔一个固定时间,执行该netstat命令

提示:LISTEN和LISTENING状态只有用-a 或 -l才能看到