Lede frp 구성 로깅

3667 단어 frp
흐름 흐름:Frps ip(160.10.168.112 ) -->Lede (frpc 192.168.0.1) -->web (192.168.0.8 )
frps 외부 네트워크 서버 버전:`Distributor ID: DebianDescription: Debian GNU/Linux 9.11 (stretch) 릴리스: 9.11Codename: stretch'wget https://github.com/fatedier/frp/releases/download/v0.33.0/frp_0.33.0_linux_amd64.tar.gz
lede 플로피 업데이트frp: (적당한 버전으로 바꿀 수 있음)`wgethttps://github.com/fatedier/f... .tar.gztar -xzvf frp_0.33.0_linux_amd64.tar.gzrm -rf/koolshare/frpc/frpccp/root/frp_0.33.0_linux_amd64/koolshare/frpc/chmod+x/koolshare/frpc/frpc`debian 시작 항목 편집/etc/init.d/frp.sh `chmod +x/etc/init.d/frp.shupdate-rc.d frp.sh defaults`
#!/bin/bash
### BEGIN INIT INFO
# Provides:          frp
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start:        2 3 4 5
# Default-Stop:         0 1 6
# Short-Description: frp
# Description: frp
### END INIT INFO

frpPath="/root/frp_0.33.0_linux_amd64 "
cd "$frpPath";
screen_name="frp"
cmd="${frpPath}/frps -c frps.ini";

screen -dmS $screen_name
screen -x -S $screen_name -p 0 -X stuff "$cmd";
screen -x -S $screen_name -p 0 -X stuff '
';

주의:frp 프로필에 중국어가 없는 것이 가장 좋습니다. 한 번은frpc의 서비스가 어떻게 시작되지 않았는지 기억합니다. 오랫동안 원인을 찾지 못했지만 나중에 프로필에 있는 중국어를 삭제하면 문제가 해결됩니다.
frps 프로필:
# [common] is integral section
[common]
# A literal address or host name for IPv6 must be enclosed
# in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80"
bind_addr = 0.0.0.0
bind_port = 22
# udp port used for kcp protocol, it can be same with 'bind_port'
# if not set, kcp is disabled in frps
#kcp_bind_port = 5443
kcp_bind_port = 22
# if you want to configure or reload frps by dashboard, dashboard_port must be set
dashboard_port = 6443
# dashboard assets directory(only for debug mode)
dashboard_user = admin
dashboard_pwd = dashboard_pwd
# assets_dir = ./static
vhost_http_port = 80
vhost_https_port = 443
# console or real logFile path like ./frps.log
log_file = ./frps.log
# debug, info, warn, error
log_level = info
log_max_days = 3
# auth token
token = serverPasswd
# only allow frpc to bind ports you list, if you set nothing, there won't be any limit
#allow_ports = 1-65535
# pool_count in each proxy will change to max_pool_count if they exceed the maximum value
max_pool_count = 50
# if tcp stream multiplexing is used, default is true
tcp_mux = true

frps 외부 네트워크 ip: 160.10.168.112 웹 서버: 192.168.0.8token = serverPasswd
frpc 구성 파일:
[common]

server_addr = 160.10.168.112
server_port = 22



# connections will be established in advance

pool_count = 5



# use tcp stream multiplexing

tcp_mux = true



# user name

#user = RaspberryPi

token = serverPasswd



log_file = ./frpc.log

log_level = info

log_max_days = 30



[web-80]

type = http

local_ip = 192.168.0.8

local_port = 80

remote_port = 80

custom_domains = *.domain1.com,*.domain3.com,*.domain2.com,domain1.com,domain3.com,domain2.com,160.10.168.112

use_encryption = true

use_compression = true





[web-443]

type = https

local_ip = 192.168.0.8

local_port = 443

remote_port = 443

custom_domains = *.domain1.com,*.domain3.com,*.domain2.com,domain1.com,domain3.com,domain2.com,160.10.168.112

use_encryption = true

use_compression = true

참고:
frps의 외부 네트워크 IP를custom_domains에서 이렇게 하면 외부 네트워크 IP에 직접 접근하면frp의 기본 페이지가 나타나지 않습니다.

좋은 웹페이지 즐겨찾기