Code Monkey home page Code Monkey logo

fastgateway's Introduction

FastGateway 管理端

FastGateway提供了基本的管理服务,提供简单的登录授权,和实时配置管理,从而实现动态路由的管理。

支持功能

  • 登录授权
  • 自动申请HTTPS证书
  • 自动续期HTTPS证书
  • dashboard监控
  • 静态文件服务
  • 单服务代理
  • 集群代理
  • 请求来源分析
  • 支持yaml导入导出

技术栈

后端技术栈

  • Asp.Net 8.0 用于提供基础服务
  • Yarp 用于提供反向代理服务
  • FreeSql用于提供数据库服务
  • JWT 用于提供登录授权服务
  • MiniApis 提供WebApi服务

前端技术栈

  • reset-css 用于重置浏览器默认样式
  • semi 用于提供基础组件
  • react-router-dom 用于路由管理

快速运行Gateway

docker run -d --restart=always --name=gateway-api -e PASSWORD=Aa123456 -p 8080:8080 -p 80:80 -p 443:443 -v $(pwd)/data:/data/ registry.cn-shenzhen.aliyuncs.com/tokengo/gateway-api:v1.0.0

Docker-Compose文件

services:
  gateway-api:
    image: registry.cn-shenzhen.aliyuncs.com/tokengo/gateway-api:v1.0.0
    restart: always
    container_name: gateway-api
    environment:
      PASSWORD: Aa123456
    ports:
      - 8080:8080 # 提供给web端调用的管理接口
      - 80:80 # Http代理端口
      - 443:443 # Https代理端口
    volumes:
      - ./data:/data/
      - ./certs:/app/certs/

如果并没有提供密码则默认

密码:Aa123456

支持HTTP3的docker-compose

services:
  gateway-api:
    image: registry.cn-shenzhen.aliyuncs.com/tokengo/gateway-api:v1.0.0-h3
    restart: always
    container_name: gateway-api
    environment:
      PASSWORD: Aa123456
    ports:
      - 8080:8080 # web管理端
      - 80:80 # Http代理端口
      - 443:443/udp # Https代理端口
      - 443:443/tcp # Https代理端口 Http3需要开启UDP和TCP,请注意防火墙设置是否允许
    volumes:
      - ./data:/data/
      - ./certs:/app/certs/

Linux使用systemd启动服务

下载Linux压缩包,然后解压程序,使用nano创建fastgateway.service

nano /etc/systemd/system/fastgateway.service

填写以下内容的时候记得替换配置

[Unit]
Description=FastGateway

[Service]
WorkingDirectory=你解压的目录
ExecStart=/usr/bin/dotnet 你解压的目录/FastGateway.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
KillSignal=SIGINT
SyslogIdentifier=dotnet-fastgateway
User=www-data
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

接下来,重新加载 systemd 以使新的服务单元文件生效:

systemctl daemon-reload

现在你可以启动服务了:

systemctl start fastgateway.service

要使服务在系统启动时自动启动,请启用它:

systemctl enable fastgateway.service

你可以使用下命令检查服务的状态:

systemctl status fastgateway.service

如果你需要停止服务,可以使用:

systemctl stop fastgateway.service

如果你对服务做了更改并需要重新加载配置,可以重新启动服务:

systemctl restart fastgateway.service

第三方下载

fastgateway's People

Contributors

239573049 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.