Files
nexus/wiki/sources/ubuntu-server-ke-xue-shang-wang.md
2026-04-14 16:02:50 +08:00

38 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Ubuntu Server科学上网"
type: source
tags: [docker, proxychains, ubuntu, v2rayn]
date: 2026-04-13
source_file: raw/Technical/Home Office/🟠Ubuntu Server科学上网.md
---
## Summary
- 核心主题Ubuntu Server通过V2RayN代理实现终端命令、Docker、Git的网络访问
- 问题域Linux环境下的代理配置
- 方法/机制ProxyChains终端代理 + Git全局代理 + Docker Daemon代理 + 容器内代理
- 结论/价值:针对不同场景提供差异化代理配置方案,覆盖所有网络访问路径
## Key Claims
- curl -x socks5h://127.0.0.1:10808可验证代理是否正常工作
- ProxyChains通过/etc/proxychains4.conf配置使任意命令通过代理执行
- Git代理通过git config --global设置http.proxy和https.proxy
- Docker pull由Daemon执行需修改systemd service的HTTP_PROXY环境变量
- Docker容器内代理需使用宿主机网桥IP如172.24.0.1而非127.0.0.1
## Key Concepts
- [[终端代理]]通过ProxyChains让原本不支持代理的命令走SOCKS5通道
- [[Git代理配置]]为Git命令设置全局代理解决clone卡顿问题
- [[Docker代理配置]]Docker Daemon层和容器层的代理隔离配置
## Key Entities
- [[V2Ray/Tuic]]提供SOCKS5代理的客户端
- [[Docker]]:容器平台,需要单独配置代理
- [[Ubuntu-Server]]:运行代理配置的操作系统
## Connections
- [[V2Ray/Tuic]] ← 代理来源 ← [[Docker]]
- [[V2Ray/Tuic]] ← 代理来源 ← [[Git代理配置]]
- [[ProxyChains]] ← 终端代理工具 ← [[V2Ray/Tuic]]
## Contradictions