Files
nexus/wiki/sources/ubuntu-server-scientific-internet-access-guide.md
2026-04-17 08:38:12 +08:00

46 lines
1.8 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-17
---
## Source File
- [[raw/Home Office/Ubuntu Server科学上网.md]]
## Summary
- 核心主题:在 Ubuntu Server 上配置代理实现科学上网
- 问题域Docker 环境下的代理配置
- 方法/机制V2RayN 客户端 + ProxyChains + Git 代理 + Docker Daemon/容器代理
- 结论/价值解决终端命令、Git、Docker 镜像拉取、容器内应用的网络代理需求
## Key Claims
- curl 可以直接指定 SOCKS5 代理测试科学上网连通性
- ProxyChains 可让原本不支持代理的终端命令通过代理运行
- Git 需要单独配置代理,不会自动读取系统环境变量
- Docker 守护进程Daemon不读取普通用户环境变量需要通过 systemd 配置
- Docker 容器内应用代理可通过 ~/.docker/config.json 全局配置或运行时 -e 参数指定
## Key Quotes
> "git config --global http.proxy 'socks5://127.0.0.1:10808'" — Git 全局代理配置
> "docker info | grep -i proxy" — 验证 Docker 代理配置是否生效
## Key Concepts
- [[SOCKS5代理]]:支持 TCP/UDP 的网络代理协议,隐匿真实 IP
- [[代理链 (ProxyChains)]]:强制终端命令走代理的工具
- [[Docker Daemon 代理]]:通过 systemd 服务配置让 Docker 守护进程使用代理
- [[透明代理]]:通过防火墙规则强制流量走代理的机制
## Key Entities
- [[V2RayN]]Windows/Linux 代理客户端
- [[V2Ray]]:代理软件核心,支持多种协议
## Connections
- [[Ubuntu Server科学上网指南]] ← depends_on ← [[V2Ray]]
- [[ProxyChains]] ← used_by [[Ubuntu Server科学上网指南]]
- [[Docker]] ← configured_with [[Docker Daemon 代理]]
## Contradictions
- (暂无冲突记录)