lightster/dnsmasq-mgmt 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

lightster/dnsmasq-mgmt

最新稳定版本:v0.0.11

Composer 安装命令:

composer require lightster/dnsmasq-mgmt

包简介

Tool for managing `address` entries in dnsmasq

README 文档

README

Tool for pointing wildcarded domains to your local development machine

Dnsmasq provides network infrastructure for small networks. dnsmasq-mgmt is a tool that installs Dnsmasq and eases the configuration to locally point domains to IP addresses of your choosing.

dnsmasq-mgmt was built to avoid manually updating Dnsmasq or /etc/hosts configuration files.

Currently dnsmasq-mgmt is only supported on macOS.

Installation

Use composer to install dnsmasq-mgmt via:

composer global require "lightster/dnsmasq-mgmt=~0.0.9"

Then allow dnsmasq-mgmt to restart Dnsmasq and clear the operating system's DNS cache without requesting the sudo password each time:

sudo ~/.composer/vendor/bin/dnsmasq-mgmt sudoers:install

The last step in installation is to actually install Dnsmasq and setup directories utilized by Dnsmasq:

~/.composer/vendor/bin/dnsmasq-mgmt dnsmasq:install

Configuring domains

Adding a domain

To have b.com point and subdomains of b.com point to localhost, run:

~/.composer/vendor/bin/dnsmasq-mgmt address:add b.com 127.0.0.1

Removing a domain

To remove b.com, run:

~/.composer/vendor/bin/dnsmasq-mgmt address:add b.com 127.0.0.1

Advanced usage

Make dnsmasq-mgmt readily available

Rather than needing to call dnsmasq-mgmt with a path of ~/.composer/vendor/bin/dnsmasq-mgmt every time, add ~/.composer/vendor/bin/ to the PATH environment variable in your ~/.bash_profile configuration:

PATH="$PATH:${HOME}/.composer/vendor/bin"

Other commands

dnsmasq-mgmt offers a few other commands. You can get a full list of commands by running the list subcommand:

dnsmasq-mgmt list

Install shell completion

If you are using bash or zsh, you can install shell completion for dnsmasq-mgmt.

For Bash, add the following to your ~/.bashrc (or ~/.bash_profile):

source  ~/.composer/vendor/lightster/dnsmasq-mgmt/bin/dnsmasq-mgmt-completion.bash

For zsh, add the following to your ~/.zshrc:

source  ~/.composer/vendor/lightster/dnsmasq-mgmt/bin/dnsmasq-mgmt-completion.zsh

统计信息

  • 总下载量: 163
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-01-14