This commit is contained in:
Mr Chen
2019-03-01 17:46:53 +08:00
parent 522f9f22e4
commit e176ac2e8d
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -3,6 +3,7 @@
<div class="bt-w-menu">
<p class="bgw" onclick="pluginService('l2tp');">服务</p>
<p onclick="pluginConfig('l2tp',null, 'conf');">用户配置</p>
<p onclick="pluginConfig('l2tp',null, 'conf_psk');">PSK配置</p>
<p onclick="userList();">用户列表</p>
</div>
<div class="bt-w-con pd15">
+8
View File
@@ -92,6 +92,12 @@ def getPathFile():
return '/etc/ppp/chap-secrets'
def getPathFilePsk():
if public.isAppleSystem():
return getServerDir() + '/ipsec.secrets'
return '/etc/ipsec.secrets'
def getUserList():
import re
path = getPathFile()
@@ -183,6 +189,8 @@ if __name__ == "__main__":
print reload()
elif func == 'conf':
print getPathFile()
elif func == 'conf_psk':
print getPathFilePsk()
elif func == 'user_list':
print getUserList()
elif func == 'add_user':
+1
View File
@@ -0,0 +1 @@
%any %any : PSK "midoks"