Steel-Shadow / Steel-Shadow.github.io

Apache License 2.0
1 stars 2 forks source link

搭建代理服务器 - Steel Shadow's Blog #17

Open utterances-bot opened 3 months ago

utterances-bot commented 3 months ago

搭建代理服务器 - Steel Shadow's Blog

Steel Shadow's Blog

https://steel-shadow.github.io//2024/05/21/%E6%90%AD%E5%BB%BA%E4%BB%A3%E7%90%86%E6%9C%8D%E5%8A%A1%E5%99%A8/

Steel-Shadow commented 3 months ago

补充: 用学校邮箱注册 GitHub Student Developer Pack,包含许多免费的服务器、域名。 可惜架设本服务器时完全忘了这回事,花了15块买了域名,但也无所谓了,羊毛留着以后再薅。

Steel-Shadow commented 3 months ago

吐槽一下代理质量。 手机移动5g,代理延迟350ms(4g 20Mbps),下载200Mbps,上传1Mbps。 校园网700ms,下载5-50Mbps,上传1-50Mbps。校园网连接稳定性极差,偶尔超时。

Steel-Shadow commented 3 weeks ago

补充: cerbot在renew SSL/TLS 证书后,需要重新加载 trojan 服务进程,使用新的证书。

Steel-Shadow commented 3 weeks ago

关于 web 服务和 trojan: 原文介绍的是,将 trojan 开在 443 端口,web 服务使用 80 端口 http。这样用户使用 web 服务被 trojan 加密,用户直观感受到的是 web 服务使用 https。

有人认为这样做不好,应该明确区分 web 服务和 trojan,而不是将 web 服务作为 trojan 的伪装站点。

改进方案:使用 nginx(443端口) 反向代理,根据 service_name 区分 web(开在其它端口) 服务和 trojan 代理。这样可以加速 web 服务,trojan 区分伪装站点和代理流量是在应用层完成的,要经过伪装认证计算。而 nginx 的 SNI (server name indication) 是在 SSL 握手时完成的,在传输层直接进行 server name 字符串对比,效率更高。具体改进方案教程见此。