feat(脚本): readme修改目录说明、脚本添加端口卸载

pull/534/merge
mack-a 2021-04-15 09:34:18 +08:00
parent 275a8a0765
commit 35acb337ee
2 changed files with 59 additions and 12 deletions

View File

@ -94,11 +94,47 @@
## 脚本目录
- v2ray-core 【**/etc/v2ray-agent/v2ray、/etc/v2ray-agent/v2ray/conf**】
- Xray-core 【**/etc/v2ray-agent/xray、/etc/v2ray-agent/xray/conf**】
- Trojan 【**/etc/v2ray-agent/trojan**】
- TLS证书 【**/etc/v2ray-agent/tls**】
- Nginx配置文件 【**/etc/nginx/conf.d/alone.conf**】、Nginx伪装站点目录 【**/usr/share/nginx/html**】
### Xray-core
- 主目录
```
/etc/v2ray-agent/xray
```
- 配置文件目录
```
/etc/v2ray-agent/xray/conf
```
### v2ray-core
- 主目录
```
/etc/v2ray-agent/v2ray
```
- 配置文件目录
```
/etc/v2ray-agent/v2ray/conf
```
### Trojan
- 目录
```
/etc/v2ray-agent/trojan
```
### TLS证书
- 目录
```
/etc/v2ray-agent/tls
```
### Nginx
- Nginx配置文件
```
/etc/nginx/conf.d/alone.conf
```
- Nginx伪装站点目录
```
/usr/share/nginx/html
```
## [脚本功能详解、错误处理、常用命令](https://github.com/mack-a/v2ray-agent/blob/master/documents/how_to_use.md)

View File

@ -2276,11 +2276,16 @@ addCorePort() {
echoContent yellow "1.只允许添加443之外的一个端口"
echoContent yellow "2.不影响443端口的使用"
echoContent yellow "3.查看帐号时只会展示默认端口443的帐号"
echoContent yellow "4.再次添加时会替换之前添加的端口\n"
read -r -p "请输入端口号:" newPort
if [[ -n "${newPort}" ]]; then
cat <<EOF >${configPath}02_dokodemodoor_inbounds.json
echoContent yellow "4.再次添加时会替换之前添加的端口"
echoContent red "=============================================================="
echoContent yellow "1.添加端口"
echoContent yellow "2.卸载"
echoContent red "=============================================================="
read -r -p "请选择:" selectNewPortType
if [[ "${selectNewPortType}" == "1" ]]; then
read -r -p "请输入端口号:" newPort
if [[ -n "${newPort}" ]]; then
cat <<EOF >${configPath}02_dokodemodoor_inbounds.json
{
"inbounds": [
{
@ -2305,9 +2310,15 @@ addCorePort() {
]
}
EOF
echoContent green " ---> 添加成功"
echoContent green " ---> 添加成功"
reloadCore
fi
elif [[ "${selectNewPortType}" == "2" ]]; then
rm ${configPath}02_dokodemodoor_inbounds.json
echoContent green " ---> 卸载完成"
reloadCore
fi
}
# 卸载脚本
unInstall() {
@ -3591,7 +3602,7 @@ menu() {
cd "$HOME" || exit
echoContent red "\n=============================================================="
echoContent green "作者mack-a"
echoContent green "当前版本v2.4.13"
echoContent green "当前版本v2.4.15"
echoContent green "Githubhttps://github.com/mack-a/v2ray-agent"
echoContent green "描述:七合一共存脚本\c"
showInstallStatus