#cloud #cloudflare #service #command-line #applications #port #aws

bin+lib 哨站

用于管理哨站的命令行应用程序

8 个版本

0.0.8 2024 年 6 月 30 日
0.0.7 2024 年 6 月 30 日

#1326网络编程

AGPL-3.0-only

36KB
282

License Build GitHub repo size Stars


哨站 允许您通过流行的云服务提供商将自托管的网络服务暴露给互联网。

Cloudflare

使用 Cloudflare 可以轻松托管 HTTP 网站

name: example_com

services:
  outpost:
    image: fossable/outpost:latest
    depends_on:
      - www
    environment:
      OUTPOST_CONFIG: |
        {
          "www.example.com": {
            "service": "www",
            "provider": "cloudflare",
            "ports": ["80:443"]
          }
        }
      OUTPOST_CLOUDFLARE_ORIGIN_CERT: |
        -----BEGIN PRIVATE KEY-----

  www:
    image: httpd:latest

AWS

哨站 还可以使用 EC2 代理来暴露任何 TCP/UDP 端口。代理实例通过临时的 Wireguard 隧道与源服务进行通信。

name: example_com

services:
  outpost:
    image: fossable/outpost:latest
    depends_on:
      - www
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    volumes:
      - /lib/modules:/lib/modules
    ports:
      - 51820:51820/udp
    sysctls:
      - net.ipv4.conf.all.src_valid_mark=1
    environment:
      OUTPOST_CONFIG: |
        {
          "www.example.com": {
            "service": "www",
            "provider": "aws",
            "ports": ["80:443"]
          }
        }
      AWS_ACCESS_KEY_ID: <...>
      AWS_SECRET_ACCESS_KEY: <...>

  www:
    image: httpd:latest

依赖关系

~15–41MB
~641K SLoC