Skip to content

Commit

Permalink
fix bug: config goagent
Browse files Browse the repository at this point in the history
  • Loading branch information
xxnet committed Apr 13, 2015
1 parent 60ee46c commit a379a41
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ XX-Net

下载链接:
==========
https://codeload.github.com/XX-net/XX-Net/zip/1.8.4
(新版服务端有小改进,建议重新部署服务端)
https://codeload.github.com/XX-net/XX-Net/zip/1.8.5

(1.8.3之前的用户,请重新部署服务端)

版本历史: https://github.com/XX-net/XX-Net/releases

Expand Down
8 changes: 3 additions & 5 deletions goagent/3.1.48/local/web_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,9 @@ class User_config(object):
proxy_user = ""
proxy_passwd = ""

host_appengine_mode = "gae"

ip_connect_interval = ""

def __init__(self):
self.host_appengine_mode = "gae"
self.ip_connect_interval = ""
self.load()

def load(self):
Expand Down Expand Up @@ -410,7 +408,7 @@ def req_config_handler(self):
user_config.proxy_port = self.postvars['proxy_port'][0]
user_config.proxy_user = self.postvars['proxy_user'][0]
user_config.proxy_passwd = self.postvars['proxy_passwd'][0]
user_config.host_appengine_mode = self.postvars['host_appengine'][0]
user_config.host_appengine_mode = self.postvars['host_appengine_mode'][0]
user_config.ip_connect_interval = self.postvars['ip_connect_interval'][0]
user_config.save()

Expand Down
8 changes: 4 additions & 4 deletions goagent/3.1.48/web_ui/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ <h2>配置GoAgent</h2>
$("#proxy_port").val(data.proxy_port);
$("#proxy_user").val(data.proxy_user);
$("#proxy_passwd").val(data.proxy_passwd);
if(data.host_appengine == "gae"){
if(data.host_appengine_mode == "gae"){
$("#enable_appengine_gae").prop('checked', true);
}else{
$("#enable_appengine_gae").prop('checked', false);
Expand Down Expand Up @@ -93,9 +93,9 @@ <h2>配置GoAgent</h2>
proxy_enable = 0;
}
if($("#enable_appengine_gae").prop('checked')){
host_appengine = "gae";
host_appengine_mode = "gae";
}else{
host_appengine = "fwd";
host_appengine_mode = "fwd";
}
proxy_type = $("#proxy_type").val();
proxy_host = $("#proxy_host").val();
Expand All @@ -107,7 +107,7 @@ <h2>配置GoAgent</h2>
$.post( "http://127.0.0.1:8084/config?cmd=set_config", {"appid":appid, "passwd": passwd,
"proxy_enable":proxy_enable, "proxy_type":proxy_type, "proxy_host":proxy_host, "proxy_port":proxy_port,
"proxy_user":proxy_user, "proxy_passwd":proxy_passwd,
"host_appengine": host_appengine,
"host_appengine_mode": host_appengine_mode,
"ip_connect_interval": ip_connect_interval},
function( data ) {

Expand Down

0 comments on commit a379a41

Please sign in to comment.