反代订阅节点(国内服务器-国内域名)

PROXY-START/

仅代理 /api/fanqie/sub 及其子路径

location ^~ /api/fanqie/sub {
proxy_pass http://fqjs1.clashurl.xyz;
proxy_set_header Host fqjs1.clashurl.xyz;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;

add_header X-Cache $upstream_cache_status;

# 缓存静态资源
set $static_filew06cbNHM 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) {
    set $static_filew06cbNHM 1;
    expires 1m;
}
if ( $static_filew06cbNHM = 0 ) {
    add_header Cache-Control no-cache;
}

}

其它路径全部返回 404

location ^~ / {
return 404;
}

PROXY-END/

世界树

一步一步来

您可能还喜欢...