-
Notifications
You must be signed in to change notification settings - Fork 2
/
sniproxy.conf.example
80 lines (65 loc) · 2.17 KB
/
sniproxy.conf.example
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
73
74
75
76
77
78
79
80
# sniproxy example configuration file
# lines that start with # are comments
# lines with only white space are ignored
user daemon
# PID file
pidfile /var/run/sniproxy.pid
error_log {
# Log to the daemon syslog facility
syslog daemon
# Alternatively we could log to file
#filename /var/log/sniproxy/sniproxy.log
# Control the verbosity of the log
priority notice
}
listen 80 {
proto http
table http_hosts
fallback 127.0.0.1:810 # MIAD's HTTP
access_log {
filename /var/log/sniproxy/http_access.log
priority notice
}
}
listen 443 {
proto tls
table https_hosts
fallback 127.0.0.1:4413 # MIAD's HTTPS
access_log {
filename /var/log/sniproxy/https_access.log
priority notice
}
}
table http_hosts {
# pattern:
# valid Perl-compatible Regular Expression that matches the hostname
#
# target:
# - a DNS name
# - an IP address (with optional port)
# - '*' to use the hostname that the client requested
#
# pattern target
#.*\.itunes\.apple\.com$ *:443
#.* 15.235.141.184:4443
# this will deal with MIAB's `MTA-STS policy is missing: STSFetchResult.NONE` error
mta-sts\..* 127.0.0.1:810 # MIAD's HTTP
# forward this requests for example-a.com to your other HTTP server
# example-a.com 127.0.0.1:8080
# forward everything that starts with `www.`
# www\..* 127.0.0.1:8081
}
# named tables are defined with the table directive
table https_hosts {
# this will deal with MIAB's `MTA-STS policy is missing: STSFetchResult.NONE` error
mta-sts\..* 127.0.0.1:4413 # MIAD's HTTPS
# forward this requests for example-a.com to your other HTTP server
# example-a.com 127.0.0.1:4430
# forward everything that starts with `www.`
# www\..* 127.0.0.1:4431
}
# if no table specified the default 'default' table is defined
table {
# if no port is specified default HTTP (80) and HTTPS (443) ports are
# assumed based on the protocol of the listen block using this table
}