Skip to content

Commit

Permalink
Merge pull request XX-net#3821 from Cat7373/master
Browse files Browse the repository at this point in the history
Remove PHP_Proxy
  • Loading branch information
yeahwu authored Jul 8, 2016
2 parents f474c6d + 41a5344 commit 6df2189
Show file tree
Hide file tree
Showing 31 changed files with 4 additions and 5,869 deletions.
7 changes: 2 additions & 5 deletions code/default/launcher/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ def recheck_module_path():

xxnet_port = get(["modules", "gae_proxy", "LISTEN_PORT"], 8087)

modules = ["gae_proxy", "launcher", "php_proxy", "x_tunnel"]
modules = ["gae_proxy", "launcher", "x_tunnel"]
for module in modules:
if module not in ["launcher", "php_proxy"]:
if module not in ["launcher"]:
if not os.path.isdir(os.path.join(root_path, module)):
del config[module]
continue
Expand All @@ -86,9 +86,6 @@ def recheck_module_path():
#if get(["modules", "gae_proxy", "control_port"], 0) == 0:
# set(["modules", "gae_proxy", "control_port"], 8084)

if get(["modules", "php_proxy", "control_port"], 0) == 0:
set(["modules", "php_proxy", "control_port"], 8083)

return need_save_config


Expand Down
8 changes: 0 additions & 8 deletions code/default/launcher/lang/de_DE/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ msgstr ""
msgid "Enable GAE proxy"
msgstr ""

#: web_ui/config.html:98
msgid "Enable PHP proxy"
msgstr ""

#: web_ui/config.html:109
msgid "System configuration options"
msgstr ""
Expand All @@ -152,10 +148,6 @@ msgstr ""
msgid "Configuring the service[%s]. This page will refresh within %s seconds."
msgstr ""

#: web_ui/config.html:294
msgid "PHP proxy"
msgstr ""

#: web_ui/config.html:436
msgid "Updating in progress ..."
msgstr ""
Expand Down
3 changes: 0 additions & 3 deletions code/default/launcher/lang/en_US/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ msgstr ""
msgid "GAE Proxy"
msgstr ""

msgid "PHP proxy"
msgstr ""

msgid "Updating in progress ..."
msgstr ""

Expand Down
12 changes: 0 additions & 12 deletions code/default/launcher/lang/es_VE/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ msgstr ""
msgid "Enable GAE proxy"
msgstr ""

#: web_ui/config.html:98
msgid "Enable PHP proxy"
msgstr ""

#: web_ui/config.html:109
msgid "System configuration options"
msgstr ""
Expand All @@ -152,14 +148,6 @@ msgstr ""
msgid "Configuring the service[%s]. This page will refresh within %s seconds."
msgstr ""

#: web_ui/config.html:294
msgid "PHP proxy"
msgstr ""

#: web_ui/config.html:436
msgid "Updating in progress ..."
msgstr ""

#: web_ui/config.html:496
msgid "Updating ..."
msgstr ""
Expand Down
3 changes: 0 additions & 3 deletions code/default/launcher/lang/fa_IR/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ msgstr "پیکربندی سرویس [٪ s] را. این صفحه را در عر
msgid "GAE Proxy"
msgstr "GAE پروکسی"

msgid "PHP proxy"
msgstr "PHP پروکسی"

msgid "Updating in progress ..."
msgstr "به روز رسانی در حال انجام ..."

Expand Down
8 changes: 0 additions & 8 deletions code/default/launcher/lang/ja_JP/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ msgstr ""
msgid "Enable GAE proxy"
msgstr ""

#: web_ui/config.html:98
msgid "Enable PHP proxy"
msgstr ""

#: web_ui/config.html:109
msgid "System configuration options"
msgstr ""
Expand All @@ -152,10 +148,6 @@ msgstr ""
msgid "Configuring the service[%s]. This page will refresh within %s seconds."
msgstr ""

#: web_ui/config.html:294
msgid "PHP proxy"
msgstr ""

#: web_ui/config.html:436
msgid "Updating in progress ..."
msgstr ""
Expand Down
3 changes: 0 additions & 3 deletions code/default/launcher/lang/zh_CN/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,6 @@ msgstr "正在配置服务[%s], 页面将在%s秒内刷新。"
msgid "GAE Proxy"
msgstr "GAE代理"

msgid "PHP proxy"
msgstr "PHP代理"

msgid "Updating in progress ..."
msgstr "更新进行中..."

Expand Down
17 changes: 1 addition & 16 deletions code/default/launcher/web_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,16 +231,14 @@ def req_config_handler(self):
check_update = "stable"

