惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
Microsoft Security Blog
Microsoft Security Blog
NISL@THU
NISL@THU
T
Threatpost
T
The Exploit Database - CXSecurity.com
T
Threat Research - Cisco Blogs
S
Securelist
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
S
Secure Thoughts
MyScale Blog
MyScale Blog
O
OpenAI News
P
Palo Alto Networks Blog
美团技术团队
C
Cyber Attacks, Cyber Crime and Cyber Security
TaoSecurity Blog
TaoSecurity Blog
量子位
L
Lohrmann on Cybersecurity
G
GRAHAM CLULEY
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
Know Your Adversary
Know Your Adversary
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Simon Willison's Weblog
Simon Willison's Weblog
宝玉的分享
宝玉的分享
PCI Perspectives
PCI Perspectives
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tenable Blog
I
InfoQ
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
S
Security @ Cisco Blogs
S
Schneier on Security
B
Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
The Cloudflare Blog
AWS News Blog
AWS News Blog
IT之家
IT之家
V
Vulnerabilities – Threatpost
The Hacker News
The Hacker News
H
Heimdal Security Blog
I
Intezer
A
Arctic Wolf
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Help Net Security
W
WeLiveSecurity

繁星点点

最新轻量级龙虾部署教程 通过netboot.xyz重装系统 giffgaff卡保号教程 Llinux系统中全新透明代理方案(可代理所有出站流量) tailscale开启子网路由常见的坑 OpenWrt固件编译 解决UFW和Docker的问题 使用PGP的非对称算法加密文件 NSSM工具把任意exe程序注册为Windows后台服务 轻量级简约端口转发rinetd 安卓IDE的安装和使用 IP信息查询网站汇总 热点共享代理教程 SSH使用密钥认证登录详细解释 Debian系统公网IP出口切换指南,适用多IP服务器 Windows系统安装Scoop包管理器 安卓Flutter开发学习笔记 使用手机搭建节点服务端 关于github提交记录泄露真实邮箱的处理办法 anytls协议部署教程 caddy给域名用上ECH加密 通过gitlab流水线自动备份仓库 通过CF-Workers代理访问网站 低配机器使用alpine系统跑docker 端口敲门教程 3x-ui面板通过api管理示例 nmap端口扫描 数据库常用命令 snap和winget包管理器 Git推送GitHub常用命令 😩😩😩学不完,根本学不完😩😩😩 使用CDN后获取访客真实IP 一些用于网络测试的下载测速文件 纯v6网络访问v4站点最简单的方法 服务器配置SSH密钥登录 windows重装系统教程 Docker部署哪吒监控 Github-Actions默认用户变量GITHUB_TOKEN的提权语法 给站点套CFT的一些坑 解决CF反代Docker失效的问题 使用py3快速启动一个文件上传和下载的接口 ios系统最新免拔卡使用tiktok方法 clash手搓配置最全协议示例详解 为IP地址申请免费证书并开启HTTPS 实用网站收藏 纯CSS实现剧透效果 在CloudflareWAF中屏蔽国内浏览器 网络安全之百度URL欺骗漏洞分析和复现 超级强大的ansible批量管理主机运维工具使用教程 收集整理的最新的常用VPS脚本工具 无法注册TG账号和国内号码接收不到验证码详细解决方案 国内环境安装xui面板 免费接码网站合集 完整的网络状态码列表 关于xui面板报错无法监听127.0.0.1:62789的问题 Xboard面板常见问题 项目编译构建文档 ios最新美区ID注册方法 V2board前后端分离 Markdown语法教程 Docker镜像加速和离线安装 Liunx配置wrap 代理工具和SSH工具推荐 常用代码记录
Github加速
2024-07-02 · via 繁星点点

GitHub加速站

本地代理:

sudo vim ~/.bashrc
export all_proxy="socks5://127.0.0.1:10808"
export HTTP_PROXY="socks5://127.0.0.1:10808"
export HTTPS_PROXY="socks5://127.0.0.1:10808"
source ~/.bashrc

此时输入curl ip.sb查看本机IP判断是否配置成功

如需删除并停止,只需清空文件并重新加载即可

注意:如果脚本命令前面带sudo,则需要添加-E传递环境变量才会生效

Git加速域名

# 设置全局加速
git config --global url."https://gh-proxy.com/https://github.com/".insteadOf https://github.com/

# 移除
git config --global --unset url."https://gh-proxy.com/https://github.com/".insteadOf

# 验证
git config --global --get-regexp github

Git代理

git config --global http.proxy socks5://127.0.0.1:10808
git config --global https.proxy socks5://127.0.0.1:10808

