Beispiel #1
0
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        gws_ip_num = len(google_ip.gws_ip_list)
        res_arr = {"gws_ip_num": gws_ip_num,
                   "sys_platform":sys.platform,
                   "os_system":platform.system(),
                   "os_version":platform.version(),
                   "os_release":platform.release(),
                   "architecture":platform.architecture(),
                   "os_detail":os_detail(),
                   "language":self.get_os_language(),
                   "browser":user_agent,
                   "xxnet_version":self.xxnet_version(),
                   "python_version": config.python_version,
                   "proxy_listen":config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
                   "gae_appid":"|".join(config.GAE_APPIDS),
                   "connected_link":"%d,%d" % (len(https_manager.new_conn_pool.pool), len(https_manager.gae_conn_pool.pool)),
                   "working_appid":"|".join(appid_manager.working_appid_list),
                   "out_of_quota_appids":"|".join(appid_manager.out_of_quota_appids),
                   "not_exist_appids":"|".join(appid_manager.not_exist_appids),
                   "pac_url":config.pac_url,
                   "ip_connect_interval":config.CONFIG.getint("google_ip", "ip_connect_interval"),
                   "scan_ip_thread_num":google_ip.searching_thread_count,
                   "ip_handshake_100":google_ip.ip_handshake_th(100),
                   "block_stat":connect_control.block_stat(),
                   "use_ipv6":config.CONFIG.getint("google_ip", "use_ipv6"),
                   }
        data = json.dumps(res_arr)
        self.send_response('text/html', data)
Beispiel #2
0
    def req_status_handler(self):

        good_ip_num = ip_manager.good_ip_num
        if good_ip_num > len(ip_manager.gws_ip_list):
            good_ip_num = len(ip_manager.gws_ip_list)

        res_arr = {
                   "xxnet_version": self.xxnet_version(),
                   "python_version": platform.python_version(),
                   "openssl_version": get_openssl_version(),

                   "proxy_listen": config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
                   "pac_url": config.pac_url,
                   "use_ipv6": config.CONFIG.getint("ip_manager", "use_ipv6"),

                   "network_state": check_local_network.network_stat,
                   "ip_num": len(ip_manager.gws_ip_list),
                   "good_ip_num": good_ip_num,
                   "scan_ip_thread_num": ip_manager.scan_thread_count,
                   "ip_quality": ip_manager.ip_quality(),
                   "block_stat": connect_control.block_stat(),

                   "high_prior_connecting_num": connect_control.high_prior_connecting_num,
                   "low_prior_connecting_num": connect_control.low_prior_connecting_num,
                   "high_prior_lock": len(connect_control.high_prior_lock),
                   "low_prior_lock": len(connect_control.low_prior_lock),
                   }
        data = json.dumps(res_arr, indent=0, sort_keys=True)
        self.send_response_nc('text/html', data)
Beispiel #3
0
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        launcher_version = self.get_launcher_version()
        gws_ip_num = len(google_ip.gws_ip_list)
        res_arr = {"gws_ip_num": gws_ip_num,
                   "sys_platform":sys.platform,
                   "os_system":platform.system(),
                   "os_version":platform.version(),
                   "os_release":platform.release(),
                   "architecture":platform.architecture(),
                   "os_detail":os_detail(),
                   "language":self.get_os_language(),
                   "browser":user_agent,
                   "xxnet_version":RemoteContralServerHandler.xxnet_version(),
                   "launcher_version":launcher_version,
                   "goagent_version": config.__version__,
                   "python_version": config.python_version,
                   "proxy_listen":config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
                   "gae_appid":"|".join(config.GAE_APPIDS),
                   "connected_link":"%d,%d" % (len(connect_manager.https_manager.conn_pool.pool), len(direct_connect_manager.direct_connect_manager.new_conn_pool.pool)),
                   "working_appid":"|".join(appid_manager.working_appid_list),
                   "out_of_quota_appids":"|".join(appid_manager.out_of_quota_appids),
                   "not_exist_appids":"|".join(appid_manager.not_exist_appids),
                   "pac_url":config.pac_url,
                   "ip_connect_interval":config.CONFIG.getint("google_ip", "ip_connect_interval"),
                   "block_stat":connect_control.block_stat()
                   }
        data = json.dumps(res_arr)
        self.send_response('text/html', data)
