配置 Docker 的代理或镜像源

配置代理

创建或编辑 /etc/systemd/system/docker.service.d/http-proxy.conf 文件,写入以下内容:

1[Service]
2Environment="ALL_PROXY=http://192.168.1.100:7890"
3Environment="HTTP_PROXY=http://192.168.1.100:7890"
查看全文
查看全文

有多个网卡时组播收不到消息

遇到组播有概率收不到消息的问题,经分析是由于没有指定网络接口导致的。

该设备上有两个网卡,组播消息来自 192.168.32.31 所在的网络:

1> ipconfig
2
3Windows IP Configurtion
查看全文

npm audit 报 404 错误

现象:

1$ npm audit fix
2npm WARN audit 404 Not Found - POST https://registry.npmmirror.com/-/npm/v1/security/audits/quick - [NOT_IMPLEMENTED] /-/npm/v1/security/* not implemented yet
3{ error: '[NOT_IMPLEMENTED] /-/npm/v1/security/* not implemented yet' }
4npm ERR! audit endpoint returned an error
查看全文
查看全文

WSL 使用宿主机上的代理

宿主机通过一个虚拟网卡与 WSL 进行连接,将代理设置为该网卡的 IP 地址即可。

在宿主机上可以通过 ipconfig 命令查看该网卡的地址:

1以太网适配器 vEthernet (WSL):
2
3   连接特定的 DNS 后缀 . . . . . . . :
查看全文
查看全文

Clash Mixin 规则配置

很多代理商的原生配置对墙内墙外的识别都不太好,可以通过 Mixin 配置进行增强。

以 Clash For Windows 为例:

  1. 首先在 General 界面打开 Mixin 功能
  2. 然后点击 Mixin 后面的设置图标按钮,打开 Mixin 的配置文件
  3. 参考 clash-rules 仓库。写入如下配置:
查看全文
查看全文

Linux 的 exec 函数之间的区别

Linux 的 exec 函数族中函数的原型如下:

1int execl(const char *pathname, const char *arg, ...);
2int execlp(const char *file, const char *arg, ...);
3int execle(const char *pathname, const char *arg, ...);
4
5int execv(const char *pathname, char *const argv[]);
查看全文