Skip to content

Commit

Permalink
Update 1_naive_Caddyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
lxhao61 authored Jul 14, 2021
1 parent 27fe23b commit 815642f
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions v2ray(F+B)+naiveproxy/1_naive_Caddyfile
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
order forward_proxy before map
admin off
log { #注意:版本不小于v2.4.0才支持日志全局配置,否则各自配置。
output file /var/log/caddy/access.log
level ERROR
}
auto_https off #禁用自动https
servers 127.0.0.1:88 { #与下边端口监听对应
protocol {
allow_h2c #开启h2c server支持
}
}
order forward_proxy before map
admin off
log { #注意:版本不小于v2.4.0才支持日志全局配置,否则各自配置。
output file /var/log/caddy/access.log
level ERROR
}
auto_https off #禁用自动https
servers 127.0.0.1:88 { #与下边端口监听对应
protocol {
allow_h2c #开启h2c server支持
}
}
}

:80 { #http默认监听端口
redir https://{host}{uri} permanent #http自动跳转https,让网站看起来更真实。
redir https://{host}{uri} permanent #http自动跳转https,让网站看起来更真实。
}

:88 { #监听端口,仅接收web回落。
bind 127.0.0.1 #只监听本机,避免本机外的机器探测到上面端口。
bind 127.0.0.1 #只监听本机,避免本机外的机器探测到上面端口。

forward_proxy {
basic_auth user pass #naiveproxy用户与密码,更改为自己的。
hide_ip
hide_via
probe_resistance
}
forward_proxy {
basic_auth user pass #naiveproxy用户与密码,更改为自己的。
hide_ip
hide_via
probe_resistance
}

@host {
host xx.yy #限定域名访问(禁止以ip方式访问网站),更改为自己的域名。
}
route @host {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" #启用HSTS
}
file_server {
root /var/www/html #更改为自己存放的web文件路径
}
}
@host {
host xx.yy #限定域名访问(禁止以ip方式访问网站),更改为自己的域名。
}
route @host {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" #启用HSTS
}
file_server {
root /var/www/html #更改为自己存放的web文件路径
}
}
}

0 comments on commit 815642f

Please sign in to comment.