梅林固件设置虚拟内存
让梅林R6400支持sftp协议

p2p内网穿透技术-udp打洞

妙音 posted @ 2018年11月25日 16:47 in network with tags p2p udp vps , 5649 阅读
 
 
在公司如何访问家里的电脑?实现方法有很多,其它p2p传输文件最快,能否实现?
 

udp打洞原理

 
假设有两台分别处于各自的私有网络中的主机:A和B;N1和N2是两个网络的NAT设备,分别拥有IP地址P1和P2;S是一个使用了一个众所周知的、从全球任何地方都能访问得到的IP地址的公共服务器

步骤一:A和B分别和S建立UDP连接;NAT设备N1和N2创建UDP转换状态并分配临时的外部端口号

步骤二:S检查UDP包,看A和B的端口是否是正在被使用的(否则的话N1和N2应该是应用了端口随机分配,这会让路由验证变得更麻烦)

步骤三:如果端口不是随机化的,那么A和B各自选择端口X和Y,并告知S。S会让A发送UDP包到P2:Y,让B发送UDP包到P1:X

步骤四:A和B通过转换好的IP地址和端口直接联系到对方的NAT设备;
 
 
 

udp打洞成功前提条件--非对称NAT

 
完全圆锥型NAT: 无条件转发
 
受限圆锥型NAT:  忽略掉其它主机的数据包(要求来源ip一直)
 
端口受限圆锥型NAT: 更进一步地要求源端口(上例中是 2727)必须跟之前发出的数据包的目的端口一致(要求来源ip和端口)
 
对称NAT: 丢弃报文,拒绝转发(每次连接端口会变)
 
对称NAT理论上可以使用端口预测,但是基本上用不了。现在国内几个宽带运行商都是使用对称NAT,所以udp打洞不可行。
 
记得之前上学的时候p2p共享软件很多,后来都销声匿迹,应该是被管控了。
 

socat测试udp打洞

 
下面是socat打洞的例子,试过在公司与家里之间打洞,用不了被现实了
 
https://blog.lilydjwg.me/2012/8/28/udp-hole-punching-experiment.35350.html
 

frp测试udp打洞

 
frp采用xtcp协议,试过同样用不了。stcp可以用,但是不是p2p,要经过中间转发。
 

检查nat类型?

 
#python直接用pynat包
pip install pynat
 

pynat

 
C:\Users\wyq>pynat
Network type: Symmetric NAT   #对称nat
Internal address: 192.168.50.169:54320
External address: xxx.xxx.xxx.xxx:61195
 

 内网穿透可行方法

方法   描述  实现条件 实际是否可行
p2p      udp打洞 非对称nat 不可行。宽带基本都是对称nat。除非在自己公网ip上提供p2p穿透
ddns 路由器使用有公网ip 宽带提供了公网ip 不可行。路由器基本没有公网ip
端口转发 将端口映射到公网ip 需要公网ip 可行
vpn      要求有公网ip节点,运行vpn服务端 需要公网ip 可行

 

参考来源

 

 

Avatar_small
charliewhite 说:
2020年10月20日 16:44

Essay typist at dzone - Looking for Assignment Writing Services UK? Here We at TreatAssignmentHelp offering a wide range of Academic Writing Services & Assignment Help with Essay Writing Services UK, Assignment Writing Help Services, Assignment Help Wales UK for students. High qualified writers, 24/ 7 support, and complete privacy guarantee. Call or WhatsApp on +44 7520644027 to hire the best suitable academic writer for your subject. We promise to deliver projects before the deadline and without plagiarism. For More Services: Ella Phillips on threadless

Avatar_small
helphub 说:
2020年11月19日 01:14

Whether it is popular games like Baccarat, Slots, Blackjack, Roulette and Dragon Tiger etc. สล็อต

Avatar_small
buy soma 500 说:
2020年11月19日 16:53

I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. 먹튀검증

Avatar_small
sagame66 说:
2020年11月21日 14:59

I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites blog site list and will be checking back soon. Please check out my site as well and let me know what you think. sagame66

Avatar_small
buy soma 500 说:
2020年11月23日 20:06

