恩山无线论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
当贝投影
查看: 239|回复: 3

再次折腾赚钱宝二代 openwrt clash aria2 php7 有道云

  [复制链接]
发表于 2022-5-7 10:49 | 显示全部楼层 |阅读模式
本帖最后由 hbwxszj 于 2022-5-7 10:57 编辑

因为某些需求 再次提及赚钱宝 pro 二代做一个旁路由
旁路由设置方法:
赚钱宝网口插交换机口或者LAN口,其他设备在同级路由下,把设备的网络设置网关和DNS,设置成旁路由的IP即可
sillydanny的基础上更改的,如果看原始的功能更齐全
这里只是发下自己目前在不报错的情况下需要的代码

  1. 2021年了, 大家还记得迅雷赚钱宝吗? 记一次OpenWrt软件安装
  2. https://www.right.com.cn/forum/thread-4126356-1-1.html
复制代码


用到的代码

  1. opkg update #更新库
  2. opkg install nano resize2fs #安装nano编辑器 和扩展软件包
  3. resize2fs  /dev/system #扩展软件包
复制代码


更改openwrt源的快捷步骤
  1. rm -Rf /etc/opkg/distfeeds.conf
  2. nano /etc/opkg/distfeeds.conf
复制代码


更改为clash 所需来的源(这个源来回折腾)
  1. src/gz openwrt_core http://downloads.openwrt.org/releases/19.07.7/targets/at91/sama5/packages
  2. src/gz openwrt_base https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a5_vfpv4/base
  3. src/gz openwrt_freifunk https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/freifunk
  4. src/gz openwrt_luci https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a5_vfpv4/luci
  5. src/gz openwrt_packages https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a5_vfpv4/packages
  6. src/gz openwrt_routing https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a5_vfpv4/routing
  7. src/gz openwrt_telephony https://mirrors.cloud.tencent.com/lede/snapshots/packages/arm_cortex-a5_vfpv4/telephony
复制代码


原始安装源
  1. src/gz openwrt_core http://downloads.openwrt.org/releases/19.07.7/targets/at91/sama5/packages
  2. src/gz openwrt_base http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/base
  3. src/gz openwrt_freifunk http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/freifunk
  4. src/gz openwrt_luci http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/luci
  5. src/gz openwrt_packages http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/packages
  6. src/gz openwrt_routing http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/routing
  7. src/gz openwrt_telephony http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/telephony
复制代码



或者替换为官方源
  1. src/gz openwrt_core https://archive.openwrt.org/releases/19.07.7/targets/at91/sama5/packages
  2. src/gz openwrt_base https://archive.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/base
  3. src/gz openwrt_freifunk https://archive.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/freifunk
  4. src/gz openwrt_luci https://archive.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/luci
  5. src/gz openwrt_packages https://archive.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/packages
  6. src/gz openwrt_routing https://archive.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/routing
  7. src/gz openwrt_telephony https://archive.openwrt.org/releases/19.07.7/packages/arm_cortex-a5_vfpv4/telephony
复制代码


阿里源
  1. src/gz openwrt_core https://mirrors.aliyun.com/openwrt/releases/19.07.7/targets/at91/sama5/packages
  2. src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/base
  3. src/gz openwrt_freifunk https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/freifunk
  4. src/gz openwrt_luci https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/luci
  5. src/gz openwrt_packages https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/packages
  6. src/gz openwrt_routing https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/routing
  7. src/gz openwrt_telephony https://mirrors.aliyun.com/openwrt/releases/19.07.7/packages/arm_cortex-a5_vfpv4/telephony
复制代码


如果出现无法访问浏览器后天
解决方法:打开SSH工具连接路由器,输入以下命令:
  1. echo "nameserver 114.114.114.114">/tmp/resolv.conf
  2. rm -f /var/lock/opkg.lock
  3. opkg update
复制代码


中文界面:
  1. opkg install luci-i18n-base-zh-cn luci-ssl-openssl  #安装中文界面和下载https文件的依赖
复制代码


1.安装openclash 目前试了2个版本 都可以用,到后面都需要升级
0.45.12依赖

