V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
basncy
V2EX  ›  云计算

matrix homeserver 大陸分流加速

  •  
  •   basncy · 154 天前 · 1196 次点击
    这是一个创建于 154 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 服務器.
    3 条回复    2023-11-26 15:06:02 +08:00
    hrong
        1
    hrong  
       154 天前 via iPhone
    没看懂在说啥
    basncy
        2
    basncy  
    OP
       154 天前
    @hrong 就是自建 matrix homeserver, 国内用户走国内入口, 国外用户走国外入口. 跨境部分用 nginx 反代加速举例.
    hrong
        3
    hrong  
       153 天前 via iPhone
    就是一个聊天服务器呗。那你前置写两句话不是更好吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1011 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 19:15 · PVG 03:15 · LAX 12:15 · JFK 15:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.