Skip to content

Commit 428db36

Browse files
committed
Default deny_private to yes
1 parent b28ad3a commit 428db36

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ See `thinproxy.conf.example` for a full example.
115115

116116
| Directive | Description | Default |
117117
|-----------|-------------|---------|
118-
| `deny_private <yes\|no>` | Block connections to private/reserved addresses | `no` |
118+
| `deny_private <yes\|no>` | Block connections to private/reserved addresses | `yes` |
119119
| `connect_port <port>` | Allowed CONNECT port (whitelist, repeatable) | all |
120120
| `allow <ip[/prefix]>` | Allow source address (whitelist mode) | |
121121
| `deny <ip[/prefix]>` | Deny source address (blacklist mode) | |

thinproxy.8

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ shared address space (100.64/10), unique local IPv6 (fc00::/7),
118118
multicast, and reserved ranges.
119119
IPv4-mapped IPv6 addresses are also checked.
120120
The default is
121-
.Cm no .
121+
.Cm yes .
122+
Set to
123+
.Cm no
124+
to allow connections to private addresses.
122125
.It Cm connect_port Ar port
123126
Restrict the CONNECT method to the specified
124127
.Ar port .

thinproxy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static char cfg_port[8] = DEFAULT_PORT;
149149
static char cfg_user[64];
150150
static int cfg_maxconns = MAX_CONNS;
151151
static int cfg_timeout = 300;
152-
static int cfg_deny_private;
152+
static int cfg_deny_private = 1;
153153
static int cfg_maxconns_per_ip = 32;
154154

155155
/* ACL */

thinproxy.conf.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ port 8080
2626
# Close idle connections after this many seconds (default: 300)
2727
#idle_timeout 300
2828

29-
# Block connections to private/reserved addresses (default: no)
29+
# Block connections to private/reserved addresses (default: yes)
3030
# Prevents SSRF by denying RFC 1918, loopback, link-local, etc.
3131
#deny_private yes
3232

0 commit comments

Comments
 (0)