Tailscale builds a derper and uses the Nginx reverse proxy to encounter the following pitfalls: http: TLS handshake error from 172.40.0.1:44442: cert mismatch with hostname: "" Author: Chuwen Time: 2023-10-10 Classification: talk of everything under the sun comment ##Preamble According to the online tutorials, most of them let you configure Nginx as follows: ```nginx location / { proxy_pass https://127.0.0.1:3443 ; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ``` However, if you do this, you will find that there is no access at all, and derper will also report the following error: ! []( https://cdn.nowtime.cc/2023/10/10/1996389015.png ) Cert mismatch with hostname **The reason for the abnormality (this is my personal guess, please correct it by Dalao):** It may be that during Nginx's handshake with the backend TLS, deper performs a strong SSL verification. If the hostname and the certificate hostname do not match, the connection is rejected ##Solution ```nginx location / { proxy_pass https://127.0.0.1:3443 ; proxy_http_version 1.1; proxy_set_header Host $host; #Add these two lines of configuration to solve the problem proxy_ssl_server_name on; proxy_ssl_name $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } ``` If you access your derper address, the following interface appears, indicating that the configuration is successful ! []( https://cdn.nowtime.cc/2023/10/10/4151549465.png )
I asked a question in CSDN when I wanted to implement a function in PHP Author: Chuwen Time: 2021-06-28 Classification: talk of everything under the sun comment ##Subject matter When I was free, I suddenly searched my * * QQ trumpet * * on Google. Unexpectedly, there would be unexpected gains. I even raised a question about PHP on CSDN five or six years ago (October 28, 2015) ! []( https://cdn.nowtime.cc/2021/06/28/2150184956.png ) ! []( https://cdn.nowtime.cc/2021/06/28/3178275766.png ) Original content: ``` <? php $auth= http://g.xsscp.com/include/code1.php?url= $_SERVER['HTTP_HOST']"; <? php $url = " http://g.xsscp.com/include/code1.php?url= $_SERVER['HTTP_HOST']"; $html = file_get_contents($url); if(!in_array($_SERVER['HTTP_HOST'], array(echo $html;))) { Exit ('64407039 reminds you that your domain name is not authorized! Or you can access it directly through the website! For authorization, please contact QQ: 644407039 '); } ?> It's just not enough. Please help me, The idea is as follows hypothesis $_SERVER['HTTP_HOST']" Equal to r.xsscp.com So this website http://g.xsscp.com/include/code1.php?url= $_SERVER['HTTP_HOST']" Becomes http://g.xsscp.com/include/code1.php?url=r.xsscp.com If authorized, return to the current URL And passed. If there is no authorization, return No Admittance Benefiting from dripping water, when Yongquan reports pictures If the above code doesn't work, you can refer to the following figure for design. This code is sent by someone else and is also authorized. Only part of it has been shown. ``` ###Let's look at the code: >Bad writing and grammar mistakes ```php <? php $url = " http://g.xsscp.com/include/code1.php?url= $_SERVER['HTTP_HOST']"; $html = file_get_contents($url); if(!in_array($_SERVER['HTTP_HOST'], array(echo $html;))) { Exit ('64407039 reminds you that your domain name is not authorized! Or you can access it directly through the website! For authorization, please contact QQ: 644407039 '); } ?> ``` ##It's not over yet. I searched my QQ again >Then I found the code I wrote. I don't know the exact age. At this time, I should have mastered the use of MySQL in PHP. I should know a little about regular SQL statements. But at this time, only the class library written by others will be called, and the native 'mysql' and 'mysqli' will not > >As can be seen from the following, I still don't understand the 'return' statement, which results in 'if else' infinite nesting. After I learned 'ThinkPHP', I learned that the method will terminate execution when it encounters a retrn > >In addition, the grammar is not rigorous, thinking that there is only success and no failure ```php <? php class API{ function idiom($idiom){ global $DB; If (stristr ($idiom, 'Idiom Solitaire')){ $idiom=explore ('Idiom Solitaire ', $idiom); if($idiom['1']){ $row=$DB->get_row("SELECT * FROM `api_idiom` WHERE `name`='{$idiom['1']}' LIMIT 1"); if($row['name']==$idiom['1']){ $count=utf8_strlen($idiom['1']); $key=mb_substr($idiom,($count-1),$count,'UTF-8'); $row=$DB->get_row("SELECT * FROM `api_idiom` WHERE `name` LIKE '{$idiom['1']}%' ORDER BY RAND() LIMIT 1"); if($row['name']){ return $row['name']; }else{ Return 'You're too good. I can't get it. Let's use another idiom to play ω<* ฅ)'; } }else{ Return 'Are you sure this idiom ('. $idiom ['1 '].') exists? Don't fool me; } }else{ $row=$DB->get_row("SELECT * FROM `api_idiom` ORDER BY RAND() LIMIT 1"); return $row['name']; } }Elseif (stristr ($idiom, 'idiom')){ $idiom=explore ('idiom ', $idiom); if($idiom['1']){ $row=$DB->get_row("SELECT * FROM `api_idiom` WHERE `name`='{$idiom['1']}' LIMIT 1"); if($row['name']==$idiom['1']){ Return 'Pronunciation:'$ row['spell'].' \N Idiom: '$ row['name'].' \N n Definition: '$ row['content']; }else{ Return 'Are you sure this idiom ('. $idiom ['1 '].') exists? Don't fool me; } }else{ Return 'You haven't entered the idiom to query its definition~(● - ●)'; } } #Function Die } function query_express($nu){ global $DB; if(!$nu){ Return 'Please enter the waybill number to query the express information!'; }else{ $express=json_decode(curl_get(' http://www.kuaidi100.com/autonumber/auto?num= '.$ nu),true); $exname=$express[0]['comCode']; if(!$exname){ Return 'Please enter the waybill number correctly!'; }else{ $query=json_decode(curl_get(' http://www.kuaidi100.com/query?type= '.$ exname.'& postid='.$ nu),true); if($query['status']=='400'){ Return 'Query failed! Maybe the logistics information of the goods has not been updated, please check again later! '; }else{ if($query['status']=='201'){ Return 'The query failed. The reason is: n1. Maybe the logistics information of the goods has not been updated. Please check again later! \N n2. The waybill number does not exist [Please check whether the waybill number is entered correctly!] or it has expired! \N nPS: If this prompt appears when the waybill number exists, please contact the express to query API author QQ: 1361289290, thank you for your cooperation! '; }else{ $com=$query['com']; if($query['state']=='0'){ $state='Goods are in transit! '; }elseif($query['state']=='1'){ $state='The goods have been collected by the express company'; }elseif($query['state']=='2'){ $state='There was a problem during the delivery of the goods'; }elseif($query['state']=='3'){ $state='The recipient has signed in'; }elseif($query['state']=='4'){ $state='The goods are returned due to the user's refusal to sign, over area and other reasons, and the sender has signed for them'; }elseif($query['state']=='5'){ $state='The express delivery is in progress'; }elseif($query['state']=='3'){ $state='The goods are being returned to the sender'; }else{ $state='Status query failed, please query later!'; } $row=$DB->get_row("SELECT * FROM `api_expresscom` WHERE `com`='$com' LIMIT 1"); $arrlength=count($query['data']); for($i=0;$i<$arrlength;$i++){ $data.=$ query['data'][$i]['time'].' \n'.$ query['data'][$i]['context'].' \n\n'; } Return 'Query the waybill number:'$ nu.'['.$ row['name'].'] \N Cargo status: '$ state.' \n\n'.$ data.' Query time: '. date ('Y-m-d H: i: s'); } } } } #Function Die } function joke(){ global $DB; $row=$DB->get_row("SELECT * FROM `api_joke` ORDER BY RAND() LIMIT 1"); return '《'.$row['title'].'》\n'.$ row['text']; } function historic($msg){ global $DB; If (stristr ($msg, 'today')){ $m=date('m'); $d=date('d'); }else{ $text=str_replace (Array ('days in history '),' ', $msg); $t=explore ('month ', $text); $m=$t['0']; $d=$t['1']; } if($m && $d){ $m=str_replace(Array('01','02','03','04','05','06','07','08','09'),Array('01'=>'1','02'=>'2','03'=>'3','04'=>'4','05'=>'5','06'=>'6','07'=>'7','08'=>'8','09'=>'9'),$m); if($m<'0'){$m='1';}elseif($m>'13'){$m='12';} $d=str_replace(Array('01','02','03','04','05','06','07','08','09'),Array('01'=>'1','02'=>'2','03'=>'3','04'=>'4','05'=>'5','06'=>'6','07'=>'7','08'=>'8','09'=>'9'),$d); if($d<'0'){$d='1';}elseif($d>'32'){$d='31';} }else{ $m=str_replace(Array('01','02','03','04','05','06','07','08','09'),Array('01'=>'1','02'=>'2','03'=>'3','04'=>'4','05'=>'5','06'=>'6','07'=>'7','08'=>'8','09'=>'9'),date('m')); $d=str_replace(Array('01','02','03','04','05','06','07','08','09'),Array('01'=>'1','02'=>'2','03'=>'3','04'=>'4','05'=>'5','06'=>'6','07'=>'7','08'=>'8','09'=>'9'),date('d')); } } } ``` --- Only this memory
(April 2020) International export bandwidth of China's main backbone networks | 45th Statistical Report on China's Internet Development Author: Chuwen Time: 2020-12-14 Classification: talk of everything under the sun comment #Overview This article mainly excerpts relevant data such as the number of bandwidth of China's backbone network. If you need detailed data, please turn down "Data Source". backbone network === >Definition: > --- > >Internet backbone: Internet backbone >When several computers are connected, they can see other people's files. This is called LAN. Computers in the whole city are connected, which is called MAN. The network connecting cities is called backbone network. These backbone networks are the Internet approved by the state and can be directly connected with foreign countries. Other ISPs (Internet service providers) with access function have to use these backbone networks if they want to go abroad. #Statistics of international export bandwidth of China's main backbone networks in 2020 >Blogger's note: According to the laws of previous years, the statistics of international export bandwidth of China's main backbone networks are generally released in the first half of the year >Date of this data: April 28, 2020 >Reference data: [45th Statistical Report on Internet Development in China] [1] >Data source: [China Internet Network Information Center] [2] |Main backbone network operators | International export bandwidth quantity (Mbps)| | -------------------------- | ------------------------ | |China Telecom China Unicom China Mobile | 8651625| |China Science and Technology Network | 114688| |China Education and Research Computer Network | 61440| |Total | 8827751| ! [Number of international export bandwidth of China's main backbone networks in 2020] [3] #Comparison of Internet basic resources from December 2018 to December 2019 Comparison of China's international export bandwidth in December 2018 and December 2019 |Category | December 2018 | December 2019 | Annual growth | Annual growth rate| | :--------------------- | ----------: | ----------: | :-------: | :------: | |IPv4 | 385843968 | 387508224 | 1664256 | 0.4%| |IPv6 (block/32) | 43985 | 50877 | 6892 | 15.7%| |Domain name (s) | 37927527 | 50942295 | -- | --| |Including: CN domain name (s) | 21243478 | 22426900 | 1183422 | 5.6%| |International outlet bandwidth (Mbps) | 7371738 | 8827751 | 1456013 | 19.8%| ! [2018.12 - 2019.12 Comparison of Internet Basic Resources. jpg] [4] #International export bandwidth of China's major backbone networks in previous years -[(February 2019) International export bandwidth of China's main backbone networks | 43rd Statistical Report on the Development of China's Internet] [5] -[(August 2018) International export bandwidth of China's main backbone networks | 42nd Statistical Report on China's Internet Development] [6] [1]: http://www.cnnic.cn/hlwfzyj/hlwxzbg/hlwtjbg/202004/t20200428_70974.htm [2]: http://www.cnnic.cn/ [3]: https://cdn.nowtime.cc/2020/12/14/174328654.jpg [4]: https://cdn.nowtime.cc/2020/12/14/3306361240.jpg [5]: https://nowtime.cc/news/757.html [6]: https://nowtime.cc/news/556.html
The website has a new theme (Littlehands), full site Ajax Author: Chuwen Time: 2020-11-02 Classification: talk of everything under the sun comment #Overview Since the blog has been changed by me, I plan to reinstall it and start from scratch #Theme Some old friends may know that my theme has always been the default theme of Typecho. It has been changed for two or three years. In fact, I want to change it in the past, but I find some good themes that do not conform to the layout of the article (that is, the default theme of Typecho is good, and new ones are not good) Recently, I found a theme based on Typecho transformation - Littlehands, which I think is very beautiful, so I replaced it
2020 King Glory Skin Return Voting Ranking List Data List Skin Return Voting Ranking List Real time View Author: Chuwen Time: 2020-10-17 Classification: talk of everything under the sun comment #Real time ranking list of returning skin votes: [click to enter] [1] >You can share it with your friends ##At present, the top 5 are: >The top 2 qualified skins in the voting results will be sold directly from October 28 to November 1, and the top 3 to 5 can choose one of their own (only on November 1) -Hundred Li Xuance White Tiger Record -Monkey King - Great Sage Marries -Keeping the Promise for a Hundred Miles - Zhu Que Zhi -Armor Green Dragon Record -Zhuang Zhou Cloud Dream Architect ! [2020 King Glory Skin Return Voting Ranking Data List Real time View of Skin Return Voting Ranking] [2] [1]: https://pvp.nowtime.cc [2]: https://cdn.nowtime.cc/2020/10/17/2079993552.png