Update README.md
This commit is contained in:
parent
117923cdcb
commit
d006a19738
80
README.md
80
README.md
@ -13,85 +13,11 @@ Implements the [Meshname protocol](https://github.com/zhoreeq/meshname/blob/mast
|
|||||||
- Q: *Meshname domains are ugly.*
|
- Q: *Meshname domains are ugly.*
|
||||||
- A: Yes, if you want decentralization, you either have ugly names or a blockchain. Meshname has ugly names, but it works at least!
|
- A: Yes, if you want decentralization, you either have ugly names or a blockchain. Meshname has ugly names, but it works at least!
|
||||||
|
|
||||||
## How to install and use
|
## How to use meshname domains?
|
||||||
|
|
||||||
Minimum go version 1.12 is required.
|
Use a full-featured DNS server with the meshname protocol support, i.e. [PopuraDNS](https://github.com/popura-network/PopuraDNS).
|
||||||
|
|
||||||
1) Get the source code and compile
|
For a standalone .meshname stub resolver see `USAGE.md`
|
||||||
```
|
|
||||||
git clone https://github.com/zhoreeq/meshname.git
|
|
||||||
cd meshname
|
|
||||||
make
|
|
||||||
```
|
|
||||||
2) Generate the default config for your host
|
|
||||||
```
|
|
||||||
./meshnamed -genconf 200:6fc8:9220:f400:5cc2:305a:4ac6:967e -subdomain meshname | tee /tmp/meshnamed.conf
|
|
||||||
```
|
|
||||||
3) Run the daemon
|
|
||||||
```
|
|
||||||
./meshnamed -useconffile /tmp/meshnamed.conf
|
|
||||||
```
|
|
||||||
4) Optionally, set configuration flags
|
|
||||||
```
|
|
||||||
./meshnamed -listenaddr [::1]:53535 -debug -useconffile /tmp/meshnamed.conf
|
|
||||||
```
|
|
||||||
5) See the list of all configuration flags
|
|
||||||
```
|
|
||||||
./meshnamed -help
|
|
||||||
```
|
|
||||||
Add custom DNS records to the configuration file and restart the daemon to apply settings.
|
|
||||||
A DNS record can be of any valid string form parsed by [miekg/dns#NewRR](https://godoc.org/github.com/miekg/dns#NewRR) function (see example configuration file below).
|
|
||||||
|
|
||||||
## systemd unit
|
|
||||||
|
|
||||||
Look for `meshnamed.service` in the source directory for a systemd unit file.
|
|
||||||
|
|
||||||
## Example configuration file
|
|
||||||
|
|
||||||
In this example, meshnamed is configured as authoritative server for two domain zones:
|
|
||||||
|
|
||||||
{
|
|
||||||
"aiag7sesed2aaxgcgbnevruwpy": [
|
|
||||||
"aiag7sesed2aaxgcgbnevruwpy.meshname. AAAA 200:6fc8:9220:f400:5cc2:305a:4ac6:967e",
|
|
||||||
"_xmpp-client._tcp.aiag7sesed2aaxgcgbnevruwpy.meshname. SRV 5 0 5222 xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname",
|
|
||||||
"_xmpp-server._tcp.aiag7sesed2aaxgcgbnevruwpy.meshname. SRV 5 0 5269 xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname",
|
|
||||||
"xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname. AAAA 300:6fc8:9220:f400::1",
|
|
||||||
"forum.aiag7sesed2aaxgcgbnevruwpy.meshname. CNAME amag7sesed2aaaaaaaaaaaaaau.meshname."
|
|
||||||
],
|
|
||||||
"amag7sesed2aaaaaaaaaaaaaau": [
|
|
||||||
"amag7sesed2aaaaaaaaaaaaaau.meshname. AAAA 300:6fc8:9220:f400::5"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
## Configure dnsmasq as a primary DNS resolver with "meshname." support
|
|
||||||
|
|
||||||
`/etc/dnsmasq.conf`
|
|
||||||
|
|
||||||
port=53
|
|
||||||
domain-needed
|
|
||||||
bogus-priv
|
|
||||||
server=/meshname/::1#53535
|
|
||||||
server=8.8.8.8
|
|
||||||
|
|
||||||
## Using meshnamed as a standalone DNS server
|
|
||||||
|
|
||||||
Set the flag to listen on all interfaces and a standard DNS server port
|
|
||||||
|
|
||||||
./meshnamed -listenaddr [::]:53 -useconffile /tmp/meshnamed.conf
|
|
||||||
|
|
||||||
Run as root and allow incoming connections to port 53/UDP in firewall settings.
|
|
||||||
|
|
||||||
## Custom top level domains (TLD) and subnet filtering
|
|
||||||
|
|
||||||
meshnamed can be configured to resolve custom TLDs.
|
|
||||||
To run meshnamed for TLD `.newmesh` with addresses in `fd00::/8`
|
|
||||||
set a flag `-networks newmesh=fd00::/8`.
|
|
||||||
|
|
||||||
By default, in addition to `.meshname` it also resolves `.ygg` for IPv6 addresses in
|
|
||||||
`200::/7` subnet and `.cjd` for `fc00::/8`.
|
|
||||||
|
|
||||||
Requests are filtered by subnet validation. Request is ignored if a decoded
|
|
||||||
IPv6 address doesn't match the specified subnet for a TLD.
|
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
|
||||||
|
79
USAGE.md
Normal file
79
USAGE.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
# How to install and use
|
||||||
|
|
||||||
|
Minimum go version 1.12 is required.
|
||||||
|
|
||||||
|
1) Get the source code and compile
|
||||||
|
```
|
||||||
|
git clone https://github.com/zhoreeq/meshname.git
|
||||||
|
cd meshname
|
||||||
|
make
|
||||||
|
```
|
||||||
|
2) Generate the default config for your host
|
||||||
|
```
|
||||||
|
./meshnamed -genconf 200:6fc8:9220:f400:5cc2:305a:4ac6:967e -subdomain meshname | tee /tmp/meshnamed.conf
|
||||||
|
```
|
||||||
|
3) Run the daemon
|
||||||
|
```
|
||||||
|
./meshnamed -useconffile /tmp/meshnamed.conf
|
||||||
|
```
|
||||||
|
4) Optionally, set configuration flags
|
||||||
|
```
|
||||||
|
./meshnamed -listenaddr [::1]:53535 -debug -useconffile /tmp/meshnamed.conf
|
||||||
|
```
|
||||||
|
5) See the list of all configuration flags
|
||||||
|
```
|
||||||
|
./meshnamed -help
|
||||||
|
```
|
||||||
|
Add custom DNS records to the configuration file and restart the daemon to apply settings.
|
||||||
|
A DNS record can be of any valid string form parsed by [miekg/dns#NewRR](https://godoc.org/github.com/miekg/dns#NewRR) function (see example configuration file below).
|
||||||
|
|
||||||
|
## systemd unit
|
||||||
|
|
||||||
|
Look for `meshnamed.service` in the source directory for a systemd unit file.
|
||||||
|
|
||||||
|
## Example configuration file
|
||||||
|
|
||||||
|
In this example, meshnamed is configured as authoritative server for two domain zones:
|
||||||
|
|
||||||
|
{
|
||||||
|
"aiag7sesed2aaxgcgbnevruwpy": [
|
||||||
|
"aiag7sesed2aaxgcgbnevruwpy.meshname. AAAA 200:6fc8:9220:f400:5cc2:305a:4ac6:967e",
|
||||||
|
"_xmpp-client._tcp.aiag7sesed2aaxgcgbnevruwpy.meshname. SRV 5 0 5222 xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname",
|
||||||
|
"_xmpp-server._tcp.aiag7sesed2aaxgcgbnevruwpy.meshname. SRV 5 0 5269 xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname",
|
||||||
|
"xmpp.aiag7sesed2aaxgcgbnevruwpy.meshname. AAAA 300:6fc8:9220:f400::1",
|
||||||
|
"forum.aiag7sesed2aaxgcgbnevruwpy.meshname. CNAME amag7sesed2aaaaaaaaaaaaaau.meshname."
|
||||||
|
],
|
||||||
|
"amag7sesed2aaaaaaaaaaaaaau": [
|
||||||
|
"amag7sesed2aaaaaaaaaaaaaau.meshname. AAAA 300:6fc8:9220:f400::5"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
## Configure dnsmasq as a primary DNS resolver with "meshname." support
|
||||||
|
|
||||||
|
`/etc/dnsmasq.conf`
|
||||||
|
|
||||||
|
port=53
|
||||||
|
domain-needed
|
||||||
|
bogus-priv
|
||||||
|
server=/meshname/::1#53535
|
||||||
|
server=8.8.8.8
|
||||||
|
|
||||||
|
## Using meshnamed as a standalone DNS server
|
||||||
|
|
||||||
|
Set the flag to listen on all interfaces and a standard DNS server port
|
||||||
|
|
||||||
|
./meshnamed -listenaddr [::]:53 -useconffile /tmp/meshnamed.conf
|
||||||
|
|
||||||
|
Run as root and allow incoming connections to port 53/UDP in firewall settings.
|
||||||
|
|
||||||
|
## Custom top level domains (TLD) and subnet filtering
|
||||||
|
|
||||||
|
meshnamed can be configured to resolve custom TLDs.
|
||||||
|
To run meshnamed for TLD `.newmesh` with addresses in `fd00::/8`
|
||||||
|
set a flag `-networks newmesh=fd00::/8`.
|
||||||
|
|
||||||
|
By default, in addition to `.meshname` it also resolves `.ygg` for IPv6 addresses in
|
||||||
|
`200::/7` subnet and `.cjd` for `fc00::/8`.
|
||||||
|
|
||||||
|
Requests are filtered by subnet validation. Request is ignored if a decoded
|
||||||
|
IPv6 address doesn't match the specified subnet for a TLD.
|
@ -47,7 +47,7 @@ func init() {
|
|||||||
flag.StringVar(&subdomain, "subdomain", "meshname.", "subdomain used to generate config")
|
flag.StringVar(&subdomain, "subdomain", "meshname.", "subdomain used to generate config")
|
||||||
flag.StringVar(&useconffile, "useconffile", "", "run daemon with a config file")
|
flag.StringVar(&useconffile, "useconffile", "", "run daemon with a config file")
|
||||||
flag.StringVar(&listenAddr, "listenaddr", "[::1]:53535", "address to listen on")
|
flag.StringVar(&listenAddr, "listenaddr", "[::1]:53535", "address to listen on")
|
||||||
flag.StringVar(&networksconf, "networks", "ygg=200::/7,cjd=fc00::/8,meshname=::/0,vapordns=::/0", "TLD=subnet list separated by comma")
|
flag.StringVar(&networksconf, "networks", "ygg=200::/7,cjd=fc00::/8,meshname=::/0,popura=::/0", "TLD=subnet list separated by comma")
|
||||||
flag.BoolVar(&noMeshIP, "nomeship", false, "disable .meship resolver")
|
flag.BoolVar(&noMeshIP, "nomeship", false, "disable .meship resolver")
|
||||||
flag.StringVar(&getName, "getname", "", "convert IPv6 address to a name")
|
flag.StringVar(&getName, "getname", "", "convert IPv6 address to a name")
|
||||||
flag.StringVar(&getIP, "getip", "", "convert a name to IPv6 address")
|
flag.StringVar(&getIP, "getip", "", "convert a name to IPv6 address")
|
||||||
|
Loading…
Reference in New Issue
Block a user