Beispiel #4
0
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        if config.PROXY_ENABLE:
            lan_proxy = "%s://%s:%s" % (config.PROXY_TYPE, config.PROXY_HOST, config.PROXY_PORT)
        else:
            lan_proxy = "Disable"

        res_arr = {
            "sys_platform": "%s, %s" % (platform.machine(), platform.platform()),
            "os_system": platform.system(),
            "os_version": platform.version(),
            "os_release": platform.release(),
            "architecture": platform.architecture(),
            "os_detail": env_info.os_detail(),
            "language": self.get_os_language(),
            "browser": user_agent,
            "xxnet_version": self.xxnet_version(),
            "python_version": platform.python_version(),
            "openssl_version": get_openssl_version(),

            "proxy_listen": config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
            "use_ipv6": config.USE_IPV6,
            "lan_proxy": lan_proxy,

            "gae_appid": "|".join(config.GAE_APPIDS),
            "working_appid": "|".join(appid_manager.working_appid_list),
            "out_of_quota_appids": "|".join(appid_manager.out_of_quota_appids),
            "not_exist_appids": "|".join(appid_manager.not_exist_appids),

            "ipv4_state": check_local_network.IPv4.get_stat(),
            "ipv6_state": check_local_network.IPv6.get_stat(),
            #"ipv6_tunnel": ipv6_tunnel.state(),
            "ip_num": len(google_ip.gws_ip_list),
            "good_ipv4_num": google_ip.good_ipv4_num,
            "good_ipv6_num": google_ip.good_ipv6_num,
            "connected_link_new": len(https_manager.new_conn_pool.pool),
            "connected_link_used": len(https_manager.gae_conn_pool.pool),
            "worker_h1": http_dispatch.h1_num,
            "worker_h2": http_dispatch.h2_num,
            "is_idle": int(http_dispatch.is_idle()),
            "scan_ip_thread_num": google_ip.scan_thread_count,
            "ip_quality": google_ip.ip_quality(),
            "block_stat": connect_control.block_stat(),

            "high_prior_connecting_num": connect_control.high_prior_connecting_num,
            "low_prior_connecting_num": connect_control.low_prior_connecting_num,
            "high_prior_lock": len(connect_control.high_prior_lock),
            "low_prior_lock": len(connect_control.low_prior_lock),

            "fake_host": get_fake_host()
        }
        data = json.dumps(res_arr, indent=0, sort_keys=True)
        self.send_response_nc('text/html', data)
