找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 25770|回复: 49

K3梅林固件在打开JFFS分区后安装KP广告过滤

[复制链接]
发表于 2017-8-18 14:29 | 显示全部楼层 |阅读模式
本帖最后由 qqlikens 于 2017-8-18 18:40 编辑

--------------------------------------------------------------
似乎不安装Entware  jffs里无法加载开机启动脚本
这就很尴尬了,无法随开机启动,只能手动启动
嗯 有待研究  ,先凑活用吧
--------------------------------------------------------------
启动脚本来源于:
https://www.right.com.cn/forum/thread-212725-1-1.html
tianbaoha 编写,本人只是简单修改让其可用,所有权归tianbaoha所有。
如果我侵犯了您的权利,请私信或在本贴内告知我,我将会删除相关侵权内容,谢谢!
---------------------------------------------------------------------------------------
废话不多说
第一步,打开你的JFFS分区,打开SSH,怎么开自己看我帖子或者搜索。
第二步,把我上传的文件丢到JFFS文件夹里
第三步,在SSH里执行命令运行脚本,运行KP,重启后失效,需要手动输入命令来再次开启。
-----------------------------------------------------------------------------------------
脚本和KP下载地址:
链接: https://pan.baidu.com/s/1cewtOy 密码: fvm6
下载完直接丢进JFFS里
-------------------------------------------------------------------------------------------
在SSH里输入命令:
sh /jffs/koolproxy/start.sh start
即可开启KP,如何验证开启成功?在浏览器输入110.110.110.110,可以下载证书就是开启了
其他命令输入sh /jffs/koolproxy/start.sh 会在SSH里显示出来
这个脚本默认打开了HTTPS过滤,所以不安装证书HTTPS的网站打不开,这个锅我不背
不想用HTTPS的自己编辑文件夹里的Start.sh脚本 在前几行里有一个HTTPS=1 自己改成0
----------------------------------------------------------------------------------------------
我去银行办业务啦~

评分

参与人数 5恩山币 +7 收起 理由
lirang + 1 不错,支持下
红狼8009 + 3 我来恩山就是为了看你!
bubuchao + 1 支付宝已转500w给你!
70ff + 1 支付宝已转500w给你!
icrt2008 + 1 支付宝已转500w给你!

查看全部评分

我的恩山、我的无线 The best wifi forum is right here.
发表于 2017-8-18 14:37 | 显示全部楼层
怎么添加随机启动脚本呢
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 14:37 | 显示全部楼层
本帖最后由 我妻亚衣 于 2017-8-18 14:42 编辑

顶顶顶顶顶顶顶顶顶顶顶   回去就搞   不知道这个对开机启动有没有用http://koolshare.cn/thread-105955-1-1.html
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 14:55 | 显示全部楼层
那就永远不重启路由器。如果你能搞定开机启动,我就服你!!
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 14:55 | 显示全部楼层
就是说这个不需要Entware是吗

点评

不需要 kp不依赖这个  详情 回复 发表于 2017-8-18 15:10
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 15:09 | 显示全部楼层
梅林的启动脚本设置大全:
** User scripts **
These are shell scripts that you can create, and which will be run when
certain events occur.  Those scripts must be saved in /jffs/scripts/ ,
so, JFFS must be enabled, as well as the option to use custom
scripts and configs.  This can be configured under Administration -> System.
Available scripts:

* ddns-start: Script called at the end of a DDNS update process.
               This script is also called when setting the DDNS type
               to "Custom".  The script gets passed the WAN IP as
               an argument.
               When handling a "Custom" DDNS, this script is also
               responsible for reporting the success or failure
               of the update process.  See the Custom DDNS section
               below for more information.
* dhcpc-event: Called whenever a DHCP event occurs on the WAN
                interface.  The type of event (bound, release, etc...)
                is passed as an argument.
* firewall-start: Firewall is started (filter rules have been applied)
                   The WAN interface will be passed as argument (for
                   example. "eth0")
* init-start: Right after jffs is mounted, before any of the services
               get started
* nat-start: nat rules (i.e. port forwards and such) have been applied
              (nat table)
* openvirtual**-event: Called whenever an Openvirtual** server gets
                  started/stopped, or an Openvirtual** client connects to a
                  remote server.  Uses the same syntax/parameters as
                  the "up" and "down" scripts in Openvirtual**.
