-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
snapcraft-core20.yaml
225 lines (179 loc) · 4.92 KB
/
snapcraft-core20.yaml
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
name: smithproxy
version: 0.9.30
summary: Fast and featured transparent TCP/UDP/TLS proxy
description: |
Smithproxy is fast transparent TCP/UDP/TLS (SSL) proxy. It's highly configurable
and got many features.
Core features:
* intercept routed traffic, locally-originated traffic and SOCKS requests
* Policy based traffic matching
* Per-policy applicable profiles
* Insightful CLI with configuration control
Policy profiles:
* content - replacing data online, writing to disk
* dns - dns inspection settings
* tls - per-policy specific settings
* auth - match users and enforce authentication
* detection - match specific patterns in the traffic
TLS protocol:
* dumping traffic plaintext into pcapng, text or remote GRE, exporting sslkeylog
* TLS security checks (ocsp, ocsp stapling, automatic crl download)
* Certificate Transparency checks for outbound connections
* Html replacement warnings
* STARTTLS support
* Seamless redirection to login portal
Other:
* Simple authentication portal with local and ldap user support
* SOCKS4/SOCKS5 support with DNS
* DNS ALG
* policies based on FQDN or 2nd level domain
* both IPv4 and IPv6 is supported
Complementary tools:
* built-in tools to help with network redirections and certificates
* check pplay tool (https://pypi.org/project/pplay/): replays captures
over the network
... and many more!
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
base: core20
hooks:
install:
plugs: [ network, network-control ]
layout:
/etc/smithproxy:
bind: $SNAP_DATA/etc/smithproxy
/etc/ca-certificates.conf:
bind-file: $SNAP_DATA/etc/ca-certificates.conf
/etc/wgetrc:
bind-file: $SNAP_DATA/etc/wgetrc
/usr/share/ca-certificates:
bind: $SNAP_DATA/ca-bundle
/etc/ssl/certs:
bind: $SNAP_DATA/certs
/etc/ca-certificates:
bind: $SNAP_DATA/ca-certificates
/usr/share/smithproxy:
bind: $SNAP/usr/share/smithproxy
/usr/bin/smithproxy:
bind-file: $SNAP/usr/bin/smithproxy
/usr/bin/smithd:
bind-file: $SNAP/usr/bin/smithd
/var/log/smithproxy:
bind: $SNAP_DATA/log
/var/smithproxy:
bind: $SNAP_DATA/captures
/usr/bin/telnet:
bind-file: $SNAP/usr/bin/telnet.netkit
apps:
svc-core:
command: usr/bin/smithproxy --tenant-name default
daemon: simple
restart-condition: always
plugs:
- network
- network-bind
- network-control
svc-net:
command: usr/bin/sx_network start
stop-command: usr/bin/sx_network stop
daemon: oneshot
plugs:
- network
- network-bind
- network-control
- firewall-control
exe:
command: usr/bin/smithproxy --tenant-name default
plugs:
- network
- network-bind
- network-control
# smithd:
# command: usr/bin/smithd
# plugs:
# - network
# - network-bind
cli:
command: usr/bin/sx_cli
plugs:
- network
regencert:
command: usr/bin/sx_regencerts
plugs:
- network # to guess hostname and IP
# passwd:
# command: usr/bin/sx_passwd
# autoportalcert:
# command: usr/bin/sx_autoportalcert
# plugs:
# - network # to guess hostname and IP
certinfo-ca:
command: usr/bin/sx_certinfo_ca
certinfo-portal:
command: usr/bin/sx_certinfo_portal
download-ctlog:
command: usr/bin/sx_download_ctlog
plugs:
- network
net:
command: usr/bin/sx_network
plugs:
- network
- network-bind
- network-control
- firewall-control
parts:
smithproxy:
plugin: cmake
cmake-parameters:
- -DCMAKE_BUILD_TYPE=Release
source: https://github.com/astibal/smithproxy
source-type: git
source-branch: master
build-environment:
- PYTHONPATH: "$SNAPCRAFT_PART_INSTALL/usr/lib/python3/dist-packages"
# source: .
# source-type: local
build-packages:
- g++
- make
- cmake
- libconfig++-dev
- python3-dev
- libssl-dev
- libffi-dev
- libmicrohttpd-dev
- libpam-dev
- libxml2-dev
- libxslt1-dev
- libxmlsec1-dev
- python3-distutils
- telnet
stage-packages:
- ca-certificates
- iptables
- libconfig++9v5
- libmicrohttpd12
- telnet
- wget
- python
- python3-wheel
- python3-posix-ipc
- python3-distutils
- python3-setuptools
- python3-cryptography
- swig
pydeps:
after: [ smithproxy ]
plugin: python
build-environment:
- PYTHONPATH: "$SNAPCRAFT_PART_INSTALL/usr/lib/python3/dist-packages"
override-build: |
snapcraftctl build
pip3 install wheel
pip3 install pylibconfig2
build-packages:
- python3-wheel
python-packages:
- wheel
- pyparsing