Beispiel #5
0
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        if config.PROXY_ENABLE:
            lan_proxy = "%s://%s:%s" % (config.PROXY_TYPE, config.PROXY_HOST,
                                        config.PROXY_PORT)
        else:
            lan_proxy = "Disable"

        res_arr = {
            "sys_platform":
            "%s, %s" % (platform.machine(), platform.platform()),
            "os_system": platform.system(),
            "os_version": platform.version(),
            "os_release": platform.release(),
            "architecture": platform.architecture(),
            "os_detail": env_info.os_detail(),
            "language": self.get_os_language(),
            "browser": user_agent,
            "xxnet_version": self.xxnet_version(),
            "python_version": platform.python_version(),
            "openssl_version": get_openssl_version(),
            "proxy_listen": config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
            "use_ipv6": config.USE_IPV6,
            "lan_proxy": lan_proxy,
            "gae_appid": "|".join(config.GAE_APPIDS),
            "working_appid": "|".join(appid_manager.working_appid_list),
            "out_of_quota_appids": "|".join(appid_manager.out_of_quota_appids),
            "not_exist_appids": "|".join(appid_manager.not_exist_appids),
            "ipv4_state": check_local_network.IPv4.get_stat(),
            "ipv6_state": check_local_network.IPv6.get_stat(),
            # "ipv6_tunnel": ipv6_tunnel.state(),
            "ip_num": len(google_ip.gws_ip_list),
            "good_ipv4_num": google_ip.good_ipv4_num,
            "good_ipv6_num": google_ip.good_ipv6_num,
            "connected_link_new": len(https_manager.new_conn_pool.pool),
            "connected_link_used": len(https_manager.gae_conn_pool.pool),
            "worker_h1": http_dispatch.h1_num,
            "worker_h2": http_dispatch.h2_num,
            "is_idle": int(http_dispatch.is_idle()),
            "scan_ip_thread_num": google_ip.scan_thread_count,
            "ip_quality": google_ip.ip_quality(),
            "block_stat": connect_control.block_stat(),
            "high_prior_connecting_num":
            connect_control.high_prior_connecting_num,
            "low_prior_connecting_num":
            connect_control.low_prior_connecting_num,
            "high_prior_lock": len(connect_control.high_prior_lock),
            "low_prior_lock": len(connect_control.low_prior_lock),
            "fake_host": get_fake_host()
        }
        data = json.dumps(res_arr, indent=0, sort_keys=True)
        self.send_response_nc('text/html', data)
Beispiel #6
0
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        good_ip_num = ip_manager.good_ip_num
        if good_ip_num > len(ip_manager.gws_ip_list):
            good_ip_num = len(ip_manager.gws_ip_list)

        res_arr = {
                   "sys_platform": "%s, %s" % (platform.machine(), platform.platform()),
                   "os_system": platform.system(),
                   "os_version": platform.version(),
                   "os_release": platform.release(),
                   "architecture": platform.architecture(),
                   "os_detail": env_info.os_detail(),
                   "language": self.get_os_language(),
                   "browser": user_agent,
                   "xxnet_version": self.xxnet_version(),
                   "python_version": platform.python_version(),
                   "openssl_version": get_openssl_version(),

                   "proxy_listen": config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
                   "pac_url": config.pac_url,
                   "use_ipv6": config.CONFIG.getint("ip_manager", "use_ipv6"),

                   "gae_appid": "|".join(config.GAE_APPIDS),
                   "working_appid": "|".join(appid_manager.working_appid_list),
                   "out_of_quota_appids": "|".join(appid_manager.out_of_quota_appids),
                   "not_exist_appids": "|".join(appid_manager.not_exist_appids),

                   "network_state": check_local_network.network_stat,
                   "ip_num": len(ip_manager.gws_ip_list),
                   "good_ip_num": good_ip_num,
                   "connected_link_new": len(https_manager.new_conn_pool.pool),
                   "connected_link_used": len(https_manager.gae_conn_pool.pool),
                   "worker_h1": http_dispatch.h1_num,
                   "worker_h2": http_dispatch.h2_num,
                   "is_idle": int(http_dispatch.is_idle()),
                   "scan_ip_thread_num": ip_manager.scan_thread_count,
                   "ip_quality": ip_manager.ip_quality(),
                   "block_stat": connect_control.block_stat(),

                   "high_prior_connecting_num": connect_control.high_prior_connecting_num,
                   "low_prior_connecting_num": connect_control.low_prior_connecting_num,
                   "high_prior_lock": len(connect_control.high_prior_lock),
                   "low_prior_lock": len(connect_control.low_prior_lock),
                   }
        data = json.dumps(res_arr, indent=0, sort_keys=True)
        self.send_response_nc('text/html', data)
