test_pt.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. /* Copyright (c) 2001-2004, Roger Dingledine.
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #include "orconfig.h"
  6. #define PT_PRIVATE
  7. #define UTIL_PRIVATE
  8. #define STATEFILE_PRIVATE
  9. #define CONTROL_PRIVATE
  10. #define SUBPROCESS_PRIVATE
  11. #define PROCESS_PRIVATE
  12. #include "core/or/or.h"
  13. #include "app/config/config.h"
  14. #include "app/config/confparse.h"
  15. #include "feature/control/control.h"
  16. #include "feature/client/transports.h"
  17. #include "core/or/circuitbuild.h"
  18. #include "app/config/statefile.h"
  19. #include "test/test.h"
  20. #include "lib/process/subprocess.h"
  21. #include "lib/encoding/confline.h"
  22. #include "lib/net/resolve.h"
  23. #include "lib/process/process.h"
  24. #include "app/config/or_state_st.h"
  25. static void
  26. reset_mp(managed_proxy_t *mp)
  27. {
  28. mp->conf_state = PT_PROTO_LAUNCHED;
  29. SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
  30. smartlist_clear(mp->transports);
  31. }
  32. static void
  33. test_pt_parsing(void *arg)
  34. {
  35. char line[200];
  36. transport_t *transport = NULL;
  37. tor_addr_t test_addr;
  38. managed_proxy_t *mp = tor_malloc_zero(sizeof(managed_proxy_t));
  39. (void)arg;
  40. mp->conf_state = PT_PROTO_INFANT;
  41. mp->transports = smartlist_new();
  42. /* incomplete cmethod */
  43. strlcpy(line,"CMETHOD trebuchet",sizeof(line));
  44. tt_int_op(parse_cmethod_line(line, mp), OP_LT, 0);
  45. reset_mp(mp);
  46. /* wrong proxy type */
  47. strlcpy(line,"CMETHOD trebuchet dog 127.0.0.1:1999",sizeof(line));
  48. tt_int_op(parse_cmethod_line(line, mp), OP_LT, 0);
  49. reset_mp(mp);
  50. /* wrong addrport */
  51. strlcpy(line,"CMETHOD trebuchet socks4 abcd",sizeof(line));
  52. tt_int_op(parse_cmethod_line(line, mp), OP_LT, 0);
  53. reset_mp(mp);
  54. /* correct line */
  55. strlcpy(line,"CMETHOD trebuchet socks5 127.0.0.1:1999",sizeof(line));
  56. tt_int_op(parse_cmethod_line(line, mp), OP_EQ, 0);
  57. tt_int_op(smartlist_len(mp->transports), OP_EQ, 1);
  58. transport = smartlist_get(mp->transports, 0);
  59. /* test registered address of transport */
  60. tor_addr_parse(&test_addr, "127.0.0.1");
  61. tt_assert(tor_addr_eq(&test_addr, &transport->addr));
  62. /* test registered port of transport */
  63. tt_uint_op(transport->port, OP_EQ, 1999);
  64. /* test registered SOCKS version of transport */
  65. tt_int_op(transport->socks_version, OP_EQ, PROXY_SOCKS5);
  66. /* test registered name of transport */
  67. tt_str_op(transport->name,OP_EQ, "trebuchet");
  68. reset_mp(mp);
  69. /* incomplete smethod */
  70. strlcpy(line,"SMETHOD trebuchet",sizeof(line));
  71. tt_int_op(parse_smethod_line(line, mp), OP_LT, 0);
  72. reset_mp(mp);
  73. /* wrong addr type */
  74. strlcpy(line,"SMETHOD trebuchet abcd",sizeof(line));
  75. tt_int_op(parse_smethod_line(line, mp), OP_LT, 0);
  76. reset_mp(mp);
  77. /* cowwect */
  78. strlcpy(line,"SMETHOD trebuchy 127.0.0.2:2999",sizeof(line));
  79. tt_int_op(parse_smethod_line(line, mp), OP_EQ, 0);
  80. tt_int_op(smartlist_len(mp->transports), OP_EQ, 1);
  81. transport = smartlist_get(mp->transports, 0);
  82. /* test registered address of transport */
  83. tor_addr_parse(&test_addr, "127.0.0.2");
  84. tt_assert(tor_addr_eq(&test_addr, &transport->addr));
  85. /* test registered port of transport */
  86. tt_uint_op(transport->port, OP_EQ, 2999);
  87. /* test registered name of transport */
  88. tt_str_op(transport->name,OP_EQ, "trebuchy");
  89. reset_mp(mp);
  90. /* Include some arguments. Good ones. */
  91. strlcpy(line,"SMETHOD trebuchet 127.0.0.1:9999 "
  92. "ARGS:counterweight=3,sling=snappy",
  93. sizeof(line));
  94. tt_int_op(parse_smethod_line(line, mp), OP_EQ, 0);
  95. tt_int_op(1, OP_EQ, smartlist_len(mp->transports));
  96. {
  97. const transport_t *transport_ = smartlist_get(mp->transports, 0);
  98. tt_assert(transport_);
  99. tt_str_op(transport_->name, OP_EQ, "trebuchet");
  100. tt_int_op(transport_->port, OP_EQ, 9999);
  101. tt_str_op(fmt_addr(&transport_->addr), OP_EQ, "127.0.0.1");
  102. tt_str_op(transport_->extra_info_args, OP_EQ,
  103. "counterweight=3,sling=snappy");
  104. }
  105. reset_mp(mp);
  106. /* unsupported version */
  107. strlcpy(line,"VERSION 666",sizeof(line));
  108. tt_int_op(parse_version(line, mp), OP_LT, 0);
  109. /* incomplete VERSION */
  110. strlcpy(line,"VERSION ",sizeof(line));
  111. tt_int_op(parse_version(line, mp), OP_LT, 0);
  112. /* correct VERSION */
  113. strlcpy(line,"VERSION 1",sizeof(line));
  114. tt_int_op(parse_version(line, mp), OP_EQ, 0);
  115. done:
  116. reset_mp(mp);
  117. smartlist_free(mp->transports);
  118. tor_free(mp);
  119. }
  120. static void
  121. test_pt_get_transport_options(void *arg)
  122. {
  123. char **execve_args;
  124. smartlist_t *transport_list = smartlist_new();
  125. managed_proxy_t *mp;
  126. or_options_t *options = get_options_mutable();
  127. char *opt_str = NULL;
  128. config_line_t *cl = NULL;
  129. (void)arg;
  130. process_init();
  131. execve_args = tor_malloc(sizeof(char*)*2);
  132. execve_args[0] = tor_strdup("cheeseshop");
  133. execve_args[1] = NULL;
  134. mp = managed_proxy_create(transport_list, execve_args, 1);
  135. tt_ptr_op(mp, OP_NE, NULL);
  136. opt_str = get_transport_options_for_server_proxy(mp);
  137. tt_ptr_op(opt_str, OP_EQ, NULL);
  138. smartlist_add_strdup(mp->transports_to_launch, "gruyere");
  139. smartlist_add_strdup(mp->transports_to_launch, "roquefort");
  140. smartlist_add_strdup(mp->transports_to_launch, "stnectaire");
  141. tt_assert(options);
  142. cl = tor_malloc_zero(sizeof(config_line_t));
  143. cl->value = tor_strdup("gruyere melty=10 hardness=se;ven");
  144. options->ServerTransportOptions = cl;
  145. cl = tor_malloc_zero(sizeof(config_line_t));
  146. cl->value = tor_strdup("stnectaire melty=4 hardness=three");
  147. cl->next = options->ServerTransportOptions;
  148. options->ServerTransportOptions = cl;
  149. cl = tor_malloc_zero(sizeof(config_line_t));
  150. cl->value = tor_strdup("pepperjack melty=12 hardness=five");
  151. cl->next = options->ServerTransportOptions;
  152. options->ServerTransportOptions = cl;
  153. opt_str = get_transport_options_for_server_proxy(mp);
  154. tt_str_op(opt_str, OP_EQ,
  155. "gruyere:melty=10;gruyere:hardness=se\\;ven;"
  156. "stnectaire:melty=4;stnectaire:hardness=three");
  157. done:
  158. tor_free(opt_str);
  159. config_free_lines(cl);
  160. managed_proxy_destroy(mp, 0);
  161. smartlist_free(transport_list);
  162. process_free_all();
  163. }
  164. static void
  165. test_pt_protocol(void *arg)
  166. {
  167. char line[200];
  168. managed_proxy_t *mp = tor_malloc_zero(sizeof(managed_proxy_t));
  169. (void)arg;
  170. mp->conf_state = PT_PROTO_LAUNCHED;
  171. mp->transports = smartlist_new();
  172. mp->argv = tor_calloc(2, sizeof(char *));
  173. mp->argv[0] = tor_strdup("<testcase>");
  174. /* various wrong protocol runs: */
  175. strlcpy(line,"VERSION 1",sizeof(line));
  176. handle_proxy_line(line, mp);
  177. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  178. strlcpy(line,"VERSION 1",sizeof(line));
  179. handle_proxy_line(line, mp);
  180. tt_assert(mp->conf_state == PT_PROTO_BROKEN);
  181. reset_mp(mp);
  182. strlcpy(line,"CMETHOD trebuchet socks5 127.0.0.1:1999",sizeof(line));
  183. handle_proxy_line(line, mp);
  184. tt_assert(mp->conf_state == PT_PROTO_BROKEN);
  185. reset_mp(mp);
  186. /* correct protocol run: */
  187. strlcpy(line,"VERSION 1",sizeof(line));
  188. handle_proxy_line(line, mp);
  189. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  190. strlcpy(line,"CMETHOD trebuchet socks5 127.0.0.1:1999",sizeof(line));
  191. handle_proxy_line(line, mp);
  192. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  193. strlcpy(line,"CMETHODS DONE",sizeof(line));
  194. handle_proxy_line(line, mp);
  195. tt_assert(mp->conf_state == PT_PROTO_CONFIGURED);
  196. done:
  197. reset_mp(mp);
  198. smartlist_free(mp->transports);
  199. tor_free(mp->argv[0]);
  200. tor_free(mp->argv);
  201. tor_free(mp);
  202. }
  203. static void
  204. test_pt_get_extrainfo_string(void *arg)
  205. {
  206. managed_proxy_t *mp1 = NULL, *mp2 = NULL;
  207. char **argv1, **argv2;
  208. smartlist_t *t1 = smartlist_new(), *t2 = smartlist_new();
  209. int r;
  210. char *s = NULL;
  211. (void) arg;
  212. process_init();
  213. argv1 = tor_malloc_zero(sizeof(char*)*3);
  214. argv1[0] = tor_strdup("ewige");
  215. argv1[1] = tor_strdup("Blumenkraft");
  216. argv1[2] = NULL;
  217. argv2 = tor_malloc_zero(sizeof(char*)*4);
  218. argv2[0] = tor_strdup("und");
  219. argv2[1] = tor_strdup("ewige");
  220. argv2[2] = tor_strdup("Schlangenkraft");
  221. argv2[3] = NULL;
  222. mp1 = managed_proxy_create(t1, argv1, 1);
  223. mp2 = managed_proxy_create(t2, argv2, 1);
  224. r = parse_smethod_line("SMETHOD hagbard 127.0.0.1:5555", mp1);
  225. tt_int_op(r, OP_EQ, 0);
  226. r = parse_smethod_line("SMETHOD celine 127.0.0.1:1723 ARGS:card=no-enemy",
  227. mp2);
  228. tt_int_op(r, OP_EQ, 0);
  229. /* Force these proxies to look "completed" or they won't generate output. */
  230. mp1->conf_state = mp2->conf_state = PT_PROTO_COMPLETED;
  231. s = pt_get_extra_info_descriptor_string();
  232. tt_assert(s);
  233. tt_str_op(s, OP_EQ,
  234. "transport hagbard 127.0.0.1:5555\n"
  235. "transport celine 127.0.0.1:1723 card=no-enemy\n");
  236. done:
  237. /* XXXX clean up better */
  238. smartlist_free(t1);
  239. smartlist_free(t2);
  240. tor_free(s);
  241. process_free_all();
  242. }
  243. static int
  244. process_read_stdout_replacement(process_t *process, buf_t *buffer)
  245. {
  246. (void)process;
  247. static int times_called = 0;
  248. /* Generate some dummy CMETHOD lines the first 5 times. The 6th
  249. time, send 'CMETHODS DONE' to finish configuring the proxy. */
  250. if (times_called++ != 5) {
  251. buf_add_printf(buffer, "SMETHOD mock%d 127.0.0.1:555%d\n",
  252. times_called, times_called);
  253. } else {
  254. buf_add_string(buffer, "SMETHODS DONE\n");
  255. }
  256. return (int)buf_datalen(buffer);
  257. }
  258. static or_state_t *dummy_state = NULL;
  259. static or_state_t *
  260. get_or_state_replacement(void)
  261. {
  262. return dummy_state;
  263. }
  264. static int controlevent_n = 0;
  265. static uint16_t controlevent_event = 0;
  266. static smartlist_t *controlevent_msgs = NULL;
  267. static void
  268. queue_control_event_string_replacement(uint16_t event, char *msg)
  269. {
  270. ++controlevent_n;
  271. controlevent_event = event;
  272. if (!controlevent_msgs)
  273. controlevent_msgs = smartlist_new();
  274. smartlist_add(controlevent_msgs, msg);
  275. }
  276. /* Test the configure_proxy() function. */
  277. static void
  278. test_pt_configure_proxy(void *arg)
  279. {
  280. int i, retval;
  281. managed_proxy_t *mp = NULL;
  282. (void) arg;
  283. process_init();
  284. dummy_state = tor_malloc_zero(sizeof(or_state_t));
  285. MOCK(process_read_stdout, process_read_stdout_replacement);
  286. MOCK(get_or_state,
  287. get_or_state_replacement);
  288. MOCK(queue_control_event_string,
  289. queue_control_event_string_replacement);
  290. control_testing_set_global_event_mask(EVENT_TRANSPORT_LAUNCHED);
  291. mp = tor_malloc_zero(sizeof(managed_proxy_t));
  292. mp->conf_state = PT_PROTO_ACCEPTING_METHODS;
  293. mp->transports = smartlist_new();
  294. mp->transports_to_launch = smartlist_new();
  295. mp->argv = tor_malloc_zero(sizeof(char*)*2);
  296. mp->argv[0] = tor_strdup("<testcase>");
  297. mp->is_server = 1;
  298. /* Configure the process. */
  299. mp->process = process_new("");
  300. process_set_stdout_read_callback(mp->process, managed_proxy_stdout_callback);
  301. process_set_data(mp->process, mp);
  302. /* Test the return value of configure_proxy() by calling it some
  303. times while it is uninitialized and then finally finalizing its
  304. configuration. */
  305. for (i = 0 ; i < 5 ; i++) {
  306. /* force a read from our mocked stdout reader. */
  307. process_notify_event_stdout(mp->process);
  308. /* try to configure our proxy. */
  309. retval = configure_proxy(mp);
  310. /* retval should be zero because proxy hasn't finished configuring yet */
  311. tt_int_op(retval, OP_EQ, 0);
  312. /* check the number of registered transports */
  313. tt_int_op(smartlist_len(mp->transports), OP_EQ, i+1);
  314. /* check that the mp is still waiting for transports */
  315. tt_assert(mp->conf_state == PT_PROTO_ACCEPTING_METHODS);
  316. }
  317. /* Get the SMETHOD DONE written to the process. */
  318. process_notify_event_stdout(mp->process);
  319. /* this last configure_proxy() should finalize the proxy configuration. */
  320. retval = configure_proxy(mp);
  321. /* retval should be 1 since the proxy finished configuring */
  322. tt_int_op(retval, OP_EQ, 1);
  323. /* check the mp state */
  324. tt_assert(mp->conf_state == PT_PROTO_COMPLETED);
  325. tt_int_op(controlevent_n, OP_EQ, 5);
  326. tt_int_op(controlevent_event, OP_EQ, EVENT_TRANSPORT_LAUNCHED);
  327. tt_int_op(smartlist_len(controlevent_msgs), OP_EQ, 5);
  328. smartlist_sort_strings(controlevent_msgs);
  329. tt_str_op(smartlist_get(controlevent_msgs, 0), OP_EQ,
  330. "650 TRANSPORT_LAUNCHED server mock1 127.0.0.1 5551\r\n");
  331. tt_str_op(smartlist_get(controlevent_msgs, 1), OP_EQ,
  332. "650 TRANSPORT_LAUNCHED server mock2 127.0.0.1 5552\r\n");
  333. tt_str_op(smartlist_get(controlevent_msgs, 2), OP_EQ,
  334. "650 TRANSPORT_LAUNCHED server mock3 127.0.0.1 5553\r\n");
  335. tt_str_op(smartlist_get(controlevent_msgs, 3), OP_EQ,
  336. "650 TRANSPORT_LAUNCHED server mock4 127.0.0.1 5554\r\n");
  337. tt_str_op(smartlist_get(controlevent_msgs, 4), OP_EQ,
  338. "650 TRANSPORT_LAUNCHED server mock5 127.0.0.1 5555\r\n");
  339. { /* check that the transport info were saved properly in the tor state */
  340. config_line_t *transport_in_state = NULL;
  341. smartlist_t *transport_info_sl = smartlist_new();
  342. char *name_of_transport = NULL;
  343. char *bindaddr = NULL;
  344. /* Get the bindaddr for "mock1" and check it against the bindaddr
  345. that the mocked tor_get_lines_from_handle() generated. */
  346. transport_in_state = get_transport_in_state_by_name("mock1");
  347. tt_assert(transport_in_state);
  348. smartlist_split_string(transport_info_sl, transport_in_state->value,
  349. NULL, 0, 0);
  350. name_of_transport = smartlist_get(transport_info_sl, 0);
  351. bindaddr = smartlist_get(transport_info_sl, 1);
  352. tt_str_op(name_of_transport, OP_EQ, "mock1");
  353. tt_str_op(bindaddr, OP_EQ, "127.0.0.1:5551");
  354. SMARTLIST_FOREACH(transport_info_sl, char *, cp, tor_free(cp));
  355. smartlist_free(transport_info_sl);
  356. }
  357. done:
  358. or_state_free(dummy_state);
  359. UNMOCK(process_read_stdout);
  360. UNMOCK(get_or_state);
  361. UNMOCK(queue_control_event_string);
  362. if (controlevent_msgs) {
  363. SMARTLIST_FOREACH(controlevent_msgs, char *, cp, tor_free(cp));
  364. smartlist_free(controlevent_msgs);
  365. controlevent_msgs = NULL;
  366. }
  367. if (mp->transports) {
  368. SMARTLIST_FOREACH(mp->transports, transport_t *, t, transport_free(t));
  369. smartlist_free(mp->transports);
  370. }
  371. smartlist_free(mp->transports_to_launch);
  372. process_free(mp->process);
  373. tor_free(mp->argv[0]);
  374. tor_free(mp->argv);
  375. tor_free(mp);
  376. process_free_all();
  377. }
  378. /* Test the get_pt_proxy_uri() function. */
  379. static void
  380. test_get_pt_proxy_uri(void *arg)
  381. {
  382. or_options_t *options = get_options_mutable();
  383. char *uri = NULL;
  384. int ret;
  385. (void) arg;
  386. /* Test with no proxy. */
  387. uri = get_pt_proxy_uri();
  388. tt_ptr_op(uri, OP_EQ, NULL);
  389. /* Test with a SOCKS4 proxy. */
  390. options->Socks4Proxy = tor_strdup("192.0.2.1:1080");
  391. ret = tor_addr_port_lookup(options->Socks4Proxy,
  392. &options->Socks4ProxyAddr,
  393. &options->Socks4ProxyPort);
  394. tt_int_op(ret, OP_EQ, 0);
  395. uri = get_pt_proxy_uri();
  396. tt_str_op(uri, OP_EQ, "socks4a://192.0.2.1:1080");
  397. tor_free(uri);
  398. tor_free(options->Socks4Proxy);
  399. /* Test with a SOCKS5 proxy, no username/password. */
  400. options->Socks5Proxy = tor_strdup("192.0.2.1:1080");
  401. ret = tor_addr_port_lookup(options->Socks5Proxy,
  402. &options->Socks5ProxyAddr,
  403. &options->Socks5ProxyPort);
  404. tt_int_op(ret, OP_EQ, 0);
  405. uri = get_pt_proxy_uri();
  406. tt_str_op(uri, OP_EQ, "socks5://192.0.2.1:1080");
  407. tor_free(uri);
  408. /* Test with a SOCKS5 proxy, with username/password. */
  409. options->Socks5ProxyUsername = tor_strdup("hwest");
  410. options->Socks5ProxyPassword = tor_strdup("r34n1m470r");
  411. uri = get_pt_proxy_uri();
  412. tt_str_op(uri, OP_EQ, "socks5://hwest:r34n1m470r@192.0.2.1:1080");
  413. tor_free(uri);
  414. tor_free(options->Socks5Proxy);
  415. tor_free(options->Socks5ProxyUsername);
  416. tor_free(options->Socks5ProxyPassword);
  417. /* Test with a HTTPS proxy, no authenticator. */
  418. options->HTTPSProxy = tor_strdup("192.0.2.1:80");
  419. ret = tor_addr_port_lookup(options->HTTPSProxy,
  420. &options->HTTPSProxyAddr,
  421. &options->HTTPSProxyPort);
  422. tt_int_op(ret, OP_EQ, 0);
  423. uri = get_pt_proxy_uri();
  424. tt_str_op(uri, OP_EQ, "http://192.0.2.1:80");
  425. tor_free(uri);
  426. /* Test with a HTTPS proxy, with authenticator. */
  427. options->HTTPSProxyAuthenticator = tor_strdup("hwest:r34n1m470r");
  428. uri = get_pt_proxy_uri();
  429. tt_str_op(uri, OP_EQ, "http://hwest:r34n1m470r@192.0.2.1:80");
  430. tor_free(uri);
  431. tor_free(options->HTTPSProxy);
  432. tor_free(options->HTTPSProxyAuthenticator);
  433. /* Token nod to the fact that IPv6 exists. */
  434. options->Socks4Proxy = tor_strdup("[2001:db8::1]:1080");
  435. ret = tor_addr_port_lookup(options->Socks4Proxy,
  436. &options->Socks4ProxyAddr,
  437. &options->Socks4ProxyPort);
  438. tt_int_op(ret, OP_EQ, 0);
  439. uri = get_pt_proxy_uri();
  440. tt_str_op(uri, OP_EQ, "socks4a://[2001:db8::1]:1080");
  441. tor_free(uri);
  442. tor_free(options->Socks4Proxy);
  443. done:
  444. if (uri)
  445. tor_free(uri);
  446. }
  447. #define PT_LEGACY(name) \
  448. { #name, test_pt_ ## name , 0, NULL, NULL }
  449. struct testcase_t pt_tests[] = {
  450. PT_LEGACY(parsing),
  451. PT_LEGACY(protocol),
  452. { "get_transport_options", test_pt_get_transport_options, TT_FORK,
  453. NULL, NULL },
  454. { "get_extrainfo_string", test_pt_get_extrainfo_string, TT_FORK,
  455. NULL, NULL },
  456. { "configure_proxy",test_pt_configure_proxy, TT_FORK,
  457. NULL, NULL },
  458. { "get_pt_proxy_uri", test_get_pt_proxy_uri, TT_FORK,
  459. NULL, NULL },
  460. END_OF_TESTCASES
  461. };