Skip to content

Commit

Permalink
New release
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-jedek committed May 28, 2024
1 parent c13ed1c commit d732021
Show file tree
Hide file tree
Showing 11 changed files with 550 additions and 54 deletions.
19 changes: 16 additions & 3 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
28/May/2024
- added the 'httpsloop' feature for creating alias loops in HTTPS records (RFC 9460)
- added the 'httpschain' feature for creating infinite alias chains in HTTPS records (RFC 9460)
- added the 'svcbloop' feature for creating alias loops in SVCB records (RFC 9460)
- added the 'svcbchain' feature for creating infinite alias chains in SVCB records (RFC 9460)
- added the 'dloop' feature for creating alias loops in DNAME records
- added tests for all the new features (total test count: 344)
- updated the catalogue documentation
- small code fixes in polardns.py

23/May/2024
- added the 'self' feature for returning the client's IP address (aka. what is my IP)

08/May/2024
- release version 1.1
- update of the documentation
- sorting modules in alphabetical order when constructing polardns_real.py
- upon startup, sort the modules in alphabetical order during the construction of polardns_real.py

08/May/2024
- major update of the contribution page
Expand Down Expand Up @@ -63,7 +76,7 @@

18/Oct/2023
- fixed problem with dots '.' in the query domain name not being reflected in the response properly
- enhanced the tests and added 41 more tests (now there is 293 tests in total)
- enhanced the tests and added 41 more tests (total test count: 293)

17/Oct/2023
- added support for getting version information using 'dig version.polar CH TXT' command
Expand All @@ -82,7 +95,7 @@
- enhanced parsing of the domain name in the request (added the backslashreplace option in decode())

05/Jul/2023
- added a collection of tests (252 tests)
- added a collection of tests (total test count: 252)

