通過frp配置aria2外網(wǎng)訪問

在前一篇文章中,我們搭建了通過外網(wǎng)域名訪問內(nèi)網(wǎng)路由器后臺(tái)的功能,其實(shí)在此基礎(chǔ)上,可以很容易的搭建aria2遠(yuǎn)程下載功能。

前提

搭建好了aria2內(nèi)網(wǎng)下載環(huán)境

實(shí)現(xiàn)

我們搭建好aria2內(nèi)網(wǎng)下載環(huán)境后,會(huì)發(fā)現(xiàn),aria2的配置信息,是通過6800端口的jsonrpc路由進(jìn)行提供的,我們要做的就是把這一接口暴露出去。
還是使用frp來完成任務(wù)
frpc客戶端配置,我們?cè)趂rpc.ini中增加下面的配置
<pre>
[aria2_rpc]
privilege_mode = true
type = http
local_ip = 127.0.0.1
local_port = 6800
use_gzip = true

connections will be established in advance, default value is zero

pool_count = 20

http username and password are safety certification for http protocol

if not set, you can access this custom_domains without certification

http_user = admin

http_pwd = admin

if domain for frps is frps.com, then you can access [web01] proxy by URL http://test.frps.com

subdomain = aria2
</pre>
nginx配置
<pre>
server {
listen 80 ;
listen [::]:80 ;
server_name aria2.xxx.com;

# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;

location / {
    proxy_pass http://127.0.0.1:8081;
    proxy_set_header   Host    $host;
    proxy_set_header   X-Real-IP   $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
}

}
</pre>
此時(shí)我們?cè)L問aria2.xxx.com/jsonrpc,就相當(dāng)于訪問了localhost:6800/jsonrpc
此時(shí)我們把a(bǔ)ria2.xxx.com/jsonrpc填到隨便一個(gè)在線的aria2管理器,都可以遠(yuǎn)程管理下載了。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容