├── .gitignore ├── LICENSE ├── README.md ├── aliddns ├── aliddns.tar.gz ├── aliddns │ ├── install.sh │ ├── res │ │ ├── icon-aliddns-bg.png │ │ └── icon-aliddns.png │ ├── scripts │ │ ├── aliddns_config.sh │ │ └── aliddns_update.sh │ └── webs │ │ └── Module_aliddns.asp ├── build.sh ├── config.json.js └── version ├── ddnsto ├── Changelog.txt ├── backup.sh ├── build.sh ├── config.json.js ├── ddnsto.tar.gz ├── ddnsto │ ├── bin │ │ └── ddnsto │ ├── install.sh │ ├── res │ │ ├── icon-ddnsto-bg.png │ │ └── icon-ddnsto.png │ ├── scripts │ │ ├── ddnsto_config.sh │ │ └── ddnsto_status.sh │ ├── uninstall.sh │ └── webs │ │ └── Module_ddnsto.asp ├── history │ ├── 1.0 │ │ └── ddnsto.tar.gz │ ├── 1.1 │ │ └── ddnsto.tar.gz │ ├── 1.2 │ │ └── ddnsto.tar.gz │ ├── 1.3 │ │ └── ddnsto.tar.gz │ ├── 1.4 │ │ └── ddnsto.tar.gz │ ├── 1.5 │ │ └── ddnsto.tar.gz │ ├── 1.6 │ │ └── ddnsto.tar.gz │ ├── 1.7 │ │ └── ddnsto.tar.gz │ ├── 1.8 │ │ └── ddnsto.tar.gz │ └── version └── version ├── index.html ├── kms ├── backup.sh ├── build.py ├── config.json.js ├── history │ ├── 1.3 │ │ └── kms.tar.gz │ └── version ├── kms.tar.gz └── kms │ ├── bin │ └── vlmcsd │ ├── install.sh │ ├── res │ ├── icon-kms-bg.png │ └── icon-kms.png │ ├── scripts │ └── kms.sh │ ├── uninstall.sh │ └── webs │ └── Module_kms.asp ├── ngrok └── ngrok │ ├── bin │ └── ngrok │ ├── install.sh │ ├── res │ ├── icon-ngrok-bg.png │ └── icon-ngrok.png │ ├── scripts │ └── ngrok_config.sh │ └── webs │ └── Module_ngrok.asp ├── shadowsocks ├── Changelog.txt ├── backup.sh ├── build.py ├── config.json.js ├── history │ ├── 1.0.1 │ │ └── shadowsocks.tar.gz │ ├── 1.0.2 │ │ └── shadowsocks.tar.gz │ ├── 1.0.3 │ │ └── shadowsocks.tar.gz │ ├── 1.0.4 │ │ └── shadowsocks.tar.gz │ ├── 1.0.5 │ │ └── shadowsocks.tar.gz │ ├── 1.0.6 │ │ └── shadowsocks.tar.gz │ ├── 1.0.7 │ │ └── shadowsocks.tar.gz │ ├── 1.0.8 │ │ └── shadowsocks.tar.gz │ ├── 1.0.9 │ │ └── shadowsocks.tar.gz │ ├── 1.1.0 │ │ └── shadowsocks.tar.gz │ ├── 1.1.1 │ │ └── shadowsocks.tar.gz │ ├── 1.1.2 │ │ └── shadowsocks.tar.gz │ ├── 1.1.3 │ │ └── shadowsocks.tar.gz │ ├── 1.1.4 │ │ └── shadowsocks.tar.gz │ ├── 1.1.5 │ │ └── shadowsocks.tar.gz │ ├── 1.1.6 │ │ └── shadowsocks.tar.gz │ ├── 1.1.7 │ │ └── shadowsocks.tar.gz │ ├── 1.1.8 │ │ └── shadowsocks.tar.gz │ ├── 1.1.9 │ │ └── shadowsocks.tar.gz │ ├── 1.2.0 │ │ └── shadowsocks.tar.gz │ ├── 1.2.1 │ │ └── shadowsocks.tar.gz │ ├── 1.2.2 │ │ └── shadowsocks.tar.gz │ ├── 1.2.3 │ │ └── shadowsocks.tar.gz │ ├── 1.2.4 │ │ └── shadowsocks.tar.gz │ ├── 1.2.5 │ │ └── shadowsocks.tar.gz │ ├── 1.2.6 │ │ └── shadowsocks.tar.gz │ ├── 1.2.7 │ │ └── shadowsocks.tar.gz │ └── version ├── shadowsocks.tar.gz ├── shadowsocks │ ├── bin │ │ ├── Pcap_DNSProxy │ │ ├── chinadns │ │ ├── dns2socks │ │ ├── dnscrypt-proxy │ │ ├── pdnsd │ │ ├── resolveip │ │ ├── rss-local │ │ ├── rss-redir │ │ ├── rss-tunnel │ │ ├── ss-local │ │ ├── ss-redir │ │ └── ss-tunnel │ ├── install.sh │ ├── res │ │ ├── icon-shadowsocks-bg.png │ │ └── icon-shadowsocks.png │ ├── scripts │ │ ├── pcap_update_list.sh │ │ ├── ss_conf.sh │ │ ├── ss_config.sh │ │ ├── ss_getarp.sh │ │ ├── ss_rule_update.sh │ │ └── ss_status.sh │ ├── ss │ │ ├── dns │ │ │ ├── Config.ini │ │ │ ├── Hosts.ini │ │ │ ├── IPFilter.ini │ │ │ ├── Routing.txt │ │ │ ├── WhiteList.txt │ │ │ └── dns.sh │ │ ├── rules │ │ │ ├── cdn.txt │ │ │ ├── chnroute.txt │ │ │ ├── dnscrypt-resolvers.csv │ │ │ ├── gfwlist.conf │ │ │ ├── output.conf │ │ │ └── version │ │ ├── start.sh │ │ └── version │ ├── uninstall.sh │ └── webs │ │ └── Module_shadowsocks.asp └── version ├── shellinabox ├── Changelog.txt ├── build.sh ├── config.json.js ├── shellinabox.tar.gz ├── shellinabox │ ├── install.sh │ ├── res │ │ ├── icon-shellinabox-bg.png │ │ └── icon-shellinabox.png │ ├── shellinabox │ │ ├── shellinabox_start.sh │ │ ├── shellinaboxd │ │ └── white-on-black.css │ ├── uninstall.sh │ └── webs │ │ └── Module_shellinabox.asp └── version ├── softcenter ├── Changelog.txt ├── README.md ├── app.json.js ├── app.template.json.js ├── build.sh ├── build_base.sh ├── config.json.js ├── gen_install.py ├── index.html ├── modules.json ├── push_message.json.js ├── softcenter.tar.gz ├── softcenter │ ├── bin │ │ ├── base64_decode │ │ ├── base64_encode │ │ ├── curl │ │ ├── curl-config │ │ ├── dbus │ │ ├── helper.sh │ │ ├── httpdb │ │ ├── koolbox │ │ ├── ks-nat-start.sh │ │ ├── ks-wan-start.sh │ │ ├── ks-wan-stop.sh │ │ ├── kscore.sh │ │ ├── openssl │ │ ├── perpboot │ │ ├── perpctl │ │ ├── perpd │ │ ├── perphup │ │ ├── perpls │ │ ├── perpok │ │ ├── perpstat │ │ ├── plugin.sh │ │ ├── sissylog │ │ ├── skipd │ │ ├── start-stop-daemon │ │ ├── tinylog │ │ ├── versioncmp │ │ └── wget │ ├── install.sh │ ├── module │ │ ├── nf_tproxy_core.ko │ │ ├── xt_TPROXY.ko │ │ └── xt_socket.ko │ ├── others │ │ └── 140 │ │ │ └── tomato.js │ ├── perp │ │ ├── .boot │ │ │ ├── rc.log │ │ │ └── rc.perp │ │ ├── .control │ │ │ └── perpd.pid │ │ ├── httpdb │ │ │ └── rc.main │ │ ├── perp.sh │ │ └── skipd │ │ │ └── rc.main │ ├── res │ │ ├── github.png │ │ ├── icon-aliddns-bg.png │ │ ├── icon-aliddns.png │ │ ├── icon-aria2-bg.png │ │ ├── icon-aria2.png │ │ ├── icon-ddnspod-bg.png │ │ ├── icon-ddnspod.png │ │ ├── icon-ddnsto-bg.png │ │ ├── icon-ddnsto.png │ │ ├── icon-dnspod-bg.png │ │ ├── icon-dnspod.png │ │ ├── icon-frpc-bg.png │ │ ├── icon-frpc.png │ │ ├── icon-gdddns-bg.png │ │ ├── icon-gdddns.png │ │ ├── icon-kms-bg.png │ │ ├── icon-kms.png │ │ ├── icon-kuainiao-bg.png │ │ ├── icon-kuainiao.png │ │ ├── icon-ngrok-bg.png │ │ ├── icon-ngrok.png │ │ ├── icon-phddns-bg.png │ │ ├── icon-phddns.png │ │ ├── icon-shadowsocks-bg.png │ │ ├── icon-shadowsocks.png │ │ ├── icon-shellinabox-bg.png │ │ ├── icon-shellinabox.png │ │ ├── icon-softether_vpn-bg.png │ │ ├── icon-softether_vpn.png │ │ ├── icon-swap-bg.png │ │ ├── icon-swap.png │ │ ├── icon-syncthing-bg.png │ │ ├── icon-syncthing.png │ │ ├── icon-webshell-bg.png │ │ ├── icon-webshell.png │ │ ├── icon-xiaomi-bg.png │ │ ├── icon-xiaomi.png │ │ ├── icon-xunlei-bg.png │ │ └── icon-xunlei.png │ ├── scripts │ │ ├── base.sh │ │ ├── config_sleep.sh │ │ ├── config_ss.sh │ │ ├── dummy_script.sh │ │ ├── ks_app_install.sh │ │ ├── ks_app_remove.sh │ │ ├── ks_tar_install.sh │ │ ├── ks_update_status.sh │ │ └── onssstart.sh │ └── webs │ │ ├── css │ │ └── animate.min.css │ │ ├── soft-center-update.asp │ │ └── soft-center.asp ├── switch_server.json.js ├── sync.py ├── tests │ ├── koolproxy_rules.json.js │ ├── test_app.sh │ ├── test_app_one.sh │ └── test_app_remove.sh ├── ttsoft ├── ttsoft_install.sh └── version ├── softether_vpn ├── Changelog.txt ├── backup.sh ├── build.sh ├── config.json.js ├── history │ ├── 1.0.0 │ │ └── softether_vpn.tar.gz │ ├── 1.0.1 │ │ └── softether_vpn.tar.gz │ └── version ├── softether_vpn.tar.gz ├── softether_vpn │ ├── install.sh │ ├── res │ │ ├── icon-softether_vpn-bg.png │ │ └── icon-softether_vpn.png │ ├── scripts │ │ └── softether_config.sh │ ├── softether │ │ ├── hamcore.se2 │ │ ├── softether.sh │ │ └── vpnserver │ ├── uninstall.sh │ └── webs │ │ └── Module_softether_vpn.asp └── version ├── swap ├── Changelog.txt ├── backup.sh ├── build.sh ├── config.json.js ├── history │ ├── 1.0.0 │ │ └── swap.tar.gz │ ├── 1.0.1 │ │ └── swap.tar.gz │ ├── 1.0.2 │ │ └── swap.tar.gz │ ├── 1.0.3 │ │ └── swap.tar.gz │ ├── 1.0.4 │ │ └── swap.tar.gz │ └── version ├── swap.tar.gz ├── swap │ ├── install.sh │ ├── res │ │ ├── icon-swap-bg.png │ │ └── icon-swap.png │ ├── scripts │ │ ├── swap_config.sh │ │ └── swap_status.sh │ ├── uninstall.sh │ └── webs │ │ └── Module_swap.asp └── version ├── webshell ├── Changelog.txt ├── backup.sh ├── build.sh ├── config.json.js ├── history │ ├── 1.0.0 │ │ └── webshell.tar.gz │ ├── 1.0.1 │ │ └── webshell.tar.gz │ ├── 1.0.2 │ │ └── webshell.tar.gz │ ├── 1.0.3 │ │ └── webshell.tar.gz │ ├── 1.0.4 │ │ └── webshell.tar.gz │ └── version ├── version ├── webshell.tar.gz └── webshell │ ├── bin │ └── webshell │ ├── install.sh │ ├── res │ ├── icon-webshell-bg.png │ └── icon-webshell.png │ ├── scripts │ ├── webshell_config.sh │ └── webshell_svae.sh │ ├── uninstall.sh │ └── webs │ └── Module_webshell.asp └── xiaomi ├── Changelog.txt ├── README.md ├── backup.sh ├── build.sh ├── config.json.js ├── history ├── 1.0.0 │ └── xiaomi.tar.gz ├── 1.0.1 │ └── xiaomi.tar.gz ├── 1.0.2 │ └── xiaomi.tar.gz ├── 1.0.3 │ └── xiaomi.tar.gz ├── 1.0.4 │ └── xiaomi.tar.gz ├── 1.0.5 │ └── xiaomi.tar.gz ├── 1.0.6 │ └── xiaomi.tar.gz ├── 1.0.7 │ └── xiaomi.tar.gz └── version ├── version ├── xiaomi.tar.gz └── xiaomi ├── install.sh ├── res ├── icon-xiaomi-bg.png └── icon-xiaomi.png ├── scripts ├── xiaomi_check.sh ├── xiaomi_config.sh ├── xiaomi_sleep.sh └── xiaomi_status.sh ├── uninstall.sh └── webs └── Module_xiaomi.asp /.gitignore: -------------------------------------------------------------------------------- 1 | softcenter/to_remove.txt 2 | tunnel 3 | .lconfig.json.js 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 koolshare 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ttsoft 2 | 3 | port softcenter of merlin to tomato. 4 | setup the kscore.sh in jffs mounted script 5 | 6 | # 一键安装(仅用于advanced tomato arm机型 Tomato v1.28.0000 -3.4-138 K26ARM USB AIO-64K) 7 | ```shell 8 | eval `/usr/bin/wget -q -O - https://ttsoft.ngrok.wang/softcenter/ttsoft` 9 | ``` 10 | -------------------------------------------------------------------------------- /aliddns/aliddns.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/aliddns/aliddns.tar.gz -------------------------------------------------------------------------------- /aliddns/aliddns/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | rm -rf $KSROOT/scripts/aliddns_* 6 | rm -rf $KSROOT/init.d/S98Aliddns.sh 7 | rm -rf $KSROOT/res/icon-aliddns* 8 | rm -rf $KSROOT/web/Module_aliddns.asp 9 | 10 | cp -r /tmp/aliddns/* $KSROOT/ 11 | chmod a+x $KSROOT/scripts/aliddns_* 12 | 13 | # add icon into softerware center 14 | dbus set softcenter_module_aliddns_install=1 15 | dbus set softcenter_module_aliddns_version=0.4 16 | dbus set softcenter_module_aliddns_description="阿里云解析自动更新IP" 17 | rm -rf $KSROOT/install.sh 18 | -------------------------------------------------------------------------------- /aliddns/aliddns/res/icon-aliddns-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/aliddns/aliddns/res/icon-aliddns-bg.png -------------------------------------------------------------------------------- /aliddns/aliddns/res/icon-aliddns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/aliddns/aliddns/res/icon-aliddns.png -------------------------------------------------------------------------------- /aliddns/aliddns/scripts/aliddns_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export aliddns_` 6 | 7 | start_aliddns(){ 8 | cru d aliddns 9 | cru a aliddns "*/$aliddns_interval * * * * /bin/sh $KSROOT/scripts/aliddns_update.sh" 10 | # run once after submit 11 | sh $KSROOT/scripts/aliddns_update.sh 12 | sleep 1 13 | # creat start_up file 14 | if [ ! -L "$KSROOT/init.d/S98Aliddns.sh" ]; then 15 | ln -sf $KSROOT/scripts/aliddns_config.sh $KSROOT/init.d/S98Aliddns.sh 16 | fi 17 | } 18 | 19 | stop_aliddns(){ 20 | cru d aliddns 21 | dbus set aliddns_last_act="服务未开启" 22 | } 23 | 24 | case $ACTION in 25 | start) 26 | if [ "$aliddns_enable" == "1" ]; then 27 | logger "[软件中心]: 启动ALIDDNS!" 28 | start_aliddns 29 | else 30 | logger "[软件中心]: ALIDDNS未设置开机启动,跳过!" 31 | fi 32 | ;; 33 | stop) 34 | stop_aliddns 35 | ;; 36 | *) 37 | if [ "$aliddns_enable" == "1" ]; then 38 | start_aliddns 39 | http_response '服务已开启!页面将在3秒后刷新' 40 | else 41 | stop_aliddns 42 | http_response '服务已关闭!页面将在3秒后刷新' 43 | fi 44 | ;; 45 | esac 46 | -------------------------------------------------------------------------------- /aliddns/aliddns/scripts/aliddns_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | eval `dbus export aliddns_` 7 | 8 | a_name=`echo $aliddns_domain | cut -d \. -f 1` 9 | a_domain=`echo $aliddns_domain | cut -d \. -f 2`.`echo $aliddns_domain | cut -d \. -f 3` 10 | 11 | if [ "$aliddns_enable" != "1" ]; then 12 | echo "not enable" 13 | exit 14 | fi 15 | 16 | now=`date "+%Y-%m-%d %H:%M:%S"` 17 | 18 | die () { 19 | echo $1 20 | dbus set aliddns_last_act="$now [失败](IP:$1)" 21 | } 22 | 23 | [ "$aliddns_curl" = "" ] && aliddns_curl="1" 24 | [ "$aliddns_dns" = "" ] && aliddns_dns="223.5.5.5" 25 | [ "$aliddns_ttl" = "" ] && aliddns_ttl="600" 26 | 27 | case $aliddns_curl in 28 | "2") 29 | ip=`nvram get wan2_ipaddr` || die "$ip" 30 | ;; 31 | "3") 32 | ip=`nvram get wan3_ipaddr` || die "$ip" 33 | ;; 34 | "4") 35 | ip=`nvram get wan4_ipaddr` || die "$ip" 36 | ;; 37 | *) 38 | ip=`nvram get wan_ipaddr` || die "$ip" 39 | ;; 40 | esac 41 | echo $ip 42 | #support @ record nslookup 43 | if [ "$a_name" = "@" ] 44 | then 45 | current_ip=`nslookup $a_domain $aliddns_dns 2>&1` 46 | else 47 | current_ip=`nslookup $aliddns_domain $aliddns_dns 2>&1` 48 | fi 49 | 50 | if [ "$?" -eq "0" ] 51 | then 52 | current_ip=`echo "$current_ip" | grep 'Address 1' | tail -n1 | awk '{print $3}'` 53 | 54 | if [ "$ip" = "$current_ip" ] 55 | then 56 | echo "skipping" 57 | dbus set aliddns_last_act="$now 域名解析正常,跳过更新" 58 | exit 0 59 | fi 60 | # fix when A record removed by manual dns is always update error 61 | else 62 | unset aliddns_record_id 63 | fi 64 | 65 | 66 | timestamp=`date -u "+%Y-%m-%dT%H%%3A%M%%3A%SZ"` 67 | 68 | urlencode() { 69 | # urlencode 70 | out="" 71 | while read -n1 c 72 | do 73 | case $c in 74 | [a-zA-Z0-9._-]) out="$out$c" ;; 75 | *) out="$out`printf '%%%02X' "'$c"`" ;; 76 | esac 77 | done 78 | echo -n $out 79 | } 80 | 81 | enc() { 82 | echo -n "$1" | urlencode 83 | } 84 | 85 | send_request() { 86 | local args="AccessKeyId=$aliddns_ak&Action=$1&Format=json&$2&Version=2015-01-09" 87 | local hash=$(echo -n "GET&%2F&$(enc "$args")" | openssl dgst -sha1 -hmac "$aliddns_sk&" -binary | openssl base64) 88 | curl -s "http://alidns.aliyuncs.com/?$args&Signature=$(enc "$hash")" 89 | } 90 | 91 | get_recordid() { 92 | grep -Eo '"RecordId":"[0-9]+"' | cut -d':' -f2 | tr -d '"' 93 | } 94 | 95 | query_recordid() { 96 | send_request "DescribeSubDomainRecords" "SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&SubDomain=$a_name1.$a_domain&Timestamp=$timestamp" 97 | } 98 | 99 | update_record() { 100 | send_request "UpdateDomainRecord" "RR=$a_name1&RecordId=$1&SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&TTL=$aliddns_ttl&Timestamp=$timestamp&Type=A&Value=$ip" 101 | } 102 | 103 | add_record() { 104 | send_request "AddDomainRecord&DomainName=$a_domain" "RR=$a_name1&SignatureMethod=HMAC-SHA1&SignatureNonce=$timestamp&SignatureVersion=1.0&TTL=$aliddns_ttl&Timestamp=$timestamp&Type=A&Value=$ip" 105 | } 106 | 107 | #add support */%2A and @/%40 record 108 | case $a_name in 109 | \*) 110 | a_name1=%2A 111 | ;; 112 | \@) 113 | a_name1=%40 114 | ;; 115 | *) 116 | a_name1=$a_name 117 | ;; 118 | esac 119 | 120 | if [ "$aliddns_record_id" = "" ] 121 | then 122 | aliddns_record_id=`query_recordid | get_recordid` 123 | fi 124 | if [ "$aliddns_record_id" = "" ] 125 | then 126 | aliddns_record_id=`add_record | get_recordid` 127 | echo "added record $aliddns_record_id" 128 | else 129 | update_record $aliddns_record_id 130 | echo "updated record $aliddns_record_id" 131 | fi 132 | 133 | # save to file 134 | if [ "$aliddns_record_id" = "" ]; then 135 | # failed 136 | dbus set aliddns_last_act="$now 域名解析失败" 137 | else 138 | dbus set aliddns_last_act="$now 域名解析成功。当前IP:$ip" 139 | fi 140 | -------------------------------------------------------------------------------- /aliddns/aliddns/webs/Module_aliddns.asp: -------------------------------------------------------------------------------- 1 | 软件中心 - Aliddns 2 | 3 | 8 | 81 |
82 |
阿里云DDNS 返回
83 |

84 |
85 |
86 | 100 |
101 |
102 | 103 | 104 | 105 | 106 |
107 | -------------------------------------------------------------------------------- /aliddns/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE=aliddns 4 | VERSION=0.8 5 | TITLE=AliDDNS 6 | DESCRIPTION=阿里云解析自动更新IP 7 | HOME_URL=Module_aliddns.asp 8 | #!/bin/sh 9 | # Check and include base 10 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | if [ "$MODULE" == "" ]; then 12 | echo "module not found" 13 | exit 1 14 | fi 15 | 16 | if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then 17 | echo "install script not found" 18 | exit 2 19 | fi 20 | 21 | # now include build_base.sh 22 | . $DIR/../softcenter/build_base.sh 23 | 24 | # change to module directory 25 | cd $DIR 26 | 27 | # do something here 28 | 29 | do_build_result 30 | -------------------------------------------------------------------------------- /aliddns/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"0.8", 3 | "md5":"a02e8b94dea8769e0c98188a51654928", 4 | "home_url":"Module_aliddns.asp", 5 | "title":"AliDDNS", 6 | "description":"阿里云解析自动更新IP", 7 | "build_date":"2017-04-12_22:56:15" 8 | } 9 | -------------------------------------------------------------------------------- /aliddns/version: -------------------------------------------------------------------------------- 1 | 0.8 2 | a02e8b94dea8769e0c98188a51654928 3 | -------------------------------------------------------------------------------- /ddnsto/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin ddnsto Changelog 2 | =========================================== 3 | 1.8 4 | - Update 替换新版客户端(盲改) 5 | 1.0.0 6 | - add add ddnsto support 7 | -------------------------------------------------------------------------------- /ddnsto/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum ddnsto.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./ddnsto.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./ddnsto.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /ddnsto/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE=ddnsto 4 | VERSION=1.8 5 | TITLE=ddnsto 6 | DESCRIPTION=支持http2协议的快速穿透 7 | HOME_URL=Module_ddnsto.asp 8 | # Check and include base 9 | DIR="$( cd "$( dirname "$BASH_SOURCE[0]" )" && pwd )" 10 | 11 | # now include build_base.sh 12 | . $DIR/../softcenter/build_base.sh 13 | 14 | # change to module directory 15 | cd $DIR 16 | 17 | # do something here 18 | 19 | do_build_result 20 | 21 | sh backup.sh 22 | -------------------------------------------------------------------------------- /ddnsto/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.8", 3 | "md5":"79fbb004e478b2145e41a948114eb632", 4 | "home_url":"Module_ddnsto.asp", 5 | "title":"ddnsto", 6 | "description":"支持http2协议的快速穿透", 7 | "build_date":"2018-06-07_10:28:32" 8 | } 9 | -------------------------------------------------------------------------------- /ddnsto/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/ddnsto/bin/ddnsto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/ddnsto/bin/ddnsto -------------------------------------------------------------------------------- /ddnsto/ddnsto/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export ddnsto` 6 | 7 | 8 | cd /tmp 9 | cp -rf /tmp/ddnsto/bin/* $KSROOT/bin/ 10 | cp -rf /tmp/ddnsto/scripts/* $KSROOT/scripts/ 11 | cp -rf /tmp/ddnsto/webs/* $KSROOT/webs/ 12 | cp -rf /tmp/ddnsto/res/* $KSROOT/res/ 13 | cp /tmp/ddnsto/uninstall.sh $KSROOT/scripts/uninstall_ddnsto.sh 14 | 15 | chmod +x $KSROOT/bin/ddnsto 16 | chmod +x $KSROOT/bin/scripts/ddnsto_* 17 | 18 | [ ! -L "/jffs/koolshare/init.d/S88ddnsto.sh" ] && ln -sf /jffs/koolshare/scripts/ddnsto_config.sh /jffs/koolshare/init.d/S88ddnsto.sh 19 | 20 | # 为新安装文件赋予执行权限... 21 | chmod 755 $KSROOT/scripts/ddnsto* 22 | 23 | dbus set softcenter_module_ddnsto_description=宝宝穿透 24 | dbus set softcenter_module_ddnsto_install=1 25 | dbus set softcenter_module_ddnsto_name=ddnsto 26 | dbus set softcenter_module_ddnsto_title=ddnsto 27 | dbus set softcenter_module_ddnsto_version=1.8 28 | 29 | 30 | sleep 1 31 | rm -rf /tmp/ddnsto* >/dev/null 2>&1 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ddnsto/ddnsto/res/icon-ddnsto-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/ddnsto/res/icon-ddnsto-bg.png -------------------------------------------------------------------------------- /ddnsto/ddnsto/res/icon-ddnsto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/ddnsto/res/icon-ddnsto.png -------------------------------------------------------------------------------- /ddnsto/ddnsto/scripts/ddnsto_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export ddnsto_` 6 | 7 | start_ddnsto(){ 8 | ddnsto -u $ddnsto_token -d 9 | } 10 | 11 | stop_ddnsto(){ 12 | killall ddnsto 13 | } 14 | 15 | case $1 in 16 | start) 17 | if [ "$ddnsto_enable" == "1" ]; then 18 | logger "[软件中心]: 启动ddnsto!" 19 | start_ddnsto 20 | else 21 | logger "[软件中心]: ddnsto未设置开机启动,跳过!" 22 | fi 23 | ;; 24 | stop) 25 | stop_ddnsto 26 | ;; 27 | *) 28 | if [ "$ddnsto_enable" == "1" ]; then 29 | stop_ddnsto 30 | start_ddnsto 31 | http_response '服务已开启!页面将在3秒后刷新' 32 | else 33 | stop_ddnsto 34 | http_response '服务已关闭!页面将在3秒后刷新' 35 | fi 36 | ;; 37 | esac 38 | -------------------------------------------------------------------------------- /ddnsto/ddnsto/scripts/ddnsto_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | alias echo_date1='echo $(date +%Y年%m月%d日\ %X)' 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | 7 | status=`pidof ddnsto` 8 | version=`ddnsto -v` 9 | date=`echo_date1` 10 | 11 | if [ -n "$status" ];then 12 | http_response "【$date】 ddnsto $version 进程运行正常!  (pid: $status)" 13 | else 14 | http_response "ddnsto进程未运行!" 15 | fi 16 | 17 | -------------------------------------------------------------------------------- /ddnsto/ddnsto/uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export ddnsto` 6 | 7 | confs=`dbus list ddnsto|cut -d "=" -f1` 8 | 9 | for conf in $confs 10 | do 11 | dbus remove $conf 12 | done 13 | 14 | sleep 1 15 | rm -rf $KSROOT/bin/ddnsto 16 | rm -rf $KSROOT/scripts/ddnsto* 17 | rm -rf $KSROOT/webs/Module_ddnsto.asp 18 | rm -rf $KSROOT/res/icon-ddnsto.png 19 | rm -rf $KSROOT/res/icon-ddnsto-bg.png 20 | rm -rf $KSROOT/init.d/S88ddnsto.sh 21 | 22 | dbus remove softcenter_module_ddnsto_home_url 23 | dbus remove softcenter_module_ddnsto_install 24 | dbus remove softcenter_module_ddnsto_md5 25 | dbus remove softcenter_module_ddnsto_version 26 | dbus remove softcenter_module_ddnsto_name 27 | dbus remove softcenter_module_ddnsto_description 28 | -------------------------------------------------------------------------------- /ddnsto/ddnsto/webs/Module_ddnsto.asp: -------------------------------------------------------------------------------- 1 | 软件中心 - ddnsto 2 | 3 | 8 | 112 |
113 |
ddnsto 返回
114 |
115 | 116 | ddnsto是koolshare小宝开发的,支持http2的快速穿透。
117 | 你需要先到 https://www.ddnsto.com 注册,然后在本插件内填入帐号和密码,再登录 https://www.ddnsto.com 设置穿透。
118 |
119 |
120 | 121 |
122 |

123 |
124 |
125 | 133 |
134 |
135 |
136 |
ddnsto穿透设置教程:
137 | 142 |
143 | 144 | 145 | 146 | 147 |
148 | -------------------------------------------------------------------------------- /ddnsto/history/1.0/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.0/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.1/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.1/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.2/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.2/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.3/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.3/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.4/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.4/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.5/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.5/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.6/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.6/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.7/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.7/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/1.8/ddnsto.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ddnsto/history/1.8/ddnsto.tar.gz -------------------------------------------------------------------------------- /ddnsto/history/version: -------------------------------------------------------------------------------- 1 | 1.0 d9be5ee614ef4aef1ef2c971bbc1eda7 2 | 1.1 a59f8cad7966f2502220e762720a05f9 3 | 1.2 a3ac0e02c3acc603d6a609fece03e434 4 | 1.3 93124ec9b09dd544218bb94cdca60a15 5 | 1.4 512d07bd5c631e14416817774019b716 6 | 1.5 42599b3446b427af68f4f70dfb521c6a 7 | 1.6 95b2172638fe1eedfec6b2dad9926017 8 | 1.7 5d0729e04d3eab7a026f02e79e078e18 9 | 1.8 79fbb004e478b2145e41a948114eb632 10 | -------------------------------------------------------------------------------- /ddnsto/version: -------------------------------------------------------------------------------- 1 | 1.8 2 | 79fbb004e478b2145e41a948114eb632 3 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello to softcenter home page

4 | 5 | 6 | -------------------------------------------------------------------------------- /kms/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum kms.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./kms.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./kms.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | -------------------------------------------------------------------------------- /kms/build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # _*_ coding:utf-8 _*_ 3 | 4 | import os 5 | import json 6 | import codecs 7 | import hashlib 8 | from string import Template 9 | 10 | parent_path = os.path.dirname(os.path.realpath(__file__)) 11 | 12 | def md5sum(full_path): 13 | with open(full_path, 'rb') as rf: 14 | return hashlib.md5(rf.read()).hexdigest() 15 | 16 | def get_or_create(): 17 | conf_path = os.path.join(parent_path, "config.json.js") 18 | conf = {} 19 | if not os.path.isfile(conf_path): 20 | print u"config.json.js 文件找不到,build.py 一定得放插件根目录。自动为您生成一个config.json.js,其它信息请您自己修改。" 21 | module_name = os.path.basename(parent_path) 22 | conf["module"] = module_name 23 | conf["version"] = "0.0.1" 24 | conf["home_url"] = ("Module_%s.asp" % module_name) 25 | conf["title"] = "title of " + module_name 26 | conf["description"] = "description of " + module_name 27 | else: 28 | with codecs.open(conf_path, "r", "utf-8") as fc: 29 | conf = json.loads(fc.read()) 30 | return conf 31 | 32 | def build_module(): 33 | try: 34 | conf = get_or_create() 35 | except: 36 | print u"config.json.js 文件格式错误" 37 | traceback.print_exc() 38 | if "module" not in conf: 39 | print u"没有 module 在 config.json.js 里" 40 | return 41 | module_path = os.path.join(parent_path, conf["module"]) 42 | if not os.path.isdir(module_path): 43 | print u"找不到对应的 %s 文件夹,config.json.js 里面的 module 值不对?" % module_path 44 | return 45 | install_path = os.path.join(parent_path, conf["module"], "install.sh") 46 | if not os.path.isfile(install_path): 47 | print u"找不到对应的 %s 文件,插件确实 install.sh 文件" 48 | return 49 | print u"生成中..." 50 | t = Template("cd $parent_path && rm -f $module.tar.gz && tar -zcf $module.tar.gz $module") 51 | os.system(t.substitute({"parent_path": parent_path, "module": conf["module"]})) 52 | conf["md5"] = md5sum(os.path.join(parent_path, conf["module"] + ".tar.gz")) 53 | conf_path = os.path.join(parent_path, "config.json.js") 54 | with codecs.open(conf_path, "w", "utf-8") as fw: 55 | json.dump(conf, fw, sort_keys = True, indent = 4, ensure_ascii=False, encoding='utf8') 56 | print u"生成完成", conf["module"] + ".tar.gz" 57 | hook_path = os.path.join(parent_path, "backup.sh") 58 | if os.path.isfile(hook_path): 59 | os.system(hook_path) 60 | os.system("./../softcenter/build_base.sh") 61 | build_module() 62 | -------------------------------------------------------------------------------- /kms/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "build_date": "2016-11-25_21:35:44", 3 | "description": "不可描述", 4 | "home_url": "Module_kms.asp", 5 | "md5": "b320e48963559939a301e3fd1488b901", 6 | "module": "kms", 7 | "title": "系统工具", 8 | "version": "1.3" 9 | } -------------------------------------------------------------------------------- /kms/history/1.3/kms.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/kms/history/1.3/kms.tar.gz -------------------------------------------------------------------------------- /kms/history/version: -------------------------------------------------------------------------------- 1 | 1.3 b320e48963559939a301e3fd1488b901 2 | -------------------------------------------------------------------------------- /kms/kms.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/kms/kms.tar.gz -------------------------------------------------------------------------------- /kms/kms/bin/vlmcsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/kms/kms/bin/vlmcsd -------------------------------------------------------------------------------- /kms/kms/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | # stop kms first 6 | enable=`dbus get kms_enable` 7 | if [ "$enable" == "1" ];then 8 | restart=1 9 | dbus set kms_enable=0 10 | sh $KSROOT/scripts/kms.sh 11 | fi 12 | 13 | # cp files 14 | cp -rf /tmp/kms/scripts/* $KSROOT/scripts/ 15 | cp -rf /tmp/kms/bin/* $KSROOT/bin/ 16 | cp -rf /tmp/kms/webs/* $KSROOT/webs/ 17 | cp -rf /tmp/kms/res/* $KSROOT/res/ 18 | 19 | # delete install tar 20 | rm -rf /tmp/kms* >/dev/null 2>&1 21 | 22 | chmod a+x $KSROOT/scripts/kms.sh 23 | chmod 0755 $KSROOT/bin/vlmcsd 24 | 25 | # re-enable kms 26 | if [ "$restart" == "1" ];then 27 | dbus set kms_enable=1 28 | sh $KSROOT/scripts/kms.sh 29 | fi 30 | -------------------------------------------------------------------------------- /kms/kms/res/icon-kms-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/kms/kms/res/icon-kms-bg.png -------------------------------------------------------------------------------- /kms/kms/res/icon-kms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/kms/kms/res/icon-kms.png -------------------------------------------------------------------------------- /kms/kms/scripts/kms.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | eval `dbus export kms` 6 | CONFIG_FILE=/jffs/etc/dnsmasq.d/kms.conf 7 | FIREWALL_START=$KSROOT/scripts/firewall-start 8 | KMS_PID=0 9 | start_kms(){ 10 | $KSROOT/bin/vlmcsd 11 | KMS_PID=`pidof "vlmcsd"` 12 | dbus set kms_status="运行中,进程ID:$KMS_PID" 13 | echo "srv-host=_vlmcs._tcp.lan,`uname -n`.lan,1688,0,100" > $CONFIG_FILE 14 | nvram set lan_domain=lan 15 | nvram commit 16 | service dnsmasq restart 17 | # creating iptables rules to firewall-start 18 | mkdir -p $KSROOT/scripts 19 | if [ ! -f $FIREWALL_START ]; then 20 | cat > $FIREWALL_START <<-EOF 21 | #!/bin/sh 22 | EOF 23 | fi 24 | 25 | # creat start_up file 26 | if [ ! -L "$KSROOT/init.d/S97Kms.sh" ]; then 27 | ln -sf $KSROOT/scripts/kms.sh $KSROOT/init.d/S97Kms.sh 28 | fi 29 | } 30 | stop_kms(){ 31 | # clear start up command line in firewall-start 32 | killall vlmcsd 33 | dbus remove kms_status 34 | rm $CONFIG_FILE 35 | service dnsmasq restart 36 | } 37 | 38 | open_port(){ 39 | ifopen=`iptables -S -t filter | grep INPUT | grep dport |grep 1688` 40 | if [ -z "$ifopen" ];then 41 | iptables -t filter -I INPUT -p tcp --dport 1688 -j ACCEPT 42 | fi 43 | 44 | if [ ! -f $FIREWALL_START ]; then 45 | cat > $FIREWALL_START <<-EOF 46 | #!/bin/sh 47 | EOF 48 | fi 49 | 50 | fire_rule=$(cat $FIREWALL_START | grep 1688) 51 | if [ -z "$fire_rule" ];then 52 | cat >> $FIREWALL_START <<-EOF 53 | iptables -t filter -I INPUT -p tcp --dport 1688 -j ACCEPT 54 | EOF 55 | fi 56 | } 57 | 58 | close_port(){ 59 | ifopen=`iptables -S -t filter | grep INPUT | grep dport |grep 1688` 60 | if [ ! -z "$ifopen" ];then 61 | iptables -t filter -D INPUT -p tcp --dport 1688 -j ACCEPT 62 | fi 63 | 64 | fire_rule=$(cat $FIREWALL_START | grep 1688) 65 | if [ ! -z "$fire_rule" ];then 66 | sed -i '/1688/d' $FIREWALL_START >/dev/null 2>&1 67 | fi 68 | } 69 | 70 | case $ACTION in 71 | start) 72 | if [ "$kms_enable" == "1" ]; then 73 | logger "[软件中心]: 启动KMS!" 74 | start_kms 75 | open_port 76 | else 77 | logger "[软件中心]: KMS未设置开机启动,跳过!" 78 | fi 79 | ;; 80 | stop) 81 | close_port 82 | stop_kms 83 | ;; 84 | *) 85 | if [ "$kms_enable" == "1" ]; then 86 | close_port 87 | stop_kms 88 | start_kms 89 | open_port 90 | http_response '服务已开启!页面将在3秒后刷新' 91 | else 92 | close_port 93 | stop_kms 94 | http_response '服务已关闭!页面将在3秒后刷新' 95 | fi 96 | ;; 97 | esac 98 | -------------------------------------------------------------------------------- /kms/kms/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | rm $KSROOT/bin/vlmcsd 4 | rm $KSROOT/res/icon-kms* 5 | rm $KSROOT/scripts/kms.sh 6 | rm $KSROOT/webs/Module_kms.asp 7 | rm /jffs/etc/dnsmasq.d/kms.conf 8 | -------------------------------------------------------------------------------- /kms/kms/webs/Module_kms.asp: -------------------------------------------------------------------------------- 1 | 软件中心 - KMS 2 | 3 | 57 |
58 |
KMS Office激活工具返回
59 |

60 |
61 |
62 | 69 |
70 |
71 | 72 |
激活Office2016(以64位为例子)
73 |
    74 |
  • cd C:\Program Files\Microsoft Office\Office16
  • 75 |
  • CSCRIPT OSPP.VBS /SETHST:192.168.31.1
  • 76 |
  • CSCRIPT OSPP.VBS /ACT
  • 77 |
  • CSCRIPT OSPP.VBS /DSTATUS
  • 78 |
79 |
激活Windows
80 |
    81 |
  • cd C:\Windows\System32
  • 82 |
  • CSCRIPT /NOLOGO SLMGR.VBS /SKMS 192.168.31.1
  • 83 |
  • CSCRIPT /NOLOGO SLMGR.VBS /ATO
  • 84 |
  • CSCRIPT /NOLOGO SLMGR.VBS /XPR
  • 85 |
