└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Ocibot 2 | 基于NET6 oci-dotnet-sdk 多甲骨文IP切换tgbot 3 | 4 | ## 更新 5 | 6 | 1.添加webapi 支持第三方调用更换API 7 | 8 | ## 首先创建Bot配置文件夹 9 | ``` 10 | mkdir -p /root/ocibotConfig/BotConfig 11 | ``` 12 | 13 | ## 然后进BotConfig文件夹创建Bot.json 文件 14 | ``` 15 | { 16 | //你的TGID 17 | "BotAdminID": "", 18 | //socks or http 代理类型 值只有socks 或者http 不用代理可以不填 19 | "ProxyType": "", 20 | //代理地址 如果是Http类型需要添加http://ip 21 | //socks 只需要填写IP 22 | "ProxyHost": "", 23 | //代理端口 24 | "ProxyProt": "", 25 | //代理帐号 没有可不填 26 | "ProxyUser": "", 27 | //代理密码 28 | "ProxyPwd": "", 29 | //TOGBOT token 30 | "BotToken": "" 31 | } 32 | 33 | ``` 34 | 35 | 36 | ## 首先创建oci配置文件夹 用于存放甲骨文API配置以及秘钥 37 | ``` 38 | mkdir -p /root/ocibotConfig/OracleConfig 39 | ``` 40 | ##OracleConfig 文件说明 41 | 42 | ###一个甲骨文帐号一个配置和秘钥存放在OracleConfig中 文件名称要以 `_config`结尾 如首尔_config 43 | ``` 44 | [DEFAULT] 45 | user=xxx 46 | fingerprint=xxxxx 47 | tenancy=xxxxx 48 | region=xxxx 49 | key_file=./OracleConfig/秘钥文件.pem 50 | 51 | ``` 52 | ###注意配置文件中的key_file=./OracleConfig/ 是不变的 只用修改秘钥名称 53 | 54 | ###bot启动是会读取以 `_config`结尾的的文件判断有多少个甲骨文帐号 55 | 56 | 57 | ## 配置完成后我们返回ocibotConfig 文件夹 拉取镜像启动bot即可 58 | ``` 59 | cd /root/ocibotConfig 60 | ``` 61 | ###arm需要将latest 更换为arm 即可 62 | ``` 63 | sudo docker run --name ocibot -p 6060:6060 -d -v "$(pwd)"/BotConfig:/app/BotConfig \ 64 | -v "$(pwd)"/OracleConfig:/app/OracleConfig \ 65 | -it --privileged=true nolanhzy/ocibot:latest 66 | ``` 67 | 68 | 69 | 70 | --------------------------------------------------------------------------------