I was surfing net and fortunately came across this site and found very interesting stuff here. Its really fun to read. I enjoyed a lot. Thanks for sharing this wonderful information. okdermo

Avatar_small
vape pen dry herb va 说:
2020年12月16日 16:13

Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. vape pen dry herb vaporizer

Avatar_small
no excuses runner 说:
2021年1月03日 18:39

Incredible articles and awesome design. Your blog entry merits the greater part of the positive input it"s been getting. custom patches

Avatar_small
no excuses runner 说:
2021年1月04日 20:30

I wish more authors of this type of content would take the time you did to research and write so well. I am very impressed with your vision and insight. see it here

Avatar_small
haider 说:
2023年6月26日 16:45

Appreciating the time and effort you put into your blog, I’m adding your RSS feeds to my Google account. Uk University admission

Avatar_small
haider 说:
2023年6月27日 19:38

Well done on your comprehensive sports guide! The section on nutrition tips for endurance athletes caught my attention. I've also written an article on my website, highlighting nutritional guidelines for optimizing performance in endurance sports. Check it out [insert link to your article]." 꽁머니 환전

Avatar_small
haider 说:
2023年7月08日 01:57

I’ve recently started a web site, the information you offer on this site has helped me greatly. Thanks for all of your time & work. slot casino malaysia

Avatar_small
haider 说:
2023年7月09日 02:56

Hmm i think this is nice post. I hope this is just begin of your writing. If you want you can check my blog as well. Of course if you want. เว็บพนันออนไลน์เว็บตรงไม่ผ่านเอเย่นต์

Avatar_small
haider 说:
2023年7月09日 16:39

I am interested in looking for more of such topics and would like to have further information. Hope to see the next blog soon. 計數機program必入

Avatar_small
raja slot 5000 说:
2023年7月10日 00:09

that is the kind of data I’ve long been searching for. thanks for scripting this records.

Avatar_small
haider 说:
2023年7月11日 20:07

I liked as much as you will obtain performed proper here. The caricature is attractive, your authored subject matter stylish. nonetheless, you command get got an nervousness over that you would like be turning in the following. ill undoubtedly come further before once more as exactly the same nearly a lot ceaselessly within case you defend this hike. hajijatims.id

Avatar_small
haider 说:
2023年7月12日 14:17

Hi there, You have done a great job. I will definitely digg it and in my opinion recommend to my friends. I am sure they will be benefited from this site. fzmovies.com

Avatar_small
haider 说:
2023年7月16日 00:21

It makes the Aliens soldiers in an Invasion Mission – the action is non-stop adrenaline flowing – Characters are believable and likable – It takes you for a non-stop ride from beginning to end. Heets

Avatar_small
haider 说:
2023年7月16日 22:01

For this reason it is advisable that you need to related study just before creating. You'll be able to publish far better submit in this way. IQOS

Avatar_small
haider 说:
2023年7月18日 15:01

Situs slot4d dengan pasaran togel terlengkap serta toto macau terpercaya. link daftar alternatif situs totoloka88 totoloka88

Avatar_small
haider 说:
2023年7月18日 20:59

[...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]… Heets

Avatar_small
SEO 说:
2023年7月19日 02:20

Excellent post. I was always checking this blog, and I’m impressed! Extremely useful info specially the last part, I care for such information a lot. I was exploring this particular info for a long time. Thanks to this blog my exploration has ended. new zealand visa for us citizens

Avatar_small
haider 说:
2023年7月19日 19:54

Have you ever considered writing an ebook or guest authoring on other blogs? I have a blog centered on the same ideas you discuss and would love to have you share some stories/information. I know my audience would appreciate your work. If you are even remotely interested, feel free to send me an e-mail. Heets

Avatar_small
haider 说:
2023年7月20日 14:09

It’s my belief mesothelioma can be the most lethal cancer. It contains unusual characteristics. The more I look at it the greater I am certain it does not respond like a true solid tissues cancer. In the event mesothelioma is often a rogue virus-like infection, therefore there is the chance for developing a vaccine along with offering vaccination for asbestos open people who are really at high risk associated with developing future asbestos associated malignancies. Thanks for sharing your ideas about this important health issue. AI-based crypto Bot

