pull/109/head
midoks 4 years ago
parent 4f1b45e76d
commit 40c25ad5a7
  1. 5
      plugins/socket5/index.html
  2. 14
      plugins/socket5/index.py
  3. 1
      plugins/socket5/install.sh
  4. 3
      plugins/socket5/js/socket5.js

@ -2,9 +2,8 @@
<div class="bt-w-main"> <div class="bt-w-main">
<div class="bt-w-menu"> <div class="bt-w-menu">
<p class="bgw" onclick="pluginService('socket5');">服务</p> <p class="bgw" onclick="pluginService('socket5');">服务</p>
<p onclick="pluginConfig('socket5',null, 'conf');">用户配置</p> <p onclick="pluginConfig('socket5',null, 'conf');">配置</p>
<p onclick="pluginConfig('socket5',null, 'conf_psk');">PSK配置</p> <p onclick="pluginConfig('socket5',null, 'conf_pwd');">用户</p>
<p onclick="userList();">用户列表</p>
<p onclick="readme();">说明</p> <p onclick="readme();">说明</p>
</div> </div>
<div class="bt-w-con pd15"> <div class="bt-w-con pd15">

@ -15,7 +15,7 @@ if mw.isAppleSystem():
def getPluginName(): def getPluginName():
return 'l2tp' return 'socket5'
def getPluginDir(): def getPluginDir():
@ -111,14 +111,14 @@ def reload():
def getPathFile(): def getPathFile():
if mw.isAppleSystem(): if mw.isAppleSystem():
return getServerDir() + '/chap-secrets' return getServerDir() + '/ss5.conf'
return '/etc/ppp/chap-secrets' return '/etc/opt/ss5/ss5.conf'
def getPathFilePsk(): def getPathFilePwd():
if mw.isAppleSystem(): if mw.isAppleSystem():
return getServerDir() + '/ipsec.secrets' return getServerDir() + '/ss5.passwd'
return '/etc/ipsec.secrets' return '/etc/opt/ss5/ss5.passwd'
def getUserList(): def getUserList():
@ -220,7 +220,7 @@ if __name__ == "__main__":
elif func == 'conf': elif func == 'conf':
print getPathFile() print getPathFile()
elif func == 'conf_psk': elif func == 'conf_psk':
print getPathFilePsk() print getPathFilePwd()
elif func == 'user_list': elif func == 'user_list':
print getUserList() print getUserList()
elif func == 'add_user': elif func == 'add_user':

@ -35,6 +35,7 @@ Install_socket5()
Uninstall_socket5() Uninstall_socket5()
{ {
rm -rf $serverPath/socket5 rm -rf $serverPath/socket5
rm -rf /usr/sbin/ss5
echo "Uninstall completed" > $install_tmp echo "Uninstall completed" > $install_tmp
} }

@ -151,8 +151,7 @@ function modUser(username){
function readme(){ function readme(){
var readme = '<ul class="help-info-text c7">'; var readme = '<ul class="help-info-text c7">';
readme += '<li>PPTP需开放端口:UDP:1723</li>'; readme += '<li>默认需开放端口:UDP:1080</li>';
readme += '<li>L2TP需开放端口:UDP:500,UDP:4500,UDP:1701</li>';
readme += '</ul>'; readme += '</ul>';
$('.soft-man-con').html(readme); $('.soft-man-con').html(readme);
} }

Loading…
Cancel
Save