日本乱偷中文字幕,美女脱内衣18禁免费看,亚洲国产精品丝袜在线观看,18女人腿打开无遮挡,廖承宇chinese野战做受

frp 內網(wǎng)穿透

目的

本人使用了樹(shù)莓派作為了家里一直吃灰的服務(wù)器,想讓樹(shù)莓派上面的東西外網(wǎng)可以訪(fǎng)問(wèn)(博客也是部署在樹(shù)莓派上面的),所以就有了 frp 內網(wǎng)穿透這一說(shuō)法。

frps

首先需要一臺遠程服務(wù)器,我選擇的是阿里云的服務(wù)器,最開(kāi)始選擇的國外的 vultr,后來(lái)試了下 hostwind,要么是網(wǎng)速比較慢,要么是丟包比較嚴重,所以放棄了,選擇了阿里云香港區的服務(wù)器,也是可以翻墻,雖然總體算下來(lái)應該比國外的貴一點(diǎn)。但是網(wǎng)速快。而且我選擇的是最便宜的,所以就可以忽略了。哈哈哈

  1. 下載 frp 軟件,地址https://github.com/fatedier/frp/releases 并且解壓到/usr/local/frps 下面
  2. 修改配置,我的配置主要如下:
[common]
bind_port = 7000
vhost_http_port = 8080
vhost_https_port = 4443
bind_udp_port = 7001
admin_port = 7400
admin_user = admin
admin_pwd = admin
max_pool_count = 5
dashboard_port = 7500
dashboard_pwd = admin
max_pool_count = 100
token = 123456
  1. /usr/local/frps 下面執行./frps -c ./frps.ini & 就可以了
  2. 增加定時(shí)任務(wù):*/1 * * * * cd /usr/local/frps && ./frps -c frps.ini &

frpc

  1. 修改配置
[common]
server_addr = aliyun ip
server_port = 7000
token = 123456
pool_count = 100
login_fail_exit = false
use_compression = true
use_encryption = true

[ssh]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port = 6000
custom_domains = ssh.zeekling.cn
use_compression = true
use_encryption = true

[root]
type = http
local_port = 80
custom_domains = zeekling.cn
use_compression = true
use_encryption = true

[www]
type = http
local_port = 80
custom_domains = www.pzrlhr.cn
use_compression = true
use_encryption = true

[blog]
type = http
local_port = 8080
custom_domains = blog.zeekling.cn
use_compression = true
use_encryption = true

[pan]
type = http
local_port = 81
custom_domains = www.zeek-pan.cn
use_compression = true
use_encryption = true
  1. 連接 frps
./frpc -c ./frpc.ini > /tmp/frpc.log 2>&1 &
  1. 監控腳本
frp=`ps -ef | grep frpc | wc -l`
if [ "${frp}" -eq "1" ];then
        cd frp_0.26.0_linux_arm && ./frpc -c ./frpc.ini > /tmp/frpc.log 2>&1 &
fi

frps 和 nginx 都是用 80 端口

nginx 加入如下配置即可

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html;

        index index.html index.htm index.nginx-debian.html;

        server_name _;

        location / {
                proxy_pass http://127.0.0.1:8080; # 本地服務(wù)器地址
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }

        location ~ .(jpg|png|gif|css|js)$ { # 緩存
                proxy_pass http://127.0.0.1:8080; # 本地服務(wù)器地址
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
                proxy_cache cache_one;
                proxy_cache_valid 200 302 1h;
                proxy_cache_valid 301 1d;
                proxy_cache_valid any 1m;
                expires 30d;
                proxy_redirect off;
                add_header wall "hey!guys!give me a star.";
        }
}



標 題:《frp 內網(wǎng)穿透
作 者:zeekling
提 示:轉載請注明文章轉載自個(gè)人博客:浪浪山旁那個(gè)村

    評論
    3 評論
    2021-03-24 12:32 回復?

    如果是80端口的話(huà)就可以去掉了。

    2021-03-22 09:41 回復?

    我直接使用的公網(wǎng)IP,我就在想,使用FRP之后,那后面的端口號是不是可以去掉了!

    1
    2020-11-05 15:32 回復?

    323我??

avatar

取消
日本乱偷中文字幕,美女脱内衣18禁免费看,亚洲国产精品丝袜在线观看,18女人腿打开无遮挡,廖承宇chinese野战做受