@@ -173,58 +173,3 @@ export function parseUrlPatterns(patterns: string[]): string[] {
173173 return `^${ p } $` ;
174174 } ) ;
175175}
176-
177- /**
178- * Generates Squid SSL Bump configuration section
179- *
180- * This configuration enables SSL interception for HTTPS traffic,
181- * allowing URL-based filtering for encrypted connections.
182- *
183- * @param caFiles - Paths to CA certificate and key
184- * @param sslDbPath - Path to SSL certificate database
185- * @param port - Squid listening port
186- * @returns Squid configuration string for SSL Bump
187- */
188- export function generateSslBumpConfig (
189- caFiles : CaFiles ,
190- sslDbPath : string ,
191- port : number
192- ) : string {
193- return `
194- # SSL Bump configuration for HTTPS inspection
195- # WARNING: This enables TLS interception - traffic is decrypted for inspection
196-
197- # SSL port configuration with bump capabilities
198- https_port ${ port } intercept ssl-bump \\
199- cert=${ caFiles . certPath } \\
200- key=${ caFiles . keyPath } \\
201- generate-host-certificates=on \\
202- dynamic_cert_mem_cache_size=4MB \\
203- tls-default-ca=off
204-
205- # SSL certificate database for dynamic certificate generation
206- sslcrtd_program /usr/lib/squid/security_file_certgen -s ${ sslDbPath } -M 4MB
207-
208- # SSL Bump steps:
209- # 1. Peek at SNI to get the server name
210- # 2. Bump (intercept) connections to allowed domains
211- # 3. Terminate (deny) connections to other domains
212-
213- acl step1 at_step SslBump1
214- acl step2 at_step SslBump2
215- acl step3 at_step SslBump3
216-
217- # Peek at ClientHello to see SNI
218- ssl_bump peek step1
219-
220- # Stare at server certificate to validate it
221- ssl_bump stare step2
222-
223- # Bump allowed domains to enable URL inspection
224- ssl_bump bump allowed_domains
225- ssl_bump bump allowed_domains_regex
226-
227- # Terminate connections to non-allowed domains
228- ssl_bump terminate all
229- ` ;
230- }
0 commit comments