Avatar_small
haider 说:
2023年7月20日 19:47

I am very pleased to discover this web page. I want to tell you thx for your effort in providing this amazing read! I certainly enjoyed it and I have you book-marked to follow new issues you post. slot rtp

Avatar_small
haider 说:
2023年7月21日 03:07

I have viewed that smart real estate agents all over the place are getting set to FSBO Marketing. They are noticing that it’s in addition to placing a sign in the front place. It’s really in relation to building associations with these dealers who sooner or later will become consumers. So, once you give your time and effort to helping these traders go it alone — the “Law regarding Reciprocity” kicks in. Thanks for your blog post. बाइनरी ऑप्शन ट्रेड,

Avatar_small
haider 说:
2023年7月22日 13:52

Hey there! Someone in my Facebook group shared this website with us so I came to check it out. I’m definitely enjoying the information. I’m book-marking and will be tweeting this to my followers! Superb blog and wonderful design. mp3juice.homes

Avatar_small
haider 说:
2023年7月22日 23:08

I have been browsing on-line more than three hours these days, yet I by no means found any interesting article like yours. It¡¦s beautiful worth sufficient for me. In my opinion, if all website owners and bloggers made excellent content as you probably did, the net will likely be much more helpful than ever before. spelberoende test

Avatar_small
haider 说:
2023年7月23日 19:04

It’s my belief mesothelioma can be the most lethal cancer. It contains unusual characteristics. The more I look at it the greater I am certain it does not respond like a true solid tissues cancer. In the event mesothelioma is often a rogue virus-like infection, therefore there is the chance for developing a vaccine along with offering vaccination for asbestos open people who are really at high risk associated with developing future asbestos associated malignancies. Thanks for sharing your ideas about this important health issue. https://casinostars.se

Avatar_small
haider 说:
2023年7月24日 15:33

I have viewed that smart real estate agents all over the place are getting set to FSBO Marketing. They are noticing that it’s in addition to placing a sign in the front place. It’s really in relation to building associations with these dealers who sooner or later will become consumers. So, once you give your time and effort to helping these traders go it alone — the “Law regarding Reciprocity” kicks in. Thanks for your blog post. trang chủ Fun88 Press

Avatar_small
Imamia Quran Academy 说:
2023年7月27日 06:03

Hi everyone, I really love your story. You have very useful information; I am from Imamia Quran Academy. Online Shia Quran Institute has all the necessities for exceptional Shia Online Quran Learning. An established system of Quranic teaching and lessons with trained teaching staff greatly enhances the learning experience.

Avatar_small
haider 说:
2023年7月27日 18:50

Good – I should certainly pronounce, impressed with your site. I had no trouble navigating through all the tabs and related information ended up being truly easy to do to access. I recently found what I hoped for before you know it in the least. Quite unusual. Is likely to appreciate it for those who add forums or anything, website theme . a tones way for your client to communicate. Nice task. rtp slot

Avatar_small
SEO 说:
2023年7月29日 05:41 I read that Post and got it fine and informative. 카지노사이트
Avatar_small
haider 说:
2023年7月29日 13:23

Satta Matka is not just limited to numbers; it also incorporates various types of bets and markets. From single-digit bets to complex combinations, players can explore different betting options and find the ones that align with their playing style and preferences. matka

Avatar_small
haider 说:
2023年7月29日 21:31

I have viewed that smart real estate agents all over the place are getting set to FSBO Marketing. They are noticing that it’s in addition to placing a sign in the front place. It’s really in relation to building associations with these dealers who sooner or later will become consumers. So, once you give your time and effort to helping these traders go it alone — the “Law regarding Reciprocity” kicks in. Thanks for your blog post. https://www.digitalbusinesstraffic.com/

Avatar_small
haider 说:
2023年8月02日 22:17

Though when i received with your world-wide-web wood even so putting understanding just a bit hint submits. Pleasant technique for likely, I am book-marking on a time uncover designs consider spgs technique in place. 출장마사지

Avatar_small
SEO 说:
2023年8月04日 01:48

