Git Product home page Git Product logo

ncfs's Introduction

๐Ÿš€ NGROK to Cloudflare Tunnel Script

  • This script will help you to create a tunnel to your local game server using ngrok and cloudflare.
  • The best solution for people behind NAT or firewall.
  • Creates a ngrok tcp tunnel and sets required dns record on cloudflare.
  • Opens your local game server to world without any hassle.
  • Port forwarding, firewall settings or any other configuration is not required, everything is handled by ngrok and cloudflare.

๐Ÿ‹ Use with docker

  • To start using this script, you need to install docker and docker-compose.
  • Download docker-compose.yml file
version: "3.8"

name: ncfs

networks:
    ncfs-net:

services:
    ncfs:
        image: barbarbar338/ncfs:buildx-latest 
        container_name: ncfs
        restart: unless-stopped
        ports:
            - 4040:4040
        networks:
            - ncfs-net
        environment:
            NGROK_TCP_PORT: <game server port here>
            NGROK_AUTH_TOKEN: <Your NGROK auth token here>
            CLOUDFLARE_AUTH_EMAIL: <Your Cloudflare email here>
            CLOUDFLARE_API_KEY: <Your Cloudflare Global API key here>
            CLOUDFLARE_ZONE_ID: <Your domain's Cloudflare Zone ID here>
            CLOUDFLARE_CNAME_RECORD_NAME: server.example.com
            # If the game supports SRV records, put the prefix here, otherwise leave blank
            CLOUDFLARE_SRV_RECORD_NAME: <SRV record name>
            CLOUDFLARE_SRV_RECORD_PREFIX: <SRV record prefix>
  • Edit docker-compose.yml file as you wish.
  • Run docker-compose up -d and wait
  • You (and everyone in the world!) can now connect to your game server using your domain name.

๐Ÿ“ฆ Templates

๐Ÿงฆ Contributing

Feel free to use GitHub's features.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/my-feature)
  3. Commit your Changes (git commit -m 'my awesome feature my-feature')
  4. Push to the Branch (git push origin feature/my-feature)
  5. Open a Pull Request

๐Ÿ”ฅ Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ž Contact

ncfs's People

Contributors

barbarbar338 avatar hidemaruowo avatar myshlongislongat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ncfs's Issues

Unknown host for SRV record

I've gone through the same process myself before I stumbled upon this repo, but I couldn't get the SRV name (mc.example.com) to resolve, no matter how many times I flush the dns cache.
I'm sure I have the CNAME record to point to the ngrok random url, and the SRV record to have the correct format in name field (_minecraft._tcp.mc.example.com) and the port number to be correct.

Also I noticed the last echo message in ncfs.sh outputs the ngrok random url but no the SRV name, is that because the SRV way is indeed not viable?

Self-updating docker image

Instead of building the image from zero every time a new update comes to ncfs.sh file, we can just clone the file from github every time it starts. In this way, there is no need to constantly update the image and everyone stays up to date in every way.

Docker version

That would be greate to have a docker image with ngrock and ths script

Ngrok quota

Hello!
I was told that ngrok had a quota of 1GB.
Does this implementation has the same problem?

Multiple instances?

Would it be possible if this can handle two servers? I was hoping I can run another instance of the shell, but since ngrok can only run 1 service if the default ngrok run script is used, I can't make it work.

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.