test_pt.c 17 KB

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