Your content is nothing short of brilliant in many ways. I think this is engaging and eye-opening material. Thank you so much for caring about your content and your readers. 천안출장마사지

Avatar_small
haider 说:
2023年8月06日 17:16

hey there and thank you for your information – I have definitely picked up something new from right here. I did however expertise several technical issues using this website, since I experienced to reload the site lots of times previous to I could get it to load correctly. I had been wondering if your hosting is OK? Not that I am complaining, but sluggish loading instances times will often affect your placement in google and can damage your quality score if advertising and marketing with Adwords. Anyway I am adding this RSS to my e-mail and could look out for a lot more of your respective exciting content. Ensure that you update this again very soon.. Silagra 100

Avatar_small
haider 说:
2023年8月06日 23:21

One more issue is video games are typically serious as the name indicated with the main focus on studying rather than enjoyment. Although, it has an entertainment feature to keep your young ones engaged, every single game is generally designed to work towards a specific experience or programs, such as math or research. Thanks for your publication. shillong teer result

Avatar_small
haider 说:
2023年8月07日 19:40

Well done! I thank you your blog post to this matter. It has been insightful. my blog: how to make a girl fall in love kiss918

Avatar_small
haider 说:
2023年8月10日 20:34

Hi there, You have done a great job. I will definitely digg it and in my opinion recommend to my friends. I am sure they will be benefited from this site. DATA HK

Avatar_small
jame 说:
2023年8月13日 21:45

There is noticeably a lot of money to know about this. I suppose you’ve made particular nice points in functions also. Custom Curtains

Avatar_small
haider 说:
2023年8月15日 18:44

you’re actually a good webmaster. The website loading speed is amazing. It sort of feels that you’re doing any unique trick. Also, The contents are masterpiece. you’ve performed a excellent process on this subject! chatgpt

Avatar_small
haider 说:
2023年8月19日 16:42

Superior blog! I truly love how it is simple on my eyes and the information are well written. I’m wondering how I could be notified whenever a new post has become made. I have subscribed to your RSS which must do the trick! Have an excellent day! ramshot tac

Avatar_small
haider 说:
2023年8月20日 23:51

Generally I do not read post on blogs, however I would like to say that this write-up very pressured me to try and do so! Your writing taste has been amazed me. Thank you, quite nice post. แทงใบเหลืองใบแดงUFABET

Avatar_small
haider 说:
2023年8月21日 23:51

I have to say i am very impressed with the way you efficiently website and your posts are so informationrmative. You have really have managed to catch the attention of many it seems, keep it up! situs panen138

Avatar_small
haider 说:
2023年8月22日 20:08

[...]check below, are some totally unrelated websites to ours, however, they are most trustworthy sources that we use[...]… https://www.outlookindia.com/outlook-spotlight/liv-pure-reviews-what-they-ll-never-tell-you-does-livpure-really-work--news-311512

Avatar_small
haider 说:
2023年8月23日 17:39

One thing is that if you find yourself searching for a student loan you may find that you’ll want a co-signer. There are many circumstances where this is correct because you will find that you do not use a past history of credit so the mortgage lender will require that you’ve got someone cosign the borrowed funds for you. Good post. เว็บพนันบอลออนไลน์อันดับ1

Avatar_small
haider 说:
2023年8月24日 15:06

Hey this can be a great looking site, is wordpress? Forgive me for the dumb question – but if so, what theme is? Thanks! เว็บบอลออนไลน์UFA

Avatar_small
haider 说:
2023年8月24日 23:10

I’ve been absent for a while, but now I remember why I used to love this web site. Thank you, I’ll try and check back more frequently. How frequently you update your website? สมัครแทงบอลฟรี

Avatar_small
haider 说:
2023年8月27日 14:23

Wow! Thank you! I permanently needed to write on my website something like that. Can I implement a portion of your post to my site? 메이저사이트

Avatar_small
haider 说:
2023年8月28日 20:32

I am very glad to know that your site is upgrading from the with simplest to more faster and synchronized form. I am quite familiar of a lot of sites since I work as a freelance writer and one of the sites that I find evolve is your site respectively. มีเว็บไซต์แทงบอลใดบ้างที่ให้บริการแทงขั้นต่ำ 10 บาท?

Avatar_small
haider 说:
2023年8月30日 01:00

My brother recommended I may like this website. He was once totally right. This put up actually made my day. You can not believe simply how a lot time I had spent for this information! Thanks! 메이저사이트

Avatar_small
Slot Deposit Pulsa 说:
2023年8月31日 11:44

Very useful information, thank you for sharing with us, it is very helpful in increasing our insight.

visit my website : <a href="https://thenewenglandnetwork.net/">Slot Deposit Pulsa</a>

Avatar_small
slot zeus 说:
2023年9月02日 15:26

Thank you for making this article, I feel very helped by this article

Avatar_small
slot77 说:
2023年9月02日 15:29

thankful for the person who created this article, i fell helped with this article

Avatar_small
slot kamboja 说:
2023年9月02日 15:29

very useful information, i'll back for newest information

Avatar_small
haider 说:
2023年9月02日 20:51

Which is moreover an excellent distribute that we in fact treasured researching. It is not daily that individuals keep the chance to learn a very important factor. ЕГР365

Avatar_small
haider 说:
2023年9月03日 15:27

I am very glad to know that your site is upgrading from the with simplest to more faster and synchronized form. I am quite familiar of a lot of sites since I work as a freelance writer and one of the sites that I find evolve is your site respectively. 토토사이트

Avatar_small
haider 说:
2023年9月04日 23:40

Very great post. I simply stumbled upon your weblog and wanted to mention that I have really enjoyed surfing around your weblog posts. In any case I’ll be subscribing to your feed and I hope you write again soon! food photography Surabaya

Avatar_small
haider 说:
2023年9月06日 19:55

Very nice post and right to the point. I am not sure if this is in fact the best place to ask but do you people have any thoughts on where to hire some professional writers? Thanks djarumtoto slot

Avatar_small
haider 说:
2023年9月08日 19:06

Wow!, this was a top quality post. In concept I’d like to publish like this as well – taking time and real effort to make a nice article… but what can I say… I keep putting it off and never seem to get something done filmyzilla

Avatar_small
haider 说:
2023年9月11日 15:17

Solar Dark Side of the Sun is Solar’s answer to the fans who wanted to hear his earlier work, before Guru and Solar 7Grand records Classic catalog! Which scared many Gang Starr fans that Solar’s stellar production would eclipse dj premier and rival Gang Starr classics! As evidence Jazzmatazz vol 4 was the first Jazzmatazz album to attract Gang Starr fans as well as Hip Hop jazz and R&B fans to Solar Production and Guru’s reinvented Jazzmatazz series. Dj Solar

Avatar_small
haider 说:
2023年9月12日 18:22

Beginning with the unnecessary flashback to the tale of Kirk’s father’s heroism, we’re treated to one tired battle scene after another. wooden hanger for pants

Avatar_small
haider 说:
2023年9月13日 00:42

Hey! I simply wish to give a huge thumbs up for the great info you’ve gotten here on this post. I can be coming back to your weblog for extra soon. canister whipped cream

Avatar_small
haider 说:
2023年9月13日 22:16

Conexion hot new Latin Hip Hop single from Nieto. Produced y Super Producer DJ Solar. Hot track that plugs the gap in Underground Hip Hop and Latin Hip Hop! Latin Hip Hop

Avatar_small
haider 说:
2023年9月14日 19:01

I must say that it is a superb post..Really we are impressed out of this post….the one who create this post it had been an amazing human. I put one of the links to your blog inside my site, we do hope you don’t mind? สล็อต

Avatar_small
haider 说:
2023年9月16日 23:44

Instantly that web site could possibly irrefutably finish up popular concerning just about every publishing some people, on account of conscientious articles or blog posts in addition to opinions in addition to reviews. the bone clogs

Avatar_small
haider 说:
2023年9月19日 21:12

excellent submit, very informative. I wonder why the other experts of this sector do not realize this. You must continue your writing. I am confident, you have a great readers’ base already! Penguin Cutie Pretty Crocs Clog

