Giter Club home page Giter Club logo

hosts's Introduction

hosts-modifier

Hosts file manager

Introduction

Hosts-modifier is a program that aims to help you manage the system hosts file (/etc/hosts on Linux/MacOS and C:\Windows\system32\drivers\etc\hosts on Windows). It simplifies the process of adding, removing and listing lines in the file. (Adding and Removing require administrator or super user privileges in the console or terminal.)

This program is designed for developers to help them manage host files, which they often do. (PHP develpment with XAMPP or any LAMPP stack, Laravel, Blocking sites etc...).

Installation

  1. Download from Releases page.

  2. Building from Source

Make sure you have golang, make and git installed for your operating system

$ git clone https://github.com/BrosSquad/hosts.git hosts && cd hosts
$ git checkout tags/v2.3.2 -b v2.3.2
$ make build VERSION=2.3.2 ENVIRONMENT=production RACE=0
$ make install

Make sure you've added $GOPATH/bin to the $PATH That's all.

Usage

hosts-modifier is a command line program

Get Help

$ hosts --help

Add Host

$ hosts add example.com 127.0.0.1
  • If you don't pass ip, defaults to "127.0.0.1" (same as example above)
$ hosts add example.com

Remove Host

$ hosts remove example.com

List Hosts

$ hosts list

Licence

This program is licensed under the terms of the GNU GPL v2 only.

hosts's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

cerealkiller97

hosts's Issues

Invalid hosts file on remove (Windows)

When remove command is used in hosts executable, it makes copy of hosts file in temporary file, when this file is moved(renamed) it loses default permissions.

File should not be moves, but truncated and then all lines copied.
This currently affects windows, other platforms are not tested

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.