Skip to content

Commit

Permalink
Merge pull request #151 from JGoutin/squid
Browse files Browse the repository at this point in the history
Add Squid support
  • Loading branch information
gene1wood committed Jul 28, 2022
2 parents e6d339c + 9635508 commit e6bc57e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/js/configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,15 @@ module.exports = {
tls13: '6.0',
usesOpenssl: true,
},
squid: {
highlighter: 'nginx', // TODO: find better
latestVersion: '5.6',
name: 'Squid',
showSupports: false,
supportsHsts: false,
supportsOcspStapling: false,
tls13: '4',
},
tomcat: {
highlighter: 'xml',
latestVersion: '9.0.30',
Expand Down
34 changes: 34 additions & 0 deletions src/templates/partials/squid.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# {{output.header}}
# {{{output.link}}}

# The following example shows Squid configured as a cache proxy with SSL bump enabled

http_port 3128 ssl-bump \
{{#if (minver "4" form.serverVersion)}}tls-{{/if}}cert=/path/to/ca_signing_cert \
{{#if (minver "4" form.serverVersion)}}tls-{{/if}}key=/path/to/ca_signing_private_key \
{{#if output.ciphers.length}}
cipher={{{join output.ciphers ":"}}} \
{{/if}}
{{#if output.usesDhe}}
tls-dh=/path/to/dhparam \ # {{output.dhCommand}} > /path/to/dhparam
{{/if}}
options={{#if (minver "4" form.serverVersion)}}NO_SSLv3{{else}}NO_SSLv2,NO_SSLv3{{/if}}{{#unless (includes "TLSv1" output.protocols)}},NO_TLSv1{{/unless}}{{#unless (includes "TLSv1.1" output.protocols)}},NO_TLSv1_1{{/unless}}{{#unless (includes "TLSv1.2" output.protocols)}},NO_TLSv1_2{{/unless}},NO_TICKET

sslcrtd_program /usr/lib/squid/{{#if (minver "4" form.serverVersion)}}security_file_certgen{{else}}ssl_crtd{{/if}} -s /var/cache/squid/ssl_db -M 4MB
acl step1 at_step SslBump1
ssl_bump peek step1
ssl_bump bump all


# The following example shows Squid configured as a reverse Proxy / Accelerator

https_port 443 accel defaultsite=example.net \
{{#if (minver "4" form.serverVersion)}}tls-{{/if}}cert=/path/to/signed_cert_plus_intermediates \
{{#if (minver "4" form.serverVersion)}}tls-{{/if}}key=/path/to/private_key \
{{#if output.ciphers.length}}
cipher={{{join output.ciphers ":"}}} \
{{/if}}
{{#if output.usesDhe}}
tls-dh=/path/to/dhparam \ # {{output.dhCommand}} > /path/to/dhparam
{{/if}}
options={{#if (minver "4" form.serverVersion)}}NO_SSLv3{{else}}NO_SSLv2,NO_SSLv3{{/if}}{{#unless (includes "TLSv1" output.protocols)}},NO_TLSv1{{/unless}}{{#unless (includes "TLSv1.1" output.protocols)}},NO_TLSv1_1{{/unless}}{{#unless (includes "TLSv1.2" output.protocols)}},NO_TLSv1_2{{/unless}},NO_TICKET

0 comments on commit e6bc57e

Please sign in to comment.