Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dnsproxy

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dnsproxy

A simple DNS proxy server for Node.js

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
12
Maintainers
1
Weekly downloads
 
Created
Source

node-dnsproxy

A simple DNS proxy server for Node.js
一个简单的 Node.js DNS 代理服务器

Installation 安装

npm install dnsproxy               # install from npm
sudo dnsproxy -a a.com:127.0.0.1 & # start dns proxy server
dig @localhost a.com               # test the server, return 127.0.0.1

Usage 使用

Usage: dnsproxy [-?hv] [-b address] [-p port] [-c true|false] [-a domain1:ip1 [domain2:ip2 [...]]] [-f filename]

Options:
  -?,-h         : this help
  -v            : show version and exit
  -b address    : set bind address
  -p port       : set bind port(default: 53)
  -c true|false : enable/disable cache
  -a domain:ip  : add one or more DNS recode
  -f filename   : load options from file

Pan-analytic 泛解析

sudo dnsproxy -a "*.a.com:127.0.0.1" "*.b.a.com:127.0.0.2" "*:127.0.0.3" &
dig @localhost xx.a.com          # return 127.0.0.1
dig @localhost xx.b.a.com        # return 127.0.0.2
dig @localhost any.other.domain  # return 127.0.0.3

Who am I 我是谁

When "ip" configuration is "localhost", node-dnsproxy returns the requesting host IP address
当"ip"配置为"localhost"时,node-dnsproxy 返回请求主机的ip地址 When "ip" configuration is "proxyhost", node-dnsproxy returns the binding IP address of the server 当"ip"配置为"proxyhost"时,node-dnsproxy 返回服务器绑定的ip地址

# start server on 192.168.1.1
sudo dnsproxy -a who.am.i:localhost who.are.you:proxyhost &

# run on 192.168.1.2
dig @192.168.1.1 who.am.i    # return 192.168.1.2
dig @192.168.1.1 who.are.you # return 192.168.1.1

# run on 192.168.1.3
dig @192.168.1.1 who.am.i   # return 192.168.1.3
dig @192.168.1.1 who.are.you # return 192.168.1.1

Keywords

FAQs

Package last updated on 02 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc