怎么让全世界的人都能访问你的 milkv-duo 服务器 How to make your milkv-duo server accessible to people all over the world

1. Milkv duo 部署 Http服务,见社区文章

2. 路由器端口映射,最好有ddns 动态域名

# Automatically update your CloudFlare DNS record to the IP, Dynamic DNS

# Can retrieve cloudflare Domain id and list zone's, because, lazy

## https://raw.githubusercontent.com/yulewang/cloudflare-api-v4-ddns/master/cf-v4-ddns.sh

## DDNS 动态IP 刷新提交 每15分钟一次
*/15 * * * * bash /root/cf-v4-ddns.sh

3. 使用一台公网云主机 反代 服务

  • 以下是云主机 Nginx 的反代配置
server {
	listen 443 ssl ;
	server_name  milkv.262235.xyz;

	ssl_certificate     cert/vm.crt;
	ssl_certificate_key cert/vm.key;

	ssl_session_timeout 5m;
	ssl_protocols TLSv1 TLSv1.1 TLSv1.2;

	ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
	ssl_prefer_server_ciphers on;

	index index.html index.php;

	location / {
		proxy_pass http://vip.262235.xyz:193;
		proxy_set_header Host $host;
		proxy_set_header X-Real-IP $remote_addr;
		proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
		proxy_set_header X-Forwarded-Proto $scheme;
		proxy_set_header X-Forwarded-Protocol $scheme;
		proxy_set_header X-Forwarded-Host $http_host;

# Disable buffering when the nginx proxy gets very resource heavy upon streaming
		proxy_buffering off;
	}
}

4. 注册 www.cloudflare-cn.com 帐号,使用CF DNS 管理域名,申请 有效期达到15年的专用证书

CF 的证书支持泛域名,只是启用CF代理,浏览器就不会安全警告

ssl_certificate     cert/vm.crt;  
ssl_certificate_key cert/vm.key;

全世界的人都能访问 milkv-duo 服务器 https://milkv.262235.xyz

duo

2 Likes

我学校特有钱,每一个ip都是公网地址,我没用一个代理,就把duo挂上了

1 Like

Yes, i have seen the same with TENET in the past - https://www.tenet.ac.za/

you could also use yggdrasil-network - https://yggdrasil-network.github.io/