Server IP : 85.214.239.14 / Your IP : 18.191.45.169 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/3/root/usr/share/augeas/lenses/dist/ |
Upload File : |
(* Module: Strongswan Lens for parsing strongSwan configuration files Authors: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> About: Reference strongswan.conf(5), swanctl.conf(5) About: License This file is licensed under the LGPL v2+ *) module Strongswan = autoload xfm let ws = del /[\n\t ]*(#[\t ]*\n[\n\t ]*)*/ let rec conf = let keys = /[^\/.\{\}#\n\t ]+/ - /include/ in let lists = /(crl|oscp)_uris|(local|remote)_(addrs|ts)|vips|pools|(ca)?certs|pubkeys|groups|cert_policy|dns|nbns|dhcp|netmask|server|subnet|split_(in|ex)clude|interfaces_(ignore|use)|preferred/ in let proposals = /((ah|esp)_)?proposals/ in let name (pat:lens) (sep:string) = pat . Util.del_ws_spc . Util.del_str sep in let val = store /[^\n\t ].*/ . Util.del_str "\n" . ws "" in let sval = Util.del_ws_spc . val in let ival (pat:lens) (end:string) = Util.del_opt_ws " " . seq "item" . pat . Util.del_str end in let list (l:string) (k:regexp) (v:lens) = [ label l . name (store k) "=" . counter "item" . [ ival v "," ]* . [ ival v "\n" ] . ws "" ] in let alg = seq "alg" . store /[a-z0-9]+/ in ( [ Util.del_str "#" . label "#comment" . Util.del_opt_ws " " . val ] | [ key "include" . sval ] | [ name (key (keys - lists - proposals)) "=" . sval ] | list "#list" lists (store /[^\n\t ,][^\n,]*/) | list "#proposals" proposals (counter "alg" . [ alg ] . [ Util.del_str "-" . alg ]*) | [ name (key keys) "{" . ws "\n" . conf . Util.del_str "}" . ws "\n" ] )* let lns = ws "" . conf let xfm = transform lns ( incl "/etc/strongswan.d/*.conf" . incl "/etc/strongswan.d/**/*.conf" . incl "/etc/swanctl/conf.d/*.conf" . incl "/etc/swanctl/swanctl.conf" )