安装依赖(某些依赖装不上,比如ip-full,我就放弃了)
  1. opkg update && opkg install luci luci-base iptables dnsmasq-full coreutils coreutils-nohup bash curl ca-certificates ipset ip-full iptables-mod-tproxy iptables-mod-extra libcap libcap-bin ruby ruby-yaml kmod-tun luci-compat ip6tables-mod-nat kmod-inet-diag luciopkg luci-baseopkg iptablesopkg dnsmasq-fullopkg coreutilsopkg coreutils-nohupopkg bashopkg  curlopkg jsonfilteropkg ca-certificatesopkg ipsetopkg ip-fullopkg iptables-mod-tproxyopkg kmod-tunopkg
复制代码


或者安装openclash 0.42.05 依赖
  1. opkg install coreutils-nohup bash iptables dnsmasq-full curl jsonfilter ca-certificates ipset ip-full iptables-mod-tproxy iptables-mod-extra libcap libcap-bin ruby ruby-yaml
复制代码


下载openclash 0.42.05 包
  1. wget --no-check-certificate https://github.com/vernesong/OpenClash/releases/download/v0.42.07-beta/luci-app-openclash_0.42.07-beta_all.ipk
  2. opkg --nodeps install luci-app-openclash_0.42.05-beta_all.ipk
复制代码
或者下载0.45.12 包

  1. wget --no-check-certificate https://github.com/vernesong/OpenClash/releases/download/v0.45.12-beta/luci-app-openclash_0.45.12-beta_all.ipk
复制代码


安装
  1. opkg install luci-app-openclash_0.45.12-beta_all.ipk
复制代码
or
  1. opkg install luci-app-openclash_0.42.07-beta_all.ipk
复制代码


下载 Clash内核
  1. wget --no-check-certificate <span style="color: rgb(102, 102, 102); font-family: Monaco, Consolas, &quot;Lucida Console&quot;, &quot;Courier New&quot;, serif; font-size: 12px;">https://github.com/vernesong/OpenClash/releases/download/Clash/clash-linux-armv7.tar.gz</span>
复制代码


解压到 /etc/openclash/core/文件夹
  1. tar xzf clash-linux-armv7.tar.gz
  2. mv clash /etc/openclash/core
  3. ll /etc/openclash/core/
复制代码
到这一步 openclash就已经安装好了,剩下的就等配置config信息了

2.安装挂载点,安装aria2
  1. opkg install block-mount aria2 webui-aria2 luci-app-aria2 luci-i18n-aria2-zh-cn
  2. opkg install samba4-server luci-app-samba4 luci-i18n-samba-zh-cn
复制代码

安装mysql
  1. opkg install libpthread libncurses libreadline mysql-server
复制代码

安装 php7 并且使用 可道云
1.安装运行环境
复制下面在SSH里执行:
  1. opkg update
  2. opkg install php7 php7-mod-session php7-cgi php7-mod-ctype php7-mod-hash php7-mod-pdo php7-mod-json php7-mod-curl php7-fastcgi  php7-mod-mbstring php7-mod-ldap php7-mod-gd php7-mod-pdo php7-mod-xml php7-mod-iconv unzip zoneinfo-asia zoneinfo-core
复制代码

Ssh
2.可道云下载
手动下载地址:https://kodcloud.com/download
或者用SSH安装命令(/mnt/sdb1根据挂载盘路径进行更改):
  1. dir="/mnt/sda1"
  2. mkdir -p $dir/www
  3. mkdir -p $dir/tmp
  4. cd $dir/www
  5. wget http://static.kodcloud.com/update/download/kodexplorer4.40.zip
  6. unzip kodexplorer4.40.zip
复制代码

