matrix homeserver 大陸分流加速

167 天前
 basncy
Homeserver 建在海外,大陸用戶連大陸中轉, 海外用戶(主要是 federation 之間的連接)連海外.

nginx geo 模塊分流配置舉例:
http{
geoip_country /usr/share/GeoIP/GeoIPv6.dat;
server {
location /.well-known/matrix/server {
if ( $geoip_country_code = CN ) {
return 200 '{"m.server": "cn-vps.example.com:12345"}';
}
return 200 '{"m.server": "homeserver.example.com:12345"}';
}
location /.well-known/matrix/client 類似
}

cn-vps.example.com:12345 加速方法省略幾萬字, nginx 舉例:
location / alias /usr/share/webapps/element/; #國內 element-web client 加速
location /_matrix/ proxy_pass http://10.0.8.2:8008 synapse 服務器.
1221 次点击
所在节点    云计算
3 条回复
hrong
167 天前
没看懂在说啥
basncy
167 天前
@hrong 就是自建 matrix homeserver, 国内用户走国内入口, 国外用户走国外入口. 跨境部分用 nginx 反代加速举例.
hrong
166 天前
就是一个聊天服务器呗。那你前置写两句话不是更好吗?

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/995164

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX