Repository: ccminerproxy/CC-MinerProxy Branch: master Commit: 4b97b3518bd5 Files: 19 Total size: 16.4 MB Directory structure: gitextract_ud7r_ff7/ ├── LICENSE ├── README.md ├── linux/ │ ├── README.md │ ├── ccminertaxproxy │ ├── cer.pem │ ├── config.json │ ├── gost │ ├── html/ │ │ ├── index-no-tax.html │ │ ├── index.html │ │ └── login.html │ ├── install.sh │ └── key.pem └── windows/ ├── README.md ├── cer.pem ├── config.json ├── html/ │ ├── index-no-tax.html │ ├── index.html │ └── login.html └── key.pem ================================================ FILE CONTENTS ================================================ ================================================ FILE: LICENSE ================================================ This is free and unencumbered software released into the public domain. Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, please refer to ================================================ FILE: README.md ================================================ # 曹操CCminerproxy 抽水 9.0极致稳定版<防DDos CC攻击> 最稳定的ETC/BTC/ETHW/RVN/ERGO/CFX中转托管软件! 比例调整为0-95.纯中转及0.35%内 无开发费 Telegram群组:https://t.me/CCminerproxy 软件仅供学习参考,请勿用于其他目的,不承担任何责任 ETHW/ETF可以正常处理了 BTC目前鱼池和btc.com稳定测试通过,币印 和蚂蚁 也可使用。 注意:BTC钱包必须使用相对应矿池的用户名抽水 不能使用钱包地址 BTC由于存在大量的大政奉还和难度不一情况,你实际得到的托管费会显著低于你设定的值,开发费也一样,优先保证客户低拒绝率 monitor目录下为CCminer多端口后台算力监控器,下载到本地pc使用。 # 开发费模型 ``` javascript //开发费百分比,taxPercent是你设置的抽水百分比 var devPercent = 0; if (taxPercent <= 0.35) { //小于等于0.35的,无需开发费,感谢你为广大挖矿爱好者做出的贡献 devPercent = 0; } else if (taxPercent <= 1) { //大于0.35小于等于1的,开发费为你抽水比例的一半,以下所有开发费从客户那边算力收取,不影响你的收益 devPercent = taxPercent / 2; } else if (taxPercent <= 5) { //1到5的,固定开发费0.5% devPercent = 0.5; } else if (taxPercent <= 10) { //5到10的,固定开发费1% devPercent = 1; } else if (taxPercent <= 20) { //10到20的,固定开发费2% devPercent = 2; } else { //20以上的,开发费线性增长,直到你的抽水比例为95%时,开发费为5% devPercent = 3 * (taxPercent - 20) / 75 + 2; } ``` ## 使用方法 [Windows](https://github.com/ccminerproxy/CC-MinerProxy/tree/master/windows/) [Linux](https://github.com/ccminerproxy/CC-MinerProxy/tree/master/linux/)(支持一键脚本安装) 所有版本均包含一个网页版的监控平台,可配置是否启用 你可以同时添加两个抽水账户,并对每个账户分别设置抽水比例,两个账户抽数比例加起来不能超过95% 现在抽水比例可以设置为0,纯转发,同样不收取开发费 ## 日你妈 我的忧伤,你是煞笔 GuoT,你也是煞笔 ## 其他 法律不支持的地区此程序无法使用,请自觉遵守当地相关政策,使用此软件造成的法律问题,一概与软件作者无关。 请只设定足够平衡你支出的托管抽水比例,不要抽大动脉,做到可持续发展,托管时请一定告知客户存在托管费 ETH/ETC的归集功能由于跨池存在难度、协议不一致等原因,可能导致你抽到的算力过大/过小甚至于无法抽取等情况 4核心4G内存的搬瓦工,带机6000台,测试4天,机器稳定不掉线 如果你经常掉线: ①第一检查挖矿软件配置及内核配置,是否设置超过多少分钟没有成功提交重启内核 ②查看你服务器的硬件配置及软件带宽,配置过低可能导致转发性能不足,导致TCP重发及超时 ③检查你服务器的网络是否占用超过60%以上,是的话加带宽 ④检查你的抽水情况,如果一直没抽到,你的配置可能存在问题,导致各种断连情况,特别是蚂蚁、币安、OK、HIVE等池子 ================================================ FILE: linux/README.md ================================================ ## 一键脚本安装 好处:适合又想要Linux稳定性的,又不懂Linux的小白的学习者
功能:包含自启动和进程守护,重启后可以自动运行,会放开防火墙和连接数限制,一键搞定
要求:Ubuntu 16+ / Debian 8+ / CentOS 7+ 系统
建议使用 Ubuntu20.04操作系统.
使用 root 用户输入下面命令安装或卸载
``` bash bash <( curl -s -L https://bit.ly/34JVXmq ) ```

如果输入命令回车之后一直卡住不动,换这种办法
ubuntu/debian 系统安装 wget: apt-get update -y && apt-get install wget -y
centos 系统安装 wget: yum update -y && yum install wget -y
安装好 wget 之后 下载脚本并执行
wget https://raw.githubusercontent.com/ccminerproxy/CC-MinerProxy/master/linux/install.sh
bash install.sh

如果提示 curl: command not found ,那是因为你的 VPS 没装 curl
ubuntu/debian 系统安装 curl 方法: apt-get update -y && apt-get install curl -y
centos 系统安装 curl 方法: yum update -y && yum install curl -y
安装好 curl 之后就能安装脚本了

输入项一定别填错了,填错了按Ctrl+C重来(推荐使用finalshell工具连接你的linux服务器) 如出现 Supervisor目录没了,安装失败 请依次输入以下代码执行: sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock sudo rm /var/cache/apt/archives/lock apt install supervisor -y 最后再执行一键安装脚本 一键脚本装好直接看最下面的注意内容就行了,突破连接数限制后记得重启服务器,输入命令 reboot 即可重启你的服务器,以后可不用重启 ## 自启动<已默认自启动> ``` bash 重启程序 (修改config.json配置文件后,重启程序生效) supervisorctl restart ccworkertaxproxy1 (重启ID为1的抽水机,依次类推,ID=2就把数字改成2) supervisorctl restart all (重启全部) 停止程序 supervisorctl stop all (停止全部) supervisorctl stop ccworkertaxproxy1 (停止ID为1的抽水机,依次类推,ID=2就把数字改成2) supervisorctl status 查看supervisor监管的进程状态 supervisorctl reload 修改完配置文件后重新启动supervisor supervisorctl update 根据最新的配置文件,启动新配置或有改动的进程,配置没有改动的进程不会受影响而重启 ``` ## 修改比例等配置参数 可编辑config.json文件 安装的时候是id=1,默认目录 /etc/ccworker/ccworker1 以此类推------ 可安装不同抽水矿池,安装时输入不同id即可。 ## 关于SSL 如果要用自己的域名证书,pem后缀的是证书文件,key后缀的是私钥文件 将这2个文件改名后 上传到目录并替换程序目录下的 cer.pem 和 key.pem 推荐linux ssh工具:finalshell ``` json { "enableLog":true, //启用日志记录 "ethPoolAddress": "ethw.f2pool.com", //ETHW/ETF矿池域名或者IP,不要写端口,端口写下面一行 "ethPoolPort": 6688, //ETHW/ETF矿池端口 "ethPoolSslMode": false, //ETHW/ETF矿池端口是否是SSL端口,true为是,false为否 "ethTcpPort": 6688, //ETHW/ETF中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "ethTlsPort": 12345, //ETHW/ETF中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "ethUser": "UserOrAddress", //你的ETHW/ETF钱包地址,或者你在矿池的用户名 "ethSecondUser": "UserOrAddress", //你的ETHW/ETF钱包地址,或者你在矿池的用户名 "ethWorker": "worker", //容易分辨的矿工名 "ethTaxPercent": 20, //ETHW/ETF抽水百分比,单位%,只能输入0-95之间的数字 "ethSecondTaxPercent": 0, //ETHW/ETF抽水百分比,单位%,只能输入0-95之间的数字 "enableEthProxy":true, //是否启用ETHW/ETF中转&抽水服务,true为启用,false为关闭 "enableEthDonatePool": false, //是否启用ETHW/ETF抽水重定向到指定矿池功能,true为启用,false为关闭 "ethDonatePoolAddress": "asia1.ethermine.org", //ETHW/ETF抽水重定向矿池地址 "ethDonatePoolSslMode": true, //ETHW/ETF抽水重定向矿池的端口是否为SSL端口,true为是,false为否 "ethDonatePoolPort": 5555, //ETHW/ETF抽水重定向矿池端口 "etcPoolAddress": "etc.f2pool.com", //ETC矿池域名或者IP,不要写端口,端口写下面一行 "etcPoolPort": 8118, //ETC矿池端口 "etcPoolSslMode": false, //ETC矿池端口是否是SSL端口,true为是,false为否 "etcTcpPort": 8118, //ETC中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "etcTlsPort": 22345, //ETC中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "etcUser": "UserOrAddress", //你的ETC钱包地址,或者你在矿池的用户名 "etcSecondUser": "UserOrAddress", //你的ETC钱包地址,或者你在矿池的用户名 "etcWorker": "worker", //容易分辨的矿工名 "etcTaxPercent": 20, //ETC抽水百分比,单位%,只能输入0-95之间的数字 "etcSecondTaxPercent": 0, //ETC抽水百分比,单位%,只能输入0-95之间的数字 "enableEtcProxy":false, //是否启用ETC中转&抽水服务,true为启用,false为关闭 "enableEtcDonatePool": false, //是否启用ETC抽水重定向到指定矿池功能,true为启用,false为关闭 "etcDonatePoolAddress": "etc.f2pool.com", //ETC抽水重定向矿池地址 "etcDonatePoolSslMode": false, //ETC抽水重定向矿池的端口是否为SSL端口,true为是,false为否 "etcDonatePoolPort": 8118, //ETC抽水重定向矿池端口 "btcPoolAddress": "btc.f2pool.com", //BTC矿池域名或者IP,不要写端口,端口写下面一行 "btcPoolPort": 3333, //BTC矿池端口 "btcPoolSslMode": false, //BTC矿池端口是否是SSL端口,true为是,false为否 "btcTcpPort": 3333, //BTC中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "btcTlsPort": 32345, //BTC中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "btcUser": "user", //你在矿池的BTC账户用户名 "btcSecondUser": "user", //你在矿池的BTC账户用户名 "btcWorker": "worker", //容易分辨的矿工名 "btcTaxPercent": 20, //BTC抽水百分比,单位%,只能输入0-95之间的数字 "btcSecondTaxPercent": 0, //BTC抽水百分比,单位%,只能输入0-95之间的数字 "enableBtcProxy":false, //是否启用BTC中转&抽水服务,true为启用,false为关闭 "rvnPoolAddress": "raven.f2pool.com", //RVN矿池域名或者IP,不要写端口,端口写下面一行 "rvnPoolPort": 3636, //RVN矿池端口 "rvnPoolSslMode": false, //RVN矿池端口是否是SSL端口,true为是,false为否 "rvnTcpPort": 3636, //RVN中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "rvnTlsPort": 42345, //RVN中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "rvnUser": "user", //你的RVN钱包地址,或者你在矿池的用户名 "rvnSecondUser": "user", //你的RVN钱包地址,或者你在矿池的用户名 "rvnWorker": "worker", //容易分辨的矿工名 "rvnTaxPercent": 20, //RVN抽水百分比,单位%,只能输入0-95之间的数字 "rvnSecondTaxPercent": 0, //RVN抽水百分比,单位%,只能输入0-95之间的数字 "enableRvnProxy":false, //是否启用RVN中转&抽水服务,true为启用,false为关闭 "ergoPoolAddress": "stratum-ergo.flypool.org", //ERGO矿池域名或者IP,不要写端口,端口写下面一行 "ergoPoolPort": 3333, //ERGO矿池端口 "ergoPoolSslMode": false, //ERGO矿池端口是否是SSL端口,true为是,false为否 "ergoTcpPort": 3336, //ERGO中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "ergoTlsPort": 52345, //ERGO中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "ergoUser": "user", //你的ERGO钱包地址,或者你在矿池的用户名 "ergoSecondUser": "user", //你的ERGO钱包地址,或者你在矿池的用户名 "ergoWorker": "worker", //容易分辨的矿工名 "ergoTaxPercent": 20, //ERGO抽水百分比,单位%,只能输入0-95之间的数字 "ergoSecondTaxPercent": 0, //ERGO抽水百分比,单位%,只能输入0-95之间的数字 "enableErgoProxy":false, //是否启用ERGO中转&抽水服务,true为启用,false为关闭 "cfxPoolAddress": "cfx.f2pool.com", //CFX矿池域名或者IP,不要写端口,端口写下面一行 "cfxPoolPort": 6800, //CFX矿池端口 "cfxPoolSslMode": false, //CFX矿池端口是否是SSL端口,true为是,false为否 "cfxTcpPort": 6800, //CFX中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "cfxTlsPort": 62345, //CFX中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "cfxUser": "user", //你的CFX钱包地址,或者你在矿池的用户名 "cfxSecondUser": "user", //你的CFX钱包地址,或者你在矿池的用户名 "cfxWorker": "worker", //容易分辨的矿工名 "cfxTaxPercent": 20, //CFX抽水百分比,单位%,只能输入0-95之间的数字 "cfxSecondTaxPercent": 0, //CFX抽水百分比,单位%,只能输入0-95之间的数字 "enableCfxProxy":false, //是否启用CFX中转&抽水服务,true为启用,false为关闭 "httpLogPort":8080, //网页监控平台端口 "httpLogPassword":"caocaominer", //网页监控平台密码,不能为空 "enableHttpLog":true //是否启用网页监控平台 } ``` 如需编辑 按Ctrl+O,再按Ctrl+X ## 运行<默认已运行> ``` bash ./ccminertaxproxy ``` ## 传参方式运行 支持传参方式运行,方式如下 ``` bash ./ccminertaxproxy --ethPoolAddress=eth.f2pool.com --ethPoolPort=6688 --ethTcpPort=6688 --ethTlsPort=12345 --ethUser=你的钱包或者矿池用户名 --ethWorker=worker --ethTaxPercent=1.0 --enableEthProxy=true ``` 以上仅为范例,参数名字和上方JSON配置文件的参数名一致,参数为false的配置默认不用配进去,看不懂这个的不要用这种方式 ## 注意 矿机无法连接的记得开防火墙,云服务商的还有对应的安全组,配置好了矿机连不上肯定是这俩原因,SSL连接记得矿机本地加高级参数,如何配置安全组自己Google去 ================================================ FILE: linux/cer.pem ================================================ -----BEGIN CERTIFICATE----- MIIDUTCCAjkCFGsHka/T1i3IRkpdHtwChRrJ/Bu2MA0GCSqGSIb3DQEBCwUAMGQx CzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlTaW5nYXBvcmUxEjAQBgNVBAcMCVNpbmdh cG9yZTELMAkGA1UECgwCQ0MxCzAJBgNVBAsMAkNDMRMwEQYDVQQDDApjYW9jYW8u Y2FvMCAXDTIxMTIwNDE0MzY1N1oYDzIxMjExMTEwMTQzNjU3WjBkMQswCQYDVQQG EwJTRzESMBAGA1UECAwJU2luZ2Fwb3JlMRIwEAYDVQQHDAlTaW5nYXBvcmUxCzAJ BgNVBAoMAkNDMQswCQYDVQQLDAJDQzETMBEGA1UEAwwKY2FvY2FvLmNhbzCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALiy9aStqRoc+ZziRSzJkaocGMtS UEKale0VEgr+ecoQECfuORcZh+g/IX2Yjw46KPt1N87FNXGBbvysMclW1Dyf9C8J z9aDT42cfAfxbw22Y2f8UohzhdE4UztGHhJPfsJ4gMzltk+QKOm0eq/M/fAxDCP5 MJ+HsaZdYIm1QefRsYaeVKMHXfvqVFsJu579X7IcXi+Jlewxr5jjmfI4aHftnbfZ Fz03H/UHraxa9dvPOEB50kZQUaYq6NrKk5WIR3deQYgkZpd0PqpOuptfJtyniS1I YEOzElchQWy+CC2ZKZ4BOP5UeY6jlQyE+W1gmVdFoMgxzIE1ZCwk/GdmNWkCAwEA ATANBgkqhkiG9w0BAQsFAAOCAQEAi5EA8GLpftGdhWIuSqW6tbCgfuLh16Uxc7NW hrf3aF7JDOB1e5GvtEP/wtEDw4VKUySxdmK51QNOHn4kZwNc6iMnWdjuPLhoGgFv +KLTRMiWin62JPCtAIDzh3eapfwQVWAKovskTHS4XzlrJPSqtiAfzxXVgQj67H8r l+pU1Tmr53RHa7Dsn/qgqPATePQzlaIKHCPAO76+u2+jObAPVdLXf0aIAbrT4neP Bf+LiL8OvvNEvBz7ko1g6LVZgsZbetu23RrmOcjuCsglBn8z+zOA4up2xVaV1YO7 wyAF2hSQQNSJo0+TIiX38wcBWiNf2k6ZZhs1IkPTwGxiit9Zjg== -----END CERTIFICATE----- ================================================ FILE: linux/config.json ================================================ { "enableLog":true, "ethPoolAddress": "ethw.f2pool.com", "ethPoolSslMode": false, "ethPoolPort": 6688, "ethTcpPort": 6688, "ethTlsPort": 12345, "ethUser": "UserOrAddress", "ethSecondUser": "UserOrAddress", "ethWorker": "worker", "ethTaxPercent": 20, "ethSecondTaxPercent": 0, "enableEthProxy":true, "enableEthDonatePool": false, "ethDonatePoolAddress": "asia1.ethermine.org", "ethDonatePoolSslMode": true, "ethDonatePoolPort": 5555, "etcPoolAddress": "etc.f2pool.com", "etcPoolSslMode": false, "etcPoolPort": 8118, "etcTcpPort": 8118, "etcTlsPort": 22345, "etcUser": "UserOrAddress", "etcSecondUser": "UserOrAddress", "etcWorker": "worker", "etcTaxPercent": 20, "etcSecondTaxPercent": 0, "enableEtcProxy":false, "enableEtcDonatePool": false, "etcDonatePoolAddress": "etc.f2pool.com", "etcDonatePoolSslMode": false, "etcDonatePoolPort": 8118, "btcPoolAddress": "btc.f2pool.com", "btcPoolSslMode":false, "btcPoolPort": 3333, "btcTcpPort": 3333, "btcTlsPort": 32345, "btcUser": "user", "btcSecondUser": "user", "btcWorker": "worker", "btcTaxPercent": 20, "btcSecondTaxPercent": 0, "enableBtcProxy":false, "rvnPoolAddress": "raven.f2pool.com", "rvnPoolSslMode": false, "rvnPoolPort": 3636, "rvnTcpPort": 3636, "rvnTlsPort": 42345, "rvnUser": "user", "rvnSecondUser": "user", "rvnWorker": "worker", "rvnTaxPercent": 20, "rvnSecondTaxPercent": 0, "enableRvnProxy": false, "ergoPoolAddress": "stratum-ergo.flypool.org", "ergoPoolSslMode": false, "ergoPoolPort": 3333, "ergoTcpPort": 3434, "ergoTlsPort": 52345, "ergoUser": "user", "ergoSecondUser": "user", "ergoWorker": "worker", "ergoTaxPercent": 20, "ergoSecondTaxPercent": 0, "enableErgoProxy": false, "cfxPoolAddress": "cfx.f2pool.com", "cfxPoolSslMode": false, "cfxPoolPort": 6800, "cfxTcpPort": 6800, "cfxTlsPort": 62345, "cfxUser": "user", "cfxSecondUser": "user", "cfxWorker": "worker", "cfxTaxPercent": 20, "cfxSecondTaxPercent": 0, "enableCfxProxy": false, "httpLogPort":8080, "httpLogPassword":"admin", "enableHttpLog":true } ================================================ FILE: linux/gost ================================================ [File too large to display: 16.1 MB] ================================================ FILE: linux/html/index-no-tax.html ================================================ 管理控制台 ================================================ FILE: linux/html/index.html ================================================ 管理控制台 ================================================ FILE: linux/html/login.html ================================================ 登录
================================================ FILE: linux/install.sh ================================================ #!/bin/bash stty erase ^H red='\e[91m' green='\e[92m' yellow='\e[94m' magenta='\e[95m' cyan='\e[96m' none='\e[0m' _red() { echo -e ${red}$*${none}; } _green() { echo -e ${green}$*${none}; } _yellow() { echo -e ${yellow}$*${none}; } _magenta() { echo -e ${magenta}$*${none}; } _cyan() { echo -e ${cyan}$*${none}; } # Root [[ $(id -u) != 0 ]] && echo -e "\n 请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}\n" && exit 1 cmd="apt-get" sys_bit=$(uname -m) case $sys_bit in 'amd64' | x86_64) ;; *) echo -e " 这个 ${red}安装脚本${none} 不支持你的系统。 ${yellow}(-_-) ${none} 备注: 仅支持 Ubuntu 16+ / Debian 8+ / CentOS 7+ 系统 " && exit 1 ;; esac # 笨笨的检测方法 if [[ $(command -v apt-get) || $(command -v yum) ]] && [[ $(command -v systemctl) ]]; then if [[ $(command -v yum) ]]; then cmd="yum" fi else echo -e " 这个 ${red}安装脚本${none} 不支持你的系统。 ${yellow}(-_-) ${none} 备注: 仅支持 Ubuntu 16+ / Debian 8+ / CentOS 7+ 系统 " && exit 1 fi if [ ! -d "/etc/ccworker/" ]; then mkdir /etc/ccworker/ fi error() { echo -e "\n$red 输入错误!$none\n" } log_config_ask() { echo while :; do echo -e "是否开启 日志记录, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}Y${none}]):")" enableLog [[ -z $enableLog ]] && enableLog="y" case $enableLog in Y | y) enableLog="y" break ;; N | n) enableLog="n" echo echo echo -e "$yellow 不启用日志记录 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } eth_miner_config_ask() { echo while :; do echo -e "是否开启 ETHW/ETF抽水中转, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}Y${none}]):")" enableEthProxy [[ -z $enableEthProxy ]] && enableEthProxy="y" case $enableEthProxy in Y | y) enableEthProxy="y" eth_miner_config break ;; N | n) enableEthProxy="n" echo echo echo -e "$yellow 不启用ETHW/ETF抽水中转 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } eth_miner_config() { echo while :; do echo -e "请输入ETHW/ETF矿池域名,例如 ethw.f2pool.com,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}ethw.f2pool.com${none}]):")" ethPoolAddress [[ -z $ethPoolAddress ]] && ethPoolAddress="ethw.f2pool.com" case $ethPoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow ETHW/ETF矿池地址 = ${cyan}$ethPoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到ETHW/ETF矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" ethPoolSslMode [[ -z $ethPoolSslMode ]] && ethPoolSslMode="n" case $ethPoolSslMode in Y | y) ethPoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到ETHW/ETF矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) ethPoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到ETHW/ETF矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$ethPoolSslMode" = "y" ]]; then echo -e "请输入ETHW/ETF矿池"$yellow"$ethPoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入ETHW/ETF矿池"$yellow"$ethPoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}6688${none}):")" ethPoolPort [ -z "$ethPoolPort" ] && ethPoolPort=6688 case $ethPoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETHW/ETF矿池端口 = $cyan$ethPoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done local randomTcp="6688" while :; do echo -e "请输入ETHW/ETF本地TCP中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认TCP端口: ${cyan}${randomTcp}${none}):")" ethTcpPort [ -z "$ethTcpPort" ] && ethTcpPort=$randomTcp case $ethTcpPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETHW/ETF本地TCP中转端口 = $cyan$ethTcpPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done local randomTls="12345" while :; do echo -e "请输入ETHW/ETF本地SSL中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 或 "$magenta"$ethTcpPort"$none" 端口" read -p "$(echo -e "(默认端口: ${cyan}${randomTls}${none}):")" ethTlsPort [ -z "$ethTlsPort" ] && ethTlsPort=$randomTls case $ethTlsPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; $ethTcpPort) echo echo " ..不能和 TCP端口 $ethTcpPort 一毛一样....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETHW/ETF本地SSL中转端口 = $cyan$ethTlsPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入你的ETHW/ETF钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" ethUser if [ -z "$ethUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow ETHW/ETF抽水用户名/钱包名 = $cyan$ethUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入你喜欢的矿工名,抽水成功后你可以在矿池看到这个矿工名" read -p "$(echo -e "(默认: [${cyan}worker${none}]):")" ethWorker [[ -z $ethWorker ]] && ethWorker="worker" echo echo echo -e "$yellow ETHW/ETF抽水矿工名 = ${cyan}$ethWorker${none}" echo "----------------------------------------------------------------" echo break done while :; do echo -e "请输入ETHW/ETF抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" ethTaxPercent [ -z "$ethTaxPercent" ] && ethTaxPercent=10 case $ethTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow ETHW/ETF抽水比例 = $cyan$ethTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done while :; do echo -e "是否添加第二个抽水账户 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableEthSecondConfig [[ -z $enableEthSecondConfig ]] && enableEthSecondConfig="n" case $enableEthSecondConfig in Y | y) enableEthSecondConfig="y" echo echo break ;; N | n) enableEthSecondConfig="n" echo echo break ;; *) error ;; esac done if [[ "$enableEthSecondConfig" = "y" ]]; then while :; do echo -e "请输入你的第二个ETHW/ETF钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" ethSecondUser if [ -z "$ethSecondUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow ETHW/ETF第二个抽水用户名/钱包名 = $cyan$ethSecondUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入第二个抽水账户的ETHW/ETF抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" ethSecondTaxPercent [ -z "$ethSecondTaxPercent" ] && ethSecondTaxPercent=10 case $ethSecondTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow ETHW/ETF抽水比例 = $cyan$ethSecondTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done fi while :; do echo -e "是否归集ETHW/ETF抽水到另外的矿池,部分矿池可能不支持,任何的归集都会损失抽水算力。 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableEthDonatePool [[ -z $enableEthDonatePool ]] && enableEthDonatePool="n" case $enableEthDonatePool in Y | y) enableEthDonatePool="y" eth_tax_pool_config_ask echo echo echo -e "$yellow 归集ETHW/ETF抽水到指定矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) enableEthDonatePool="n" echo echo echo -e "$yellow 不归集ETHW/ETF抽水到指定矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } eth_tax_pool_config_ask() { echo while :; do echo -e "请输入ETHW/ETF归集抽水矿池域名,例如 asia1.ethermine.org,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}asia1.ethermine.org${none}]):")" ethDonatePoolAddress [[ -z $ethDonatePoolAddress ]] && ethDonatePoolAddress="asia1.ethermine.org" case $ethDonatePoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow ETHW/ETF抽水归集矿池地址 = ${cyan}$ethDonatePoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到ETHW/ETF抽水归集矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" ethDonatePoolSslMode [[ -z $ethDonatePoolSslMode ]] && ethDonatePoolSslMode="n" case $ethDonatePoolSslMode in Y | y) ethDonatePoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到ETHW/ETF抽水归集矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) ethDonatePoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到ETHW/ETF抽水归集矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$ethDonatePoolSslMode" = "y" ]]; then echo -e "请输入ETHW/ETF抽水归集矿池"$yellow"$ethDonatePoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入ETHW/ETF抽水归集矿池"$yellow"$ethDonatePoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}4444${none}):")" ethDonatePoolPort [ -z "$ethDonatePoolPort" ] && ethDonatePoolPort=4444 case $ethDonatePoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETHW/ETF抽水归集矿池端口 = $cyan$ethDonatePoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done } etc_miner_config_ask() { echo while :; do echo -e "是否开启 ETC抽水中转, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableEtcProxy [[ -z $enableEtcProxy ]] && enableEtcProxy="n" case $enableEtcProxy in Y | y) enableEtcProxy="y" etc_miner_config break ;; N | n) enableEtcProxy="n" echo echo echo -e "$yellow 不启用ETC抽水中转 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } etc_miner_config() { echo while :; do echo -e "请输入ETC矿池域名,例如 etc.f2pool.com,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}etc.f2pool.com${none}]):")" etcPoolAddress [[ -z $etcPoolAddress ]] && etcPoolAddress="etc.f2pool.com" case $etcPoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow ETC矿池地址 = ${cyan}$etcPoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到ETC矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" etcPoolSslMode [[ -z $etcPoolSslMode ]] && etcPoolSslMode="n" case $etcPoolSslMode in Y | y) etcPoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到ETC矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) etcPoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到ETC矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$etcPoolSslMode" = "y" ]]; then echo -e "请输入ETC矿池"$yellow"$etcPoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入ETC矿池"$yellow"$etcPoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}8118${none}):")" etcPoolPort [ -z "$etcPoolPort" ] && etcPoolPort=8118 case $etcPoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETC矿池端口 = $cyan$etcPoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done local randomTcp="8118" while :; do echo -e "请输入ETC本地TCP中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认TCP端口: ${cyan}${randomTcp}${none}):")" etcTcpPort [ -z "$etcTcpPort" ] && etcTcpPort=$randomTcp case $etcTcpPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETC本地TCP中转端口 = $cyan$etcTcpPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done local randomTls="22345" while :; do echo -e "请输入ETC本地SSL中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 或 "$magenta"$etcTcpPort"$none" 端口" read -p "$(echo -e "(默认端口: ${cyan}${randomTls}${none}):")" etcTlsPort [ -z "$etcTlsPort" ] && etcTlsPort=$randomTls case $etcTlsPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; $etcTcpPort) echo echo " ..不能和 TCP端口 $etcTcpPort 一毛一样....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETC本地SSL中转端口 = $cyan$etcTlsPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入你的ETC钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" etcUser if [ -z "$etcUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." else echo echo echo -e "$yellow ETC抽水用户名/钱包名 = $cyan$etcUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入你喜欢的矿工名,抽水成功后你可以在矿池看到这个矿工名" read -p "$(echo -e "(默认: [${cyan}worker${none}]):")" etcWorker [[ -z $etcWorker ]] && etcWorker="worker" echo echo echo -e "$yellow ETC抽水矿工名 = ${cyan}$etcWorker${none}" echo "----------------------------------------------------------------" echo break done while :; do echo -e "请输入ETC抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" etcTaxPercent [ -z "$etcTaxPercent" ] && etcTaxPercent=10 case $etcTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow ETC抽水比例 = $cyan$etcTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done while :; do echo -e "是否添加第二个抽水账户 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableEtcSecondConfig [[ -z $enableEtcSecondConfig ]] && enableEtcSecondConfig="n" case $enableEtcSecondConfig in Y | y) enableEtcSecondConfig="y" echo echo break ;; N | n) enableEtcSecondConfig="n" echo echo break ;; *) error ;; esac done if [[ "$enableEtcSecondConfig" = "y" ]]; then while :; do echo -e "请输入你的第二个ETC钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" etcSecondUser if [ -z "$etcSecondUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow ETC第二个抽水用户名/钱包名 = $cyan$etcSecondUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入第二个抽水账户的ETC抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" etcSecondTaxPercent [ -z "$etcSecondTaxPercent" ] && etcSecondTaxPercent=10 case $etcSecondTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow ETHW/ETF抽水比例 = $cyan$etcSecondTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done fi while :; do echo -e "是否归集ETC抽水到另外的矿池,部分矿池可能不支持,仅测试E池通过 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableEtcDonatePool [[ -z $enableEtcDonatePool ]] && enableEtcDonatePool="n" case $enableEtcDonatePool in Y | y) enableEtcDonatePool="y" etc_tax_pool_config_ask echo echo echo -e "$yellow 归集ETC抽水到指定矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) enableEtcDonatePool="n" echo echo echo -e "$yellow 不归集ETC抽水到指定矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } etc_tax_pool_config_ask() { echo while :; do echo -e "请输入ETC归集抽水矿池域名,例如 etc.f2pool.com,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}etc.f2pool.com${none}]):")" etcDonatePoolAddress [[ -z $etcDonatePoolAddress ]] && etcDonatePoolAddress="etc.f2pool.com" case $etcDonatePoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow ETC抽水归集矿池地址 = ${cyan}$etcDonatePoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到ETHW/ETF抽水归集矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" etcDonatePoolSslMode [[ -z $etcDonatePoolSslMode ]] && etcDonatePoolSslMode="n" case $etcDonatePoolSslMode in Y | y) etcDonatePoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到ETHW/ETF抽水归集矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) etcDonatePoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到ETHW/ETF抽水归集矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$etcDonatePoolSslMode" = "y" ]]; then echo -e "请输入ETC抽水归集矿池"$yellow"$etcDonatePoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入ETC抽水归集矿池"$yellow"$etcDonatePoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}8118${none}):")" etcDonatePoolPort [ -z "$etcDonatePoolPort" ] && etcDonatePoolPort=8118 case $etcDonatePoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ETC抽水归集矿池端口 = $cyan$etcDonatePoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done } btc_miner_config_ask() { echo while :; do echo -e "是否开启 BTC抽水中转, 输入 [${magenta}Y或者N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableBtcProxy [[ -z $enableBtcProxy ]] && enableBtcProxy="n" case $enableBtcProxy in Y | y) enableBtcProxy="y" btc_miner_config break ;; N | n) enableBtcProxy="n" echo echo echo -e "$yellow 不启用BTC抽水中转 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } btc_miner_config() { echo while :; do echo -e "请输入BTC矿池域名,例如 btc.f2pool.com,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}btc.f2pool.com${none}]):")" btcPoolAddress [[ -z $btcPoolAddress ]] && btcPoolAddress="btc.f2pool.com" case $btcPoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow BTC矿池地址 = ${cyan}$btcPoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到BTC矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" btcPoolSslMode [[ -z $btcPoolSslMode ]] && btcPoolSslMode="n" case $btcPoolSslMode in Y | y) btcPoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到BTC矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) btcPoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到BTC矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$btcPoolSslMode" = "y" ]]; then echo -e "请输入BTC矿池"$yellow"$btcPoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入BTC矿池"$yellow"$btcPoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}3333${none}):")" btcPoolPort [ -z "$btcPoolPort" ] && btcPoolPort=3333 case $btcPoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow BTC矿池端口 = $cyan$btcPoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done local randomTcp="3333" while :; do echo -e "请输入BTC本地TCP中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认TCP端口: ${cyan}${randomTcp}${none}):")" btcTcpPort [ -z "$btcTcpPort" ] && btcTcpPort=$randomTcp case $btcTcpPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow BTC本地TCP中转端口 = $cyan$btcTcpPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done local randomTls="32345" while :; do echo -e "请输入BTC本地SSL中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 或 "$magenta"$btcTcpPort"$none" 端口" read -p "$(echo -e "(默认端口: ${cyan}${randomTls}${none}):")" btcTlsPort [ -z "$btcTlsPort" ] && btcTlsPort=$randomTls case $btcTlsPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; $btcTcpPort) echo echo " ..不能和 TCP端口 $btcTcpPort 一毛一样....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow BTC本地SSL中转端口 = $cyan$btcTlsPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入你在矿池的BTC账户用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" btcUser if [ -z "$btcUser" ]; then echo echo echo " ..一定要输入一个用户名啊....." else echo echo echo -e "$yellow BTC抽水用户名 = $cyan$btcUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入你喜欢的矿工名,抽水成功后你可以在矿池看到这个矿工名" read -p "$(echo -e "(默认: [${cyan}worker${none}]):")" btcWorker [[ -z $btcWorker ]] && btcWorker="worker" echo echo echo -e "$yellow BTC抽水矿工名 = ${cyan}$btcWorker${none}" echo "----------------------------------------------------------------" echo break done while :; do echo -e "请输入BTC抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" btcTaxPercent [ -z "$btcTaxPercent" ] && btcTaxPercent=10 case $btcTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow BTC抽水比例 = $cyan$btcTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done while :; do echo -e "是否添加第二个抽水账户 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableBtcSecondConfig [[ -z $enableBtcSecondConfig ]] && enableBtcSecondConfig="n" case $enableBtcSecondConfig in Y | y) enableBtcSecondConfig="y" echo echo break ;; N | n) enableBtcSecondConfig="n" echo echo break ;; *) error ;; esac done if [[ "$enableBtcSecondConfig" = "y" ]]; then while :; do echo -e "请输入你的第二个BTC钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" btcSecondUser if [ -z "$btcSecondUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow BTC第二个抽水用户名/钱包名 = $cyan$btcSecondUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入第二个抽水账户的BTC抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" btcSecondTaxPercent [ -z "$btcSecondTaxPercent" ] && btcSecondTaxPercent=10 case $btcSecondTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow BTC抽水比例 = $cyan$btcSecondTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done fi } rvn_miner_config_ask() { echo while :; do echo -e "是否开启 RVN抽水中转, 输入 [${magenta}Y或者N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableRvnProxy [[ -z $enableRvnProxy ]] && enableRvnProxy="n" case $enableRvnProxy in Y | y) enableRvnProxy="y" rvn_miner_config break ;; N | n) enableRvnProxy="n" echo echo echo -e "$yellow 不启用RVN抽水中转 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } rvn_miner_config() { echo while :; do echo -e "请输入RVN矿池域名,例如 raven.f2pool.com,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}raven.f2pool.com${none}]):")" rvnPoolAddress [[ -z $rvnPoolAddress ]] && rvnPoolAddress="raven.f2pool.com" case $rvnPoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow RVN矿池地址 = ${cyan}$rvnPoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到RVN矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" rvnPoolSslMode [[ -z $rvnPoolSslMode ]] && rvnPoolSslMode="n" case $rvnPoolSslMode in Y | y) rvnPoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到RVN矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) rvnPoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到RVN矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$rvnPoolSslMode" = "y" ]]; then echo -e "请输入RVN矿池"$yellow"$rvnPoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入RVN矿池"$yellow"$rvnPoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}3636${none}):")" rvnPoolPort [ -z "$rvnPoolPort" ] && rvnPoolPort=3636 case $rvnPoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow RVN矿池端口 = $cyan$rvnPoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done local randomTcp="3636" while :; do echo -e "请输入RVN本地TCP中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认TCP端口: ${cyan}${randomTcp}${none}):")" rvnTcpPort [ -z "$rvnTcpPort" ] && rvnTcpPort=$randomTcp case $rvnTcpPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow RVN本地TCP中转端口 = $cyan$rvnTcpPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done local randomTls="42345" while :; do echo -e "请输入RVN本地SSL中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 或 "$magenta"$rvnTcpPort"$none" 端口" read -p "$(echo -e "(默认端口: ${cyan}${randomTls}${none}):")" rvnTlsPort [ -z "$rvnTlsPort" ] && rvnTlsPort=$randomTls case $rvnTlsPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; $rvnTcpPort) echo echo " ..不能和 TCP端口 $rvnTcpPort 一毛一样....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow RVN本地SSL中转端口 = $cyan$rvnTlsPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入你在矿池的RVN账户用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" rvnUser if [ -z "$rvnUser" ]; then echo echo echo " ..一定要输入一个用户名啊....." else echo echo echo -e "$yellow RVN抽水用户名 = $cyan$rvnUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入你喜欢的矿工名,抽水成功后你可以在矿池看到这个矿工名" read -p "$(echo -e "(默认: [${cyan}worker${none}]):")" rvnWorker [[ -z $rvnWorker ]] && rvnWorker="worker" echo echo echo -e "$yellow RVN抽水矿工名 = ${cyan}$rvnWorker${none}" echo "----------------------------------------------------------------" echo break done while :; do echo -e "请输入RVN抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" rvnTaxPercent [ -z "$rvnTaxPercent" ] && rvnTaxPercent=10 case $rvnTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow RVN抽水比例 = $cyan$rvnTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done while :; do echo -e "是否添加第二个抽水账户 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableRvnSecondConfig [[ -z $enableRvnSecondConfig ]] && enableRvnSecondConfig="n" case $enableRvnSecondConfig in Y | y) enableRvnSecondConfig="y" echo echo break ;; N | n) enableRvnSecondConfig="n" echo echo break ;; *) error ;; esac done if [[ "$enableRvnSecondConfig" = "y" ]]; then while :; do echo -e "请输入你的第二个RVN钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" rvnSecondUser if [ -z "$rvnSecondUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow RVN第二个抽水用户名/钱包名 = $cyan$rvnSecondUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入第二个抽水账户的RVN抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" rvnSecondTaxPercent [ -z "$rvnSecondTaxPercent" ] && rvnSecondTaxPercent=10 case $rvnSecondTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow RVN抽水比例 = $cyan$rvnSecondTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done fi } ergo_miner_config_ask() { echo while :; do echo -e "是否开启 ERGO抽水中转, 输入 [${magenta}Y或者N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableErgoProxy [[ -z $enableErgoProxy ]] && enableErgoProxy="n" case $enableErgoProxy in Y | y) enableErgoProxy="y" ergo_miner_config break ;; N | n) enableErgoProxy="n" echo echo echo -e "$yellow 不启用ERGO抽水中转 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } ergo_miner_config() { echo while :; do echo -e "请输入ERGO矿池域名,例如 stratum-ergo.flypool.org,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}stratum-ergo.flypool.org${none}]):")" ergoPoolAddress [[ -z $ergoPoolAddress ]] && ergoPoolAddress="stratum-ergo.flypool.org" case $ergoPoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow ERGO矿池地址 = ${cyan}$ergoPoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到ERGO矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" ergoPoolSslMode [[ -z $ergoPoolSslMode ]] && ergoPoolSslMode="n" case $ergoPoolSslMode in Y | y) ergoPoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到ERGO矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) ergoPoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到ERGO矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$ergoPoolSslMode" = "y" ]]; then echo -e "请输入ERGO矿池"$yellow"$ergoPoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入ERGO矿池"$yellow"$ergoPoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}3333${none}):")" ergoPoolPort [ -z "$ergoPoolPort" ] && ergoPoolPort=3333 case $ergoPoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ERGO矿池端口 = $cyan$ergoPoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done local randomTcp="3434" while :; do echo -e "请输入ERGO本地TCP中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认TCP端口: ${cyan}${randomTcp}${none}):")" ergoTcpPort [ -z "$ergoTcpPort" ] && ergoTcpPort=$randomTcp case $ergoTcpPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ERGO本地TCP中转端口 = $cyan$ergoTcpPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done local randomTls="52345" while :; do echo -e "请输入ERGO本地SSL中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 或 "$magenta"$ergoTcpPort"$none" 端口" read -p "$(echo -e "(默认端口: ${cyan}${randomTls}${none}):")" ergoTlsPort [ -z "$ergoTlsPort" ] && ergoTlsPort=$randomTls case $ergoTlsPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; $ergoTcpPort) echo echo " ..不能和 TCP端口 $ergoTcpPort 一毛一样....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow ERGO本地SSL中转端口 = $cyan$ergoTlsPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入你在矿池的ERGO账户用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" ergoUser if [ -z "$ergoUser" ]; then echo echo echo " ..一定要输入一个用户名啊....." else echo echo echo -e "$yellow ERGO抽水用户名 = $cyan$ergoUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入你喜欢的矿工名,抽水成功后你可以在矿池看到这个矿工名" read -p "$(echo -e "(默认: [${cyan}worker${none}]):")" ergoWorker [[ -z $ergoWorker ]] && ergoWorker="worker" echo echo echo -e "$yellow ERGO抽水矿工名 = ${cyan}$ergoWorker${none}" echo "----------------------------------------------------------------" echo break done while :; do echo -e "请输入ERGO抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" ergoTaxPercent [ -z "$ergoTaxPercent" ] && ergoTaxPercent=10 case $ergoTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow ERGO抽水比例 = $cyan$ergoTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done while :; do echo -e "是否添加第二个抽水账户 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableErgoSecondConfig [[ -z $enableErgoSecondConfig ]] && enableErgoSecondConfig="n" case $enableErgoSecondConfig in Y | y) enableErgoSecondConfig="y" echo echo break ;; N | n) enableErgoSecondConfig="n" echo echo break ;; *) error ;; esac done if [[ "$enableErgoSecondConfig" = "y" ]]; then while :; do echo -e "请输入你的第二个ERGO钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" ergoSecondUser if [ -z "$ergoSecondUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow ERGO第二个抽水用户名/钱包名 = $cyan$ergoSecondUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入第二个抽水账户的ERGO抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" ergoSecondTaxPercent [ -z "$ergoSecondTaxPercent" ] && ergoSecondTaxPercent=10 case $ergoSecondTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow ERGO抽水比例 = $cyan$ergoSecondTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done fi } cfx_miner_config_ask() { echo while :; do echo -e "是否开启 CFX抽水中转, 输入 [${magenta}Y或者N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableCfxProxy [[ -z $enableCfxProxy ]] && enableCfxProxy="n" case $enableCfxProxy in Y | y) enableCfxProxy="y" cfx_miner_config break ;; N | n) enableCfxProxy="n" echo echo echo -e "$yellow 不启用CFX抽水中转 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } cfx_miner_config() { echo while :; do echo -e "请输入CFX矿池域名,例如 cfx.f2pool.com,不需要输入矿池端口" read -p "$(echo -e "(默认: [${cyan}cfx.f2pool.com${none}]):")" cfxPoolAddress [[ -z $cfxPoolAddress ]] && cfxPoolAddress="cfx.f2pool.com" case $cfxPoolAddress in *[:$]*) echo echo -e " 由于这个脚本太辣鸡了..所以矿池地址不能包含端口.... " echo error ;; *) echo echo echo -e "$yellow CFX矿池地址 = ${cyan}$cfxPoolAddress${none}" echo "----------------------------------------------------------------" echo break ;; esac done while :; do echo -e "是否使用SSL模式连接到CFX矿池, 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" cfxPoolSslMode [[ -z $cfxPoolSslMode ]] && cfxPoolSslMode="n" case $cfxPoolSslMode in Y | y) cfxPoolSslMode="y" echo echo echo -e "$yellow 使用SSL模式连接到CFX矿池 $none" echo "----------------------------------------------------------------" echo break ;; N | n) cfxPoolSslMode="n" echo echo echo -e "$yellow 使用TCP模式连接到CFX矿池 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do if [[ "$cfxPoolSslMode" = "y" ]]; then echo -e "请输入CFX矿池"$yellow"$cfxPoolAddress"$none"的SSL端口,不要使用矿池的TCP端口!!!" else echo -e "请输入CFX矿池"$yellow"$cfxPoolAddress"$none"的TCP端口,不要使用矿池的SSL端口!!!" fi read -p "$(echo -e "(默认端口: ${cyan}6800${none}):")" cfxPoolPort [ -z "$cfxPoolPort" ] && cfxPoolPort=6800 case $cfxPoolPort in [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow CFX矿池端口 = $cyan$cfxPoolPort$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..端口要在1-65535之间啊哥哥....." error ;; esac done local randomTcp="6800" while :; do echo -e "请输入CFX本地TCP中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认TCP端口: ${cyan}${randomTcp}${none}):")" cfxTcpPort [ -z "$cfxTcpPort" ] && cfxTcpPort=$randomTcp case $cfxTcpPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow CFX本地TCP中转端口 = $cyan$cfxTcpPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done local randomTls="62345" while :; do echo -e "请输入CFX本地SSL中转的端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 或 "$magenta"$cfxTcpPort"$none" 端口" read -p "$(echo -e "(默认端口: ${cyan}${randomTls}${none}):")" cfxTlsPort [ -z "$cfxTlsPort" ] && cfxTlsPort=$randomTls case $cfxTlsPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; $cfxTcpPort) echo echo " ..不能和 TCP端口 $cfxTcpPort 一毛一样....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow CFX本地SSL中转端口 = $cyan$cfxTlsPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入你在矿池的CFX账户用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" cfxUser if [ -z "$cfxUser" ]; then echo echo echo " ..一定要输入一个用户名啊....." else echo echo echo -e "$yellow CFX抽水用户名 = $cyan$cfxUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入你喜欢的矿工名,抽水成功后你可以在矿池看到这个矿工名" read -p "$(echo -e "(默认: [${cyan}worker${none}]):")" cfxWorker [[ -z $cfxWorker ]] && cfxWorker="worker" echo echo echo -e "$yellow CFX抽水矿工名 = ${cyan}$cfxWorker${none}" echo "----------------------------------------------------------------" echo break done while :; do echo -e "请输入CFX抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" cfxTaxPercent [ -z "$cfxTaxPercent" ] && cfxTaxPercent=10 case $cfxTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow CFX抽水比例 = $cyan$cfxTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done while :; do echo -e "是否添加第二个抽水账户 输入 [${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableCfxSecondConfig [[ -z $enableCfxSecondConfig ]] && enableCfxSecondConfig="n" case $enableCfxSecondConfig in Y | y) enableCfxSecondConfig="y" echo echo break ;; N | n) enableCfxSecondConfig="n" echo echo break ;; *) error ;; esac done if [[ "$enableCfxSecondConfig" = "y" ]]; then while :; do echo -e "请输入你的第二个CFX钱包地址或者你在矿池的用户名" read -p "$(echo -e "(一定不要输入错误,错了就抽给别人了):")" cfxSecondUser if [ -z "$cfxSecondUser" ]; then echo echo echo " ..一定要输入一个钱包地址或者用户名啊....." echo else echo echo echo -e "$yellow CFX第二个抽水用户名/钱包名 = $cyan$cfxSecondUser$none" echo "----------------------------------------------------------------" echo break fi done while :; do echo -e "请输入第二个抽水账户的CFX抽水比例 ["$magenta"0-95"$none"]" read -p "$(echo -e "(默认: ${cyan}10${none}):")" cfxSecondTaxPercent [ -z "$cfxSecondTaxPercent" ] && cfxSecondTaxPercent=10 case $cfxSecondTaxPercent in 0 | 0\.[0-9] | 0\.[0-9][0-9]* | [1-9] | [1-8][0-9] | [1-9]\.[0-9]* | [1-8][0-9]\.[0-9]* | 9[0-5] | 9[0-4]\.[0-9]*) echo echo echo -e "$yellow CFX抽水比例 = $cyan$cfxSecondTaxPercent%$none" echo "----------------------------------------------------------------" echo break ;; *) echo echo " ..输入的抽水比例要在0-95之间,如果用的是整数不要加小数点....." error ;; esac done fi } http_logger_config_ask() { echo while :; do echo -e "是否开启 网页监控平台, 输入 [${magenta}Y或者N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}Y${none}]):")" enableHttpLog [[ -z $enableHttpLog ]] && enableHttpLog="y" case $enableHttpLog in Y | y) enableHttpLog="y" http_logger_miner_config break ;; N | n) enableHttpLog="n" echo echo echo -e "$yellow 不启用网页监控平台 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } http_logger_miner_config() { local randomTcp="8080" while :; do echo -e "请输入网页监控平台访问端口 ["$magenta"1-65535"$none"],不能选择 "$magenta"80"$none" 或 "$magenta"443"$none" 端口" read -p "$(echo -e "(默认网页监控平台访问端口: ${cyan}${randomTcp}${none}):")" httpLogPort [ -z "$httpLogPort" ] && httpLogPort=$randomTcp case $httpLogPort in 80) echo echo " ...都说了不能选择 80 端口了咯....." error ;; 443) echo echo " ..都说了不能选择 443 端口了咯....." error ;; [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow 网页监控平台访问端口 = $cyan$httpLogPort$none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done while :; do echo -e "请输入网页监控平台登录密码,不能包含双引号,不然无法启动" read -p "$(echo -e "(一定不要输入那种很简单的密码):")" httpLogPassword if [ -z "$httpLogPassword" ]; then echo echo echo " ..一定要输入一个密码啊....." else echo echo echo -e "$yellow 网页监控平台密码 = $cyan$httpLogPassword$none" echo "----------------------------------------------------------------" echo break fi done } gost_config_ask() { echo while :; do echo -e "是否开启 GOST转发,如前端有GOST加密,这里建议不开启。开启后可能能改善掉线情况,抽水软件的端口将变为随机,而你配置的端口将由GOST提供,脚本将自动绑定你配置的端口到GOST,由GOST转发到抽水, 输入 [${magenta}Y或者N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}N${none}]):")" enableGostProxy [[ -z $enableGostProxy ]] && enableGostProxy="n" case $enableGostProxy in Y | y) enableGostProxy="y" echo echo echo -e "$yellow 启用GOST转发 $none" echo "----------------------------------------------------------------" echo break ;; N | n) enableGostProxy="n" echo echo echo -e "$yellow 不启用GOST转发 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } print_all_config() { clear echo echo " ....准备安装了咯..看看有没有配置正确了..." echo echo "---------- 安装信息 -------------" echo echo -e "$yellow CaoCaoMinerTaxProxy将被安装到$installPath${none}" echo echo "----------------------------------------------------------------" if [[ "$enableLog" = "y" ]]; then echo -e "$yellow 软件日志设置 = ${cyan}启用${none}" echo "----------------------------------------------------------------" else echo -e "$yellow 软件日志设置 = ${cyan}禁用${none}" echo "----------------------------------------------------------------" fi if [[ "$enableEthProxy" = "y" ]]; then echo "ETHW/ETF 中转抽水配置" echo -e "$yellow ETHW/ETF矿池地址 = ${cyan}$ethPoolAddress${none}" if [[ "$ethPoolSslMode" = "y" ]]; then echo -e "$yellow ETHW/ETF矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow ETHW/ETF矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow ETHW/ETF矿池端口 = $cyan$ethPoolPort$none" echo -e "$yellow ETHW/ETF本地TCP中转端口 = $cyan$ethTcpPort$none" echo -e "$yellow ETHW/ETF本地SSL中转端口 = $cyan$ethTlsPort$none" echo -e "$yellow ETHW/ETF抽水用户名/钱包名 = $cyan$ethUser$none" echo -e "$yellow ETHW/ETF抽水矿工名 = ${cyan}$ethWorker${none}" echo -e "$yellow ETHW/ETF抽水比例 = $cyan$ethTaxPercent%$none" if [[ "$enableEthSecondConfig" = "y" ]]; then echo -e "$yellow ETHW/ETF第二个抽水用户名/钱包名 = $cyan$ethSecondUser$none" echo -e "$yellow ETHW/ETF第二个账户抽水比例 = $cyan$ethSecondTaxPercent%$none" fi if [[ "$enableEthDonatePool" = "y" ]]; then echo -e "$yellow ETHW/ETF强制归集抽水 = ${cyan}启用${none}" echo -e "$yellow ETHW/ETF强制归集抽水矿池地址 = ${cyan}$ethDonatePoolAddress${none}" if [[ "$ethDonatePoolSslMode" = "y" ]]; then echo -e "$yellow ETHW/ETF强制归集抽水矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow ETHW/ETF强制归集抽水矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow ETHW/ETF强制归集矿池端口 = ${cyan}$ethDonatePoolPort${none}" fi echo "----------------------------------------------------------------" fi if [[ "$enableEtcProxy" = "y" ]]; then echo "ETC 中转抽水配置" echo -e "$yellow ETC矿池地址 = ${cyan}$etcPoolAddress${none}" if [[ "$etcPoolSslMode" = "y" ]]; then echo -e "$yellow ETC矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow ETC矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow ETC矿池端口 = $cyan$etcPoolPort$none" echo -e "$yellow ETC本地TCP中转端口 = $cyan$etcTcpPort$none" echo -e "$yellow ETC本地SSL中转端口 = $cyan$etcTlsPort$none" echo -e "$yellow ETC抽水用户名/钱包名 = $cyan$etcUser$none" echo -e "$yellow ETC抽水矿工名 = ${cyan}$etcWorker${none}" echo -e "$yellow ETC抽水比例 = $cyan$etcTaxPercent%$none" if [[ "$enableEtcSecondConfig" = "y" ]]; then echo -e "$yellow ETC第二个抽水用户名/钱包名 = $cyan$etcSecondUser$none" echo -e "$yellow ETC第二个账户抽水比例 = $cyan$etcSecondTaxPercent%$none" fi if [[ "$enableEtcDonatePool" = "y" ]]; then echo -e "$yellow ETC强制归集抽水 = ${cyan}启用${none}" echo -e "$yellow ETC强制归集抽水矿池地址 = ${cyan}$etcDonatePoolAddress${none}" if [[ "$etcDonatePoolSslMode" = "y" ]]; then echo -e "$yellow ETC强制归集抽水矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow ETC强制归集抽水矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow ETC强制归集矿池端口 = ${cyan}$etcDonatePoolPort${none}" fi echo "----------------------------------------------------------------" fi if [[ "$enableBtcProxy" = "y" ]]; then echo "BTC 中转抽水配置" echo -e "$yellow BTC矿池地址 = ${cyan}$btcPoolAddress${none}" if [[ "$btcPoolSslMode" = "y" ]]; then echo -e "$yellow BTC矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow BTC矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow BTC矿池端口 = $cyan$btcPoolPort$none" echo -e "$yellow BTC本地TCP中转端口 = $cyan$btcTcpPort$none" echo -e "$yellow BTC本地SSL中转端口 = $cyan$btcTlsPort$none" echo -e "$yellow BTC抽水用户名/钱包名 = $cyan$btcUser$none" echo -e "$yellow BTC抽水矿工名 = ${cyan}$btcWorker${none}" echo -e "$yellow BTC抽水比例 = $cyan$btcTaxPercent%$none" if [[ "$enableBtcSecondConfig" = "y" ]]; then echo -e "$yellow BTC第二个抽水用户名/钱包名 = $cyan$btcSecondUser$none" echo -e "$yellow BTC第二个账户抽水比例 = $cyan$btcSecondTaxPercent%$none" fi echo "----------------------------------------------------------------" fi if [[ "$enableRvnProxy" = "y" ]]; then echo "RVN 中转抽水配置" echo -e "$yellow RVN矿池地址 = ${cyan}$rvnPoolAddress${none}" if [[ "$rvnPoolSslMode" = "y" ]]; then echo -e "$yellow RVN矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow RVN矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow RVN矿池端口 = $cyan$rvnPoolPort$none" echo -e "$yellow RVN本地TCP中转端口 = $cyan$rvnTcpPort$none" echo -e "$yellow RVN本地SSL中转端口 = $cyan$rvnTlsPort$none" echo -e "$yellow RVN抽水用户名/钱包名 = $cyan$rvnUser$none" echo -e "$yellow RVN抽水矿工名 = ${cyan}$rvnWorker${none}" echo -e "$yellow RVN抽水比例 = $cyan$rvnTaxPercent%$none" if [[ "$enableRvnSecondConfig" = "y" ]]; then echo -e "$yellow RVN第二个抽水用户名/钱包名 = $cyan$rvnSecondUser$none" echo -e "$yellow RVN第二个账户抽水比例 = $cyan$rvnSecondTaxPercent%$none" fi echo "----------------------------------------------------------------" fi if [[ "$enableErgoProxy" = "y" ]]; then echo "ERGO 中转抽水配置" echo -e "$yellow ERGO矿池地址 = ${cyan}$ergoPoolAddress${none}" if [[ "$ergoPoolSslMode" = "y" ]]; then echo -e "$yellow ERGO矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow ERGO矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow ERGO矿池端口 = $cyan$ergoPoolPort$none" echo -e "$yellow ERGO本地TCP中转端口 = $cyan$ergoTcpPort$none" echo -e "$yellow ERGO本地SSL中转端口 = $cyan$ergoTlsPort$none" echo -e "$yellow ERGO抽水用户名/钱包名 = $cyan$ergoUser$none" echo -e "$yellow ERGO抽水矿工名 = ${cyan}$ergoWorker${none}" echo -e "$yellow ERGO抽水比例 = $cyan$ergoTaxPercent%$none" if [[ "$enableErgoSecondConfig" = "y" ]]; then echo -e "$yellow ERGO第二个抽水用户名/钱包名 = $cyan$ergoSecondUser$none" echo -e "$yellow ERGO第二个账户抽水比例 = $cyan$ergoSecondTaxPercent%$none" fi echo "----------------------------------------------------------------" fi if [[ "$enableCfxProxy" = "y" ]]; then echo "CFX 中转抽水配置" echo -e "$yellow CFX矿池地址 = ${cyan}$cfxPoolAddress${none}" if [[ "$cfxPoolSslMode" = "y" ]]; then echo -e "$yellow CFX矿池连接方式 = ${cyan}SSL${none}" else echo -e "$yellow CFX矿池连接方式 = ${cyan}TCP${none}" fi echo -e "$yellow CFX矿池端口 = $cyan$cfxPoolPort$none" echo -e "$yellow CFX本地TCP中转端口 = $cyan$cfxTcpPort$none" echo -e "$yellow CFX本地SSL中转端口 = $cyan$cfxTlsPort$none" echo -e "$yellow CFX抽水用户名/钱包名 = $cyan$cfxUser$none" echo -e "$yellow CFX抽水矿工名 = ${cyan}$cfxWorker${none}" echo -e "$yellow CFX抽水比例 = $cyan$cfxTaxPercent%$none" if [[ "$enableCfxSecondConfig" = "y" ]]; then echo -e "$yellow CFX第二个抽水用户名/钱包名 = $cyan$cfxSecondUser$none" echo -e "$yellow CFX第二个账户抽水比例 = $cyan$cfxSecondTaxPercent%$none" fi echo "----------------------------------------------------------------" fi if [[ "$enableHttpLog" = "y" ]]; then echo "网页监控平台配置" echo -e "$yellow 网页监控平台端口 = ${cyan}$httpLogPort${none}" echo -e "$yellow 网页监控平台密码 = $cyan$httpLogPassword$none" echo "----------------------------------------------------------------" fi if [[ "$enableGostProxy" = "y" ]]; then echo "GOST转发配置" echo -e "$yellow 启用GOST转发,实际config.json配置文件中的抽水软件端口将更换为其他随机端口,对外仍使用你配置的上述端口,GOST自动绑定对外端口和抽水的随机端口,你只需按以前的一样给用户就可以了,请牢记你的配置端口 ${none}" echo "----------------------------------------------------------------" fi echo while :; do echo -e "确认以上配置项正确吗,确认输入Y,可选输入项[${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}Y${none}]):")" confirmConfigRight [[ -z $confirmConfigRight ]] && confirmConfigRight="y" case $confirmConfigRight in Y | y) confirmConfigRight="y" break ;; N | n) confirmConfigRight="n" echo echo echo -e "$yellow 退出安装 $none" echo "----------------------------------------------------------------" echo break ;; *) error ;; esac done } gost_modify_config_port() { if [[ "$enableEthProxy" = "y" ]]; then gostEthTcpPort=$ethTcpPort ethTcpPort=$(shuf -i20001-65535 -n1) gostEthTlsPort=$ethTlsPort ethTlsPort=$(shuf -i20001-65535 -n1) else gostEthTcpPort=$ethTcpPort gostEthTlsPort=$ethTlsPort fi if [[ "$enableEtcProxy" = "y" ]]; then gostEtcTcpPort=$etcTcpPort etcTcpPort=$(shuf -i20001-65535 -n1) gostEtcTlsPort=$etcTlsPort etcTlsPort=$(shuf -i20001-65535 -n1) else gostEtcTcpPort=$etcTcpPort gostEtcTlsPort=$etcTlsPort fi if [[ "$enableBtcProxy" = "y" ]]; then gostBtcTcpPort=$btcTcpPort btcTcpPort=$(shuf -i20001-65535 -n1) gostBtcTlsPort=$btcTlsPort btcTlsPort=$(shuf -i20001-65535 -n1) else gostBtcTcpPort=$btcTcpPort gostBtcTlsPort=$btcTlsPort fi if [[ "$enableRvnProxy" = "y" ]]; then gostRvnTcpPort=$rvnTcpPort rvnTcpPort=$(shuf -i20001-65535 -n1) gostRvnTlsPort=$rvnTlsPort rvnTlsPort=$(shuf -i20001-65535 -n1) else gostRvnTcpPort=$rvnTcpPort gostRvnTlsPort=$rvnTlsPort fi if [[ "$enableErgoProxy" = "y" ]]; then gostErgoTcpPort=$ergoTcpPort ergoTcpPort=$(shuf -i20001-65535 -n1) gostErgoTlsPort=$ergoTlsPort ergoTlsPort=$(shuf -i20001-65535 -n1) else gostErgoTcpPort=$ergoTcpPort gostErgoTlsPort=$ergoTlsPort fi if [[ "$enableCfxProxy" = "y" ]]; then gostCfxTcpPort=$cfxTcpPort cfxTcpPort=$(shuf -i20001-65535 -n1) gostCfxTlsPort=$cfxTlsPort cfxTlsPort=$(shuf -i20001-65535 -n1) else gostCfxTcpPort=$cfxTcpPort gostCfxTlsPort=$cfxTlsPort fi } install_download() { $cmd update -y if [[ $cmd == "apt-get" ]]; then $cmd install -y lrzsz git zip unzip curl wget supervisor supervisorRunningCount=$(ps -ef | grep supervisor* | grep -v "grep" | wc -l) if [ $supervisorRunningCount -eq 0 ]; then service supervisor restart fi else $cmd install -y epel-release $cmd update -y $cmd install -y lrzsz git zip unzip curl wget supervisor systemctl enable supervisord supervisorRunningCount=$(ps -ef | grep supervisor* | grep -v "grep" | wc -l) if [ $supervisorRunningCount -eq 0 ]; then service supervisord restart fi fi [ -d /tmp/ccminer ] && rm -rf /tmp/ccminer [ -d /tmp/ccworker ] && rm -rf /tmp/ccworker mkdir -p /tmp/ccworker git clone https://github.com/ccminerproxy/CC-MinerProxy -b master /tmp/ccworker/gitcode --depth=1 if [[ ! -d /tmp/ccworker/gitcode ]]; then echo echo -e "$red 哎呀呀...克隆脚本仓库出错了...$none" echo echo -e " 温馨提示..... 请尝试自行安装 Git: ${green}$cmd install -y git $none 之后再安装此脚本" echo exit 1 fi cp -rf /tmp/ccworker/gitcode/linux $installPath rm -rf $installPath/install.sh if [[ ! -d $installPath ]]; then echo echo -e "$red 哎呀呀...复制文件出错了...$none" echo echo -e " 温馨提示..... 使用最新版本的Ubuntu或者CentOS再试试" echo exit 1 fi } write_json() { rm -rf $installPath/config.json jsonPath="$installPath/config.json" echo "{" >>$jsonPath if [[ "$enableLog" = "y" ]]; then echo " \"enableLog\": true," >>$jsonPath else echo " \"enableLog\": false," >>$jsonPath fi if [[ "$enableEthProxy" = "y" ]]; then echo " \"ethPoolAddress\": \"${ethPoolAddress}\"," >>$jsonPath if [[ "$ethPoolSslMode" = "y" ]]; then echo " \"ethPoolSslMode\": true," >>$jsonPath else echo " \"ethPoolSslMode\": false," >>$jsonPath fi echo " \"ethPoolPort\": ${ethPoolPort}," >>$jsonPath echo " \"ethTcpPort\": ${ethTcpPort}," >>$jsonPath echo " \"ethTlsPort\": ${ethTlsPort}," >>$jsonPath echo " \"ethUser\": \"${ethUser}\"," >>$jsonPath echo " \"ethWorker\": \"${ethWorker}\"," >>$jsonPath echo " \"ethTaxPercent\": ${ethTaxPercent}," >>$jsonPath if [[ "$enableEthSecondConfig" = "y" ]]; then echo " \"ethSecondUser\": \"${ethSecondUser}\"," >>$jsonPath echo " \"ethSecondTaxPercent\": ${ethSecondTaxPercent}," >>$jsonPath fi echo " \"enableEthProxy\": true," >>$jsonPath if [[ "$enableEthDonatePool" = "y" ]]; then echo " \"enableEthDonatePool\": true," >>$jsonPath echo " \"ethDonatePoolAddress\": \"${ethDonatePoolAddress}\"," >>$jsonPath if [[ "$ethDonatePoolSslMode" = "y" ]]; then echo " \"ethDonatePoolSslMode\": true," >>$jsonPath else echo " \"ethDonatePoolSslMode\": false," >>$jsonPath fi echo " \"ethDonatePoolPort\": ${ethDonatePoolPort}," >>$jsonPath else echo " \"enableEthDonatePool\": false," >>$jsonPath echo " \"ethDonatePoolAddress\": \"ethw.f2pool.com\"," >>$jsonPath echo " \"ethDonatePoolSslMode\": false," >>$jsonPath echo " \"ethDonatePoolPort\": ${ethPoolPort}," >>$jsonPath fi if [ "$enableGostProxy" = "y" ]; then if [[ $cmd == "apt-get" ]]; then ufw allow $gostEthTcpPort ufw allow $gostEthTlsPort else firewall-cmd --zone=public --add-port=$gostEthTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$gostEthTlsPort/tcp --permanent fi else if [[ $cmd == "apt-get" ]]; then ufw allow $ethTcpPort ufw allow $ethTlsPort else firewall-cmd --zone=public --add-port=$ethTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$ethTlsPort/tcp --permanent fi fi else echo " \"ethPoolAddress\": \"ethw.f2pool.com\"," >>$jsonPath echo " \"ethPoolSslMode\": false," >>$jsonPath echo " \"ethPoolPort\": 6688," >>$jsonPath echo " \"ethTcpPort\": 6688," >>$jsonPath echo " \"ethTlsPort\": 12345," >>$jsonPath echo " \"ethUser\": \"UserOrAddress\"," >>$jsonPath echo " \"ethWorker\": \"worker\"," >>$jsonPath echo " \"ethTaxPercent\": 6," >>$jsonPath echo " \"enableEthProxy\": false," >>$jsonPath echo " \"enableEthDonatePool\": false," >>$jsonPath echo " \"ethDonatePoolAddress\": \"ethw.f2pool.com\"," >>$jsonPath echo " \"ethDonatePoolSslMode\": false," >>$jsonPath echo " \"ethDonatePoolPort\": 6688," >>$jsonPath fi if [[ "$enableEtcProxy" = "y" ]]; then echo " \"etcPoolAddress\": \"${etcPoolAddress}\"," >>$jsonPath if [[ "$etcPoolSslMode" = "y" ]]; then echo " \"etcPoolSslMode\": true," >>$jsonPath else echo " \"etcPoolSslMode\": false," >>$jsonPath fi echo " \"etcPoolPort\": ${etcPoolPort}," >>$jsonPath echo " \"etcTcpPort\": ${etcTcpPort}," >>$jsonPath echo " \"etcTlsPort\": ${etcTlsPort}," >>$jsonPath echo " \"etcUser\": \"${etcUser}\"," >>$jsonPath echo " \"etcWorker\": \"${etcWorker}\"," >>$jsonPath echo " \"etcTaxPercent\": ${etcTaxPercent}," >>$jsonPath if [[ "$enableEtcSecondConfig" = "y" ]]; then echo " \"etcSecondUser\": \"${etcSecondUser}\"," >>$jsonPath echo " \"etcSecondTaxPercent\": ${etcSecondTaxPercent}," >>$jsonPath fi echo " \"enableEtcProxy\": true," >>$jsonPath if [[ "$enableEtcDonatePool" = "y" ]]; then echo " \"enableEtcDonatePool\": true," >>$jsonPath echo " \"etcDonatePoolAddress\": \"${etcDonatePoolAddress}\"," >>$jsonPath if [[ "$etcDonatePoolSslMode" = "y" ]]; then echo " \"etcDonatePoolSslMode\": true," >>$jsonPath else echo " \"etcDonatePoolSslMode\": false," >>$jsonPath fi echo " \"etcDonatePoolPort\": ${etcDonatePoolPort}," >>$jsonPath else echo " \"enableEtcDonatePool\": false," >>$jsonPath echo " \"etcDonatePoolAddress\": \"etc.f2pool.com\"," >>$jsonPath echo " \"etcDonatePoolSslMode\": false," >>$jsonPath echo " \"etcDonatePoolPort\": 8118," >>$jsonPath fi if [ "$enableGostProxy" = "y" ]; then if [[ $cmd == "apt-get" ]]; then ufw allow $gostEtcTcpPort ufw allow $gostEtcTlsPort else firewall-cmd --zone=public --add-port=$gostEtcTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$gostEtcTlsPort/tcp --permanent fi else if [[ $cmd == "apt-get" ]]; then ufw allow $etcTcpPort ufw allow $etcTlsPort else firewall-cmd --zone=public --add-port=$etcTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$etcTlsPort/tcp --permanent fi fi else echo " \"etcPoolAddress\": \"etc.f2pool.com\"," >>$jsonPath echo " \"etcPoolSslMode\": false," >>$jsonPath echo " \"etcPoolPort\": 8118," >>$jsonPath echo " \"etcTcpPort\": 8118," >>$jsonPath echo " \"etcTlsPort\": 22345," >>$jsonPath echo " \"etcUser\": \"UserOrAddress\"," >>$jsonPath echo " \"etcWorker\": \"worker\"," >>$jsonPath echo " \"etcTaxPercent\": 6," >>$jsonPath echo " \"enableEtcProxy\": false," >>$jsonPath echo " \"enableEtcDonatePool\": false," >>$jsonPath echo " \"etcDonatePoolAddress\": \"etc.f2pool.com\"," >>$jsonPath echo " \"etcDonatePoolSslMode\": false," >>$jsonPath echo " \"etcDonatePoolPort\": 8118," >>$jsonPath fi if [[ "$enableBtcProxy" = "y" ]]; then echo " \"btcPoolAddress\": \"${btcPoolAddress}\"," >>$jsonPath if [[ "$btcPoolSslMode" = "y" ]]; then echo " \"btcPoolSslMode\": true," >>$jsonPath else echo " \"btcPoolSslMode\": false," >>$jsonPath fi echo " \"btcPoolPort\": ${btcPoolPort}," >>$jsonPath echo " \"btcTcpPort\": ${btcTcpPort}," >>$jsonPath echo " \"btcTlsPort\": ${btcTlsPort}," >>$jsonPath echo " \"btcUser\": \"${btcUser}\"," >>$jsonPath echo " \"btcWorker\": \"${btcWorker}\"," >>$jsonPath echo " \"btcTaxPercent\": ${btcTaxPercent}," >>$jsonPath if [[ "$enableBtcSecondConfig" = "y" ]]; then echo " \"btcSecondUser\": \"${btcSecondUser}\"," >>$jsonPath echo " \"btcSecondTaxPercent\": ${btcSecondTaxPercent}," >>$jsonPath fi echo " \"enableBtcProxy\": true," >>$jsonPath if [ "$enableGostProxy" = "y" ]; then if [[ $cmd == "apt-get" ]]; then ufw allow $gostBtcTcpPort ufw allow $gostBtcTlsPort else firewall-cmd --zone=public --add-port=$gostBtcTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$gostBtcTlsPort/tcp --permanent fi else if [[ $cmd == "apt-get" ]]; then ufw allow $btcTlsPort ufw allow $btcTlsPort else firewall-cmd --zone=public --add-port=$btcTlsPort/tcp --permanent firewall-cmd --zone=public --add-port=$btcTlsPort/tcp --permanent fi fi else echo " \"btcPoolAddress\": \"btc.f2pool.com\"," >>$jsonPath echo " \"btcPoolSslMode\": false," >>$jsonPath echo " \"btcPoolPort\": 3333," >>$jsonPath echo " \"btcTcpPort\": 3333," >>$jsonPath echo " \"btcTlsPort\": 32345," >>$jsonPath echo " \"btcUser\": \"UserOrAddress\"," >>$jsonPath echo " \"btcWorker\": \"worker\"," >>$jsonPath echo " \"btcTaxPercent\": 6," >>$jsonPath echo " \"enableBtcProxy\": false," >>$jsonPath fi if [[ "$enableRvnProxy" = "y" ]]; then echo " \"rvnPoolAddress\": \"${rvnPoolAddress}\"," >>$jsonPath if [[ "$rvnPoolSslMode" = "y" ]]; then echo " \"rvnPoolSslMode\": true," >>$jsonPath else echo " \"rvnPoolSslMode\": false," >>$jsonPath fi echo " \"rvnPoolPort\": ${rvnPoolPort}," >>$jsonPath echo " \"rvnTcpPort\": ${rvnTcpPort}," >>$jsonPath echo " \"rvnTlsPort\": ${rvnTlsPort}," >>$jsonPath echo " \"rvnUser\": \"${rvnUser}\"," >>$jsonPath echo " \"rvnWorker\": \"${rvnWorker}\"," >>$jsonPath echo " \"rvnTaxPercent\": ${rvnTaxPercent}," >>$jsonPath if [[ "$enableRvnSecondConfig" = "y" ]]; then echo " \"rvnSecondUser\": \"${rvnSecondUser}\"," >>$jsonPath echo " \"rvnSecondTaxPercent\": ${rvnSecondTaxPercent}," >>$jsonPath fi echo " \"enableRvnProxy\": true," >>$jsonPath if [ "$enableGostProxy" = "y" ]; then if [[ $cmd == "apt-get" ]]; then ufw allow $gostRvnTcpPort ufw allow $gostRvnTlsPort else firewall-cmd --zone=public --add-port=$gostRvnTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$gostRvnTlsPort/tcp --permanent fi else if [[ $cmd == "apt-get" ]]; then ufw allow $rvnTlsPort ufw allow $rvnTlsPort else firewall-cmd --zone=public --add-port=$rvnTlsPort/tcp --permanent firewall-cmd --zone=public --add-port=$rvnTlsPort/tcp --permanent fi fi else echo " \"rvnPoolAddress\": \"raven.f2pool.com\"," >>$jsonPath echo " \"rvnPoolSslMode\": false," >>$jsonPath echo " \"rvnPoolPort\": 3636," >>$jsonPath echo " \"rvnTcpPort\": 3636," >>$jsonPath echo " \"rvnTlsPort\": 42345," >>$jsonPath echo " \"rvnUser\": \"UserOrAddress\"," >>$jsonPath echo " \"rvnWorker\": \"worker\"," >>$jsonPath echo " \"rvnTaxPercent\": 6," >>$jsonPath echo " \"enableRvnProxy\": false," >>$jsonPath fi if [[ "$enableErgoProxy" = "y" ]]; then echo " \"ergoPoolAddress\": \"${ergoPoolAddress}\"," >>$jsonPath if [[ "$ergoPoolSslMode" = "y" ]]; then echo " \"ergoPoolSslMode\": true," >>$jsonPath else echo " \"ergoPoolSslMode\": false," >>$jsonPath fi echo " \"ergoPoolPort\": ${ergoPoolPort}," >>$jsonPath echo " \"ergoTcpPort\": ${ergoTcpPort}," >>$jsonPath echo " \"ergoTlsPort\": ${ergoTlsPort}," >>$jsonPath echo " \"ergoUser\": \"${ergoUser}\"," >>$jsonPath echo " \"ergoWorker\": \"${ergoWorker}\"," >>$jsonPath echo " \"ergoTaxPercent\": ${ergoTaxPercent}," >>$jsonPath if [[ "$enableErgoSecondConfig" = "y" ]]; then echo " \"ergoSecondUser\": \"${ergoSecondUser}\"," >>$jsonPath echo " \"ergoSecondTaxPercent\": ${ergoSecondTaxPercent}," >>$jsonPath fi echo " \"enableErgoProxy\": true," >>$jsonPath if [ "$enableGostProxy" = "y" ]; then if [[ $cmd == "apt-get" ]]; then ufw allow $gostErgoTcpPort ufw allow $gostErgoTlsPort else firewall-cmd --zone=public --add-port=$gostErgoTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$gostErgoTlsPort/tcp --permanent fi else if [[ $cmd == "apt-get" ]]; then ufw allow $ergoTlsPort ufw allow $ergoTlsPort else firewall-cmd --zone=public --add-port=$ergoTlsPort/tcp --permanent firewall-cmd --zone=public --add-port=$ergoTlsPort/tcp --permanent fi fi else echo " \"ergoPoolAddress\": \"stratum-ergo.flypool.org\"," >>$jsonPath echo " \"ergoPoolSslMode\": false," >>$jsonPath echo " \"ergoPoolPort\": 3333," >>$jsonPath echo " \"ergoTcpPort\": 3434," >>$jsonPath echo " \"ergoTlsPort\": 52345," >>$jsonPath echo " \"ergoUser\": \"UserOrAddress\"," >>$jsonPath echo " \"ergoWorker\": \"worker\"," >>$jsonPath echo " \"ergoTaxPercent\": 6," >>$jsonPath echo " \"enableErgoProxy\": false," >>$jsonPath fi if [[ "$enableCfxProxy" = "y" ]]; then echo " \"cfxPoolAddress\": \"${cfxPoolAddress}\"," >>$jsonPath if [[ "$cfxPoolSslMode" = "y" ]]; then echo " \"cfxPoolSslMode\": true," >>$jsonPath else echo " \"cfxPoolSslMode\": false," >>$jsonPath fi echo " \"cfxPoolPort\": ${cfxPoolPort}," >>$jsonPath echo " \"cfxTcpPort\": ${cfxTcpPort}," >>$jsonPath echo " \"cfxTlsPort\": ${cfxTlsPort}," >>$jsonPath echo " \"cfxUser\": \"${cfxUser}\"," >>$jsonPath echo " \"cfxWorker\": \"${cfxWorker}\"," >>$jsonPath echo " \"cfxTaxPercent\": ${cfxTaxPercent}," >>$jsonPath if [[ "$enableCfxSecondConfig" = "y" ]]; then echo " \"cfxSecondUser\": \"${cfxSecondUser}\"," >>$jsonPath echo " \"cfxSecondTaxPercent\": ${cfxSecondTaxPercent}," >>$jsonPath fi echo " \"enableCfxProxy\": true," >>$jsonPath if [ "$enableGostProxy" = "y" ]; then if [[ $cmd == "apt-get" ]]; then ufw allow $gostCfxTcpPort ufw allow $gostCfxTlsPort else firewall-cmd --zone=public --add-port=$gostCfxTcpPort/tcp --permanent firewall-cmd --zone=public --add-port=$gostCfxTlsPort/tcp --permanent fi else if [[ $cmd == "apt-get" ]]; then ufw allow $cfxTlsPort ufw allow $cfxTlsPort else firewall-cmd --zone=public --add-port=$cfxTlsPort/tcp --permanent firewall-cmd --zone=public --add-port=$cfxTlsPort/tcp --permanent fi fi else echo " \"cfxPoolAddress\": \"cfx.f2pool.com\"," >>$jsonPath echo " \"cfxPoolSslMode\": false," >>$jsonPath echo " \"cfxPoolPort\": 6800," >>$jsonPath echo " \"cfxTcpPort\": 6800," >>$jsonPath echo " \"cfxTlsPort\": 62345," >>$jsonPath echo " \"cfxUser\": \"UserOrAddress\"," >>$jsonPath echo " \"cfxWorker\": \"worker\"," >>$jsonPath echo " \"cfxTaxPercent\": 6," >>$jsonPath echo " \"enableCfxProxy\": false," >>$jsonPath fi if [[ "$enableHttpLog" = "y" ]]; then echo " \"httpLogPort\": ${httpLogPort}," >>$jsonPath echo " \"httpLogPassword\": \"${httpLogPassword}\"," >>$jsonPath echo " \"enableHttpLog\": true," >>$jsonPath if [[ $cmd == "apt-get" ]]; then ufw allow $httpLogPort else firewall-cmd --zone=public --add-port=$httpLogPort/tcp --permanent fi else echo " \"httpLogPort\": 8080," >>$jsonPath echo " \"httpLogPassword\": \"caocaominer\"," >>$jsonPath echo " \"enableHttpLog\": false," >>$jsonPath fi if [ "$enableGostProxy" = "y" ]; then if [[ "$enableEthProxy" = "y" ]]; then echo " \"gostEthTcpPort\": ${gostEthTcpPort}," >>$jsonPath echo " \"gostEthTlsPort\": ${gostEthTlsPort}," >>$jsonPath fi if [[ "$enableEtcProxy" = "y" ]]; then echo " \"gostEtcTcpPort\": ${gostEtcTcpPort}," >>$jsonPath echo " \"gostEtcTlsPort\": ${gostEtcTlsPort}," >>$jsonPath fi if [[ "$enableBtcProxy" = "y" ]]; then echo " \"gostBtcTcpPort\": ${gostBtcTcpPort}," >>$jsonPath echo " \"gostBtcTlsPort\": ${gostBtcTlsPort}," >>$jsonPath fi if [[ "$enableRvnProxy" = "y" ]]; then echo " \"gostRvnTcpPort\": ${gostRvnTcpPort}," >>$jsonPath echo " \"gostRvnTlsPort\": ${gostRvnTlsPort}," >>$jsonPath fi fi echo " \"version\": \"9.0.4\"" >>$jsonPath echo "}" >>$jsonPath if [[ $cmd == "apt-get" ]]; then ufw reload elif [ $(systemctl is-active firewalld) = 'active' ]; then systemctl restart firewalld fi } start_write_config() { echo echo "下载完成,开始写入配置" echo chmod a+x $installPath/ccminertaxproxy chmod a+x $installPath/gost if [ -d "/etc/supervisor/conf/" ]; then rm /etc/supervisor/conf/ccworker${installNumberTag}.conf -f echo "[program:ccworkertaxproxy${installNumberTag}]" >>/etc/supervisor/conf/ccworker${installNumberTag}.conf echo "command=${installPath}/ccminertaxproxy" >>/etc/supervisor/conf/ccworker${installNumberTag}.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}.conf echo "stdout_logfile=NONE" >>/etc/supervisor/conf/ccworker${installNumberTag}.conf if [ "$enableGostProxy" = "y" ]; then if [[ "$enableEthProxy" = "y" ]]; then rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostethtcp]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostEthTcpPort}/127.0.0.1:${ethTcpPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tcp.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tcp.conf rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostethtls]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostEthTlsPort}/127.0.0.1:${ethTlsPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tls.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tls.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_eth_tls.conf fi if [[ "$enableEtcProxy" = "y" ]]; then rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostetctcp]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostEtcTcpPort}/127.0.0.1:${etcTcpPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tcp.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tcp.conf rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostetctls]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostEtcTlsPort}/127.0.0.1:${etcTlsPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tls.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tls.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_etc_tls.conf fi if [[ "$enableBtcProxy" = "y" ]]; then rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostbtctcp]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostBtcTcpPort}/127.0.0.1:${btcTcpPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tcp.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tcp.conf rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostbtctls]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostBtcTlsPort}/127.0.0.1:${btcTlsPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tls.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tls.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_btc_tls.conf fi if [[ "$enableRvnProxy" = "y" ]]; then rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostrvntcp]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostRvnTcpPort}/127.0.0.1:${rvnTcpPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tcp.conf rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostrvntls]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostRvnTlsPort}/127.0.0.1:${rvnTlsPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tls.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tls.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_rvn_tls.conf fi if [[ "$enableErgoProxy" = "y" ]]; then rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostergotcp]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostErgoTcpPort}/127.0.0.1:${ergoTcpPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tcp.conf rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostergotls]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostErgoTlsPort}/127.0.0.1:${ergoTlsPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tls.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tls.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_ergo_tls.conf fi if [[ "$enableCfxProxy" = "y" ]]; then rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostcfxtcp]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostCfxTcpPort}/127.0.0.1:${cfxTcpPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tcp.conf rm /etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostcfxtls]" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostCfxTlsPort}/127.0.0.1:${cfxTlsPort}" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tls.conf echo "autostart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tls.conf echo "autorestart=true" >>/etc/supervisor/conf/ccworker${installNumberTag}_gost_cfx_tls.conf fi fi elif [ -d "/etc/supervisor/conf.d/" ]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}.conf -f echo "[program:ccworkertaxproxy${installNumberTag}]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}.conf echo "command=${installPath}/ccminertaxproxy" >>/etc/supervisor/conf.d/ccworker${installNumberTag}.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}.conf echo "stdout_logfile=NONE" >>/etc/supervisor/conf.d/ccworker${installNumberTag}.conf if [ "$enableGostProxy" = "y" ]; then if [[ "$enableEthProxy" = "y" ]]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostethtcp]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostEthTcpPort}/127.0.0.1:${ethTcpPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tcp.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tcp.conf rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostethtls]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostEthTlsPort}/127.0.0.1:${ethTlsPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tls.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tls.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_eth_tls.conf fi if [[ "$enableEtcProxy" = "y" ]]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostetctcp]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostEtcTcpPort}/127.0.0.1:${etcTcpPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tcp.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tcp.conf rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostetctls]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostEtcTlsPort}/127.0.0.1:${etcTlsPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tls.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tls.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_etc_tls.conf fi if [[ "$enableBtcProxy" = "y" ]]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostbtctcp]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostBtcTcpPort}/127.0.0.1:${btcTcpPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tcp.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tcp.conf rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostbtctls]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostBtcTlsPort}/127.0.0.1:${btcTlsPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tls.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tls.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_btc_tls.conf fi if [[ "$enableRvnProxy" = "y" ]]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostrvntcp]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostRvnTcpPort}/127.0.0.1:${rvnTcpPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tcp.conf rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostrvntls]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostRvnTlsPort}/127.0.0.1:${rvnTlsPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tls.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tls.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_rvn_tls.conf fi if [[ "$enableErgoProxy" = "y" ]]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostergotcp]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostErgoTcpPort}/127.0.0.1:${ergoTcpPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tcp.conf rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostergotls]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostErgoTlsPort}/127.0.0.1:${ergoTlsPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tls.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tls.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_ergo_tls.conf fi if [[ "$enableCfxProxy" = "y" ]]; then rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tcp.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostcfxtcp]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "command=${installPath}/gost -L=tcp://:${gostCfxTcpPort}/127.0.0.1:${cfxTcpPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tcp.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tcp.conf rm /etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tls.conf -f echo "[program:ccworkertaxproxy${installNumberTag}gostcfxtls]" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tls.conf echo "command=${installPath}/gost -L=tcp://:${gostCfxTlsPort}/127.0.0.1:${cfxTlsPort}" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tls.conf echo "directory=${installPath}/" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tls.conf echo "autostart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tls.conf echo "autorestart=true" >>/etc/supervisor/conf.d/ccworker${installNumberTag}_gost_cfx_tls.conf fi fi elif [ -d "/etc/supervisord.d/" ]; then rm /etc/supervisord.d/ccworker${installNumberTag}.ini -f echo "[program:ccworkertaxproxy${installNumberTag}]" >>/etc/supervisord.d/ccworker${installNumberTag}.ini echo "command=${installPath}/ccminertaxproxy" >>/etc/supervisord.d/ccworker${installNumberTag}.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}.ini echo "stdout_logfile=NONE" >>/etc/supervisord.d/ccworker${installNumberTag}.ini if [ "$enableGostProxy" = "y" ]; then if [[ "$enableEthProxy" = "y" ]]; then rm /etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tcp.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostethtcp]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tcp.ini echo "command=${installPath}/gost -L=tcp://:${gostEthTcpPort}/127.0.0.1:${ethTcpPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tcp.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tcp.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tcp.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tcp.ini rm /etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tls.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostethtls]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tls.ini echo "command=${installPath}/gost -L=tcp://:${gostEthTlsPort}/127.0.0.1:${ethTlsPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tls.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tls.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tls.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_eth_tls.ini fi if [[ "$enableEtcProxy" = "y" ]]; then rm /etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tcp.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostetctcp]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tcp.ini echo "command=${installPath}/gost -L=tcp://:${gostEtcTcpPort}/127.0.0.1:${etcTcpPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tcp.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tcp.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tcp.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tcp.ini rm /etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tls.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostetctls]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tls.ini echo "command=${installPath}/gost -L=tcp://:${gostEtcTlsPort}/127.0.0.1:${etcTlsPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tls.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tls.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tls.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_etc_tls.ini fi if [[ "$enableBtcProxy" = "y" ]]; then rm /etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tcp.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostbtctcp]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tcp.ini echo "command=${installPath}/gost -L=tcp://:${gostBtcTcpPort}/127.0.0.1:${btcTcpPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tcp.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tcp.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tcp.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tcp.ini rm /etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tls.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostbtctls]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tls.ini echo "command=${installPath}/gost -L=tcp://:${gostBtcTlsPort}/127.0.0.1:${btcTlsPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tls.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tls.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tls.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_btc_tls.ini fi if [[ "$enableRvnProxy" = "y" ]]; then rm /etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tcp.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostrvntcp]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tcp.ini echo "command=${installPath}/gost -L=tcp://:${gostRvnTcpPort}/127.0.0.1:${rvnTcpPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tcp.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tcp.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tcp.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tcp.ini rm /etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tls.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostrvntls]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tls.ini echo "command=${installPath}/gost -L=tcp://:${gostRvnTlsPort}/127.0.0.1:${rvnTlsPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tls.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tls.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tls.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_rvn_tls.ini fi if [[ "$enableErgoProxy" = "y" ]]; then rm /etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tcp.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostergotcp]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tcp.ini echo "command=${installPath}/gost -L=tcp://:${gostErgoTcpPort}/127.0.0.1:${ergoTcpPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tcp.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tcp.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tcp.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tcp.ini rm /etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tls.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostergotls]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tls.ini echo "command=${installPath}/gost -L=tcp://:${gostErgoTlsPort}/127.0.0.1:${ergoTlsPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tls.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tls.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tls.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_ergo_tls.ini fi if [[ "$enableCfxProxy" = "y" ]]; then rm /etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tcp.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostcfxtcp]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tcp.ini echo "command=${installPath}/gost -L=tcp://:${gostCfxTcpPort}/127.0.0.1:${cfxTcpPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tcp.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tcp.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tcp.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tcp.ini rm /etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tls.ini -f echo "[program:ccworkertaxproxy${installNumberTag}gostcfxtls]" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tls.ini echo "command=${installPath}/gost -L=tcp://:${gostCfxTlsPort}/127.0.0.1:${cfxTlsPort}" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tls.ini echo "directory=${installPath}/" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tls.ini echo "autostart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tls.ini echo "autorestart=true" >>/etc/supervisord.d/ccworker${installNumberTag}_gost_cfx_tls.ini fi fi else echo echo "----------------------------------------------------------------" echo echo " Supervisor安装目录没了,安装失败,请查看github解决办法" echo exit 1 fi write_json echo while :; do echo -e "强烈建议开启:TCP SSL优化稳定神器、BBR加速、修改系统连接数限制吗,确认输入Y,可选输入项[${magenta}Y/N${none}] 按回车" read -p "$(echo -e "(默认: [${cyan}Y${none}]):")" needChangeLimit [[ -z $needChangeLimit ]] && needChangeLimit="y" case $needChangeLimit in Y | y) needChangeLimit="y" break ;; N | n) needChangeLimit="n" break ;; *) error ;; esac done changeLimit="n" if [[ "$needChangeLimit" = "y" ]]; then changeLimit="y" benefit_core fi clear echo echo "----------------------------------------------------------------" echo echo " 本机防火墙端口已经开放,如果还无法连接,请到云服务商控制台操作安全组,放行对应的端口。" echo " 第一次安装请输入 reboot 重启你的服务器使突破tcp连接数生效,以后不用重启服务器。" echo " 大佬...安装好了...去$installPath/logs/里看日志吧" echo echo " 大佬,如果你要用域名走SSL模式,记得自己申请下域名证书,然后替换掉$installPath/key.pem和$installPath/cer.pem哦,不然很多内核不支持自签名证书的,比如凤凰内核" echo if [[ "$changeLimit" = "y" ]]; then echo " 大佬,系统连接数限制已经改了,记得重启一次生效哦,输入reboot 即可重启您的服务器" echo fi echo "----------------------------------------------------------------" supervisorctl update } benefit_core() { tcp_tune enable_forwarding ulimit_tune } tcp_tune() { # 优化TCP窗口 sed -i '/net.ipv4.tcp_no_metrics_save/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_no_metrics_save/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_ecn/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_frto/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_mtu_probing/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_rfc1337/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_sack/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_fack/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_window_scaling/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_adv_win_scale/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_moderate_rcvbuf/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_rmem/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_wmem/d' /etc/sysctl.conf sed -i '/net.core.rmem_max/d' /etc/sysctl.conf sed -i '/net.core.wmem_max/d' /etc/sysctl.conf sed -i '/net.ipv4.udp_rmem_min/d' /etc/sysctl.conf sed -i '/net.ipv4.udp_wmem_min/d' /etc/sysctl.conf sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf cat >>/etc/sysctl.conf <>'/etc/sysctl.conf' </proc/sys/fs/file-max sed -i '/fs.file-max/d' /etc/sysctl.conf cat >>'/etc/sysctl.conf' </etc/security/limits.conf if grep -q "ulimit" /etc/profile; then : else sed -i '/ulimit -SHn/d' /etc/profile echo "ulimit -SHn 1000000" >>/etc/profile fi if grep -q "pam_limits.so" /etc/pam.d/common-session; then : else sed -i '/required pam_limits.so/d' /etc/pam.d/common-session echo "session required pam_limits.so" >>/etc/pam.d/common-session fi sed -i '/DefaultTimeoutStartSec/d' /etc/systemd/system.conf sed -i '/DefaultTimeoutStopSec/d' /etc/systemd/system.conf sed -i '/DefaultRestartSec/d' /etc/systemd/system.conf sed -i '/DefaultLimitCORE/d' /etc/systemd/system.conf sed -i '/DefaultLimitNOFILE/d' /etc/systemd/system.conf sed -i '/DefaultLimitNPROC/d' /etc/systemd/system.conf cat >>'/etc/systemd/system.conf' < 一键安装脚本 & 管理脚本 by 曹操 ......." echo echo " 1. 安装" echo echo " 2. 更新" echo echo " 3. 卸载" echo read -p "$(echo -e "请选择 [${magenta}1-3$none]:")" choose case $choose in 1) install break ;; 2) update_version break ;; 3) uninstall break ;; *) error ;; esac done ================================================ FILE: linux/key.pem ================================================ -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuLL1pK2pGhz5nOJFLMmRqhwYy1JQQpqV7RUSCv55yhAQJ+45 FxmH6D8hfZiPDjoo+3U3zsU1cYFu/KwxyVbUPJ/0LwnP1oNPjZx8B/FvDbZjZ/xS iHOF0ThTO0YeEk9+wniAzOW2T5Ao6bR6r8z98DEMI/kwn4expl1gibVB59Gxhp5U owdd++pUWwm7nv1fshxeL4mV7DGvmOOZ8jhod+2dt9kXPTcf9QetrFr12884QHnS RlBRpiro2sqTlYhHd15BiCRml3Q+qk66m18m3KeJLUhgQ7MSVyFBbL4ILZkpngE4 /lR5jqOVDIT5bWCZV0WgyDHMgTVkLCT8Z2Y1aQIDAQABAoIBAFh27w0nWJ13T1+D SRrAmRJfTsjj7ilYnYLm2rOFW5QayYI2qgWUZvIoesQLdEmeNc7rQAW7k3OASUag u1/yRMmc23pEOtZGIq5zSz0KuORafZZq1qUgn/GsBsGXPgQLK22+BgMd64qEQ/Rc S380slR/SY9ZZZ6jgcVraDfNJ3n+t7l5lLdPBEjZfwhEJti5e6PasKRBX7LNAfzp HXCF8AjWvxK+bdhPfxlcj/fGsJdQYRodvSsv1l0hCuZwwmu0VVRXomRYaaacz5mu 8oXuJ0AmtCjmQEbEycgE++5VFCNSdehmFEZVHycAjx05nq7rPO6We9YRbIoHSkrx 41j1jXkCgYEA2gSCGPAbInRDHwTW5D/SKrORGyOjqU5hilFaVZhlPJD/O7gBs1G2 pe8ElD5+VRp2mFBpyebGXGSa9T3i+By7/XaoXE+GIPCDI3/y49/y6Jy1NzOwEyZ4 zVKT2sJ3ksSebFBIyqSY/IeF8cuh5nPnvd1mde+nQJHJUsmcXAAmcesCgYEA2OB1 VpagIQrDHgfEGOsQngJsXW4Kdg0IEcGEQbYiLVTDOY1snTsBtoOC2ht8fQSawx3K puAPkIMONtnL0qGzHOXF+NO6hcts9AgRlvtbLBwL7QN52v6eoFHcImB58sn1l2ww eVc5tOAaNiKXdRi9pEgDlhHEFizAq4mc+vA4jPsCgYEArsqUf2fpaVsrATCBFSgx 2Lh0qvyM102XGC0XLq7q438gkoF5I4ps1GZoFm5wHM0FriIyXoQeHq8uKVa/pMps 0c6TNscvMzOBADIxyw6ekm4pP6O6E/BxQ7RkBCyLb2kh1pcbdRQ376a79dqb58af UnKyFfXY8wSvEye+q2gXapcCgYEAqCX/U88dAAFUHmhvBdLa42eFlTrIKZcY9otP e5M3FGZvpqOb3pvtTBDS10AQWO3FABqNEK0P5D94OdbLTNfKA1GzGKUwLKP4KYxH 9wOTQLPOG0lipQRdAHf3cT/TzQYAwBJF0w5p028dY3OWcldoUYL0JNpJadfw2g6s A3NUpRkCgYEAkLBN+pjNT3IBf2LeHSGBN9COmHLuaanL2P3F5e7oG7dsI8Fl7IXK N3fwncqcTEuQyL8EpSLPWJy0hSbM96eALYBw8d0TO1aI8hbrY8asCN9wmQMuEisH JkHElw/n2HVd8ZClnyk1w+gczrNBDwvVI7LWTgYNsVzZS23UDIMlzcY= -----END RSA PRIVATE KEY----- ================================================ FILE: windows/README.md ================================================ ## 下载 目录里的文件都要下载 ## 运行方式① 打开CaoMinerTaxProxy.exe,记得关闭杀毒软件,不然可能误报 打开后几个配置自己配置,配置完了点击启动 每次启动系统都要重新运行一次 ## 运行方式② 自行编辑config.json文件,注意//之后的都删掉,包括// ``` json { "enableLog":true, //启用日志记录 "ethPoolAddress": "ethw.f2pool.com", //ETHW/ETF矿池域名或者IP,不要写端口,端口写下面一行 "ethPoolPort": 6688, //ETHW/ETF矿池端口 "ethPoolSslMode": false, //ETHW/ETF矿池端口是否是SSL端口,true为是,false为否 "ethTcpPort": 6688, //ETHW/ETF中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "ethTlsPort": 12345, //ETHW/ETF中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "ethUser": "UserOrAddress", //你的ETHW/ETF钱包地址,或者你在矿池的用户名 "ethSecondUser": "UserOrAddress", //你的ETHW/ETF钱包地址,或者你在矿池的用户名 "ethWorker": "worker", //容易分辨的矿工名 "ethTaxPercent": 20, //ETHW/ETF抽水百分比,单位%,只能输入0-95之间的数字 "ethSecondTaxPercent": 0, //ETHW/ETF抽水百分比,单位%,只能输入0-95之间的数字 "enableEthProxy":true, //是否启用ETHW/ETF中转&抽水服务,true为启用,false为关闭 "enableEthDonatePool": false, //是否启用ETHW/ETF抽水重定向到指定矿池功能,true为启用,false为关闭 "ethDonatePoolAddress": "asia1.ethermine.org", //ETHW/ETF抽水重定向矿池地址 "ethDonatePoolSslMode": true, //ETHW/ETF抽水重定向矿池的端口是否为SSL端口,true为是,false为否 "ethDonatePoolPort": 5555, //ETHW/ETF抽水重定向矿池端口 "etcPoolAddress": "etc.f2pool.com", //ETC矿池域名或者IP,不要写端口,端口写下面一行 "etcPoolPort": 8118, //ETC矿池端口 "etcPoolSslMode": false, //ETC矿池端口是否是SSL端口,true为是,false为否 "etcTcpPort": 8118, //ETC中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "etcTlsPort": 22345, //ETC中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "etcUser": "UserOrAddress", //你的ETC钱包地址,或者你在矿池的用户名 "etcSecondUser": "UserOrAddress", //你的ETC钱包地址,或者你在矿池的用户名 "etcWorker": "worker", //容易分辨的矿工名 "etcTaxPercent": 20, //ETC抽水百分比,单位%,只能输入0-95之间的数字 "etcSecondTaxPercent": 0, //ETC抽水百分比,单位%,只能输入0-95之间的数字 "enableEtcProxy":false, //是否启用ETC中转&抽水服务,true为启用,false为关闭 "enableEtcDonatePool": false, //是否启用ETC抽水重定向到指定矿池功能,true为启用,false为关闭 "etcDonatePoolAddress": "etc.f2pool.com", //ETC抽水重定向矿池地址 "etcDonatePoolSslMode": false, //ETC抽水重定向矿池的端口是否为SSL端口,true为是,false为否 "etcDonatePoolPort": 8118, //ETC抽水重定向矿池端口 "btcPoolAddress": "btc.f2pool.com", //BTC矿池域名或者IP,不要写端口,端口写下面一行 "btcPoolPort": 3333, //BTC矿池端口 "btcPoolSslMode": false, //BTC矿池端口是否是SSL端口,true为是,false为否 "btcTcpPort": 3333, //BTC中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "btcTlsPort": 32345, //BTC中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "btcUser": "user", //你在矿池的BTC账户用户名 "btcSecondUser": "user", //你在矿池的BTC账户用户名 "btcWorker": "worker", //容易分辨的矿工名 "btcTaxPercent": 20, //BTC抽水百分比,单位%,只能输入0-95之间的数字 "btcSecondTaxPercent": 0, //BTC抽水百分比,单位%,只能输入0-95之间的数字 "enableBtcProxy":false, //是否启用BTC中转&抽水服务,true为启用,false为关闭 "rvnPoolAddress": "raven.f2pool.com", //RVN矿池域名或者IP,不要写端口,端口写下面一行 "rvnPoolPort": 3636, //RVN矿池端口 "rvnPoolSslMode": false, //RVN矿池端口是否是SSL端口,true为是,false为否 "rvnTcpPort": 3636, //RVN中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "rvnTlsPort": 42345, //RVN中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "rvnUser": "user", //你的RVN钱包地址,或者你在矿池的用户名 "rvnSecondUser": "user", //你的RVN钱包地址,或者你在矿池的用户名 "rvnWorker": "worker", //容易分辨的矿工名 "rvnTaxPercent": 20, //RVN抽水百分比,单位%,只能输入0-95之间的数字 "rvnSecondTaxPercent": 0, //RVN抽水百分比,单位%,只能输入0-95之间的数字 "enableRvnProxy":false, //是否启用RVN中转&抽水服务,true为启用,false为关闭 "ergoPoolAddress": "stratum-ergo.flypool.org", //ERGO矿池域名或者IP,不要写端口,端口写下面一行 "ergoPoolPort": 3333, //ERGO矿池端口 "ergoPoolSslMode": false, //ERGO矿池端口是否是SSL端口,true为是,false为否 "ergoTcpPort": 3336, //ERGO中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "ergoTlsPort": 52345, //ERGO中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "ergoUser": "user", //你的ERGO钱包地址,或者你在矿池的用户名 "ergoSecondUser": "user", //你的ERGO钱包地址,或者你在矿池的用户名 "ergoWorker": "worker", //容易分辨的矿工名 "ergoTaxPercent": 20, //ERGO抽水百分比,单位%,只能输入0-95之间的数字 "ergoSecondTaxPercent": 0, //ERGO抽水百分比,单位%,只能输入0-95之间的数字 "enableErgoProxy":false, //是否启用ERGO中转&抽水服务,true为启用,false为关闭 "cfxPoolAddress": "cfx.f2pool.com", //CFX矿池域名或者IP,不要写端口,端口写下面一行 "cfxPoolPort": 6800, //CFX矿池端口 "cfxPoolSslMode": false, //CFX矿池端口是否是SSL端口,true为是,false为否 "cfxTcpPort": 6800, //CFX中转的TCP模式端口,矿机填你的IP或者域名:这个端口 "cfxTlsPort": 62345, //CFX中转的SSL模式端口,矿机填你的IP或者域名:这个端口 "cfxUser": "user", //你的CFX钱包地址,或者你在矿池的用户名 "cfxSecondUser": "user", //你的CFX钱包地址,或者你在矿池的用户名 "cfxWorker": "worker", //容易分辨的矿工名 "cfxTaxPercent": 20, //CFX抽水百分比,单位%,只能输入0-95之间的数字 "cfxSecondTaxPercent": 0, //CFX抽水百分比,单位%,只能输入0-95之间的数字 "enableCfxProxy":false, //是否启用CFX中转&抽水服务,true为启用,false为关闭 "httpLogPort":8080, //网页监控平台端口 "httpLogPassword":"caocaominer", //网页监控平台密码,不能为空 "enableHttpLog":true //是否启用网页监控平台 } ``` 编辑好config.json文件,或者用CaoCaoMinerTaxProxy.exe配置好运行一次 管理员权限打开命令行cmd 切换到本目录 输入nssm install CMinerProxy 点击Path后面的省略号,选择ccminertaxproxy.exe 点击Install service 重启系统即可自动启动 ## 传参方式运行 支持传参方式运行,方式如下 ``` command ccminertaxproxy.exe --ethPoolAddress=eth.f2pool.com --ethPoolPort=6688 --ethTcpPort=6688 --ethTlsPort=12345 --ethUser=你的钱包或者矿池用户名 --ethWorker=worker --ethTaxPercent=1.0 --enableEthProxy=true ``` 以上仅为范例,参数名字和上方JSON配置文件的参数名一致,参数为false的配置默认不用配进去,看不懂这个的不要用这种方式 ## 注意 千万不要忘记修改配置文件 千万不要忘记修改配置文件 千万不要忘记修改配置文件 如修改了配置,修改后需要重新执行程序,或者去services.msc里重启CMinerProxy服务 矿机无法连接的记得开防火墙,云服务商的还有对应的安全组,配置好了矿机连不上肯定是这俩原因,如何配置安全组自己Goodle去 需要增加TCP连接数,[查看这里](https://m.kafan.cn/A/pv06e54mvd.html) ## 关于SSL 如果要用自己的域名证书,请直接替换key.pem和cer.pem文件,如果看不懂这句话就不要管,凤凰不用自己的域名证书无法使用SSL模式 ================================================ FILE: windows/cer.pem ================================================ -----BEGIN CERTIFICATE----- MIIDUTCCAjkCFGsHka/T1i3IRkpdHtwChRrJ/Bu2MA0GCSqGSIb3DQEBCwUAMGQx CzAJBgNVBAYTAlNHMRIwEAYDVQQIDAlTaW5nYXBvcmUxEjAQBgNVBAcMCVNpbmdh cG9yZTELMAkGA1UECgwCQ0MxCzAJBgNVBAsMAkNDMRMwEQYDVQQDDApjYW9jYW8u Y2FvMCAXDTIxMTIwNDE0MzY1N1oYDzIxMjExMTEwMTQzNjU3WjBkMQswCQYDVQQG EwJTRzESMBAGA1UECAwJU2luZ2Fwb3JlMRIwEAYDVQQHDAlTaW5nYXBvcmUxCzAJ BgNVBAoMAkNDMQswCQYDVQQLDAJDQzETMBEGA1UEAwwKY2FvY2FvLmNhbzCCASIw DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALiy9aStqRoc+ZziRSzJkaocGMtS UEKale0VEgr+ecoQECfuORcZh+g/IX2Yjw46KPt1N87FNXGBbvysMclW1Dyf9C8J z9aDT42cfAfxbw22Y2f8UohzhdE4UztGHhJPfsJ4gMzltk+QKOm0eq/M/fAxDCP5 MJ+HsaZdYIm1QefRsYaeVKMHXfvqVFsJu579X7IcXi+Jlewxr5jjmfI4aHftnbfZ Fz03H/UHraxa9dvPOEB50kZQUaYq6NrKk5WIR3deQYgkZpd0PqpOuptfJtyniS1I YEOzElchQWy+CC2ZKZ4BOP5UeY6jlQyE+W1gmVdFoMgxzIE1ZCwk/GdmNWkCAwEA ATANBgkqhkiG9w0BAQsFAAOCAQEAi5EA8GLpftGdhWIuSqW6tbCgfuLh16Uxc7NW hrf3aF7JDOB1e5GvtEP/wtEDw4VKUySxdmK51QNOHn4kZwNc6iMnWdjuPLhoGgFv +KLTRMiWin62JPCtAIDzh3eapfwQVWAKovskTHS4XzlrJPSqtiAfzxXVgQj67H8r l+pU1Tmr53RHa7Dsn/qgqPATePQzlaIKHCPAO76+u2+jObAPVdLXf0aIAbrT4neP Bf+LiL8OvvNEvBz7ko1g6LVZgsZbetu23RrmOcjuCsglBn8z+zOA4up2xVaV1YO7 wyAF2hSQQNSJo0+TIiX38wcBWiNf2k6ZZhs1IkPTwGxiit9Zjg== -----END CERTIFICATE----- ================================================ FILE: windows/config.json ================================================ { "enableLog":true, "ethPoolAddress": "ethw.f2pool.com", "ethPoolSslMode": false, "ethPoolPort": 6688, "ethTcpPort": 6688, "ethTlsPort": 12345, "ethUser": "UserOrAddress", "ethSecondUser": "UserOrAddress", "ethWorker": "worker", "ethTaxPercent": 20, "ethSecondTaxPercent": 0, "enableEthProxy":true, "enableEthDonatePool": false, "ethDonatePoolAddress": "asia1.ethermine.org", "ethDonatePoolSslMode": true, "ethDonatePoolPort": 5555, "etcPoolAddress": "etc.f2pool.com", "etcPoolSslMode": false, "etcPoolPort": 8118, "etcTcpPort": 8118, "etcTlsPort": 22345, "etcUser": "UserOrAddress", "etcSecondUser": "UserOrAddress", "etcWorker": "worker", "etcTaxPercent": 20, "etcSecondTaxPercent": 0, "enableEtcProxy":false, "enableEtcDonatePool": false, "etcDonatePoolAddress": "etc.f2pool.com", "etcDonatePoolSslMode": false, "etcDonatePoolPort": 8118, "btcPoolAddress": "btc.f2pool.com", "btcPoolSslMode":false, "btcPoolPort": 3333, "btcTcpPort": 3333, "btcTlsPort": 32345, "btcUser": "user", "btcSecondUser": "user", "btcWorker": "worker", "btcTaxPercent": 20, "btcSecondTaxPercent": 0, "enableBtcProxy":false, "rvnPoolAddress": "raven.f2pool.com", "rvnPoolSslMode": false, "rvnPoolPort": 3636, "rvnTcpPort": 3636, "rvnTlsPort": 42345, "rvnUser": "user", "rvnSecondUser": "user", "rvnWorker": "worker", "rvnTaxPercent": 20, "rvnSecondTaxPercent": 0, "enableRvnProxy": false, "ergoPoolAddress": "stratum-ergo.flypool.org", "ergoPoolSslMode": false, "ergoPoolPort": 3333, "ergoTcpPort": 3434, "ergoTlsPort": 52345, "ergoUser": "user", "ergoSecondUser": "user", "ergoWorker": "worker", "ergoTaxPercent": 20, "ergoSecondTaxPercent": 0, "enableErgoProxy": false, "cfxPoolAddress": "cfx.f2pool.com", "cfxPoolSslMode": false, "cfxPoolPort": 6800, "cfxTcpPort": 6800, "cfxTlsPort": 62345, "cfxUser": "user", "cfxSecondUser": "user", "cfxWorker": "worker", "cfxTaxPercent": 20, "cfxSecondTaxPercent": 0, "enableCfxProxy": false, "httpLogPort":8080, "httpLogPassword":"admin", "enableHttpLog":true } ================================================ FILE: windows/html/index-no-tax.html ================================================ 管理控制台 ================================================ FILE: windows/html/index.html ================================================ 管理控制台 ================================================ FILE: windows/html/login.html ================================================ 登录
================================================ FILE: windows/key.pem ================================================ -----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAuLL1pK2pGhz5nOJFLMmRqhwYy1JQQpqV7RUSCv55yhAQJ+45 FxmH6D8hfZiPDjoo+3U3zsU1cYFu/KwxyVbUPJ/0LwnP1oNPjZx8B/FvDbZjZ/xS iHOF0ThTO0YeEk9+wniAzOW2T5Ao6bR6r8z98DEMI/kwn4expl1gibVB59Gxhp5U owdd++pUWwm7nv1fshxeL4mV7DGvmOOZ8jhod+2dt9kXPTcf9QetrFr12884QHnS RlBRpiro2sqTlYhHd15BiCRml3Q+qk66m18m3KeJLUhgQ7MSVyFBbL4ILZkpngE4 /lR5jqOVDIT5bWCZV0WgyDHMgTVkLCT8Z2Y1aQIDAQABAoIBAFh27w0nWJ13T1+D SRrAmRJfTsjj7ilYnYLm2rOFW5QayYI2qgWUZvIoesQLdEmeNc7rQAW7k3OASUag u1/yRMmc23pEOtZGIq5zSz0KuORafZZq1qUgn/GsBsGXPgQLK22+BgMd64qEQ/Rc S380slR/SY9ZZZ6jgcVraDfNJ3n+t7l5lLdPBEjZfwhEJti5e6PasKRBX7LNAfzp HXCF8AjWvxK+bdhPfxlcj/fGsJdQYRodvSsv1l0hCuZwwmu0VVRXomRYaaacz5mu 8oXuJ0AmtCjmQEbEycgE++5VFCNSdehmFEZVHycAjx05nq7rPO6We9YRbIoHSkrx 41j1jXkCgYEA2gSCGPAbInRDHwTW5D/SKrORGyOjqU5hilFaVZhlPJD/O7gBs1G2 pe8ElD5+VRp2mFBpyebGXGSa9T3i+By7/XaoXE+GIPCDI3/y49/y6Jy1NzOwEyZ4 zVKT2sJ3ksSebFBIyqSY/IeF8cuh5nPnvd1mde+nQJHJUsmcXAAmcesCgYEA2OB1 VpagIQrDHgfEGOsQngJsXW4Kdg0IEcGEQbYiLVTDOY1snTsBtoOC2ht8fQSawx3K puAPkIMONtnL0qGzHOXF+NO6hcts9AgRlvtbLBwL7QN52v6eoFHcImB58sn1l2ww eVc5tOAaNiKXdRi9pEgDlhHEFizAq4mc+vA4jPsCgYEArsqUf2fpaVsrATCBFSgx 2Lh0qvyM102XGC0XLq7q438gkoF5I4ps1GZoFm5wHM0FriIyXoQeHq8uKVa/pMps 0c6TNscvMzOBADIxyw6ekm4pP6O6E/BxQ7RkBCyLb2kh1pcbdRQ376a79dqb58af UnKyFfXY8wSvEye+q2gXapcCgYEAqCX/U88dAAFUHmhvBdLa42eFlTrIKZcY9otP e5M3FGZvpqOb3pvtTBDS10AQWO3FABqNEK0P5D94OdbLTNfKA1GzGKUwLKP4KYxH 9wOTQLPOG0lipQRdAHf3cT/TzQYAwBJF0w5p028dY3OWcldoUYL0JNpJadfw2g6s A3NUpRkCgYEAkLBN+pjNT3IBf2LeHSGBN9COmHLuaanL2P3F5e7oG7dsI8Fl7IXK N3fwncqcTEuQyL8EpSLPWJy0hSbM96eALYBw8d0TO1aI8hbrY8asCN9wmQMuEisH JkHElw/n2HVd8ZClnyk1w+gczrNBDwvVI7LWTgYNsVzZS23UDIMlzcY= -----END RSA PRIVATE KEY-----