Asuran is a configurable web proxy with DNS redirection. Asuran is a race in Stargate Atlantis.
Asuran 是一个使用了 DNS 来实现的 HTTP 透明代理服务,可以配置代理的 URL 及操作。当然用做标准 HTTP 代理也是可以的。
Asuran 使用 golang 实现,使用 miekg godns 实现 DNS 服务。
- DNS Server
- run like a real DNS Server
- pass, redirect(like /etc/hosts),
block
, ornull
(can's found a IP) a request - redirect to asuran's HTTP Proxy(like a transparent HTTP proxy)
delay
a response in const or rand durations
- HTTP Proxy
- Standard or Transparent HTTP Proxy
- proxy and modify HTTP's content:
- set
status
code - set/remove/empty
content-type
redirect
to a new URLcache
URL's content and return in the futuremap
the content(including the HTTP headers) from another URLrestore
|rewrite
the content as response body- hijack then response as TCP without HTTP format
- force the
chunked
to be enabled or disabled - force the connected
host
- force the 304 to be disabled
- make choice of executing 302 in server or client
- set
- change the speed or rtt of HTTP:
drop
the response in some duration- waiting a duration before HTTP headers then
timeout
or onlydelay
- waiting another duration before HTTP body(after HTTP headers, also)
- limit the speed of sending HTTP body
- timeout in a duration, from beginning of sending body
- Profile for each device
- each device has its own profile
- config policy commands of domains and URLs
- request histories
- add/remove operators
- Capture websocket(without modify)
- golang, Effective Go
- golang dns by Miek Gieben
- 《Go Web 编程》 by AstaXie (亦是 beego 作者)
Thanks fatcowfeng for helping asuran. Bless.