forked from dlundquist/sniproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsni_proxy.conf
72 lines (58 loc) · 1.64 KB
/
sni_proxy.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# sni_proxy example configuration file
# lines that start with # are comments
# lines with only white space are ignored
# TODO logging options
# NOTE THIS IS A ONLY A MOCK PROTOTYPE CONFIG FILE
# CURRENT THIS FILE WILL NOT WORK, PLEASE SEE THE
# SYNTAX IN README FOR THE CURRENT CONFIG FILE SYNTAX
user nobody
# blocks are dilimited with {...}
listen 80 {
proto http
table http_hosts
}
listen 443 {
proto tls
table https_hosts
}
listen 192.0.2.10 80 {
protocol http
# this will use default table
}
listen 2001:0db8::10 80 {
protocol http
# this will use default table
}
listen unix:/var/run/proxy.sock {
protocol http
# this will use default table
}
# named tables are defined with the table directive
table http_hosts {
example.com 192.0.2.10 8001
example.com 192.0.2.10 8002
example.com 192.0.2.10 8003
example.com 192.0.2.10 8004
# pattern:
# valid Perl-compatible Regular Expression that matches the hostname
#
# target:
# - a DNS name
# - an IP address
# - '*' to use the hostname that the client requested
#
# pattern target target port
#.*\.itunes\.apple\.com$ * 443
#.* 127.0.0.1 4443
}
# named tables are defined with the table directive
table https_hosts {
# when proxying to sockets you should use different tables since the socket server most likely will not autodetect TLS or HTTP
example.org unix:/var/run/server.sock
}
# if no table specified the default 'default' table is defined
table {
# if no port is included default http (80) and https (443) ports are assumed based on the protocol of the listen block using this table
example.com 192.0.2.10
example.net 192.0.2.20
}