服务还是自己的最靠谱,第三方服务一定会坏技术
这次栽跟头了,倒在了第三方服务上,第三方的服务终究是靠不住的。
ifconfig.me 之前请求直接返回 IP,现在返回 HTML 文档。这是吃饱了撑的,还是流量大了做出来改变,总之,不靠谱!
让人蛋疼的事,页面的样式做的很丑还撑出框框外面来了,这实在是太不专业了。
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="content-style-type" content="text/css" /> <meta http-equiv="content-script-type" content="text/javascript" /> <meta http-equiv="content-language" content="en" /> <meta http-equiv="pragma" content="no-cache" /> <meta http-equiv="cache-control" content="no-cache" /> <meta name="description" content="Get my IP Address" /> <meta name="keywords" content="ip address ifconfig ifconfig.me" /> <meta name="author" content="" /> <link rel="shortcut icon" href="favicon.ico" /> <link rel="canonical" href="https://ifconfig.me/" /> <title>What Is My IP Address? - ifconfig.me</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href="./static/styles/style.css" rel="stylesheet" type="text/css"> <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet"> </head> <body> <div id="ad_container"> <div class="ad"> Need a robust API to Geolocate IPs and fetch other crucial information? Try <a href="https://ipinfo.io/?utm_source=ifconfig.me&utm_medium=referral&utm_campaign=upsell_sister_sites">IPinfo.io</a>. </div> </div> <div id="container" class="clearfix"> <div id="header"> <table> <tr> <td> <h1><a href="http://ifconfig.me">What Is My IP Address? - ifconfig.me</a></h1> </td> <td></td> </tr> <tr> <td></td> <td> <div id="plungins"> <div class="plungin" id="button_facebook"> <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script> <fb:like href="http://ifconfig.me/" send="false" layout="button_count" width="100" show_faces="true" font=""></fb:like> </div> <div class="plungin" id="button_twitter"> <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://ifconfig.me/" data-text="What Is My IP Address? - ifconfig.me" data-count="horizontal"></a> <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script> </div> <div class="plungin" id="button_plusone"> <!-- Place this tag where you want the +1 button to render --> <g:plusone size="medium" href="http://ifconfig.me/"></g:plusone> <!-- Place this render call where appropriate --> <script type="text/javascript"> (function () { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); </script> </div> </div> </td> </tr> </table> </div> <div id="info_area"> <h2>Your Connection</h2> <table id="info_table" summary="info"> <tr> <td class="info_table_label">IP Address</td> <td id="ip_address_cell"><strong id="ip_address"> xxx.xxx </strong></td> </tr> <tr> <td class="info_table_label">User Agent</td> <td> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 </td> </tr> <tr> <td class="info_table_label">Language</td> <td> en </td> </tr> <tr> <td class="info_table_label">Referer</td> <td> </td> </tr> <tr> <td class="info_table_label">Method</td> <td> GET </td> </tr> <tr> <td class="info_table_label">Encoding</td> <td> gzip, deflate, br </td> </tr> <tr> <td class="info_table_label">MIME Type</td> <td> text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 </td> </tr> <tr> <td class="info_table_label">Charset</td> <td> </td> </tr> <tr> <td class="info_table_label">X-Forwarded-For</td> <td> xxx.xxx,34.160.111.145 </td> </tr> </table> </div> <!--<div id="middle"></div>--> <div id="cli_wrap"> <h2>Command Line Interface</h2> <table id="cli_table" summary="cli"> <tr> <td class="cli_command">$ curl ifconfig.me</td> <td class="cli_arrow">⇒</td> <td> xxx </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/ip</td> <td class="cli_arrow">⇒</td> <td> xxx </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/ua</td> <td class="cli_arrow">⇒</td> <td> Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/lang</td> <td class="cli_arrow">⇒</td> <td> en </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/encoding</td> <td class="cli_arrow">⇒</td> <td> gzip, deflate, br </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/mime</td> <td class="cli_arrow">⇒</td> <td> text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/charset</td> <td class="cli_arrow">⇒</td> <td> </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/forwarded</td> <td class="cli_arrow">⇒</td> <td> xxx,34.160.111.145 </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/all</td> <td class="cli_arrow">⇒</td> <td> ip_addr: xxx <br> remote_host: unavailable <br> user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 <br> port: 40220 <br> language: en <br> referer: <br> connection: <br> keep_alive: <br> method: GET <br> encoding: gzip, deflate, br <br> mime: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 <br> charset: <br> via: 1.1 google <br> forwarded: xxx,34.160.111.145 <br> <br> </td> </tr> <tr> <td class="cli_command">$ curl ifconfig.me/all.json</td> <td class="cli_arrow">⇒</td> <td> {"ip_addr":"xxx","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36","port":"40220","method":"GET","encoding":"gzip, deflate, br","mime":"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7","via":"1.1 google","forwarded":"xxx,34.160.111.145","language":"en"} </td> </tr> </table> </div> <div id="footer">© 2024 ifconfig.me</div> </div> </body> </html>
折腾 Windows NTFS 权限技术
Windows 系统下对移动硬盘的修复工作。一下折腾记录。
Windows 修改文件权限的一下折腾记录。
我觉得挺麻烦,不如 Linux 系列的那么简单干脆。
情况就是移动移动使用 NTFS 文件系统,然后,MacOS 也写入,Linux 也写入,然后又插入 Windows,导致很多奇怪的体验,比如进入文件需要弹框获取权限,有些文件夹进不去,有些文件打不开等等。
右击,Properties,Security,Advanced。此时在最高处 owner 处点击change 。这个是第一步一定要做的,不然其他步骤做了也没用。
弹出框里面输入本机用户名,千万不要输入 Administrator,不然有些文件依然没法打开。输入后点击 OK,这个是修改文件属主,时间相对比较快。
删除流氓北京金山软件的残留文件技术
电脑被小孩无意中安装了金山毒霸,导致垃圾残留特别多。
如何删除 Windows\Program files\Kingsoft 文件夹和里面的 dll 文件。
本来卸载了也就算了,不管了,结果导致我 ssh 无法链接,后面就是一天的折腾。垃圾软件修改了防火墙规则。
删除防火墙残留,kingsoft and tencent。
删除 service.msc 残留。startup 残留。
删除 taskschd .msc 残留。
删除 注册表 regedit 残留。Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Kingsoft and Tencent。然后 剩下一个 Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\PackageFamily\Data\89。
WSA adb set activate_vpn allow技术
WSA 的设置
v2rayNG can run on Android Emulators. For WSA, VPN permission need to be granted via appops set [package name] ACTIVATE_VPN allow C:\Users\PC\AppData\Local\Packages\18184wherewhere.AndroidAppInstaller_4v4sx105x6y4r\LocalState\platform-tools>adb.exe connect 127.0.0.1:58526 * daemon not running; starting now at tcp:5037 * daemon started successfully connected to 127.0.0.1:58526 C:\Users\PC\AppData\Local\Packages\18184wherewhere.AndroidAppInstaller_4v4sx105x6y4r\LocalState\platform-tools>adb devices List of devices attached 127.0.0.1:58526 device adb shell appops set com.v2ray.ang ACTIVATE_VPN allow
debian datetime adjustment技术
debian 时间同步
Linux de 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Sun Sep 1 20:48:42 2024 from 192.168.11.1 root@de:~# timedatectl status Local time: Sun 2024-09-01 12:04:25 EDT Universal time: Sun 2024-09-01 16:04:25 UTC RTC time: Sun 2024-09-01 20:58:18 Time zone: US/Eastern (EDT, -0400) System clock synchronized: no NTP service: n/a RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'. root@de:~# chronyd -bash: chronyd: command not found root@de:~# apt install chrony Reading package lists... Done Building dependency tree... Done Reading state information... Done Suggested packages: dnsutils networkd-dispatcher The following NEW packages will be installed: chrony 0 upgraded, 1 newly installed, 0 to remove and 101 not upgraded. Need to get 287 kB of archives. After this operation, 644 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian bullseye/main amd64 chrony amd64 4.0-8+deb11u2 [287 kB] Fetched 287 kB in 12s (24.5 kB/s) Selecting previously unselected package chrony. (Reading database ... 33668 files and directories currently installed.) Preparing to unpack .../chrony_4.0-8+deb11u2_amd64.deb ... Unpacking chrony (4.0-8+deb11u2) ... Setting up chrony (4.0-8+deb11u2) ... Creating config file /etc/chrony/chrony.conf with new version Creating config file /etc/chrony/chrony.keys with new version dpkg-statoverride: warning: --update given but /var/log/chrony does not exist Created symlink /etc/systemd/system/chronyd.service → /lib/systemd/system/chrony.service. Created symlink /etc/systemd/system/multi-user.target.wants/chrony.service → /lib/systemd/system/chrony.service. root@de:~# timedatectl status Local time: Sun 2024-09-01 21:07:59 EDT Universal time: Mon 2024-09-02 01:07:59 UTC RTC time: Sun 2024-09-01 21:01:56 Time zone: US/Eastern (EDT, -0400) System clock synchronized: no NTP service: active RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'. root@de:~# chronyd Another chronyd may already be running (pid=4080632), check /run/chrony/chronyd.pid root@de:~# chronyd -Q 2024-09-02T01:09:10Z chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG) 2024-09-02T01:09:10Z Disabled control of system clock 2024-09-02T01:09:10Z Using right/UTC timezone to obtain leap second data 2024-09-02T01:09:15Z System clock wrong by 0.008633 seconds (ignored) 2024-09-02T01:09:15Z chronyd exiting root@de:~# date Mon 02 Sep 2024 09:09:18 AM CST root@de:~# chronyd -q 2024-09-02T01:10:08Z chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG) 2024-09-02T01:10:08Z Fatal error : Another chronyd may already be running (pid=4080632), check /run/chrony/chronyd.pid root@de:~# timedatectl status Local time: Sun 2024-09-01 21:10:41 EDT Universal time: Mon 2024-09-02 01:10:41 UTC RTC time: Sun 2024-09-01 21:10:41 Time zone: US/Eastern (EDT, -0400) System clock synchronized: yes NTP service: active RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'. root@de:~# chronyd -q 2024-09-02T01:13:18Z chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG) 2024-09-02T01:13:18Z Fatal error : Another chronyd may already be running (pid=4080632), check /run/chrony/chronyd.pid root@de:~# chronyd -Q 2024-09-02T01:13:22Z chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG) 2024-09-02T01:13:22Z Disabled control of system clock 2024-09-02T01:13:22Z Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/chrony.drift 2024-09-02T01:13:22Z Using right/UTC timezone to obtain leap second data 2024-09-02T01:13:27Z System clock wrong by -0.002952 seconds (ignored) 2024-09-02T01:13:27Z chronyd exiting root@de:~# ps aux | grep chrony _chrony 4080632 0.0 0.0 19032 3684 ? S 09:07 0:00 /usr/sbin/chronyd -F 1 _chrony 4080633 0.0 0.0 10840 2740 ? S 09:07 0:00 /usr/sbin/chronyd -F 1 root 4082093 0.0 0.0 6240 708 pts/0 S+ 09:13 0:00 grep chrony root@de:~# chronyd --help Usage: chronyd [OPTION]... [DIRECTIVE]... Options: -4 Use IPv4 addresses only -6 Use IPv6 addresses only -f FILE Specify configuration file (/etc/chrony/chrony.conf) -n Don't run as daemon -d Don't run as daemon and log to stderr -l FILE Log to file -L LEVEL Set logging threshold (0) -p Print configuration and exit -q Set clock and exit -Q Log offset and exit -r Reload dump files -R Adapt configuration for restart -s Set clock from RTC -t SECONDS Exit after elapsed time -u USER Specify user (_chrony) -U Don't check for root -F LEVEL Set system call filter level (0) -P PRIORITY Set process priority (0) -m Lock memory -x Don't control clock -v, --version Print version and exit -h, --help Print usage and exit root@de:~# root@de:~# systemctl status datetime Unit datetime.service could not be found. root@de:~# systemctl status chronyy Unit chronyy.service could not be found. root@de:~# systemctl status chrony ● chrony.service - chrony, an NTP client/server Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2024-09-02 00:07:56 CST; 9h ago Docs: man:chronyd(8) man:chronyc(1) man:chrony.conf(5) Process: 4080630 ExecStart=/usr/sbin/chronyd $DAEMON_OPTS (code=exited, status=0/SUCCESS) Main PID: 4080632 (chronyd) Tasks: 2 (limit: 18883) Memory: 1.4M CPU: 33ms CGroup: /system.slice/chrony.service ├─4080632 /usr/sbin/chronyd -F 1 └─4080633 /usr/sbin/chronyd -F 1 Sep 02 00:07:56 de systemd[1]: Starting chrony, an NTP client/server... Sep 02 00:07:56 de chronyd[4080632]: chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG) Sep 02 00:07:56 de chronyd[4080632]: Using right/UTC timezone to obtain leap second data Sep 02 00:07:56 de chronyd[4080632]: Loaded seccomp filter Sep 02 00:07:56 de systemd[1]: Started chrony, an NTP client/server. Sep 02 00:08:02 de chronyd[4080632]: Selected source 110.42.98.138 (2.debian.pool.ntp.org) Sep 02 00:08:02 de chronyd[4080632]: System clock wrong by 32397.260653 seconds Sep 02 09:07:59 de chronyd[4080632]: System clock was stepped by 32397.260653 seconds Sep 02 09:07:59 de chronyd[4080632]: System clock TAI offset set to 37 seconds Sep 02 09:08:01 de chronyd[4080632]: Selected source 202.112.29.82 (2.debian.pool.ntp.org) root@de:~# timedatectl status Local time: Sun 2024-09-01 21:18:01 EDT Universal time: Mon 2024-09-02 01:18:01 UTC RTC time: Sun 2024-09-01 21:18:01 Time zone: US/Eastern (EDT, -0400) System clock synchronized: yes NTP service: active RTC in local TZ: yes Warning: The system is configured to read the RTC time in the local time zone. This mode cannot be fully supported. It will create various problems with time zone changes and daylight saving time adjustments. The RTC time is never updated, it relies on external facilities to maintain it. If at all possible, use RTC in UTC by calling 'timedatectl set-local-rtc 0'. root@de:~# timedatectl set-local-rtc 0 root@de:~# timedatectl Local time: Sun 2024-09-01 21:41:41 EDT Universal time: Mon 2024-09-02 01:41:41 UTC RTC time: Mon 2024-09-02 01:41:41 Time zone: US/Eastern (EDT, -0400) System clock synchronized: yes NTP service: active RTC in local TZ: no root@de:~# date Mon 02 Sep 2024 09:41:48 AM CST root@de:~# hwclock 2024-09-02 05:43:22.743599+08:00 root@de:~# date Mon 02 Sep 2024 09:43:26 AM CST root@de:~# hwclock --show 2024-09-02 05:44:09.791545+08:00 root@de:~# hwclock --systohc root@de:~# hwclock --show 2024-09-02 09:45:16.177046+08:00 root@de:~# hwclock 2024-09-02 09:45:21.937260+08:00 root@de:~# date Mon 02 Sep 2024 09:45:23 AM CST