data = '{ "check_update": "%s", "language": "%s", "popup_webui": %d, "allow_remote_connect": %d, \
"show_systray": %d, "auto_start": %d, "show_detail": %d, "php_enable": %d, "gae_proxy_enable": %d, \
"x_tunnel_enable": %d}' %\
"show_systray": %d, "auto_start": %d, "show_detail": %d, "gae_proxy_enable": %d, "x_tunnel_enable": %d}' %\
(check_update
, config.get(["language"], i18n_translator.lang)
, config.get(["modules", "launcher", "popup_webui"], 1)
, config.get(["modules", "launcher", "allow_remote_connect"], 0)
, config.get(["modules", "launcher", "show_systray"], 1)
, config.get(["modules", "launcher", "auto_start"], 0)
, config.get(["modules", "gae_proxy", "show_detail"], 0)
, config.get(["modules", "php_proxy", "auto_start"], 0)
, config.get(["modules", "gae_proxy", "auto_start"], 0)
, config.get(["modules", "x_tunnel", "auto_start"], 0)
)
Expand Down Expand Up @@ -343,19 +341,6 @@ def req_config_handler(self):
module_init.stop("gae_proxy")
self.load_module_menus()
data = '{"res":"success"}'
elif 'php_enable' in reqs :
php_enable = int(reqs['php_enable'][0])
if php_enable != 0 and php_enable != 1:
data = '{"res":"fail, php_enable:%s"}' % php_enable
else:
config.set(["modules", "php_proxy", "auto_start"], php_enable)
config.save()
if php_enable:
module_init.start("php_proxy")
else:
module_init.stop("php_proxy")
self.load_module_menus()
data = '{"res":"success"}'
elif 'x_tunnel_enable' in reqs :
x_tunnel_enable = int(reqs['x_tunnel_enable'][0])
if x_tunnel_enable != 0 and x_tunnel_enable != 1:
Expand Down
23 changes: 1 addition & 22 deletions code/default/launcher/web_ui/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,6 @@
<input id="gae_proxy-enable" type="checkbox" data-toggle="switch" />
</div> <!-- .span8 -->
</div> <!-- .row-fluid -->
<div class="row-fluid" >
<div class="span4">{{ _( "Enable" ) }} PHP proxy</div> <!-- .span4 -->
<div class="span8">
<input id="php-enable" type="checkbox" data-toggle="switch" />
</div> <!-- .span8 -->
</div> <!-- .row-fluid -->
<div class="row-fluid" >
<div class="span4">{{ _( "Enable" ) }} X_tunnel</div> <!-- .span4 -->
<div class="span8">
Expand Down Expand Up @@ -178,12 +172,6 @@

$( "#gae_proxy-enable").prop('checked', true);
}
if ( result['php_enable'] != 0 ) {
$( "#php-enable").parent().removeClass('switch-off');
$( "#php-enable").parent().addClass('switch-on');

$( "#php-enable").prop('checked', true);
}
if ( result['x_tunnel_enable'] != 0 ) {
$( "#x-tunnel-enable").parent().removeClass('switch-off');
$( "#x-tunnel-enable").parent().addClass('switch-on');
Expand Down Expand Up @@ -274,13 +262,6 @@
setConfig(key, value);
});

$('#php-enable').change(function() {
var isChecked = $(this).is(':checked'),
key = 'php_enable',
value = isChecked ? 1 : 0;

setConfig(key, value);
});
$('#x-tunnel-enable').change(function() {
var isChecked = $(this).is(':checked'),
key = 'x_tunnel_enable',
Expand All @@ -303,7 +284,7 @@
dataType: 'JSON',
success: function(result) {
if ( result['res'] == 'success' ) {
if ( key == 'gae_proxy_enable' || key == 'php_enable' || key == 'x_tunnel_enable') {
if ( key == 'gae_proxy_enable' || key == 'x_tunnel_enable') {
restartingService(key);
} else {
tip('{{ _( "Settings saved successfully." ) }}', 'success');
Expand Down Expand Up @@ -332,8 +313,6 @@

if ( serviceNameSlug == 'gae_proxy_enable' ) {
serviceName = '{{ _( "GAE Proxy" ) }}';
} else if ( serviceNameSlug == 'php_enable' ) {
serviceName = '{{ _( "PHP proxy" ) }}';
} else if ( serviceNameSlug == 'x_tunnel_enable' ) {
serviceName = '{{ _( "X_tunnel proxy" ) }}';
} else {
Expand Down
8 changes: 0 additions & 8 deletions code/default/php_proxy/babel.config

This file was deleted.

68 changes: 0 additions & 68 deletions code/default/php_proxy/lang/zh_CN/LC_MESSAGES/messages.po

This file was deleted.

1 change: 0 additions & 1 deletion code/default/php_proxy/local/__init__.py

This file was deleted.

59 changes: 0 additions & 59 deletions code/default/php_proxy/local/cacert.pem

This file was deleted.

Loading

0 comments on commit 6df2189

Please sign in to comment.