@@ -21,23 +21,28 @@ The official source is <https://github.com/bortzmeyer/grong>
21
21
Usage
22
22
*****
23
23
24
- ./grong [-address="[ADDRESS]:PORT"] [-debug=N] [-nodaemon]
24
+ ./grong [-address="[ADDRESS]:PORT"] [-debug=N] [-nodaemon] [-domain="DOMAIN NAME"]
25
25
26
- Run with -h to see the defaults (and the other, less common, options)
26
+ Run with -help to see the defaults (and the other, less common, options)
27
27
28
28
The -address option takes either a port (in the syntax ":NNN"), in
29
29
that case GRONG listens on all IP addresses, or one address (in the
30
30
syntax "x.y.z.T:NNN" for IPv4 and "[xxxx:yyyy::zzzz]:NNN" for
31
31
IPv6). There is currently no way to listen on some (but not all) of the IP
32
32
addresses.
33
33
34
+ The -domain option takes a domain name, which will be the name of the
35
+ zone for which the name server will be authoritative for. Not all
36
+ responders use it.
37
+
34
38
The back-end is choosen at compile-time only (I have no idea about the
35
39
support for dynamic linking in Go)
36
40
37
41
Among the provided responders:
38
42
* rude-responder: responds REFUSED to every query
39
43
* reflector-responder: responds with the IP address of the client (for TXT
40
- requests, in text form, for A or AAAA requests, as binary)
44
+ requests, in text form, for A or AAAA requests, as binary). -domain indicates
45
+ the zone name it uses (e.g. whoami.example.net)
41
46
* as112: an AS 112 name server (see <http://www.as112.net/>)
42
47
43
48
For the person who compiles
@@ -86,7 +91,8 @@ code of server.go to find others) are:
86
91
debug, etc). Always set.
87
92
* servername: if set, a string identifying this specific name server
88
93
(for instance "cdg1.a.ns.example.net").
89
- * zone: if set, the name of the zone currently served
94
+ * zonename: if set, the name of the zone currently served (for instance
95
+ "myself.example.net")
90
96
91
97
Since the map stores various types (the "interface{}", which means the
92
98
empty interface, something which is fulfilled by every possible
@@ -97,6 +103,14 @@ if exists {
97
103
debugi := reflect.NewValue(debug).(*reflect.IntValue).Get()
98
104
}
99
105
106
+ The responder must also provide a function:
107
+
108
+ func Init(firstoption int)
109
+
110
+ which will be called at server startup and which can be used to
111
+ process additional command-line flags (see as112.go for a good
112
+ example) or any other stuff.
113
+
100
114
Implementation notes
101
115
********************
102
116
@@ -107,10 +121,6 @@ are behind BIND.
107
121
TODO
108
122
****
109
123
110
- Pass unknown command-line options to the responder. Options Qname for
111
- the reflector and various TXT for as112. Or use the global config
112
- object? For instance, config["zone"] should be common enough.
113
-
114
124
Finish the AS112 responder (SOA and NS records)
115
125
116
126
The ability to listen to more than one address (but not all). Can I
@@ -134,7 +144,8 @@ net, they are meant for internal use only.
134
144
135
145
Daemonizing seems very difficult with Go
136
146
<http://groups.google.com/group/golang-nuts/browse_thread/thread/2b29d93b90501a4b/95242bfb7ae0549e>
137
- In the mean time, nohup + & + disown seems the only solution.
147
+ In the mean time, nohup + & + disown seems the only solution. Provide
148
+ an example at least for Debian, using start-stop-daemon?
138
149
139
150
A name server with data, for instance able to serve a zone with a
140
151
simple setup, one SOA, a few NS, and one A record for www.$ORIGIN. The
0 commit comments