mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-18 23:45:52 +08:00
up
This commit is contained in:
@@ -2,9 +2,8 @@
|
||||
<div class="bt-w-main">
|
||||
<div class="bt-w-menu">
|
||||
<p class="bgw" onclick="pluginService('socket5');">服务</p>
|
||||
<p onclick="pluginConfig('socket5',null, 'conf');">用户配置</p>
|
||||
<p onclick="pluginConfig('socket5',null, 'conf_psk');">PSK配置</p>
|
||||
<p onclick="userList();">用户列表</p>
|
||||
<p onclick="pluginConfig('socket5',null, 'conf');">配置</p>
|
||||
<p onclick="pluginConfig('socket5',null, 'conf_pwd');">用户</p>
|
||||
<p onclick="readme();">说明</p>
|
||||
</div>
|
||||
<div class="bt-w-con pd15">
|
||||
|
||||
@@ -15,7 +15,7 @@ if mw.isAppleSystem():
|
||||
|
||||
|
||||
def getPluginName():
|
||||
return 'l2tp'
|
||||
return 'socket5'
|
||||
|
||||
|
||||
def getPluginDir():
|
||||
@@ -111,14 +111,14 @@ def reload():
|
||||
|
||||
def getPathFile():
|
||||
if mw.isAppleSystem():
|
||||
return getServerDir() + '/chap-secrets'
|
||||
return '/etc/ppp/chap-secrets'
|
||||
return getServerDir() + '/ss5.conf'
|
||||
return '/etc/opt/ss5/ss5.conf'
|
||||
|
||||
|
||||
def getPathFilePsk():
|
||||
def getPathFilePwd():
|
||||
if mw.isAppleSystem():
|
||||
return getServerDir() + '/ipsec.secrets'
|
||||
return '/etc/ipsec.secrets'
|
||||
return getServerDir() + '/ss5.passwd'
|
||||
return '/etc/opt/ss5/ss5.passwd'
|
||||
|
||||
|
||||
def getUserList():
|
||||
@@ -220,7 +220,7 @@ if __name__ == "__main__":
|
||||
elif func == 'conf':
|
||||
print getPathFile()
|
||||
elif func == 'conf_psk':
|
||||
print getPathFilePsk()
|
||||
print getPathFilePwd()
|
||||
elif func == 'user_list':
|
||||
print getUserList()
|
||||
elif func == 'add_user':
|
||||
|
||||
@@ -35,6 +35,7 @@ Install_socket5()
|
||||
Uninstall_socket5()
|
||||
{
|
||||
rm -rf $serverPath/socket5
|
||||
rm -rf /usr/sbin/ss5
|
||||
echo "Uninstall completed" > $install_tmp
|
||||
}
|
||||
|
||||
|
||||
@@ -151,8 +151,7 @@ function modUser(username){
|
||||
|
||||
function readme(){
|
||||
var readme = '<ul class="help-info-text c7">';
|
||||
readme += '<li>PPTP需开放端口:UDP:1723</li>';
|
||||
readme += '<li>L2TP需开放端口:UDP:500,UDP:4500,UDP:1701</li>';
|
||||
readme += '<li>默认需开放端口:UDP:1080</li>';
|
||||
readme += '</ul>';
|
||||
$('.soft-man-con').html(readme);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user