* post-mount: Just after a partition is mounted
* pre-mount: Just before a partition is mounted.  Be careful with
              this script.  This is run in a blocking call and will
              block the mounting of the partition  for which it is
              invoked till its execution is complete. This is done so  
              that it can be used for things like running e2fsck on the
              partition before mounting. This script is also passed the
              device path being mounted as an argument which can be
              used in the script using $1.
* qos-start: Called after both the iptables rules and tc configuration
              are completed for QoS.  This script will be passed an
              argument, which will be "init" (when QoS is being
              initialized and it has setup the tc classes) or
              "rules" (when the iptables rules are being setup).
* services-start: Initial service start at boot
* services-stop: Services are stopped at shutdown/reboot
* unmount: Just before unmounting a partition.  This is a blocking
            script, so be careful with it.  The mount point is passed
            as an argument to the script.
* wan-start: WAN interface just came up (includes if it went down and
              back up).  The WAN unit number will be passed as argument
              (0 = primary WAN)

Don't forget to set them as executable:

   chmod a+rx /jffs/scripts/*

And like any Linux script, they need to start with a shebang:

   #!/bin/sh

点评

这个我试了,不安装en似乎不会加载脚本的样子  详情 回复 发表于 2017-8-18 15:10
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2017-8-18 15:10 来自手机 | 显示全部楼层
鼎剑阁 发表于 2017-8-18 14:55
就是说这个不需要Entware是吗

不需要 kp不依赖这个
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2017-8-18 15:10 来自手机 | 显示全部楼层
70ff 发表于 2017-8-18 15:09
梅林的启动脚本设置大全:
** User scripts **
These are shell scripts that you can create, and which ...

这个我试了,不安装en似乎不会加载脚本的样子

点评

不用了直接把这个文件夹删了就行了吗  详情 回复 发表于 2017-8-18 15:55
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 15:42 来自手机 | 显示全部楼层
不急不急,估计很快就有软件中心了

支持一下楼主
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 15:55 | 显示全部楼层
qqlikens 发表于 2017-8-18 15:10
这个我试了,不安装en似乎不会加载脚本的样子

不用了直接把这个文件夹删了就行了吗
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 15:57 | 显示全部楼层
有问题,加载以后会导致很奇怪的问题:cmd可以ping通网站,但是浏览器却打不开,用代理才能打开网站,已经连接的游戏一直连着,可是新的却不行

点评

脚本默认打开HTTPS了,自己关掉就好了。  详情 回复 发表于 2017-8-18 18:39
同这样,不折腾了,既然梅林都搞出来了,再等等吧  详情 回复 发表于 2017-8-18 16:39
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 16:39 | 显示全部楼层
鼎剑阁 发表于 2017-8-18 15:57
有问题,加载以后会导致很奇怪的问题:cmd可以ping通网站,但是浏览器却打不开,用代理才能打开网站,已经 ...

同这样,不折腾了,既然梅林都搞出来了,再等等吧
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 17:14 | 显示全部楼层
爱国怎么装上去????
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-8-18 18:13 | 显示全部楼层
本帖最后由 校友(梨) 于 2017-8-20 21:41 编辑

在/jffs/scripts文件夹中再写一个可执行的脚本KP可以实现随路由器启动

vi /jffs/scripts/wan-start
内容
#!/bin/sh
sleep 5
sh /jffs/koolproxy/start.sh start

------
cd /jffs/scripts
chmod + x wan-start
chmod a+rx /jffs/scripts/*

重启后能看到KP启动了

不过有个问题,虽然启动了KP,我进110.110.110.110没法下载证书。不知何故?
注:后来又发现是火绒安全软件拦截证书下载。。貌似没有问题。还希望大家试用后反馈。




点评

真是邪门了 我怎么写都不能启动,搞得我都怀疑人生了。  详情 回复 发表于 2017-8-18 18:38
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2017-8-18 18:38 | 显示全部楼层
校友(梨) 发表于 2017-8-18 18:13
在/jffs/scripts文件夹中再写一个可执行的脚本KP可以实现随路由器启动

vi /jffs/scripts/wan-start

真是邪门了 我怎么写都不能启动,搞得我都怀疑人生了。而且我可以下载证书。

点评

我虽然能随机器启动你的脚本,但加了我的脚本不能下载证书,单独启动你的KP可以下载证书。估计是我把脚本名字定为wan-start不妥。我还没搞懂那些特定的nat-start.qos-start..究竟可以用哪个名字。  详情 回复 发表于 2017-8-18 18:44
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 21:37

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表