当前位置:首页 > 免费VPS > 正文内容

在Github上部署一个免费的vps

freeai8个月前 (11-26)免费VPS3716

ngrok工具https://dashboard.ngrok.com/login


LocalTunnel https://theboroer.github.io/localtunnel-www/ 允许用户通过公网 URL 访问本地主机。


通过 SSH 来公开本地网站https://serveo.net/


使本地网站或服务通过安全的方式在公网上可访问https://pagekite.net/


Github配置代码:

name: Ubuntu Setup Workflow

on:
  push:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Install xrdp and configure for root
        run: |
          # Install xrdp
          sudo apt-get update
          sudo apt-get install -y xrdp

          # Configure xrdp to use the root user
          sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config

          # Set up the password for the root user to "admin"
          echo 'root:frepai' | sudo chpasswd

      - name: Install ngrok
        run: |
          # Download ngrok
          wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
          unzip ngrok-stable-linux-amd64.zip
          chmod +x ngrok
          mv ngrok /usr/local/bin/

      - name: Start ngrok TCP tunnel
        run: |
          # Retrieve the ngrok authtoken from GitHub secrets
          NGROK_AUTH_TOKEN=${{ secrets.NGROK_AUTH_TOKEN }}

          # Authenticate ngrok using the authtoken
          ngrok authtoken $NGROK_AUTH_TOKEN

          # Start ngrok with port 3389 (RDP) in the EU region
          ngrok tcp --region eu 3389 &

          # Sleep for a few seconds to ensure ngrok is running
          sleep 5

          # Get the public IP address provided by ngrok
          public_ip=$(curl -s http://localhost:4040/api/tunnels | jq -r '.tunnels[0].public_url')

          # Output the public IP address
          echo "Public IP Address: $public_ip"

      - name: Keep Alive
        run: |
          # Add a long-running command to keep the workflow alive
          while true; do
            echo "Workflow is running..."
            sleep 5184000  # Sleep for 1 hour
          done


微软远程桌面下载https://learn.microsoft.com/zh-cn/sysinternals/downloads/rdcman

“在Github上部署一个免费的vps” 的相关文章

免费RPD申请

免费RPD申请

RDP(远程桌面协议)主要有以下用途:远程工作:用户可以通过RDP连接到公司或家里的电脑,远程完成工作。IT支持:IT专业人员可以使用RDP远程访问用户的电脑进行维护或故障排除。教育和培训:教育机构可以提供远程实验室给学生,学生可以远程操作实验室的计算机。软件测试和开发:开发人员可以使用RDP连接到...

分享一款功能强大的服务器助手

序号功能详细说明1Install Speedtest.net安装 Speedtest.net安装网速测试工具 Speedtest.net,用于测试您的服务器的网络连接速度。2Install Monitoring安装监控工具安装服务器监控工具,用于监控服务器的资源使用情况(如 CPU、内存、磁盘等)以...

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。