Lines 792-797
init_options (struct options *o, const b
Link Here
|
792 |
o->max_routes = MAX_ROUTES_DEFAULT; |
792 |
o->max_routes = MAX_ROUTES_DEFAULT; |
793 |
o->resolve_retry_seconds = RESOLV_RETRY_INFINITE; |
793 |
o->resolve_retry_seconds = RESOLV_RETRY_INFINITE; |
794 |
o->proto_force = -1; |
794 |
o->proto_force = -1; |
|
|
795 |
o->ce.xormethod = 0; |
796 |
o->ce.xormask = "\0"; |
797 |
o->ce.xormasklen = 0; |
795 |
#ifdef ENABLE_OCC |
798 |
#ifdef ENABLE_OCC |
796 |
o->occ = true; |
799 |
o->occ = true; |
797 |
#endif |
800 |
#endif |
Lines 907-912
setenv_connection_entry (struct env_set
Link Here
|
907 |
setenv_int_i (es, "local_port", e->local_port, i); |
910 |
setenv_int_i (es, "local_port", e->local_port, i); |
908 |
setenv_str_i (es, "remote", e->remote, i); |
911 |
setenv_str_i (es, "remote", e->remote, i); |
909 |
setenv_int_i (es, "remote_port", e->remote_port, i); |
912 |
setenv_int_i (es, "remote_port", e->remote_port, i); |
|
|
913 |
setenv_int_i (es, "xormethod", e->xormethod, i); |
914 |
setenv_str_i (es, "xormask", e->xormask, i); |
915 |
setenv_int_i (es, "xormasklen", e->xormasklen, i); |
910 |
|
916 |
|
911 |
#ifdef ENABLE_HTTP_PROXY |
917 |
#ifdef ENABLE_HTTP_PROXY |
912 |
if (e->http_proxy_options) |
918 |
if (e->http_proxy_options) |
Lines 1366-1371
show_connection_entry (const struct conn
Link Here
|
1366 |
SHOW_INT (connect_retry_seconds); |
1372 |
SHOW_INT (connect_retry_seconds); |
1367 |
SHOW_INT (connect_timeout); |
1373 |
SHOW_INT (connect_timeout); |
1368 |
SHOW_INT (connect_retry_max); |
1374 |
SHOW_INT (connect_retry_max); |
|
|
1375 |
SHOW_INT (xormethod); |
1376 |
SHOW_STR (xormask); |
1377 |
SHOW_INT (xormasklen); |
1369 |
|
1378 |
|
1370 |
#ifdef ENABLE_HTTP_PROXY |
1379 |
#ifdef ENABLE_HTTP_PROXY |
1371 |
if (o->http_proxy_options) |
1380 |
if (o->http_proxy_options) |
Lines 5131-5136
add_option (struct options *options,
Link Here
|
5131 |
options->proto_force = proto_force; |
5140 |
options->proto_force = proto_force; |
5132 |
options->force_connection_list = true; |
5141 |
options->force_connection_list = true; |
5133 |
} |
5142 |
} |
|
|
5143 |
else if (streq (p[0], "scramble") && p[1]) |
5144 |
{ |
5145 |
VERIFY_PERMISSION (OPT_P_GENERAL|OPT_P_CONNECTION); |
5146 |
if (streq (p[1], "xormask") && p[2] && (!p[3])) |
5147 |
{ |
5148 |
options->ce.xormethod = 1; |
5149 |
options->ce.xormask = p[2]; |
5150 |
options->ce.xormasklen = strlen(options->ce.xormask); |
5151 |
} |
5152 |
else if (streq (p[1], "xorptrpos") && (!p[2])) |
5153 |
{ |
5154 |
options->ce.xormethod = 2; |
5155 |
options->ce.xormask = NULL; |
5156 |
options->ce.xormasklen = 0; |
5157 |
} |
5158 |
else if (streq (p[1], "reverse") && (!p[2])) |
5159 |
{ |
5160 |
options->ce.xormethod = 3; |
5161 |
options->ce.xormask = NULL; |
5162 |
options->ce.xormasklen = 0; |
5163 |
} |
5164 |
else if (streq (p[1], "obfuscate") && p[2] && (!p[3])) |
5165 |
{ |
5166 |
options->ce.xormethod = 4; |
5167 |
options->ce.xormask = p[2]; |
5168 |
options->ce.xormasklen = strlen(options->ce.xormask); |
5169 |
} |
5170 |
else if (!p[2]) |
5171 |
{ |
5172 |
msg (M_WARN, "WARNING: No recognized 'scramble' method specified; using 'scramble xormask \"%s\"'", p[1]); |
5173 |
options->ce.xormethod = 1; |
5174 |
options->ce.xormask = p[1]; |
5175 |
options->ce.xormasklen = strlen(options->ce.xormask); |
5176 |
} |
5177 |
else |
5178 |
{ |
5179 |
msg (msglevel, "No recognized 'scramble' method specified or extra parameters for 'scramble'"); |
5180 |
goto err; |
5181 |
} |
5182 |
} |
5134 |
#ifdef ENABLE_HTTP_PROXY |
5183 |
#ifdef ENABLE_HTTP_PROXY |
5135 |
else if (streq (p[0], "http-proxy") && p[1]) |
5184 |
else if (streq (p[0], "http-proxy") && p[1]) |
5136 |
{ |
5185 |
{ |