•  untoreh-ukukhanya

TCSplitter

Umhubhe wokuhlukanisa uxhumano lwe-TCP noma lwe-UDP ngaphesheya kokuxhuma okuningi kwe-TCP

Umgomo

Ngabe ufuna ukwahlukanisa nini ukuxhumana okukodwa kwe-TCP kokuningi? Imvamisa usebenzisa i- umhubhe ukuzuza okuphambene ngqo . Icala lami lokusebenzisa lalibalekela ukulinganiselwa komkhawulokudonsa kunethiwekhi yeselula, ngakho-ke izivivinyo zenziwa nge-sim khadi kungasekho datha esele kuhlelo lwayo[1].

Isebenza kanjani

I- umhubhe ibhalwe ngesi- golang ngoba ishesha ngokwanele, futhi ijwayele ukusetshenziselwa ithuluzi lenethiwekhi. I-cli ayisebenziseki kalula ngoba izinketho eziningi ziphinde zasebenza njengoba ngivivinya izindlela ezahlukahlukene.

Ekuqaleni bekukhona "ama-flings" kanye "nama-lassos", ukwahlukanisa inani lokuxhuma kokuphumayo (okunamaphiko) nokungenayo (okushisiwe), kepha lokhu bekungukukhishwa okungadingekile ngoba kungcono ukumaka amaphakethe ngendawo okuyiwa kuyo, yize inhloso enkulu bekungukuthi ukunikela ngemikhawulo yamazinga ehlukene wokuxhumeka okuphumayo nokungenayo, ngakho-ke ukwahlukaniswa kwezinga eliphakeme phakathi kokuya phezulu / phansi kubonakala kusebenza.

Iklayenti kufanele lifake konke ukuxhumana njengoba sicabanga ukuthi iseva ayikwazi ukuvula ukuxhumana okuphumayo. Lapho amaklayenti ethola ukuxhumeka kusuka kuhlelo lokusebenza lomsebenzisi, kusetha indawo edingekayo yokuxhumana neseva, futhi noma iyiphi idatha eyitholayo, iyayihlukanisa phakathi kokuxhumana okuzinikele, ngokusho komkhawulo ochazwe umsebenzisi.

Amaphakethe athunyelwa kuseva, okumele iwahlele kabusha ngendlela efanele, ngoba ukuxhumana okuhlukile kwe-TCP kungaqeda ukusakazwa kwedatha nganoma yisiphi isikhathi (i-oda elithunyelwe alihlonishwa, ngoba umzila ), bese idluliselwa kuhlelo lokusebenza olutholayo.

Ukuxhumeka kuvaliwe futhi okusha kuvulwa njengoba umkhawulo wedatha omisiwe ngokuxhumeka kufinyelelwa, kufana nokuthi kwenziwa kanjani ukuthungathaidatha yomhubhe yama-proxies ekusakazeni okuhlukile ngenhloso yokufihla ukusebenza kwemifudlana yedatha, ngaphandle kokuthi umhubhe wethu ukwenza lokho kaningi ngangokunokwenzeka.

Kungani kusebenza

Inhloso lapha ukulawula ukuthi konke ukuxhumana kufanele kusingathe idatha engakanani. Ngezinhloso zethu, bekungakaze kube ngaphezu kwalokho bekuvame ukuba yi MTU usayizi wewindi. Ungacabanga nge-MTU njengomkhawulo ongaphezulu wocezu lwedatha oludlula kuyo yonke inethiwekhi, futhi bekuyinjongo yethu ngoba besifuna ukweqa umkhawulo wamazinga we-bandwidth wenethiwekhi evaliwe. Ukunciphisa inani ledatha iklayenti elingadlula kulo, udinga bala kulungile, akunjalo? Uma umqondo wakho usebenza ngento efana ne-do-while

Ngemuva kwalokho udinga okungenani thola i-packet . Angiqiniseki ukuthi ngabe yilokhu okwenzeka ngempela, noma isizathu sokuthi umhubhe wami usebenze kungenye futhi. Mhlawumbe kungenzeka ngokuphelele ukubheka ngisho nephakethe lokuqala, kepha ngokombono wedizayini, lokho kungasho ukuthi kuzofanela uhlole konke ukuxhumana okukodwa, okungenza uhlelo lube buthakathaka ekuhlaselweni kwe-DOS, futhi yebo umhubhe wami ungasetshenziswa kalula njengethuluzi elisebenza kahle le-DOS / Stress, ngoba ungahlukanisa idatha kumaphakethe amancane kakhulu (okusho ukuthi ukuxhumana kwe-TCP kuzoba nengcindezi ephezulu yokuphinda usebenzise kabusha ) futhi ube nedamu lokuxhuma elikhulu ngendlela othanda ngayo.