Avatar_small
haider 说:
2023年9月21日 22:14

Any time i actually turned against your web-site while having special particular attention without difficulty a small amount of touch submits. Gratifying way of duration, Soon we will be book-marking at this point currently have styles execute springs perfect right up. 신림노래빠

Avatar_small
haider 说:
2023年9月23日 00:14

hey all, I used to be just checkin¡¯ out this blog and I actually admire the basis of the article, and don¡¯t have anything to do, so if anybody would like to to have an engrossing convo about it, please contact me on AIM, my name is heather smith roof cleaning bournemouth

Avatar_small
james 说:
2023年10月02日 18:53

Oh my goodness! a wonderful write-up dude. Many thanks Nevertheless We’re experiencing trouble with ur rss . Don’t know why Unable to sign up to it. Can there be everyone obtaining identical rss difficulty? Anybody who knows kindly respond. Thnkx shillong teer result

Avatar_small
james 说:
2023年10月04日 22:53

I'm keen on ones write-up. It truly is beneficial to discover people verbalize on the cardiovascular system in addition to understanding within this significant theme is usually simply discovered. 토토

Avatar_small
tax services in uae 说:
2023年10月06日 17:50

i never know the use of adobe shadow until i saw this post. thank you for this! this is very helpful.

Avatar_small
best cosmetics in k 说:
2023年10月06日 18:55

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much.

Avatar_small
akun pro thailand sl 说:
2023年10月31日 12:48

<a href="https://heylink.me/AkunProThailandSlot/">akun pro thailand slot</a> yang ada disini semua memiliki kelebihan yang belum ada pada semua serve thailand yang ada pada saat ini. Dalam pembuatan akun yang sudah pasti kegacorannnya, kalian juga dijadikan member special setelah mendapatkan akun vip thailand yang disini. Dengan sistem setoran awal yang rendah serta winrate kemenangan yang sangat tinggi membuat kalian bisa memenang semua jenis permainan yang ingin kalian mai

Avatar_small
pg slot mahjong 说:
2023年11月01日 14:45

Permainan Slot Online Dari PG Soft Menghadirkan Jenis Permainan PG Slot mahjong Yang Memberikan Kemenangan Besar Hanya Modal Kecil Saja.

Avatar_small
Imamia Quran Academy 说:
2024年1月18日 08:26

Online Shia Quran Academy is an institute for Quran Education. They have trained teaching staff along with renowned Islamic Scholars for a better understanding of the Quran. Shia Quran Academy is an Online Ahle Tashi Institute that has all the features of traditional madrasahs including the teaching of an authentic understanding of the Quran. Additionally, Shia Quran Academy Online provides all teaching by certified professional teachers. Thus, joining Quran Academy will be suitable and beneficial for every learner. It is very difficult to find a good Online Shia Quran Center with Shia Teachers abroad except in Muslim or especially Ahle Tashi majority countries. Imamia Quran Center connects students virtually from all over the world including countries with less or no Ahle Tashi population or Shia Quran Centers. Our Quran Academy is a comprehensive institution with full fledged facilities regarding Shia Quran Learning. Ahle Tashi Quran student is free to choose the timings of classes, lecturers and tutors according to their feasibility and availability to Learn Shia Quran. Online learning more efficiently saves time and money spent over conveyance and physical going to any conventional Shia Quran Institute. Online Shia Madrasa selects highly qualified Quran teachers, keeping in mind the ages of kids and adults, who teach kids and adults Quranic education as well as their beliefs, spirituality and worldly life. The Shia Quran Madrasa Online is a secure place for kids and adults to learn and memorize the Quran. They teach the translation and interpretation of the Holy Quran under the guidance of expert Quranic teachers. Our Shia Quran Madrasa is second to none in providing education to Ahle Tashi women’s. So our center has selected Ahle Tashi Female Quran teacher with higher education from Madrasas. Online Shia Quran Madrasa is one of the best academies providing its services all over the world including USA, UK, Canada, Germany, France and Australia. Shia Quran Academy, a leading Online Shia Academy in the USA, offers exceptional virtual services that are accessible to anyone worldwide.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter