123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146 |
- "use strict";
- // Test sample code for SoftEther VPN Server JSON-RPC Stub
- // Runs on both web browsers and Node.js
- //
- // sample.ts
- // Automatically generated at 2019-05-29 18:21:39 by vpnserver-jsonrpc-codegen
- //
- // This sample code shows how to call all available RPC functions.
- // You can copy and paste test code to write your own web browser TypeScript / JavaScript codes.
- //
- // Licensed under the Apache License 2.0
- // Copyright (c) 2014-2019 SoftEther VPN Project
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var __generator = (this && this.__generator) || function (thisArg, body) {
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
- function verb(n) { return function (v) { return step([n, v]); }; }
- function step(op) {
- if (f) throw new TypeError("Generator is already executing.");
- while (_) try {
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
- if (y = 0, t) op = [op[0] & 2, t.value];
- switch (op[0]) {
- case 0: case 1: t = op; break;
- case 4: _.label++; return { value: op[1], done: false };
- case 5: _.label++; y = op[1]; op = [0]; continue;
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
- default:
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
- if (t[2]) _.ops.pop();
- _.trys.pop(); continue;
- }
- op = body.call(thisArg, _);
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
- }
- };
- var __importStar = (this && this.__importStar) || function (mod) {
- if (mod && mod.__esModule) return mod;
- var result = {};
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
- result["default"] = mod;
- return result;
- };
- exports.__esModule = true;
- // On the web browser uncomment below imports as necessary to support old browsers.
- // import "core-js/es6/promise";
- // import "core-js/es6/string";
- // import "whatwg-fetch";
- // Import the vpnrpc.ts RPC stub.
- var VPN = __importStar(require("./vpnrpc"));
- // Output JSON-RPC request / reply strings to the debug console.
- VPN.VpnServerRpc.SetDebugMode(true);
- var api;
- // Creating the VpnServerRpc class instance here.
- if (VPN.VpnServerRpc.IsNodeJS() === false) // // Determine if this JavaScript environment is on the Node.js or not
- {
- // On the web browser. We do not need to specify any hostname, port or credential as the web browser already knows it.
- api = new VPN.VpnServerRpc();
- }
- else {
- // On the Node.js. We need to specify the target VPN Server's hostname, port and credential.
- api = new VPN.VpnServerRpc("127.0.0.1", 443, "", "PASSWORD_HERE", false);
- }
- // A variable for test
- var hub_name = "test";
- // Call the Test_All() function to test almost all VPN APIs.
- Test_All();
- /** Tests all VPN APIs */
- function Test_All() {
- return __awaiter(this, void 0, void 0, function () {
- var new_listener_port, farm_members, _i, _a, farm_member, enum_connection, _b, _c, connecton, hub_log_settings, enum_ca, _d, _e, ca, enum_link, _f, _g, link, enum_session, _h, _j, session, enum_mac, _k, _l, mac, enum_ip, _m, _o, ip, enum_crl, _p, _q, crl, got_crl, _r, _s, crl, enum_log_file, _t, _u, log, enum_etherip_id, _v, _w, etherip_id;
- return __generator(this, function (_x) {
- switch (_x.label) {
- case 0:
- hub_name = "TEST";
- return [4 /*yield*/, Test_Test()];
- case 1:
- _x.sent();
- return [4 /*yield*/, Test_GetServerInfo()];
- case 2:
- _x.sent();
- return [4 /*yield*/, Test_GetServerStatus()];
- case 3:
- _x.sent();
- return [4 /*yield*/, Test_CreateListener()];
- case 4:
- new_listener_port = _x.sent();
- return [4 /*yield*/, Test_EnableListener(new_listener_port, false)];
- case 5:
- _x.sent();
- return [4 /*yield*/, Test_EnumListener()];
- case 6:
- _x.sent();
- return [4 /*yield*/, Test_EnableListener(new_listener_port, true)];
- case 7:
- _x.sent();
- return [4 /*yield*/, Test_EnumListener()];
- case 8:
- _x.sent();
- return [4 /*yield*/, Test_DeleteListener(new_listener_port)];
- case 9:
- _x.sent();
- return [4 /*yield*/, Test_SetServerPassword()];
- case 10:
- _x.sent();
- return [4 /*yield*/, Test_GetFarmSetting()];
- case 11:
- _x.sent();
- if (!false) return [3 /*break*/, 19];
- return [4 /*yield*/, Test_SetFarmSetting()];
- case 12:
- _x.sent();
- return [4 /*yield*/, Test_EnumFarmMember()];
- case 13:
- farm_members = _x.sent();
- _i = 0, _a = farm_members.FarmMemberList;
- _x.label = 14;
- case 14:
- if (!(_i < _a.length)) return [3 /*break*/, 17];
- farm_member = _a[_i];
- return [4 /*yield*/, Test_GetFarmInfo(farm_member.Id_u32)];
- case 15:
- _x.sent();
- _x.label = 16;
- case 16:
- _i++;
- return [3 /*break*/, 14];
- case 17: return [4 /*yield*/, Test_GetFarmConnectionStatus()];
- case 18:
- _x.sent();
- return [3 /*break*/, 20];
- case 19:
- if (false) {
- console.log("abc");
- }
- else {
- console.log("def");
- }
- _x.label = 20;
- case 20: return [4 /*yield*/, Test_GetServerCert()];
- case 21:
- _x.sent();
- return [4 /*yield*/, Test_SetServerCert()];
- case 22:
- _x.sent();
- return [4 /*yield*/, Test_GetServerCipher()];
- case 23:
- _x.sent();
- return [4 /*yield*/, Test_SetServerCipher()];
- case 24:
- _x.sent();
- return [4 /*yield*/, Test_EnumConnection()];
- case 25:
- enum_connection = _x.sent();
- _b = 0, _c = enum_connection.ConnectionList;
- _x.label = 26;
- case 26:
- if (!(_b < _c.length)) return [3 /*break*/, 29];
- connecton = _c[_b];
- return [4 /*yield*/, Test_GetConnectionInfo(connecton.Name_str)];
- case 27:
- _x.sent();
- _x.label = 28;
- case 28:
- _b++;
- return [3 /*break*/, 26];
- case 29: return [4 /*yield*/, Test_CreateHub()];
- case 30:
- hub_name = _x.sent();
- return [4 /*yield*/, Test_SetHub()];
- case 31:
- _x.sent();
- return [4 /*yield*/, Test_GetHub()];
- case 32:
- _x.sent();
- return [4 /*yield*/, Test_EnumHub()];
- case 33:
- _x.sent();
- return [4 /*yield*/, Test_SetHubRadius()];
- case 34:
- _x.sent();
- return [4 /*yield*/, Test_GetHubRadius()];
- case 35:
- _x.sent();
- return [4 /*yield*/, Test_SetHubOnline()];
- case 36:
- _x.sent();
- return [4 /*yield*/, Test_GetHubStatus()];
- case 37:
- _x.sent();
- return [4 /*yield*/, Test_GetHubLog()];
- case 38:
- hub_log_settings = _x.sent();
- return [4 /*yield*/, Test_SetHubLog(hub_log_settings)];
- case 39:
- _x.sent();
- return [4 /*yield*/, Test_AddCa()];
- case 40:
- _x.sent();
- return [4 /*yield*/, Test_EnumCa()];
- case 41:
- enum_ca = _x.sent();
- _d = 0, _e = enum_ca.CAList;
- _x.label = 42;
- case 42:
- if (!(_d < _e.length)) return [3 /*break*/, 46];
- ca = _e[_d];
- return [4 /*yield*/, Test_GetCa(ca.Key_u32)];
- case 43:
- _x.sent();
- return [4 /*yield*/, Test_DeleteCa(ca.Key_u32)];
- case 44:
- _x.sent();
- _x.label = 45;
- case 45:
- _d++;
- return [3 /*break*/, 42];
- case 46: return [4 /*yield*/, Test_CreateLink()];
- case 47:
- _x.sent();
- return [4 /*yield*/, Test_GetLink()];
- case 48:
- _x.sent();
- return [4 /*yield*/, Test_SetLink()];
- case 49:
- _x.sent();
- return [4 /*yield*/, Test_SetLinkOffline()];
- case 50:
- _x.sent();
- return [4 /*yield*/, Test_SetLinkOnline()];
- case 51:
- _x.sent();
- return [4 /*yield*/, Test_EnumLink()];
- case 52:
- enum_link = _x.sent();
- _f = 0, _g = enum_link.LinkList;
- _x.label = 53;
- case 53:
- if (!(_f < _g.length)) return [3 /*break*/, 56];
- link = _g[_f];
- return [4 /*yield*/, Test_GetLinkStatus(link.AccountName_utf)];
- case 54:
- _x.sent();
- _x.label = 55;
- case 55:
- _f++;
- return [3 /*break*/, 53];
- case 56: return [4 /*yield*/, new Promise(function (r) { return setTimeout(r, 3000); })];
- case 57:
- _x.sent();
- return [4 /*yield*/, Test_RenameLink()];
- case 58:
- _x.sent();
- return [4 /*yield*/, Test_DeleteLink()];
- case 59:
- _x.sent();
- return [4 /*yield*/, Test_AddAccess()];
- case 60:
- _x.sent();
- return [4 /*yield*/, Test_EnumAccess()];
- case 61:
- _x.sent();
- return [4 /*yield*/, Test_DeleteAccess()];
- case 62:
- _x.sent();
- return [4 /*yield*/, Test_SetAccessList()];
- case 63:
- _x.sent();
- return [4 /*yield*/, Test_CreateGroup()];
- case 64:
- _x.sent();
- return [4 /*yield*/, Test_SetGroup()];
- case 65:
- _x.sent();
- return [4 /*yield*/, Test_GetGroup()];
- case 66:
- _x.sent();
- return [4 /*yield*/, Test_CreateUser()];
- case 67:
- _x.sent();
- return [4 /*yield*/, Test_SetUser()];
- case 68:
- _x.sent();
- return [4 /*yield*/, Test_GetUser()];
- case 69:
- _x.sent();
- return [4 /*yield*/, Test_EnumUser()];
- case 70:
- _x.sent();
- return [4 /*yield*/, Test_EnumGroup()];
- case 71:
- _x.sent();
- return [4 /*yield*/, Test_DeleteUser()];
- case 72:
- _x.sent();
- return [4 /*yield*/, Test_DeleteGroup()];
- case 73:
- _x.sent();
- return [4 /*yield*/, Test_EnumSession()];
- case 74:
- enum_session = _x.sent();
- _h = 0, _j = enum_session.SessionList;
- _x.label = 75;
- case 75:
- if (!(_h < _j.length)) return [3 /*break*/, 79];
- session = _j[_h];
- return [4 /*yield*/, Test_GetSessionStatus(session.Name_str)];
- case 76:
- _x.sent();
- return [4 /*yield*/, Test_DeleteSession(session.Name_str)];
- case 77:
- _x.sent();
- _x.label = 78;
- case 78:
- _h++;
- return [3 /*break*/, 75];
- case 79: return [4 /*yield*/, Test_EnumMacTable()];
- case 80:
- enum_mac = _x.sent();
- _k = 0, _l = enum_mac.MacTable;
- _x.label = 81;
- case 81:
- if (!(_k < _l.length)) return [3 /*break*/, 84];
- mac = _l[_k];
- return [4 /*yield*/, Test_DeleteMacTable(mac.Key_u32)];
- case 82:
- _x.sent();
- _x.label = 83;
- case 83:
- _k++;
- return [3 /*break*/, 81];
- case 84: return [4 /*yield*/, Test_EnumIpTable()];
- case 85:
- enum_ip = _x.sent();
- _m = 0, _o = enum_ip.IpTable;
- _x.label = 86;
- case 86:
- if (!(_m < _o.length)) return [3 /*break*/, 89];
- ip = _o[_m];
- return [4 /*yield*/, Test_DeleteIpTable(ip.Key_u32)];
- case 87:
- _x.sent();
- _x.label = 88;
- case 88:
- _m++;
- return [3 /*break*/, 86];
- case 89: return [4 /*yield*/, Test_SetKeep()];
- case 90:
- _x.sent();
- return [4 /*yield*/, Test_GetKeep()];
- case 91:
- _x.sent();
- return [4 /*yield*/, Test_EnableSecureNAT()];
- case 92:
- _x.sent();
- return [4 /*yield*/, Test_GetSecureNATOption()];
- case 93:
- _x.sent();
- return [4 /*yield*/, Test_SetSecureNATOption()];
- case 94:
- _x.sent();
- return [4 /*yield*/, Test_EnumNAT()];
- case 95:
- _x.sent();
- return [4 /*yield*/, Test_EnumDHCP()];
- case 96:
- _x.sent();
- return [4 /*yield*/, Test_GetSecureNATStatus()];
- case 97:
- _x.sent();
- return [4 /*yield*/, Test_DisableSecureNAT()];
- case 98:
- _x.sent();
- return [4 /*yield*/, Test_EnumEthernet()];
- case 99:
- _x.sent();
- return [4 /*yield*/, Test_EnumLocalBridge()];
- case 100:
- _x.sent();
- return [4 /*yield*/, Test_GetBridgeSupport()];
- case 101:
- _x.sent();
- return [4 /*yield*/, Test_GetCaps()];
- case 102:
- _x.sent();
- return [4 /*yield*/, Test_GetConfig()];
- case 103:
- _x.sent();
- return [4 /*yield*/, Test_GetDefaultHubAdminOptions()];
- case 104:
- _x.sent();
- return [4 /*yield*/, Test_GetHubAdminOptions()];
- case 105:
- _x.sent();
- return [4 /*yield*/, Test_SetHubAdminOptions()];
- case 106:
- _x.sent();
- return [4 /*yield*/, Test_GetHubExtOptions()];
- case 107:
- _x.sent();
- return [4 /*yield*/, Test_SetHubExtOptions()];
- case 108:
- _x.sent();
- return [4 /*yield*/, Test_AddL3Switch()];
- case 109:
- _x.sent();
- return [4 /*yield*/, Test_AddL3If()];
- case 110:
- _x.sent();
- return [4 /*yield*/, Test_EnumL3Switch()];
- case 111:
- _x.sent();
- return [4 /*yield*/, Test_EnumL3If()];
- case 112:
- _x.sent();
- return [4 /*yield*/, Test_AddL3Table()];
- case 113:
- _x.sent();
- return [4 /*yield*/, Test_EnumL3Table()];
- case 114:
- _x.sent();
- return [4 /*yield*/, Test_DelL3Table()];
- case 115:
- _x.sent();
- return [4 /*yield*/, Test_StartL3Switch()];
- case 116:
- _x.sent();
- return [4 /*yield*/, Test_StopL3Switch()];
- case 117:
- _x.sent();
- return [4 /*yield*/, Test_DelL3If()];
- case 118:
- _x.sent();
- return [4 /*yield*/, Test_DelL3Switch()];
- case 119:
- _x.sent();
- return [4 /*yield*/, Test_AddCrl()];
- case 120:
- _x.sent();
- return [4 /*yield*/, Test_EnumCrl()];
- case 121:
- enum_crl = _x.sent();
- _p = 0, _q = enum_crl.CRLList;
- _x.label = 122;
- case 122:
- if (!(_p < _q.length)) return [3 /*break*/, 126];
- crl = _q[_p];
- return [4 /*yield*/, Test_GetCrl(crl.Key_u32)];
- case 123:
- got_crl = _x.sent();
- got_crl.CommonName_utf = got_crl.CommonName_utf + "_a";
- return [4 /*yield*/, Test_SetCrl(got_crl)];
- case 124:
- _x.sent();
- _x.label = 125;
- case 125:
- _p++;
- return [3 /*break*/, 122];
- case 126: return [4 /*yield*/, Test_EnumCrl()];
- case 127:
- enum_crl = _x.sent();
- _r = 0, _s = enum_crl.CRLList;
- _x.label = 128;
- case 128:
- if (!(_r < _s.length)) return [3 /*break*/, 131];
- crl = _s[_r];
- return [4 /*yield*/, Test_DelCrl(crl.Key_u32)];
- case 129:
- _x.sent();
- _x.label = 130;
- case 130:
- _r++;
- return [3 /*break*/, 128];
- case 131: return [4 /*yield*/, Test_SetAcList()];
- case 132:
- _x.sent();
- return [4 /*yield*/, Test_GetAcList()];
- case 133:
- _x.sent();
- return [4 /*yield*/, Test_EnumLogFile()];
- case 134:
- enum_log_file = _x.sent();
- _t = 0, _u = enum_log_file.LogFiles;
- _x.label = 135;
- case 135:
- if (!(_t < _u.length)) return [3 /*break*/, 138];
- log = _u[_t];
- return [4 /*yield*/, Test_ReadLogFile(log.FilePath_str)];
- case 136:
- _x.sent();
- return [3 /*break*/, 138];
- case 137:
- _t++;
- return [3 /*break*/, 135];
- case 138: return [4 /*yield*/, Test_SetSysLog(true)];
- case 139:
- _x.sent();
- return [4 /*yield*/, Test_GetSysLog()];
- case 140:
- _x.sent();
- return [4 /*yield*/, Test_SetSysLog(false)];
- case 141:
- _x.sent();
- return [4 /*yield*/, Test_SetHubMsg()];
- case 142:
- _x.sent();
- return [4 /*yield*/, Test_GetHubMsg()];
- case 143:
- _x.sent();
- return [4 /*yield*/, Test_GetAdminMsg()];
- case 144:
- _x.sent();
- return [4 /*yield*/, Test_Flush()];
- case 145:
- _x.sent();
- return [4 /*yield*/, Test_SetIPsecServices()];
- case 146:
- _x.sent();
- return [4 /*yield*/, Test_GetIPsecServices()];
- case 147:
- _x.sent();
- return [4 /*yield*/, Test_AddEtherIpId()];
- case 148:
- _x.sent();
- return [4 /*yield*/, Test_EnumEtherIpId()];
- case 149:
- enum_etherip_id = _x.sent();
- _v = 0, _w = enum_etherip_id.Settings;
- _x.label = 150;
- case 150:
- if (!(_v < _w.length)) return [3 /*break*/, 154];
- etherip_id = _w[_v];
- return [4 /*yield*/, Test_GetEtherIpId(etherip_id.Id_str)];
- case 151:
- _x.sent();
- return [4 /*yield*/, Test_DeleteEtherIpId(etherip_id.Id_str)];
- case 152:
- _x.sent();
- _x.label = 153;
- case 153:
- _v++;
- return [3 /*break*/, 150];
- case 154: return [4 /*yield*/, Test_SetOpenVpnSstpConfig()];
- case 155:
- _x.sent();
- return [4 /*yield*/, Test_GetOpenVpnSstpConfig()];
- case 156:
- _x.sent();
- return [4 /*yield*/, Test_GetDDnsClientStatus()];
- case 157:
- _x.sent();
- return [4 /*yield*/, Test_SetDDnsInternetSetting()];
- case 158:
- _x.sent();
- return [4 /*yield*/, Test_GetDDnsInternetSetting()];
- case 159:
- _x.sent();
- return [4 /*yield*/, Test_ChangeDDnsClientHostname()];
- case 160:
- _x.sent();
- return [4 /*yield*/, Test_RegenerateServerCert()];
- case 161:
- _x.sent();
- return [4 /*yield*/, Test_MakeOpenVpnConfigFile()];
- case 162:
- _x.sent();
- return [4 /*yield*/, Test_SetSpecialListener()];
- case 163:
- _x.sent();
- return [4 /*yield*/, Test_GetSpecialListener()];
- case 164:
- _x.sent();
- return [4 /*yield*/, Test_GetAzureStatus()];
- case 165:
- _x.sent();
- return [4 /*yield*/, Test_SetAzureStatus()];
- case 166:
- _x.sent();
- return [4 /*yield*/, Test_SetVgsConfig()];
- case 167:
- _x.sent();
- return [4 /*yield*/, Test_GetVgsConfig()];
- case 168:
- _x.sent();
- return [4 /*yield*/, Test_DeleteHub()];
- case 169:
- _x.sent();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'Test', test RPC function */
- function Test_Test() {
- return __awaiter(this, void 0, void 0, function () {
- var a, b;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_Test");
- a = new VPN.VpnRpcTest({
- IntValue_u32: 12345
- });
- return [4 /*yield*/, api.Test(a)];
- case 1:
- b = _a.sent();
- console.log(b);
- console.log("End: Test_Test");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetServerInfo', Get server information */
- function Test_GetServerInfo() {
- return __awaiter(this, void 0, void 0, function () {
- var info;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetServerInfo");
- return [4 /*yield*/, api.GetServerInfo()];
- case 1:
- info = _a.sent();
- console.log(info);
- console.log("End: Test_GetServerInfo");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetServerStatus', Get server status */
- function Test_GetServerStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_server_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetServerStatus");
- return [4 /*yield*/, api.GetServerStatus()];
- case 1:
- out_rpc_server_status = _a.sent();
- console.log(out_rpc_server_status);
- console.log("End: Test_GetServerStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'CreateListener', Create a listener */
- function Test_CreateListener() {
- return __awaiter(this, void 0, void 0, function () {
- var port, in_rpc_listener, out_rpc_listener;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_CreateListener");
- port = Math.floor((Math.random() * (65534 - 1025)) + 1025);
- console.log("Creating a new listener port: Port " + port);
- in_rpc_listener = new VPN.VpnRpcListener({
- Enable_bool: true,
- Port_u32: port
- });
- return [4 /*yield*/, api.CreateListener(in_rpc_listener)];
- case 1:
- out_rpc_listener = _a.sent();
- console.log("Done.");
- console.log("End: Test_CreateListener");
- console.log("-----");
- console.log();
- return [2 /*return*/, port];
- }
- });
- });
- }
- /** API test for 'EnumListener', Enumerating listeners */
- function Test_EnumListener() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_listener_list;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumListener");
- return [4 /*yield*/, api.EnumListener()];
- case 1:
- out_rpc_listener_list = _a.sent();
- console.log(out_rpc_listener_list);
- console.log("End: Test_EnumListener");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteListener', Delete a listener */
- function Test_DeleteListener(port) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_listener, out_rpc_listener;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteListener");
- console.log("Deleting a new listener port: Port" + port);
- in_rpc_listener = new VPN.VpnRpcListener({
- Port_u32: port
- });
- return [4 /*yield*/, api.DeleteListener(in_rpc_listener)];
- case 1:
- out_rpc_listener = _a.sent();
- console.log("Done.");
- console.log("End: Test_DeleteListener");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnableListener', Enable / Disable listener */
- function Test_EnableListener(port, enabled) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_listener, out_rpc_listener;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnableListener");
- if (enabled) {
- console.log("Enabling listener port = " + port);
- }
- else {
- console.log("Disabling listener port = " + port);
- }
- in_rpc_listener = new VPN.VpnRpcListener({
- Port_u32: port,
- Enable_bool: enabled
- });
- return [4 /*yield*/, api.EnableListener(in_rpc_listener)];
- case 1:
- out_rpc_listener = _a.sent();
- console.log("Done.");
- console.log("End: Test_EnableListener");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetServerPassword', Set server password */
- function Test_SetServerPassword() {
- return __awaiter(this, void 0, void 0, function () {
- var password, in_rpc_set_password, out_rpc_set_password;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- password = "microsoft";
- console.log("Begin: Test_SetServerPassword");
- console.log("Set the server administrator password to '" + password + "'.");
- in_rpc_set_password = new VPN.VpnRpcSetPassword({
- PlainTextPassword_str: password
- });
- return [4 /*yield*/, api.SetServerPassword(in_rpc_set_password)];
- case 1:
- out_rpc_set_password = _a.sent();
- console.log("Done.");
- console.log("End: Test_SetServerPassword");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetFarmSetting', Set clustering configuration */
- function Test_SetFarmSetting() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_farm, out_rpc_farm;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetFarmSetting");
- in_rpc_farm = new VPN.VpnRpcFarm({
- ServerType_u32: VPN.VpnRpcServerType.FarmController,
- NumPort_u32: 2,
- Ports_u32: [443, 444, 445,],
- PublicIp_ip: "1.2.3.4",
- ControllerName_str: "controller",
- MemberPasswordPlaintext_str: "microsoft",
- ControllerPort_u32: 443,
- Weight_u32: 100,
- ControllerOnly_bool: false
- });
- return [4 /*yield*/, api.SetFarmSetting(in_rpc_farm)];
- case 1:
- out_rpc_farm = _a.sent();
- console.log("End: Test_SetFarmSetting");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetFarmSetting', Get clustering configuration */
- function Test_GetFarmSetting() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_farm;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetFarmSetting");
- return [4 /*yield*/, api.GetFarmSetting()];
- case 1:
- out_rpc_farm = _a.sent();
- console.log(out_rpc_farm);
- console.log("End: Test_GetFarmSetting");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetFarmInfo', Get cluster member information */
- function Test_GetFarmInfo(id) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_farm_info, out_rpc_farm_info;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetFarmInfo");
- in_rpc_farm_info = new VPN.VpnRpcFarmInfo({
- Id_u32: id
- });
- return [4 /*yield*/, api.GetFarmInfo(in_rpc_farm_info)];
- case 1:
- out_rpc_farm_info = _a.sent();
- console.log(out_rpc_farm_info);
- console.log("End: Test_GetFarmInfo");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumFarmMember', Enumerate cluster members */
- function Test_EnumFarmMember() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_farm;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumFarmMember");
- return [4 /*yield*/, api.EnumFarmMember()];
- case 1:
- out_rpc_enum_farm = _a.sent();
- console.log(out_rpc_enum_farm);
- console.log("End: Test_EnumFarmMember");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_farm];
- }
- });
- });
- }
- /** API test for 'GetFarmConnectionStatus', Get status of connection to cluster controller */
- function Test_GetFarmConnectionStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_farm_connection_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetFarmConnectionStatus");
- return [4 /*yield*/, api.GetFarmConnectionStatus()];
- case 1:
- out_rpc_farm_connection_status = _a.sent();
- console.log(out_rpc_farm_connection_status);
- console.log("End: Test_GetFarmConnectionStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetServerCert', Set the server certification */
- function Test_SetServerCert() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_key_pair, out_rpc_key_pair;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetServerCert");
- in_rpc_key_pair = new VPN.VpnRpcKeyPair({
- Cert_bin: new Uint8Array([0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,]),
- Key_bin: new Uint8Array([0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x45, 0x76, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x45, 0x46, 0x41, 0x41, 0x53, 0x43, 0x42, 0x4b, 0x67, 0x77, 0x67, 0x67, 0x53, 0x6b, 0x41, 0x67, 0x45, 0x41, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x0a, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x0a, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x0a, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x0a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x0a, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x0a, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x45, 0x43, 0x67, 0x67, 0x45, 0x41, 0x54, 0x77, 0x34, 0x52, 0x6f, 0x52, 0x4c, 0x6a, 0x73, 0x68, 0x72, 0x42, 0x56, 0x6f, 0x59, 0x69, 0x78, 0x4f, 0x4a, 0x2b, 0x57, 0x4c, 0x6d, 0x2f, 0x45, 0x51, 0x57, 0x65, 0x37, 0x6f, 0x6a, 0x38, 0x31, 0x51, 0x50, 0x73, 0x39, 0x56, 0x45, 0x49, 0x32, 0x62, 0x53, 0x4f, 0x0a, 0x34, 0x4a, 0x51, 0x42, 0x55, 0x42, 0x53, 0x6b, 0x70, 0x64, 0x48, 0x34, 0x57, 0x32, 0x77, 0x51, 0x75, 0x2f, 0x61, 0x58, 0x57, 0x38, 0x75, 0x75, 0x53, 0x39, 0x45, 0x43, 0x6d, 0x6d, 0x41, 0x41, 0x75, 0x45, 0x79, 0x4a, 0x54, 0x56, 0x7a, 0x75, 0x31, 0x32, 0x35, 0x58, 0x73, 0x65, 0x63, 0x6c, 0x44, 0x41, 0x55, 0x38, 0x49, 0x55, 0x70, 0x54, 0x2b, 0x70, 0x4c, 0x35, 0x79, 0x70, 0x37, 0x34, 0x0a, 0x45, 0x62, 0x76, 0x4e, 0x48, 0x48, 0x33, 0x67, 0x65, 0x72, 0x4f, 0x67, 0x78, 0x76, 0x49, 0x6a, 0x50, 0x64, 0x67, 0x77, 0x62, 0x66, 0x6d, 0x4d, 0x49, 0x59, 0x48, 0x62, 0x56, 0x70, 0x6e, 0x49, 0x30, 0x77, 0x32, 0x42, 0x43, 0x44, 0x51, 0x76, 0x74, 0x64, 0x64, 0x57, 0x6f, 0x42, 0x74, 0x41, 0x33, 0x43, 0x54, 0x6a, 0x63, 0x2f, 0x43, 0x56, 0x67, 0x73, 0x47, 0x77, 0x33, 0x43, 0x4e, 0x72, 0x0a, 0x46, 0x78, 0x41, 0x46, 0x35, 0x73, 0x4a, 0x34, 0x63, 0x5a, 0x4c, 0x6e, 0x5a, 0x31, 0x45, 0x36, 0x69, 0x74, 0x4c, 0x54, 0x50, 0x69, 0x6f, 0x6a, 0x74, 0x76, 0x48, 0x48, 0x34, 0x61, 0x64, 0x6d, 0x68, 0x68, 0x43, 0x61, 0x42, 0x49, 0x78, 0x76, 0x47, 0x2f, 0x53, 0x6e, 0x59, 0x77, 0x4e, 0x35, 0x38, 0x37, 0x55, 0x5a, 0x6d, 0x37, 0x4c, 0x57, 0x50, 0x61, 0x67, 0x4c, 0x41, 0x33, 0x67, 0x69, 0x0a, 0x48, 0x4b, 0x4f, 0x2b, 0x4b, 0x79, 0x42, 0x51, 0x39, 0x33, 0x31, 0x4e, 0x4d, 0x61, 0x65, 0x6a, 0x36, 0x6d, 0x75, 0x75, 0x46, 0x32, 0x30, 0x32, 0x76, 0x34, 0x37, 0x6c, 0x57, 0x6b, 0x64, 0x50, 0x4f, 0x6e, 0x52, 0x43, 0x69, 0x6f, 0x4d, 0x58, 0x30, 0x63, 0x31, 0x6a, 0x36, 0x76, 0x32, 0x61, 0x59, 0x34, 0x34, 0x77, 0x55, 0x4b, 0x71, 0x39, 0x4d, 0x52, 0x67, 0x6f, 0x52, 0x76, 0x4a, 0x37, 0x0a, 0x41, 0x39, 0x77, 0x65, 0x72, 0x4c, 0x6b, 0x68, 0x35, 0x78, 0x78, 0x35, 0x35, 0x32, 0x4f, 0x74, 0x71, 0x50, 0x36, 0x73, 0x61, 0x6d, 0x75, 0x47, 0x44, 0x52, 0x78, 0x31, 0x42, 0x70, 0x36, 0x53, 0x4f, 0x70, 0x68, 0x43, 0x45, 0x50, 0x48, 0x59, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x36, 0x33, 0x65, 0x2b, 0x52, 0x75, 0x6c, 0x36, 0x46, 0x78, 0x47, 0x43, 0x76, 0x67, 0x70, 0x6b, 0x33, 0x0a, 0x57, 0x67, 0x2f, 0x54, 0x31, 0x77, 0x2f, 0x59, 0x4b, 0x6b, 0x79, 0x4f, 0x49, 0x46, 0x4c, 0x63, 0x46, 0x4c, 0x57, 0x71, 0x42, 0x44, 0x71, 0x6c, 0x6e, 0x58, 0x65, 0x63, 0x6c, 0x6b, 0x50, 0x4b, 0x6a, 0x57, 0x4e, 0x2f, 0x32, 0x70, 0x4a, 0x6d, 0x4f, 0x31, 0x63, 0x46, 0x63, 0x44, 0x4a, 0x46, 0x59, 0x64, 0x32, 0x45, 0x49, 0x45, 0x72, 0x76, 0x42, 0x57, 0x54, 0x34, 0x51, 0x39, 0x4d, 0x42, 0x0a, 0x4e, 0x35, 0x6c, 0x44, 0x6b, 0x47, 0x75, 0x6a, 0x34, 0x2f, 0x6b, 0x68, 0x56, 0x6c, 0x79, 0x6e, 0x77, 0x62, 0x64, 0x42, 0x6e, 0x47, 0x43, 0x34, 0x61, 0x34, 0x48, 0x4a, 0x49, 0x4a, 0x76, 0x61, 0x35, 0x63, 0x70, 0x49, 0x63, 0x57, 0x65, 0x4a, 0x72, 0x35, 0x61, 0x57, 0x33, 0x69, 0x44, 0x36, 0x68, 0x53, 0x73, 0x61, 0x6c, 0x79, 0x55, 0x76, 0x4a, 0x4d, 0x6d, 0x64, 0x4d, 0x42, 0x6e, 0x47, 0x0a, 0x37, 0x2b, 0x50, 0x65, 0x53, 0x2b, 0x4e, 0x73, 0x4b, 0x30, 0x61, 0x63, 0x31, 0x67, 0x33, 0x4d, 0x6c, 0x56, 0x35, 0x42, 0x41, 0x32, 0x70, 0x55, 0x54, 0x77, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x62, 0x65, 0x46, 0x6d, 0x2b, 0x46, 0x46, 0x35, 0x62, 0x76, 0x6f, 0x4b, 0x7a, 0x49, 0x4c, 0x6c, 0x31, 0x62, 0x79, 0x6b, 0x6c, 0x52, 0x6b, 0x69, 0x76, 0x7a, 0x6b, 0x62, 0x7a, 0x49, 0x6b, 0x41, 0x78, 0x0a, 0x35, 0x56, 0x6b, 0x74, 0x67, 0x36, 0x4a, 0x35, 0x63, 0x76, 0x38, 0x44, 0x35, 0x2b, 0x72, 0x71, 0x50, 0x75, 0x6a, 0x4f, 0x66, 0x39, 0x67, 0x42, 0x6a, 0x4e, 0x37, 0x70, 0x64, 0x78, 0x39, 0x39, 0x35, 0x6b, 0x47, 0x49, 0x78, 0x5a, 0x39, 0x6d, 0x31, 0x68, 0x57, 0x69, 0x78, 0x55, 0x55, 0x31, 0x55, 0x6f, 0x38, 0x72, 0x70, 0x39, 0x4a, 0x69, 0x47, 0x4f, 0x36, 0x72, 0x65, 0x31, 0x77, 0x69, 0x0a, 0x6a, 0x56, 0x2f, 0x4c, 0x31, 0x64, 0x37, 0x55, 0x66, 0x39, 0x48, 0x6a, 0x65, 0x61, 0x70, 0x4f, 0x46, 0x62, 0x34, 0x6b, 0x72, 0x71, 0x52, 0x58, 0x54, 0x65, 0x75, 0x4d, 0x6e, 0x35, 0x35, 0x44, 0x33, 0x64, 0x70, 0x79, 0x6a, 0x51, 0x4e, 0x43, 0x30, 0x5a, 0x50, 0x72, 0x61, 0x6d, 0x58, 0x64, 0x38, 0x31, 0x57, 0x6f, 0x6f, 0x56, 0x77, 0x58, 0x59, 0x41, 0x66, 0x69, 0x46, 0x76, 0x4c, 0x49, 0x0a, 0x6f, 0x66, 0x31, 0x37, 0x51, 0x67, 0x67, 0x49, 0x59, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x44, 0x59, 0x55, 0x67, 0x67, 0x43, 0x34, 0x58, 0x49, 0x67, 0x5a, 0x76, 0x58, 0x34, 0x59, 0x65, 0x55, 0x38, 0x6c, 0x61, 0x79, 0x51, 0x50, 0x79, 0x4b, 0x71, 0x67, 0x38, 0x37, 0x2f, 0x76, 0x31, 0x2b, 0x7a, 0x35, 0x79, 0x65, 0x2f, 0x4d, 0x32, 0x5a, 0x65, 0x36, 0x53, 0x6e, 0x37, 0x48, 0x4a, 0x66, 0x59, 0x0a, 0x55, 0x5a, 0x4d, 0x36, 0x37, 0x48, 0x37, 0x52, 0x4b, 0x4e, 0x6f, 0x68, 0x46, 0x6c, 0x35, 0x43, 0x39, 0x65, 0x44, 0x4e, 0x7a, 0x67, 0x72, 0x50, 0x6b, 0x52, 0x63, 0x2f, 0x2f, 0x54, 0x77, 0x32, 0x45, 0x48, 0x74, 0x59, 0x68, 0x33, 0x42, 0x4b, 0x49, 0x6f, 0x72, 0x77, 0x39, 0x45, 0x64, 0x78, 0x59, 0x4e, 0x6c, 0x6b, 0x2b, 0x6a, 0x4e, 0x73, 0x30, 0x30, 0x64, 0x57, 0x35, 0x34, 0x64, 0x39, 0x0a, 0x65, 0x69, 0x69, 0x7a, 0x7a, 0x78, 0x59, 0x34, 0x34, 0x2f, 0x41, 0x32, 0x70, 0x39, 0x52, 0x49, 0x4d, 0x67, 0x79, 0x35, 0x49, 0x52, 0x77, 0x76, 0x53, 0x73, 0x6d, 0x50, 0x67, 0x61, 0x71, 0x34, 0x6f, 0x4b, 0x4d, 0x64, 0x54, 0x4e, 0x4d, 0x4f, 0x73, 0x30, 0x4a, 0x77, 0x65, 0x79, 0x50, 0x72, 0x42, 0x65, 0x49, 0x41, 0x72, 0x62, 0x46, 0x43, 0x67, 0x51, 0x4b, 0x42, 0x67, 0x51, 0x43, 0x71, 0x0a, 0x57, 0x30, 0x34, 0x56, 0x33, 0x49, 0x75, 0x74, 0x33, 0x55, 0x42, 0x6f, 0x75, 0x50, 0x4d, 0x63, 0x63, 0x38, 0x2f, 0x56, 0x62, 0x69, 0x77, 0x48, 0x77, 0x79, 0x2b, 0x52, 0x6c, 0x4c, 0x6d, 0x4e, 0x77, 0x59, 0x41, 0x71, 0x63, 0x79, 0x35, 0x50, 0x35, 0x58, 0x4b, 0x4c, 0x33, 0x70, 0x36, 0x62, 0x65, 0x33, 0x2b, 0x4d, 0x6f, 0x76, 0x48, 0x52, 0x71, 0x6a, 0x35, 0x78, 0x72, 0x4a, 0x54, 0x57, 0x0a, 0x54, 0x6a, 0x2f, 0x36, 0x59, 0x61, 0x51, 0x73, 0x31, 0x2b, 0x72, 0x74, 0x63, 0x51, 0x45, 0x61, 0x74, 0x64, 0x34, 0x4b, 0x50, 0x66, 0x64, 0x78, 0x53, 0x2f, 0x63, 0x66, 0x52, 0x74, 0x38, 0x71, 0x74, 0x75, 0x42, 0x77, 0x51, 0x61, 0x2f, 0x34, 0x39, 0x4d, 0x72, 0x41, 0x4c, 0x76, 0x57, 0x43, 0x4c, 0x53, 0x42, 0x75, 0x4b, 0x74, 0x33, 0x49, 0x49, 0x75, 0x53, 0x2f, 0x51, 0x44, 0x74, 0x43, 0x0a, 0x5a, 0x4e, 0x67, 0x6d, 0x36, 0x4d, 0x78, 0x71, 0x4e, 0x6e, 0x49, 0x43, 0x58, 0x35, 0x46, 0x34, 0x36, 0x6d, 0x52, 0x49, 0x52, 0x42, 0x42, 0x4f, 0x32, 0x4b, 0x7a, 0x6c, 0x30, 0x33, 0x68, 0x62, 0x51, 0x6c, 0x71, 0x58, 0x4c, 0x5a, 0x63, 0x38, 0x6f, 0x51, 0x4b, 0x42, 0x67, 0x43, 0x53, 0x77, 0x66, 0x46, 0x7a, 0x68, 0x48, 0x76, 0x78, 0x36, 0x68, 0x69, 0x64, 0x57, 0x67, 0x48, 0x4a, 0x63, 0x0a, 0x77, 0x79, 0x76, 0x64, 0x6e, 0x70, 0x58, 0x78, 0x36, 0x5a, 0x4c, 0x6e, 0x6f, 0x61, 0x7a, 0x61, 0x6f, 0x48, 0x47, 0x74, 0x4d, 0x47, 0x43, 0x45, 0x5a, 0x49, 0x50, 0x66, 0x6a, 0x4c, 0x42, 0x63, 0x30, 0x4d, 0x74, 0x79, 0x45, 0x64, 0x53, 0x4c, 0x78, 0x54, 0x6c, 0x35, 0x59, 0x70, 0x78, 0x6f, 0x6d, 0x43, 0x46, 0x55, 0x4d, 0x33, 0x55, 0x63, 0x59, 0x4e, 0x2f, 0x50, 0x5a, 0x66, 0x58, 0x41, 0x0a, 0x6d, 0x36, 0x31, 0x45, 0x6d, 0x71, 0x53, 0x53, 0x4d, 0x56, 0x63, 0x47, 0x50, 0x67, 0x65, 0x2f, 0x43, 0x34, 0x44, 0x42, 0x5a, 0x59, 0x6a, 0x53, 0x45, 0x71, 0x62, 0x67, 0x37, 0x6d, 0x73, 0x52, 0x30, 0x33, 0x37, 0x42, 0x58, 0x54, 0x48, 0x6b, 0x78, 0x44, 0x62, 0x33, 0x71, 0x48, 0x46, 0x54, 0x6f, 0x30, 0x6b, 0x48, 0x57, 0x4a, 0x66, 0x34, 0x39, 0x59, 0x77, 0x32, 0x73, 0x77, 0x6a, 0x54, 0x0a, 0x72, 0x4f, 0x38, 0x46, 0x46, 0x44, 0x52, 0x56, 0x50, 0x44, 0x4c, 0x5a, 0x61, 0x37, 0x36, 0x47, 0x67, 0x79, 0x41, 0x55, 0x4a, 0x38, 0x55, 0x63, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x20, 0x4b, 0x45, 0x59, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,])
- });
- return [4 /*yield*/, api.SetServerCert(in_rpc_key_pair)];
- case 1:
- out_rpc_key_pair = _a.sent();
- console.log(out_rpc_key_pair);
- console.log("End: Test_SetServerCert");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetServerCert', Get the server certification */
- function Test_GetServerCert() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_key_pair;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetServerCert");
- return [4 /*yield*/, api.GetServerCert()];
- case 1:
- out_rpc_key_pair = _a.sent();
- console.log(out_rpc_key_pair);
- console.log("End: Test_GetServerCert");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetServerCipher', Get cipher for SSL */
- function Test_GetServerCipher() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_str;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetServerCipher");
- return [4 /*yield*/, api.GetServerCipher()];
- case 1:
- out_rpc_str = _a.sent();
- console.log(out_rpc_str);
- console.log("End: Test_GetServerCipher");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetServerCipher', Set cipher for SSL to the server */
- function Test_SetServerCipher() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_str, out_rpc_str;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetServerCipher");
- in_rpc_str = new VPN.VpnRpcStr({
- String_str: "RC4-MD5"
- });
- return [4 /*yield*/, api.SetServerCipher(in_rpc_str)];
- case 1:
- out_rpc_str = _a.sent();
- console.log(out_rpc_str);
- console.log("End: Test_SetServerCipher");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'CreateHub', Create a hub */
- function Test_CreateHub() {
- return __awaiter(this, void 0, void 0, function () {
- var hub_name, in_rpc_create_hub, out_rpc_create_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- hub_name = "Test_" + Math.floor((Math.random() * (999999 - 100000)) + 100000);
- console.log("Begin: Test_CreateHub");
- in_rpc_create_hub = new VPN.VpnRpcCreateHub({
- HubName_str: hub_name,
- HubType_u32: VPN.VpnRpcHubType.Standalone,
- Online_bool: true,
- AdminPasswordPlainText_str: "microsoft",
- MaxSession_u32: 123,
- NoEnum_bool: false
- });
- return [4 /*yield*/, api.CreateHub(in_rpc_create_hub)];
- case 1:
- out_rpc_create_hub = _a.sent();
- console.log(out_rpc_create_hub);
- console.log("End: Test_CreateHub");
- console.log("-----");
- console.log();
- return [2 /*return*/, hub_name];
- }
- });
- });
- }
- /** API test for 'SetHub', Set hub configuration */
- function Test_SetHub() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_create_hub, out_rpc_create_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHub");
- in_rpc_create_hub = new VPN.VpnRpcCreateHub({
- HubName_str: hub_name,
- AdminPasswordPlainText_str: "aho",
- HubType_u32: VPN.VpnRpcHubType.Standalone,
- NoEnum_bool: false,
- MaxSession_u32: 128,
- Online_bool: true
- });
- return [4 /*yield*/, api.SetHub(in_rpc_create_hub)];
- case 1:
- out_rpc_create_hub = _a.sent();
- console.log(out_rpc_create_hub);
- console.log("End: Test_SetHub");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHub', Get hub configuration */
- function Test_GetHub() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_create_hub, out_rpc_create_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHub");
- in_rpc_create_hub = new VPN.VpnRpcCreateHub({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHub(in_rpc_create_hub)];
- case 1:
- out_rpc_create_hub = _a.sent();
- console.log(out_rpc_create_hub);
- console.log("End: Test_GetHub");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumHub', Enumerate hubs */
- function Test_EnumHub() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumHub");
- return [4 /*yield*/, api.EnumHub()];
- case 1:
- out_rpc_enum_hub = _a.sent();
- console.log(out_rpc_enum_hub);
- console.log("End: Test_EnumHub");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteHub', Delete a hub */
- function Test_DeleteHub() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_hub, out_rpc_delete_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteHub");
- in_rpc_delete_hub = new VPN.VpnRpcDeleteHub({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.DeleteHub(in_rpc_delete_hub)];
- case 1:
- out_rpc_delete_hub = _a.sent();
- console.log(out_rpc_delete_hub);
- console.log("End: Test_DeleteHub");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHubRadius', Get Radius options of the hub */
- function Test_GetHubRadius() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_radius, out_rpc_radius;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHubRadius");
- in_rpc_radius = new VPN.VpnRpcRadius({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHubRadius(in_rpc_radius)];
- case 1:
- out_rpc_radius = _a.sent();
- console.log(out_rpc_radius);
- console.log("End: Test_GetHubRadius");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetHubRadius', Set Radius options of the hub */
- function Test_SetHubRadius() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_radius, out_rpc_radius;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHubRadius");
- in_rpc_radius = new VPN.VpnRpcRadius({
- HubName_str: hub_name,
- RadiusServerName_str: "1.2.3.4",
- RadiusPort_u32: 1234,
- RadiusSecret_str: "microsoft",
- RadiusRetryInterval_u32: 1000
- });
- return [4 /*yield*/, api.SetHubRadius(in_rpc_radius)];
- case 1:
- out_rpc_radius = _a.sent();
- console.log(out_rpc_radius);
- console.log("End: Test_SetHubRadius");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumConnection', Enumerate connections */
- function Test_EnumConnection() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_connection;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumConnection");
- return [4 /*yield*/, api.EnumConnection()];
- case 1:
- out_rpc_enum_connection = _a.sent();
- console.log(out_rpc_enum_connection);
- console.log("End: Test_EnumConnection");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_connection];
- }
- });
- });
- }
- /** API test for 'DisconnectConnection', Disconnect a connection */
- function Test_DisconnectConnection(connection_id) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_disconnect_connection, out_rpc_disconnect_connection;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DisconnectConnection");
- in_rpc_disconnect_connection = new VPN.VpnRpcDisconnectConnection({
- Name_str: connection_id
- });
- return [4 /*yield*/, api.DisconnectConnection(in_rpc_disconnect_connection)];
- case 1:
- out_rpc_disconnect_connection = _a.sent();
- console.log(out_rpc_disconnect_connection);
- console.log("End: Test_DisconnectConnection");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetConnectionInfo', Get connection information */
- function Test_GetConnectionInfo(name) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_connection_info, out_rpc_connection_info;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetConnectionInfo");
- in_rpc_connection_info = new VPN.VpnRpcConnectionInfo({
- Name_str: name
- });
- return [4 /*yield*/, api.GetConnectionInfo(in_rpc_connection_info)];
- case 1:
- out_rpc_connection_info = _a.sent();
- console.log(out_rpc_connection_info);
- console.log("End: Test_GetConnectionInfo");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetHubOnline', Make a hub on-line or off-line */
- function Test_SetHubOnline() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_set_hub_online, out_rpc_set_hub_online;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHubOnline");
- in_rpc_set_hub_online = new VPN.VpnRpcSetHubOnline({
- HubName_str: hub_name,
- Online_bool: true
- });
- return [4 /*yield*/, api.SetHubOnline(in_rpc_set_hub_online)];
- case 1:
- out_rpc_set_hub_online = _a.sent();
- console.log(out_rpc_set_hub_online);
- console.log("End: Test_SetHubOnline");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHubStatus', Get hub status */
- function Test_GetHubStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub_status, out_rpc_hub_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHubStatus");
- in_rpc_hub_status = new VPN.VpnRpcHubStatus({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHubStatus(in_rpc_hub_status)];
- case 1:
- out_rpc_hub_status = _a.sent();
- console.log(out_rpc_hub_status);
- console.log("End: Test_GetHubStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetHubLog', Set logging configuration into the hub */
- function Test_SetHubLog(in_rpc_hub_log) {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_hub_log;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHubLog");
- return [4 /*yield*/, api.SetHubLog(in_rpc_hub_log)];
- case 1:
- out_rpc_hub_log = _a.sent();
- console.log(out_rpc_hub_log);
- console.log("End: Test_SetHubLog");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHubLog', Get logging configuration of the hub */
- function Test_GetHubLog() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub_log, out_rpc_hub_log;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHubLog");
- in_rpc_hub_log = new VPN.VpnRpcHubLog({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHubLog(in_rpc_hub_log)];
- case 1:
- out_rpc_hub_log = _a.sent();
- console.log(out_rpc_hub_log);
- console.log("End: Test_GetHubLog");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_hub_log];
- }
- });
- });
- }
- /** API test for 'AddCa', Add CA(Certificate Authority) into the hub */
- function Test_AddCa() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub_add_ca, out_rpc_hub_add_ca;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddCa");
- in_rpc_hub_add_ca = new VPN.VpnRpcHubAddCA({
- HubName_str: hub_name,
- Cert_bin: new Uint8Array([0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44, 0x72, 0x6a, 0x43, 0x43, 0x41, 0x70, 0x61, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x42, 0x41, 0x44, 0x41, 0x4e, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x44, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x0a, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x0a, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x48, 0x68, 0x63, 0x4e, 0x4d, 0x54, 0x67, 0x78, 0x4d, 0x44, 0x45, 0x78, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x68, 0x63, 0x4e, 0x4e, 0x44, 0x49, 0x78, 0x4d, 0x44, 0x41, 0x31, 0x0a, 0x4d, 0x6a, 0x4d, 0x7a, 0x4e, 0x54, 0x41, 0x78, 0x57, 0x6a, 0x42, 0x57, 0x4d, 0x51, 0x77, 0x77, 0x43, 0x67, 0x59, 0x44, 0x56, 0x51, 0x51, 0x44, 0x44, 0x41, 0x4e, 0x68, 0x59, 0x57, 0x45, 0x78, 0x46, 0x54, 0x41, 0x54, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x4f, 0x4f, 0x42, 0x72, 0x2b, 0x4f, 0x42, 0x71, 0x75, 0x4f, 0x42, 0x6a, 0x2b, 0x4f, 0x42, 0x6e, 0x54, 0x45, 0x4c, 0x0a, 0x4d, 0x41, 0x6b, 0x47, 0x41, 0x31, 0x55, 0x45, 0x42, 0x68, 0x4d, 0x43, 0x53, 0x6c, 0x41, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x67, 0x4d, 0x42, 0x30, 0x6c, 0x69, 0x59, 0x58, 0x4a, 0x68, 0x61, 0x32, 0x6b, 0x78, 0x45, 0x44, 0x41, 0x4f, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63, 0x4d, 0x42, 0x31, 0x52, 0x7a, 0x64, 0x57, 0x74, 0x31, 0x59, 0x6d, 0x45, 0x77, 0x0a, 0x67, 0x67, 0x45, 0x69, 0x4d, 0x41, 0x30, 0x47, 0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x41, 0x51, 0x55, 0x41, 0x41, 0x34, 0x49, 0x42, 0x44, 0x77, 0x41, 0x77, 0x67, 0x67, 0x45, 0x4b, 0x41, 0x6f, 0x49, 0x42, 0x41, 0x51, 0x44, 0x58, 0x45, 0x63, 0x76, 0x72, 0x59, 0x37, 0x56, 0x2b, 0x7a, 0x64, 0x42, 0x79, 0x72, 0x64, 0x4e, 0x78, 0x4a, 0x59, 0x45, 0x6d, 0x0a, 0x61, 0x41, 0x4e, 0x59, 0x55, 0x4f, 0x37, 0x76, 0x57, 0x34, 0x68, 0x64, 0x41, 0x35, 0x49, 0x42, 0x49, 0x46, 0x6d, 0x4d, 0x70, 0x6e, 0x62, 0x79, 0x69, 0x4e, 0x6e, 0x5a, 0x77, 0x36, 0x57, 0x39, 0x6f, 0x61, 0x67, 0x78, 0x33, 0x5a, 0x49, 0x65, 0x65, 0x48, 0x56, 0x59, 0x62, 0x52, 0x69, 0x4b, 0x36, 0x41, 0x66, 0x46, 0x74, 0x53, 0x31, 0x32, 0x2b, 0x45, 0x31, 0x4d, 0x59, 0x31, 0x64, 0x32, 0x0a, 0x61, 0x71, 0x51, 0x31, 0x53, 0x72, 0x49, 0x43, 0x39, 0x51, 0x35, 0x55, 0x6e, 0x5a, 0x61, 0x42, 0x72, 0x62, 0x57, 0x32, 0x32, 0x6d, 0x4e, 0x75, 0x6c, 0x4d, 0x34, 0x2f, 0x6c, 0x49, 0x4a, 0x72, 0x48, 0x70, 0x51, 0x55, 0x68, 0x50, 0x78, 0x6f, 0x62, 0x79, 0x34, 0x2f, 0x36, 0x4e, 0x41, 0x37, 0x71, 0x4b, 0x67, 0x55, 0x48, 0x69, 0x79, 0x4f, 0x64, 0x33, 0x4a, 0x42, 0x70, 0x4f, 0x66, 0x77, 0x0a, 0x38, 0x54, 0x76, 0x53, 0x74, 0x51, 0x78, 0x34, 0x4c, 0x38, 0x59, 0x64, 0x4b, 0x51, 0x35, 0x68, 0x74, 0x7a, 0x6b, 0x32, 0x68, 0x70, 0x52, 0x4a, 0x4c, 0x30, 0x6c, 0x4b, 0x67, 0x47, 0x31, 0x57, 0x34, 0x75, 0x4b, 0x32, 0x39, 0x39, 0x42, 0x74, 0x7a, 0x64, 0x41, 0x67, 0x66, 0x42, 0x76, 0x43, 0x54, 0x33, 0x41, 0x31, 0x61, 0x53, 0x70, 0x6a, 0x49, 0x47, 0x74, 0x6e, 0x69, 0x72, 0x49, 0x31, 0x0a, 0x46, 0x4c, 0x52, 0x58, 0x47, 0x79, 0x38, 0x31, 0x31, 0x57, 0x4a, 0x39, 0x4a, 0x68, 0x68, 0x34, 0x41, 0x4b, 0x4c, 0x66, 0x79, 0x56, 0x70, 0x42, 0x4a, 0x67, 0x65, 0x34, 0x73, 0x56, 0x72, 0x36, 0x4e, 0x75, 0x75, 0x49, 0x66, 0x32, 0x71, 0x47, 0x31, 0x6f, 0x79, 0x31, 0x30, 0x70, 0x61, 0x51, 0x4e, 0x65, 0x71, 0x32, 0x33, 0x55, 0x47, 0x61, 0x59, 0x74, 0x2f, 0x7a, 0x55, 0x56, 0x4a, 0x77, 0x0a, 0x55, 0x74, 0x30, 0x57, 0x45, 0x6b, 0x58, 0x38, 0x48, 0x4f, 0x63, 0x62, 0x33, 0x75, 0x49, 0x6f, 0x54, 0x6d, 0x61, 0x4f, 0x34, 0x72, 0x48, 0x42, 0x55, 0x4a, 0x71, 0x45, 0x79, 0x39, 0x51, 0x58, 0x7a, 0x53, 0x57, 0x77, 0x43, 0x35, 0x78, 0x45, 0x43, 0x64, 0x37, 0x43, 0x4a, 0x53, 0x53, 0x68, 0x31, 0x30, 0x4f, 0x75, 0x6e, 0x6c, 0x75, 0x4c, 0x32, 0x4d, 0x47, 0x65, 0x5a, 0x47, 0x6e, 0x76, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67, 0x59, 0x59, 0x77, 0x67, 0x59, 0x4d, 0x77, 0x44, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x54, 0x41, 0x51, 0x48, 0x2f, 0x42, 0x41, 0x55, 0x77, 0x41, 0x77, 0x45, 0x42, 0x2f, 0x7a, 0x41, 0x4c, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x51, 0x38, 0x45, 0x42, 0x41, 0x4d, 0x43, 0x41, 0x66, 0x59, 0x77, 0x59, 0x77, 0x59, 0x44, 0x56, 0x52, 0x30, 0x6c, 0x0a, 0x42, 0x46, 0x77, 0x77, 0x57, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x45, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x43, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x41, 0x77, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x51, 0x47, 0x43, 0x43, 0x73, 0x47, 0x0a, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x46, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x42, 0x67, 0x59, 0x49, 0x4b, 0x77, 0x59, 0x42, 0x42, 0x51, 0x55, 0x48, 0x41, 0x77, 0x63, 0x47, 0x43, 0x43, 0x73, 0x47, 0x41, 0x51, 0x55, 0x46, 0x42, 0x77, 0x4d, 0x49, 0x42, 0x67, 0x67, 0x72, 0x42, 0x67, 0x45, 0x46, 0x42, 0x51, 0x63, 0x44, 0x43, 0x54, 0x41, 0x4e, 0x0a, 0x42, 0x67, 0x6b, 0x71, 0x68, 0x6b, 0x69, 0x47, 0x39, 0x77, 0x30, 0x42, 0x41, 0x51, 0x73, 0x46, 0x41, 0x41, 0x4f, 0x43, 0x41, 0x51, 0x45, 0x41, 0x46, 0x6d, 0x34, 0x37, 0x47, 0x55, 0x70, 0x50, 0x57, 0x35, 0x2b, 0x37, 0x69, 0x46, 0x74, 0x69, 0x6c, 0x6f, 0x6b, 0x35, 0x32, 0x49, 0x6f, 0x54, 0x57, 0x72, 0x74, 0x46, 0x67, 0x32, 0x79, 0x69, 0x36, 0x6b, 0x49, 0x32, 0x69, 0x52, 0x4e, 0x51, 0x0a, 0x4b, 0x75, 0x67, 0x48, 0x55, 0x49, 0x4f, 0x34, 0x4b, 0x53, 0x71, 0x4a, 0x56, 0x42, 0x50, 0x38, 0x61, 0x4b, 0x4f, 0x61, 0x54, 0x5a, 0x47, 0x45, 0x31, 0x4b, 0x4d, 0x68, 0x2f, 0x59, 0x6a, 0x68, 0x36, 0x71, 0x2f, 0x67, 0x50, 0x61, 0x6c, 0x67, 0x64, 0x2f, 0x38, 0x44, 0x6d, 0x72, 0x78, 0x53, 0x4a, 0x6d, 0x55, 0x78, 0x33, 0x62, 0x4e, 0x62, 0x38, 0x52, 0x59, 0x36, 0x70, 0x4b, 0x7a, 0x74, 0x0a, 0x5a, 0x64, 0x75, 0x53, 0x61, 0x53, 0x2b, 0x57, 0x55, 0x30, 0x59, 0x74, 0x2b, 0x6c, 0x47, 0x35, 0x76, 0x56, 0x67, 0x61, 0x70, 0x48, 0x45, 0x71, 0x36, 0x79, 0x71, 0x4c, 0x62, 0x65, 0x56, 0x78, 0x51, 0x4c, 0x75, 0x62, 0x54, 0x69, 0x6e, 0x4f, 0x66, 0x56, 0x56, 0x5a, 0x58, 0x79, 0x45, 0x43, 0x59, 0x47, 0x4d, 0x73, 0x59, 0x71, 0x65, 0x6e, 0x4a, 0x6a, 0x4e, 0x63, 0x62, 0x49, 0x5a, 0x4e, 0x0a, 0x79, 0x4d, 0x75, 0x72, 0x46, 0x63, 0x67, 0x30, 0x34, 0x36, 0x4f, 0x34, 0x59, 0x79, 0x68, 0x56, 0x79, 0x71, 0x53, 0x69, 0x74, 0x43, 0x59, 0x37, 0x68, 0x2f, 0x65, 0x71, 0x67, 0x6b, 0x50, 0x4a, 0x51, 0x30, 0x68, 0x6b, 0x70, 0x39, 0x45, 0x64, 0x51, 0x77, 0x62, 0x6e, 0x38, 0x56, 0x6c, 0x66, 0x78, 0x64, 0x42, 0x58, 0x77, 0x51, 0x34, 0x4e, 0x48, 0x4b, 0x30, 0x4a, 0x56, 0x46, 0x2f, 0x33, 0x0a, 0x71, 0x48, 0x61, 0x68, 0x4e, 0x48, 0x4f, 0x35, 0x64, 0x62, 0x4a, 0x5a, 0x57, 0x59, 0x41, 0x62, 0x42, 0x44, 0x70, 0x32, 0x51, 0x45, 0x53, 0x70, 0x76, 0x6f, 0x2b, 0x38, 0x33, 0x6c, 0x68, 0x34, 0x64, 0x6e, 0x58, 0x6a, 0x46, 0x58, 0x4d, 0x43, 0x48, 0x76, 0x52, 0x68, 0x35, 0x31, 0x79, 0x2f, 0x54, 0x71, 0x79, 0x42, 0x34, 0x56, 0x76, 0x72, 0x52, 0x4b, 0x49, 0x4b, 0x74, 0x54, 0x6f, 0x7a, 0x0a, 0x5a, 0x6a, 0x48, 0x59, 0x49, 0x63, 0x62, 0x6a, 0x76, 0x53, 0x58, 0x4d, 0x7a, 0x61, 0x44, 0x50, 0x6a, 0x50, 0x63, 0x5a, 0x47, 0x6a, 0x42, 0x4a, 0x6c, 0x47, 0x36, 0x43, 0x76, 0x44, 0x34, 0x4c, 0x6d, 0x59, 0x7a, 0x72, 0x6b, 0x48, 0x34, 0x31, 0x63, 0x7a, 0x72, 0x34, 0x57, 0x41, 0x3d, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a,])
- });
- return [4 /*yield*/, api.AddCa(in_rpc_hub_add_ca)];
- case 1:
- out_rpc_hub_add_ca = _a.sent();
- console.log(out_rpc_hub_add_ca);
- console.log("End: Test_AddCa");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumCa', Enumerate CA(Certificate Authority) in the hub */
- function Test_EnumCa() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub_enum_ca, out_rpc_hub_enum_ca;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumCa");
- in_rpc_hub_enum_ca = new VPN.VpnRpcHubEnumCA({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumCa(in_rpc_hub_enum_ca)];
- case 1:
- out_rpc_hub_enum_ca = _a.sent();
- console.log(out_rpc_hub_enum_ca);
- console.log("End: Test_EnumCa");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_hub_enum_ca];
- }
- });
- });
- }
- /** API test for 'GetCa', Get CA(Certificate Authority) setting from the hub */
- function Test_GetCa(key) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub_get_ca, out_rpc_hub_get_ca;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetCa");
- in_rpc_hub_get_ca = new VPN.VpnRpcHubGetCA({
- HubName_str: hub_name,
- Key_u32: key
- });
- return [4 /*yield*/, api.GetCa(in_rpc_hub_get_ca)];
- case 1:
- out_rpc_hub_get_ca = _a.sent();
- console.log(out_rpc_hub_get_ca);
- console.log("End: Test_GetCa");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteCa', Delete a CA(Certificate Authority) setting from the hub */
- function Test_DeleteCa(key) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub_delete_ca, out_rpc_hub_delete_ca;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteCa");
- in_rpc_hub_delete_ca = new VPN.VpnRpcHubDeleteCA({
- HubName_str: hub_name,
- Key_u32: key
- });
- return [4 /*yield*/, api.DeleteCa(in_rpc_hub_delete_ca)];
- case 1:
- out_rpc_hub_delete_ca = _a.sent();
- console.log(out_rpc_hub_delete_ca);
- console.log("End: Test_DeleteCa");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetLinkOnline', Make a link into on-line */
- function Test_SetLinkOnline() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_link, out_rpc_link;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetLinkOnline");
- in_rpc_link = new VPN.VpnRpcLink({
- HubName_str: hub_name,
- AccountName_utf: "linktest"
- });
- return [4 /*yield*/, api.SetLinkOnline(in_rpc_link)];
- case 1:
- out_rpc_link = _a.sent();
- console.log(out_rpc_link);
- console.log("End: Test_SetLinkOnline");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetLinkOffline', Make a link into off-line */
- function Test_SetLinkOffline() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_link, out_rpc_link;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetLinkOffline");
- in_rpc_link = new VPN.VpnRpcLink({
- HubName_str: hub_name,
- AccountName_utf: "linktest"
- });
- return [4 /*yield*/, api.SetLinkOffline(in_rpc_link)];
- case 1:
- out_rpc_link = _a.sent();
- console.log(out_rpc_link);
- console.log("End: Test_SetLinkOffline");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteLink', Delete a link */
- function Test_DeleteLink() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_link, out_rpc_link;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteLink");
- in_rpc_link = new VPN.VpnRpcLink({
- HubName_str: hub_name,
- AccountName_utf: "linktest2"
- });
- return [4 /*yield*/, api.DeleteLink(in_rpc_link)];
- case 1:
- out_rpc_link = _a.sent();
- console.log(out_rpc_link);
- console.log("End: Test_DeleteLink");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'RenameLink', Rename link (cascade connection) */
- function Test_RenameLink() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_rename_link, out_rpc_rename_link;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_RenameLink");
- in_rpc_rename_link = new VPN.VpnRpcRenameLink({
- HubName_str: hub_name,
- OldAccountName_utf: "linktest",
- NewAccountName_utf: "linktest2"
- });
- return [4 /*yield*/, api.RenameLink(in_rpc_rename_link)];
- case 1:
- out_rpc_rename_link = _a.sent();
- console.log(out_rpc_rename_link);
- console.log("End: Test_RenameLink");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'CreateLink', Create a new link(cascade) */
- function Test_CreateLink() {
- return __awaiter(this, void 0, void 0, function () {
- var _a, in_rpc_create_link, out_rpc_create_link;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- console.log("Begin: Test_CreateLink");
- in_rpc_create_link = new VPN.VpnRpcCreateLink((_a = {
- HubName_Ex_str: hub_name,
- CheckServerCert_bool: false,
- AccountName_utf: "linktest",
- Hostname_str: "1.2.3.4",
- Port_u32: 443,
- ProxyType_u32: 0,
- HubName_str: "ABC",
- MaxConnection_u32: 16,
- UseEncrypt_bool: true,
- UseCompress_bool: false,
- HalfConnection_bool: true,
- AdditionalConnectionInterval_u32: 2,
- ConnectionDisconnectSpan_u32: 24,
- AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword,
- Username_str: "181012",
- PlainPassword_str: "microsoft",
- HashedPassword_bin: new Uint8Array([]),
- ClientX_bin: new Uint8Array([]),
- ClientK_bin: new Uint8Array([])
- },
- _a["policy:DHCPFilter_bool"] = true,
- _a["policy:DHCPNoServer_bool"] = true,
- _a["policy:DHCPForce_bool"] = true,
- _a.SecPol_CheckMac_bool = true,
- _a.SecPol_CheckIP_bool = true,
- _a["policy:ArpDhcpOnly_bool"] = true,
- _a["policy:PrivacyFilter_bool"] = true,
- _a["policy:NoServer_bool"] = true,
- _a["policy:NoBroadcastLimiter_bool"] = true,
- _a["policy:MaxMac_u32"] = 32,
- _a["policy:MaxIP_u32"] = 64,
- _a["policy:MaxUpload_u32"] = 960000,
- _a["policy:MaxDownload_u32"] = 1280000,
- _a["policy:RSandRAFilter_bool"] = true,
- _a.SecPol_RAFilter_bool = true,
- _a["policy:DHCPv6Filter_bool"] = true,
- _a["policy:DHCPv6NoServer_bool"] = true,
- _a.SecPol_CheckIPv6_bool = true,
- _a["policy:NoServerV6_bool"] = true,
- _a["policy:MaxIPv6_u32"] = 127,
- _a["policy:FilterIPv4_bool"] = true,
- _a["policy:FilterIPv6_bool"] = true,
- _a["policy:FilterNonIP_bool"] = true,
- _a["policy:NoIPv6DefaultRouterInRA_bool"] = true,
- _a["policy:VLanId_u32"] = 123,
- _a["policy:Ver3_bool"] = true,
- _a));
- return [4 /*yield*/, api.CreateLink(in_rpc_create_link)];
- case 1:
- out_rpc_create_link = _b.sent();
- console.log(out_rpc_create_link);
- console.log("End: Test_CreateLink");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetLink', Get link configuration */
- function Test_GetLink() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_create_link, out_rpc_create_link;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetLink");
- in_rpc_create_link = new VPN.VpnRpcCreateLink({
- HubName_Ex_str: hub_name,
- AccountName_utf: "linktest"
- });
- return [4 /*yield*/, api.GetLink(in_rpc_create_link)];
- case 1:
- out_rpc_create_link = _a.sent();
- console.log(out_rpc_create_link);
- console.log("End: Test_GetLink");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetLink', Set link configuration */
- function Test_SetLink() {
- return __awaiter(this, void 0, void 0, function () {
- var _a, in_rpc_create_link, out_rpc_create_link;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- console.log("Begin: Test_SetLink");
- in_rpc_create_link = new VPN.VpnRpcCreateLink((_a = {
- HubName_Ex_str: hub_name,
- CheckServerCert_bool: false,
- AccountName_utf: "linktest",
- Hostname_str: "1.2.3.4",
- Port_u32: 443,
- ProxyType_u32: 0,
- HubName_str: "ABC",
- MaxConnection_u32: 16,
- UseEncrypt_bool: true,
- UseCompress_bool: false,
- HalfConnection_bool: true,
- AdditionalConnectionInterval_u32: 2,
- ConnectionDisconnectSpan_u32: 24,
- AuthType_u32: VPN.VpnRpcClientAuthType.PlainPassword,
- Username_str: "181012",
- PlainPassword_str: "microsoft",
- HashedPassword_bin: new Uint8Array([]),
- ClientX_bin: new Uint8Array([]),
- ClientK_bin: new Uint8Array([])
- },
- _a["policy:DHCPFilter_bool"] = true,
- _a["policy:DHCPNoServer_bool"] = true,
- _a["policy:DHCPForce_bool"] = true,
- _a.SecPol_CheckMac_bool = true,
- _a.SecPol_CheckIP_bool = true,
- _a["policy:ArpDhcpOnly_bool"] = true,
- _a["policy:PrivacyFilter_bool"] = true,
- _a["policy:NoServer_bool"] = true,
- _a["policy:NoBroadcastLimiter_bool"] = true,
- _a["policy:MaxMac_u32"] = 32,
- _a["policy:MaxIP_u32"] = 64,
- _a["policy:MaxUpload_u32"] = 960000,
- _a["policy:MaxDownload_u32"] = 1280000,
- _a["policy:RSandRAFilter_bool"] = true,
- _a.SecPol_RAFilter_bool = true,
- _a["policy:DHCPv6Filter_bool"] = true,
- _a["policy:DHCPv6NoServer_bool"] = true,
- _a.SecPol_CheckIPv6_bool = true,
- _a["policy:NoServerV6_bool"] = true,
- _a["policy:MaxIPv6_u32"] = 127,
- _a["policy:FilterIPv4_bool"] = true,
- _a["policy:FilterIPv6_bool"] = true,
- _a["policy:FilterNonIP_bool"] = true,
- _a["policy:NoIPv6DefaultRouterInRA_bool"] = true,
- _a["policy:VLanId_u32"] = 123,
- _a["policy:Ver3_bool"] = true,
- _a));
- return [4 /*yield*/, api.SetLink(in_rpc_create_link)];
- case 1:
- out_rpc_create_link = _b.sent();
- console.log(out_rpc_create_link);
- console.log("End: Test_SetLink");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumLink', Enumerate links */
- function Test_EnumLink() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_link, out_rpc_enum_link;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumLink");
- in_rpc_enum_link = new VPN.VpnRpcEnumLink({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumLink(in_rpc_enum_link)];
- case 1:
- out_rpc_enum_link = _a.sent();
- console.log(out_rpc_enum_link);
- console.log("End: Test_EnumLink");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_link];
- }
- });
- });
- }
- /** API test for 'GetLinkStatus', Get link status */
- function Test_GetLinkStatus(name) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_link_status, out_rpc_link_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetLinkStatus");
- in_rpc_link_status = new VPN.VpnRpcLinkStatus({
- HubName_Ex_str: hub_name,
- AccountName_utf: name
- });
- return [4 /*yield*/, api.GetLinkStatus(in_rpc_link_status)];
- case 1:
- out_rpc_link_status = _a.sent();
- console.log(out_rpc_link_status);
- console.log("End: Test_GetLinkStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'AddAccess', Add access list entry */
- function Test_AddAccess() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_add_access_ipv4, out_rpc_add_access_ipv4, in_rpc_add_access_ipv6, out_rpc_add_access_ipv6;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddAccess");
- in_rpc_add_access_ipv4 = new VPN.VpnRpcAddAccess({
- HubName_str: hub_name,
- AccessListSingle: [new VPN.VpnAccess({
- Note_utf: "IPv4 Test",
- Active_bool: true,
- Priority_u32: 100,
- Discard_bool: true,
- IsIPv6_bool: false,
- SrcIpAddress_ip: "192.168.0.0",
- SrcSubnetMask_ip: "255.255.255.0",
- DestIpAddress_ip: "10.0.0.0",
- DestSubnetMask_ip: "255.255.0.0",
- Protocol_u32: VPN.VpnIpProtocolNumber.TCP,
- SrcPortStart_u32: 123,
- SrcPortEnd_u32: 456,
- DestPortStart_u32: 555,
- DestPortEnd_u32: 666,
- SrcUsername_str: "dnobori",
- DestUsername_str: "nekosan",
- CheckSrcMac_bool: true,
- SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]),
- SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]),
- CheckTcpState_bool: true,
- Established_bool: true,
- Delay_u32: 10,
- Jitter_u32: 20,
- Loss_u32: 30,
- RedirectUrl_str: "aho"
- }),]
- });
- return [4 /*yield*/, api.AddAccess(in_rpc_add_access_ipv4)];
- case 1:
- out_rpc_add_access_ipv4 = _a.sent();
- in_rpc_add_access_ipv6 = new VPN.VpnRpcAddAccess({
- HubName_str: hub_name,
- AccessListSingle: [new VPN.VpnAccess({
- Note_utf: "IPv6 Test",
- Active_bool: true,
- Priority_u32: 100,
- Discard_bool: true,
- IsIPv6_bool: true,
- SrcIpAddress6_bin: new Uint8Array([0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]),
- SrcSubnetMask6_bin: new Uint8Array([0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]),
- Protocol_u32: VPN.VpnIpProtocolNumber.UDP,
- SrcPortStart_u32: 123,
- SrcPortEnd_u32: 456,
- DestPortStart_u32: 555,
- DestPortEnd_u32: 666,
- SrcUsername_str: "dnobori",
- DestUsername_str: "nekosan",
- CheckSrcMac_bool: true,
- SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]),
- SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]),
- CheckTcpState_bool: true,
- Established_bool: true,
- Delay_u32: 10,
- Jitter_u32: 20,
- Loss_u32: 30,
- RedirectUrl_str: "aho"
- }),]
- });
- return [4 /*yield*/, api.AddAccess(in_rpc_add_access_ipv6)];
- case 2:
- out_rpc_add_access_ipv6 = _a.sent();
- console.log("End: Test_AddAccess");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteAccess', Delete access list entry */
- function Test_DeleteAccess() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_access, out_rpc_delete_access;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteAccess");
- in_rpc_delete_access = new VPN.VpnRpcDeleteAccess({
- HubName_str: hub_name,
- Id_u32: 1
- });
- return [4 /*yield*/, api.DeleteAccess(in_rpc_delete_access)];
- case 1:
- out_rpc_delete_access = _a.sent();
- console.log(out_rpc_delete_access);
- console.log("End: Test_DeleteAccess");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumAccess', Get access list */
- function Test_EnumAccess() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_access_list, out_rpc_enum_access_list;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumAccess");
- in_rpc_enum_access_list = new VPN.VpnRpcEnumAccessList({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumAccess(in_rpc_enum_access_list)];
- case 1:
- out_rpc_enum_access_list = _a.sent();
- console.log(out_rpc_enum_access_list);
- console.log("End: Test_EnumAccess");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetAccessList', Set access list */
- function Test_SetAccessList() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_access_list, out_rpc_enum_access_list;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetAccessList");
- in_rpc_enum_access_list = new VPN.VpnRpcEnumAccessList({
- HubName_str: hub_name,
- AccessList: [new VPN.VpnAccess({
- Note_utf: "IPv4 Test 2",
- Active_bool: true,
- Priority_u32: 100,
- Discard_bool: true,
- IsIPv6_bool: false,
- SrcIpAddress_ip: "192.168.0.0",
- SrcSubnetMask_ip: "255.255.255.0",
- DestIpAddress_ip: "10.0.0.0",
- DestSubnetMask_ip: "255.255.0.0",
- Protocol_u32: VPN.VpnIpProtocolNumber.TCP,
- SrcPortStart_u32: 123,
- SrcPortEnd_u32: 456,
- DestPortStart_u32: 555,
- DestPortEnd_u32: 666,
- SrcUsername_str: "dnobori",
- DestUsername_str: "nekosan",
- CheckSrcMac_bool: true,
- SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]),
- SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]),
- CheckTcpState_bool: true,
- Established_bool: true,
- Delay_u32: 10,
- Jitter_u32: 20,
- Loss_u32: 30,
- RedirectUrl_str: "aho"
- }), new VPN.VpnAccess({
- Note_utf: "IPv6 Test 2",
- Active_bool: true,
- Priority_u32: 100,
- Discard_bool: true,
- IsIPv6_bool: true,
- SrcIpAddress6_bin: new Uint8Array([0x20, 0x01, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]),
- SrcSubnetMask6_bin: new Uint8Array([0xff, 0xff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,]),
- Protocol_u32: VPN.VpnIpProtocolNumber.UDP,
- SrcPortStart_u32: 123,
- SrcPortEnd_u32: 456,
- DestPortStart_u32: 555,
- DestPortEnd_u32: 666,
- SrcUsername_str: "dnobori",
- DestUsername_str: "nekosan",
- CheckSrcMac_bool: true,
- SrcMacAddress_bin: new Uint8Array([1, 2, 3, 0, 0, 0,]),
- SrcMacMask_bin: new Uint8Array([255, 255, 255, 0, 0, 0,]),
- CheckTcpState_bool: true,
- Established_bool: true,
- Delay_u32: 10,
- Jitter_u32: 20,
- Loss_u32: 30,
- RedirectUrl_str: "aho"
- }),]
- });
- return [4 /*yield*/, api.SetAccessList(in_rpc_enum_access_list)];
- case 1:
- out_rpc_enum_access_list = _a.sent();
- console.log(out_rpc_enum_access_list);
- console.log("End: Test_SetAccessList");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'CreateUser', Create a user */
- function Test_CreateUser() {
- return __awaiter(this, void 0, void 0, function () {
- var _a, in_rpc_set_user, out_rpc_set_user;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- console.log("Begin: Test_CreateUser");
- in_rpc_set_user = new VPN.VpnRpcSetUser((_a = {
- HubName_str: hub_name,
- Name_str: "test1",
- Realname_utf: "Cat man",
- Note_utf: "Hey!!!",
- AuthType_u32: VPN.VpnRpcUserAuthType.Password,
- Auth_Password_str: "microsoft",
- UserX_bin: new Uint8Array([]),
- Serial_bin: new Uint8Array([]),
- CommonName_utf: "",
- RadiusUsername_utf: "",
- NtUsername_utf: "",
- ExpireTime_dt: new Date(2019, 1, 1),
- UsePolicy_bool: true
- },
- _a["policy:Access_bool"] = true,
- _a["policy:DHCPFilter_bool"] = false,
- _a["policy:DHCPNoServer_bool"] = true,
- _a["policy:DHCPForce_bool"] = false,
- _a["policy:NoBridge_bool"] = false,
- _a["policy:NoRouting_bool"] = false,
- _a["policy:CheckMac_bool"] = false,
- _a["policy:CheckIP_bool"] = false,
- _a["policy:ArpDhcpOnly_bool"] = false,
- _a["policy:PrivacyFilter_bool"] = false,
- _a["policy:NoServer_bool"] = false,
- _a["policy:NoBroadcastLimiter_bool"] = false,
- _a["policy:MonitorPort_bool"] = false,
- _a["policy:MaxConnection_u32"] = 32,
- _a["policy:TimeOut_u32"] = 15,
- _a["policy:MaxMac_u32"] = 1000,
- _a["policy:MaxIP_u32"] = 1000,
- _a["policy:MaxUpload_u32"] = 1000000000,
- _a["policy:MaxDownload_u32"] = 1000000000,
- _a["policy:FixPassword_bool"] = false,
- _a["policy:MultiLogins_u32"] = 1000,
- _a["policy:NoQoS_bool"] = false,
- _a["policy:RSandRAFilter_bool"] = false,
- _a["policy:RAFilter_bool"] = false,
- _a["policy:DHCPv6Filter_bool"] = false,
- _a["policy:DHCPv6NoServer_bool"] = false,
- _a["policy:NoRoutingV6_bool"] = false,
- _a["policy:CheckIPv6_bool"] = false,
- _a["policy:NoServerV6_bool"] = false,
- _a["policy:MaxIPv6_u32"] = 1234,
- _a["policy:NoSavePassword_bool"] = false,
- _a["policy:AutoDisconnect_u32"] = 0,
- _a["policy:FilterIPv4_bool"] = false,
- _a["policy:FilterIPv6_bool"] = false,
- _a["policy:FilterNonIP_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRA_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false,
- _a["policy:VLanId_u32"] = 0,
- _a["policy:Ver3_bool"] = true,
- _a));
- return [4 /*yield*/, api.CreateUser(in_rpc_set_user)];
- case 1:
- out_rpc_set_user = _b.sent();
- console.log("End: Test_CreateUser");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetUser', Set user setting */
- function Test_SetUser() {
- return __awaiter(this, void 0, void 0, function () {
- var _a, in_rpc_set_user, out_rpc_set_user;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- console.log("Begin: Test_SetUser");
- in_rpc_set_user = new VPN.VpnRpcSetUser((_a = {
- HubName_str: hub_name,
- Name_str: "test1",
- Realname_utf: "Cat man",
- Note_utf: "Hey!!!",
- GroupName_str: "group1",
- AuthType_u32: VPN.VpnRpcUserAuthType.Anonymous,
- Auth_Password_str: "",
- UserX_bin: new Uint8Array([]),
- Serial_bin: new Uint8Array([]),
- CommonName_utf: "",
- RadiusUsername_utf: "",
- NtUsername_utf: "",
- ExpireTime_dt: new Date(2019, 1, 1),
- UsePolicy_bool: true
- },
- _a["policy:Access_bool"] = true,
- _a["policy:DHCPFilter_bool"] = false,
- _a["policy:DHCPNoServer_bool"] = true,
- _a["policy:DHCPForce_bool"] = false,
- _a["policy:NoBridge_bool"] = false,
- _a["policy:NoRouting_bool"] = false,
- _a["policy:CheckMac_bool"] = false,
- _a["policy:CheckIP_bool"] = false,
- _a["policy:ArpDhcpOnly_bool"] = false,
- _a["policy:PrivacyFilter_bool"] = false,
- _a["policy:NoServer_bool"] = false,
- _a["policy:NoBroadcastLimiter_bool"] = false,
- _a["policy:MonitorPort_bool"] = false,
- _a["policy:MaxConnection_u32"] = 32,
- _a["policy:TimeOut_u32"] = 15,
- _a["policy:MaxMac_u32"] = 1000,
- _a["policy:MaxIP_u32"] = 1000,
- _a["policy:MaxUpload_u32"] = 1000000000,
- _a["policy:MaxDownload_u32"] = 1000000000,
- _a["policy:FixPassword_bool"] = false,
- _a["policy:MultiLogins_u32"] = 1000,
- _a["policy:NoQoS_bool"] = false,
- _a["policy:RSandRAFilter_bool"] = false,
- _a["policy:RAFilter_bool"] = false,
- _a["policy:DHCPv6Filter_bool"] = false,
- _a["policy:DHCPv6NoServer_bool"] = false,
- _a["policy:NoRoutingV6_bool"] = false,
- _a["policy:CheckIPv6_bool"] = false,
- _a["policy:NoServerV6_bool"] = false,
- _a["policy:MaxIPv6_u32"] = 1234,
- _a["policy:NoSavePassword_bool"] = false,
- _a["policy:AutoDisconnect_u32"] = 0,
- _a["policy:FilterIPv4_bool"] = false,
- _a["policy:FilterIPv6_bool"] = false,
- _a["policy:FilterNonIP_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRA_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false,
- _a["policy:VLanId_u32"] = 0,
- _a["policy:Ver3_bool"] = true,
- _a));
- return [4 /*yield*/, api.SetUser(in_rpc_set_user)];
- case 1:
- out_rpc_set_user = _b.sent();
- console.log("End: Test_SetUser");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetUser', Get user setting */
- function Test_GetUser() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_set_user, out_rpc_set_user;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetUser");
- in_rpc_set_user = new VPN.VpnRpcSetUser({
- HubName_str: hub_name,
- Name_str: "test1"
- });
- return [4 /*yield*/, api.GetUser(in_rpc_set_user)];
- case 1:
- out_rpc_set_user = _a.sent();
- console.log(out_rpc_set_user);
- console.log("End: Test_GetUser");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteUser', Delete a user */
- function Test_DeleteUser() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_user, out_rpc_delete_user;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteUser");
- in_rpc_delete_user = new VPN.VpnRpcDeleteUser({
- HubName_str: hub_name,
- Name_str: "test1"
- });
- return [4 /*yield*/, api.DeleteUser(in_rpc_delete_user)];
- case 1:
- out_rpc_delete_user = _a.sent();
- console.log("End: Test_DeleteUser");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumUser', Enumerate users */
- function Test_EnumUser() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_user, out_rpc_enum_user;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumUser");
- in_rpc_enum_user = new VPN.VpnRpcEnumUser({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumUser(in_rpc_enum_user)];
- case 1:
- out_rpc_enum_user = _a.sent();
- console.log(out_rpc_enum_user);
- console.log("End: Test_EnumUser");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'CreateGroup', Create a group */
- function Test_CreateGroup() {
- return __awaiter(this, void 0, void 0, function () {
- var _a, in_rpc_set_group, out_rpc_set_group;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- console.log("Begin: Test_CreateGroup");
- in_rpc_set_group = new VPN.VpnRpcSetGroup((_a = {
- HubName_str: hub_name,
- Name_str: "group1",
- Realname_utf: "Cat group",
- Note_utf: "This is it! This is it!!",
- UsePolicy_bool: true
- },
- _a["policy:Access_bool"] = true,
- _a["policy:DHCPFilter_bool"] = false,
- _a["policy:DHCPNoServer_bool"] = true,
- _a["policy:DHCPForce_bool"] = false,
- _a["policy:NoBridge_bool"] = false,
- _a["policy:NoRouting_bool"] = false,
- _a["policy:CheckMac_bool"] = false,
- _a["policy:CheckIP_bool"] = false,
- _a["policy:ArpDhcpOnly_bool"] = false,
- _a["policy:PrivacyFilter_bool"] = false,
- _a["policy:NoServer_bool"] = false,
- _a["policy:NoBroadcastLimiter_bool"] = false,
- _a["policy:MonitorPort_bool"] = false,
- _a["policy:MaxConnection_u32"] = 32,
- _a["policy:TimeOut_u32"] = 15,
- _a["policy:MaxMac_u32"] = 1000,
- _a["policy:MaxIP_u32"] = 1000,
- _a["policy:MaxUpload_u32"] = 1000000000,
- _a["policy:MaxDownload_u32"] = 1000000000,
- _a["policy:FixPassword_bool"] = false,
- _a["policy:MultiLogins_u32"] = 1000,
- _a["policy:NoQoS_bool"] = false,
- _a["policy:RSandRAFilter_bool"] = false,
- _a["policy:RAFilter_bool"] = false,
- _a["policy:DHCPv6Filter_bool"] = false,
- _a["policy:DHCPv6NoServer_bool"] = false,
- _a["policy:NoRoutingV6_bool"] = false,
- _a["policy:CheckIPv6_bool"] = false,
- _a["policy:NoServerV6_bool"] = false,
- _a["policy:MaxIPv6_u32"] = 1234,
- _a["policy:NoSavePassword_bool"] = false,
- _a["policy:AutoDisconnect_u32"] = 0,
- _a["policy:FilterIPv4_bool"] = false,
- _a["policy:FilterIPv6_bool"] = false,
- _a["policy:FilterNonIP_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRA_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false,
- _a["policy:VLanId_u32"] = 0,
- _a["policy:Ver3_bool"] = true,
- _a));
- return [4 /*yield*/, api.CreateGroup(in_rpc_set_group)];
- case 1:
- out_rpc_set_group = _b.sent();
- console.log(out_rpc_set_group);
- console.log("End: Test_CreateGroup");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetGroup', Set group setting */
- function Test_SetGroup() {
- return __awaiter(this, void 0, void 0, function () {
- var _a, in_rpc_set_group, out_rpc_set_group;
- return __generator(this, function (_b) {
- switch (_b.label) {
- case 0:
- console.log("Begin: Test_SetGroup");
- in_rpc_set_group = new VPN.VpnRpcSetGroup((_a = {
- HubName_str: hub_name,
- Name_str: "group1",
- Realname_utf: "Cat group 2",
- Note_utf: "This is it! This is it!! 2",
- UsePolicy_bool: true
- },
- _a["policy:Access_bool"] = true,
- _a["policy:DHCPFilter_bool"] = false,
- _a["policy:DHCPNoServer_bool"] = true,
- _a["policy:DHCPForce_bool"] = false,
- _a["policy:NoBridge_bool"] = false,
- _a["policy:NoRouting_bool"] = false,
- _a["policy:CheckMac_bool"] = false,
- _a["policy:CheckIP_bool"] = false,
- _a["policy:ArpDhcpOnly_bool"] = false,
- _a["policy:PrivacyFilter_bool"] = false,
- _a["policy:NoServer_bool"] = false,
- _a["policy:NoBroadcastLimiter_bool"] = false,
- _a["policy:MonitorPort_bool"] = false,
- _a["policy:MaxConnection_u32"] = 32,
- _a["policy:TimeOut_u32"] = 15,
- _a["policy:MaxMac_u32"] = 1000,
- _a["policy:MaxIP_u32"] = 1000,
- _a["policy:MaxUpload_u32"] = 1000000000,
- _a["policy:MaxDownload_u32"] = 1000000000,
- _a["policy:FixPassword_bool"] = false,
- _a["policy:MultiLogins_u32"] = 1000,
- _a["policy:NoQoS_bool"] = false,
- _a["policy:RSandRAFilter_bool"] = false,
- _a["policy:RAFilter_bool"] = false,
- _a["policy:DHCPv6Filter_bool"] = false,
- _a["policy:DHCPv6NoServer_bool"] = false,
- _a["policy:NoRoutingV6_bool"] = false,
- _a["policy:CheckIPv6_bool"] = false,
- _a["policy:NoServerV6_bool"] = false,
- _a["policy:MaxIPv6_u32"] = 1234,
- _a["policy:NoSavePassword_bool"] = false,
- _a["policy:AutoDisconnect_u32"] = 0,
- _a["policy:FilterIPv4_bool"] = false,
- _a["policy:FilterIPv6_bool"] = false,
- _a["policy:FilterNonIP_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRA_bool"] = false,
- _a["policy:NoIPv6DefaultRouterInRAWhenIPv6_bool"] = false,
- _a["policy:VLanId_u32"] = 0,
- _a["policy:Ver3_bool"] = true,
- _a));
- return [4 /*yield*/, api.SetGroup(in_rpc_set_group)];
- case 1:
- out_rpc_set_group = _b.sent();
- console.log(out_rpc_set_group);
- console.log("End: Test_SetGroup");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetGroup', Get group information */
- function Test_GetGroup() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_set_group, out_rpc_set_group;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetGroup");
- in_rpc_set_group = new VPN.VpnRpcSetGroup({
- HubName_str: hub_name,
- Name_str: "group1"
- });
- return [4 /*yield*/, api.GetGroup(in_rpc_set_group)];
- case 1:
- out_rpc_set_group = _a.sent();
- console.log(out_rpc_set_group);
- console.log("End: Test_GetGroup");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteGroup', Delete a group */
- function Test_DeleteGroup() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_user, out_rpc_delete_user;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteGroup");
- in_rpc_delete_user = new VPN.VpnRpcDeleteUser({
- HubName_str: hub_name,
- Name_str: "group1"
- });
- return [4 /*yield*/, api.DeleteGroup(in_rpc_delete_user)];
- case 1:
- out_rpc_delete_user = _a.sent();
- console.log(out_rpc_delete_user);
- console.log("End: Test_DeleteGroup");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumGroup', Enumerate groups */
- function Test_EnumGroup() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_group, out_rpc_enum_group;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumGroup");
- in_rpc_enum_group = new VPN.VpnRpcEnumGroup({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumGroup(in_rpc_enum_group)];
- case 1:
- out_rpc_enum_group = _a.sent();
- console.log(out_rpc_enum_group);
- console.log("End: Test_EnumGroup");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumSession', Enumerate sessions */
- function Test_EnumSession() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_session, out_rpc_enum_session;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumSession");
- in_rpc_enum_session = new VPN.VpnRpcEnumSession({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumSession(in_rpc_enum_session)];
- case 1:
- out_rpc_enum_session = _a.sent();
- console.log(out_rpc_enum_session);
- console.log("End: Test_EnumSession");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_session];
- }
- });
- });
- }
- /** API test for 'GetSessionStatus', Get session status */
- function Test_GetSessionStatus(session_name) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_session_status, out_rpc_session_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetSessionStatus");
- in_rpc_session_status = new VPN.VpnRpcSessionStatus({
- HubName_str: hub_name,
- Name_str: session_name
- });
- return [4 /*yield*/, api.GetSessionStatus(in_rpc_session_status)];
- case 1:
- out_rpc_session_status = _a.sent();
- console.log(out_rpc_session_status);
- console.log("End: Test_GetSessionStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteSession', Delete a session */
- function Test_DeleteSession(session_id) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_session, out_rpc_delete_session;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteSession");
- in_rpc_delete_session = new VPN.VpnRpcDeleteSession({
- HubName_str: hub_name,
- Name_str: session_id
- });
- return [4 /*yield*/, api.DeleteSession(in_rpc_delete_session)];
- case 1:
- out_rpc_delete_session = _a.sent();
- console.log(out_rpc_delete_session);
- console.log("End: Test_DeleteSession");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumMacTable', Get MAC address table */
- function Test_EnumMacTable() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_mac_table, out_rpc_enum_mac_table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumMacTable");
- in_rpc_enum_mac_table = new VPN.VpnRpcEnumMacTable({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumMacTable(in_rpc_enum_mac_table)];
- case 1:
- out_rpc_enum_mac_table = _a.sent();
- console.log(out_rpc_enum_mac_table);
- console.log("End: Test_EnumMacTable");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_mac_table];
- }
- });
- });
- }
- /** API test for 'DeleteMacTable', Delete MAC address table entry */
- function Test_DeleteMacTable(key32) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_table, out_rpc_delete_table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteMacTable");
- in_rpc_delete_table = new VPN.VpnRpcDeleteTable({
- HubName_str: hub_name,
- Key_u32: key32
- });
- return [4 /*yield*/, api.DeleteMacTable(in_rpc_delete_table)];
- case 1:
- out_rpc_delete_table = _a.sent();
- console.log("End: Test_DeleteMacTable");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumIpTable', Get IP address table */
- function Test_EnumIpTable() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_ip_table, out_rpc_enum_ip_table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumIpTable");
- in_rpc_enum_ip_table = new VPN.VpnRpcEnumIpTable({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumIpTable(in_rpc_enum_ip_table)];
- case 1:
- out_rpc_enum_ip_table = _a.sent();
- console.log(out_rpc_enum_ip_table);
- console.log("End: Test_EnumIpTable");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_ip_table];
- }
- });
- });
- }
- /** API test for 'DeleteIpTable', Delete IP address table entry */
- function Test_DeleteIpTable(key32) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_delete_table, out_rpc_delete_table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteIpTable");
- in_rpc_delete_table = new VPN.VpnRpcDeleteTable({
- HubName_str: hub_name,
- Key_u32: key32
- });
- return [4 /*yield*/, api.DeleteIpTable(in_rpc_delete_table)];
- case 1:
- out_rpc_delete_table = _a.sent();
- console.log(out_rpc_delete_table);
- console.log("End: Test_DeleteIpTable");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetKeep', Set keep-alive function setting */
- function Test_SetKeep() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_keep, out_rpc_keep;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetKeep");
- in_rpc_keep = new VPN.VpnRpcKeep({
- UseKeepConnect_bool: true,
- KeepConnectHost_str: "www.softether.org",
- KeepConnectPort_u32: 123,
- KeepConnectProtocol_u32: VPN.VpnRpcKeepAliveProtocol.UDP,
- KeepConnectInterval_u32: 1
- });
- return [4 /*yield*/, api.SetKeep(in_rpc_keep)];
- case 1:
- out_rpc_keep = _a.sent();
- console.log(out_rpc_keep);
- console.log("End: Test_SetKeep");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetKeep', Get keep-alive function setting */
- function Test_GetKeep() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_keep, out_rpc_keep;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetKeep");
- in_rpc_keep = new VPN.VpnRpcKeep({});
- return [4 /*yield*/, api.GetKeep(in_rpc_keep)];
- case 1:
- out_rpc_keep = _a.sent();
- console.log(out_rpc_keep);
- console.log("End: Test_GetKeep");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnableSecureNAT', Enable SecureNAT function of the hub */
- function Test_EnableSecureNAT() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub, out_rpc_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnableSecureNAT");
- in_rpc_hub = new VPN.VpnRpcHub({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnableSecureNAT(in_rpc_hub)];
- case 1:
- out_rpc_hub = _a.sent();
- console.log(out_rpc_hub);
- console.log("End: Test_EnableSecureNAT");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DisableSecureNAT', Disable the SecureNAT function of the hub */
- function Test_DisableSecureNAT() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_hub, out_rpc_hub;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DisableSecureNAT");
- in_rpc_hub = new VPN.VpnRpcHub({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.DisableSecureNAT(in_rpc_hub)];
- case 1:
- out_rpc_hub = _a.sent();
- console.log(out_rpc_hub);
- console.log("End: Test_DisableSecureNAT");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetSecureNATOption', Set SecureNAT options */
- function Test_SetSecureNATOption() {
- return __awaiter(this, void 0, void 0, function () {
- var in_vh_option, out_vh_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetSecureNATOption");
- in_vh_option = new VPN.VpnVhOption({
- RpcHubName_str: hub_name,
- MacAddress_bin: new Uint8Array([0x00, 0xAC, 0x00, 0x11, 0x22, 0x33,]),
- Ip_ip: "10.0.0.254",
- Mask_ip: "255.255.255.0",
- UseNat_bool: true,
- Mtu_u32: 1200,
- NatTcpTimeout_u32: 100,
- NatUdpTimeout_u32: 50,
- UseDhcp_bool: true,
- DhcpLeaseIPStart_ip: "10.0.0.101",
- DhcpLeaseIPEnd_ip: "10.0.0.199",
- DhcpSubnetMask_ip: "255.255.255.0",
- DhcpExpireTimeSpan_u32: 3600,
- DhcpGatewayAddress_ip: "10.0.0.254",
- DhcpDnsServerAddress_ip: "10.0.0.254",
- DhcpDnsServerAddress2_ip: "8.8.8.8",
- DhcpDomainName_str: "lab.coe.ad.jp",
- SaveLog_bool: true,
- ApplyDhcpPushRoutes_bool: false,
- DhcpPushRoutes_str: ""
- });
- return [4 /*yield*/, api.SetSecureNATOption(in_vh_option)];
- case 1:
- out_vh_option = _a.sent();
- console.log(out_vh_option);
- console.log("End: Test_SetSecureNATOption");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetSecureNATOption', Get SecureNAT options */
- function Test_GetSecureNATOption() {
- return __awaiter(this, void 0, void 0, function () {
- var in_vh_option, out_vh_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetSecureNATOption");
- in_vh_option = new VPN.VpnVhOption({
- RpcHubName_str: hub_name
- });
- return [4 /*yield*/, api.GetSecureNATOption(in_vh_option)];
- case 1:
- out_vh_option = _a.sent();
- console.log(out_vh_option);
- console.log("End: Test_GetSecureNATOption");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumNAT', Enumerate NAT entries of the SecureNAT */
- function Test_EnumNAT() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_nat, out_rpc_enum_nat;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumNAT");
- in_rpc_enum_nat = new VPN.VpnRpcEnumNat({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumNAT(in_rpc_enum_nat)];
- case 1:
- out_rpc_enum_nat = _a.sent();
- console.log(out_rpc_enum_nat);
- console.log("End: Test_EnumNAT");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumDHCP', Enumerate DHCP entries */
- function Test_EnumDHCP() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_dhcp, out_rpc_enum_dhcp;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumDHCP");
- in_rpc_enum_dhcp = new VPN.VpnRpcEnumDhcp({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumDHCP(in_rpc_enum_dhcp)];
- case 1:
- out_rpc_enum_dhcp = _a.sent();
- console.log(out_rpc_enum_dhcp);
- console.log("End: Test_EnumDHCP");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetSecureNATStatus', Get status of the SecureNAT */
- function Test_GetSecureNATStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_nat_status, out_rpc_nat_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetSecureNATStatus");
- in_rpc_nat_status = new VPN.VpnRpcNatStatus({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetSecureNATStatus(in_rpc_nat_status)];
- case 1:
- out_rpc_nat_status = _a.sent();
- console.log(out_rpc_nat_status);
- console.log("End: Test_GetSecureNATStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumEthernet', Enumerate Ethernet devices */
- function Test_EnumEthernet() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_eth;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumEthernet");
- return [4 /*yield*/, api.EnumEthernet()];
- case 1:
- out_rpc_enum_eth = _a.sent();
- console.log(out_rpc_enum_eth);
- console.log("End: Test_EnumEthernet");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'AddLocalBridge', Add a new local bridge */
- function Test_AddLocalBridge() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_localbridge, out_rpc_localbridge;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddLocalBridge");
- in_rpc_localbridge = new VPN.VpnRpcLocalBridge({
- DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)",
- HubNameLB_str: hub_name
- });
- return [4 /*yield*/, api.AddLocalBridge(in_rpc_localbridge)];
- case 1:
- out_rpc_localbridge = _a.sent();
- console.log(out_rpc_localbridge);
- console.log("End: Test_AddLocalBridge");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteLocalBridge', Delete a local bridge */
- function Test_DeleteLocalBridge() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_localbridge, out_rpc_localbridge;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteLocalBridge");
- in_rpc_localbridge = new VPN.VpnRpcLocalBridge({
- DeviceName_str: "Intel(R) Ethernet Connection (2) I219-V (ID=3632031273)",
- HubNameLB_str: hub_name
- });
- return [4 /*yield*/, api.DeleteLocalBridge(in_rpc_localbridge)];
- case 1:
- out_rpc_localbridge = _a.sent();
- console.log(out_rpc_localbridge);
- console.log("End: Test_DeleteLocalBridge");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumLocalBridge', Enumerate local bridges */
- function Test_EnumLocalBridge() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_localbridge;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumLocalBridge");
- return [4 /*yield*/, api.EnumLocalBridge()];
- case 1:
- out_rpc_enum_localbridge = _a.sent();
- console.log(out_rpc_enum_localbridge);
- console.log("End: Test_EnumLocalBridge");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetBridgeSupport', Get availability to localbridge function */
- function Test_GetBridgeSupport() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_bridge_support;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetBridgeSupport");
- return [4 /*yield*/, api.GetBridgeSupport()];
- case 1:
- out_rpc_bridge_support = _a.sent();
- console.log(out_rpc_bridge_support);
- console.log("End: Test_GetBridgeSupport");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'RebootServer', Reboot server itself */
- function Test_RebootServer() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_test, out_rpc_test;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_RebootServer");
- in_rpc_test = new VPN.VpnRpcTest({});
- return [4 /*yield*/, api.RebootServer(in_rpc_test)];
- case 1:
- out_rpc_test = _a.sent();
- console.log(out_rpc_test);
- console.log("End: Test_RebootServer");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetCaps', Get capabilities */
- function Test_GetCaps() {
- return __awaiter(this, void 0, void 0, function () {
- var out_capslist;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetCaps");
- return [4 /*yield*/, api.GetCaps()];
- case 1:
- out_capslist = _a.sent();
- console.log(out_capslist);
- console.log("End: Test_GetCaps");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetConfig', Get configuration file stream */
- function Test_GetConfig() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_config;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetConfig");
- return [4 /*yield*/, api.GetConfig()];
- case 1:
- out_rpc_config = _a.sent();
- console.log(out_rpc_config);
- console.log("End: Test_GetConfig");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetConfig', Overwrite configuration file by specified data */
- function Test_SetConfig() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_config, out_rpc_config;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetConfig");
- in_rpc_config = new VPN.VpnRpcConfig({
- FileData_bin: new Uint8Array([0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,])
- });
- return [4 /*yield*/, api.SetConfig(in_rpc_config)];
- case 1:
- out_rpc_config = _a.sent();
- console.log("End: Test_SetConfig");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetDefaultHubAdminOptions', Get default hub administration options */
- function Test_GetDefaultHubAdminOptions() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_admin_option, out_rpc_admin_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetDefaultHubAdminOptions");
- in_rpc_admin_option = new VPN.VpnRpcAdminOption({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetDefaultHubAdminOptions(in_rpc_admin_option)];
- case 1:
- out_rpc_admin_option = _a.sent();
- console.log(out_rpc_admin_option);
- console.log("End: Test_GetDefaultHubAdminOptions");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHubAdminOptions', Get hub administration options */
- function Test_GetHubAdminOptions() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_admin_option, out_rpc_admin_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHubAdminOptions");
- in_rpc_admin_option = new VPN.VpnRpcAdminOption({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHubAdminOptions(in_rpc_admin_option)];
- case 1:
- out_rpc_admin_option = _a.sent();
- console.log(out_rpc_admin_option);
- console.log("End: Test_GetHubAdminOptions");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetHubAdminOptions', Set hub administration options */
- function Test_SetHubAdminOptions() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_admin_option, out_rpc_admin_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHubAdminOptions");
- in_rpc_admin_option = new VPN.VpnRpcAdminOption({
- HubName_str: hub_name,
- AdminOptionList: [new VPN.VpnAdminOption({
- Name_str: "no_securenat_enablenat",
- Value_u32: 1
- }),]
- });
- return [4 /*yield*/, api.SetHubAdminOptions(in_rpc_admin_option)];
- case 1:
- out_rpc_admin_option = _a.sent();
- console.log(out_rpc_admin_option);
- console.log("End: Test_SetHubAdminOptions");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHubExtOptions', Get hub extended options */
- function Test_GetHubExtOptions() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_admin_option, out_rpc_admin_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHubExtOptions");
- in_rpc_admin_option = new VPN.VpnRpcAdminOption({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHubExtOptions(in_rpc_admin_option)];
- case 1:
- out_rpc_admin_option = _a.sent();
- console.log(out_rpc_admin_option);
- console.log("End: Test_GetHubExtOptions");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetHubExtOptions', Set hub extended options */
- function Test_SetHubExtOptions() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_admin_option, out_rpc_admin_option;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHubExtOptions");
- in_rpc_admin_option = new VPN.VpnRpcAdminOption({
- HubName_str: hub_name,
- AdminOptionList: [new VPN.VpnAdminOption({
- Name_str: "SecureNAT_RandomizeAssignIp",
- Value_u32: 1
- }),]
- });
- return [4 /*yield*/, api.SetHubExtOptions(in_rpc_admin_option)];
- case 1:
- out_rpc_admin_option = _a.sent();
- console.log(out_rpc_admin_option);
- console.log("End: Test_SetHubExtOptions");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'AddL3Switch', Add a new virtual layer-3 switch */
- function Test_AddL3Switch() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3sw, out_rpc_l3sw;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddL3Switch");
- in_rpc_l3sw = new VPN.VpnRpcL3Sw({
- Name_str: "L3SW1"
- });
- return [4 /*yield*/, api.AddL3Switch(in_rpc_l3sw)];
- case 1:
- out_rpc_l3sw = _a.sent();
- console.log(out_rpc_l3sw);
- console.log("End: Test_AddL3Switch");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DelL3Switch', Delete a virtual layer-3 switch */
- function Test_DelL3Switch() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3sw, out_rpc_l3sw;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DelL3Switch");
- in_rpc_l3sw = new VPN.VpnRpcL3Sw({
- Name_str: "L3SW1"
- });
- return [4 /*yield*/, api.DelL3Switch(in_rpc_l3sw)];
- case 1:
- out_rpc_l3sw = _a.sent();
- console.log(out_rpc_l3sw);
- console.log("End: Test_DelL3Switch");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumL3Switch', Enumerate virtual layer-3 switches */
- function Test_EnumL3Switch() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_l3sw;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumL3Switch");
- return [4 /*yield*/, api.EnumL3Switch()];
- case 1:
- out_rpc_enum_l3sw = _a.sent();
- console.log(out_rpc_enum_l3sw);
- console.log("End: Test_EnumL3Switch");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'StartL3Switch', Start a virtual layer-3 switch */
- function Test_StartL3Switch() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3sw, out_rpc_l3sw;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_StartL3Switch");
- in_rpc_l3sw = new VPN.VpnRpcL3Sw({
- Name_str: "L3SW1"
- });
- return [4 /*yield*/, api.StartL3Switch(in_rpc_l3sw)];
- case 1:
- out_rpc_l3sw = _a.sent();
- console.log(out_rpc_l3sw);
- console.log("End: Test_StartL3Switch");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'StopL3Switch', Stop a virtual layer-3 switch */
- function Test_StopL3Switch() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3sw, out_rpc_l3sw;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_StopL3Switch");
- in_rpc_l3sw = new VPN.VpnRpcL3Sw({
- Name_str: "L3SW1"
- });
- return [4 /*yield*/, api.StopL3Switch(in_rpc_l3sw)];
- case 1:
- out_rpc_l3sw = _a.sent();
- console.log(out_rpc_l3sw);
- console.log("End: Test_StopL3Switch");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'AddL3If', Add new virtual interface on virtual L3 switch */
- function Test_AddL3If() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3if, out_rpc_l3if;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddL3If");
- in_rpc_l3if = new VPN.VpnRpcL3If({
- Name_str: "L3SW1",
- HubName_str: hub_name,
- IpAddress_ip: "192.168.0.1",
- SubnetMask_ip: "255.255.255.0"
- });
- return [4 /*yield*/, api.AddL3If(in_rpc_l3if)];
- case 1:
- out_rpc_l3if = _a.sent();
- console.log(out_rpc_l3if);
- console.log("End: Test_AddL3If");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DelL3If', Delete a virtual interface on virtual L3 switch */
- function Test_DelL3If() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3if, out_rpc_l3if;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DelL3If");
- in_rpc_l3if = new VPN.VpnRpcL3If({
- Name_str: "L3SW1",
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.DelL3If(in_rpc_l3if)];
- case 1:
- out_rpc_l3if = _a.sent();
- console.log(out_rpc_l3if);
- console.log("End: Test_DelL3If");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumL3If', Enumerate virtual interfaces on virtual L3 switch */
- function Test_EnumL3If() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_l3if, out_rpc_enum_l3if;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumL3If");
- in_rpc_enum_l3if = new VPN.VpnRpcEnumL3If({
- Name_str: "L3SW1"
- });
- return [4 /*yield*/, api.EnumL3If(in_rpc_enum_l3if)];
- case 1:
- out_rpc_enum_l3if = _a.sent();
- console.log(out_rpc_enum_l3if);
- console.log("End: Test_EnumL3If");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'AddL3Table', Add new routing table entry on virtual L3 switch */
- function Test_AddL3Table() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3table, out_rpc_l3table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddL3Table");
- in_rpc_l3table = new VPN.VpnRpcL3Table({
- Name_str: "L3SW1",
- NetworkAddress_ip: "10.0.0.0",
- SubnetMask_ip: "255.0.0.0",
- GatewayAddress_ip: "192.168.7.1",
- Metric_u32: 10
- });
- return [4 /*yield*/, api.AddL3Table(in_rpc_l3table)];
- case 1:
- out_rpc_l3table = _a.sent();
- console.log(out_rpc_l3table);
- console.log("End: Test_AddL3Table");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DelL3Table', Delete routing table entry on virtual L3 switch */
- function Test_DelL3Table() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_l3table, out_rpc_l3table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DelL3Table");
- in_rpc_l3table = new VPN.VpnRpcL3Table({
- Name_str: "L3SW1",
- NetworkAddress_ip: "10.0.0.0",
- SubnetMask_ip: "255.0.0.0",
- GatewayAddress_ip: "192.168.7.1",
- Metric_u32: 10
- });
- return [4 /*yield*/, api.DelL3Table(in_rpc_l3table)];
- case 1:
- out_rpc_l3table = _a.sent();
- console.log(out_rpc_l3table);
- console.log("End: Test_DelL3Table");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumL3Table', Get routing table on virtual L3 switch */
- function Test_EnumL3Table() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_l3table, out_rpc_enum_l3table;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumL3Table");
- in_rpc_enum_l3table = new VPN.VpnRpcEnumL3Table({
- Name_str: "L3SW1"
- });
- return [4 /*yield*/, api.EnumL3Table(in_rpc_enum_l3table)];
- case 1:
- out_rpc_enum_l3table = _a.sent();
- console.log(out_rpc_enum_l3table);
- console.log("End: Test_EnumL3Table");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumCrl', Get CRL (Certificate Revocation List) index */
- function Test_EnumCrl() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_enum_crl, out_rpc_enum_crl;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumCrl");
- in_rpc_enum_crl = new VPN.VpnRpcEnumCrl({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.EnumCrl(in_rpc_enum_crl)];
- case 1:
- out_rpc_enum_crl = _a.sent();
- console.log(out_rpc_enum_crl);
- console.log("End: Test_EnumCrl");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_crl];
- }
- });
- });
- }
- /** API test for 'AddCrl', Add new CRL (Certificate Revocation List) entry */
- function Test_AddCrl() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_crl, out_rpc_crl;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddCrl");
- in_rpc_crl = new VPN.VpnRpcCrl({
- HubName_str: hub_name,
- CommonName_utf: "CN",
- Organization_utf: "Org",
- Unit_utf: "ICSCOE",
- Country_utf: "JP",
- State_utf: "Ibaraki",
- Local_utf: "Tsukuba",
- Serial_bin: new Uint8Array([1, 2, 3, 4, 5,]),
- DigestMD5_bin: new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,]),
- DigestSHA1_bin: new Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,])
- });
- return [4 /*yield*/, api.AddCrl(in_rpc_crl)];
- case 1:
- out_rpc_crl = _a.sent();
- console.log(out_rpc_crl);
- console.log("End: Test_AddCrl");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DelCrl', Delete CRL (Certificate Revocation List) entry */
- function Test_DelCrl(key) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_crl, out_rpc_crl;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DelCrl");
- in_rpc_crl = new VPN.VpnRpcCrl({
- HubName_str: hub_name,
- Key_u32: key
- });
- return [4 /*yield*/, api.DelCrl(in_rpc_crl)];
- case 1:
- out_rpc_crl = _a.sent();
- console.log(out_rpc_crl);
- console.log("End: Test_DelCrl");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetCrl', Get CRL (Certificate Revocation List) entry */
- function Test_GetCrl(key) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_crl, out_rpc_crl;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetCrl");
- in_rpc_crl = new VPN.VpnRpcCrl({
- HubName_str: hub_name,
- Key_u32: key
- });
- return [4 /*yield*/, api.GetCrl(in_rpc_crl)];
- case 1:
- out_rpc_crl = _a.sent();
- console.log(out_rpc_crl);
- console.log("End: Test_GetCrl");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_crl];
- }
- });
- });
- }
- /** API test for 'SetCrl', Set CRL (Certificate Revocation List) entry */
- function Test_SetCrl(crl) {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_crl;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetCrl");
- return [4 /*yield*/, api.SetCrl(crl)];
- case 1:
- out_rpc_crl = _a.sent();
- console.log(out_rpc_crl);
- console.log("End: Test_SetCrl");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetAcList', Set access control list */
- function Test_SetAcList() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_ac_list, out_rpc_ac_list;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetAcList");
- in_rpc_ac_list = new VPN.VpnRpcAcList({
- HubName_str: hub_name,
- ACList: [new VPN.VpnAc({
- Deny_bool: true,
- IpAddress_ip: "192.168.0.0",
- SubnetMask_ip: "255.255.0.0",
- Masked_bool: true,
- Priority_u32: 123
- }), new VPN.VpnAc({
- Deny_bool: false,
- IpAddress_ip: "fe80::",
- SubnetMask_ip: "8",
- Masked_bool: true,
- Priority_u32: 123
- }),]
- });
- return [4 /*yield*/, api.SetAcList(in_rpc_ac_list)];
- case 1:
- out_rpc_ac_list = _a.sent();
- console.log(out_rpc_ac_list);
- console.log("End: Test_SetAcList");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetAcList', Get access control list */
- function Test_GetAcList() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_ac_list, out_rpc_ac_list;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetAcList");
- in_rpc_ac_list = new VPN.VpnRpcAcList({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetAcList(in_rpc_ac_list)];
- case 1:
- out_rpc_ac_list = _a.sent();
- console.log(out_rpc_ac_list);
- console.log("End: Test_GetAcList");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumLogFile', Enumerate log files */
- function Test_EnumLogFile() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_log_file;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumLogFile");
- return [4 /*yield*/, api.EnumLogFile()];
- case 1:
- out_rpc_enum_log_file = _a.sent();
- console.log(out_rpc_enum_log_file);
- console.log("End: Test_EnumLogFile");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_log_file];
- }
- });
- });
- }
- /** API test for 'ReadLogFile', Read a log file */
- function Test_ReadLogFile(filename) {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_read_log_file, out_rpc_read_log_file;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_ReadLogFile");
- in_rpc_read_log_file = new VPN.VpnRpcReadLogFile({
- FilePath_str: filename
- });
- return [4 /*yield*/, api.ReadLogFile(in_rpc_read_log_file)];
- case 1:
- out_rpc_read_log_file = _a.sent();
- console.log(out_rpc_read_log_file);
- console.log("End: Test_ReadLogFile");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetSysLog', Set syslog function setting */
- function Test_SetSysLog(flag) {
- return __awaiter(this, void 0, void 0, function () {
- var in_syslog_setting, out_syslog_setting;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetSysLog");
- in_syslog_setting = new VPN.VpnSyslogSetting({
- SaveType_u32: flag ? VPN.VpnSyslogSaveType.ServerAndHubAllLog : VPN.VpnSyslogSaveType.None,
- Hostname_str: "1.2.3.4",
- Port_u32: 123
- });
- return [4 /*yield*/, api.SetSysLog(in_syslog_setting)];
- case 1:
- out_syslog_setting = _a.sent();
- console.log(out_syslog_setting);
- console.log("End: Test_SetSysLog");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetSysLog', Get syslog function setting */
- function Test_GetSysLog() {
- return __awaiter(this, void 0, void 0, function () {
- var in_syslog_setting, out_syslog_setting;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetSysLog");
- in_syslog_setting = new VPN.VpnSyslogSetting({});
- return [4 /*yield*/, api.GetSysLog(in_syslog_setting)];
- case 1:
- out_syslog_setting = _a.sent();
- console.log(out_syslog_setting);
- console.log("End: Test_GetSysLog");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetHubMsg', Set message of today on hub */
- function Test_SetHubMsg() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_msg, out_rpc_msg;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetHubMsg");
- in_rpc_msg = new VPN.VpnRpcMsg({
- HubName_str: hub_name,
- Msg_bin: new Uint8Array([0x57, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x65, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x55, 0x6e, 0x69, 0x74, 0x65, 0x21, 0x20, 0xe4, 0xb8, 0x87, 0xe5, 0x9b, 0xbd, 0xe3, 0x81, 0xae, 0xe5, 0x8a, 0xb4, 0xe5, 0x83, 0x8d, 0xe8, 0x80, 0x85, 0xe3, 0x82, 0x88, 0xe3, 0x80, 0x81, 0xe5, 0x9b, 0xa3, 0xe7, 0xb5, 0x90, 0xe3, 0x81, 0x9b, 0xe3, 0x82, 0x88, 0x21, 0x20, 0xd7, 0x92, 0xd7, 0x91, 0xd7, 0xa8, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa2, 0xd7, 0x95, 0xd7, 0x91, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0x9d, 0x20, 0xd7, 0xa9, 0xd7, 0x9c, 0x20, 0xd7, 0x9b, 0xd7, 0x9c, 0x20, 0xd7, 0x94, 0xd7, 0x9e, 0xd7, 0x93, 0xd7, 0x99, 0xd7, 0xa0, 0xd7, 0x95, 0xd7, 0xaa, 0x2c, 0x20, 0xd7, 0x94, 0xd7, 0xaa, 0xd7, 0x90, 0xd7, 0x97, 0xd7, 0x93, 0xd7, 0x95, 0x21,])
- });
- return [4 /*yield*/, api.SetHubMsg(in_rpc_msg)];
- case 1:
- out_rpc_msg = _a.sent();
- console.log(out_rpc_msg);
- console.log("End: Test_SetHubMsg");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetHubMsg', Get message of today on hub */
- function Test_GetHubMsg() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_msg, out_rpc_msg;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetHubMsg");
- in_rpc_msg = new VPN.VpnRpcMsg({
- HubName_str: hub_name
- });
- return [4 /*yield*/, api.GetHubMsg(in_rpc_msg)];
- case 1:
- out_rpc_msg = _a.sent();
- console.log(out_rpc_msg);
- console.log("End: Test_GetHubMsg");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'Crash', Do Crash */
- function Test_Crash() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_test, out_rpc_test;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_Crash");
- in_rpc_test = new VPN.VpnRpcTest({});
- return [4 /*yield*/, api.Crash(in_rpc_test)];
- case 1:
- out_rpc_test = _a.sent();
- console.log(out_rpc_test);
- console.log("End: Test_Crash");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetAdminMsg', Get message for administrators */
- function Test_GetAdminMsg() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_msg;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetAdminMsg");
- return [4 /*yield*/, api.GetAdminMsg()];
- case 1:
- out_rpc_msg = _a.sent();
- console.log(out_rpc_msg);
- console.log("End: Test_GetAdminMsg");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'Flush', Flush configuration file */
- function Test_Flush() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_test, out_rpc_test;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_Flush");
- in_rpc_test = new VPN.VpnRpcTest({});
- return [4 /*yield*/, api.Flush(in_rpc_test)];
- case 1:
- out_rpc_test = _a.sent();
- console.log(out_rpc_test);
- console.log("End: Test_Flush");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetIPsecServices', Set IPsec service configuration */
- function Test_SetIPsecServices() {
- return __awaiter(this, void 0, void 0, function () {
- var in_ipsec_services, out_ipsec_services;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetIPsecServices");
- in_ipsec_services = new VPN.VpnIPsecServices({
- L2TP_Raw_bool: false,
- L2TP_IPsec_bool: false,
- EtherIP_IPsec_bool: false,
- IPsec_Secret_str: "vpn",
- L2TP_DefaultHub_str: "HUB_ABC"
- });
- return [4 /*yield*/, api.SetIPsecServices(in_ipsec_services)];
- case 1:
- out_ipsec_services = _a.sent();
- console.log(out_ipsec_services);
- console.log("End: Test_SetIPsecServices");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetIPsecServices', Get IPsec service configuration */
- function Test_GetIPsecServices() {
- return __awaiter(this, void 0, void 0, function () {
- var out_ipsec_services;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetIPsecServices");
- return [4 /*yield*/, api.GetIPsecServices()];
- case 1:
- out_ipsec_services = _a.sent();
- console.log(out_ipsec_services);
- console.log("End: Test_GetIPsecServices");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'AddEtherIpId', Add EtherIP ID setting */
- function Test_AddEtherIpId() {
- return __awaiter(this, void 0, void 0, function () {
- var in_etherip_id, out_etherip_id;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_AddEtherIpId");
- in_etherip_id = new VPN.VpnEtherIpId({
- Id_str: "testid",
- HubName_str: hub_name,
- UserName_str: "nekosan",
- Password_str: "torisan"
- });
- return [4 /*yield*/, api.AddEtherIpId(in_etherip_id)];
- case 1:
- out_etherip_id = _a.sent();
- console.log(out_etherip_id);
- console.log("End: Test_AddEtherIpId");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetEtherIpId', Get EtherIP ID setting */
- function Test_GetEtherIpId(id) {
- return __awaiter(this, void 0, void 0, function () {
- var in_etherip_id, out_etherip_id;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetEtherIpId");
- in_etherip_id = new VPN.VpnEtherIpId({
- Id_str: id
- });
- return [4 /*yield*/, api.GetEtherIpId(in_etherip_id)];
- case 1:
- out_etherip_id = _a.sent();
- console.log(out_etherip_id);
- console.log("End: Test_GetEtherIpId");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'DeleteEtherIpId', Delete EtherIP ID setting */
- function Test_DeleteEtherIpId(id) {
- return __awaiter(this, void 0, void 0, function () {
- var in_etherip_id, out_etherip_id;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_DeleteEtherIpId");
- in_etherip_id = new VPN.VpnEtherIpId({
- Id_str: id
- });
- return [4 /*yield*/, api.DeleteEtherIpId(in_etherip_id)];
- case 1:
- out_etherip_id = _a.sent();
- console.log(out_etherip_id);
- console.log("End: Test_DeleteEtherIpId");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'EnumEtherIpId', Enumerate EtherIP ID settings */
- function Test_EnumEtherIpId() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_enum_etherip_id;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_EnumEtherIpId");
- return [4 /*yield*/, api.EnumEtherIpId()];
- case 1:
- out_rpc_enum_etherip_id = _a.sent();
- console.log(out_rpc_enum_etherip_id);
- console.log("End: Test_EnumEtherIpId");
- console.log("-----");
- console.log();
- return [2 /*return*/, out_rpc_enum_etherip_id];
- }
- });
- });
- }
- /** API test for 'SetOpenVpnSstpConfig', Set configurations for OpenVPN and SSTP */
- function Test_SetOpenVpnSstpConfig() {
- return __awaiter(this, void 0, void 0, function () {
- var in_openvpn_sstp_config, out_openvpn_sstp_config;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetOpenVpnSstpConfig");
- in_openvpn_sstp_config = new VPN.VpnOpenVpnSstpConfig({
- EnableOpenVPN_bool: true,
- OpenVPNPortList_str: "1 2 3 4 5",
- EnableSSTP_bool: true
- });
- return [4 /*yield*/, api.SetOpenVpnSstpConfig(in_openvpn_sstp_config)];
- case 1:
- out_openvpn_sstp_config = _a.sent();
- console.log(out_openvpn_sstp_config);
- console.log("End: Test_SetOpenVpnSstpConfig");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetOpenVpnSstpConfig', Get configurations for OpenVPN and SSTP */
- function Test_GetOpenVpnSstpConfig() {
- return __awaiter(this, void 0, void 0, function () {
- var out_openvpn_sstp_config;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetOpenVpnSstpConfig");
- return [4 /*yield*/, api.GetOpenVpnSstpConfig()];
- case 1:
- out_openvpn_sstp_config = _a.sent();
- console.log(out_openvpn_sstp_config);
- console.log("End: Test_GetOpenVpnSstpConfig");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetDDnsClientStatus', Get status of DDNS client */
- function Test_GetDDnsClientStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var out_ddns_client_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetDDnsClientStatus");
- return [4 /*yield*/, api.GetDDnsClientStatus()];
- case 1:
- out_ddns_client_status = _a.sent();
- console.log(out_ddns_client_status);
- console.log("End: Test_GetDDnsClientStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'ChangeDDnsClientHostname', Change host-name for DDNS client */
- function Test_ChangeDDnsClientHostname() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_test, out_rpc_test;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_ChangeDDnsClientHostname");
- in_rpc_test = new VPN.VpnRpcTest({
- StrValue_str: "nekotest" + Math.floor((Math.random() * (2100000000 - 1000000000)) + 1000000000)
- });
- return [4 /*yield*/, api.ChangeDDnsClientHostname(in_rpc_test)];
- case 1:
- out_rpc_test = _a.sent();
- console.log(out_rpc_test);
- console.log("End: Test_ChangeDDnsClientHostname");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'RegenerateServerCert', Regenerate server certification */
- function Test_RegenerateServerCert() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_test, out_rpc_test;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_RegenerateServerCert");
- in_rpc_test = new VPN.VpnRpcTest({
- StrValue_str: "abc.example.org"
- });
- return [4 /*yield*/, api.RegenerateServerCert(in_rpc_test)];
- case 1:
- out_rpc_test = _a.sent();
- console.log(out_rpc_test);
- console.log("End: Test_RegenerateServerCert");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'MakeOpenVpnConfigFile', Generate OpenVPN configuration files */
- function Test_MakeOpenVpnConfigFile() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_read_log_file;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_MakeOpenVpnConfigFile");
- return [4 /*yield*/, api.MakeOpenVpnConfigFile()];
- case 1:
- out_rpc_read_log_file = _a.sent();
- console.log(out_rpc_read_log_file);
- console.log("End: Test_MakeOpenVpnConfigFile");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetSpecialListener', Set special listener status */
- function Test_SetSpecialListener() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_special_listener, out_rpc_special_listener;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetSpecialListener");
- in_rpc_special_listener = new VPN.VpnRpcSpecialListener({
- VpnOverDnsListener_bool: true,
- VpnOverIcmpListener_bool: true
- });
- return [4 /*yield*/, api.SetSpecialListener(in_rpc_special_listener)];
- case 1:
- out_rpc_special_listener = _a.sent();
- console.log(out_rpc_special_listener);
- console.log("End: Test_SetSpecialListener");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetSpecialListener', Get special listener status */
- function Test_GetSpecialListener() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_special_listener;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetSpecialListener");
- return [4 /*yield*/, api.GetSpecialListener()];
- case 1:
- out_rpc_special_listener = _a.sent();
- console.log(out_rpc_special_listener);
- console.log("End: Test_GetSpecialListener");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetAzureStatus', Get Azure status */
- function Test_GetAzureStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var out_rpc_azure_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetAzureStatus");
- return [4 /*yield*/, api.GetAzureStatus()];
- case 1:
- out_rpc_azure_status = _a.sent();
- console.log(out_rpc_azure_status);
- console.log("End: Test_GetAzureStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetAzureStatus', Set Azure status */
- function Test_SetAzureStatus() {
- return __awaiter(this, void 0, void 0, function () {
- var in_rpc_azure_status, out_rpc_azure_status;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetAzureStatus");
- in_rpc_azure_status = new VPN.VpnRpcAzureStatus({
- IsEnabled_bool: true
- });
- return [4 /*yield*/, api.SetAzureStatus(in_rpc_azure_status)];
- case 1:
- out_rpc_azure_status = _a.sent();
- console.log(out_rpc_azure_status);
- console.log("End: Test_SetAzureStatus");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetDDnsInternetSetting', Get DDNS proxy configuration */
- function Test_GetDDnsInternetSetting() {
- return __awaiter(this, void 0, void 0, function () {
- var out_internet_setting;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetDDnsInternetSetting");
- return [4 /*yield*/, api.GetDDnsInternetSetting()];
- case 1:
- out_internet_setting = _a.sent();
- console.log(out_internet_setting);
- console.log("End: Test_GetDDnsInternetSetting");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetDDnsInternetSetting', Set DDNS proxy configuration */
- function Test_SetDDnsInternetSetting() {
- return __awaiter(this, void 0, void 0, function () {
- var in_internet_setting, out_internet_setting;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetDDnsInternetSetting");
- in_internet_setting = new VPN.VpnInternetSetting({
- ProxyType_u32: VPN.VpnRpcProxyType.Direct,
- ProxyHostName_str: "1.2.3.4",
- ProxyPort_u32: 1234,
- ProxyUsername_str: "neko",
- ProxyPassword_str: "dog"
- });
- return [4 /*yield*/, api.SetDDnsInternetSetting(in_internet_setting)];
- case 1:
- out_internet_setting = _a.sent();
- console.log(out_internet_setting);
- console.log("End: Test_SetDDnsInternetSetting");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'SetVgsConfig', Setting VPN Gate Server Configuration */
- function Test_SetVgsConfig() {
- return __awaiter(this, void 0, void 0, function () {
- var in_vgs_config, out_vgs_config;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_SetVgsConfig");
- in_vgs_config = new VPN.VpnVgsConfig({
- IsEnabled_bool: false,
- Message_utf: "Neko san!!!",
- Owner_utf: "Go go go!!!",
- Abuse_utf: "[email protected]",
- NoLog_bool: false,
- LogPermanent_bool: true,
- EnableL2TP_bool: true
- });
- return [4 /*yield*/, api.SetVgsConfig(in_vgs_config)];
- case 1:
- out_vgs_config = _a.sent();
- console.log(out_vgs_config);
- console.log("End: Test_SetVgsConfig");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- /** API test for 'GetVgsConfig', Get VPN Gate configuration */
- function Test_GetVgsConfig() {
- return __awaiter(this, void 0, void 0, function () {
- var out_vgs_config;
- return __generator(this, function (_a) {
- switch (_a.label) {
- case 0:
- console.log("Begin: Test_GetVgsConfig");
- return [4 /*yield*/, api.GetVgsConfig()];
- case 1:
- out_vgs_config = _a.sent();
- console.log(out_vgs_config);
- console.log("End: Test_GetVgsConfig");
- console.log("-----");
- console.log();
- return [2 /*return*/];
- }
- });
- });
- }
- //# sourceMappingURL=sample.js.map
|