MCPcopy
hub / github.com/XX-net/XX-Net / __init__

Method __init__

code/default/gae_proxy/local/config.py:17–349  ·  view source on GitHub ↗
(self, fn)

Source from the content-addressed store, hash-verified

15
16class Config(ConfigBase):
17 def __init__(self, fn):
18 super(Config, self).__init__(fn)
19
20 # globa setting level
21 # passive < conservative < normal < radical < extreme
22 self.set_var("setting_level", "normal")
23
24 # proxy
25 self.set_var("listen_ip", "127.0.0.1")
26 self.set_var("listen_port", 8087)
27
28 # auto range
29 self.set_var("AUTORANGE_THREADS", 10)
30 self.set_var("AUTORANGE_MAXSIZE", 512 * 1024)
31 # if mobile:
32 # self.set_var("AUTORANGE_MAXBUFFERSIZE", 10 * 1024 * 1024 / 8)
33 # else:
34 self.set_var("AUTORANGE_MAXBUFFERSIZE", 20 * 1024 * 1024)
35 self.set_var("JS_MAXSIZE", 0)
36
37 # gae
38 self.set_var("GAE_PASSWORD", "")
39 self.set_var("GAE_VALIDATE", 1)
40
41 # host rules
42 self.set_var("hosts_direct", [
43 #b"docs.google.com",
44 #"play.google.com",
45 #b"scholar.google.com",
46 #"scholar.google.com.hk",
47 #b"appengine.google.com"
48 ])
49 self.set_var("hosts_direct_endswith", [
50 #b".gvt1.com",
51 b".appspot.com"
52 ])
53
54 self.set_var("hosts_gae", [
55 b"accounts.google.com",
56 b"mail.google.com"
57 ])
58
59 self.set_var("hosts_gae_endswith", [
60 b".googleapis.com"
61 ])
62
63 # sites using br
64 self.set_var("BR_SITES", [
65 b"webcache.googleusercontent.com",
66 b"www.google.com",
67 b"www.google.com.hk",
68 b"www.google.com.cn",
69 b"fonts.googleapis.com"
70 ])
71
72 self.set_var("BR_SITES_ENDSWITH", [
73 b".youtube.com",
74 b".facebook.com",

Callers

nothing calls this directly

Calls 2

set_varMethod · 0.95
loadMethod · 0.95

Tested by

no test coverage detected