LAN 到 WAN是通过NAT实现的。
如果要互通,关闭NAT,再添加路由即可
如果要互通,关闭NAT,再添加路由即可
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuote from: Polane on March 22, 2021, 06:16:31 AM这也能插小广告我也是服了
不明觉厉,看群主写的,代码一溜一溜的,看的脑瓜大。 :'(
如是我的话,想要科学上网那就直接找一些好用的软件来用,不懂的就直接去问软件的客服了。 :o
external-controller: 0.0.0.0:9090
external-ui: ./ui
vi /usr/local/etc/rc.d/clash #建立服务配置文件
chmod +x /usr/local/etc/rc.d/clash #给刚才建立服务配置文件添加执行权限
#!/bin/sh
# $FreeBSD$
# PROVIDE: clash
# REQUIRE: LOGIN cleanvar
# KEYWORD: shutdown
# Add the following lines to /etc/rc.conf to enable clash:
# clash_enable (bool): Set to "NO" by default.
# Set to "YES" to enable clash.
# clash_config (path): Clash config dir.
# Defaults to "/usr/local/etc/clash"
. /etc/rc.subr
name="clash"
rcvar=clash_enable
load_rc_config $name
: ${clash_enable:="NO"}
: ${clash_config="/usr/local/etc/clash"}
command="/usr/local/bin/clash"
#pidfile="/var/run/clash.pid"
required_files="${clash_config}"
command_args="-d $clash_config"
run_rc_command "$1"
vi /usr/local/opnsense/service/conf/actions.d/actions_clash.conf
service configd restart #使刚才的文件生效
[start]
command:/usr/local/etc/rc.d/clash onestart
type:script
message:starting clash
[stop]
command:/usr/local/etc/rc.d/clash stop
type:script
message:stoping clash
[status]
command:/usr/local/etc/rc.d/clash statusexit 0
type:script_output
message:get clash status
[restart]
command:/usr/local/etc/rc.d/clash onerestart
type:script
message:restarting clash