v2rayA代理

官方文档

手动使用软件源安装

手动下载v2rayA软件源上传到服务器

手动下载xray软件源上传到服务器

安装

sudo apt install xray.deb路径 v2rayA.deb路径

替换两个deb包所在的实际路径

启动

sudo systemctl start v2raya.service
默认端口:
2017: v2rayA面板端口
20170: SOCKS协议
20171: HTTP协议
20172: 带分流规则的HTTP协议
32345: tproxy透明代理所需

卸载

sudo apt-get remove v2raya xray

快捷安装方式

v2ray内核

sudo apt install snapd
sudo snap install v2raya

需要修改配置文件

sudo vim /etc/systemd/system/snap.v2raya.v2raya.service

ExecStart参数后面增加 --address 0.0.0.0:2017,只需增加即可,注意空格需保留。

加载并重启

sudo systemctl daemon-reload
sudo systemctl restart snap.v2raya.v2raya.service

卸载

sudo snap remove v2raya

win系统安装

以管理员身份运行PowerShell

winget install --id v2rayA.v2rayA

会自动安装到桌面,启动后自动配置系统代理,端口为52345

部分应用(比如命令行程序)可能不读取或者不使用系统代理,你可能需要proxychains来强行让它们走代理,或者使用程序自身的代理配置。

如果 v2rayA 意外退出,那么 v2rayA 无法在退出的时候帮你取消系统代理,这种情况下你需要自行去Internet选项或者系统设置里面关掉代理。

更新

winget upgrade --id v2rayA.v2rayA

卸载

winget uninstall --id v2rayA.v2rayA

开机自启

将你scoop\shims目录下的start-v2raya.cmd复制到启动文件夹(一般位于 C:\Users\YourUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup)。

命令运行示例:

Copy-Item -Path '~\scoop\shims\start-v2raya.cmd' -Destination '~\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup'


国内Debian / Ubuntu切换apt源

国内一键换源脚本

bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh)

手动换源

需要root权限

先备份sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

打开文件/etc/apt/sources.list

国内清华大学debian 11

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free

国内清华大学ubuntu 20.04

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

## Pre-released source, not recommended.
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

官方debian 11

deb https://deb.debian.org/debian/ bullseye main contrib non-free
deb-src https://deb.debian.org/debian/ bullseye main contrib non-free

deb https://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src https://deb.debian.org/debian/ bullseye-updates main contrib non-free

deb https://deb.debian.org/debian/ bullseye-backports main contrib non-free
deb-src https://deb.debian.org/debian/ bullseye-backports main contrib non-free

deb https://deb.debian.org/debian-security/ bullseye-security main contrib non-free
deb-src https://deb.debian.org/debian-security/ bullseye-security main contrib non-free

官方debian 12

deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware

deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware

deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware

更新源

sudo apt update

切换完成


配置 APT 包管理器的代理服务器设置

编辑/etc/apt/apt.conf.d/proxy.conf

Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";
sudo apt update

修改系统hosts文件实现加速(老方法不稳定):

  • 文件路径:
windows: C:\Windows\System32\drivers\etc 
linux: /etc/hosts
  • 格式:
127.0.0.11 github.com
127.0.0.11 raw.githubusercontent.com
127.0.0.11 assets-cdn.github.com
127.0.0.11 github.global.ssl.fastly.net

127.0.0.11替换为查询到的地址

可以从这里获取最新可用的hosts地址:https://github.com/521xueweihan/GitHub520/blob/main/hosts

该内容会每天自动更新。

修改 hosts 文件

hosts 文件在每个系统的位置不一,详情如下:

  • Windows 系统:C:\Windows\System32\drivers\etc\hosts
  • Linux 系统:/etc/hosts
  • Mac(苹果电脑)系统:/etc/hosts
  • Android(安卓)系统:/system/etc/hosts
  • iPhone(iOS)系统:/etc/hosts

修改方法,把上面的内容复制到文本末尾:

  1. Windows 使用记事本
  2. Linux、Mac 使用 Root 权限:sudo nano /etc/hosts
  3. iPhone、iPad 须越狱、Android 必须要 root

激活生效

大部分情况下是直接生效,如未生效可尝试下面的办法,刷新 DNS:

  1. Windows:在CMD窗口输入:ipconfig /flushdns

  2. Linux命令:sudo systemctl restart nscd 如报错则须安装:sudo apt install nscdsudo /etc/init.d/nscd restart

  3. Mac命令:sudo killall -HUP mDNSResponder

PS: 上述方法无效可以尝试重启机器。