This commit is contained in:
midoks
2021-01-29 15:46:36 +08:00
parent 4f1b45e76d
commit 40c25ad5a7
4 changed files with 11 additions and 12 deletions
+2 -3
View File
@@ -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">
+7 -7
View File
@@ -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':
+1
View File
@@ -35,6 +35,7 @@ Install_socket5()
Uninstall_socket5()
{
rm -rf $serverPath/socket5
rm -rf /usr/sbin/ss5
echo "Uninstall completed" > $install_tmp
}
+1 -2
View File
@@ -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);
}