Skip to content

Commit eac89bb

Browse files
committed
Added proxy protocol feature:
Added Global Setting to Server config tab to - Enable & Disable the feature - Set the Proxy HTTP & HTTPS Ports Added Per site level switch to enable and disable feature (Located in the Web Tab under the advanced section) Added Apache2 and Nginx vhost updates to enable proxy_protocol on the listen lines Added New database column to web_domain called "proxy_protocol" to enable site level config (Patch file Added upd_0089.sql) Updated the Base Table SQL file to include "proxy_protocol" field
1 parent 2600935 commit eac89bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+204
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- add new proxy_protocol column
2+
ALTER TABLE `web_domain`
3+
ADD COLUMN `proxy_protocol` ENUM('n','y') NOT NULL DEFAULT 'y' AFTER `log_retention`;
4+
5+
-- Update old entrys
6+
UPDATE `web_domain` SET `proxy_protocol` = 'y';

install/sql/ispconfig3.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,6 +2071,7 @@ CREATE TABLE `web_domain` (
20712071
`https_port` int(11) unsigned NOT NULL DEFAULT '443',
20722072
`folder_directive_snippets` text,
20732073
`log_retention` int(11) NOT NULL DEFAULT '10',
2074+
`proxy_protocol` enum('n','y') NOT NULL default 'y',
20742075
PRIMARY KEY (`domain_id`),
20752076
UNIQUE KEY `serverdomain` ( `server_id` , `ip_address`, `domain` )
20762077
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

interface/web/admin/form/server_config.tform.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,28 @@
820820
'default' => 'n',
821821
'value' => array(0 => 'n',1 => 'y')
822822
),
823+
'vhost_proxy_protocol_enabled' => array (
824+
'datatype' => 'VARCHAR',
825+
'formtype' => 'CHECKBOX',
826+
'default' => 'n',
827+
'value' => array(0 => 'n',1 => 'y')
828+
),
829+
'vhost_proxy_protocol_http_port' => array(
830+
'datatype' => 'VARCHAR',
831+
'formtype' => 'TEXT',
832+
'default' => '880',
833+
'value' => '',
834+
'width' => '40',
835+
'maxlength' => '255'
836+
),
837+
'vhost_proxy_protocol_https_port' => array(
838+
'datatype' => 'VARCHAR',
839+
'formtype' => 'TEXT',
840+
'default' => '8443',
841+
'value' => '',
842+
'width' => '40',
843+
'maxlength' => '255'
844+
),
823845
'vhost_conf_dir' => array(
824846
'datatype' => 'VARCHAR',
825847
'formtype' => 'TEXT',

interface/web/admin/lib/lang/ar_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,7 @@ $wb['content_filter_txt'] = 'Content Filter';
300300
$wb['rspamd_url_txt'] = 'Rspamd URL';
301301
$wb['rspamd_user_txt'] = 'Rspamd User';
302302
$wb['rspamd_password_txt'] = 'Rspamd Password';
303+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
304+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
305+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
303306
?>

interface/web/admin/lib/lang/bg_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,7 @@ $wb['content_filter_txt'] = 'Content Filter';
300300
$wb['rspamd_url_txt'] = 'Rspamd URL';
301301
$wb['rspamd_user_txt'] = 'Rspamd User';
302302
$wb['rspamd_password_txt'] = 'Rspamd Password';
303+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
304+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
305+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
303306
?>

interface/web/admin/lib/lang/br_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,6 @@ $wb['content_filter_txt'] = 'Filtro de conteúdo';
301301
$wb['rspamd_url_txt'] = 'URL do rspamd';
302302
$wb['rspamd_user_txt'] = 'Usuário do rspamd';
303303
$wb['rspamd_password_txt'] = 'Senha do rspamd';
304+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
305+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
306+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';

interface/web/admin/lib/lang/ca_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,7 @@ $wb['content_filter_txt'] = 'Content Filter';
300300
$wb['rspamd_url_txt'] = 'Rspamd URL';
301301
$wb['rspamd_user_txt'] = 'Rspamd User';
302302
$wb['rspamd_password_txt'] = 'Rspamd Password';
303+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
304+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
305+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
303306
?>

interface/web/admin/lib/lang/cz_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,7 @@ $wb['content_filter_txt'] = 'Content Filter';
300300
$wb['rspamd_url_txt'] = 'Rspamd URL';
301301
$wb['rspamd_user_txt'] = 'Rspamd User';
302302
$wb['rspamd_password_txt'] = 'Rspamd Password';
303+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
304+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
305+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
303306
?>

interface/web/admin/lib/lang/de_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,7 @@ $wb['content_filter_txt'] = 'Content-Filter';
300300
$wb['rspamd_url_txt'] = 'Rspamd-URL';
301301
$wb['rspamd_user_txt'] = 'Rspamd-Benutzer';
302302
$wb['rspamd_password_txt'] = 'Rspamd-Passwort';
303+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
304+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
305+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
303306
?>

interface/web/admin/lib/lang/dk_server_config.lng

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,7 @@ $wb['content_filter_txt'] = 'Content Filter';
300300
$wb['rspamd_url_txt'] = 'Rspamd URL';
301301
$wb['rspamd_user_txt'] = 'Rspamd User';
302302
$wb['rspamd_password_txt'] = 'Rspamd Password';
303+
$wb['vhost_proxy_protocol_enabled_txt'] = 'Enable PROXY Protocol';
304+
$wb['vhost_proxy_protocol_http_port_txt'] = 'PROXY Protocol HTTP Port';
305+
$wb['vhost_proxy_protocol_https_port_txt'] = 'PROXY Protocol HTTPS Port';
303306
?>

0 commit comments

Comments
 (0)