external-controller: 0.0.0.0:9090external-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.subrname="clash"rcvar=clash_enableload_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.confservice configd restart #使刚才的文件生效
[start]command:/usr/local/etc/rc.d/clash onestarttype:scriptmessage:starting clash[stop]command:/usr/local/etc/rc.d/clash stoptype:scriptmessage:stoping clash[status]command:/usr/local/etc/rc.d/clash statusexit 0type:script_outputmessage:get clash status[restart]command:/usr/local/etc/rc.d/clash onerestarttype:scriptmessage:restarting clash
不明觉厉,看群主写的,代码一溜一溜的,看的脑瓜大。 如是我的话,想要科学上网那就直接找一些好用的软件来用,不懂的就直接去问软件的客服了。