Ukuhlolwa kwamachweba ahlukile futhi kukhombisile ukuthi kungenzeka kuphela kuphela ezinye amachweba, nokuthi umkhawulo ubuhlala uhlukile phakathi kwamachweba, nge443 kunikeza elinye lamawindi aphakeme, nxazonke20kb , ukuqagela ngobaTLS ukuxhawulana kudinga idatha eningi, nokuthi le mikhawulo yamazinga izoshintsha ngokuya ngesikhathi sosuku[2].

Imiphumela

Ngizamile ukusula ukufaka amakhodi ngethemba lokukhuphula idatha. Ngokusebenzisa umtapo wolwazi wokufaka amakhodi nokusula / ukuqopha imininingwane uqobo lwayo, nangokumbondelana I-KCP umthetho olandelwayo ngenqubo yami yokuhlukanisa. Ukuzama i-KCP kungahle kubonakale kuyindlela ebuyela emuva, ngoba ithengisa ukubambezeleka okungcono kokudlula okuphansi, kepha ukucabanga kwami ​​kokuqala ukuthi ibhodlela lami lalixhumano lehla phakathi kokudluliswa, okungadala amaphakethe amaningi onakele, ngakho-ke bengingazuza okuphezulu ukungena ngokulungiswa kwephutha.

Kuvele ukuthi bekungumkhawulo nje wokulinganiselwa ngaphezulu kokuxhumana okungakanani kwe-TCP iklayenti elingakuthumela ngenethiwekhi, ngakho-ke ukuvikelwa kwe-DOS engingakwazi ukwenza lutho ngakho. Ngemuva kwamanani we-X wokuxhumeka noma yikuphiSYN imizamo yeka ukwamukela okufaneleACK , ukugcwalisa ukusilela emuva futhi ekugcineni wenze itafula elincane. Ukuzama nephutha kukhombisile ukuthi kungenzeka phakathi kwe-4-8[3] ukuxhumana kuvulwa nganoma yisiphi isikhathi, futhi nge-MTU ye-500-1000 bytes ungagcina ukusakaza okuzinzile okungenani okuzungezile128kbps , uma ukusakaza njalo bekungeyona imfuneko, ungafinyelela isivinini esiphakeme esikhathini esifushane ngo- kuqhuma ukuxhumana okuningi ngokufunwa.

Ngokuphambene, a (true)DNS umhubhe awucindezeli kanzima56kbps futhi ngisheshe ngishayeke ngoba ngicabanga ukuthi inombolo ephezulu yezicelo ze-DNS ibukeka isolisa kakhulu bese kuba izicelo ze-TCP. Kufanele sicacise ukuthi atrue Idatha yomhubhe we-DNS (ephumayo) idatha ngaphezulu kwezizinda ezingekho mbumbulu futhi inquma idatha (engenayo) etholwe ngokubuza amarekhodi e-DNS, kanti kwesinye isikhathi umhubhe we-DNS ungacatshangwa ukuthi ukuxhumeka okuluhlaza kwe-UDP ethekwini le-DNS, okungenzeka ukuthi esikhathini esithile esedlule, amaseva e-DNS kuvunyelwe futhi kudluliswa kahle.

Iziphetho

Angiqiniseki ukuthi ngifinyelele umgomo wami Umbuso ukuhlakanipha, ngoba ukusebenzisa uhlobo olunjalo lomhubhe kungakwenza ushise kakhulu, futhi kumoshe ibhethri eliningi, kepha ukuba nakho njengokuxhumeka kwesipele kungakhuthaza ... uma ngikhathazwa ukukwenza uzinze ngokwanele :)

[1]imvamisa lapho ikhadi le-sim lingenayo enye idatha yokuphequlula iwebhu, izicelo zewebhu ziqondisa kabusha esangweni lokuthwebula (ukukutshela ukuthi uthenge idatha eningi)
[2]izinhlelo zedatha yeselula zingahlinzeka ngoxhumano olungcono ngezikhathi zasebusuku
[3]Le nombolo, eqondaniswe nokubalwa okujwayelekile, ingahle ikwenze usole ukuthi i-kernel ikhawulela ukuxhumana ngandlela thile, isimo sokuxhuma okuvuliwe komhubhe wethu asijwayelekile neze, kepha ukulungisa izinkinobho ze-linux akukaze kunikeze imiphumela engcono ekugcineni kwami.

Thumela Amathegi: