mirror of
https://github.com/monlor/MIXBOX-ARCHIVE.git
synced 2026-03-15 01:42:24 +00:00
moxbox init
This commit is contained in:
49
apps/pptpd/config/mixbox.conf
Normal file
49
apps/pptpd/config/mixbox.conf
Normal file
@@ -0,0 +1,49 @@
|
||||
#------------------【PPTPD】--------------------
|
||||
pptpd() {
|
||||
|
||||
eval `mbdb export pptpd`
|
||||
source /etc/mixbox/bin/base
|
||||
echo "********* $service ***********"
|
||||
echo "[${appinfo}]"
|
||||
if [ -f /tmp/pptp_connected ]; then
|
||||
echo "已连接用户信息:"
|
||||
cat /tmp/pptp_connected
|
||||
fi
|
||||
|
||||
readsh "启动${appname}服务[1/0] " "enable" "1"
|
||||
if [ "$enable" == '1' ]; then
|
||||
# Scripts Here
|
||||
read -p "更改${appname}配置?[1/0] " res
|
||||
if [ "$res" = '1' ]; then
|
||||
readsh "请输入${appname}本地IP地址" "localip" "192.168.111.1"
|
||||
readsh "请输入${appname}起始IP地址" "ip_min" "2"
|
||||
readsh "请输入${appname}结束IP地址" "ip_max" "100"
|
||||
readsh "请输入${appname}解析DNS地址" "dns1" "223.5.5.5"
|
||||
readsh "请输入${appname}解析DNS备用地址" "dns2" "223.6.6.6"
|
||||
fi
|
||||
cat /etc/ppp/chap-secrets 2> /dev/null
|
||||
read -p "管理${appname}用户?[1/0] " res
|
||||
if [ "$res" = '1' ]; then
|
||||
while true; do
|
||||
read -p "请输入${appname}用户名[回车结束]:" user
|
||||
[ -z "$user" ] && break || read -p "请输入${appname}密码:" pwd
|
||||
echo "添加用户:$user $pwd"
|
||||
${mbroot}/apps/${appname}/scripts/${appname}.sh add $user $pwd
|
||||
done
|
||||
while true; do
|
||||
read -p "请输入要删除的用户名[回车结束]:" user
|
||||
[ -z "$user" ] && break
|
||||
echo "删除用户:$user"
|
||||
${mbroot}/apps/${appname}/scripts/${appname}.sh del $user
|
||||
done
|
||||
fi
|
||||
|
||||
readsh "请输入${appname}外网访问配置[1/0]" "openport" "1"
|
||||
read -p "重启${appname}服务?[1/0] " res
|
||||
[ "$res" = '1' -o -z "$res" ] && ${mbroot}/apps/${appname}/scripts/${appname}.sh restart
|
||||
else
|
||||
${mbroot}/apps/${appname}/scripts/${appname}.sh stop
|
||||
fi
|
||||
|
||||
}
|
||||
#------------------【PPTPD】--------------------
|
||||
19
apps/pptpd/config/options.pptpd
Normal file
19
apps/pptpd/config/options.pptpd
Normal file
@@ -0,0 +1,19 @@
|
||||
name pptpd
|
||||
refuse-pap
|
||||
refuse-chap
|
||||
refuse-mschap
|
||||
require-mschap-v2
|
||||
mppe required,no40,no56,stateless
|
||||
mtu 1450
|
||||
mru 1450
|
||||
proxyarp
|
||||
lock
|
||||
nobsdcomp
|
||||
novj
|
||||
novjccomp
|
||||
nologfd
|
||||
lcp-echo-interval 2
|
||||
lcp-echo-failure 3
|
||||
ip-up-script /etc/mixbox/apps/pptpd/scripts/ip-up
|
||||
ip-down-script /etc/mixbox/apps/pptpd/scripts/ip-down
|
||||
# tools
|
||||
2
apps/pptpd/config/pptpd.conf
Normal file
2
apps/pptpd/config/pptpd.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
option /tmp/options.pptpd
|
||||
# tools
|
||||
8
apps/pptpd/config/pptpd.uci
Normal file
8
apps/pptpd/config/pptpd.uci
Normal file
@@ -0,0 +1,8 @@
|
||||
service="PPTPD"
|
||||
appname="pptpd"
|
||||
needver="0.0.1"
|
||||
backupfiles=""
|
||||
supports="linux_arm,linux_mips,linux_x86_64"
|
||||
appinfo="简单但并不安全的VPN服务器"
|
||||
newinfo=""
|
||||
version="0.0.2"
|
||||
1
apps/pptpd/config/version.txt
Normal file
1
apps/pptpd/config/version.txt
Normal file
@@ -0,0 +1 @@
|
||||
1.0.0
|
||||
Reference in New Issue
Block a user