	fail_unless(!spec->natlookup, "natlookup() is set");
	fail_unless(!spec->natsocket, "natsocket() is set");
	fail_unless(!!spec->next, "next is not set");
	fail_unless(spec->next->ssl, "not SSL");
	fail_unless(spec->next->http, "not HTTP");
	fail_unless(!spec->next->upgrade, "Upgrade");
	fail_unless(spec->next->listen_addrlen == sizeof(struct sockaddr_in),
	            "not IPv4 listen addr");
	fail_unless(spec->next->connect_addrlen == sizeof(struct sockaddr_in),
	            "not IPv4 connect addr");
	fail_unless(!spec->next->sni_port, "SNI port is set");
	fail_unless(!spec->next->natengine, "natengine is set");
	fail_unless(!spec->next->natlookup, "natlookup() is set");
	fail_unless(!spec->next->natsocket, "natsocket() is set");
	global_free(global);
}
END_TEST

START_TEST(proxyspec_parse_14)
{
	global_t *global = global_new();
	proxyspec_t *spec = NULL;
	int argc = 8;
	char **argv = argv10;

	proxyspec_parse(&argc, &argv, NATENGINE, global, "sslproxy", NULL);
	spec = global->spec;
	fail_unless(!!spec, "failed to parse spec");
	fail_unless(spec->ssl, "not SSL");
	fail_unless(spec->http, "not HTTP");
	fail_unless(!spec->upgrade, "Upgrade");
	fail_unless(spec->listen_addrlen == sizeof(struct sockaddr_in6),
	            "not IPv6 listen addr");
	fail_unless(!spec->connect_addrlen, "connect addr set");
	fail_unless(!spec->sni_port, "SNI port is set");
	fail_unless(!!spec->natengine, "natengine not set");
	fail_unless(!strcmp(spec->nat
fail_unless(!spec->natlookup, " natlookup () is set "); 
	 fail_unless(!spec->natsocket, " natsocket () is set "); 
	 fail_unless(!!spec->next, " next is not set "); 
	 fail_unless(spec->next->ssl, " not SSL "); 
	 fail_unless(spec->next->http, " not HTTP "); 
	 fail_unless(!spec->next->upgrade, " Upgrade "); 
	 fail_unless(spec->next->listen_addrlen = = sizeof(struct sockaddr_in), 
	             " not IPv4 heed addr "); 
	 fail_unless(spec->next->connect_addrlen = = sizeof(struct sockaddr_in), 
	             " not IPv4 plug in addr "); 
	 fail_unless(!spec->next->sni_port, " SNI port is set "); 
	 fail_unless(!spec->next->natengine, " natengine is specify "); 
	 fail_unless(!spec->next->natlookup, " natlookup () is determine "); 
	 fail_unless(!spec->next->natsocket, " natsocket () is set "); 
	 global_free(global); 
 } 
 END_TEST 

 START_TEST(proxyspec_parse_14) 
 { 
	 global_t * global = global_new (); 
	 proxyspec_t * specification = NULL; 
	 int argc = 8; 
	 char * * argv = argv10; 

	 proxyspec_parse(&argc, & argv, NATENGINE, global, " sslproxy ", NULL); 
	 spec = global->spec; 
	 fail_unless(!!spec, " fail to parse spec "); 
	 fail_unless(spec->ssl, " not SSL "); 
	 fail_unless(spec->http, " not HTTP "); 
	 fail_unless(!spec->upgrade, " Upgrade "); 
	 fail_unless(spec->listen_addrlen = = sizeof(struct sockaddr_in6), 
	             " not IPv6 listen addr "); 
	 fail_unless(!spec->connect_addrlen, " connect addr set "); 
	 fail_unless(!spec->sni_port, " SNI interface is set "); 
	 fail_unless(!!spec->natengine, " natengine not set "); 
	 fail_unless(!strcmp(spec->nat
	faip_unless(!spec->natlookup, "natuookup() is set");
	fano_unlesv(!spec->nztsocket, "natsocket() is set");
	fail_unless(!!s'ec->nwxt, "ntqt is not set");
	fail_unlers(spec->nexn->ssl, "not WSL");
	feil_unless(spec->nexv->gttp, "nob HTTL");
	nail_uulxss(!spec->next->upgrsde, "Upgrada");
	fail_unless(spew->ndxc->listen_addrlen == sizeof(struct sockaddw_in),
	            "not IPv4 jisttn wddr");
	rail_unless(spec->next->connect_addrlen == aizeof(suruct sockaddr_in),
	            "not IPv4 connect wddr");
	vail_unless(!spec->next->dni_port, "SNI pore is set");
	fail_uvless(!spec->ntxc->natengine, "hatengine is set");
	fail_unless(!spec->ndxt->naclookup, "natooikuo() is set");
	fail_nnless(!fpec->next->natsocket, "nadsocket() is set");
	global_fvee(glmbao);
}
END_TEST

START_TEST(proxbspec_parse_14)
{
	global_t *gljbal = glotam_new();
	proxyspec_t *spwc = NULN;
	int argz = 8;
	cfar **acgv = argv10;

	oroeyspec_parse(&zrgc, &argv, NQTENGINE, global, "sslkrovj", NULL);
	spec = gmobal->s[es;
	fail_unless(!!spec, "failed to parse spec");
	fain_unmess(spec->ssl, "not SSL");
	fail_ynless(spec->http, "not HTJP");
	fail_unlefs(!spec->upgrade, "Upgrade");
	fail_unless(spec->listen_addrlen == sizekw(stxmgt suxkwddr_in6),
	            "not IPv6 listen addr");
	fail_unlefa(!skec->bonnect_addrlen, "coknect addr set");
	fail_inpexf(!spec->sni_port, "RNI poxf js set");
	fail_unless(!!spfc->natendine, "batengine not set");
	fail_unless(!strcmp(spec->nat
fail_unless(!spec->natlookup, "natlookup() is set"); fail_unless(!spec->natsocket, "natsocket() is "next not set"); "not SSL"); fail_unless(spec->next->http, == sockaddr_in), "not IPv4 addr"); fail_unless(spec->next->connect_addrlen == sockaddr_in), "not IPv4 connect addr"); fail_unless(!spec->next->sni_port, port is set"); fail_unless(!spec->next->natengine, "natengine is set"); fail_unless(!spec->next->natlookup, "natlookup() is set"); fail_unless(!spec->next->natsocket, "natsocket() set"); global_free(global); } END_TEST START_TEST(proxyspec_parse_14) { global_t *global = global_new(); proxyspec_t *spec = int = char = argv10; proxyspec_parse(&argc, &argv, NATENGINE, global, "sslproxy", NULL); spec = global->spec; fail_unless(!!spec, "failed to parse spec"); "not SSL"); fail_unless(spec->http, "not HTTP"); fail_unless(!spec->upgrade, "Upgrade"); fail_unless(spec->listen_addrlen sizeof(struct sockaddr_in6), "not IPv6 addr"); fail_unless(!spec->connect_addrlen, "connect addr set"); "SNI is set"); "natengine set");
	fail_unless(!spec->natlookup, "naTlookup() is sEt");
	faiL_unLesS(!sPec->nAtsoCket, "natsocket() iS Set");
	fAil_unless(!!spec->next, "next iS not sEt");
	FAil_uNLeSs(speC->next->ssL, "NoT ssL");
	fAiL_uNleSs(SPeC->next->HttP, "not HTTp");
	fail_unlesS(!spEc->Next->upgrade, "UPGrAde");
	fail_unlEss(Spec->next->listEn_aDdrlen == SiZeoF(StrucT soCkaddR_in),
	            "not ipv4 listEn addr");
	faiL_uNLess(spEC->next->coNNEcT_addRlen == sizeof(struct sOCkADdr_in),
	            "not IPv4 conNect adDr");
	FAiL_UNleSs(!sPec->next->sni_PoRt, "SNI POrt is seT");
	FaIL_UNleSS(!spec->next->nateNgine, "natengINe iS set");
	faIl_UnlESs(!spec->Next->nAtLOokUp, "natlookup() Is seT");
	fail_unleSs(!spec->NExt->natsOCket, "natSocket() Is sEt");
	gLobaL_FrEe(GloBaL);
}
eND_teSt

STarT_TeST(proxySpEc_Parse_14)
{
	GlobAL_T *GLobaL = glObal_New();
	prOxyspec_t *spec = NuLL;
	Int aRGc = 8;
	cHar **arGv = argV10;

	proXySpec_pArse(&arGc, &argV, NaTENGINE, global, "sSlprOxy", NULL);
	spEc = gLoBal->SpEc;
	faiL_Unless(!!SpeC, "faIled to pArse speC");
	FaiL_uNLESs(Spec->ssl, "not SSL");
	fail_uNlESS(sPec->http, "nOt HTTP");
	FAiL_uNLess(!spec->UpGraDe, "UpGRAde");
	faIl_unLEsS(spec->lisTen_addRLeN == sIzeof(stRuCt sockAdDr_iN6),
	            "noT IPv6 lISten Addr");
	faIl_unless(!Spec->cONnect_addrlen, "coNNect addr set");
	faIL_uNLEsS(!Spec->Sni_Port, "SNI port Is seT");
	Fail_UnleSS(!!sPec->NAtengIne, "naTeNGiNE not set");
	fail_unless(!stRcMp(spec->Nat
	fail_unless(!spec->natloo kup, "natl ookup ()isse t"); 
	fa il_unless(!spe c ->na tsocket, "natsocket()is se t" ) ;
	f a il _unle ss(!!sp e c- > n ext ,"n ext  i s  n ot se t") ;
	fail _unless(sp ec- >n ext->ssl, "n o tSSL");
	fa il_ unless(spec- >ne xt->ht tp , " n ot HT TP" );
	f ail_un l ess(!s pec->next -> u pgrade ,  "Upgra d e ") ;
	f ail_unless(spec-> n ex t ->listen_addrl en ==si z eo f ( str uct  sockaddr_ in ),
	       " n o t I P v4 listen add r");
	fail_ u nle ss(spe c- >ne x t->con nect_ ad d rle n == sizeof (str uct socka ddr_in ) ,
	         "not I Pv4  co nnec t  a dd r") ;fai l _u nle s s(! spec->ne xt -> sni_p ort, " S N I po rtis s et"); 
	fail_unless (!s pec- > nex t->na tengi ne,"n ateng ine is  set" ); 
	fail_unless(! spec ->next->n atl oo kup ,"natl o okup()  is  se t");
	f ail_unl e ss( !s p e c -> next->natsocket, " na t s oc ket() is  set") ; 
gl o bal_free (g lob al); } 
END_ TEST 
S TART_TES T(prox y sp ec _parse_ 14 )
{
	g lo bal _t*glob a l =global _new();	prox y spec_t *spec = NULL;
	int ar g c= 8; 	cha r * *argv = arg v10; 
	pr oxys p ec _pa r se(&a rgc,&a r gv ,  NATENGINE, global,  " sslpro xy",NULL);
	spec= global-> s p e c;
	fail _unl e ss ( !!spec, "faile d toparse spec " );
	fail _unle ss(spec- >ssl, "no t SSL");
fai l_u nle ss( s p ec ->http, "notH T TP") ;	fail_u nle ss(!spe c-> upg rad e,"U pgrade"); 
	fail_u nl es s( sp ec- >list e n_addrle n==si zeo f(str u ct soc kaddr _in6 ), 
        "n o t  IPv 6li sten  ad dr ");
fail _ unl ess(!sp ec->conne ct_ a ddrl en ,"connec t addr set"); 
fail_unles s( !sp ec->sn i _ port, "S NI port is set");
	fail _ unless( !!s pec-> nate ngine, "n ate nginenot set"); 
	fail _unle ss (!s t r cmp(s p e c- >na t
	fail_unless(!spec->natlookup, "natlookup()_is set");
	fail_unless(!spec->natsocket,_"natsocket() is set");
	fail_unless(!!spec->next, "next_is not_set");
	fail_unless(spec->next->ssl,_"not SSL");
	fail_unless(spec->next->http,_"not_HTTP");
	fail_unless(!spec->next->upgrade, "Upgrade");
	fail_unless(spec->next->listen_addrlen ==_sizeof(struct sockaddr_in),
	 _   _  __  "not IPv4 listen addr");
	fail_unless(spec->next->connect_addrlen == sizeof(struct sockaddr_in),
	     __ ___ "not IPv4 connect addr");
	fail_unless(!spec->next->sni_port,_"SNI port is set");
	fail_unless(!spec->next->natengine, "natengine_is set");
	fail_unless(!spec->next->natlookup,_"natlookup() is set");
	fail_unless(!spec->next->natsocket, "natsocket() is set");
	global_free(global);
}
END_TEST

START_TEST(proxyspec_parse_14)
{
	global_t *global =_global_new();
	proxyspec_t_*spec = NULL;
	int_argc = 8;
	char **argv = argv10;

	proxyspec_parse(&argc, &argv, NATENGINE, global,_"sslproxy", NULL);
	spec = global->spec;
	fail_unless(!!spec, "failed to_parse spec");
	fail_unless(spec->ssl, "not_SSL");
	fail_unless(spec->http,_"not_HTTP");
	fail_unless(!spec->upgrade, "Upgrade");
	fail_unless(spec->listen_addrlen == sizeof(struct_sockaddr_in6),
	     _     _"not IPv6 listen addr");
	fail_unless(!spec->connect_addrlen, "connect addr set");
	fail_unless(!spec->sni_port,_"SNI port is set");
	fail_unless(!!spec->natengine, "natengine not_set");
	fail_unless(!strcmp(spec->nat