Beispiel #7
0
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        good_ip_num = ip_manager.good_ip_num
        if good_ip_num > len(ip_manager.gws_ip_list):
            good_ip_num = len(ip_manager.gws_ip_list)

        res_arr = {
                   "sys_platform": "%s, %s" % (platform.machine(), platform.platform()),
                   "os_system": platform.system(),
                   "os_version": platform.version(),
                   "os_release": platform.release(),
                   "architecture": platform.architecture(),
                   "os_detail": env_info.os_detail(),
                   "language": self.get_os_language(),
                   "browser": user_agent,
                   "xxnet_version": self.xxnet_version(),
                   "python_version": platform.python_version(),
                   "openssl_version": get_openssl_version(),

                   "proxy_listen": config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
                   "pac_url": config.pac_url,
                   "use_ipv6": config.CONFIG.getint("ip_manager", "use_ipv6"),

                   "gae_appid": "|".join(config.GAE_APPIDS),
                   "working_appid": "|".join(appid_manager.working_appid_list),
                   "out_of_quota_appids": "|".join(appid_manager.out_of_quota_appids),
                   "not_exist_appids": "|".join(appid_manager.not_exist_appids),

                   "network_state": check_local_network.network_stat,
                   "ip_num": len(ip_manager.gws_ip_list),
                   "good_ip_num": good_ip_num,
                   "connected_link_new": len(https_manager.new_conn_pool.pool),
                   "connected_link_used": len(https_manager.gae_conn_pool.pool),
                   "worker_h1": http_dispatch.h1_num,
                   "worker_h2": http_dispatch.h2_num,
                   "is_idle": int(http_dispatch.is_idle()),
                   "scan_ip_thread_num": ip_manager.scan_thread_count,
                   "ip_quality": ip_manager.ip_quality(),
                   "block_stat": connect_control.block_stat(),

                   "high_prior_connecting_num": connect_control.high_prior_connecting_num,
                   "low_prior_connecting_num": connect_control.low_prior_connecting_num,
                   "high_prior_lock": len(connect_control.high_prior_lock),
                   "low_prior_lock": len(connect_control.low_prior_lock),
                   }
        data = json.dumps(res_arr, indent=0, sort_keys=True)
        self.send_response_nc('text/html', data)
    def req_status_handler(self):
        if "user-agent" in self.headers.dict:
            user_agent = self.headers.dict["user-agent"]
        else:
            user_agent = ""

        gws_ip_num = len(google_ip.gws_ip_list)
        res_arr = {
            "gws_ip_num":
            gws_ip_num,
            "sys_platform":
            "%s, %s" % (platform.machine(), platform.platform()),
            "os_system":
            platform.system(),
            "os_version":
            platform.version(),
            "os_release":
            platform.release(),
            "architecture":
            platform.architecture(),
            "os_detail":
            env_info.os_detail(),
            "language":
            self.get_os_language(),
            "browser":
            user_agent,
            "xxnet_version":
            self.xxnet_version(),
            "python_version":
            platform.python_version(),
            "proxy_listen":
            config.LISTEN_IP + ":" + str(config.LISTEN_PORT),
            "gae_appid":
            "|".join(config.GAE_APPIDS),
            "connected_link":
            "%d,%d" % (len(https_manager.new_conn_pool.pool),
                       len(https_manager.gae_conn_pool.pool)),
            "working_appid":
            "|".join(appid_manager.working_appid_list),
            "out_of_quota_appids":
            "|".join(appid_manager.out_of_quota_appids),
            "not_exist_appids":
            "|".join(appid_manager.not_exist_appids),
            "pac_url":
            config.pac_url,
            "ip_connect_interval":
            config.CONFIG.getint("google_ip", "ip_connect_interval"),
            "scan_ip_thread_num":
            google_ip.searching_thread_count,
            "ip_handshake_100":
            google_ip.ip_handshake_th(100),
            "block_stat":
            connect_control.block_stat(),
            "use_ipv6":
            config.CONFIG.getint("google_ip", "use_ipv6"),
            "high_prior_connecting_num":
            connect_control.high_prior_connecting_num,
            "low_prior_connecting_num":
            connect_control.low_prior_connecting_num,
            "high_prior_lock":
            len(connect_control.high_prior_lock),
            "low_prior_lock":
            len(connect_control.low_prior_lock),
        }
        data = json.dumps(res_arr, indent=0, sort_keys=True)
        self.send_response('text/html', data)