Skip to content

Enable remapping of requests for one host to a different IP

Notifications You must be signed in to change notification settings

modjs/mod-hosts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hosts

enable remapping of requests for one host to a different IP, overriding DNS

Usage

By CLI

$ mod hosts "127.0.0.1 localhost"

By Modfile

module.exports = {
    plugins: {
        hosts: "mod-hosts"
    },
    tasks: {
        hosts: {
            group1:{
                hosts: "127.0.0.1 localhost"
            },
            group2:{
                hosts: ["127.0.0.1 www.qq.com", "127.0.0.1 example.com"]
            },
			group3:{
                hosts: "./path/to/my/hosts/file"
            }
        }
    },
    targets: {
        dist: "hosts"
    }
};

About

Enable remapping of requests for one host to a different IP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published