V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
tushan
V2EX  ›  程序员

有什么可以部署在服务器上的 http https 代理软件吗?

  •  
  •   tushan · 2024-02-22 21:12:34 +08:00 · 2532 次点击
    这是一个创建于 365 天前的主题,其中的信息可能已经有所发展或是发生改变。

    本人作为开发者,想着单纯的给 docker desktop 配置一个 http 代理,不想开全局魔法上网,所以有没有那种可以在服务器上搭建代理的软件?用来给 docker 提供镜像 push 和 pull 。

    15 条回复    2024-02-27 21:03:16 +08:00
    ShineyWang
        1
    ShineyWang  
       2024-02-22 21:31:38 +08:00 via Android
    http_proxy 软件很成熟
    clash 也有各种客户端
    docker 也很成熟
    随便搜搜都有很多方案
    silentiris
        2
    silentiris  
       2024-02-23 00:09:49 +08:00
    以前有一个很好用的 clash 服务器的客户端,现在也删库跑路了
    tool2d
        3
    tool2d  
       2024-02-23 00:36:30 +08:00
    wireproxy 可以,虽然停止维护了,正常使用 http 代理没啥问题,协议也是最新的 wireguard ,绝对安全。

    https://github.com/mysteriumnetwork/wireproxy
    hxy100
        4
    hxy100  
       2024-02-23 08:01:40 +08:00
    如果是海外服务器,最好还是考虑 trojan 或者 v2ray 之类服务端客户端相结合的方案吧,纯纯搭一个 HTTP/HTTPS 代理,小心被国家防火墙把你的端口或者 IP 直接干掉,那就得不偿失了
    datocp
        5
    datocp  
       2024-02-23 08:15:21 +08:00
    给 windows update 配置了一个 http 代理,需要借助 socks5
    3proxy.cfg 配合 stunnel ,完美

    auth iponly
    #nserver 8.8.8.8
    nscache 65536
    maxconn 1000
    fakeresolve
    allow *
    authcache ip 3600
    parent 1000 socks5+ 127.0.0.1 1085
    log
    logformat "L[%d-%m-%Y %H:%M:%S.%.]- %N %p %C:%c %R:%r %Q:%q %e %I:%O %T %E"
    rotate 31
    proxy -s0 -olSO_REUSEADDR,SO_REUSEPORT -ocTCP_TIMESTAMPS,TCP_NODELAY -osTCP_NODELAY -a -p8080 -i0.0.0.0
    juzisang
        6
    juzisang  
       2024-02-23 09:12:36 +08:00
    用 clash ,我是用的 `docker swarm` 集群,`7890` 就是代理端口,当代理服务用,clash 还支持分流啥的,很好用

    `9090` 是控制端口,`https://clash.razord.top/?host=127.0.0.1&port=9090#/proxies`,可以用来看日志和控制节点分流

    再分享下 clash 的配置 https://github.com/juzisang/Rules/blob/main/clash.yaml

    ```yaml
    version: "3.9"

    services:
    clash-proxy:
    image: metacubex/mihomo:v1.18.1
    networks:
    - cluster
    environment:
    - TZ=Asia/Shanghai
    configs:
    - source: clash_config
    target: /root/.config/mihomo/config.yaml
    volumes:
    - /etc/timezone:/etc/timezone:ro
    - /etc/localtime:/etc/localtime:ro
    # - ./config.yaml:/root/.config/clash/config.yaml
    ports:
    - target: 7890
    published: 7890
    protocol: tcp
    mode: host
    - target: 9090
    published: 9090
    protocol: tcp
    mode: host
    deploy:
    replicas: 1
    restart_policy:
    condition: on-failure
    delay: 5s
    max_attempts: 3
    window: 120s
    placement:
    constraints:
    - node.labels.type==cloud

    configs:
    clash_config:
    file: ./config.yaml

    networks:
    cluster:
    external: true
    ```
    danbai
        7
    danbai  
       2024-02-23 09:16:49 +08:00 via Android
    gost
    Mystery0
        8
    Mystery0  
       2024-02-23 09:29:47 +08:00 via Android
    squid
    sujin190
        9
    sujin190  
       2024-02-23 09:31:11 +08:00
    使用量不大的化,可以

    python -m sevent.helpers.simple_proxy -p 8888

    或者

    docker run -d -p 8888:8888 sujin190/sevent python -m sevent.helpers.simple_proxy -p 8888
    vacuitym
        10
    vacuitym  
       2024-02-23 09:54:17 +08:00
    Jack927
        11
    Jack927  
       364 天前
    gost
    Elroooo0Y
        12
    Elroooo0Y  
       364 天前
    在服务器上用魔法, 可能会被封. 我被封禁过一次.
    docker pull 可以使用国内的镜像
    push 的话, 可以选择香港的服务器进行构建.
    tushan
        13
    tushan  
    OP
       364 天前
    @Elroooo0Y 因为用国内镜像的话 docker 的 login 状态是未登录,所以我还是得需要代理。仅仅是 docker 需要代理。
    tushan
        14
    tushan  
    OP
       364 天前
    @danbai 这个看着不错
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2639 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:43 · PVG 12:43 · LAX 20:43 · JFK 23:43
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.