Ssh
3.php配置
更改/etc/php.ini文件内容如下:
  1. [PHP]
  2. zend.ze1_compatibility_mode = Off
  3. engine = On
  4. short_open_tag = On
  5. precision    =  12
  6. y2k_compliance = On
  7. output_buffering = Off
  8. zlib.output_compression = Off
  9. implicit_flush = Off
  10. unserialize_callback_func =
  11. serialize_precision = 100
  12. open_basedir = /mnt/sda1/:/tmp/:/proc/
  13. disable_functions =
  14. disable_classes =
  15. expose_php = On
  16. max_execution_time = 30    ; Maximum execution time of each script, in seconds.
  17. max_input_time = 60    ; Maximum amount of time each script may spend parsing request data.
  18. memory_limit = 20M    ; Maximum amount of memory a script may consume.
  19. error_reporting  =  E_ALL & ~E_NOTICE & ~E_STRICT
  20. display_errors = On
  21. display_startup_errors = Off
  22. log_errors = On
  23. log_errors_max_len = 1024
  24. ignore_repeated_errors = Off
  25. ignore_repeated_source = Off
  26. report_memleaks = On
  27. track_errors = Off
  28. variables_order = "EGPCS"
  29. request_order = "GP"
  30. register_globals = Off
  31. register_long_arrays = Off
  32. register_argc_argv = On
  33. auto_globals_jit = On
  34. post_max_size = 8M
  35. magic_quotes_runtime = Off
  36. magic_quotes_sybase = Off
  37. auto_prepend_file =
  38. auto_append_file =
  39. default_mimetype = "text/html"
  40. doc_root =
  41. user_dir =
  42. extension_dir = "/usr/lib/php"
  43. enable_dl = On
  44. cgi.force_redirect = 0
  45. file_uploads = On
  46. upload_tmp_dir = "/mnt/sda1/tmp"
  47. upload_max_filesize = 20000M
  48. max_file_uploads = 20
  49. allow_url_fopen = On
  50. allow_url_include = Off
  51. default_socket_timeout = 60
复制代码

Ini
以上挂载盘路径是/mnt/sda1
更改请用专业编辑工具进行替换
替换/mnt/sda1为你的挂载盘路径
4.uHTTPd配置
(如果没有安装uHTTPd,请自行百度安装)
位置/etc/config
找到uhttpd并打开
在最后面添加
  1. config uhttpd 'web'
  2. list listen_http '0.0.0.0:81'
  3. option home '/mnt/sda1/www'
  4. option tcp_keepalive '1'
  5. list index_page 'index.php'
  6. list index_page 'index.html'
  7. list index_page 'index.htm'
  8. option rfc1918_filter '0'
  9. option redirect_https '0'
  10. list interpreter '.php=/usr/bin/php-cgi'
  11. list interpreter '.cgi=/usr/bin/perl'
复制代码

以上
list listen_http '0.0.0.0:81'的81是端口
option home '/mnt/sda1/www'的/mnt/sda1/www是挂载盘可道云路径
在服务-uHTTPd里也可以自己更改,不过不要改MAIN这一项,要不然你就访问不了路由界面了
uHTTPd文件我已附带,也可以直接上传到/etc/config文件夹里
5.重启服务
  1. /etc/init.d/uhttpd restart
  2. /etc/init.d/php7-fastcgi restart
复制代码

Ssh
6.进入可道云
地址:http://路由IP:端口
没公网IP的尝试内网穿透吧
安装 filebrower
  1. opkg update && opkg upgrade wget && opkg install ca-certificates
  2. wget https://github.com/filebrowser/filebrowser/releases/download/v2.21.1/linux-armv7-filebrowser.tar.gz
  3. chmod 777 linux-armv7-filebrowser.tar.gz
  4. tar xzf linux-armv7-filebrowser.tar.gz
  5. mv filebrowser /usr/bin/
  6. filebrowser -a 0.0.0.0 -p 8080 -r /
复制代码


我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-5-11 14:10 | 显示全部楼层
谢谢楼主分享,可道云使用的时候,这个赚钱宝需要联网吗?比如使用里面的word啊,excel啊。。。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-5-12 21:45 | 显示全部楼层
学习了,谢谢!
我的恩山、我的无线 The best wifi forum is right here.
发表于 2022-5-17 09:16 | 显示全部楼层
1代我刷成1-19了,想刷回1-18可以吗?我的电脑然后就识别不了。。。
我的恩山、我的无线 The best wifi forum is right here.
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2022-5-17 11:26

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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