diff options
author | jim-p <jimp@pfsense.org> | 2012-12-10 10:57:48 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2012-12-10 10:57:48 -0500 |
commit | 1b4340d70cf72a5b182c5a3c9e7859a20eeb16a7 (patch) | |
tree | 8ab6247191b9b8b9a22e7993322cba458c752f58 /config/zebedee/zebedee_get_key.php | |
parent | 9a9887710df531ff5683a435838519dd4a0af9a7 (diff) | |
download | pfsense-packages-1b4340d70cf72a5b182c5a3c9e7859a20eeb16a7.tar.gz pfsense-packages-1b4340d70cf72a5b182c5a3c9e7859a20eeb16a7.tar.bz2 pfsense-packages-1b4340d70cf72a5b182c5a3c9e7859a20eeb16a7.zip |
Fix line endings (autocrlf is your friend, use it)
Diffstat (limited to 'config/zebedee/zebedee_get_key.php')
-rw-r--r-- | config/zebedee/zebedee_get_key.php | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/config/zebedee/zebedee_get_key.php b/config/zebedee/zebedee_get_key.php index f0af0b8a..ce54f954 100644 --- a/config/zebedee/zebedee_get_key.php +++ b/config/zebedee/zebedee_get_key.php @@ -1,44 +1,44 @@ -<?
-
-require_once("pkg-utils.inc");
-
-$id= $_REQUEST['id'] ;
-//echo "<pre>" ;
-$external = $config['installedpackages']['zebedee']['config'][0]['external_address'] ;
-$chave = $config['installedpackages']['zebedeekeys']["config"][$id] ;
-
-//print_r($chave['row']) ;
-
-
-
-foreach ($chave['row'] as $k => $v)
-{
- // especify only one port for this host
-// if($v['port']=="") $end=" " ; else $end = ":".$v['port'] ;
- $tunnels .= "tunnel ".$v['loc_port'].":".$v['ipaddress'].":".$v['rmt_port']."\r\n" ;
-}
-
-
-header('Content-Type: application/download');
-header('Content-Disposition: filename=client.txt');
-
-$chave_result = <<<EOF
-verbosity 2
-server false
-message {$chave["ident"]}
-detached true
-privatekey "{$chave["private_key"]}"
-ipmode both
-compression zlib:9
-
-serverhost {$external}
-
-{$tunnels}
-
-EOF;
-
-
-echo $chave_result ;
-
-
+<? + +require_once("pkg-utils.inc"); + +$id= $_REQUEST['id'] ; +//echo "<pre>" ; +$external = $config['installedpackages']['zebedee']['config'][0]['external_address'] ; +$chave = $config['installedpackages']['zebedeekeys']["config"][$id] ; + +//print_r($chave['row']) ; + + + +foreach ($chave['row'] as $k => $v) +{ + // especify only one port for this host +// if($v['port']=="") $end=" " ; else $end = ":".$v['port'] ; + $tunnels .= "tunnel ".$v['loc_port'].":".$v['ipaddress'].":".$v['rmt_port']."\r\n" ; +} + + +header('Content-Type: application/download'); +header('Content-Disposition: filename=client.txt'); + +$chave_result = <<<EOF +verbosity 2 +server false +message {$chave["ident"]} +detached true +privatekey "{$chave["private_key"]}" +ipmode both +compression zlib:9 + +serverhost {$external} + +{$tunnels} + +EOF; + + +echo $chave_result ; + + ?>
\ No newline at end of file |