16/Jun/2023
- fixed exceptions when parsing various incomplete requests, too short DNS packets etc.
Expand Down
279 changes: 242 additions & 37 deletions docs/catalogue/general-features.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# PolarDNS catalogue - General features
1. [General features](general-features.md)
- [Always resolve to IP (always)](#always-resolve-to-ip-always)
- [Client IP address (self / whatismyip)](#client-ip-address-self--whatismyip)
- [CNAME alias chain (chain)](#cname-alias-chain-chain)
- [CNAME alias chain with 3 records (schain)](#cname-alias-chain-with-3-records-schain)
- [CNAME alias loop (loop)](#cname-alias-loop-loop)
- [DNAME alias chain (dchain)](#dname-alias-chain-dchain)
- [DNAME alias loop (dloop)](#dname-alias-loop-dloop)
- [HTTPS alias chain (httpschain)](#https-alias-chain-httpschain)
- [HTTPS alias loop (httpsloop)](#https-alias-loop-httpsloop)
- [SVCB alias chain (svcbchain)](#svcb-alias-chain-svcbchain)
- [SVCB alias loop (svcbloop)](#svcb-alias-loop-svcbloop)
- [CNAME alias chain with 3 records (schain)](#cname-alias-chain-with-3-records-schain)
- [Chunked CNAME aliases (chunkedcnames)](#chunked-cname-aliases-chunkedcnames)
- [Cut A record from the end (cutabuf)](#cut-a-record-from-the-end-cutabuf)
- [Cut CNAME record from the end (cutcnamebuf)](#cut-cname-record-from-the-end-cutcnamebuf)
Expand Down Expand Up @@ -53,74 +59,79 @@ always.yourdomain.com. 60 IN A 2.3.4.5
;; MSG SIZE rcvd: 76
```
### CNAME alias chain (chain)
Respond with an incremented CNAME record. This creates an infinite alias chain.
### Client IP address (self / whatismyip)
Respond with A and TXT records containing the IP address of the connecting client. The TXT record also contains the port information.

<table>
<tr><td>format:</td><td>chain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig chain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig chain123456.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>format:</td><td>self.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig self.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig A self.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig TXT self.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig TXT whatismyip.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig chain123456.yourdomain.com @127.0.0.1
# dig TXT whatismyip.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> chain123456.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> TXT whatismyip.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49493
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15082
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; QUESTION SECTION:
;chain123456.yourdomain.com. IN A
;whatismyip.yourdomain.com. IN TXT
;; ANSWER SECTION:
chain123456.yourdomain.com. 60 IN CNAME chain123457.yourdomain.com.
whatismyip.yourdomain.com. 60 IN TXT "127.0.0.1:43732"
;; Query time: 4 msec
;; ADDITIONAL SECTION:
whatismyip.yourdomain.com. 60 IN A 127.0.0.1
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Fri Nov 03 14:30:51 +04 2023
;; MSG SIZE rcvd: 110
;; WHEN: Mon May 27 17:10:12 +04 2024
;; MSG SIZE rcvd: 137
```
### CNAME alias chain with 3 records (schain)
Respond with 3 random CNAME records (schain####.yourdomain.com).
### CNAME alias chain (chain)
Respond with an incremented CNAME record. This creates an infinite alias chain.

<table>
<tr><td>format:</td><td>schain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig schain123456.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>format:</td><td>chain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig chain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig chain1234.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig schain123456.yourdomain.com @127.0.0.1
# dig chain1234.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> schain123456.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> chain1234.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65398
;; flags: qr aa; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47208
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;schain123456.yourdomain.com. IN A
;chain1234.yourdomain.com. IN A
;; ANSWER SECTION:
schain123456.yourdomain.com. 60 IN CNAME schain600556.yourdomain.com.
schain123456.yourdomain.com. 60 IN CNAME schain916228.yourdomain.com.
schain123456.yourdomain.com. 60 IN CNAME schain381071.yourdomain.com.
chain1234.yourdomain.com. 60 IN CNAME chain1235.yourdomain.com.
;; Query time: 0 msec
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Fri Nov 03 14:30:51 +04 2023
;; MSG SIZE rcvd: 249
;; WHEN: Tue May 28 12:18:52 +04 2024
;; MSG SIZE rcvd: 104
```
### CNAME alias loop (loop)
Respond with CNAME record forming an infinite loop consisting of any number of elements.

<table>
<tr><td>format:</td><td>loop.&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig loop.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig loop.5.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Expand Down Expand Up @@ -151,29 +162,223 @@ Respond with an incremented DNAME record. This creates an infinite alias chain.

<table>
<tr><td>format:</td><td>dchain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig dchain123456.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig dchain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig dchain1234.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig dchain123456.yourdomain.com @127.0.0.1
# dig dchain1234.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> dchain123456.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> dchain1234.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14205
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37173
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;dchain123456.yourdomain.com. IN A
;dchain1234.yourdomain.com. IN A
;; ANSWER SECTION:
dchain123456.yourdomain.com. 60 IN DNAME dchain123457.yourdomain.com.
dchain1234.yourdomain.com. 60 IN DNAME dchain1235.yourdomain.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Tue May 28 12:18:52 +04 2024
;; MSG SIZE rcvd: 107
```
### DNAME alias loop (dloop)
Respond with DNAME record forming an infinite loop consisting of any number of elements.

<table>
<tr><td>format:</td><td>dloop.&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig dloop.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig dloop.5.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig dloop.5.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> dloop.5.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25597
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;dloop.5.yourdomain.com. IN A
;; ANSWER SECTION:
dloop.5.yourdomain.com. 60 IN DNAME dloop.5.1.yourdomain.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Tue May 28 11:50:00 +04 2024
;; MSG SIZE rcvd: 100
```
### HTTPS alias chain (httpschain)
Respond with an incremented HTTPS alias record. This creates an infinite alias chain.

<table>
<tr><td>format:</td><td>httpschain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig httpschain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig HTTPS httpschain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig httpschain1234.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig httpschain1234.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> httpschain1234.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29224
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;httpschain1234.yourdomain.com. IN A
;; ANSWER SECTION:
httpschain1234.yourdomain.com. 60 IN HTTPS 0 httpschain1235.yourdomain.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Tue May 28 12:18:52 +04 2024
;; MSG SIZE rcvd: 121
```
### HTTPS alias loop (httpsloop)
Respond with an HTTPS record featuring an alias (SvcPriority 0) that creates an infinite loop with any number of elements.

<table>
<tr><td>format:</td><td>httpsloop.&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig httpsloop.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig httpsloop.5.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig HTTPS httpsloop.5.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig HTTPS httpsloop.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig HTTPS httpsloop.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> HTTPS httpsloop.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 63583
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;httpsloop.yourdomain.com. IN HTTPS
;; ANSWER SECTION:
httpsloop.yourdomain.com. 60 IN HTTPS 0 httpsloop.yourdomain.com.
;; Query time: 3 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Mon May 27 15:26:37 +04 2024
;; MSG SIZE rcvd: 106
```
### SVCB alias chain (svcbchain)
Respond with an incremented SVCB alias record. This creates an infinite alias chain.

<table>
<tr><td>format:</td><td>svcbchain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig svcbchain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig SVCB svcbchain.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig svcbchain1234.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig svcbchain1234.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> svcbchain1234.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45331
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;svcbchain1234.yourdomain.com. IN A
;; ANSWER SECTION:
svcbchain1234.yourdomain.com. 60 IN SVCB 0 svcbchain1235.yourdomain.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Tue May 28 12:18:52 +04 2024
;; MSG SIZE rcvd: 118
```
### SVCB alias loop (svcbloop)
Respond with an SVCB record featuring an alias (SvcPriority 0) that creates an infinite loop with any number of elements.

<table>
<tr><td>format:</td><td>svcbloop.&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig svcbloop.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig svcbloop.5.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig SVCB svcbloop.5.yourdomain.com @127.0.0.1</code></td></tr>
<tr><td>example:</td><td><code>dig SVCB svcbloop.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig SVCB svcbloop.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> SVCB svcbloop.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64873
;; flags: qr aa; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;svcbloop.yourdomain.com. IN SVCB
;; ANSWER SECTION:
svcbloop.yourdomain.com. 60 IN SVCB 0 svcbloop.yourdomain.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Mon May 27 15:26:38 +04 2024
;; MSG SIZE rcvd: 103
```
### CNAME alias chain with 3 records (schain)
Respond with 3 random CNAME records (schain####.yourdomain.com).

<table>
<tr><td>format:</td><td>schain&lt;NUMBER>.yourdomain.com</td></tr>
<tr><td>example:</td><td><code>dig schain123456.yourdomain.com @127.0.0.1</code></td></tr>
</table>

Sample:
```
# dig schain123456.yourdomain.com @127.0.0.1
; <<>> DiG 9.18.10-2-Debian <<>> schain123456.yourdomain.com @127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65398
;; flags: qr aa; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;schain123456.yourdomain.com. IN A
;; ANSWER SECTION:
schain123456.yourdomain.com. 60 IN CNAME schain600556.yourdomain.com.
schain123456.yourdomain.com. 60 IN CNAME schain916228.yourdomain.com.
schain123456.yourdomain.com. 60 IN CNAME schain381071.yourdomain.com.
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1) (UDP)
;; WHEN: Fri Nov 03 14:30:51 +04 2023
;; MSG SIZE rcvd: 113
;; MSG SIZE rcvd: 249
```
### Chunked CNAME aliases (chunkedcnames)
Expand Down
Loading

0 comments on commit d732021

Please sign in to comment.