86 | 87 |
88 |
89 |
90 | 91 | 92 | 93 |
94 | -------------------------------------------------------------------------------- /ngrok/ngrok/bin/ngrok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ngrok/ngrok/bin/ngrok -------------------------------------------------------------------------------- /ngrok/ngrok/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | rm -rf $KSROOT/scripts/ngrok_* 6 | rm -rf $KSROOT/init.d/S99ngrok.sh 7 | rm -rf $KSROOT/res/icon-ngrok* 8 | rm -rf $KSROOT/web/Module_ngrok.asp 9 | 10 | cp -r /tmp/ngrok/* $KSROOT/ 11 | chmod a+x $KSROOT/scripts/ngrok_* 12 | 13 | # add icon into softerware center 14 | dbus set softcenter_module_ngrok_install=1 15 | dbus set softcenter_module_ngrok_version=0.1 16 | dbus set softcenter_module_ngrok_description="Ngrok" 17 | dbus set ngrok_srlist=''; 18 | rm -rf $KSROOT/install.sh 19 | -------------------------------------------------------------------------------- /ngrok/ngrok/res/icon-ngrok-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ngrok/ngrok/res/icon-ngrok-bg.png -------------------------------------------------------------------------------- /ngrok/ngrok/res/icon-ngrok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/ngrok/ngrok/res/icon-ngrok.png -------------------------------------------------------------------------------- /ngrok/ngrok/scripts/ngrok_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | eval `dbus export ngrok_` 5 | 6 | onstart() { 7 | 8 | killall ngrok || true 9 | txt=$ngrok_txt 10 | en=$ngrok_enable 11 | 12 | if [ -z "$txt" ]; then 13 | echo "not config" 14 | else 15 | 16 | if [ "$en" == "1" ]; then 17 | touch /tmp/ngrok.log 18 | echo $txt > /tmp/ngrok.json 19 | ngrok -c /tmp/ngrok.json -p /tmp/ngrok.pid -d & 20 | fi 21 | fi 22 | } 23 | 24 | case $ACTION in 25 | start) 26 | onstart 27 | ;; 28 | *) 29 | onstart 30 | ;; 31 | esac 32 | -------------------------------------------------------------------------------- /ngrok/ngrok/webs/Module_ngrok.asp: -------------------------------------------------------------------------------- 1 | 软件中心 - Ngrok 2 | 3 | 8 | 152 |
153 |
内网穿透 Ngrok 返回
154 |

155 |
156 |
157 | 166 |
167 |
168 |
169 |
170 |

穿透主机列表

171 |
172 | 173 |

174 | 175 |
176 |
177 | 178 | 179 | 180 | 181 |
182 | -------------------------------------------------------------------------------- /shadowsocks/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin shadowsocks Changelog 2 | =========================================== 3 | 0.9.9 4 | - add add shadowsocks for advanced tomato software center; 5 | 6 | 1.0.4 7 | - fix fix password showed in ss node tab 8 | - fix fix script error when restore ss conf 9 | - fix fix some pannel won't hide when ss disabled 10 | - fix fix no log show when ss disabled 11 | - add add ss tar download 12 | 13 | 1.0.5 14 | - fix fix wrong refresh time 15 | 16 | 17 | 1.0.6 18 | - fix fix chromecast 19 | - fix fix tproxy module load 20 | 21 | 1.0.7 22 | - fix fix menu type error 23 | 24 | 1.0.9 25 | - fix fix checkbox 26 | - fix fix ss-local 27 | - update when dns type set to 2 and no gfwlist mode for any client, the gfwlist will not be include into dnsmasq 28 | - fix fix use soft link for wblist, etc. this cause dnsmasq boot failed when router reboot. 29 | 30 | 1.1.4 31 | - fix fix default acl mode not changing when add ss node at first time 32 | 33 | 1.1.5 34 | - fix fix ISP dns grain 35 | 36 | 1.1.6 37 | - fix fix ss_log request muli time 38 | - fix fix mac address not applied in acl control 39 | - fix fix wong logs 40 | 41 | 1.2.3 42 | - update update ssr-libev to lasted, support none method and auth_chain_a protocal. 43 | - update update shadowsocks webpage layout. 44 | 45 | 1.2.4 46 | - update update ssr-libev to lasted, fix udp bug. 47 | 48 | 1.2.5 49 | - add add OUTPUT acl rule for koolproxy 50 | 51 | 1.2.6 - 1.2.7 52 | - fix fix PREROUTING rule missing when kp disabled 53 | -------------------------------------------------------------------------------- /shadowsocks/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum shadowsocks.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./shadowsocks.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./shadowsocks.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /shadowsocks/build.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # _*_ coding:utf-8 _*_ 3 | 4 | import os 5 | import json 6 | import codecs 7 | import hashlib 8 | from string import Template 9 | 10 | parent_path = os.path.dirname(os.path.realpath(__file__)) 11 | 12 | def md5sum(full_path): 13 | with open(full_path, 'rb') as rf: 14 | return hashlib.md5(rf.read()).hexdigest() 15 | 16 | def get_or_create(): 17 | conf_path = os.path.join(parent_path, "config.json.js") 18 | conf = {} 19 | if not os.path.isfile(conf_path): 20 | print u"config.json.js 文件找不到,build.py 一定得放插件根目录。自动为您生成一个config.json.js,其它信息请您自己修改。" 21 | module_name = os.path.basename(parent_path) 22 | conf["module"] = module_name 23 | conf["version"] = "0.0.1" 24 | conf["home_url"] = ("Module_%s.asp" % module_name) 25 | conf["title"] = "title of " + module_name 26 | conf["description"] = "description of " + module_name 27 | else: 28 | with codecs.open(conf_path, "r", "utf-8") as fc: 29 | conf = json.loads(fc.read()) 30 | return conf 31 | 32 | def build_module(): 33 | try: 34 | conf = get_or_create() 35 | except: 36 | print u"config.json.js 文件格式错误" 37 | traceback.print_exc() 38 | if "module" not in conf: 39 | print u"没有 module 在 config.json.js 里" 40 | return 41 | module_path = os.path.join(parent_path, conf["module"]) 42 | if not os.path.isdir(module_path): 43 | print u"找不到对应的 %s 文件夹,config.json.js 里面的 module 值不对?" % module_path 44 | return 45 | install_path = os.path.join(parent_path, conf["module"], "install.sh") 46 | if not os.path.isfile(install_path): 47 | print u"找不到对应的 %s 文件,插件确实 install.sh 文件" 48 | return 49 | print u"生成中..." 50 | t = Template("cd $parent_path && rm -f $module.tar.gz && tar -zcf $module.tar.gz $module") 51 | os.system(t.substitute({"parent_path": parent_path, "module": conf["module"]})) 52 | conf["md5"] = md5sum(os.path.join(parent_path, conf["module"] + ".tar.gz")) 53 | conf_path = os.path.join(parent_path, "config.json.js") 54 | with codecs.open(conf_path, "w", "utf-8") as fw: 55 | json.dump(conf, fw, sort_keys = True, indent = 4, ensure_ascii=False, encoding='utf8') 56 | print u"生成完成", conf["module"] + ".tar.gz" 57 | hook_path = os.path.join(parent_path, "backup.sh") 58 | if os.path.isfile(hook_path): 59 | os.system(hook_path) 60 | 61 | build_module() 62 | -------------------------------------------------------------------------------- /shadowsocks/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "build_date": "2017-05-02_23:31:37", 3 | "description": "fuck gfw", 4 | "home_url": "Module_shadowsocks.asp", 5 | "md5": "e9e2b42dbb507936080671e7fd40221f", 6 | "module": "shadowsocks", 7 | "title": "shadowsocks", 8 | "version": "1.2.7" 9 | } -------------------------------------------------------------------------------- /shadowsocks/history/1.0.1/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.1/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.2/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.2/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.3/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.3/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.4/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.4/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.5/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.5/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.6/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.6/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.7/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.7/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.8/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.8/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.0.9/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.0.9/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.0/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.0/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.1/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.1/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.2/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.2/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.3/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.3/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.4/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.4/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.5/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.5/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.6/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.6/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.7/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.7/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.8/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.8/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.1.9/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.1.9/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.0/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.0/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.1/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.1/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.2/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.2/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.3/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.3/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.4/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.4/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.5/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.5/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.6/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.6/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/1.2.7/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/history/1.2.7/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/history/version: -------------------------------------------------------------------------------- 1 | 1.0.1 2c2003f94cb6afa5734b20d625792ed9 2 | 1.0.2 4932e059b3c3fd8223b73696be123b62 3 | 1.0.3 3b4db90355def003c6782528834f67ce 4 | 1.0.4 c449f6b5793e8e69558b9689bd102bf9 5 | 1.0.5 bd6513a1a0186c62fe9341d39e6e68b7 6 | 1.0.6 7e8ecfe9074206b5d98aaddde5f0f22f 7 | 1.0.7 9b2f9955b164596f54b797071b6a9877 8 | 1.0.8 578230a3737b34cd8f56362f620131bb 9 | 1.0.9 b0cad8ced37de33540f7039693fe2532 10 | 1.1.0 fed00b5e975241e8dd8b4a8e585028c0 11 | 1.1.1 e529341a62f5368a173528ec56a3ee9b 12 | 1.1.2 ef7abd0345b0870da503446e856f9c93 13 | 1.1.3 f11a422092fffe6d6c0009b4e8ae4e14 14 | 1.1.4 5899261eba703e444f13cfc8fe56ea64 15 | 1.1.5 c2b814c2cfdff7d40bcdf3126d1d749d 16 | 1.1.6 7a6b2f84ca3a2ffa2e18da614d6d237b 17 | 1.1.7 0d6ddf45c882f444ce6c382e870e2e25 18 | 1.1.8 67916cc173e1211eaafaface1b77e04e 19 | 1.1.9 ed1b27caf43c3cf306f737e22357ad90 20 | 1.2.0 8e956a6bd50373852fb2bb394a9809a3 21 | 1.2.1 e7d58bbe5847ad93160a47af89bdedd4 22 | 1.2.2 7649efa35f98cadc0bfe2896fe93466b 23 | 1.2.3 41bf32be07f03f9aff2cbbc864a6ca03 24 | 1.2.4 540060645a7a51607fc6cc8624a10fff 25 | 1.2.5 7df22d85675dd18a36e138a3ef60b3d0 26 | 1.2.6 f4fbd5f246d5027cc200a97125b1a694 27 | 1.2.7 e9e2b42dbb507936080671e7fd40221f 28 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks.tar.gz -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/Pcap_DNSProxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/Pcap_DNSProxy -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/chinadns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/chinadns -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/dns2socks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/dns2socks -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/dnscrypt-proxy: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/dnscrypt-proxy -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/pdnsd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/pdnsd -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/resolveip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/resolveip -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/rss-local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/rss-local -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/rss-redir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/rss-redir -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/rss-tunnel: -------------------------------------------------------------------------------- 1 | rss-local -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/ss-local: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/ss-local -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/ss-redir: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/ss-redir -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/bin/ss-tunnel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/bin/ss-tunnel -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | # 关闭ss 7 | mkdir -p $KSROOT/ss 8 | if [ "$ss_basic_enable" == "1" ];then 9 | echo_date 先关闭ss,保证文件更新成功! 10 | sh $KSROOT/ss/start.sh stop 11 | fi 12 | 13 | #升级前先删除无关文件 14 | echo_date 清理旧文件 15 | rm -rf $KSROOT/ss/* >/dev/null 2>&1 16 | rm -rf $KSROOT/scripts/ss_* >/dev/null 2>&1 17 | rm -rf $KSROOT/webs/Module_shadowsocks.asp >/dev/null 2>&1 18 | rm -rf $KSROOT/bin/ss-tunnel >/dev/null 2>&1 19 | rm -rf $KSROOT/bin/ss-local >/dev/null 2>&1 20 | rm -rf $KSROOT/bin/ss-redir >/dev/null 2>&1 21 | rm -rf $KSROOT/bin/rss* >/dev/null 2>&1 22 | rm -rf $KSROOT/bin/pdnsd >/dev/null 2>&1 23 | rm -rf $KSROOT/bin/Pcap_DNSProxy >/dev/null 2>&1 24 | rm -rf $KSROOT/bin/dnscrypt-proxy >/dev/null 2>&1 25 | rm -rf $KSROOT/bin/dns2socks >/dev/null 2>&1 26 | rm -rf $KSROOT/bin/chinadns >/dev/null 2>&1 27 | rm -rf $KSROOT/bin/resolveip >/dev/null 2>&1 28 | 29 | cd /tmp 30 | cp -rf /tmp/shadowsocks/bin/* $KSROOT/bin/ 31 | cp -rf /tmp/shadowsocks/ss/* $KSROOT/ss/ 32 | cp -rf /tmp/shadowsocks/scripts/* $KSROOT/scripts/ 33 | cp -rf /tmp/shadowsocks/webs/* $KSROOT/webs/ 34 | cp -rf /tmp/shadowsocks/res/* $KSROOT/res/ 35 | 36 | cp /tmp/shadowsocks/install.sh $KSROOT/scripts/ss_install.sh 37 | cp /tmp/shadowsocks/uninstall.sh $KSROOT/scripts/uninstall_shadowsocks.sh 38 | 39 | # 为新安装文件赋予执行权限... 40 | chmod 755 $KSROOT/bin/* 41 | chmod 755 $KSROOT/ss/dns/dns.sh 42 | chmod 755 $KSROOT/ss/start.sh 43 | chmod 755 $KSROOT/scripts/ss_* 44 | chmod 755 $KSROOT/scripts/pcap_* 45 | 46 | dbus set ss_basic_version=`cat $KSROOT/ss/version` 47 | 48 | sleep 1 49 | rm -rf /tmp/shadowsocks* >/dev/null 2>&1 50 | 51 | if [ "$ss_basic_enable" == "1" ];then 52 | echo_date 重启ss! 53 | sh $KSROOT/ss/start.sh start_all 54 | fi 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/res/icon-shadowsocks-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/res/icon-shadowsocks-bg.png -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/res/icon-shadowsocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shadowsocks/shadowsocks/res/icon-shadowsocks.png -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/scripts/pcap_update_list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | alias echo_date='echo 【$(date +%Y年%m月%d日\ %X)】:' 6 | 7 | china_domain_list="https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf" 8 | china_routing_list="https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest" 9 | DATE=$(date "+%Y-%m-%d %H:%M:%S") 10 | 11 | 12 | update_list(){ 13 | echo ======================================================================================================= 14 | echo_date 开始更新 Local Hosts,请等待... 15 | wget -q -P /tmp --no-check-certificate $china_domain_list 16 | echo -e '[Local Hosts]' >> /tmp/WhiteList.txt 17 | echo -e '## China mainland domains' >> /tmp/WhiteList.txt 18 | echo -e '## Get the latest database: https://github.com/xinhugo/Free-List/blob/master/WhiteList.txt' >> /tmp/WhiteList.txt 19 | echo -e '## Report an issue: https://github.com/xinhugo/Free-List/issues' >> /tmp/WhiteList.txt 20 | echo -e "## Last update: $DATE\n" >> /tmp/WhiteList.txt 21 | sed 's|/114.114.114.114$||' /tmp/accelerated-domains.china.conf > /tmp/WhiteList_tmp.txt 22 | sed -i 's|\(\.\)|\\\1|g' /tmp/WhiteList_tmp.txt 23 | sed -i 's|server=/|.*\\\b|' /tmp/WhiteList_tmp.txt 24 | sed -i 's|b\(cn\)$|\.\1|' /tmp/WhiteList_tmp.txt 25 | cat /tmp/WhiteList_tmp.txt >> /tmp/WhiteList.txt 26 | 27 | cp /tmp/WhiteList.txt $KSROOT/ss/dns 28 | rm -f /tmp/WhiteList_tmp.txt /tmp/WhiteList.txt /tmp/accelerated-domains.china.conf /tmp/google.china.conf 29 | 30 | echo_date 你的WhiteList.txt已经更新到最新了哦~ 31 | 32 | echo_date 开始更新 Local Routing,请等待... 33 | wget -q -O- --no-check-certificate $china_routing_list | grep ipv4 | grep CN | awk -F\| '{printf("%s/%d\n", $4, 32-log($5)/log(2))}' > /tmp/Routing_IPv4.txt 34 | echo -e '[Local Routing]' >> /tmp/Routing_IPv4_tmp.txt 35 | echo -e '## China mainland routing blocks' >> /tmp/Routing_IPv4_tmp.txt 36 | echo -e "## Last update: $DATE\n\n" >> /tmp/Routing_IPv4_tmp.txt 37 | echo -e '## IPv4' >> /tmp/Routing_IPv4_tmp.txt 38 | echo -e '## Get the latest database from APNIC -> https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' >> /tmp/Routing_IPv4_tmp.txt 39 | cat /tmp/Routing_IPv4.txt >> /tmp/Routing_IPv4_tmp.txt 40 | 41 | wget -q -O- --no-check-certificate $china_routing_list | grep ipv6 | grep CN | awk -F\| '{printf("%s/%d\n", $4, $5)}' > /tmp/Routing_IPv6.txt 42 | echo -e '## IPv6' >> /tmp/Routing_IPv6_tmp.txt 43 | echo -e '## Get the latest database from APNIC -> https://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest' >> /tmp/Routing_IPv6_tmp.txt 44 | cat /tmp/Routing_IPv6.txt >> /tmp/Routing_IPv6_tmp.txt 45 | 46 | cat /tmp/Routing_IPv6_tmp.txt >> /tmp/Routing_IPv4_tmp.txt 47 | touch /tmp/Routing.txt 48 | cat /tmp/Routing_IPv4_tmp.txt >> /tmp/Routing.txt 49 | 50 | cp /tmp/Routing.txt $KSROOT/ss/dns 51 | rm -f /tmp/Routing_IPv4.txt /tmp/Routing_IPv4_tmp.txt /tmp/Routing_IPv6.txt /tmp/Routing_IPv6_tmp.txt /tmp/Routing.txt 52 | 53 | echo_date 你的Routing.txt已经更新到最新了哦~ 54 | 55 | echo_date 自动重启Pcap_DNSProxy,以应用新的列表文件!请稍后! 56 | killall Pcap_DNSProxy >/dev/null 2>&1 57 | echo ======================================================================================================= 58 | } 59 | 60 | update_list > /tmp/upload/ss_log.txt 61 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 62 | http_response "$1" -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/scripts/ss_conf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | alias echo_date='echo 【$(date +%Y年%m月%d日\ %X)】:' 5 | 6 | 7 | remove_conf_all(){ 8 | echo_date 尝试关闭shadowsocks... 9 | sh $KSROOT/ss/start.sh stop 10 | echo_date 开始清理shadowsocks配置... 11 | confs=`dbus list ss | cut -d "=" -f 1 | grep -v "version"` 12 | for conf in $confs 13 | do 14 | echo_date 移除$conf 15 | dbus remove $conf 16 | done 17 | echo_date 设置一些默认参数... 18 | dbus set ss_basic_enable="0" 19 | dbus set ss_basic_version=`cat $KSROOT/ss/version` 20 | echo_date 完成! 21 | } 22 | 23 | remove_ss_node(){ 24 | echo_date 开始清理shadowsocks节点配置... 25 | confs1=`dbus list ssconf | cut -d "=" -f 1` 26 | confs2=`dbus list ssrconf | cut -d "=" -f 1` 27 | confs3=`dbus list ssv2conf | cut -d "=" -f 1` 28 | for conf in $confs1 $confs2 $confs3 29 | do 30 | echo_date 移除$conf 31 | dbus remove $conf 32 | done 33 | echo_date 完成! 34 | } 35 | 36 | remove_ss_acl(){ 37 | echo_date 开始清理shadowsocks配置... 38 | confs=`dbus list ss_acl | cut -d "=" -f 1` 39 | for conf in $confs 40 | do 41 | echo_date 移除$conf 42 | dbus remove $conf 43 | done 44 | echo_date 完成! 45 | } 46 | 47 | case $2 in 48 | 1) 49 | remove_conf_all > /tmp/upload/ss_log.txt 50 | http_response "$1" 51 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 52 | ;; 53 | 2) 54 | remove_ss_node > /tmp/upload/ss_log.txt 55 | http_response "$1" 56 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 57 | ;; 58 | 3) 59 | remove_ss_acl > /tmp/upload/ss_log.txt 60 | http_response "$1" 61 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 62 | ;; 63 | 4) 64 | echo "" > /tmp/upload/ss_log.txt 65 | mkdir -p $KSROOT/webs/files 66 | dbus list ss | grep -v "status" | grep -v "enable" | grep -v "version" | grep -v "success" | sed 's/=/=\"/' | sed 's/$/\"/g'|sed 's/^/dbus set /' | sed '1 i\\n' | sed '1 isource /jffs/koolshare/scripts/base.sh' |sed '1 i#!/bin/sh' > $KSROOT/webs/files/ss_conf_backup.sh 67 | http_response "$1" 68 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 69 | ;; 70 | 5) 71 | echo_date "开始恢复SS配置..." > /tmp/upload/ss_log.txt 72 | file_nu=`ls /tmp/upload/ss_conf_backup | wc -l` 73 | i=10 74 | until [ -n "$file_nu" ] 75 | do 76 | i=$(($i-1)) 77 | if [ "$i" -lt 1 ];then 78 | echo_date "错误:没有找到恢复文件!" 79 | exit 80 | fi 81 | sleep 1 82 | done 83 | format=`cat /tmp/upload/ss_conf_backup.sh |grep dbus` 84 | if [ -n "format" ];then 85 | echo_date "检测到正确格式的配置文件!" >> /tmp/upload/ss_log.txt 86 | cd /tmp/upload 87 | chmod +x ss_conf_backup.sh 88 | echo_date "恢复中..." >> /tmp/upload/ss_log.txt 89 | sh ss_conf_backup.sh 90 | sleep 1 91 | rm -rf /tmp/upload/ss_conf_backup.sh 92 | dbus set ss_basic_version=`cat $KSROOT/ss/version` 93 | echo_date "恢复完毕!" >> /tmp/upload/ss_log.txt 94 | else 95 | echo_date "配置文件格式错误!" >> /tmp/upload/ss_log.txt 96 | fi 97 | http_response "$1" 98 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 99 | ;; 100 | 6) 101 | echo_date "开始打包..." > /tmp/upload/ss_log.txt 102 | echo_date "请等待一会儿...下载会自动开始." >> /tmp/upload/ss_log.txt 103 | mkdir -p /jffs/koolshare/webs/files 104 | cd $KSROOT/ 105 | mv $KSROOT/scripts/ss_install.sh $KSROOT/install.sh 106 | cp $KSROOT/scripts/uninstall_shadowsocks.sh $KSROOT/uninstall.sh 107 | tar -czv -f /jffs/koolshare/webs/files/shadowsocks.tar.gz bin/ss-* bin/rss-* bin/pdnsd bin/Pcap_DNSProxy bin/dns2socks bin/dnscrypt-proxy bin/chinadns bin/resolveip scripts/ss_* res/icon-shadowsocks* ss/ webs/Module_shadowsocks.asp ./install.sh ./uninstall.sh >> /tmp/upload/ss_log.txt 108 | echo_date "打包完毕!该包可以在TOMATO软件中心离线安装哦~" >> /tmp/upload/ss_log.txt 109 | http_response "$1" 110 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 111 | sleep 10 112 | rm -rf /jffs/koolshare/webs/files/shadowsocks.tar.gz 113 | mv $KSROOT/install.sh $KSROOT/scripts/ss_install.sh 114 | rm -rf $KSROOT/uninstall.sh 115 | ;; 116 | esac 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/scripts/ss_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | alias echo_date1='echo $(date +%Y年%m月%d日\ %X)' 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | eval `dbus export ss_` 7 | 8 | # this part for start up 9 | case $1 in 10 | start) 11 | # the soft link should be create after boot 12 | [ "$ss_basic_enable" == "1" ] && sh /jffs/koolshare/ss/start.sh start_all > /tmp/upload/ss_log.txt 13 | ;; 14 | stop) 15 | sh /jffs/koolshare/koolproxy/kp_config.sh stop > /tmp/upload/kp_log.txt 16 | ;; 17 | esac 18 | 19 | # this part for web runing using httpdb 20 | case $2 in 21 | 1) 22 | if [ "$ss_basic_enable" == "1" ];then 23 | sh /jffs/koolshare/ss/start.sh start_all > /tmp/upload/ss_log.txt 24 | else 25 | sh /jffs/koolshare/ss/start.sh stop > /tmp/upload/ss_log.txt 26 | fi 27 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 28 | http_response $1 29 | ;; 30 | 10) 31 | # do not delete this, it's usefull when saving ss_node data 32 | http_response "$1" 33 | ;; 34 | esac -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/scripts/ss_getarp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | arp=`arp | grep br0 | grep -v incomplete | sed 's/ (/#g'` 6 | 7 | if [ -n "$arp" ];then 8 | dbus set ss_basic_arp="$arp" 9 | fi 10 | 11 | http_response "$arp" 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/scripts/ss_rule_update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | eval `dbus export ss` 5 | alias echo_date='echo 【$(date +%Y年%m月%d日\ %X)】:' 6 | url_main="https://koolshare.ngrok.wang/maintain_files" 7 | url_back="https://raw.githubusercontent.com/koolshare/koolshare.github.io/acelan_softcenter_ui/maintain_files/" 8 | 9 | # version dectet 10 | version_gfwlist1=$(cat $KSROOT/ss/rules/version | sed -n 1p | sed 's/ /\n/g'| sed -n 1p) 11 | version_chnroute1=$(cat $KSROOT/ss/rules/version | sed -n 2p | sed 's/ /\n/g'| sed -n 1p) 12 | version_cdn1=$(cat $KSROOT/ss/rules/version | sed -n 4p | sed 's/ /\n/g'| sed -n 1p) 13 | 14 | update_rule(){ 15 | echo ======================================================================================================= 16 | echo_date 开始更新shadowsocks规则,请等待... 17 | wget --no-check-certificate --timeout=8 -qO - $url_main/version1 > /tmp/version1 18 | if [ "$?" == "0" ]; then 19 | echo_date 检测到在线版本文件,继续... 20 | else 21 | echo_date 没有检测到在线版本欸,可能是访问github有问题,去大陆白名单模式试试吧! 22 | rm -rf /tmp/version1 23 | exit 24 | fi 25 | 26 | online_content=$(cat /tmp/version1) 27 | if [ -z "$online_content" ];then 28 | rm -rf /tmp/version1 29 | fi 30 | 31 | git_line1=$(cat /tmp/version1 | sed -n 1p) 32 | git_line2=$(cat /tmp/version1 | sed -n 2p) 33 | git_line4=$(cat /tmp/version1 | sed -n 4p) 34 | 35 | version_gfwlist2=$(echo $git_line1 | sed 's/ /\n/g'| sed -n 1p) 36 | version_chnroute2=$(echo $git_line2 | sed 's/ /\n/g'| sed -n 1p) 37 | version_cdn2=$(echo $git_line4 | sed 's/ /\n/g'| sed -n 1p) 38 | 39 | md5sum_gfwlist2=$(echo $git_line1 | sed 's/ /\n/g'| tail -n 2 | head -n 1) 40 | md5sum_chnroute2=$(echo $git_line2 | sed 's/ /\n/g'| tail -n 2 | head -n 1) 41 | md5sum_cdn2=$(echo $git_line4 | sed 's/ /\n/g'| tail -n 2 | head -n 1) 42 | 43 | # update gfwlist 44 | if [ "$ss_basic_gfwlist_update" == "1" ];then 45 | if [ ! -z "$version_gfwlist2" ];then 46 | if [ "$version_gfwlist1" != "$version_gfwlist2" ];then 47 | echo_date 检测到新版本gfwlist,开始更新... 48 | echo_date 下载gfwlist到临时文件... 49 | wget --no-check-certificate --timeout=8 -qO - $url_main/gfwlist.conf > /tmp/gfwlist.conf 50 | md5sum_gfwlist1=$(md5sum /tmp/gfwlist.conf | sed 's/ /\n/g'| sed -n 1p) 51 | if [ "$md5sum_gfwlist1"x = "$md5sum_gfwlist2"x ];then 52 | echo_date 下载完成,校验通过,将临时文件覆盖到原始gfwlist文件 53 | mv /tmp/gfwlist.conf $KSROOT/ss/rules/gfwlist.conf 54 | sed -i "1s/.*/$git_line1/" $KSROOT/ss/rules/version 55 | reboot="1" 56 | echo_date 你的gfwlist已经更新到最新了哦~ 57 | else 58 | echo_date 下载完成,但是校验没有通过! 59 | fi 60 | else 61 | echo_date 检测到gfwlist本地版本号和在线版本号相同,那还更新个毛啊! 62 | fi 63 | else 64 | echo_date gfwlist文件下载失败! 65 | fi 66 | else 67 | echo_date 然而你并没有勾选gfwlist更新! 68 | fi 69 | 70 | 71 | # update chnroute 72 | if [ "$ss_basic_chnroute_update" == "1" ];then 73 | if [ ! -z "$version_chnroute2" ];then 74 | if [ "$version_chnroute1" != "$version_chnroute2" ];then 75 | echo_date 检测到新版本chnroute,开始更新... 76 | echo_date 下载chnroute到临时文件... 77 | wget --no-check-certificate --timeout=8 -qO - $url_main/chnroute.txt > /tmp/chnroute.txt 78 | md5sum_chnroute1=$(md5sum /tmp/chnroute.txt | sed 's/ /\n/g'| sed -n 1p) 79 | if [ "$md5sum_chnroute1"x = "$md5sum_chnroute2"x ];then 80 | echo_date 下载完成,校验通过,将临时文件覆盖到原始chnroute文件 81 | mv /tmp/chnroute.txt $KSROOT/ss/rules/chnroute.txt 82 | sed -i "2s/.*/$git_line2/" $KSROOT/ss/rules/version 83 | reboot="1" 84 | echo_date 你的chnroute已经更新到最新了哦~ 85 | else 86 | echo_date md5sum 下载完成,但是校验没有通过! 87 | fi 88 | else 89 | echo_date 检测到chnroute本地版本号和在线版本号相同,那还更新个毛啊! 90 | fi 91 | else 92 | echo_date file chnroute文件下载失败! 93 | fi 94 | else 95 | echo_date 然而你并没有勾选chnroute更新! 96 | fi 97 | 98 | # update cdn file 99 | if [ "$ss_basic_cdn_update" == "1" ];then 100 | if [ ! -z "$version_cdn2" ];then 101 | if [ "$version_cdn1" != "$version_cdn2" ];then 102 | echo_date 检测到新版本cdn名单,开始更新... 103 | echo_date 下载cdn名单到临时文件... 104 | wget --no-check-certificate --timeout=8 -qO - $url_main/cdn.txt > /tmp/cdn.txt 105 | md5sum_cdn1=$(md5sum /tmp/cdn.txt | sed 's/ /\n/g'| sed -n 1p) 106 | if [ "$md5sum_cdn1"x = "$md5sum_cdn2"x ];then 107 | echo_date 下载完成,校验通过,将临时文件覆盖到原始cdn名单文件 108 | mv /tmp/cdn.txt $KSROOT/ss/rules/cdn.txt 109 | sed -i "4s/.*/$git_line4/" $KSROOT/ss/rules/version 110 | reboot="1" 111 | echo_date 你的cdn名单已经更新到最新了哦~ 112 | else 113 | echo_date 下载完成,但是校验没有通过! 114 | fi 115 | else 116 | echo_date 检测到cdn名单本地版本号和在线版本号相同,那还更新个毛啊! 117 | fi 118 | else 119 | echo_date file cdn名单文件下载失败! 120 | fi 121 | else 122 | echo_date 然而你并没有勾选cdn名单更新! 123 | fi 124 | 125 | 126 | rm -rf /tmp/gfwlist.conf1 127 | rm -rf /tmp/chnroute.txt1 128 | rm -rf /tmp/cdn.txt1 129 | rm -rf /tmp/version1 130 | 131 | echo_date Shadowsocks更新进程运行完毕! 132 | # write number 133 | ipset_numbers=`cat $KSROOT/ss/rules/gfwlist.conf | grep -c ipset` 134 | chnroute_numbers=`cat $KSROOT/ss/rules/chnroute.txt | grep -c .` 135 | cdn_numbers=`cat $KSROOT/ss/rules/cdn.txt | grep -c .` 136 | update_ipset=`cat $KSROOT/ss/rules/version | sed -n 1p | sed 's/#/\n/g'| sed -n 1p` 137 | update_chnroute=`cat $KSROOT/ss/rules/version | sed -n 2p | sed 's/#/\n/g'| sed -n 1p` 138 | update_cdn=`cat $KSROOT/ss/rules/version | sed -n 4p | sed 's/#/\n/g'| sed -n 1p` 139 | dbus set ss_gfw_status="$ipset_numbers 条,最后更新版本: $update_ipset " 140 | dbus set ss_chn_status="$chnroute_numbers 条,最后更新版本: $update_chnroute " 141 | dbus set ss_cdn_status="$cdn_numbers 条,最后更新版本: $update_cdn " 142 | 143 | # reboot ss 144 | if [ "$reboot" == "1" ];then 145 | echo_date 自动重启shadowsocks,以应用新的规则文件!请稍后! 146 | sh $KSROOT/ss/start.sh start_all 147 | fi 148 | echo ======================================================================================================= 149 | } 150 | 151 | update_rule > /tmp/upload/ss_log.txt 152 | echo XU6J03M6 >> /tmp/upload/ss_log.txt 153 | http_response "$1" 154 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/scripts/ss_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | alias echo_date1='echo $(date +%Y年%m月%d日\ %X)' 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | eval `dbus export ss_` 7 | date=`echo_date1` 8 | LOGTIME=$(date "+%Y-%m-%d %H:%M:%S") 9 | 10 | 11 | get_china_status(){ 12 | wget -4 --spider --quiet --tries=2 --timeout=2 www.baidu.com 13 | if [ "$?" == "0" ]; then 14 | log2='国内链接 【'$LOGTIME'】 ✓' 15 | else 16 | log2='国内链接 【'$LOGTIME'】 X' 17 | fi 18 | } 19 | 20 | get_foreign_status(){ 21 | wget -4 --spider --quiet --tries=2 --timeout=2 www.google.com.tw 22 | if [ "$?" == "0" ]; then 23 | log1='国外链接 【'$LOGTIME'】 ✓' 24 | else 25 | log1='国外链接 【'$LOGTIME'】 X' 26 | fi 27 | } 28 | 29 | get_china_status 30 | get_foreign_status 31 | 32 | http_response "$log1@@$log2" 33 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/ss/dns/Hosts.ini: -------------------------------------------------------------------------------- 1 | ## Example: 2 | # 3 | # [Source Hosts] 4 | # 127.0.0.1/32->127.0.0.2 test 5 | # ::1/128->::FFFF test 6 | # 7 | # [Hosts] 8 | # NULL test 9 | # BANNED test 10 | # 127.0.0.1 test 11 | # ::1 test 12 | # [--]Address=/test/[127.0.0.1] 13 | # [--]Address=/test/[::1] 14 | # 15 | # [Local Hosts] 16 | # NULL test 17 | # test 18 | # [--]Server=/[test]/[127.0.0.1[#53]] 19 | # [--]Server=/[test]/[::1[#53]] 20 | # 21 | # [CNAME Hosts] 22 | # 127.0.0.1 test 23 | # ::1 test 24 | # [--]Address=/test/[127.0.0.1] 25 | # [--]Address=/test/[::1] 26 | # 27 | # [Address Hosts] 28 | # 127.0.0.1|127.0.0.2 127.0.0.0-127.255.255.255 29 | # ::1 ::-::FFFF 30 | # 31 | 32 | [Source Hosts] 33 | 34 | 35 | [Hosts] 36 | 37 | 38 | [Local Hosts] 39 | 40 | 41 | [CNAME Hosts] 42 | 43 | 44 | [Address Hosts] 45 | 46 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/ss/dns/IPFilter.ini: -------------------------------------------------------------------------------- 1 | ## Example: 2 | # 3 | # [Blacklist] 4 | # 127.0.0.1 test 5 | # ::1 test 6 | # 7 | # [IPFilter] 8 | # Address(Start) - Address(End) , Level, Comments 9 | # 127.0.0.0 - 127.255.255.255 , 0, IPv4 Link-Local addresses 10 | # :: - ::1 , 0, IPv6 Link-Local addresses 11 | # 12 | # [Local Routing] 13 | # 0.0.0.0/32 14 | # ::/128 15 | # 16 | 17 | [Blacklist] 18 | # DNS provider or ISP advertisement/cache server addresses 19 | # Some DNS providers will return certain IP addresses for non-exist domain for their advertisement. 20 | # Some ISPs will hijack domains to their cache servers. 21 | ## China Mobile 22 | 103.207.229.0-103.207.229.255 ALL 23 | 120.196.0.0-120.196.0.255 ALL 24 | 120.198.244.0-120.198.244.255 ALL 25 | 211.98.70.226|211.98.70.227 ALL 26 | 211.98.71.195 ALL 27 | 211.139.136.0-211.139.136.255 ALL 28 | ## China Telecom 29 | 58.53.211.46|58.53.211.47 ALL 30 | 60.191.124.236|60.191.124.252 ALL 31 | 61.139.8.101-61.139.8.104 ALL 32 | 101.110.118.0-101.110.118.255 ALL 33 | 111.175.220.163 ALL 34 | 111.175.221.58 ALL 35 | 125.88.131.0-125.88.131.255 ALL 36 | 180.153.103.224 ALL 37 | 180.168.41.175 ALL 38 | 202.102.110.203|202.102.110.205 ALL 39 | 218.30.64.194 ALL 40 | ## China Unicom 41 | 120.52.72.0-120.52.73.255 ALL 42 | 123.129.254.11-123.129.254.19 ALL 43 | 125.211.213.130-125.211.213.134 ALL 44 | 202.98.24.121-202.98.24.125 ALL 45 | 202.106.199.34-202.106.199.38 ALL 46 | 220.250.64.18-220.250.64.30 ALL 47 | 220.250.64.225-220.250.64.228 ALL 48 | ## DNSPai 49 | 101.226.10.8 ALL 50 | 123.125.81.12 ALL 51 | ## Great Wall Broadband Network 52 | 114.112.163.232|114.112.163.254 ALL 53 | 124.14.8.196 ALL 54 | ## OpenDNS 55 | 67.215.65.132|67.215.77.132 ALL 56 | 208.69.34.132|208.69.32.132 ALL 57 | 58 | [IPFilter] 59 | 60 | 61 | [Local Routing] 62 | 63 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/ss/dns/dns.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PROCS=Pcap_DNSProxy 3 | CONFIG=/jffs/koolshare/ss/dns 4 | while true ; do 5 | RUNNING=`ps|grep $PROCS|grep -v grep |wc -l` 6 | if [ "${RUNNING}" -ge 1 ];then 7 | sleep 5 8 | else 9 | $PROCS -c $CONFIG 10 | echo "$(date) Starting ${PROCS}!" >> /tmp/dns.log 11 | sleep 1 12 | fi 13 | done 14 | exit 0 15 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/ss/rules/output.conf: -------------------------------------------------------------------------------- 1 | # for router itself 2 | ipset=/.google.com.tw/router 3 | ipset=/.github.com/router 4 | ipset=/.github.io/router 5 | ipset=/.raw.githubusercontent.com/router 6 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/ss/rules/version: -------------------------------------------------------------------------------- 1 | 2017-03-22 # d73a0852dd40fd60a509fb98f3688653 gfwlist 2 | 2017-03-22 # 263ae73d9808b6f73ae76deb46b1db5d chnroute 3 | 2016-02-26 # 7c8569e96bc6893a146d5e093a3b0434 adblock 4 | 2017-03-22 # f63263f43ebf313567933bce19510220 cdn 5 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/ss/version: -------------------------------------------------------------------------------- 1 | 1.2.7 2 | -------------------------------------------------------------------------------- /shadowsocks/shadowsocks/uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | 7 | sh $KSROOT/ss/start.sh stop 8 | sh $KSROOT/scripts/ss_conf.sh 1 9 | sleep 1 10 | rm -rf $KSROOT/ss 11 | rm -rf $KSROOT/scripts/ss_* 12 | rm -rf $KSROOT/webs/Module_shadowsocks.asp 13 | rm -rf $KSROOT/bin/ss-tunnel 14 | rm -rf $KSROOT/bin/ss-local 15 | rm -rf $KSROOT/bin/ss-server 16 | rm -rf $KSROOT/bin/ss-redir 17 | rm -rf $KSROOT/bin/rss* 18 | rm -rf $KSROOT/bin/obfs* 19 | rm -rf $KSROOT/bin/pdnsd 20 | rm -rf $KSROOT/bin/Pcap_DNSProxy 21 | rm -rf $KSROOT/bin/dnscrypt-proxy 22 | rm -rf $KSROOT/bin/dns2socks 23 | rm -rf $KSROOT/bin/chinadns 24 | rm -rf $KSROOT/bin/resolveip 25 | 26 | 27 | dbus remove softcenter_module_shadowsocks_home_url 28 | dbus remove softcenter_module_shadowsocks_install 29 | dbus remove softcenter_module_shadowsocks_md5 30 | dbus remove softcenter_module_shadowsocks_version 31 | -------------------------------------------------------------------------------- /shadowsocks/version: -------------------------------------------------------------------------------- 1 | 1.2.1 2 | e7d58bbe5847ad93160a47af89bdedd4 3 | -------------------------------------------------------------------------------- /shellinabox/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin adm Changelog 2 | =========================================== 3 | 1.1 4 | - fix fix wan access 5 | 6 | 1.1 7 | - change change redirection 8 | 9 | 1.0 10 | - add add shellinabox 11 | 12 | -------------------------------------------------------------------------------- /shellinabox/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | 4 | MODULE=shellinabox 5 | VERSION=1.9 6 | TITLE=ShellnaBox 7 | DESCRIPTION=超强的SSH网页客户端 8 | HOME_URL=Module_shellinabox.asp 9 | 10 | # Check and include base 11 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 12 | if [ "$MODULE" == "" ]; then 13 | echo "module not found" 14 | exit 1 15 | fi 16 | 17 | if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then 18 | echo "install script not found" 19 | exit 2 20 | fi 21 | 22 | # now include build_base.sh 23 | . $DIR/../softcenter/build_base.sh 24 | 25 | # change to module directory 26 | cd $DIR 27 | 28 | # do something here 29 | 30 | do_build_result 31 | -------------------------------------------------------------------------------- /shellinabox/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.9", 3 | "md5":"a99e1fb5b944de286ce8bec6cce31718", 4 | "home_url":"Module_shellinabox.asp", 5 | "title":"ShellnaBox", 6 | "description":"超强的SSH网页客户端", 7 | "build_date":"2017-06-23_14:30:29" 8 | } 9 | -------------------------------------------------------------------------------- /shellinabox/shellinabox.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shellinabox/shellinabox.tar.gz -------------------------------------------------------------------------------- /shellinabox/shellinabox/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | if [ -z $KSROOT ]; then 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | fi 7 | 8 | cp -rf /tmp/shellinabox/shellinabox $KSROOT/ 9 | cp -rf /tmp/shellinabox/res/* $KSROOT/res/ 10 | cp -rf /tmp/shellinabox/webs/* $KSROOT/webs 11 | chmod 755 $KSROOT/shellinabox/* 12 | killall shellinaboxd 13 | sleep 1 14 | sh $KSROOT/shellinabox/shellinabox_start.sh 15 | dbus set __event__onwanstart_shellinlinux=$KSROOT/shellinabox/shellinabox_start.sh 16 | 17 | rm -rf /tmp/shellinabox* 18 | 19 | -------------------------------------------------------------------------------- /shellinabox/shellinabox/res/icon-shellinabox-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shellinabox/shellinabox/res/icon-shellinabox-bg.png -------------------------------------------------------------------------------- /shellinabox/shellinabox/res/icon-shellinabox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shellinabox/shellinabox/res/icon-shellinabox.png -------------------------------------------------------------------------------- /shellinabox/shellinabox/shellinabox/shellinabox_start.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | export KSROOT=/jffs/koolshare 3 | if [ ! -L "$KSROOT/init.d/S99Shellinabox.sh" ]; then 4 | ln -sf $KSROOT/shellinabox/shellinabox_start.sh $KSROOT/init.d/S99Shellinabox.sh 5 | fi 6 | case $ACTION in 7 | start) 8 | killall shellinaboxd 9 | $KSROOT/shellinabox/shellinaboxd --css=/jffs/koolshare/shellinabox/white-on-black.css -b 10 | ;; 11 | stop) 12 | killall shellinaboxd 13 | ;; 14 | *) 15 | killall shellinaboxd 16 | $KSROOT/shellinabox/shellinaboxd --css=/jffs/koolshare/shellinabox/white-on-black.css -b 17 | ;; 18 | esac 19 | -------------------------------------------------------------------------------- /shellinabox/shellinabox/shellinabox/shellinaboxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/shellinabox/shellinabox/shellinabox/shellinaboxd -------------------------------------------------------------------------------- /shellinabox/shellinabox/shellinabox/white-on-black.css: -------------------------------------------------------------------------------- 1 | #vt100 #cursor.bright { 2 | background-color: white; 3 | color: black; 4 | } 5 | 6 | #vt100 #cursor.dim { 7 | background-color: black; 8 | opacity: 0.2; 9 | -moz-opacity: 0.2; 10 | filter: alpha(opacity=20); 11 | } 12 | 13 | #vt100 #scrollable { 14 | font-size: 13px; 15 | color: #000; 16 | background-color: #fff; 17 | } 18 | 19 | #vt100 #scrollable.inverted { 20 | font-size: 13px; 21 | color: #fff; 22 | background-color: #000; 23 | } 24 | 25 | #vt100 .ansiDef { 26 | font-size: 13px; 27 | color: #000; 28 | } 29 | 30 | #vt100 .ansiDefR { 31 | font-size: 13px; 32 | color: #fff; 33 | } 34 | 35 | #vt100 .bgAnsiDef { 36 | font-size: 13px; 37 | background-color: #fff; 38 | } 39 | 40 | #vt100 .bgAnsiDefR { 41 | font-size: 13px; 42 | background-color: #000; 43 | } 44 | 45 | #vt100 #scrollable.inverted .ansiDef { 46 | font-size: 13px; 47 | color: #fff; 48 | } 49 | 50 | #vt100 #scrollable.inverted .ansiDefR { 51 | font-size: 13px; 52 | color: #000; 53 | } 54 | 55 | #vt100 #scrollable.inverted .bgAnsiDef { 56 | font-size: 13px; 57 | background-color: #000; 58 | } 59 | 60 | #vt100 #scrollable.inverted .bgAnsiDefR { 61 | font-size: 13px; 62 | background-color: #fff; 63 | } 64 | -------------------------------------------------------------------------------- /shellinabox/shellinabox/uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | killall shellinaboxd 4 | sleep 1 5 | rm -rf $KSROOT/res/icon-shellinabox* 6 | rm -rf $KSROOT/webs/Module_shellinabox.asp 7 | rm -rf $KSROOT/shellinabox 8 | -------------------------------------------------------------------------------- /shellinabox/shellinabox/webs/Module_shellinabox.asp: -------------------------------------------------------------------------------- 1 | Shellinabox 2 | 3 | 13 |
14 |
Shellinabox返回
15 |
16 | Shellinabox 是一个基于 Web 浏览器的远程终端模拟器,不需要开启 ssh服务,通过 Web 浏览器就可以对远程主机进行操作 17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 |
28 | -------------------------------------------------------------------------------- /shellinabox/version: -------------------------------------------------------------------------------- 1 | 1.9 2 | a99e1fb5b944de286ce8bec6cce31718 3 | -------------------------------------------------------------------------------- /softcenter/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin softeware center Changelog 2 | =========================================== 3 | 1.2.4 4 | - fix support https 5 | 6 | 1.1.9 7 | - fix fix hightlight of submeunL2 8 | 9 | 1.1.7 10 | - fix revert to 1.1.5 11 | 12 | 1.1.4 13 | - add add setting page 14 | 15 | 1.1.3 16 | - fix fix blank bar on top 17 | - fix fix shadowsocks appear in both install and uninstall 18 | 19 | 1.1.0 20 | - fix make shadowsocks the first icon in softerware center when using local data 21 | 22 | 1.0.9 23 | - fix fix shadowsocks turn to koolsocks when software center server is down 24 | - add make shadowsocks default installed in softerware center(prepare for the next fw) 25 | 26 | 1.0.8 27 | - fix icon position adjustmet 28 | 29 | 1.0.5 30 | - fix 插件隐藏按钮移动到右侧 31 | -------------------------------------------------------------------------------- /softcenter/README.md: -------------------------------------------------------------------------------- 1 | 软件中心原理 2 | ===== 3 | 负责维护与独立更新新增模块的安装脚本以及安装界面。也就是说路由器初步只需要安装软件中心,再由软件中心去更新各个模块的安装脚本与安装界面,用户就可以独立安装相应的模块了。恩,这个是一个好想法。 4 | 5 | 目前软件中心没有像 openwrt 一样使用 opkg 来解决软件安装的依赖问题。目前原因是为了简单。所以现在只是一个安装的压缩包,并没有解决软件中心的各大依赖问题。如果有依赖问题请在安装脚本里去实现与提示。 6 | 7 | 模块实现规定 8 | ====== 9 | 比如 adm 模块。本项目文件夹形式: 10 | * adm 11 | * adm adm程序本身的一些配置,以及可执行程序 12 | * bin 相关用到的可执行文件 13 | * init.d 启动脚本。其实是一个软链接 14 | * install.sh 模块本身解压之后要运行的安装脚本 15 | * scripts http 界面配置需要用到的网页配置相关脚本 16 | * adm_install.sh 软件中心安装包要带上它,以实现模块的安装 17 | * adm_udpate.sh 软件中心要带上它,以实现模块的更新 18 | * adm_config.sh 路由器 http server 服务的配置脚本 19 | * adm_uninstall.sh 卸载 20 | * webs 21 | * Module_adm.asp 路由器配置界面,软件中心要带上它,以实现模块界面的安装。用户才可以点开配置界面安装模块本身。 22 | * build.sh 模块生成脚本 23 | * config.json.js 当前项目在线版本号,通过跨域调用来获得此版本 24 | * version 版本信息文件,模块安装依赖此版本信息 25 | 26 | 软件中心设计初步想法 27 | ====== 28 | * 所有的图标存于./softcenter/res/software_center.png 29 | * 所有的 APP 信息存于 app.json.js 30 | * 已安装的数据,存于路由器内部 31 | * 未安装部分,实时从 github 拿到数据 32 | * 问题 33 | * 未安装部分的图片,如何实时从github当中拿? 34 | * 未安装部分的 css 如何实时从 github 动态拉取拿? 35 | -------------------------------------------------------------------------------- /softcenter/app.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "apps": [ 3 | { 4 | "build_date": "2017-05-24_18:59:08", 5 | "description": "shell on web~", 6 | "home_url": "Module_webshell.asp", 7 | "md5": "efad007e438e9bf9c18706f953594f87", 8 | "name": "webshell", 9 | "tar_url": "webshell/webshell.tar.gz", 10 | "title": "webshell", 11 | "version": "1.0.4" 12 | }, 13 | { 14 | "build_date": "2017-04-12_22:56:15", 15 | "description": "阿里云解析自动更新IP", 16 | "home_url": "Module_aliddns.asp", 17 | "md5": "a02e8b94dea8769e0c98188a51654928", 18 | "name": "aliddns", 19 | "tar_url": "aliddns/aliddns.tar.gz", 20 | "title": "AliDDNS", 21 | "version": "0.8" 22 | }, 23 | { 24 | "build_date": "2017-03-22_19:24:37", 25 | "description": "softether_vpn", 26 | "home_url": "Module_softether_vpn.asp", 27 | "md5": "ca50a5ed0db3087cc44b5d4e9fd75e4b", 28 | "name": "softether_vpn", 29 | "tar_url": "softether_vpn/softether_vpn.tar.gz", 30 | "title": "softether_vpn", 31 | "version": "1.0.1" 32 | }, 33 | { 34 | "build_date": "2016-11-25_21:35:44", 35 | "description": "不可描述", 36 | "home_url": "Module_kms.asp", 37 | "md5": "b320e48963559939a301e3fd1488b901", 38 | "module": "kms", 39 | "name": "kms", 40 | "tar_url": "kms/kms.tar.gz", 41 | "title": "系统工具", 42 | "version": "1.3" 43 | }, 44 | { 45 | "build_date": "2017-05-15_17:01:31", 46 | "description": "虚拟内存~", 47 | "home_url": "Module_swap.asp", 48 | "md5": "41d6f6a1a101ac373f94989dae1dcb1c", 49 | "name": "swap", 50 | "tar_url": "swap/swap.tar.gz", 51 | "title": "swap", 52 | "version": "1.0.4" 53 | }, 54 | { 55 | "build_date": "2018-06-07_10:28:32", 56 | "description": "支持http2协议的快速穿透", 57 | "home_url": "Module_ddnsto.asp", 58 | "md5": "79fbb004e478b2145e41a948114eb632", 59 | "name": "ddnsto", 60 | "tar_url": "ddnsto/ddnsto.tar.gz", 61 | "title": "ddnsto", 62 | "version": "1.8" 63 | }, 64 | { 65 | "build_date": "2017-05-15_16:58:26", 66 | "description": "小米R1D风扇控制插件", 67 | "home_url": "Module_xiaomi.asp", 68 | "md5": "2d213a39e8534a7969d3e65dbdd693f8", 69 | "name": "xiaomi", 70 | "tar_url": "xiaomi/xiaomi.tar.gz", 71 | "title": "xiaomi fan control", 72 | "version": "1.0.7" 73 | }, 74 | { 75 | "build_date": "2017-06-23_14:30:29", 76 | "description": "超强的SSH网页客户端", 77 | "home_url": "Module_shellinabox.asp", 78 | "md5": "a99e1fb5b944de286ce8bec6cce31718", 79 | "name": "shellinabox", 80 | "tar_url": "shellinabox/shellinabox.tar.gz", 81 | "title": "ShellnaBox", 82 | "version": "1.9" 83 | } 84 | ], 85 | "home_url": "https://raw.githubusercontent.com/koolshare/koolshare.github.io/master", 86 | "md5": "bc8bc4fd15b1939a3e3216cd6e8c6d24", 87 | "tar_url": "softcenter/softcenter.tar.gz", 88 | "version": "0.3.3" 89 | } -------------------------------------------------------------------------------- /softcenter/app.template.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.0.5", 3 | "md5":"a16640f5a0df9186897be0de52e6629a", 4 | "tar_url":"softcenter/softcenter.tar.gz", 5 | "home_url":"https://raw.githubusercontent.com/koolshare/koolshare.github.io/master", 6 | 7 | "apps": 8 | [ 9 | { 10 | "name":"adm", 11 | "title":"阿呆猫", 12 | "ver":"0.5", 13 | "home_url":"/Module_xunlei.asp", 14 | "tar_url":"adm/adm.tar.gz", 15 | "md5":"31559b347f6c8081ccdece78e50156d5" 16 | }, 17 | { 18 | } 19 | ] 20 | 21 | } 22 | -------------------------------------------------------------------------------- /softcenter/build.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | VERSION=0.3.3 3 | 4 | cat version 5 | rm -f softcenter.tar.gz 6 | mkdir -p ./softcenter/res 7 | 8 | python ./gen_install.py stage1 9 | 10 | chmod 755 ./softcenter/scripts/ks_app_install.sh 11 | 12 | tar -zcvf softcenter.tar.gz softcenter 13 | md5value=`md5sum softcenter.tar.gz|tr " " "\n"|sed -n 1p` 14 | cat > ./version < ./config.json.js < ./version < ./config.json.js < ./version < ./config.json.js < 1: 13 | stage = sys.argv[1] 14 | 15 | curr_path = os.path.dirname(os.path.realpath(__file__)) 16 | parent_path = os.path.realpath(os.path.join(curr_path, "..")) 17 | 18 | to_remove = None 19 | 20 | def md5sum(full_path): 21 | with open(full_path, 'rb') as rf: 22 | return hashlib.md5(rf.read()).hexdigest() 23 | 24 | def work_paths_by_walk(): 25 | index = 0 26 | for root,subdirs,files in os.walk(parent_path): 27 | index += 1 28 | for filepath in files: 29 | print os.path.join(root,filepath) 30 | for sub in subdirs: 31 | print os.path.join(root,sub) 32 | 33 | def work_parent(): 34 | ignore_paths = frozenset(["maintain_files", "softcenter", "appledns", "ngrok", "shadowsocks"]) 35 | for fname in os.listdir(parent_path): 36 | 37 | if fname[0] == "." or fname in ignore_paths: 38 | continue 39 | 40 | path = os.path.join(parent_path, fname) 41 | if os.path.isdir(path): 42 | #print fname 43 | #print path 44 | yield fname, path 45 | 46 | def work_files(parent, ext): 47 | for fname in os.listdir(parent): 48 | path = os.path.join(parent, fname) 49 | if os.path.isfile(path): 50 | yield path 51 | 52 | def check_subdir(module, path, name, ext, target_path): 53 | script_path = os.path.join(path, module, name) 54 | if os.path.isdir(script_path): 55 | for f in work_files(script_path, ext): 56 | target_file = os.path.join(target_path, os.path.basename(f)) 57 | #print "copy", f, "-->", target_file 58 | copyfile(f, target_file) 59 | if not target_file.endswith(".png") and to_remove: 60 | to_remove.write(target_file+"\n") 61 | 62 | def check_and_cp(): 63 | for module, path in work_parent(): 64 | #check_subdir(module, path, "scripts", ".sh", os.path.join(curr_path, "softcenter", "scripts")) 65 | #check_subdir(module, path, "webs", ".asp", os.path.join(curr_path, "softcenter", "webs")) 66 | #check_subdir(module, path, "scripts", ".sh", os.path.join(curr_path, "softcenter", "scripts")) 67 | check_subdir(module, path, "res", "*", os.path.join(curr_path, "softcenter", "res")) 68 | 69 | def gen_modules(modules): 70 | for module, path in work_parent(): 71 | conf = os.path.join(path, "config.json.js") 72 | 73 | m = None 74 | try: 75 | with codecs.open(conf, "r", "utf-8") as fc: 76 | m = json.loads(fc.read()) 77 | if m: 78 | m["name"] = module 79 | if "tar_url" not in m: 80 | m["tar_url"] = module + "/" + module + ".tar.gz" 81 | if "home_url" not in m: 82 | m["home_url"] = "Module_" + module + ".asp" 83 | except: 84 | pass 85 | 86 | if not m: 87 | m = {"name":module, "title":module, "tar_url": module + "/" + module + ".tar.gz"} 88 | modules.append(m) 89 | 90 | if stage == "stage1": 91 | to_remove = open(os.path.join(curr_path, "to_remove.txt"), "w") 92 | check_and_cp() 93 | to_remove.close() 94 | else: 95 | gmodules = None 96 | with codecs.open(os.path.join(curr_path, "app.template.json.js"), "r", "utf-8") as fg: 97 | gmodules = json.loads(fg.read()) 98 | gmodules["apps"] = [] 99 | gen_modules(gmodules["apps"]) 100 | 101 | with codecs.open(os.path.join(curr_path, "config.json.js"), "r", "utf-8") as fc: 102 | conf = json.loads(fc.read()) 103 | gmodules["version"] = conf["version"] 104 | gmodules["md5"] = conf["md5"] 105 | 106 | with codecs.open(os.path.join(curr_path, "app.json.js"), "w", "utf-8") as fw: 107 | json.dump(gmodules, fw, sort_keys = True, indent = 4, ensure_ascii=False, encoding='utf8') 108 | -------------------------------------------------------------------------------- /softcenter/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |

Hello to softcenter home page

4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /softcenter/modules.json: -------------------------------------------------------------------------------- 1 | [ 2 | {"module": "xunlei", "git_source": "https://github.com/Kenneyzh/xunlei.git"}, 3 | {"module": "syncthing", "git_source": "https://github.com/Kenneyzh/syncthing.git"}, 4 | {"module": "kuainiao", "git_source": "https://github.com/Kenneyzh/kuainiao.git"}, 5 | {"module": "dnspod", "git_source": "https://github.com/Kenneyzh/dnspod.git"}, 6 | {"module": "aria2", "git_source": "https://github.com/Kenneyzh/aria2.git"}, 7 | {"module": "gdddns", "git_source": "https://github.com/mritd/ttsoft-gdddns.git"}, 8 | {"module": "frpc", "git_source": "https://github.com/Kenneyzh/frpc.git"}, 9 | {} 10 | ] 11 | 12 | -------------------------------------------------------------------------------- /softcenter/push_message.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "title":"欢迎来到koolshare tomato软件中心", 3 | "content1":"插件下架通知(2017年7月17日):", 4 | "content2":"应有关部门通知要求,现对梅林固件软件中心内翻墙软件shadowsocks、shadowvpn进行下架处理;", 5 | "content3":"插件下架后将不能通过软件中心提供的在线服务进行安装,更新等操作。" 6 | } 7 | -------------------------------------------------------------------------------- /softcenter/softcenter.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter.tar.gz -------------------------------------------------------------------------------- /softcenter/softcenter/bin/base64_decode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/base64_decode -------------------------------------------------------------------------------- /softcenter/softcenter/bin/base64_encode: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/base64_encode -------------------------------------------------------------------------------- /softcenter/softcenter/bin/curl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/curl -------------------------------------------------------------------------------- /softcenter/softcenter/bin/curl-config: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | #*************************************************************************** 3 | # _ _ ____ _ 4 | # Project ___| | | | _ \| | 5 | # / __| | | | |_) | | 6 | # | (__| |_| | _ <| |___ 7 | # \___|\___/|_| \_\_____| 8 | # 9 | # Copyright (C) 2001 - 2012, Daniel Stenberg, , et al. 10 | # 11 | # This software is licensed as described in the file COPYING, which 12 | # you should have received as part of this distribution. The terms 13 | # are also available at https://curl.haxx.se/docs/copyright.html. 14 | # 15 | # You may opt to use, copy, modify, merge, publish, distribute and/or sell 16 | # copies of the Software, and permit persons to whom the Software is 17 | # furnished to do so, under the terms of the COPYING file. 18 | # 19 | # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 20 | # KIND, either express or implied. 21 | # 22 | ########################################################################### 23 | 24 | prefix=/mmc/curl 25 | exec_prefix=${prefix} 26 | includedir=${prefix}/include 27 | cppflag_curl_staticlib= 28 | 29 | usage() 30 | { 31 | cat <&2 162 | exit 1 163 | fi 164 | ;; 165 | 166 | --configure) 167 | echo " '--prefix=/mmc/curl' '--without-zlib' '--disable-rtsp' '--with-ssl'" 168 | ;; 169 | 170 | *) 171 | echo "unknown option: $1" 172 | usage 1 173 | ;; 174 | esac 175 | shift 176 | done 177 | 178 | exit 0 179 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/dbus: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/dbus -------------------------------------------------------------------------------- /softcenter/softcenter/bin/helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Asuswrt-Merlin helper functions 4 | # For use with Postconf scripts (and others) 5 | 6 | _quote() { 7 | echo $1 | sed 's/[]\/()$*.^|[]/\\&/g' 8 | } 9 | 10 | # This function looks for a string, and inserts a specified string after it inside a given file 11 | # $1: the line to locate, $2: the line to insert, $3: Config file where to insert 12 | pc_insert() { 13 | PATTERN=$(_quote "$1") 14 | CONTENT=$(_quote "$2") 15 | sed -i "/$PATTERN/a$CONTENT" $3 16 | } 17 | 18 | # This function looks for a string, and replace it with a different string inside a given file 19 | # $1: the line to locate, $2: the line to replace with, $3: Config file where to insert 20 | pc_replace() { 21 | PATTERN=$(_quote "$1") 22 | CONTENT=$(_quote "$2") 23 | sed -i "s/$PATTERN/$CONTENT/" $3 24 | } 25 | 26 | # This function will append a given string at the end of a given file 27 | # $1 The line to append at the end, $2: Config file where to append 28 | pc_append() { 29 | echo "$1" >> $2 30 | } 31 | 32 | # This function will delete a line containing a given string inside a given file 33 | # $1 The line to locate, $2: Config file where to delete 34 | pc_delete() { 35 | PATTERN=$(_quote "$1") 36 | sed -i "/$PATTERN/d" $2 37 | } 38 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/httpdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/httpdb -------------------------------------------------------------------------------- /softcenter/softcenter/bin/koolbox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/koolbox -------------------------------------------------------------------------------- /softcenter/softcenter/bin/ks-nat-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #ACTION=$1 4 | ACTION="start_nat" 5 | 6 | echo start `date` > /tmp/ks_nat_log.txt 7 | 8 | ks_nat=`nvram get ks_nat` 9 | [ "$ks_nat" == "1" ] && echo exit `date` >> /tmp/ks_nat_log.txt && exit 10 | 11 | for i in $(find /jffs/koolshare/init.d/ -name 'N*' | sort) ; 12 | do 13 | case "$i" in 14 | *.sh ) 15 | # Source shell script for speed. 16 | trap "" INT QUIT TSTP EXIT 17 | #set $1 18 | logger "nat_log_1 $i" 19 | if [ -r "$i" ]; then 20 | . $i $ACTION 21 | fi 22 | ;; 23 | *) 24 | # No sh extension, so fork subprocess. 25 | logger "nat_log_2 $i" 26 | $i $ACTION 27 | ;; 28 | esac 29 | done 30 | 31 | echo finish `date` >> /tmp/ks_nat_log.txt 32 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/ks-wan-start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z $KSROOT ]; then 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | fi 7 | 8 | echo start `date` > /tmp/ks_wan_log.txt 9 | 10 | # set ks_nat to 1, incase of nat start twice at the same time when booting system or ks-wan-start.sh and ks-nat-start.sh been trigered at the same time. 11 | # because when software start by wan, they start nat when nat is ready. 12 | nvram set ks_nat="1" 13 | 14 | #plugin.sh stop 15 | plugin.sh start 16 | 17 | # set ks_nat to 0 after system boot finished, 18 | # when system triger only the firewall restart, incase of some software's nat been flushed, set ks_nat to 0, 19 | # the ks-nat-start.sh will start /jffs/koolshare/inin.d/N*.sh to reload software's nat. 20 | nvram set ks_nat="0" 21 | 22 | echo finish `date` >> /tmp/ks_wan_log.txt 23 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/ks-wan-stop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | /usr/bin/plugin.sh stop 4 | 5 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/kscore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #set -x 3 | 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | export PERP_BASE=$KSROOT/perp 7 | mkdir -p /tmp/upload 8 | 9 | # change port for httpd if it's not 9527 10 | lanport=$(nvram get http_lanport) 11 | if [ "$lanport" != "9527" ]; then 12 | nvram set http_lanport1=$lanport 13 | nvram set http_lanport=9527 14 | nvram commit 15 | sleep 1 16 | if [ -n `pidof httpd` ];then 17 | service httpd restart 18 | fi 19 | fi 20 | 21 | # =============================== 22 | # start perp 23 | echo start perp skipd and httpdb 24 | sh $KSROOT/perp/perp.sh start 25 | 26 | # =============================== 27 | 28 | # set ks_nat to 1 29 | router_status=`date | grep -E "UTC 1970"` 30 | if [ -n "$router_status" ];then 31 | # if not empty, the ntp is not sync, indicating the router is booting 32 | nvram set ks_nat="1" 33 | else 34 | # if empty, the ntp is finished sync, indicating user behavior running this scripts 35 | nvram set ks_nat="0" 36 | fi 37 | 38 | # write PATH to profile (for advanced ssh user to easily access koolshare binary and scripts) 39 | mkdir -p /jffs/etc 40 | [ ! -L "/jffs/etc/profile" ] && ln -sf $KSROOT/scripts/base.sh /jffs/etc/profile 41 | 42 | 43 | # =============================== 44 | # define start up for wan and nat 45 | # now check if wan-start api exist 46 | script_wanup=`nvram get script_wanup` 47 | if [ -n "$script_wanup" ];then 48 | wanstart=`echo $script_wanup | grep -E "$KSROOT/bin/ks-wan-start.sh"` 49 | if [ -n "$wanstart" ];then 50 | echo wan start for ks-wan-start.sh already exist, do nothing! 51 | else 52 | echo append wan start command! 53 | nvram set script_wanup="#Do not delete ks-wan-start.sh! It's very important for software center!!! 54 | $KSROOT/bin/ks-wan-start.sh 55 | $script_wanup" 56 | fi 57 | else 58 | echo create wan start command! 59 | nvram set script_wanup="#Do not delete ks-wan-start.sh! It's very important for software center!!! 60 | $KSROOT/bin/ks-wan-start.sh" 61 | fi 62 | 63 | # now check if firewall-start api exist 64 | script_fire=`nvram get script_fire` 65 | if [ -n "$script_fire" ];then 66 | natstart=`echo $script_fire | grep -E "$KSROOT/bin/ks-nat-start.sh"` 67 | if [ -n "$natstart" ];then 68 | echo start up for ks-nat-start.sh already exist, do nothing! 69 | else 70 | echo append wan start command! 71 | nvram set script_fire="#Do not delete nat.sh! It's important for software center!!! 72 | $KSROOT/bin/ks-nat-start.sh 73 | $script_fire" 74 | fi 75 | else 76 | echo create nat start command! 77 | nvram set script_fire="#Do not delete kscore.sh! It's important for software center!!! 78 | $KSROOT/bin/ks-nat-start.sh" 79 | fi 80 | 81 | # now check if init-start api exist 82 | script_init=`nvram get script_init` 83 | if [ -n "$script_init" ];then 84 | kscore=`echo $script_init | grep -E "$KSROOT/bin/kscore.sh"` 85 | if [ -n "$kscore" ];then 86 | echo wan start for kscore already exist, do nothing! 87 | else 88 | echo append wan start command! 89 | nvram set script_init="#Do not delete kscore.sh! It's very important for software center!!! 90 | $KSROOT/bin/kscore.sh 91 | $script_init" 92 | fi 93 | else 94 | echo create init start command! 95 | nvram set script_init="#Do not delete kscore.sh! #It's very important for software center!!! 96 | $KSROOT/bin/kscore.sh" 97 | fi 98 | 99 | # save changes 100 | nvram commit 101 | # =============================== 102 | # now creat dnsmasq api 103 | mkdir -p /jffs/etc/dnsmasq.d 104 | [ -f "/jffs/etc/dnsmasq.custom" ] && conf_ok=`cat /jffs/etc/dnsmasq.custom|grep -E "conf-dir|koolshare"|wc -l` || conf_ok=0 105 | if [ "$conf_ok" != "2" ];then 106 | cat > /jffs/etc/dnsmasq.custom <<-EOF 107 | # koolshare modified 108 | conf-dir=/jffs/etc/dnsmasq.d 109 | EOF 110 | service dnsmasq restart 111 | fi 112 | [ ! -L "/etc/dnsmasq.custom" ] && ln -sf /jffs/etc/dnsmasq.custom /etc/dnsmasq.custom 113 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/openssl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/openssl -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perpboot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perpboot -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perpctl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perpctl -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perpd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perpd -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perphup: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perphup -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perpls: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perpls -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perpok: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perpok -------------------------------------------------------------------------------- /softcenter/softcenter/bin/perpstat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/perpstat -------------------------------------------------------------------------------- /softcenter/softcenter/bin/plugin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ACTION=$1 4 | 5 | if [ $# -lt 1 ]; then 6 | printf "Usage: $0 {start|stop|restart|reconfigure|check|kill}\n" >&2 7 | exit 1 8 | fi 9 | 10 | [ $ACTION = stop -o $ACTION = restart -o $ACTION = kill ] && ORDER="-r" 11 | 12 | for i in $(find /jffs/koolshare/init.d/ -name 'S*' | sort $ORDER ) ; 13 | do 14 | case "$i" in 15 | S* | *.sh ) 16 | # Source shell script for speed. 17 | trap "" INT QUIT TSTP EXIT 18 | #set $1 19 | logger "plugin_log_1 $i" 20 | if [ -r "$i" ]; then 21 | . $i $ACTION 22 | fi 23 | ;; 24 | *) 25 | # No sh extension, so fork subprocess. 26 | logger "plugin_log_2 $i" 27 | $i $ACTION 28 | ;; 29 | esac 30 | done 31 | 32 | -------------------------------------------------------------------------------- /softcenter/softcenter/bin/sissylog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/sissylog -------------------------------------------------------------------------------- /softcenter/softcenter/bin/skipd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/skipd -------------------------------------------------------------------------------- /softcenter/softcenter/bin/start-stop-daemon: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/start-stop-daemon -------------------------------------------------------------------------------- /softcenter/softcenter/bin/tinylog: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/tinylog -------------------------------------------------------------------------------- /softcenter/softcenter/bin/versioncmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/versioncmp -------------------------------------------------------------------------------- /softcenter/softcenter/bin/wget: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/bin/wget -------------------------------------------------------------------------------- /softcenter/softcenter/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | mkdir -p /jffs/koolshare 4 | export KSROOT=/jffs/koolshare 5 | 6 | _quote() { 7 | echo $1 | sed 's/[]\/()$*.^|[]/\\&/g' 8 | } 9 | 10 | pc_insert() { 11 | PATTERN=$(_quote "$1") 12 | CONTENT=$(_quote "$2") 13 | sed -i "/$PATTERN/a$CONTENT" $3 14 | } 15 | 16 | softcenter_install() { 17 | #remove useless files 18 | if [ -d "$KSROOT/init.d" ]; then 19 | rm -rf $KSROOT/init.d/S01Skipd.sh >/dev/null 2>&1 20 | rm -rf $KSROOT/init.d/S10softcenter.sh >/dev/null 2>&1 21 | fi 22 | 23 | # remove database if version below 0.1.5 24 | if [ -f "$KSROOT/bin/versioncmp" ] && [ -f "$KSROOT/bin/dbus" ] && [ -n `pidof skipd` ];then 25 | version_installed=`$KSROOT/bin/dbus get softcenter_version` 26 | version_comp=`$KSROOT/bin/versioncmp "$version_installed" "0.1.5"` 27 | if [ "$version_comp" == "1" ];then 28 | killall skipd 29 | rm -rf /jffs/db 30 | rm -rf $KSROOT/bin/skipd 31 | fi 32 | fi 33 | 34 | # install software center files 35 | if [ -d "/tmp/softcenter" ]; then 36 | mkdir -p $KSROOT 37 | mkdir -p $KSROOT/webs/ 38 | mkdir -p $KSROOT/init.d/ 39 | mkdir -p $KSROOT/res/ 40 | mkdir -p $KSROOT/bin/ 41 | cp -rf /tmp/softcenter/webs/* $KSROOT/webs/ 42 | cp -rf /tmp/softcenter/res/* $KSROOT/res/ 43 | cp -rf /tmp/softcenter/bin/* $KSROOT/bin/ 44 | cp -rf /tmp/softcenter/perp $KSROOT/ 45 | cp -rf /tmp/softcenter/scripts $KSROOT/ 46 | cp -rf /tmp/softcenter/module $KSROOT/ 47 | chmod 755 $KSROOT/bin/* 48 | chmod 755 $KSROOT/perp/* 49 | chmod 755 $KSROOT/perp/.boot/* 50 | chmod 755 $KSROOT/perp/.control/* 51 | chmod 755 $KSROOT/scripts/* 52 | chmod 755 $KSROOT/perp/httpdb/* 53 | chmod 755 $KSROOT/perp/skipd/* 54 | 55 | rm -rf /tmp/softcenter* 56 | mkdir -p /tmp/upload 57 | 58 | [ ! -L $KSROOT/bin/netstat ] && ln -sf $KSROOT/bin/koolbox $KSROOT/bin/netstat 59 | [ ! -L $KSROOT/bin/diff ] && ln -sf $KSROOT/bin/koolbox $KSROOT/bin/diff 60 | [ ! -L $KSROOT/webs/res ] && ln -sf $KSROOT/res $KSROOT/webs/res 61 | 62 | nvram unset at_nav 63 | nvram commit 64 | 65 | # re-make tomato.js everytime incase of fw updating 66 | cp -rf /www/tomato.js /jffs/koolshare/webs 67 | pc_insert "admin-upgrade.asp" "'插件市场': 'soft-center.asp'" "/jffs/koolshare/webs/tomato.js" 68 | pc_insert "admin-upgrade.asp" "'软件中心': {" "/jffs/koolshare/webs/tomato.js" 69 | pc_insert "admin-upgrade.asp" "}," "/jffs/koolshare/webs/tomato.js" 70 | 71 | # run kscore at last step 72 | sh /$KSROOT/bin/kscore.sh 73 | fi 74 | } 75 | 76 | softcenter_install 77 | -------------------------------------------------------------------------------- /softcenter/softcenter/module/nf_tproxy_core.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/module/nf_tproxy_core.ko -------------------------------------------------------------------------------- /softcenter/softcenter/module/xt_TPROXY.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/module/xt_TPROXY.ko -------------------------------------------------------------------------------- /softcenter/softcenter/module/xt_socket.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/module/xt_socket.ko -------------------------------------------------------------------------------- /softcenter/softcenter/perp/.boot/rc.log: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LOGDIR=/var/log/perpd 3 | exec tinylog -k 3 -s 5000 -t ${LOGDIR} 4 | -------------------------------------------------------------------------------- /softcenter/softcenter/perp/.boot/rc.perp: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec perpd -a 6 $PERP_BASE 3 | -------------------------------------------------------------------------------- /softcenter/softcenter/perp/.control/perpd.pid: -------------------------------------------------------------------------------- 1 | 30237 2 | -------------------------------------------------------------------------------- /softcenter/softcenter/perp/httpdb/rc.main: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | lanport1=$(nvram get http_lanport1) 7 | exec 2>&1 8 | exec httpdb -p $lanport1 -r $LANIP:9527 9 | -------------------------------------------------------------------------------- /softcenter/softcenter/perp/perp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | kill_all_process(){ 7 | killall perpboot >/dev/null 2>&1 8 | killall tinylog >/dev/null 2>&1 9 | killall perpd >/dev/null 2>&1 10 | killall skipd >/dev/null 2>&1 11 | [ -n `pidof skipd` ] && kill -9 `pidof skipd` >/dev/null 2>&1 12 | killall httpdb >/dev/null 2>&1 13 | [ -n `pidof httpdb` ] && kill -9 `pidof httpdb` >/dev/null 2>&1 14 | } 15 | 16 | case $ACTION in 17 | start) 18 | kill_all_process >/dev/null 2>&1 19 | sleep 1 20 | chmod +t $PERP_BASE/httpdb 21 | chmod +t $PERP_BASE/skipd 22 | perpboot -d 23 | ;; 24 | stop) 25 | kill_all_process >/dev/null 2>&1 26 | ;; 27 | *) 28 | echo "Usage: $0 (start)" 29 | exit 1 30 | ;; 31 | esac 32 | 33 | -------------------------------------------------------------------------------- /softcenter/softcenter/perp/skipd/rc.main: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | exec 2>&1 7 | exec skipd 8 | 9 | -------------------------------------------------------------------------------- /softcenter/softcenter/res/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/github.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-aliddns-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-aliddns-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-aliddns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-aliddns.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-aria2-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-aria2-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-aria2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-aria2.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-ddnspod-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-ddnspod-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-ddnspod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-ddnspod.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-ddnsto-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-ddnsto-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-ddnsto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-ddnsto.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-dnspod-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-dnspod-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-dnspod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-dnspod.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-frpc-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-frpc-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-frpc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-frpc.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-gdddns-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-gdddns-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-gdddns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-gdddns.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-kms-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-kms-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-kms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-kms.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-kuainiao-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-kuainiao-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-kuainiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-kuainiao.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-ngrok-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-ngrok-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-ngrok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-ngrok.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-phddns-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-phddns-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-phddns.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-phddns.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-shadowsocks-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-shadowsocks-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-shadowsocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-shadowsocks.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-shellinabox-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-shellinabox-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-shellinabox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-shellinabox.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-softether_vpn-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-softether_vpn-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-softether_vpn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-softether_vpn.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-swap-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-swap-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-swap.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-syncthing-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-syncthing-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-syncthing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-syncthing.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-webshell-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-webshell-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-webshell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-webshell.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-xiaomi-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-xiaomi-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-xiaomi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-xiaomi.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-xunlei-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-xunlei-bg.png -------------------------------------------------------------------------------- /softcenter/softcenter/res/icon-xunlei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softcenter/softcenter/res/icon-xunlei.png -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/base.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | export KSURL=https://ttsoft.ngrok.wang 5 | export PERP_BASE=$KSROOT/perp 6 | export PATH=$KSROOT/bin:$KSROOT/scripts:/usr/bin:/sbin:/bin:/usr/sbin 7 | 8 | ACTION=$1 9 | ID=$1 10 | export LANIP=$(nvram get lan_ipaddr) 11 | 12 | http_response() { 13 | ARG0="$@" 14 | curl -X POST -d "$ARG0" http://$LANIP/_resp/$ID 15 | } 16 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/config_sleep.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | TEST=testssonly 7 | echo "$TEST" 8 | 9 | sleep 30 10 | http_response "$TEST" 11 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/config_ss.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | TEST=testssonly 7 | echo "$TEST" 8 | dbus set testss=$TEST 9 | 10 | http_response "$TEST" 11 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/dummy_script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | http_response "$1" -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/ks_app_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | #From dbus to local variable 7 | eval `dbus export softcenter_installing_` 8 | 9 | softcenter_home_url=`dbus get softcenter_home_url` 10 | CURR_TICK=`date +%s` 11 | BIN_NAME=$(basename "$0") 12 | BIN_NAME="${BIN_NAME%.*}" 13 | if [ "$ACTION" != "" ]; then 14 | BIN_NAME=$ACTION 15 | fi 16 | 17 | VER_SUFFIX=_version 18 | MD5_SUFFIX=_md5 19 | NAME_SUFFIX=_name 20 | INSTALL_SUFFIX=_install 21 | UNINSTALL_SUFFIX=_uninstall 22 | 23 | LOGGER() { 24 | # echo $1 25 | logger $1 26 | http_response $1 27 | } 28 | 29 | install_module() { 30 | if [ "$softcenter_home_url" = "" -o "$softcenter_installing_md5" = "" -o "$softcenter_installing_version" = "" ]; then 31 | LOGGER "错误:获取插件信息不完整" 32 | exit 1 33 | fi 34 | 35 | if [ "$softcenter_installing_tick" = "" ]; then 36 | export softcenter_installing_tick=0 37 | fi 38 | LAST_TICK=`expr $softcenter_installing_tick + 20` 39 | if [ "$LAST_TICK" -ge "$CURR_TICK" -a "$softcenter_installing_module" != "" ]; then 40 | LOGGER "插件 $softcenter_installing_module 正在安装中,请稍后再试" 41 | exit 2 42 | fi 43 | 44 | if [ "$softcenter_installing_todo" = "" ]; then 45 | #curr module name not found 46 | LOGGER "错误:未知的插件" 47 | exit 3 48 | fi 49 | 50 | # Just ignore the old installing_module 51 | export softcenter_installing_module=$softcenter_installing_todo 52 | export softcenter_installing_tick=`date +%s` 53 | export softcenter_installing_status="2" 54 | dbus save softcenter_installing_ 55 | sleep 2 56 | URL_SPLIT="/" 57 | #OLD_MD5=`dbus get softcenter_module_$softcenter_installing_module$MD5_SUFFIX` 58 | OLD_VERSION=`dbus get softcenter_module_$softcenter_installing_module$VER_SUFFIX` 59 | HOME_URL=`dbus get softcenter_home_url` 60 | TAR_URL=$HOME_URL$URL_SPLIT$softcenter_installing_tar_url 61 | FNAME=`basename $softcenter_installing_tar_url` 62 | 63 | if [ "$OLD_VERSION" = "" ]; then 64 | OLD_VERSION=0 65 | fi 66 | 67 | CMP=`versioncmp $softcenter_installing_version $OLD_VERSION` 68 | if [ -f $KSROOT/webs/Module_$softcenter_installing_module.sh -o "$softcenter_installing_todo" = "softcenter" ]; then 69 | CMP="-1" 70 | fi 71 | if [ "$CMP" = "-1" ]; then 72 | 73 | cd /tmp 74 | rm -f $FNAME 75 | rm -rf "/tmp/$softcenter_installing_module" 76 | dbus set softcenter_installing_status="3" 77 | sleep 2 78 | wget --no-check-certificate --tries=1 --timeout=15 $TAR_URL 79 | RETURN_CODE=$? 80 | 81 | if [ "$RETURN_CODE" != "0" ]; then 82 | dbus set softcenter_installing_status="12" 83 | sleep 2 84 | 85 | dbus set softcenter_installing_status="0" 86 | dbus set softcenter_installing_module="" 87 | dbus set softcenter_installing_todo="" 88 | LOGGER "下载失败:错误代码 $RETURN_CODE" 89 | exit 4 90 | fi 91 | 92 | md5sum_gz=$(md5sum /tmp/$FNAME | sed 's/ /\n/g'| sed -n 1p) 93 | if [ "$md5sum_gz"x != "$softcenter_installing_md5"x ]; then 94 | LOGGER "错误MD5校验失败!软件中心插件MD5:$md5sum_gz" 95 | dbus set softcenter_installing_status="12" 96 | rm -f $FNAME 97 | sleep 2 98 | 99 | dbus set softcenter_installing_status="0" 100 | dbus set softcenter_installing_module="" 101 | dbus set softcenter_installing_todo="" 102 | 103 | rm -f $FNAME 104 | rm -rf "/tmp/$softcenter_installing_module" 105 | exit 106 | else 107 | tar -zxf $FNAME 108 | dbus set softcenter_installing_status="4" 109 | sleep 2 110 | if [ ! -f /tmp/$softcenter_installing_module/install.sh ]; then 111 | dbus set softcenter_installing_status="0" 112 | dbus set softcenter_installing_module="" 113 | dbus set softcenter_installing_todo="" 114 | 115 | #rm -f $FNAME 116 | #rm -rf "/tmp/$softcenter_installing_module" 117 | 118 | LOGGER "错误:插件包中没有 Install.sh 文件。" 119 | exit 5 120 | fi 121 | 122 | if [ -f /tmp/$softcenter_installing_module/uninstall.sh ]; then 123 | chmod 755 /tmp/$softcenter_installing_module/uninstall.sh 124 | mv /tmp/$softcenter_installing_module/uninstall.sh $KSROOT/scripts/uninstall_$softcenter_installing_todo.sh 125 | fi 126 | 127 | chmod a+x /tmp/$softcenter_installing_module/install.sh 128 | sh /tmp/$softcenter_installing_module/install.sh 129 | sleep 2 130 | 131 | rm -f $FNAME 132 | rm -rf "/tmp/$softcenter_installing_module" 133 | 134 | if [ "$softcenter_installing_module" != "softcenter" ]; then 135 | dbus set softcenter_installing_status="5" 136 | sleep 1 137 | dbus set "softcenter_module_$softcenter_installing_module$NAME_SUFFIX=$softcenter_installing_module" 138 | dbus set "softcenter_module_$softcenter_installing_module$MD5_SUFFIX=$softcenter_installing_md5" 139 | dbus set "softcenter_module_$softcenter_installing_module$VER_SUFFIX=$softcenter_installing_version" 140 | dbus set "softcenter_module_$softcenter_installing_module$INSTALL_SUFFIX=1" 141 | dbus set "$softcenter_installing_module$VER_SUFFIX=$softcenter_installing_version" 142 | else 143 | dbus set softcenter_version=$softcenter_installing_version; 144 | dbus set softcenter_md5=$softcenter_installing_md5 145 | fi 146 | dbus set softcenter_installing_module="" 147 | dbus set softcenter_installing_todo="" 148 | dbus set softcenter_installing_status="0" 149 | #LOGGER "ok" 150 | fi 151 | 152 | else 153 | LOGGER "已经是最新版本" 154 | dbus set softcenter_installing_status="13" 155 | sleep 3 156 | 157 | dbus set softcenter_installing_status="0" 158 | dbus set softcenter_installing_module="" 159 | dbus set softcenter_installing_todo="" 160 | fi 161 | } 162 | 163 | #LOGGER $BIN_NAME 164 | case $BIN_NAME in 165 | update) 166 | install_module 167 | ;; 168 | install) 169 | install_module 170 | ;; 171 | ks_app_install) 172 | install_module 173 | ;; 174 | stop) 175 | # reset installing status incase of install failed 176 | dbus set softcenter_installing_status="0" 177 | echo software center: do nothing 178 | ;; 179 | *) 180 | install_module 181 | ;; 182 | esac 183 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/ks_app_remove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | #From dbus to local variable 7 | eval `dbus export softcenter_installing_` 8 | 9 | softcenter_home_url=`dbus get softcenter_home_url` 10 | CURR_TICK=`date +%s` 11 | BIN_NAME=$(basename "$0") 12 | BIN_NAME="${BIN_NAME%.*}" 13 | if [ "$ACTION" != "" ]; then 14 | BIN_NAME=$ACTION 15 | fi 16 | 17 | VER_SUFFIX=_version 18 | MD5_SUFFIX=_md5 19 | NAME_SUFFIX=_name 20 | INSTALL_SUFFIX=_install 21 | UNINSTALL_SUFFIX=_uninstall 22 | 23 | LOGGER() { 24 | # echo $1 25 | http_response $1 26 | logger $1 27 | 28 | } 29 | 30 | uninstall_module() { 31 | if [ "$softcenter_installing_tick" = "" ]; then 32 | export softcenter_installing_tick=0 33 | fi 34 | LAST_TICK=`expr $softcenter_installing_tick + 20` 35 | if [ "$LAST_TICK" -ge "$CURR_TICK" -a "$softcenter_installing_module" != "" ]; then 36 | LOGGER "插件 $softcenter_installing_module 正在安装中" 37 | exit 2 38 | fi 39 | 40 | if [ "$softcenter_installing_todo" = "" -o "$softcenter_installing_todo" = "softcenter" ]; then 41 | #curr module name not found 42 | LOGGER "不存在的插件" 43 | exit 3 44 | fi 45 | 46 | ENABLED=`dbus get "$softcenter_installing_todo""_enable"` 47 | if [ "$ENABLED" = "1" ]; then 48 | LOGGER "程序正在运行,请关闭后再试!" 49 | exit 4 50 | fi 51 | 52 | # Just ignore the old installing_module 53 | export softcenter_installing_module=$softcenter_installing_todo 54 | export softcenter_installing_tick=`date +%s` 55 | export softcenter_installing_status="6" 56 | dbus save softcenter_installing_ 57 | 58 | dbus remove "softcenter_module_$softcenter_installing_module$MD5_SUFFIX" 59 | dbus remove "softcenter_module_$softcenter_installing_module$VER_SUFFIX" 60 | dbus remove "softcenter_module_$softcenter_installing_module$INSTALL_SUFFIX" 61 | dbus remove "softcenter_module_$softcenter_installing_module$NAME_SUFFIX" 62 | 63 | txt=`dbus list $softcenter_installing_todo` 64 | printf "%s\n" "$txt" | 65 | while IFS= read -r line; do 66 | line2="${line%=*}" 67 | if [ "$line2" != "" ]; then 68 | dbus remove $line2 69 | fi 70 | done 71 | 72 | sleep 3 73 | dbus set softcenter_installing_module="" 74 | dbus set softcenter_installing_status="7" 75 | sleep 1 76 | dbus set softcenter_installing_todo="" 77 | 78 | #try to call uninstall script 79 | if [ -f "$KSROOT/scripts/$softcenter_installing_todo$UNINSTALL_SUFFIX.sh"]; then 80 | sh $KSROOT/scripts/$softcenter_installing_todo$UNINSTALL_SUFFIX.sh 81 | elif [ -f "$KSROOT/scripts/uninstall_$softcenter_installing_todo.sh" ]; then 82 | sh $KSROOT/scripts/uninstall_$softcenter_installing_todo.sh 83 | else 84 | rm -f $KSROOT/webs/Module_$softcenter_installing_todo.asp 85 | rm -f $KSROOT/init.d/S*$softcenter_installing_todo.sh 86 | fi 87 | curl -s $KSURL/"$softcenter_installing_module"/"$softcenter_installing_module"/install.sh >/dev/null 2>&1 88 | dbus set softcenter_installing_status="0" 89 | } 90 | 91 | #LOGGER $BIN_NAME 92 | case $BIN_NAME in 93 | start) 94 | sh $KSROOT/perp/perp.sh stop 95 | sh $KSROOT/perp/perp.sh start 96 | ;; 97 | ks_app_remove) 98 | uninstall_module 99 | ;; 100 | *) 101 | uninstall_module 102 | ;; 103 | esac 104 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/ks_tar_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | #From dbus to local variable 6 | eval `dbus export soft` 7 | name=`echo "$soft_name"|cut -d "." -f1` 8 | 9 | cat /dev/null > /tmp/upload/soft_log.txt 10 | INSTALL_SUFFIX=_install 11 | VER_SUFFIX=_version 12 | NAME_SUFFIX=_name 13 | rm -rf /tmp/upload/soft_log.txt 14 | cd /tmp/upload/ 15 | echo $(date): 开启软件离线安装!>> /tmp/upload/soft_log.txt 16 | sleep 1 17 | if [ -f /tmp/upload/$soft_name ];then 18 | echo $(date): /tmp目录下检测到上传的离线安装包$soft_name >> /tmp/upload/soft_log.txt 19 | sleep 1 20 | echo $(date): 尝试解压离线安装包离线安装包 >> /tmp/upload/soft_log.txt 21 | sleep 1 22 | tar -zxvf $soft_name -C /tmp >/dev/null 2>&1 23 | echo $(date): 解压完成! >> /tmp/upload/soft_log.txt 24 | sleep 1 25 | cd /tmp/ 26 | if [ -f /tmp/$name/install.sh ];then 27 | echo $(date): 找到安装脚本! >> /tmp/upload/soft_log.txt 28 | echo $(date): 运行安装脚本... >> /tmp/upload/soft_log.txt 29 | sleep 1 30 | chmod +x /tmp/$name/install.sh >/dev/null 2>&1 31 | sh /tmp/$name/install.sh >/dev/null 2>&1 32 | dbus set "softcenter_module_$name$NAME_SUFFIX=$name" 33 | dbus set "softcenter_module_$name$INSTALL_SUFFIX=1" 34 | dbus set "softcenter_module_$name$VER_SUFFIX=$soft_install_version" 35 | install_pid=`ps | grep install.sh | grep -v grep | awk '{print $1}'` 36 | i=120 37 | until [ ! -n "$install_pid" ] 38 | do 39 | i=$(($i-1)) 40 | if [ "$i" -lt 1 ];then 41 | echo $(date): "Could not load nat rules!" 42 | echo $(date): 安装似乎出了点问题,请手动重启路由器后重新尝试... >> /tmp/upload/soft_log.txt 43 | echo $(date): 删除相关文件并退出... >> /tmp/upload/soft_log.txt 44 | sleep 1 45 | rm -rf /tmp/$name 46 | rm -rf /tmp/upload/$soft_name 47 | dbus remove "softcenter_module_$name$INSTALL_SUFFIX" 48 | echo jobdown >> /tmp/upload/soft_log.txt 49 | exit 50 | fi 51 | sleep 1 52 | done 53 | echo $(date): 离线包安装完成! >> /tmp/upload/soft_log.txt 54 | sleep 1 55 | echo $(date): 一点点清理工作... >> /tmp/upload/soft_log.txt 56 | sleep 1 57 | rm -rf /tmp/$name 58 | rm -rf /tmp/upload/$soft_name 59 | echo $(date): 完成! >> /tmp/upload/soft_log.txt 60 | sleep 1 61 | echo jobdown >> /tmp/upload/soft_log.txt 62 | else 63 | echo $(date): 没有找到安装脚本! >> /tmp/upload/soft_log.txt 64 | echo $(date): 删除相关文件并退出... >> /tmp/upload/soft_log.txt 65 | rm -rf /tmp/$name 66 | rm -rf /tmp/upload/$soft_name 67 | echo jobdown >> /tmp/upload/soft_log.txt 68 | fi 69 | else 70 | echo $(date): 没有找到离线安装包! >> /tmp/upload/soft_log.txt 71 | echo $(date): 删除相关文件并退出... >> /tmp/upload/soft_log.txt 72 | rm -rf /tmp/$name 73 | rm -rf /tmp/upload/$soft_name 74 | echo jobdown >> /tmp/upload/soft_log.txt 75 | fi 76 | echo jobdown >> /tmp/upload/soft_log.txt 77 | rm -rf /tmp/$name 78 | rm -rf /tmp/upload/$soft_name 79 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/ks_update_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | i=120 6 | until [ -n "$PERP" ] 7 | PERP=`pidof perpd` 8 | do 9 | i=$(($i-1)) 10 | if [ "$i" -lt 1 ];then 11 | exit 12 | fi 13 | sleep 1 14 | echo $i 15 | done 16 | 17 | sleep 3 18 | 19 | run_time=`perpls httpdb|awk '{print $6}'|cut -d "s" -f1` 20 | 21 | if [ "$run_time" -lt "20" ];then 22 | http_response "1" 23 | else 24 | http_response "0" 25 | fi 26 | -------------------------------------------------------------------------------- /softcenter/softcenter/scripts/onssstart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for line in $(dbus list __event__onssstart_|cut -d"=" -f2) 4 | do 5 | sh $line 6 | done -------------------------------------------------------------------------------- /softcenter/switch_server.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "1":"when this file avaliable, use ttsoft in default!", 3 | "2":"do not delete this file!" 4 | } 5 | -------------------------------------------------------------------------------- /softcenter/tests/koolproxy_rules.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "msg1": "KoolProxy是一款支持正则的代理软件,可以帮助你轻松的过滤你想屏蔽的网页或者网页的部分内容,支持https!", 3 | "msg2": "", 4 | "msg3": "", 5 | "rules": 6 | [ 7 | [ 8 | "视频规则", 9 | "https://rules.ngrok.wang/1.dat", 10 | "none", 11 | "2017-02-15 09:10:29" 12 | ], 13 | [ 14 | "静态规则", 15 | "https://rules.ngrok.wang/koolproxy.txt", 16 | "none", 17 | "2017-02-15 09:10:35" 18 | ], 19 | [ 20 | "防败家规则", 21 | "https://rules.ngrok.wang/no_shopping.txt", 22 | "none", 23 | "2017-02-15 09:10:35" 24 | ] 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /softcenter/tests/test_app.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | #dbus set softcenter_home_url="https://github.com/koolshare/koolshare.github.io/blob/acelan_softcenter_ui" 4 | #dbus set softcenter_home_url="https://raw.githubusercontent.com/koolshare/koolshare.github.io/acelan_softcenter_ui" 5 | dbus set softcenter_home_url="http://koolshare.ngrok.wang:5000" 6 | 7 | 8 | #test001, normal installing 9 | dbus remove adm_version 10 | dbus remove adm_md5 11 | 12 | #export softcenter_installing_module 13 | #export softcenter_installing_tick 14 | export softcenter_installing_todo=adm 15 | export softcenter_installing_version=0.5 16 | export softcenter_installing_md5=a9148835ab402d8f1ba920aea40011a3 17 | export softcenter_installing_tar_url="adm/adm.tar.gz" 18 | dbus save softcenter_installing 19 | 20 | sh /koolshare/scripts/app_install.sh 21 | 22 | rlt=`dbus get softcenter_installing_status` 23 | if [ "$rlt" != "1" ]; then 24 | echo "test001 failed" 25 | exit 26 | fi 27 | 28 | #test002, normal udpating 29 | dbus set adm_version=0.4 30 | 31 | #export softcenter_installing_module 32 | #export softcenter_installing_tick 33 | export softcenter_installing_todo=adm 34 | export softcenter_installing_version=0.5 35 | export softcenter_installing_md5=a9148835ab402d8f1ba920aea40011a3 36 | export softcenter_installing_tar_url="adm/adm.tar.gz" 37 | dbus save softcenter_installing 38 | 39 | sh /koolshare/scripts/app_install.sh 40 | 41 | rlt=`dbus get softcenter_installing_status` 42 | if [ "$rlt" != "1" ]; then 43 | echo "test002 failed" 44 | exit 45 | fi 46 | 47 | 48 | #test003, prefix exists but timeout 49 | dbus set adm_version=0.4 50 | 51 | export softcenter_installing_module=shadowvpn 52 | export softcenter_installing_tick=10000 53 | export softcenter_installing_todo=adm 54 | export softcenter_installing_version=0.5 55 | export softcenter_installing_md5=a9148835ab402d8f1ba920aea40011a3 56 | export softcenter_installing_tar_url="adm/adm.tar.gz" 57 | dbus save softcenter_installing 58 | 59 | sh /koolshare/scripts/app_install.sh 60 | 61 | rlt=`dbus get softcenter_installing_status` 62 | if [ "$rlt" != "1" ]; then 63 | echo "test003 failed" 64 | exit 65 | fi 66 | 67 | 68 | #test004, the newest version 69 | dbus set adm_version=0.5 70 | 71 | #export softcenter_installing_module=shadowvpn 72 | #export softcenter_installing_tick=10000 73 | export softcenter_installing_todo=adm 74 | export softcenter_installing_version=0.5 75 | export softcenter_installing_md5=a9148835ab402d8f1ba920aea40011a3 76 | export softcenter_installing_tar_url="adm/adm.tar.gz" 77 | dbus save softcenter_installing 78 | 79 | sh /koolshare/scripts/app_install.sh 80 | 81 | rlt=`dbus get softcenter_installing_status` 82 | if [ "$rlt" == "1" ]; then 83 | echo "test004 failed" 84 | exit 85 | fi 86 | 87 | 88 | #test005, prefix installing exits and not timeout 89 | dbus set adm_version=0.4 90 | 91 | export softcenter_installing_module=shadowvpn 92 | export softcenter_installing_tick=`date +%s` 93 | export softcenter_installing_todo=adm 94 | export softcenter_installing_version=0.5 95 | export softcenter_installing_md5=a9148835ab402d8f1ba920aea40011a3 96 | export softcenter_installing_tar_url="adm/adm.tar.gz" 97 | dbus save softcenter_installing 98 | 99 | sh /koolshare/scripts/app_install.sh 100 | 101 | rlt=`dbus get softcenter_installing_status` 102 | if [ "$rlt" == "1" ]; then 103 | echo "test005 failed" 104 | exit 105 | fi 106 | 107 | 108 | #test006, home_url timeout 109 | dbus set softcenter_home_url="http://koolshare.ngrok.wang:50000" 110 | dbus set adm_version=0.4 111 | 112 | export softcenter_installing_module= 113 | export softcenter_installing_tick= 114 | export softcenter_installing_todo=adm 115 | export softcenter_installing_version=0.5 116 | export softcenter_installing_md5=a9148835ab402d8f1ba920aea40011a3 117 | export softcenter_installing_tar_url="adm/adm.tar.gz" 118 | dbus save softcenter_installing 119 | 120 | sh /koolshare/scripts/app_install.sh 121 | 122 | rlt=`dbus get softcenter_installing_status` 123 | echo "result $rlt" 124 | if [ "$rlt" == "1" ]; then 125 | echo "test006 failed" 126 | exit 127 | fi 128 | -------------------------------------------------------------------------------- /softcenter/tests/test_app_one.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z $KSROOT ]; then 4 | export KSROOT=/jffs/koolshare 5 | source $KSROOT/scripts/base.sh 6 | fi 7 | 8 | #dbus set softcenter_home_url="https://github.com/koolshare/koolshare.github.io/blob/acelan_softcenter_ui" 9 | #dbus set softcenter_home_url="https://raw.githubusercontent.com/koolshare/koolshare.github.io/acelan_softcenter_ui" 10 | dbus set softcenter_home_url="https://ttsoft.ngrok.wang" 11 | 12 | 13 | #test001, normal installing 14 | #dbus remove shellinabox_version 15 | #dbus remove shellinabox_md5 16 | 17 | #export softcenter_installing_module 18 | #export softcenter_installing_tick 19 | export softcenter_installing_todo=shellinabox 20 | export softcenter_installing_version=1.4 21 | export softcenter_installing_md5=3b091ac52447e6dafe3386a0e25b3d0c 22 | export softcenter_installing_tar_url="shellinabox/shellinabox.tar.gz" 23 | dbus save softcenter_installing 24 | 25 | sh $KSROOT/scripts/ks_app_install.sh 26 | 27 | rlt=`dbus get softcenter_installing_status` 28 | if [ "$rlt" != "1" ]; then 29 | echo "test001 failed" 30 | exit 31 | fi 32 | -------------------------------------------------------------------------------- /softcenter/tests/test_app_remove.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | dbus set softcenter_home_url="http://koolshare.ngrok.wang:5000" 4 | dbus set softcenter_installing_todo=adm 5 | 6 | sh /koolshare/scripts/app_remove.sh 7 | -------------------------------------------------------------------------------- /softcenter/ttsoft: -------------------------------------------------------------------------------- 1 | cd /tmp;/usr/bin/wget https://ttsoft.ngrok.wang/softcenter/ttsoft_install.sh;chmod +x ttsoft_install.sh;sh ttsoft_install.sh 2 | -------------------------------------------------------------------------------- /softcenter/ttsoft_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cd /tmp 3 | /usr/bin/wget https://ttsoft.ngrok.wang/softcenter/softcenter.tar.gz 4 | tar -zxvf /tmp/softcenter.tar.gz 5 | sh /tmp/softcenter/install.sh 6 | -------------------------------------------------------------------------------- /softcenter/version: -------------------------------------------------------------------------------- 1 | 0.3.3 2 | bc8bc4fd15b1939a3e3216cd6e8c6d24 3 | -------------------------------------------------------------------------------- /softether_vpn/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin softether_vpn Changelog 2 | =========================================== 3 | 1.0.0 add softether_vpn 4 | 1.0.1 remove console info 5 | -------------------------------------------------------------------------------- /softether_vpn/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum softether_vpn.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./softether_vpn.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./softether_vpn.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /softether_vpn/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE=softether_vpn 4 | VERSION=1.0.1 5 | TITLE=softether_vpn 6 | DESCRIPTION=softether_vpn 7 | HOME_URL=Module_softether_vpn.asp 8 | #!/bin/sh 9 | # Check and include base 10 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | echo $DIR 12 | if [ "$MODULE" == "" ]; then 13 | echo "module not found" 14 | exit 1 15 | fi 16 | 17 | if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then 18 | echo "install script not found" 19 | exit 2 20 | fi 21 | 22 | # now include build_base.sh 23 | . $DIR/../softcenter/build_base.sh 24 | 25 | # change to module directory 26 | cd $DIR 27 | 28 | # do something here 29 | 30 | do_build_result 31 | 32 | sh backup.sh 33 | -------------------------------------------------------------------------------- /softether_vpn/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.0.1", 3 | "md5":"ca50a5ed0db3087cc44b5d4e9fd75e4b", 4 | "home_url":"Module_softether_vpn.asp", 5 | "title":"softether_vpn", 6 | "description":"softether_vpn", 7 | "build_date":"2017-03-22_19:24:37" 8 | } 9 | -------------------------------------------------------------------------------- /softether_vpn/history/1.0.0/softether_vpn.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/history/1.0.0/softether_vpn.tar.gz -------------------------------------------------------------------------------- /softether_vpn/history/1.0.1/softether_vpn.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/history/1.0.1/softether_vpn.tar.gz -------------------------------------------------------------------------------- /softether_vpn/history/version: -------------------------------------------------------------------------------- 1 | 1.0.0 4aac5fdc84e20e78b9e95c25f9d5303f 2 | 1.0.1 ca50a5ed0db3087cc44b5d4e9fd75e4b 3 | -------------------------------------------------------------------------------- /softether_vpn/softether_vpn.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/softether_vpn.tar.gz -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export softether` 6 | 7 | enable=`dbus get softether_enable` 8 | if [ -f "$KSROOT/softether/vpn_server.config" ];then 9 | tap=`cat vpn_server.config |grep "bool TapMode true"` 10 | else 11 | tap="" 12 | fi 13 | 14 | if [ "$enable" == 1 ];then 15 | sh $KSROOT/softether/softether.sh stop 16 | fi 17 | 18 | cd /tmp 19 | cp -rf /tmp/softether_vpn/softether $KSROOT 20 | cp -rf /tmp/softether_vpn/scripts/* $KSROOT/scripts/ 21 | cp -rf /tmp/softether_vpn/webs/* $KSROOT/webs/ 22 | cp -rf /tmp/softether_vpn/res/* $KSROOT/res/ 23 | 24 | cp /tmp/webshell/uninstall.sh $KSROOT/scripts/uninstall_webshell.sh 25 | 26 | # 为新安装文件赋予执行权限... 27 | chmod 755 $KSROOT/softether/* 28 | chmod 755 $KSROOT/scripts/softether* 29 | 30 | sleep 1 31 | rm -rf /tmp/softether* >/dev/null 2>&1 32 | 33 | if [ "$enable" == 1 ] && [ -n "$tap" ];then 34 | sh $KSROOT/softether/softether.sh restart 35 | fi 36 | 37 | -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/res/icon-softether_vpn-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/softether_vpn/res/icon-softether_vpn-bg.png -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/res/icon-softether_vpn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/softether_vpn/res/icon-softether_vpn.png -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/scripts/softether_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | alias echo_date1='echo $(date +%Y年%m月%d日\ %X)' 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export softether_` 6 | 7 | # this part for start up 8 | case $1 in 9 | start) 10 | # the soft link should be create after boot 11 | [ "$softether_enable" == "1" ] && sh $KSROOT/softether/softether.sh restart 12 | ;; 13 | stop) 14 | sh $KSROOT/softether/softether.sh stop 15 | ;; 16 | esac 17 | 18 | # this part for web runing using httpdb 19 | case $2 in 20 | 1) 21 | if [ "$softether_enable" == "1" ];then 22 | sh $KSROOT/softether/softether.sh restart > /tmp/upload/softether_log.txt 23 | else 24 | sh $KSROOT/softether/softether.sh stop > /tmp/upload/softether_log.txt 25 | fi 26 | echo XU6J03M6 >> /tmp/upload/softether_log.txt 27 | http_response $1 28 | ;; 29 | esac -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/softether/hamcore.se2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/softether_vpn/softether/hamcore.se2 -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/softether/softether.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | # 导入skipd数据 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export softether` 6 | alias echo_date='echo 【$(date +%Y年%m月%d日\ %X)】:' 7 | 8 | creat_start_up(){ 9 | rm -rf $KSROOT/init.d/S96SoftEther.sh 10 | ln -sf $KSROOT/scripts/softether_config.sh $KSROOT/init.d/S96SoftEther.sh 11 | ln -sf $KSROOT/softether/softether.sh $KSROOT/init.d/N96SoftEther.sh 12 | } 13 | 14 | open_close_port(){ 15 | [ -f "$KSROOT/softether/vpn_server.config" ] && openvpn_port=`cat $KSROOT/softether/vpn_server.config | grep OpenVPN_UdpPortList | awk -F " " '{print $3}'` || openvpn_port=1194 16 | [ -z "$openvpn_port" ] && openvpn_port=1194 17 | # flush first 18 | iptables -D INPUT -p udp --dport 500 -j ACCEPT 19 | iptables -D INPUT -p udp --dport 1701 -j ACCEPT 20 | iptables -D INPUT -p udp --dport 4500 -j ACCEPT 21 | iptables -D INPUT -p tcp --dport $openvpn_port -j ACCEPT 22 | iptables -D INPUT -p udp --dport $openvpn_port -j ACCEPT 23 | iptables -D INPUT -p tcp --dport 443 -j ACCEPT 24 | iptables -D INPUT -p tcp --dport 5555 -j ACCEPT 25 | iptables -D INPUT -p tcp --dport 8888 -j ACCEPT 26 | iptables -D INPUT -p tcp --dport 992 -j ACCEPT 27 | # add 28 | if [ "$softether_enable" == "1" ] && [ "$softether_l2tp" == "1" ];then 29 | # l2tp 30 | iptables -I INPUT -p udp --dport 500 -j ACCEPT 31 | iptables -I INPUT -p udp --dport 1701 -j ACCEPT 32 | iptables -I INPUT -p udp --dport 4500 -j ACCEPT 33 | fi 34 | if [ "$softether_enable" == "1" ] && [ "$softether_openvpn" == "1" ];then 35 | # openvpn 36 | iptables -I INPUT -p tcp --dport "$openvpn_port" -j ACCEPT 37 | iptables -I INPUT -p udp --dport "$openvpn_port" -j ACCEPT 38 | fi 39 | if [ "$softether_enable" == "1" ] && [ "$softether_sstp" == "1" ];then 40 | # sstp 41 | iptables -I INPUT -p tcp --dport 443 -j ACCEPT 42 | fi 43 | if [ "$softether_enable" == "1" ];then 44 | # other 45 | iptables -I INPUT -p tcp --dport 5555 -j ACCEPT 46 | iptables -I INPUT -p tcp --dport 8888 -j ACCEPT 47 | iptables -I INPUT -p tcp --dport 992 -j ACCEPT 48 | fi 49 | } 50 | 51 | case $1 in 52 | restart) 53 | /usr/bin/env LANG=en_US.UTF-8 $KSROOT/softether/vpnserver stop >/dev/null 2>&1 54 | pid=`pidof vpnserver` 55 | if [ ! -z "$pid" ];then 56 | echo_date "关闭vpnserver主进程..." 57 | kill -9 "$pid" 58 | fi 59 | #open_close_port 60 | mod=`lsmod |grep tun` 61 | if [ -z "$mod" ];then 62 | echo_date "加载tun模块" 63 | modprobe tun 64 | fi 65 | echo_date "开启SoftetherVPN进程..." 66 | /usr/bin/env LANG=en_US.UTF-8 $KSROOT/softether/vpnserver start >/dev/null 2>&1 67 | 68 | echo_date "等待虚拟网卡设置...." 69 | echo_date "如果你第一次开启此软件,此处会等待15分钟,直到你在控制台中设置了新的本地网桥。" 70 | echo_date "如果超过15分钟后仍然没有设置新的本地网桥,你以后可以随时进行设置,但是设置后需要重新提交一次插件。" 71 | i=900 72 | until [ ! -z "$tap" ] 73 | do 74 | i=$(($i-1)) 75 | tap=`ifconfig | grep tap_ | awk '{print $1}'` 76 | if [ "$i" -lt 1 ];then 77 | echo_date "设置本地网桥超时,将不再继续运行插件,但是会保留SoftetherVPN主进程" 78 | exit 79 | fi 80 | echo_date "$i" 秒... 81 | sleep 1 82 | done 83 | echo_date "打开相应端口..." 84 | open_close_port 85 | echo_date "桥接虚拟网卡..." 86 | brctl addif br0 $tap 87 | echo_date "设置dnsmasq..." 88 | echo interface=tap_vpn > /jffs/etc/dnsmasq.d/softether.conf 89 | echo_date "重启dnsmasq..." 90 | service dnsmasq restart >/dev/null 2>&1 91 | echo_date "创建开机启动..." 92 | creat_start_up 93 | echo_date "插件运行完毕!" 94 | ;; 95 | stop) 96 | echo_date "停止vpsnserver主进程..." 97 | /usr/bin/env LANG=en_US.UTF-8 $KSROOT/softether/vpnserver stop >/dev/null 2>&1 98 | echo_date "关闭相应端口..." 99 | open_close_port 100 | echo_date "删除dnsmasq设置..." 101 | rm -rf /jffs/etc/dnsmasq.d/softether.conf 102 | echo_date "重启dnsmasq..." 103 | service dnsmasq restart >/dev/null 2>&1 104 | echo_date "删除开机启动..." 105 | rm -rf $KSROOT/init.d/S96SoftEther.sh 106 | rm -rf $KSROOT/init.d/N96SoftEther.sh 107 | echo_date "插件关闭成功!" 108 | ;; 109 | start_nat) 110 | open_close_port 111 | ;; 112 | esac 113 | -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/softether/vpnserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/softether_vpn/softether_vpn/softether/vpnserver -------------------------------------------------------------------------------- /softether_vpn/softether_vpn/uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export softether` 6 | 7 | enable=`dbus get softether_enable` 8 | if [ "$enable" == 1 ];then 9 | sh $KSROOT/softether/softether.sh stop 10 | fi 11 | 12 | dbus remove softether_enable 13 | dbus remove softether_l2tp 14 | dbus remove softether_openvpn 15 | dbus remove softether_sstp 16 | 17 | sleep 1 18 | rm -rf $KSROOT/softether 19 | rm -rf $KSROOT/scripts/softether* 20 | 21 | dbus remove softcenter_module_softether_home_url 22 | dbus remove softcenter_module_softether_install 23 | dbus remove softcenter_module_softether_md5 24 | dbus remove softcenter_module_softether_version 25 | dbus remove softcenter_module_softether_name 26 | dbus remove softcenter_module_softether_description 27 | -------------------------------------------------------------------------------- /softether_vpn/version: -------------------------------------------------------------------------------- 1 | 1.0.1 2 | ca50a5ed0db3087cc44b5d4e9fd75e4b 3 | -------------------------------------------------------------------------------- /swap/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin shadowsocks Changelog 2 | =========================================== 3 | 1.0.0 add swap 4 | 1.0.1 fix wrong folder; fix mkswap 5 | 1.0.3 fix some bug 6 | 1.0.4 fix page 7 | -------------------------------------------------------------------------------- /swap/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum swap.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./swap.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./swap.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /swap/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE="swap" 4 | VERSION="1.0.4" 5 | TITLE="swap" 6 | DESCRIPTION="虚拟内存~" 7 | HOME_URL="Module_swap.asp" 8 | #!/bin/sh 9 | # Check and include base 10 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | echo $DIR 12 | if [ "$MODULE" == "" ]; then 13 | echo "module not found" 14 | exit 1 15 | fi 16 | 17 | if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then 18 | echo "install script not found" 19 | exit 2 20 | fi 21 | 22 | # now include build_base.sh 23 | . $DIR/../softcenter/build_base.sh 24 | 25 | # change to module directory 26 | cd $DIR 27 | 28 | # do something here 29 | 30 | do_build_result 31 | 32 | sh backup.sh 33 | -------------------------------------------------------------------------------- /swap/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.0.4", 3 | "md5":"41d6f6a1a101ac373f94989dae1dcb1c", 4 | "home_url":"Module_swap.asp", 5 | "title":"swap", 6 | "description":"虚拟内存~", 7 | "build_date":"2017-05-15_17:01:31" 8 | } 9 | -------------------------------------------------------------------------------- /swap/history/1.0.0/swap.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/history/1.0.0/swap.tar.gz -------------------------------------------------------------------------------- /swap/history/1.0.1/swap.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/history/1.0.1/swap.tar.gz -------------------------------------------------------------------------------- /swap/history/1.0.2/swap.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/history/1.0.2/swap.tar.gz -------------------------------------------------------------------------------- /swap/history/1.0.3/swap.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/history/1.0.3/swap.tar.gz -------------------------------------------------------------------------------- /swap/history/1.0.4/swap.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/history/1.0.4/swap.tar.gz -------------------------------------------------------------------------------- /swap/history/version: -------------------------------------------------------------------------------- 1 | 1.0.0 a4ed81c00952677f4ec333a313d06e0f 2 | 1.0.1 96b2c321a93db867e609317ad6abed38 3 | 1.0.2 6a0ca64a7c44e68e7959944c60aab6c3 4 | 1.0.3 6033a791d4368240c54946d1d27dcfed 5 | 1.0.4 41d6f6a1a101ac373f94989dae1dcb1c 6 | -------------------------------------------------------------------------------- /swap/swap.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/swap.tar.gz -------------------------------------------------------------------------------- /swap/swap/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export swap` 6 | 7 | 8 | cd /tmp 9 | cp -rf /tmp/swap/scripts/* $KSROOT/scripts/ 10 | cp -rf /tmp/swap/webs/* $KSROOT/webs/ 11 | cp -rf /tmp/swap/res/* $KSROOT/res/ 12 | 13 | cp /tmp/swap/uninstall.sh $KSROOT/scripts/uninstall_swap.sh 14 | 15 | # 为新安装文件赋予执行权限... 16 | chmod 755 $KSROOT/scripts/swap* 17 | 18 | sleep 1 19 | rm -rf /tmp/swap* >/dev/null 2>&1 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /swap/swap/res/icon-swap-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/swap/res/icon-swap-bg.png -------------------------------------------------------------------------------- /swap/swap/res/icon-swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/swap/swap/res/icon-swap.png -------------------------------------------------------------------------------- /swap/swap/scripts/swap_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | alias echo_date='echo 【$(date +%Y年%m月%d日\ %X)】:' 5 | eval `dbus export swap_` 6 | 7 | makekswap(){ 8 | [ "$swap_on_size" == "1" ] && size=262148 9 | [ "$swap_on_size" == "2" ] && size=524292 10 | [ "$swap_on_size" == "3" ] && size=1024004 11 | if [ ! -f "$swap_on_disk"/tt_swapfile ];then 12 | cd "$swap_on_disk" 13 | echo_date "创建swap需要较长的时间,请耐心等待..." 14 | dd if=/dev/zero of="$swap_on_disk"/tt_swapfile bs=1024 count="$size" 15 | echo_date "创建完毕,挂载swap..." 16 | mkswap tt_swapfile 17 | chmod 600 tt_swapfile 18 | swapon tt_swapfile 19 | echo_date "挂载swap成功..." 20 | echo_date "如果页面没有自动刷新,请手动刷新!" 21 | fi 22 | } 23 | 24 | case $1 in 25 | load) 26 | logger [ttsoft] start swap... 27 | sfile=`mount | grep "$swap_disk"` 28 | i=60 29 | until [ -n "$sfile" ] 30 | do 31 | i=$(($i-1)) 32 | if [ "$i" -lt 1 ];then 33 | logger [ttsoft] can not find swapfile... 34 | exit 35 | fi 36 | sleep 1 37 | done 38 | if [ -f "$swap_on_disk/tt_swapfile" ];then 39 | if [ `free | grep Swap|awk '{print $2}'` == "0" ];then 40 | logger [ttsoft] mounting swap... 41 | swapon "$swap_on_disk/tt_swapfile" 42 | nvram set script_usbmount="sh /jffs/koolshare/scripts/swap_config.sh load" 43 | nvram commit 44 | else 45 | logger [ttsoft] already mounted 46 | fi 47 | else 48 | logger [ttsoft] no swap file found! 49 | fi 50 | ;; 51 | esac 52 | 53 | case $2 in 54 | 1) 55 | echo_date "你选择了磁盘$swap_on_disk,开始创建虚拟内存..." > /tmp/upload/swap_log.txt 56 | makekswap >> /tmp/upload/swap_log.txt 57 | http_response "$1" 58 | echo XU6J03M6 >> /tmp/upload/swap_log.txt 59 | nvram set script_usbmount="/jffs/koolshare/scripts/swap_config.sh load" 60 | nvram commit 61 | ;; 62 | 2) 63 | echo_date "准备删除swap..." > /tmp/upload/swap_log.txt 64 | echo_date "寻找swap文件..." >> /tmp/upload/swap_log.txt 65 | if [ ! -f "$swap_on_disk"/tt_swapfile ];then 66 | swapfile_dir=`find /tmp/mnt -name "tt_swapfile"` 67 | else 68 | swapfile_dir="$swap_on_disk"/tt_swapfile 69 | fi 70 | 71 | if [ -f "$swapfile_dir" ];then 72 | echo_date "找到swap文件$swapfile_dir..." >> /tmp/upload/swap_log.txt 73 | echo_date "卸载swap..." >> /tmp/upload/swap_log.txt 74 | swapoff "$swapfile_dir" 75 | echo_date "删除swap..." >> /tmp/upload/swap_log.txt 76 | rm -rf "$swapfile_dir" 77 | echo_date "删除swap成功!" >> /tmp/upload/swap_log.txt 78 | dbus set swap_on_loaded=0 79 | http_response "$1" 80 | else 81 | echo_date "我擦,并没有找到swap文件,退出!" >> /tmp/upload/swap_log.txt 82 | http_response "$1" 83 | fi 84 | mvram unset script_usbmount 85 | nvram commit 86 | ;; 87 | esac 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /swap/swap/scripts/swap_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | eval `dbus export swap` 5 | 6 | write_disk_info(){ 7 | # 删除所有磁盘信息 8 | disk_values=`dbus list swap_disk_|cut -d "=" -f1` 9 | for value in $disk_values 10 | do 11 | dbus remove $value 12 | done 13 | # 这里独立出来,循环写入,保证web获得的列表是最新的 14 | disk_info=`df -Th |grep "/dev/sd"` 15 | if [ -n "$disk_info" ];then 16 | # 获取到了磁盘信息,写入dbus,为了防止频繁写入带来问题,采用ram写入 17 | disk_nu=`echo "$disk_info" | wc -l` 18 | dbus set swap_disk_nu="$disk_nu" 19 | i=1 20 | while [ ${i} -le $disk_nu ] 21 | do 22 | dbus set swap_disk_name_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $1}'` 23 | dbus set swap_disk_type_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $2}'` 24 | dbus set swap_disk_size_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $3}'` 25 | dbus set swap_disk_used_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $4}'` 26 | dbus set swap_disk_aval_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $5}'` 27 | dbus set swap_disk_useP_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $6}'` 28 | dbus set swap_disk_moon_"$i"=`echo "$disk_info" | sed -n "$i"\p |awk '{print $7}'` 29 | i=`expr $i + 1` 30 | done 31 | ext_nu=`echo "$disk_info"|grep ext |wc -l` 32 | dbus set swap_ext_nu="$ext_nu" 33 | fi 34 | } 35 | 36 | write_disk_info 37 | 38 | # 检测是否已经挂载了虚拟内存 39 | swapon2=`free | grep Swap|awk '{print $2}'` 40 | if [ "$swapon2" == "0" ];then 41 | # 没有挂载 42 | # skipd值没了,但是swap还在 43 | if [ -z "$swap_on_disk" ];then 44 | swapfile_dir=`find /tmp/mnt -name "tt_swapfile"` 45 | if [ -n "$swapfile_dir" ];then 46 | swapon $swapfile_dir 47 | sleep 2 48 | swapused=`free | grep Swap|awk '{print $3}'` 49 | swap_mount_size=`awk 'BEGIN{printf "%0.2f",'$swapon2'/1024}'` 50 | swap_used_size=`awk 'BEGIN{printf "%0.2f",'$swapused'/1024}'` 51 | dbus set swap_on_loaded=1 52 | dbus set swap swap_on_disk=`find /tmp/mnt -name "tt_swapfile"|cut -d "/" -f1,2,3,4` 53 | http_response "成功挂载了虚拟内存!
大小:$swap_mount_size MB     已使用:$swap_used_size MB" 54 | else 55 | # 检测到没有swap,那么获取下磁盘信息 56 | disk_info=`df -Th |grep "/dev/sd"` 57 | if [ ! -z "$disk_info" ];then 58 | if [ "$ext_nu" != "0" ];then 59 | http_response "共找到$disk_nu个磁盘,
其中有$ext_nu个ext格式的磁盘符合要求。" 60 | dbus set swap_on_loaded=0 61 | else 62 | http_response "共找到$disk_nu个磁盘,
然而并没有磁盘符合创建虚拟内存的要求" 63 | dbus set swap_on_loaded=3 64 | fi 65 | else 66 | http_response "没有找到可用磁盘!" 67 | dbus set swap_on_loaded=2 68 | fi 69 | fi 70 | else 71 | # skipd值有,swap在 72 | if [ -f "$swap_on_disk"/tt_swapfile ];then 73 | # 没有挂载但是检测到有swap文件 74 | swapon "$swap_on_disk"/tt_swapfile 75 | sleep 2 76 | swapon3=`free | grep Swap|awk '{print $2}'` 77 | if [ "$swapon3" != "0" ];then 78 | # 检测到有,但是没有挂在,帮忙挂载 79 | http_response "检测到你已有的swap文件,但是没有挂载,已经为你挂载!请刷新本页面!" 80 | dbus set swap_on_loaded=1 81 | else 82 | # 检测到有,但是挂载失败,帮忙删除 83 | http_response "检测到你已有的swap文件,但是尝试挂在失败!" 84 | dbus set swap_on_loaded=0 85 | fi 86 | else 87 | # 检测到没有swap,那么获取下磁盘信息 88 | disk_info=`df -Th |grep "/dev/sd"` 89 | if [ ! -z "$disk_info" ];then 90 | if [ "$ext_nu" != "0" ];then 91 | http_response "共找到$disk_nu个磁盘,
其中有$ext_nu个ext格式的磁盘符合要求。" 92 | dbus set swap_on_loaded=0 93 | else 94 | http_response "共找到$disk_nu个磁盘,
然而并没有磁盘符合创建虚拟内存的要求" 95 | dbus set swap_on_loaded=3 96 | fi 97 | else 98 | http_response "没有找到可用磁盘!" 99 | dbus set swap_on_loaded=2 100 | fi 101 | fi 102 | fi 103 | else 104 | # 检测到挂载了,那么获取下挂载信息 105 | #swapfile_dir=`find /tmp/mnt -name "tt_swapfile"` 106 | #swapfile_name=`echo "$swapfile_dir"|cut -d "/" -f5` 107 | swapused=`free | grep Swap|awk '{print $3}'` 108 | swap_mount_size=`awk 'BEGIN{printf "%0.2f",'$swapon2'/1024}'` 109 | swap_used_size=`awk 'BEGIN{printf "%0.2f",'$swapused'/1024}'` 110 | dbus set swap_on_loaded=1 111 | http_response "成功挂载了虚拟内存!
大小:$swap_mount_size MB     已使用:$swap_used_size MB" 112 | fi -------------------------------------------------------------------------------- /swap/swap/uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export swap` 6 | 7 | confs=`dbus list swap|cut -d "=" -f1` 8 | 9 | for conf in $confs 10 | do 11 | dbus remove $conf 12 | done 13 | 14 | sleep 1 15 | rm -rf $KSROOT/scripts/swap* 16 | rm -rf $KSROOT/webs/Module_swap.asp 17 | 18 | dbus remove softcenter_module_swap_home_url 19 | dbus remove softcenter_module_swap_install 20 | dbus remove softcenter_module_swap_md5 21 | dbus remove softcenter_module_swap_version 22 | dbus remove softcenter_module_swap_name 23 | dbus remove softcenter_module_swap_description 24 | -------------------------------------------------------------------------------- /swap/version: -------------------------------------------------------------------------------- 1 | 1.0.4 2 | 41d6f6a1a101ac373f94989dae1dcb1c 3 | -------------------------------------------------------------------------------- /webshell/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare Asuswrt-Merlin shadowsocks Changelog 2 | =========================================== 3 | 1.0.0 add webshell 4 | 1.0.1 fix uninstall script 5 | 1.0.2 remove console in web 6 | 1.0.3 fix wrong title 7 | -------------------------------------------------------------------------------- /webshell/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum webshell.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./webshell.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./webshell.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /webshell/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE="webshell" 4 | VERSION="1.0.4" 5 | TITLE="webshell" 6 | DESCRIPTION="shell on web~" 7 | HOME_URL="Module_webshell.asp" 8 | #!/bin/sh 9 | # Check and include base 10 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | echo $DIR 12 | if [ "$MODULE" == "" ]; then 13 | echo "module not found" 14 | exit 1 15 | fi 16 | 17 | if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then 18 | echo "install script not found" 19 | exit 2 20 | fi 21 | 22 | # now include build_base.sh 23 | . $DIR/../softcenter/build_base.sh 24 | 25 | # change to module directory 26 | cd $DIR 27 | 28 | # do something here 29 | 30 | do_build_result 31 | 32 | sh backup.sh 33 | -------------------------------------------------------------------------------- /webshell/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.0.4", 3 | "md5":"efad007e438e9bf9c18706f953594f87", 4 | "home_url":"Module_webshell.asp", 5 | "title":"webshell", 6 | "description":"shell on web~", 7 | "build_date":"2017-05-24_18:59:08" 8 | } 9 | -------------------------------------------------------------------------------- /webshell/history/1.0.0/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/history/1.0.0/webshell.tar.gz -------------------------------------------------------------------------------- /webshell/history/1.0.1/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/history/1.0.1/webshell.tar.gz -------------------------------------------------------------------------------- /webshell/history/1.0.2/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/history/1.0.2/webshell.tar.gz -------------------------------------------------------------------------------- /webshell/history/1.0.3/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/history/1.0.3/webshell.tar.gz -------------------------------------------------------------------------------- /webshell/history/1.0.4/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/history/1.0.4/webshell.tar.gz -------------------------------------------------------------------------------- /webshell/history/version: -------------------------------------------------------------------------------- 1 | 1.0.0 8ef2283894b4f8091d19e67df99b3d47 2 | 1.0.1 0833e527d71692d54d0765f86d60aec0 3 | 1.0.2 3ccc1719f5deb785e7a1628a44932a65 4 | 1.0.3 9a0476cf9ffd67c4d2eda5117b742f89 5 | 1.0.4 efad007e438e9bf9c18706f953594f87 6 | -------------------------------------------------------------------------------- /webshell/version: -------------------------------------------------------------------------------- 1 | 1.0.4 2 | efad007e438e9bf9c18706f953594f87 3 | -------------------------------------------------------------------------------- /webshell/webshell.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/webshell.tar.gz -------------------------------------------------------------------------------- /webshell/webshell/bin/webshell: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/webshell/bin/webshell -------------------------------------------------------------------------------- /webshell/webshell/install.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export webshell` 6 | 7 | killall webshell 8 | 9 | cd /tmp 10 | cp -rf /tmp/webshell/bin/* $KSROOT/bin/ 11 | cp -rf /tmp/webshell/scripts/* $KSROOT/scripts/ 12 | cp -rf /tmp/webshell/webs/* $KSROOT/webs/ 13 | cp -rf /tmp/webshell/res/* $KSROOT/res/ 14 | 15 | cp /tmp/webshell/uninstall.sh $KSROOT/scripts/uninstall_webshell.sh 16 | 17 | # 为新安装文件赋予执行权限... 18 | chmod 755 $KSROOT/bin/webshell 19 | chmod 755 $KSROOT/scripts/webshell_* 20 | 21 | sleep 1 22 | rm -rf /tmp/webshell* >/dev/null 2>&1 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /webshell/webshell/res/icon-webshell-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/webshell/res/icon-webshell-bg.png -------------------------------------------------------------------------------- /webshell/webshell/res/icon-webshell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/webshell/webshell/res/icon-webshell.png -------------------------------------------------------------------------------- /webshell/webshell/scripts/webshell_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | pid=`ps|grep webshell|grep -v grep|grep -v sh|awk '{print $1}'` 5 | 6 | if [ -z "$pid" ]; then 7 | logger start webshell 8 | webshell -d 1 -f /tmp/.webshell-lock 9 | else 10 | logger webshell is already running 11 | fi -------------------------------------------------------------------------------- /webshell/webshell/scripts/webshell_svae.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | source $KSROOT/scripts/base.sh 4 | 5 | http_response "$1" -------------------------------------------------------------------------------- /webshell/webshell/uninstall.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export webshell` 6 | 7 | killall webshell 8 | dbus remove webshell_cols 9 | dbus remove webshell_rows 10 | dbus remove webshell_style 11 | 12 | sleep 1 13 | rm -rf $KSROOT/bin/webshell 14 | rm -rf $KSROOT/scripts/webshell_* 15 | rm -rf $KSROOT/webs/Module_webshell.asp 16 | 17 | dbus remove softcenter_module_webshell_home_url 18 | dbus remove softcenter_module_webshell_install 19 | dbus remove softcenter_module_webshell_md5 20 | dbus remove softcenter_module_webshell_version 21 | dbus remove softcenter_module_webshell_name 22 | dbus remove softcenter_module_webshell_description 23 | -------------------------------------------------------------------------------- /xiaomi/Changelog.txt: -------------------------------------------------------------------------------- 1 | Koolshare ttsoft xiaomi fan control Changelog 2 | =========================================== 3 | 4 | 1.0.0 5 | -Add xiaomi fan control for xiaomi r1d router 6 | 1.0.3 7 | -Fix speed 8 | 1.0.4 9 | -Add sleep mode 10 | 1.0.5 11 | -Fix BUG 12 | 1.0.6 13 | -Fix temperature display 14 | 1.0.7 15 | -Fix BUG 16 | -------------------------------------------------------------------------------- /xiaomi/README.md: -------------------------------------------------------------------------------- 1 | # xiaomi fan control 2 | only works on xiaomi r1d router! 3 | -------------------------------------------------------------------------------- /xiaomi/backup.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | # you can do something here 4 | # this shell scripts will run at the end of build.py scripts 5 | 6 | 7 | 8 | mkdir -p history 9 | if [ ! -f ./history/version ];then 10 | touch ./history/version 11 | fi 12 | 13 | version_old=`cat history/version | awk '{print $1}' | sort -rn |sed -n 1p` 14 | version_new=`cat config.json.js |grep "version"|cut -d"\"" -f 4` 15 | md5_old=`cat history/version | sort -nk1 | awk '{print $1}' |sed -n 1p` 16 | md5_new=` md5sum xiaomi.tar.gz | awk '{print $1}'` 17 | 18 | if [ -f ./xiaomi.tar.gz ];then 19 | if [ "$version_old" != "$version_new" ];then 20 | mkdir ./history/$version_new/ 21 | cp ./xiaomi.tar.gz ./history/$version_new/ 22 | echo $version_new $md5_new >> ./history/version 23 | fi 24 | fi 25 | 26 | -------------------------------------------------------------------------------- /xiaomi/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MODULE="xiaomi" 4 | VERSION="1.0.7" 5 | TITLE="xiaomi fan control" 6 | DESCRIPTION="小米R1D风扇控制插件" 7 | HOME_URL="Module_xiaomi.asp" 8 | #!/bin/sh 9 | # Check and include base 10 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | if [ "$MODULE" == "" ]; then 12 | echo "module not found" 13 | exit 1 14 | fi 15 | 16 | if [ -f "$DIR/$MODULE/$MODULE/install.sh" ]; then 17 | echo "install script not found" 18 | exit 2 19 | fi 20 | 21 | # now include build_base.sh 22 | . $DIR/../softcenter/build_base.sh 23 | 24 | # change to module directory 25 | cd $DIR 26 | 27 | # do something here 28 | 29 | do_build_result 30 | 31 | sh backup.sh 32 | -------------------------------------------------------------------------------- /xiaomi/config.json.js: -------------------------------------------------------------------------------- 1 | { 2 | "version":"1.0.7", 3 | "md5":"2d213a39e8534a7969d3e65dbdd693f8", 4 | "home_url":"Module_xiaomi.asp", 5 | "title":"xiaomi fan control", 6 | "description":"小米R1D风扇控制插件", 7 | "build_date":"2017-05-15_16:58:26" 8 | } 9 | -------------------------------------------------------------------------------- /xiaomi/history/1.0.0/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.0/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.1/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.1/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.2/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.2/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.3/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.3/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.4/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.4/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.5/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.5/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.6/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.6/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/1.0.7/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/history/1.0.7/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/history/version: -------------------------------------------------------------------------------- 1 | 1.0.0 90f3a59f1f50574534acb53dafa27797 2 | 1.0.1 ff683b91812dc5e307b707d0647707e2 3 | 1.0.2 adc9b53d3f8b0b51a9c868f70cd326fc 4 | 1.0.3 86569f8aa0b8e7d1547c4cbb735fbe7c 5 | 1.0.4 290bea89d8619d20b9d9b300399f8eb6 6 | 1.0.5 1f96fb8cacea2080dee42351fa67962c 7 | 1.0.6 cbf46a70d5fa305998b6ee375430fa2b 8 | 1.0.7 2d213a39e8534a7969d3e65dbdd693f8 9 | -------------------------------------------------------------------------------- /xiaomi/version: -------------------------------------------------------------------------------- 1 | 1.0.7 2 | 2d213a39e8534a7969d3e65dbdd693f8 3 | -------------------------------------------------------------------------------- /xiaomi/xiaomi.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/xiaomi.tar.gz -------------------------------------------------------------------------------- /xiaomi/xiaomi/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | export KSROOT=/jffs/koolshare 3 | 4 | rm -rf $KSROOT/scripts/xiaomi_* 5 | rm -rf $KSROOT/init.d/S100Xiaomi.sh 6 | rm -rf $KSROOT/res/icon-xiaomi* 7 | rm -rf $KSROOT/web/Module_xiaomi.asp 8 | 9 | cp -rf /tmp/xiaomi/res/* $KSROOT/res/ 10 | cp -rf /tmp/xiaomi/scripts/* $KSROOT/scripts/ 11 | cp -rf /tmp/xiaomi/webs/* $KSROOT/webs/ 12 | 13 | chmod a+x $KSROOT/scripts/xiaomi_* 14 | 15 | # add icon into softerware center 16 | dbus set softcenter_module_xiaomi_install=1 17 | dbus set softcenter_module_xiaomi_version=1.0 18 | dbus set softcenter_module_xiaomi_description="小米R1D风扇控制插件" 19 | dbus set softcenter_module_xiaomi_title="xiaomi fan control" 20 | dbus set softcenter_module_xiaomi_nae="xiaomi" 21 | rm -rf /tmp/xiaomi* 22 | 23 | -------------------------------------------------------------------------------- /xiaomi/xiaomi/res/icon-xiaomi-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/xiaomi/res/icon-xiaomi-bg.png -------------------------------------------------------------------------------- /xiaomi/xiaomi/res/icon-xiaomi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/koolshare/ttsoft/c64c2ad6de1655ab80d4a8bdc27db5b62275523b/xiaomi/xiaomi/res/icon-xiaomi.png -------------------------------------------------------------------------------- /xiaomi/xiaomi/scripts/xiaomi_check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | eval `dbus export xiaomi_` 7 | temperature=`cat /proc/dmu/temperature | cut -f 3 -d" " | cut -c 1,2 | grep "^[0-9]\{2\}"` 8 | sleep_cron=`cru l | grep xiaomi_sleep | wc -l` 9 | 10 | auto_start() { 11 | if [ $temperature -lt 80 ]; then 12 | NEWSPEED=2 13 | elif [ $temperature -ge 80 -a $temperature -lt 90 ];then 14 | NEWSPEED=3 15 | elif [ $temperature -ge 90 -a $temperature -lt 100 ];then 16 | NEWSPEED=4 17 | else 18 | NEWSPEED=2 19 | fi 20 | OLDSPEED=`nvram get fanctrl_dutycycle` 21 | if [ $OLDSPEED -ne $NEWSPEED ]; then 22 | nvram set fanctrl_dutycycle=$NEWSPEED 23 | nvram commit 24 | fi 25 | } 26 | 27 | xiaomi_sleep() { 28 | if [ "$xiaomi_sleep" == "1" ]; then 29 | if [ ! "$sleep_cron" == "2" ]; then 30 | cru d xiaomi_start 31 | cru a xiaomi_start "0 $xiaomi_sleep_start_time * * * /bin/sh $KSROOT/scripts/xiaomi_sleep.sh enable" 32 | cru d xiaomi_end 33 | cru a xiaomi_end "0 $xiaomi_sleep_end_time * * * /bin/sh $KSROOT/scripts/xiaomi_sleep.sh disable" 34 | fi 35 | else 36 | cru d xiaomi_start 37 | cru d xiaomi_end 38 | fi 39 | } 40 | 41 | if [ "$xiaomi_custom_enable" == "1" ]; then 42 | case $xiaomi_speed in 43 | "1") 44 | nvram set fanctrl_dutycycle=1 45 | ;; 46 | "2") 47 | nvram set fanctrl_dutycycle=2 48 | ;; 49 | "3") 50 | nvram set fanctrl_dutycycle=3 51 | ;; 52 | "4") 53 | nvram set fanctrl_dutycycle=4 54 | ;; 55 | "5") 56 | nvram set fanctrl_dutycycle=5 57 | ;; 58 | esac 59 | xiaomi_sleep 60 | else 61 | auto_start 62 | xiaomi_sleep 63 | fi 64 | -------------------------------------------------------------------------------- /xiaomi/xiaomi/scripts/xiaomi_config.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export xiaomi_` 6 | 7 | start_xiaomi(){ 8 | cru d xiaomi 9 | cru a xiaomi "*/$xiaomi_interval * * * * /bin/sh $KSROOT/scripts/xiaomi_check.sh" 10 | # run once after submit 11 | sh $KSROOT/scripts/xiaomi_check.sh 12 | sleep 1 13 | # creat start_up file 14 | if [ ! -f "$KSROOT/init.d/S100Xiaomi.sh" ]; then 15 | ln -sf $KSROOT/scripts/xiaomi_config.sh $KSROOT/init.d/S100Xiaomi.sh 16 | fi 17 | } 18 | 19 | stop_xiaomi(){ 20 | cru d xiaomi 21 | cru d xiaomi_start 22 | cru d xiaomi_end 23 | } 24 | 25 | case $ACTION in 26 | start) 27 | if [ "$xiaomi_auto_enable" == "1" ]; then 28 | start_xiaomi 29 | fi 30 | ;; 31 | stop) 32 | stop_xiaomi 33 | ;; 34 | *) 35 | if [ "$xiaomi_auto_enable" == "1" ]; then 36 | start_xiaomi 37 | http_response '插件已开启!页面将在3秒后刷新' 38 | else 39 | stop_xiaomi 40 | http_response '插件已关闭!页面将在3秒后刷新' 41 | fi 42 | ;; 43 | esac 44 | -------------------------------------------------------------------------------- /xiaomi/xiaomi/scripts/xiaomi_sleep.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | eval `dbus export xiaomi_` 7 | 8 | case $ACTION in 9 | enable) 10 | if [ "$xiaomi_sleep" == "1" ]; then 11 | if [ ! "$xiaomi_custom_enable" == "1" ]; then 12 | dbus set xiaomi_custom_enable=1 13 | dbus set xiaomi_speed=1 14 | fi 15 | nvram set fanctrl_dutycycle=1 16 | fi 17 | ;; 18 | disable) 19 | if [ "$xiaomi_sleep" == "1" ]; then 20 | [ "$xiaomi_custom_enable" == "1" ] && dbus set xiaomi_custom_enable=0 21 | nvram set fanctrl_dutycycle=4 22 | fi 23 | ;; 24 | esac -------------------------------------------------------------------------------- /xiaomi/xiaomi/scripts/xiaomi_status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | 6 | temperature=`cat /proc/dmu/temperature | cut -f 3 -d" " | cut -c 1,2 | grep "^[0-9]\{2\}"` 7 | speed=`nvram get fanctrl_dutycycle`|| "" 8 | 9 | http_response "$temperature@@$speed" -------------------------------------------------------------------------------- /xiaomi/xiaomi/uninstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | export KSROOT=/jffs/koolshare 4 | source $KSROOT/scripts/base.sh 5 | eval `dbus export xiaomi_` 6 | 7 | xiaomi_config.sh stop 8 | rm -rf $KSROOT/res/icon-xiaomi* 9 | rm -rf $KSROOT/webs/Module_xiaomi.asp 10 | rm -rf $KSROOT/scripts/xiaomi_* 11 | -------------------------------------------------------------------------------- /xiaomi/xiaomi/webs/Module_xiaomi.asp: -------------------------------------------------------------------------------- 1 | 软件中心 - xiaomi 2 | 3 | 8 | 108 |
109 |
小米风扇 返回
110 |

111 |
112 |
113 | 133 |
134 |
135 | 136 | 137 | 138 | 139 |
140 | --------------------------------------------------------------------------------