bmy001 最近的时间轴更新
bmy001's repos on GitHub
Go · 23 人关注
geoip
🌚 🌍 🌝 基于IPinfo.io生成的Geo2Country mmdb数据库,比MaxMind数据库更加准确。 GeoIP 规则文件加强版,同时支持定制 V2Ray dat 格式路由规则文件 geoip.dat 和 MaxMind mmdb 格式文件 Country.mmdb。Enhanced edition of GeoIP files for V2Ray, Xray-core, Trojan-Go, Clash and Leaf, with replaced CN IPv4 CIDR available from ipip.net, appended CIDR lists and more.
Shell · 21 人关注
Clash_GlobalAccelerator_Autogen
Clash Global Accelerator, Clash全球网络加速服务, 按IP地址自动选择最优路由配置,无需各种规则分流,自动选择最优路由。
HTML · 4 人关注
johnnysun.github.io
Kotlin · 2 人关注
ClashForAndroid-Geoip
C++ · 1 人关注
Android_NDK_Render_Demo
SurfaceView render demo implement by android ndk
Kotlin · 1 人关注
AreYouBatteryOk
Andorid battery loss detecting tool
Java · 1 人关注
Clash_of_clans_Forecaster
C++ · 1 人关注
Den_Project_Node
A system for Adruino. And alos is "智能家居计划Arduino节点部分"
C · 1 人关注
Linux_Kernel_Module_Study
我的Linux Kernel Module学习的代码
C++ · 1 人关注
Marlin_Wifi_CC3000
Use Pcint inside of int, NOT WORK NOW.
0 人关注
AndroidAnimatorGuide
安卓动画的一些思路和基本封装 便于开发
Shell · 0 人关注
apt-cyg
Apt-cyg, an apt-get like tool for Cygwin
Assembly · 0 人关注
Assembly_Study
My Assembly Study
C++ · 0 人关注
Cloud-experiment-platform
操作系统课程云实验平台
Shell · 0 人关注
common-dockerfile
一些常用的dockerfile,用于Rivoreo Pi Proj.
C++ · 0 人关注
CPP-Study
My CPP-Study
C · 0 人关注
Data-Structure_Exec
Data Structure_Exec
C++ · 0 人关注
Den_Project_PC
智能家居PC
0 人关注
docker-cloudflare-ddns
A small amd64/ARM/ARM64 Docker image that allows you to use CloudFlare as a DDNS / DynDNS Provider.
Java · 0 人关注
ForceStopGB
Xposed插件 阻止运行 @liudongmiao
Java · 0 人关注
Gadgetbridge
A free and cloudless replacement for your gadget vendors' closed source Android applications. Pebble and Mi Band supported.
Java · 0 人关注
GCM_study_demo
A demo for study GCM Notification.
Python · 0 人关注
GregTech6-Translation-Project
格雷科技6 汉化工程
Java · 0 人关注
Handler_demo
This is the basic usage of android handler
C++ · 0 人关注
heart-c
一颗c代码的心
VimL · 0 人关注
k-vim
vim配置
C · 0 人关注
LEDBlink
A Kernel Module to control raspberrypi GPIO.
Java · 0 人关注
material-theme-jetbrains
JetBrains theme of Material Theme
0 人关注
Material_Blog
free & open-source way to a one-click blog/website on GitHub with Jekyll and MaterializeCSS based on google™'s material design specifications
TypeScript · 0 人关注
metacubexd
Mihomo Dashboard, The Official One, XD
bmy001

bmy001

V2EX 第 72039 号会员,加入于 2014-08-26 15:52:47 +08:00
54 S 64 B
bmy001 最近回复了
See: https://wiki.archlinux.org/title/WireGuard

After resolving a server's domain, WireGuard will not check for changes in DNS again.
If the WireGuard server is frequently changing its IP-address due DHCP, Dyndns, IPv6, etc., any WireGuard client is going to lose its connection, until its endpoint is updated via something like wg set "$INTERFACE" peer "$PUBLIC_KEY" endpoint "$ENDPOINT".
Also be aware, if the endpoint is ever going to change its address (for example when moving to a new provider/datacenter), just updating DNS will not be enough, so periodically running reresolve-dns might make sense on any DNS-based setup.
Luckily, wireguard-tools provides an example script /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh, that parses WG configuration files and automatically resets the endpoint address.
One needs to run the /usr/share/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh /etc/wireguard/wg.conf periodically to recover from an endpoint that has changed its IP.
One way of doing so is by updating all WireGuard endpoints once every thirty seconds[6] via a systemd timer:

/etc/systemd/system/wireguard_reresolve-dns.timer

[Unit]
Description=Periodically reresolve DNS of all WireGuard endpoints

[Timer]
OnCalendar=*:*:0/30

[Install]
WantedBy=timers.target


/etc/systemd/system/wireguard_reresolve-dns.service

[Unit]
Description=Reresolve DNS of all WireGuard endpoints
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c 'for i in /etc/wireguard/*.conf; do /usr/share/doc/wireguard-tools/examples/reresolve-dns/reresolve-dns.sh "$i"; done'

Afterwards enable and start wireguard_reresolve-dns.timer
好东西 感谢楼主
@shunia 高精 ip 的话,常用的 ip 变化没那么频繁.一般一周 一个月更新一次就行 pc 也可以写一个 crontab 来自动化执行
@Misakax 😂 我暂时只适配了 dler 的 如果不是 就得自己改一下 proxies- providers 了
@amamiya 抽空我试一下
@isad 这是自己做的路由,直接按地区走机场的专线落地对应地区了。 至少少了国内出国这部分线路。 虽然落地后也有类似的问题,不过只要落的不差太多,就会就近路由到对应 AS 的
楼主可以看看 ipinfo.io 他们家的数据库
@sss15 clash 的配置我还没写。mmdb 的话倒是通用的,但是分流规则啥的实际上写法还是和 quantmultx 略有区别。后续应该还是要再写一个模版 定时生成主流配置
256 天前
回复了 eggsblue 创建的主题 Apple 想买 待机显示 的充电底座
小米的 magsafe 充电宝,平时就用来当底座用,应急还能当个外接电池
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2477 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 17ms · UTC 06:23 · PVG 14:23 · LAX 23:23 · JFK 02:23
Developed with CodeLauncher
♥ Do have faith in what you're doing.