Coder Social home page Coder Social logo

soulteary / remote-hosts-server Goto Github PK

View Code? Open in Web Editor NEW
22.0 1.0 0.0 1.51 MB

Tiny(~5MB), Easy, Docker Support. Manage and share your Hosts configuration, suitable for tools such as Switch Hosts.

Home Page: https://soulteary.com/2022/10/24/online-sharing-hosts-rules-tool-remote-hosts-server.html

License: GNU General Public License v3.0

Go 20.94% CSS 17.07% JavaScript 47.89% HTML 14.10%
hosts hosts-file hosts-file-edit hosts-manage hosts-management switchhosts

remote-hosts-server's Introduction

Remote Hosts Server

CodeQL

ENGLISH | 中文文档

Tiny (5MB), Muti-Arch (ARM, x86) ,Easy (One Command), Docker Support (ARM, x86)

Manage and share your Hosts configuration, suitable for tools such as SwitchHosts.

Quick Start

Download the binaries from GitHub Releases page, then quickly start a service for sharing Hosts with just one command:

./remote-hosts-server

If you are a Docker user, you can use the following command instead:

docker run --rm -it -v `pwd`/data:/data -p 8080:8080 soulteary/remote-hosts-server

After the program runs, the service will be started on port 8080 by default, the port can be adjusted by setting something like PORT=8090 ./remote-hosts-server.

Then open the browser and you will see the interface, Update the Hosts content to your liking, then save it.

The program will intelligently judge whether it needs to be reviewed according to the actual situation, so as to avoid wrong submission and affect the normal use.

If you always don't want the second confirmation interface, you can add parameters MODE=simple (docker -e "MODE=simple") at startup to avoid it.

When we save the HOSTS, we can get the shared Hosts configuration by visiting http://ip:port/api/hosts (eg: http://localhost:8080/api/hosts)

Fill this address into Switch Hosts, set the appropriate update frequency, click Update Data to verify whether the data can be obtained, and then click OK to automatically update the configuration.

Docker

If you are used to using Docker Compose, you can refer to the following configuration:

version: '2'
services:

  remote-hosts-server:
    image: soulteary/remote-hosts-server
    ports:
      - "8080:8080"
    environment:
      # same with ports
      - PORT=8080
      # mode: normal or simple
      - MODE=normal
    volumes:
      - ./data:/data

Resources

remote-hosts-server's People

Contributors

dependabot[bot] avatar soulteary avatar

Stargazers

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

Watchers

 avatar

remote-hosts-server's Issues

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.