summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--PROGRESS.md284
-rw-r--r--README.md25
-rwxr-xr-xbuild.sh9
-rw-r--r--src/conf.default/config.xml6
-rw-r--r--src/etc/fbtab4
-rw-r--r--src/etc/gettytab235
-rw-r--r--src/etc/inc/IPv6.inc4
-rw-r--r--src/etc/inc/auth.inc102
-rw-r--r--src/etc/inc/authgui.inc127
-rw-r--r--src/etc/inc/captiveportal.inc44
-rw-r--r--src/etc/inc/certs.inc4
-rw-r--r--src/etc/inc/config.console.inc102
-rw-r--r--src/etc/inc/config.gui.inc12
-rw-r--r--src/etc/inc/config.inc27
-rw-r--r--src/etc/inc/config.lib.inc27
-rw-r--r--src/etc/inc/crypt.inc6
-rw-r--r--src/etc/inc/dyndns.class75
-rw-r--r--src/etc/inc/easyrule.inc7
-rw-r--r--src/etc/inc/filter.inc219
-rw-r--r--src/etc/inc/filter_log.inc253
-rw-r--r--src/etc/inc/functions.inc4
-rw-r--r--src/etc/inc/globals.inc107
-rw-r--r--src/etc/inc/growl.class6
-rw-r--r--src/etc/inc/gwlb.inc524
-rw-r--r--src/etc/inc/interfaces.inc186
-rwxr-xr-xsrc/etc/inc/ipsec.auth-user.php8
-rw-r--r--src/etc/inc/ipsec.inc163
-rw-r--r--src/etc/inc/itemid.inc6
-rw-r--r--src/etc/inc/led.inc6
-rw-r--r--src/etc/inc/meta.inc3
-rw-r--r--src/etc/inc/notices.inc5
-rw-r--r--src/etc/inc/openvpn.attributes.php2
-rw-r--r--src/etc/inc/openvpn.auth-user.php9
-rw-r--r--src/etc/inc/openvpn.inc330
-rw-r--r--src/etc/inc/openvpn.tls-verify.php5
-rw-r--r--src/etc/inc/pfsense-utils.inc289
-rw-r--r--src/etc/inc/pkg-utils.inc602
-rw-r--r--src/etc/inc/priv.defs.inc893
-rw-r--r--src/etc/inc/priv.inc5
-rw-r--r--src/etc/inc/priv/user.priv.inc121
-rw-r--r--src/etc/inc/radius.inc4
-rw-r--r--src/etc/inc/rrd.inc140
-rw-r--r--src/etc/inc/service-utils.inc57
-rw-r--r--src/etc/inc/services.inc171
-rw-r--r--src/etc/inc/shaper.inc557
-rw-r--r--src/etc/inc/simplepie/simplepie.inc15
-rw-r--r--src/etc/inc/smtp.inc4
-rw-r--r--src/etc/inc/system.inc114
-rw-r--r--src/etc/inc/unbound.inc135
-rw-r--r--src/etc/inc/upgrade_config.inc457
-rw-r--r--src/etc/inc/util.inc402
-rw-r--r--src/etc/inc/uuid.php327
-rw-r--r--src/etc/inc/voucher.inc8
-rw-r--r--src/etc/inc/vpn.inc282
-rw-r--r--src/etc/inc/vslb.inc7
-rw-r--r--src/etc/inc/xmlparse.inc1
-rw-r--r--src/etc/inc/xmlparse_attr.inc1
-rw-r--r--src/etc/inc/xmlreader.inc5
-rw-r--r--src/etc/inc/xmlrpc.inc56
-rw-r--r--src/etc/inc/xmlrpc_client.inc56
-rw-r--r--src/etc/inc/xmlrpc_server.inc6
-rw-r--r--src/etc/inc/zeromq.inc340
-rw-r--r--src/etc/login.conf4
-rw-r--r--src/etc/pfSense.obsoletedfiles81
-rw-r--r--src/etc/phpshellsessions/gitsync41
-rw-r--r--src/etc/phpshellsessions/installpkg29
-rw-r--r--src/etc/phpshellsessions/uninstallpkg28
-rw-r--r--src/etc/printcap0
-rw-r--r--src/etc/protocols158
-rw-r--r--src/etc/pubkey.pem1
-rwxr-xr-xsrc/etc/rc77
-rwxr-xr-xsrc/etc/rc.banner2
-rwxr-xr-xsrc/etc/rc.bootup32
-rwxr-xr-xsrc/etc/rc.captiveportal_configure1
-rwxr-xr-xsrc/etc/rc.carpbackup5
-rwxr-xr-xsrc/etc/rc.carpmaster1
-rwxr-xr-xsrc/etc/rc.conf_mount_ro1
-rwxr-xr-xsrc/etc/rc.conf_mount_rw1
-rwxr-xr-xsrc/etc/rc.create_full_backup18
-rwxr-xr-xsrc/etc/rc.dhclient_cron1
-rwxr-xr-xsrc/etc/rc.dyndns.update1
-rwxr-xr-xsrc/etc/rc.expireaccounts1
-rwxr-xr-xsrc/etc/rc.filter_configure1
-rwxr-xr-xsrc/etc/rc.filter_configure_sync1
-rwxr-xr-xsrc/etc/rc.filter_synchronize3
-rwxr-xr-xsrc/etc/rc.firmware476
-rwxr-xr-xsrc/etc/rc.firmware_auto73
-rwxr-xr-xsrc/etc/rc.gateway_alarm (renamed from src/usr/local/sbin/pfSense-upgrade-GUI.sh)121
-rwxr-xr-xsrc/etc/rc.halt2
-rwxr-xr-xsrc/etc/rc.initial14
-rwxr-xr-xsrc/etc/rc.initial.defaults20
-rwxr-xr-xsrc/etc/rc.initial.firmware_update190
-rwxr-xr-xsrc/etc/rc.initial.halt17
-rwxr-xr-xsrc/etc/rc.initial.password9
-rwxr-xr-xsrc/etc/rc.initial.ping1
-rwxr-xr-xsrc/etc/rc.initial.reboot17
-rwxr-xr-xsrc/etc/rc.initial.setlanip1
-rwxr-xr-xsrc/etc/rc.initial.setports1
-rwxr-xr-xsrc/etc/rc.initial.store_config_to_removable_device1
-rwxr-xr-xsrc/etc/rc.interfaces_carp_configure1
-rwxr-xr-xsrc/etc/rc.interfaces_lan_configure1
-rwxr-xr-xsrc/etc/rc.interfaces_opt_configure1
-rwxr-xr-xsrc/etc/rc.interfaces_wan_configure1
-rwxr-xr-xsrc/etc/rc.kill_states73
-rwxr-xr-xsrc/etc/rc.newroutedns73
-rwxr-xr-xsrc/etc/rc.newwanip4
-rwxr-xr-xsrc/etc/rc.ntpdate1
-rwxr-xr-xsrc/etc/rc.openvpn2
-rwxr-xr-xsrc/etc/rc.packages19
-rwxr-xr-xsrc/etc/rc.php-fpm_restart4
-rwxr-xr-xsrc/etc/rc.php_ini_setup32
-rwxr-xr-xsrc/etc/rc.prunecaptiveportal1
-rwxr-xr-xsrc/etc/rc.reload_all1
-rwxr-xr-xsrc/etc/rc.reload_interfaces1
-rwxr-xr-xsrc/etc/rc.savevoucher1
-rwxr-xr-xsrc/etc/rc.start_packages1
-rwxr-xr-xsrc/etc/rc.update_alias_url_data1
-rw-r--r--src/etc/services4111
-rwxr-xr-xsrc/etc/sshd2
-rw-r--r--src/etc/ssl/openssl.cnf2
-rwxr-xr-xsrc/sbin/dhclient-script13
-rw-r--r--src/usr/local/bin/captiveportal_gather_stats.php1
-rw-r--r--src/usr/local/bin/dhcpd_gather_stats.php212
-rwxr-xr-xsrc/usr/local/bin/filterparser.php4
-rw-r--r--src/usr/local/captiveportal/index.php8
-rw-r--r--src/usr/local/captiveportal/radius_accounting.inc7
-rw-r--r--src/usr/local/captiveportal/radius_authentication.inc6
-rw-r--r--src/usr/local/pkg/miniupnpd.inc8
-rw-r--r--src/usr/local/pkg/miniupnpd.xml2
-rw-r--r--src/usr/local/sbin/gmirror_status_check.php6
-rwxr-xr-xsrc/usr/local/sbin/pfSense-upgrade359
-rwxr-xr-xsrc/usr/local/sbin/ppp-ipv6121
-rwxr-xr-xsrc/usr/local/sbin/ppp-linkdown10
-rwxr-xr-xsrc/usr/local/sbin/ppp-linkup71
-rw-r--r--src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot130
-rw-r--r--src/usr/local/share/locale/ja/LC_MESSAGES/pfSense.po192
-rw-r--r--src/usr/local/share/locale/pt_BR/LC_MESSAGES/pfSense.po151
-rw-r--r--src/usr/local/share/locale/tr/LC_MESSAGES/pfSense.po131
-rw-r--r--src/usr/local/share/pbi-keys/pfSense-BETA.ssl14
-rw-r--r--src/usr/local/share/pfSense/keys/pkg/revoked/.empty (renamed from src/etc/inc/dot.hushlogin)0
-rw-r--r--src/usr/local/share/pfSense/keys/pkg/trusted/beta.pfsense.org.201512232
-rwxr-xr-xsrc/usr/local/share/pfSense/post_upgrade_command2
-rw-r--r--src/usr/local/share/pfSense/pre_upgrade_command34
-rw-r--r--src/usr/local/share/protocols/100bao.pat12
-rw-r--r--src/usr/local/share/protocols/EAOrigin.pat7
-rw-r--r--src/usr/local/share/protocols/LICENSE605
-rw-r--r--src/usr/local/share/protocols/aim.pat28
-rw-r--r--src/usr/local/share/protocols/aimwebcontent.pat10
-rw-r--r--src/usr/local/share/protocols/any.pat8
-rw-r--r--src/usr/local/share/protocols/applejuice.pat12
-rw-r--r--src/usr/local/share/protocols/ares.pat63
-rw-r--r--src/usr/local/share/protocols/armagetron.pat12
-rw-r--r--src/usr/local/share/protocols/audiogalaxy.pat19
-rw-r--r--src/usr/local/share/protocols/battlefield1942.pat14
-rw-r--r--src/usr/local/share/protocols/battlefield2.pat26
-rw-r--r--src/usr/local/share/protocols/battlefield2142.pat14
-rw-r--r--src/usr/local/share/protocols/bgp.pat19
-rw-r--r--src/usr/local/share/protocols/biff.pat16
-rw-r--r--src/usr/local/share/protocols/bittorrent.pat25
-rw-r--r--src/usr/local/share/protocols/chikka.pat17
-rw-r--r--src/usr/local/share/protocols/cimd.pat19
-rw-r--r--src/usr/local/share/protocols/ciscovpn.pat11
-rw-r--r--src/usr/local/share/protocols/citrix.pat12
-rw-r--r--src/usr/local/share/protocols/code_red.pat8
-rw-r--r--src/usr/local/share/protocols/counterstrike-source.pat42
-rw-r--r--src/usr/local/share/protocols/cvs.pat14
-rw-r--r--src/usr/local/share/protocols/dayofdefeat-source.pat11
-rw-r--r--src/usr/local/share/protocols/dazhihui.pat11
-rw-r--r--src/usr/local/share/protocols/dhcp.pat36
-rw-r--r--src/usr/local/share/protocols/directconnect.pat14
-rw-r--r--src/usr/local/share/protocols/dns.pat63
-rw-r--r--src/usr/local/share/protocols/doom3.pat10
-rw-r--r--src/usr/local/share/protocols/edonkey.pat37
-rw-r--r--src/usr/local/share/protocols/exe.pat20
-rw-r--r--src/usr/local/share/protocols/fasttrack.pat23
-rw-r--r--src/usr/local/share/protocols/finger.pat15
-rw-r--r--src/usr/local/share/protocols/flash.pat18
-rw-r--r--src/usr/local/share/protocols/freenet.pat10
-rw-r--r--src/usr/local/share/protocols/ftp.pat46
-rw-r--r--src/usr/local/share/protocols/gif.pat8
-rw-r--r--src/usr/local/share/protocols/gkrellm.pat13
-rw-r--r--src/usr/local/share/protocols/gnucleuslan.pat10
-rw-r--r--src/usr/local/share/protocols/gnutella.pat34
-rw-r--r--src/usr/local/share/protocols/goboogy.pat13
-rw-r--r--src/usr/local/share/protocols/gopher.pat25
-rw-r--r--src/usr/local/share/protocols/gtalk.pat11
-rw-r--r--src/usr/local/share/protocols/guildwars.pat14
-rw-r--r--src/usr/local/share/protocols/h323.pat36
-rw-r--r--src/usr/local/share/protocols/halflife2-deathmatch.pat10
-rw-r--r--src/usr/local/share/protocols/hddtemp.pat14
-rw-r--r--src/usr/local/share/protocols/hotline.pat12
-rw-r--r--src/usr/local/share/protocols/html.pat11
-rw-r--r--src/usr/local/share/protocols/http-dap.pat19
-rw-r--r--src/usr/local/share/protocols/http-freshdownload.pat17
-rw-r--r--src/usr/local/share/protocols/http-itunes.pat14
-rw-r--r--src/usr/local/share/protocols/http-rtsp.pat16
-rw-r--r--src/usr/local/share/protocols/http.pat28
-rw-r--r--src/usr/local/share/protocols/httpaudio.pat32
-rw-r--r--src/usr/local/share/protocols/httpcachehit.pat19
-rw-r--r--src/usr/local/share/protocols/httpcachemiss.pat17
-rw-r--r--src/usr/local/share/protocols/httpvideo.pat32
-rw-r--r--src/usr/local/share/protocols/ident.pat15
-rw-r--r--src/usr/local/share/protocols/imap.pat14
-rw-r--r--src/usr/local/share/protocols/imesh.pat15
-rw-r--r--src/usr/local/share/protocols/ipp.pat12
-rw-r--r--src/usr/local/share/protocols/irc.pat20
-rw-r--r--src/usr/local/share/protocols/jabber.pat24
-rw-r--r--src/usr/local/share/protocols/jpeg.pat8
-rw-r--r--src/usr/local/share/protocols/kugoo.pat21
-rw-r--r--src/usr/local/share/protocols/live365.pat15
-rw-r--r--src/usr/local/share/protocols/liveforspeed.pat13
-rw-r--r--src/usr/local/share/protocols/lpd.pat18
-rw-r--r--src/usr/local/share/protocols/mohaa.pat11
-rw-r--r--src/usr/local/share/protocols/mp3.pat11
-rw-r--r--src/usr/local/share/protocols/msn-filetransfer.pat30
-rw-r--r--src/usr/local/share/protocols/msnmessenger.pat28
-rw-r--r--src/usr/local/share/protocols/mute.pat11
-rw-r--r--src/usr/local/share/protocols/napster.pat24
-rw-r--r--src/usr/local/share/protocols/nbns.pat20
-rw-r--r--src/usr/local/share/protocols/ncp.pat23
-rw-r--r--src/usr/local/share/protocols/netbios.pat29
-rw-r--r--src/usr/local/share/protocols/nimda.pat8
-rw-r--r--src/usr/local/share/protocols/nntp.pat21
-rw-r--r--src/usr/local/share/protocols/ntp.pat17
-rw-r--r--src/usr/local/share/protocols/ogg.pat7
-rw-r--r--src/usr/local/share/protocols/openft.pat13
-rw-r--r--src/usr/local/share/protocols/pcanywhere.pat12
-rw-r--r--src/usr/local/share/protocols/pdf.pat11
-rw-r--r--src/usr/local/share/protocols/perl.pat7
-rw-r--r--src/usr/local/share/protocols/png.pat13
-rw-r--r--src/usr/local/share/protocols/poco.pat12
-rw-r--r--src/usr/local/share/protocols/pop3.pat50
-rw-r--r--src/usr/local/share/protocols/postscript.pat7
-rw-r--r--src/usr/local/share/protocols/pplive.pat11
-rw-r--r--src/usr/local/share/protocols/pressplay.pat15
-rw-r--r--src/usr/local/share/protocols/qq.pat26
-rw-r--r--src/usr/local/share/protocols/quake-halflife.pat32
-rw-r--r--src/usr/local/share/protocols/quake1.pat19
-rw-r--r--src/usr/local/share/protocols/quicktime.pat21
-rw-r--r--src/usr/local/share/protocols/radmin.pat17
-rw-r--r--src/usr/local/share/protocols/rar.pat7
-rw-r--r--src/usr/local/share/protocols/rdp.pat20
-rw-r--r--src/usr/local/share/protocols/replaytv-ivs.pat11
-rw-r--r--src/usr/local/share/protocols/rlogin.pat19
-rw-r--r--src/usr/local/share/protocols/rpm.pat7
-rw-r--r--src/usr/local/share/protocols/rtf.pat8
-rw-r--r--src/usr/local/share/protocols/rtmp.pat13
-rw-r--r--src/usr/local/share/protocols/rtp.pat33
-rw-r--r--src/usr/local/share/protocols/rtsp.pat15
-rw-r--r--src/usr/local/share/protocols/runesofmagic.pat63
-rw-r--r--src/usr/local/share/protocols/shoutcast.pat27
-rw-r--r--src/usr/local/share/protocols/sip.pat20
-rw-r--r--src/usr/local/share/protocols/skypeout.pat50
-rw-r--r--src/usr/local/share/protocols/skypetoskype.pat14
-rw-r--r--src/usr/local/share/protocols/smb.pat19
-rw-r--r--src/usr/local/share/protocols/smtp.pat40
-rw-r--r--src/usr/local/share/protocols/snmp-mon.pat32
-rw-r--r--src/usr/local/share/protocols/snmp-trap.pat33
-rw-r--r--src/usr/local/share/protocols/snmp.pat19
-rw-r--r--src/usr/local/share/protocols/socks.pat32
-rw-r--r--src/usr/local/share/protocols/soribada.pat51
-rw-r--r--src/usr/local/share/protocols/soulseek.pat17
-rw-r--r--src/usr/local/share/protocols/ssdp.pat21
-rw-r--r--src/usr/local/share/protocols/ssh.pat17
-rw-r--r--src/usr/local/share/protocols/ssl.pat16
-rw-r--r--src/usr/local/share/protocols/stun.pat46
-rw-r--r--src/usr/local/share/protocols/subspace.pat21
-rw-r--r--src/usr/local/share/protocols/subversion.pat13
-rw-r--r--src/usr/local/share/protocols/swf.pat2
-rw-r--r--src/usr/local/share/protocols/tar.pat12
-rw-r--r--src/usr/local/share/protocols/teamfortress2.pat11
-rw-r--r--src/usr/local/share/protocols/teamspeak.pat15
-rw-r--r--src/usr/local/share/protocols/telnet.pat16
-rw-r--r--src/usr/local/share/protocols/tesla.pat15
-rw-r--r--src/usr/local/share/protocols/tftp.pat21
-rw-r--r--src/usr/local/share/protocols/thecircle.pat12
-rw-r--r--src/usr/local/share/protocols/tonghuashun.pat11
-rw-r--r--src/usr/local/share/protocols/tor.pat17
-rw-r--r--src/usr/local/share/protocols/tsp.pat14
-rw-r--r--src/usr/local/share/protocols/unset.pat8
-rw-r--r--src/usr/local/share/protocols/uucp.pat12
-rw-r--r--src/usr/local/share/protocols/validcertssl.pat25
-rw-r--r--src/usr/local/share/protocols/ventrilo.pat18
-rw-r--r--src/usr/local/share/protocols/vnc.pat23
-rw-r--r--src/usr/local/share/protocols/whois.pat14
-rw-r--r--src/usr/local/share/protocols/worldofwarcraft.pat66
-rw-r--r--src/usr/local/share/protocols/x11.pat23
-rw-r--r--src/usr/local/share/protocols/xboxlive.pat41
-rw-r--r--src/usr/local/share/protocols/xunlei.pat83
-rw-r--r--src/usr/local/share/protocols/yahoo.pat27
-rw-r--r--src/usr/local/share/protocols/zip.pat7
-rw-r--r--src/usr/local/share/protocols/zmaap.pat18
-rwxr-xr-xsrc/usr/local/www/bandwidth_by_ip.php5
-rw-r--r--src/usr/local/www/bootstrap/css/pfSense-BETA.css3
-rw-r--r--src/usr/local/www/bootstrap/css/pfSense-dark.css350
-rw-r--r--src/usr/local/www/bootstrap/css/pfSense.css699
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/LICENSE.txt202
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Black.ttfbin0 -> 163488 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-BlackItalic.ttfbin0 -> 165444 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Bold.ttfbin0 -> 162464 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-BoldItalic.ttfbin0 -> 163644 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Italic.ttfbin0 -> 161484 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Light.ttfbin0 -> 162420 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-LightItalic.ttfbin0 -> 166492 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Medium.ttfbin0 -> 162588 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-MediumItalic.ttfbin0 -> 165636 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Regular.ttfbin0 -> 162876 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-Thin.ttfbin0 -> 163132 bytes
-rwxr-xr-xsrc/usr/local/www/bootstrap/fonts/Roboto-ThinItalic.ttfbin0 -> 168276 bytes
-rw-r--r--src/usr/local/www/bootstrap/fonts/roboto.css83
-rw-r--r--src/usr/local/www/classes/Form.class.php10
-rw-r--r--src/usr/local/www/classes/Form/Button.class.php12
-rw-r--r--src/usr/local/www/classes/Form/Checkbox.class.php8
-rw-r--r--src/usr/local/www/classes/Form/Element.class.php19
-rw-r--r--src/usr/local/www/classes/Form/Group.class.php13
-rw-r--r--src/usr/local/www/classes/Form/Input.class.php44
-rw-r--r--src/usr/local/www/classes/Form/Section.class.php51
-rw-r--r--src/usr/local/www/classes/Form/Select.class.php11
-rw-r--r--src/usr/local/www/classes/Form/Textarea.class.php16
-rw-r--r--src/usr/local/www/classes/Modal.class.php2
-rw-r--r--src/usr/local/www/classes/autoload.inc.php12
-rw-r--r--src/usr/local/www/copyright-master.txt4
-rw-r--r--src/usr/local/www/crash_reporter.php52
-rw-r--r--src/usr/local/www/diag_arp.php43
-rw-r--r--src/usr/local/www/diag_authentication.php43
-rw-r--r--src/usr/local/www/diag_backup.php90
-rw-r--r--src/usr/local/www/diag_confbak.php122
-rwxr-xr-xsrc/usr/local/www/diag_defaults.php70
-rwxr-xr-xsrc/usr/local/www/diag_dns.php46
-rwxr-xr-xsrc/usr/local/www/diag_dump_states.php50
-rw-r--r--src/usr/local/www/diag_dump_states_sources.php41
-rw-r--r--src/usr/local/www/diag_gmirror.php23
-rwxr-xr-xsrc/usr/local/www/diag_halt.php (renamed from src/usr/local/www/halt.php)32
-rw-r--r--src/usr/local/www/diag_ipsec_xml.php107
-rw-r--r--src/usr/local/www/diag_limiter_info.php34
-rwxr-xr-xsrc/usr/local/www/diag_logs.php175
-rw-r--r--src/usr/local/www/diag_logs_filter.php592
-rwxr-xr-xsrc/usr/local/www/diag_logs_filter_dynamic.php243
-rw-r--r--src/usr/local/www/diag_nanobsd.php59
-rw-r--r--src/usr/local/www/diag_ndp.php39
-rw-r--r--src/usr/local/www/diag_packet_capture.php68
-rw-r--r--src/usr/local/www/diag_patterns.php123
-rw-r--r--src/usr/local/www/diag_pf_info.php38
-rw-r--r--src/usr/local/www/diag_pftop.php (renamed from src/usr/local/www/diag_system_pftop.php)53
-rw-r--r--src/usr/local/www/diag_ping.php52
-rwxr-xr-xsrc/usr/local/www/diag_reboot.php (renamed from src/usr/local/www/reboot.php)78
-rw-r--r--src/usr/local/www/diag_resetstate.php40
-rw-r--r--src/usr/local/www/diag_routes.php76
-rw-r--r--src/usr/local/www/diag_smart.php88
-rw-r--r--src/usr/local/www/diag_sockets.php183
-rw-r--r--src/usr/local/www/diag_states_summary.php35
-rw-r--r--src/usr/local/www/diag_system_activity.php32
-rw-r--r--src/usr/local/www/diag_tables.php46
-rw-r--r--src/usr/local/www/diag_testport.php64
-rw-r--r--src/usr/local/www/diag_traceroute.php61
-rw-r--r--src/usr/local/www/easyrule.php36
-rw-r--r--src/usr/local/www/edit.php33
-rw-r--r--src/usr/local/www/exec.php120
-rw-r--r--src/usr/local/www/fbegin.inc2
-rw-r--r--src/usr/local/www/filebrowser/browser.js4
-rw-r--r--src/usr/local/www/filebrowser/browser.php1
-rw-r--r--src/usr/local/www/firewall_aliases.php111
-rwxr-xr-xsrc/usr/local/www/firewall_aliases_edit.php101
-rwxr-xr-xsrc/usr/local/www/firewall_aliases_import.php27
-rw-r--r--src/usr/local/www/firewall_nat.php116
-rw-r--r--src/usr/local/www/firewall_nat_1to1.php94
-rw-r--r--src/usr/local/www/firewall_nat_1to1_edit.php74
-rw-r--r--src/usr/local/www/firewall_nat_edit.php208
-rw-r--r--src/usr/local/www/firewall_nat_npt.php58
-rw-r--r--src/usr/local/www/firewall_nat_npt_edit.php54
-rw-r--r--src/usr/local/www/firewall_nat_out.php196
-rw-r--r--src/usr/local/www/firewall_nat_out_edit.php100
-rw-r--r--src/usr/local/www/firewall_rules.php354
-rw-r--r--src/usr/local/www/firewall_rules_edit.php357
-rw-r--r--src/usr/local/www/firewall_schedule.php60
-rw-r--r--src/usr/local/www/firewall_schedule_edit.php266
-rw-r--r--src/usr/local/www/firewall_shaper.php130
-rw-r--r--src/usr/local/www/firewall_shaper_layer7.php614
-rw-r--r--src/usr/local/www/firewall_shaper_queues.php58
-rw-r--r--src/usr/local/www/firewall_shaper_vinterface.php143
-rw-r--r--src/usr/local/www/firewall_shaper_wizards.php36
-rw-r--r--src/usr/local/www/firewall_virtual_ip.php64
-rw-r--r--src/usr/local/www/firewall_virtual_ip_edit.php104
-rw-r--r--src/usr/local/www/font-awesome/HELP-US-OUT.txt7
-rw-r--r--src/usr/local/www/font-awesome/css/font-awesome.css2086
-rw-r--r--src/usr/local/www/font-awesome/css/font-awesome.min.css4
-rw-r--r--src/usr/local/www/font-awesome/fonts/FontAwesome.otfbin0 -> 109688 bytes
-rw-r--r--src/usr/local/www/font-awesome/fonts/fontawesome-webfont.eotbin0 -> 70807 bytes
-rw-r--r--src/usr/local/www/font-awesome/fonts/fontawesome-webfont.svg655
-rw-r--r--src/usr/local/www/font-awesome/fonts/fontawesome-webfont.ttfbin0 -> 142072 bytes
-rw-r--r--src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woffbin0 -> 83588 bytes
-rw-r--r--src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff2bin0 -> 66624 bytes
-rw-r--r--src/usr/local/www/font-awesome/less/animated.less34
-rw-r--r--src/usr/local/www/font-awesome/less/bordered-pulled.less25
-rw-r--r--src/usr/local/www/font-awesome/less/core.less12
-rw-r--r--src/usr/local/www/font-awesome/less/fixed-width.less6
-rw-r--r--src/usr/local/www/font-awesome/less/font-awesome.less17
-rw-r--r--src/usr/local/www/font-awesome/less/icons.less697
-rw-r--r--src/usr/local/www/font-awesome/less/larger.less13
-rw-r--r--src/usr/local/www/font-awesome/less/list.less19
-rw-r--r--src/usr/local/www/font-awesome/less/mixins.less26
-rw-r--r--src/usr/local/www/font-awesome/less/path.less15
-rw-r--r--src/usr/local/www/font-awesome/less/rotated-flipped.less20
-rw-r--r--src/usr/local/www/font-awesome/less/stacked.less20
-rw-r--r--src/usr/local/www/font-awesome/less/variables.less708
-rw-r--r--src/usr/local/www/font-awesome/scss/_animated.scss34
-rw-r--r--src/usr/local/www/font-awesome/scss/_bordered-pulled.scss25
-rw-r--r--src/usr/local/www/font-awesome/scss/_core.scss12
-rw-r--r--src/usr/local/www/font-awesome/scss/_fixed-width.scss6
-rw-r--r--src/usr/local/www/font-awesome/scss/_icons.scss697
-rw-r--r--src/usr/local/www/font-awesome/scss/_larger.scss13
-rw-r--r--src/usr/local/www/font-awesome/scss/_list.scss19
-rw-r--r--src/usr/local/www/font-awesome/scss/_mixins.scss26
-rw-r--r--src/usr/local/www/font-awesome/scss/_path.scss15
-rw-r--r--src/usr/local/www/font-awesome/scss/_rotated-flipped.scss20
-rw-r--r--src/usr/local/www/font-awesome/scss/_stacked.scss20
-rw-r--r--src/usr/local/www/font-awesome/scss/_variables.scss708
-rw-r--r--src/usr/local/www/font-awesome/scss/font-awesome.scss17
-rwxr-xr-xsrc/usr/local/www/foot.inc17
-rw-r--r--src/usr/local/www/getserviceproviders.php16
-rw-r--r--src/usr/local/www/getstats.php15
-rwxr-xr-xsrc/usr/local/www/graph.php26
-rw-r--r--src/usr/local/www/graph_cpu.php24
-rw-r--r--src/usr/local/www/guiconfig.inc311
-rwxr-xr-xsrc/usr/local/www/head.inc153
-rw-r--r--src/usr/local/www/help.php64
-rw-r--r--src/usr/local/www/ifstats.php20
-rw-r--r--src/usr/local/www/includes/functions.inc.php1
-rw-r--r--src/usr/local/www/index.php299
-rw-r--r--src/usr/local/www/interfaces.php460
-rw-r--r--src/usr/local/www/interfaces_assign.php137
-rw-r--r--src/usr/local/www/interfaces_bridge.php104
-rw-r--r--src/usr/local/www/interfaces_bridge_edit.php136
-rw-r--r--src/usr/local/www/interfaces_gif.php94
-rw-r--r--src/usr/local/www/interfaces_gif_edit.php110
-rw-r--r--src/usr/local/www/interfaces_gre.php98
-rw-r--r--src/usr/local/www/interfaces_gre_edit.php105
-rw-r--r--src/usr/local/www/interfaces_groups.php108
-rw-r--r--src/usr/local/www/interfaces_groups_edit.php98
-rw-r--r--src/usr/local/www/interfaces_lagg.php94
-rw-r--r--src/usr/local/www/interfaces_lagg_edit.php104
-rw-r--r--src/usr/local/www/interfaces_ppps.php102
-rw-r--r--src/usr/local/www/interfaces_ppps_edit.php400
-rw-r--r--src/usr/local/www/interfaces_qinq.php102
-rw-r--r--src/usr/local/www/interfaces_qinq_edit.php106
-rw-r--r--src/usr/local/www/interfaces_vlan.php67
-rw-r--r--src/usr/local/www/interfaces_vlan_edit.php136
-rw-r--r--src/usr/local/www/interfaces_wireless.php96
-rw-r--r--src/usr/local/www/interfaces_wireless_edit.php104
-rw-r--r--src/usr/local/www/jquery/pfSense.js77
-rw-r--r--src/usr/local/www/jquery/pfSenseHelpers.js155
-rw-r--r--src/usr/local/www/license.php83
-rw-r--r--src/usr/local/www/load_balancer_monitor.php113
-rw-r--r--src/usr/local/www/load_balancer_monitor_edit.php99
-rw-r--r--src/usr/local/www/load_balancer_pool.php116
-rw-r--r--src/usr/local/www/load_balancer_pool_edit.php183
-rw-r--r--src/usr/local/www/load_balancer_setting.php99
-rw-r--r--src/usr/local/www/load_balancer_virtual_server.php42
-rw-r--r--src/usr/local/www/load_balancer_virtual_server_edit.php18
-rw-r--r--src/usr/local/www/logo.pngbin4055 -> 2955 bytes
-rw-r--r--src/usr/local/www/pfs-mini.pngbin0 -> 10752 bytes
-rwxr-xr-xsrc/usr/local/www/pkg.php274
-rw-r--r--src/usr/local/www/pkg_edit.php412
-rw-r--r--src/usr/local/www/pkg_mgr.php286
-rw-r--r--src/usr/local/www/pkg_mgr_install.php725
-rw-r--r--src/usr/local/www/pkg_mgr_installed.php267
-rw-r--r--src/usr/local/www/pkg_mgr_settings.php114
-rw-r--r--src/usr/local/www/restart_httpd.php88
-rw-r--r--src/usr/local/www/services_captiveportal.php177
-rw-r--r--src/usr/local/www/services_captiveportal_filemanager.php142
-rw-r--r--src/usr/local/www/services_captiveportal_hostname.php121
-rw-r--r--src/usr/local/www/services_captiveportal_hostname_edit.php97
-rw-r--r--src/usr/local/www/services_captiveportal_ip.php122
-rw-r--r--src/usr/local/www/services_captiveportal_ip_edit.php105
-rw-r--r--src/usr/local/www/services_captiveportal_mac.php119
-rw-r--r--src/usr/local/www/services_captiveportal_mac_edit.php106
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers.php88
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers_edit.php107
-rw-r--r--src/usr/local/www/services_captiveportal_zones.php126
-rw-r--r--src/usr/local/www/services_captiveportal_zones_edit.php90
-rw-r--r--src/usr/local/www/services_dhcp.php167
-rw-r--r--src/usr/local/www/services_dhcp_edit.php122
-rw-r--r--src/usr/local/www/services_dhcp_relay.php73
-rw-r--r--src/usr/local/www/services_dhcpv6.php219
-rw-r--r--src/usr/local/www/services_dhcpv6_edit.php101
-rw-r--r--src/usr/local/www/services_dhcpv6_relay.php153
-rw-r--r--src/usr/local/www/services_dnsmasq.php271
-rw-r--r--src/usr/local/www/services_dnsmasq_domainoverride_edit.php150
-rw-r--r--src/usr/local/www/services_dnsmasq_edit.php218
-rw-r--r--src/usr/local/www/services_dyndns.php157
-rw-r--r--src/usr/local/www/services_dyndns_edit.php55
-rw-r--r--src/usr/local/www/services_igmpproxy.php132
-rw-r--r--src/usr/local/www/services_igmpproxy_edit.php251
-rw-r--r--src/usr/local/www/services_ntpd.php35
-rw-r--r--src/usr/local/www/services_ntpd_gps.php40
-rw-r--r--src/usr/local/www/services_ntpd_pps.php112
-rw-r--r--src/usr/local/www/services_pppoe.php179
-rw-r--r--src/usr/local/www/services_pppoe_edit.php (renamed from src/usr/local/www/vpn_pppoe_edit.php)69
-rw-r--r--src/usr/local/www/services_rfc2136.php166
-rw-r--r--src/usr/local/www/services_rfc2136_edit.php127
-rw-r--r--src/usr/local/www/services_router_advertisements.php53
-rw-r--r--src/usr/local/www/services_snmp.php135
-rw-r--r--src/usr/local/www/services_unbound.php391
-rw-r--r--src/usr/local/www/services_unbound_acls.php178
-rw-r--r--src/usr/local/www/services_unbound_advanced.php57
-rw-r--r--src/usr/local/www/services_unbound_domainoverride_edit.php93
-rw-r--r--src/usr/local/www/services_unbound_host_edit.php208
-rw-r--r--src/usr/local/www/services_wol.php112
-rw-r--r--src/usr/local/www/services_wol_edit.php92
-rw-r--r--src/usr/local/www/shortcuts.inc133
-rwxr-xr-xsrc/usr/local/www/sortable/LICENSE19
-rwxr-xr-xsrc/usr/local/www/sortable/sortable-theme-bootstrap.css90
-rwxr-xr-xsrc/usr/local/www/sortable/sortable.js381
-rw-r--r--src/usr/local/www/stats.php84
-rwxr-xr-xsrc/usr/local/www/status.php221
-rw-r--r--src/usr/local/www/status_captiveportal.php62
-rw-r--r--src/usr/local/www/status_captiveportal_expire.php93
-rw-r--r--src/usr/local/www/status_captiveportal_test.php88
-rw-r--r--src/usr/local/www/status_captiveportal_voucher_rolls.php87
-rw-r--r--src/usr/local/www/status_captiveportal_vouchers.php82
-rw-r--r--src/usr/local/www/status_carp.php (renamed from src/usr/local/www/carp_status.php)84
-rw-r--r--src/usr/local/www/status_dhcp_leases.php62
-rw-r--r--src/usr/local/www/status_dhcpv6_leases.php170
-rw-r--r--src/usr/local/www/status_filter_reload.php88
-rwxr-xr-xsrc/usr/local/www/status_gateway_groups.php105
-rw-r--r--src/usr/local/www/status_gateways.php121
-rw-r--r--src/usr/local/www/status_graph.php116
-rw-r--r--src/usr/local/www/status_graph_cpu.php88
-rw-r--r--src/usr/local/www/status_interfaces.php46
-rw-r--r--src/usr/local/www/status_ipsec.php (renamed from src/usr/local/www/diag_ipsec.php)358
-rw-r--r--src/usr/local/www/status_ipsec_leases.php (renamed from src/usr/local/www/diag_ipsec_leases.php)45
-rw-r--r--src/usr/local/www/status_ipsec_sad.php (renamed from src/usr/local/www/diag_ipsec_sad.php)47
-rw-r--r--src/usr/local/www/status_ipsec_spd.php (renamed from src/usr/local/www/diag_ipsec_spd.php)59
-rw-r--r--src/usr/local/www/status_lb_pool.php131
-rw-r--r--src/usr/local/www/status_lb_vs.php141
-rwxr-xr-xsrc/usr/local/www/status_logs.php681
-rw-r--r--src/usr/local/www/status_logs_filter.php1059
-rwxr-xr-xsrc/usr/local/www/status_logs_filter_dynamic.php446
-rw-r--r--src/usr/local/www/status_logs_filter_summary.php (renamed from src/usr/local/www/diag_logs_filter_summary.php)76
-rw-r--r--src/usr/local/www/status_logs_settings.php (renamed from src/usr/local/www/diag_logs_settings.php)90
-rw-r--r--[-rwxr-xr-x]src/usr/local/www/status_logs_vpn.php (renamed from src/usr/local/www/diag_logs_vpn.php)95
-rw-r--r--src/usr/local/www/status_ntpd.php92
-rw-r--r--src/usr/local/www/status_openvpn.php171
-rwxr-xr-xsrc/usr/local/www/status_pkglogs.php (renamed from src/usr/local/www/diag_pkglogs.php)34
-rw-r--r--src/usr/local/www/status_queues.php57
-rw-r--r--src/usr/local/www/status_rrd_graph.php231
-rw-r--r--src/usr/local/www/status_rrd_graph_img.php57
-rw-r--r--src/usr/local/www/status_rrd_graph_settings.php54
-rwxr-xr-xsrc/usr/local/www/status_services.php26
-rw-r--r--src/usr/local/www/status_upnp.php103
-rw-r--r--src/usr/local/www/status_wireless.php134
-rw-r--r--src/usr/local/www/system.php147
-rw-r--r--src/usr/local/www/system_advanced_admin.php154
-rw-r--r--src/usr/local/www/system_advanced_firewall.php138
-rw-r--r--src/usr/local/www/system_advanced_misc.php100
-rw-r--r--src/usr/local/www/system_advanced_network.php106
-rw-r--r--src/usr/local/www/system_advanced_notifications.php79
-rw-r--r--src/usr/local/www/system_advanced_sysctl.php93
-rw-r--r--src/usr/local/www/system_authservers.php27
-rw-r--r--src/usr/local/www/system_camanager.php166
-rw-r--r--src/usr/local/www/system_certmanager.php398
-rw-r--r--src/usr/local/www/system_crlmanager.php163
-rw-r--r--src/usr/local/www/system_firmware.php331
-rwxr-xr-xsrc/usr/local/www/system_firmware_auto.php273
-rw-r--r--src/usr/local/www/system_firmware_check.php181
-rw-r--r--src/usr/local/www/system_firmware_restorefullbackup.php229
-rw-r--r--src/usr/local/www/system_firmware_settings.php260
-rw-r--r--src/usr/local/www/system_gateway_groups.php123
-rw-r--r--src/usr/local/www/system_gateway_groups_edit.php54
-rw-r--r--src/usr/local/www/system_gateways.php102
-rw-r--r--src/usr/local/www/system_gateways_edit.php547
-rw-r--r--src/usr/local/www/system_groupmanager.php165
-rw-r--r--src/usr/local/www/system_groupmanager_addprivs.php163
-rwxr-xr-xsrc/usr/local/www/system_hasync.php127
-rw-r--r--src/usr/local/www/system_routes.php148
-rw-r--r--src/usr/local/www/system_routes_edit.php116
-rw-r--r--src/usr/local/www/system_update_settings.php241
-rw-r--r--src/usr/local/www/system_usermanager.php309
-rw-r--r--src/usr/local/www/system_usermanager_addprivs.php123
-rw-r--r--src/usr/local/www/system_usermanager_passwordmg.php84
-rw-r--r--src/usr/local/www/system_usermanager_settings.php130
-rw-r--r--src/usr/local/www/system_usermanager_settings_ldapacpicker.php129
-rwxr-xr-xsrc/usr/local/www/system_usermanager_settings_test.php97
-rwxr-xr-xsrc/usr/local/www/tree/index.html228
-rwxr-xr-xsrc/usr/local/www/tree/tree.css136
-rw-r--r--src/usr/local/www/uploadconfig.php81
-rw-r--r--src/usr/local/www/vpn_ipsec.php337
-rw-r--r--src/usr/local/www/vpn_ipsec_keys.php124
-rw-r--r--src/usr/local/www/vpn_ipsec_keys_edit.php88
-rw-r--r--src/usr/local/www/vpn_ipsec_mobile.php184
-rw-r--r--src/usr/local/www/vpn_ipsec_phase1.php119
-rw-r--r--src/usr/local/www/vpn_ipsec_phase2.php138
-rw-r--r--src/usr/local/www/vpn_ipsec_settings.php112
-rw-r--r--src/usr/local/www/vpn_l2tp.php592
-rw-r--r--src/usr/local/www/vpn_l2tp_users.php124
-rw-r--r--src/usr/local/www/vpn_l2tp_users_edit.php181
-rw-r--r--src/usr/local/www/vpn_openvpn_client.php245
-rw-r--r--src/usr/local/www/vpn_openvpn_csc.php146
-rw-r--r--src/usr/local/www/vpn_openvpn_server.php329
-rw-r--r--src/usr/local/www/vpn_pppoe.php151
-rw-r--r--src/usr/local/www/widgets/include/carp_status.inc4
-rw-r--r--src/usr/local/www/widgets/include/dyn_dns_status.inc2
-rw-r--r--src/usr/local/www/widgets/include/ipsec.inc2
-rw-r--r--src/usr/local/www/widgets/include/log.inc2
-rw-r--r--src/usr/local/www/widgets/javascript/thermal_sensors.js351
-rw-r--r--src/usr/local/www/widgets/widgets/captive_portal_status.widget.php98
-rw-r--r--src/usr/local/www/widgets/widgets/carp_status.widget.php116
-rw-r--r--src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php90
-rw-r--r--src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php155
-rw-r--r--src/usr/local/www/widgets/widgets/gateways.widget.php278
-rw-r--r--src/usr/local/www/widgets/widgets/gmirror_status.widget.php83
-rw-r--r--src/usr/local/www/widgets/widgets/installed_packages.widget.php272
-rw-r--r--src/usr/local/www/widgets/widgets/interface_statistics.widget.php206
-rw-r--r--src/usr/local/www/widgets/widgets/interfaces.widget.php30
-rw-r--r--src/usr/local/www/widgets/widgets/ipsec.widget.php427
-rw-r--r--src/usr/local/www/widgets/widgets/load_balancer_status.widget.php110
-rw-r--r--src/usr/local/www/widgets/widgets/log.widget.php148
-rw-r--r--src/usr/local/www/widgets/widgets/ntp_status.widget.php62
-rw-r--r--src/usr/local/www/widgets/widgets/openvpn.widget.php89
-rw-r--r--src/usr/local/www/widgets/widgets/picture.widget.php6
-rw-r--r--src/usr/local/www/widgets/widgets/rss.widget.php26
-rw-r--r--src/usr/local/www/widgets/widgets/services_status.widget.php58
-rw-r--r--src/usr/local/www/widgets/widgets/smart_status.widget.php92
-rw-r--r--src/usr/local/www/widgets/widgets/system_information.widget.php264
-rw-r--r--src/usr/local/www/widgets/widgets/thermal_sensors.widget.php195
-rw-r--r--src/usr/local/www/widgets/widgets/traffic_graphs.widget.php36
-rw-r--r--src/usr/local/www/widgets/widgets/wake_on_lan.widget.php125
-rw-r--r--src/usr/local/www/wizard.php136
-rw-r--r--src/usr/local/www/wizards/openvpn_wizard.inc16
-rw-r--r--src/usr/local/www/wizards/openvpn_wizard.xml70
-rw-r--r--src/usr/local/www/wizards/setup_wizard.xml210
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc90
-rwxr-xr-xsrc/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml139
-rw-r--r--src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc84
-rwxr-xr-xsrc/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml119
-rwxr-xr-xsrc/usr/local/www/xmlrpc.php107
-rwxr-xr-xtools/build_snapshots.sh87
-rw-r--r--tools/builder_common.sh363
-rw-r--r--tools/builder_defaults.sh33
-rw-r--r--tools/conf/pfPorts/make.conf17
-rwxr-xr-xtools/scripts/clean.sh (renamed from clean.sh)0
-rwxr-xr-xtools/scripts/generate-privdefs.php26
-rwxr-xr-xtools/scripts/update_package_pfPorts.php17
-rw-r--r--tools/templates/core_pkg/base-nanobsd/exclude_files3
-rw-r--r--tools/templates/core_pkg/base-nanobsd/metadir/+INSTALL1
-rw-r--r--tools/templates/core_pkg/base-nanobsd/metadir/+MANIFEST2
-rw-r--r--tools/templates/core_pkg/base/exclude_files6
-rw-r--r--tools/templates/core_pkg/base/metadir/+INSTALL1
-rw-r--r--tools/templates/core_pkg/base/metadir/+MANIFEST2
-rw-r--r--tools/templates/core_pkg/kernel-debug/metadir/+DESC3
-rw-r--r--tools/templates/core_pkg/kernel-debug/metadir/+MANIFEST15
-rw-r--r--tools/templates/core_pkg/kernel/metadir/+MANIFEST2
-rw-r--r--tools/templates/core_pkg/rc/metadir/+DESC3
-rw-r--r--tools/templates/core_pkg/rc/metadir/+MANIFEST15
-rw-r--r--tools/templates/core_pkg/rc/pkg-plist1
-rw-r--r--tools/templates/core_pkg/repo-devel/metadir/+DESC3
-rw-r--r--tools/templates/core_pkg/repo-devel/metadir/+MANIFEST15
-rw-r--r--tools/templates/core_pkg/repo-devel/pkg-plist1
-rw-r--r--tools/templates/core_pkg/repo/metadir/+DESC3
-rw-r--r--tools/templates/core_pkg/repo/metadir/+MANIFEST15
-rw-r--r--tools/templates/core_pkg/repo/pkg-plist1
-rw-r--r--tools/templates/pkg-deinstall.in2
-rw-r--r--tools/templates/pkg-install.in2
663 files changed, 33552 insertions, 31770 deletions
diff --git a/PROGRESS.md b/PROGRESS.md
deleted file mode 100644
index 592d477..0000000
--- a/PROGRESS.md
+++ /dev/null
@@ -1,284 +0,0 @@
-## Bootstrap Conversion Progress
-
-Use this table to list the php pages that have been converted to bootstrap, those that have yet to be converted, and those that are currently being worked on.
-
-The script used to generate the table can be found at the bottom of this page
-
-Use the ✅ emoji (`✅`) to show that the bootstrap conversion is complete
-Use the 🔄 emoji (`🔄`) to show that the bootstrap conversion is in progress
-
-The table can be generated by running this bash script on the directory in which the php files are located. e.g.:
-
-````bash
- mktable.sh pfsense-bootstrap/usr/local/www
-````
-
-You can then copy/paste the script output into this file. (Is that recursive?)
-
-````bash
-#!/bin/bash
-# mktable.sh
-
-# Generate a table in GitHub markdown showing each php file and whether it has been converted to bootstrap yet
-# $1 = path to pfSense usr/local/www directory
-# Completed files are assumed to have foot.inc included
-
-COMPLETED=' ✅'
-INPROGRESS=' 🔄'
-pushd $1
-
-printf "|%-45s|%-25s|%-24s|%-60s|\n" "Page/file" "Status" "User" "Comments"
-printf "|---------------------------------------------|:-------------------------:|------------------------|------------------------------------------------------------|\n"
-
-FILES=$(ls -1 *.php)
-
-for F in $FILES ; do
- printf "|%-45s|" $F
-
- if(grep foot.inc $F >/dev/null 2>&1 ) ; then
- printf "%-25s" "$COMPLETED"
- else
- printf "%25s" " "
- fi
-
- printf "|%24s|%60s|\n" " " " "
-
-done
-
-popd
-
-````
-### PHP file status
-|Page/file |Status |User |Comments |
-|---------------------------------------------|:-------------------------:|------------------------|------------------------------------------------------------|
-|bandwidth_by_ip.php | | | |
-|carp_status.php | ✅ | | |
-|crash_reporter.php | ✅ | | |
-|diag_arp.php | ✅ | | |
-|diag_authentication.php | ✅ | | |
-|diag_backup.php | ✅ | | |
-|diag_confbak.php | ✅ | | |
-|diag_defaults.php | ✅ | | |
-|diag_dns.php | ✅ | | |
-|diag_dump_states.php | ✅ | | |
-|diag_dump_states_sources.php | ✅ | | |
-|diag_gmirror.php | | | |
-|diag_ipsec_leases.php | ✅ | | |
-|diag_ipsec.php | | | |
-|diag_ipsec_sad.php | ✅ | | |
-|diag_ipsec_spd.php | ✅ | | |
-|diag_ipsec_xml.php | | | |
-|diag_limiter_info.php | ✅ | | |
-|diag_logs_filter_dynamic.php | ✅ | | |
-|diag_logs_filter.php | ✅ | | |
-|diag_logs_filter_summary.php | ✅ | | |
-|diag_logs.php | ✅ | | |
-|diag_logs_settings.php | ✅ | | |
-|diag_logs_vpn.php | ✅ | | |
-|diag_nanobsd.php | ✅ | | |
-|diag_ndp.php | ✅ | | |
-|diag_packet_capture.php | ✅ | | |
-|diag_patterns.php | ✅ | | |
-|diag_pf_info.php | ✅ | | |
-|diag_ping.php | ✅ | | |
-|diag_pkglogs.php | ✅ | | |
-|diag_resetstate.php | ✅ | | |
-|diag_routes.php | ✅ | | |
-|diag_smart.php | ✅ | | |
-|diag_sockets.php | ✅ | | |
-|diag_states_summary.php | ✅ | | |
-|diag_system_activity.php | ✅ | | |
-|diag_system_pftop.php | ✅ | | |
-|diag_tables.php | ✅ | | |
-|diag_testport.php | ✅ | | |
-|diag_traceroute.php | ✅ | | |
-|easyrule.php | | | |
-|edit.php | ✅ | | |
-|exec.php | ✅ | | |
-|firewall_aliases_edit.php | ✅ | | |
-|firewall_aliases_import.php | ✅ | | |
-|firewall_aliases.php | ✅ | | |
-|firewall_nat_1to1_edit.php | | | |
-|firewall_nat_1to1.php | | | |
-|firewall_nat_edit.php | | | |
-|firewall_nat_npt_edit.php | ✅ | | |
-|firewall_nat_npt.php | ✅ | | |
-|firewall_nat_out_edit.php | | | |
-|firewall_nat_out.php | | | |
-|firewall_nat.php | | | |
-|firewall_rules_edit.php | ✅ | | |
-|firewall_rules.php | ✅ | | |
-|firewall_schedule_edit.php | | | |
-|firewall_schedule.php | ✅ | | |
-|firewall_shaper_layer7.php | | | |
-|firewall_shaper.php | | | |
-|firewall_shaper_queues.php | | | |
-|firewall_shaper_vinterface.php | | | |
-|firewall_shaper_wizards.php | ✅ | | |
-|firewall_virtual_ip_edit.php | ✅ | | |
-|firewall_virtual_ip.php | ✅ | | |
-|getserviceproviders.php | | | |
-|getstats.php | | | |
-|graph_cpu.php | | | |
-|graph.php | | | |
-|halt.php | ✅ | | |
-|help.php | | | |
-|ifstats.php | | | |
-|index.php | ✅ | | |
-|interfaces_assign.php | ✅ | | |
-|interfaces_bridge_edit.php | ✅ | | |
-|interfaces_bridge.php | ✅ | | |
-|interfaces_gif_edit.php | ✅ | | |
-|interfaces_gif.php | ✅ | | |
-|interfaces_gre_edit.php | ✅ | | |
-|interfaces_gre.php | ✅ | | |
-|interfaces_groups_edit.php | | | |
-|interfaces_groups.php | | | |
-|interfaces_lagg_edit.php | ✅ | | |
-|interfaces_lagg.php | ✅ | | |
-|interfaces.php | | | |
-|interfaces_ppps_edit.php | ✅ | | |
-|interfaces_ppps.php | ✅ | | |
-|interfaces_qinq_edit.php | | | |
-|interfaces_qinq.php | ✅ | | |
-|interfaces_vlan_edit.php | ✅ | | |
-|interfaces_vlan.php | ✅ | | |
-|interfaces_wireless_edit.php | ✅ | | |
-|interfaces_wireless.php | ✅ | | |
-|license.php | ✅ | | |
-|load_balancer_monitor_edit.php | | | |
-|load_balancer_monitor.php | | | |
-|load_balancer_pool_edit.php | | | |
-|load_balancer_pool.php | | | |
-|load_balancer_relay_action_edit.php | | | |
-|load_balancer_relay_action.php | | | |
-|load_balancer_relay_protocol_edit.php | | | |
-|load_balancer_relay_protocol.php | | | |
-|load_balancer_setting.php | ✅ | | |
-|load_balancer_virtual_server_edit.php | | | |
-|load_balancer_virtual_server.php | | | |
-|pkg_edit.php | | | |
-|pkg_mgr_installed.php | ✅ | | |
-|pkg_mgr_install.php | ✅ | | |
-|pkg_mgr.php | ✅ | | |
-|pkg_mgr_settings.php | ✅ | | |
-|pkg.php | | | |
-|reboot.php | ✅ | | |
-|restart_httpd.php | | | |
-|services_captiveportal_filemanager.php | ✅ | | |
-|services_captiveportal_hostname_edit.php | ✅ | | |
-|services_captiveportal_hostname.php | ✅ | | |
-|services_captiveportal_ip_edit.php | ✅ | | |
-|services_captiveportal_ip.php | ✅ | | |
-|services_captiveportal_mac_edit.php | ✅ | | |
-|services_captiveportal_mac.php | ✅ | | |
-|services_captiveportal.php | | | |
-|services_captiveportal_vouchers_edit.php | ✅ | | |
-|services_captiveportal_vouchers.php | ✅ | | |
-|services_captiveportal_zones_edit.php | ✅ | | |
-|services_captiveportal_zones.php | | | |
-|services_dhcp_edit.php | ✅ | | |
-|services_dhcp.php | | | |
-|services_dhcp_relay.php | ✅ | | |
-|services_dhcpv6_edit.php | ✅ | | |
-|services_dhcpv6.php | ✅ | | |
-|services_dhcpv6_relay.php | ✅ | | |
-|services_dnsmasq_domainoverride_edit.php | ✅ | | |
-|services_dnsmasq_edit.php | ✅ | | |
-|services_dnsmasq.php | ✅ | | |
-|services_dyndns_edit.php | ✅ | | |
-|services_dyndns.php | ✅ | | |
-|services_igmpproxy_edit.php | ✅ | | |
-|services_igmpproxy.php | ✅ | | |
-|services_ntpd_gps.php | ✅ | | |
-|services_ntpd.php | ✅ | | |
-|services_ntpd_pps.php | ✅ | | |
-|services_rfc2136_edit.php | ✅ | | |
-|services_rfc2136.php | ✅ | | |
-|services_router_advertisements.php | | | |
-|services_snmp.php | ✅ | | |
-|services_unbound_acls.php | ✅ | | |
-|services_unbound_advanced.php | ✅ | | |
-|services_unbound_domainoverride_edit.php | ✅ | | |
-|services_unbound_host_edit.php | ✅ | | |
-|services_unbound.php | ✅ | | |
-|services_wol_edit.php | ✅ | | |
-|services_wol.php | ✅ | | |
-|stats.php | | | |
-|status_captiveportal_expire.php | ✅ | | |
-|status_captiveportal.php | ✅ | | |
-|status_captiveportal_test.php | ✅ | | |
-|status_captiveportal_voucher_rolls.php | ✅ | | |
-|status_captiveportal_vouchers.php | ✅ | | |
-|status_dhcp_leases.php | ✅ | | |
-|status_dhcpv6_leases.php | ✅ | | |
-|status_filter_reload.php | ✅ | | |
-|status_gateway_groups.php | ✅ | | |
-|status_gateways.php | ✅ | | |
-|status_graph_cpu.php | ✅ | | |
-|status_graph.php | ✅ | | |
-|status_interfaces.php | ✅ | | |
-|status_lb_pool.php | ✅ | | |
-|status_lb_vs.php | ✅ | | |
-|status_ntpd.php | ✅ | | |
-|status_openvpn.php | | | |
-|status.php | ✅ | | |
-|status_queues.php | | | |
-|status_rrd_graph_img.php | | | |
-|status_rrd_graph.php | ✅ | | |
-|status_rrd_graph_settings.php | ✅ | | |
-|status_services.php | ✅ | | |
-|status_upnp.php | ✅ | | |
-|status_wireless.php | ✅ | | |
-|system_advanced_admin.php | ✅ | | |
-|system_advanced_firewall.php | ✅ | | |
-|system_advanced_misc.php | ✅ | | |
-|system_advanced_network.php | ✅ | | |
-|system_advanced_notifications.php | ✅ | | |
-|system_advanced_sysctl.php | | | |
-|system_authservers.php | ✅ | | |
-|system_camanager.php | ✅ | | |
-|system_certmanager.php | ✅ | | |
-|system_crlmanager.php | | | |
-|system_firmware_auto.php | ✅ | | |
-|system_firmware_check.php | ✅ | | |
-|system_firmware.php | ✅ | | |
-|system_firmware_restorefullbackup.php | ✅ | | |
-|system_firmware_settings.php | ✅ | | |
-|system_gateway_groups_edit.php | ✅ | | |
-|system_gateway_groups.php | ✅ | | |
-|system_gateways_edit.php | ✅ | | |
-|system_gateways.php | ✅ | | |
-|system_groupmanager_addprivs.php | ✅ | | |
-|system_groupmanager.php | ✅ | | |
-|system_hasync.php | ✅ | | |
-|system.php | ✅ | | |
-|system_routes_edit.php | ✅ | | |
-|system_routes.php | ✅ | | |
-|system_usermanager_addprivs.php | ✅ | | |
-|system_usermanager_passwordmg.php | ✅ | | |
-|system_usermanager.php | ✅ | | |
-|system_usermanager_settings_ldapacpicker.php | | | |
-|system_usermanager_settings.php | | | |
-|system_usermanager_settings_test.php | | | |
-|uploadconfig.php | | | |
-|vpn_ipsec_keys_edit.php | ✅ | | |
-|vpn_ipsec_keys.php | ✅ | | |
-|vpn_ipsec_mobile.php | ✅ | | |
-|vpn_ipsec_phase1.php | ✅ | | |
-|vpn_ipsec_phase2.php | ✅ | | |
-|vpn_ipsec.php | ✅ | | |
-|vpn_ipsec_settings.php | ✅ | | |
-|vpn_l2tp.php | ✅ | | |
-|vpn_l2tp_users_edit.php | ✅ | | |
-|vpn_l2tp_users.php | ✅ | | |
-|vpn_openvpn_client.php | ✅ | | |
-|vpn_openvpn_csc.php | ✅ | | |
-|vpn_openvpn_server.php | ✅ | | |
-|vpn_pppoe_edit.php | ✅ | | |
-|vpn_pppoe.php | ✅ | | |
-|vpn_pptp.php | | | |
-|vpn_pptp_users_edit.php | | | |
-|vpn_pptp_users.php | | | |
-|wizard.php | | | |
-|xmlrpc.php | | | |
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b62292e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,25 @@
+# pfSense
+
+## Overview
+
+The pfSense project is a free network firewall distribution, based on the FreeBSD operating system with a custom kernel and including third party free software packages for additional functionality. pfSense software, with the help of the package system, is able to provide the same functionality or more of common commercial firewalls, without any of the artificial limitations. It has successfully replaced every big name commercial firewall you can imagine in numerous installations around the world, including Check Point, Cisco PIX, Cisco ASA, Juniper, Sonicwall, Netgear, Watchguard, Astaro, and more.
+
+pfSense software includes a web interface for the configuration of all included components. There is no need for any UNIX knowledge, no need to use the command line for anything, and no need to ever manually edit any rule sets. Users familiar with commercial firewalls catch on to the web interface quickly, though there can be a learning curve for users not familiar with commercial-grade firewalls.
+
+pfSense started in 2004 as a fork of the [m0n0wall](http://m0n0.ch/wall/index.php "m0n0wall project homepage") Project (which ended 2015/02/15), though has diverged significantly since.
+
+pfSense is Copyright 2004-2015 [Electric Sheep Fencing LLC](https://pfsense.org/license "License Information") and published under an open source license.
+Read more at [https://pfsense.org/](https://pfsense.org/ "The pfSense homepage") and support the team by buying a Gold Membership Subscription, bundled hardware appliances or commercial support.
+
+## Contribute
+
+Contact [coreteam@pfsense.org](mailto:coreteam@pfsense.org "Mail to coreteam@pfsense.org") to get involved.
+
+* Review our Developer Style Guide: https://doc.pfsense.org/index.php/Developer_Style_Guide
+* Familiarize yourself with our git repositories (and github in general): https://github.com/pfsense
+* Review the list of open bug reports and other issues: https://redmine.pfsense.org/projects/pfsense/issues
+* Review and Sign the license agreement (LA) and either the Individual or Corporate CLA: https://doc.pfsense.org/index.php/Contributor_License_Agreement_for_Developers
+
+Once you have the LA and CLA complete, you can submit changes as pull requests on github: https://help.github.com/articles/using-pull-requests/
+
+Our developers will review the submissions, offer feedback, and merge the changes if they are acceptable.
diff --git a/build.sh b/build.sh
index cb59ae6..00d89f4 100755
--- a/build.sh
+++ b/build.sh
@@ -66,6 +66,7 @@ usage() {
echo " --build-kernel argument - build specified kernel. Example --build-kernel KERNEL_NAME"
echo " --install-extra-kernels argument - Put extra kernel(s) under /kernel image directory. Example --install-extra-kernels KERNEL_NAME_WRAP"
echo " --snapshots - Build snapshots and upload them to RSYNCIP"
+ echo " --poudriere-snapshots - Update poudriere packages and send them to PKG_RSYNC_HOSTNAME"
echo " --enable-memorydisks - This will put stage_dir and iso_dir as MFS filesystems"
echo " --disable-memorydisks - Will just teardown these filesystems created by --enable-memorydisks"
echo " --setup-poudriere - Install poudriere and create necessary jails and ports tree"
@@ -87,6 +88,7 @@ unset pfPORTTOBUILD
unset IMAGETYPE
unset DO_NOT_UPLOAD
unset SNAPSHOTS
+unset POUDRIERE_SNAPSHOTS
unset ARCH_LIST
BUILDACTION="images"
@@ -137,6 +139,9 @@ while test "$1" != ""; do
export SNAPSHOTS=1
IMAGETYPE="all"
;;
+ --poudriere-snapshots)
+ export POUDRIERE_SNAPSHOTS=1
+ ;;
--build-kernel)
BUILDACTION="buildkernel"
shift
@@ -223,7 +228,9 @@ fi
# Update snapshot status and exit
if [ "${BUILDACTION}" = "snapshot_status_message" ]; then
- export SNAPSHOTS=1
+ if [ -z "${POUDRIERE_SNAPSHOTS}" ]; then
+ export SNAPSHOTS=1
+ fi
snapshots_update_status "${snapshot_status_message}"
exit 0
fi
diff --git a/src/conf.default/config.xml b/src/conf.default/config.xml
index b1b59fa..acec3ac 100644
--- a/src/conf.default/config.xml
+++ b/src/conf.default/config.xml
@@ -1,8 +1,7 @@
<?xml version="1.0"?>
<pfsense>
- <version>12.2</version>
+ <version>13.4</version>
<lastchange/>
- <theme>pfsense_ng</theme>
<system>
<optimization>normal</optimization>
<hostname>pfSense</hostname>
@@ -35,7 +34,6 @@
</user>
<nextuid>2000</nextuid>
<nextgid>2000</nextgid>
- <time-update-interval>300</time-update-interval>
<timeservers>0.pfsense.pool.ntp.org</timeservers>
<webgui>
<protocol>https</protocol>
@@ -253,7 +251,7 @@
</monitor_type>
</load_balancer>
<widgets>
- <sequence>system_information-container:col1:show,captive_portal_status-container:col1:close,carp_status-container:col1:close,cpu_graphs-container:col1:close,gateways-container:col1:close,gmirror_status-container:col1:close,installed_packages-container:col1:close,interface_statistics-container:col1:close,interfaces-container:col2:show,ipsec-container:col2:close,load_balancer_status-container:col2:close,log-container:col2:close,picture-container:col2:close,rss-container:col2:close,services_status-container:col2:close,traffic_graphs-container:col2:close</sequence>
+ <sequence>system_information:col1:show,interfaces:col2:show</sequence>
</widgets>
<openvpn/>
<dnshaper/>
diff --git a/src/etc/fbtab b/src/etc/fbtab
deleted file mode 100644
index 06d2d61..0000000
--- a/src/etc/fbtab
+++ /dev/null
@@ -1,4 +0,0 @@
-# $FreeBSD: src/etc/fbtab,v 1.3 1999/09/13 17:09:07 peter Exp $
-#
-#/dev/ttyv0 0600 /dev/console
-#/dev/ttyv0 0600 /dev/pcaudio:/dev/pcaudioctl
diff --git a/src/etc/gettytab b/src/etc/gettytab
deleted file mode 100644
index 5af5aae..0000000
--- a/src/etc/gettytab
+++ /dev/null
@@ -1,235 +0,0 @@
-# $FreeBSD: stable/10/etc/gettytab 241708 2012-10-18 22:20:02Z peterj $
-# from: @(#)gettytab 5.14 (Berkeley) 3/27/91
-#
-# Most of the table entries here are just copies of the old getty table,
-# it is by no means certain, or even likely, that any of them are optimal
-# for any purpose whatever. Nor is it likely that more than a couple are
-# even correct.
-#
-# The default gettytab entry, used to set defaults for all other
-# entries, and in cases where getty is called with no table name.
-#
-# cb, ce and ck are desirable on most crt's. The non-crt entries need to
-# be changed to turn them off (:cb@:ce@:ck@:).
-#
-# lc should always be on; it's a remainder of some stone age when there
-# have been terminals around not being able of handling lower-case
-# characters. Those terminals aren't supported any longer, but getty is
-# `smart' about them by default.
-#
-# Parity defaults to even, but the Pc entry and all the `std' entries
-# specify no parity. The different parities are:
-# (none): same as ep for getty. login will use terminal as is.
-# ep: getty will use raw mode (cs8 -parenb) (unless rw is set) and
-# fake parity. login will use even parity (cs7 parenb -parodd).
-# op: same as ep except odd parity (cs7 parenb parodd) for login.
-# getty will fake odd parity as well.
-# ap: same as ep except -inpck instead of inpck for login.
-# ap overrides op and ep.
-# np: 1. don't fake parity in getty. The fake parity garbles
-# characters on non-terminals (like pccons) that don't
-# support parity. It would probably better for getty not to
-# try to fake parity. It could just use cbreak mode so as
-# not to force cs8 and let the hardware handle the parity.
-# login has to be rely on the hardware anyway.
-# 2. set cs8 -parenb -istrip -inpck.
-# ep:op: same as ap.
-#
-default:\
- :cb:ce:ck:lc:fd#1000:im=\r\n%s/%m (%h) (%t)\r\n\r\n:sp#1200:\
- :if=/etc/issue:
-
-#
-# Fixed speed entries
-#
-# The "std.NNN" names are known to the special case
-# portselector code in getty, however they can
-# be assigned to any table desired.
-# The "NNN-baud" names are known to the special case
-# autobaud code in getty, and likewise can
-# be assigned to any table desired (hopefully the same speed).
-#
-a|std.110|110-baud:\
- :np:nd#1:cd#1:uc:sp#110:
-b|std.134|134.5-baud:\
- :np:nd#1:cd#2:ff#1:td#1:sp#134:ht:nl:
-1|std.150|150-baud:\
- :np:nd#1:cd#2:td#1:fd#1:sp#150:ht:nl:lm=\E\72\6\6\17login\72 :
-c|std.300|300-baud:\
- :np:nd#1:cd#1:sp#300:
-d|std.600|600-baud:\
- :np:nd#1:cd#1:sp#600:
-f|std.1200|1200-baud:\
- :np:fd#1:sp#1200:
-6|std.2400|2400-baud:\
- :np:sp#2400:
-7|std.4800|4800-baud:\
- :np:sp#4800:
-2|std.9600|9600-baud:\
- :np:sp#9600:
-g|std.19200|19200-baud:\
- :np:sp#19200:
-std.38400|38400-baud:\
- :np:sp#38400:
-std.57600|57600-baud:\
- :np:sp#57600:
-std.115200|115200-baud:\
- :np:sp#115200:
-std.230400|230400-baud:\
- :np:sp#230400:
-
-#
-# Entry specifying explicit device settings. See termios(4) and
-# /usr/include/termios.h, too. The entry forces the tty into
-# CLOCAL mode (so no DCD is required), and uses Xon/Xoff flow control.
-#
-# cflags: CLOCAL | HUPCL | CREAD | CS8
-# oflags: OPOST | ONLCR | OXTABS
-# iflags: IXOFF | IXON | ICRNL | IGNPAR
-# lflags: IEXTEN | ICANON | ISIG | ECHOCTL | ECHO | ECHOK | ECHOE | ECHOKE
-#
-# The `0' flags don't have input enabled. The `1' flags don't echo.
-# (Echoing is done inside getty itself.)
-#
-local.9600|CLOCAL tty @ 9600 Bd:\
- :c0#0x0000c300:c1#0x0000cb00:c2#0x0000cb00:\
- :o0#0x00000007:o1#0x00000002:o2#0x00000007:\
- :i0#0x00000704:i1#0x00000000:i2#0x00000704:\
- :l0#0x000005cf:l1#0x00000000:l2#0x000005cf:\
- :sp#9600:np:
-
-#
-# Dial in rotary tables, speed selection via 'break'
-#
-0|d300|Dial-300:\
- :nx=d1200:cd#2:sp#300:
-d1200|Dial-1200:\
- :nx=d150:fd#1:sp#1200:
-d150|Dial-150:\
- :nx=d110:lm@:tc=150-baud:
-d110|Dial-110:\
- :nx=d300:tc=300-baud:
-
-#
-# Fast dialup terminals, 2400/1200/300 rotary (can start either way)
-#
-D2400|d2400|Fast-Dial-2400:\
- :nx=D1200:tc=2400-baud:
-3|D1200|Fast-Dial-1200:\
- :nx=D300:tc=1200-baud:
-5|D300|Fast-Dial-300:\
- :nx=D2400:tc=300-baud:
-
-#
-#telebit (19200)
-#
-t19200:\
- :nx=t2400:tc=19200-baud:
-t2400:\
- :nx=t1200:tc=2400-baud:
-t1200:\
- :nx=t19200:tc=1200-baud:
-
-#
-#telebit (9600)
-#
-t9600:\
- :nx=t2400a:tc=9600-baud:
-t2400a:\
- :nx=t1200a:tc=2400-baud:
-t1200a:\
- :nx=t9600:tc=1200-baud:
-
-#
-# Odd special case terminals
-#
--|tty33|asr33|Pity the poor user of this beast:\
- :tc=110-baud:
-
-4|Console|Console Decwriter II:\
- :nd@:cd@:rw:tc=300-baud:
-
-e|Console-1200|Console Decwriter III:\
- :fd@:nd@:cd@:rw:tc=1200-baud:
-
-i|Interdata console:\
- :uc:sp#0:
-
-l|lsi chess terminal:\
- :sp#300:
-
-X|Xwindow|X window system:\
- :fd@:nd@:cd@:rw:sp#9600:
-
-P|Pc|Pc console:\
- :ht:np:sp#9600:
-
-al.Pc:\
- :ht:np:sp#9600:al=root:
-
-# Weirdo special case for fast crt's with hardcopy devices
-#
-8|T9600|CRT with hardcopy:\
- :nx=T300:tc=9600-baud:
-9|T300|CRT with hardcopy (300):\
- :nx=T9600:tc=300-baud:
-
-#
-# Plugboard, and misc other terminals
-#
-plug-9600|Plugboard-9600:\
- :pf#1:tc=9600-baud:
-p|P9600|Plugboard-9600-rotary:\
- :pf#1:nx=P300:tc=9600-baud:
-q|P300|Plugboard-300:\
- :pf#1:nx=P1200:tc=300-baud:
-r|P1200|Plugboard-1200:\
- :pf#1:nx=P9600:tc=1200-baud:
-
-#
-# XXXX Port selector
-#
-s|DSW|Port Selector:\
- :ps:sp#2400:
-
-#
-# Auto-baud speed detect entry for Micom 600.
-# Special code in getty will switch this out
-# to one of the NNN-baud entries.
-#
-A|Auto-baud:\
- :ab:sp#2400:f0#040:
-
-#
-# autologin - automatically log in as root
-#
-
-autologin|al.9600:\
- :al=root:tc=std.9600:
-al.19200:\
- :al=root:tc=std.19200:
-al.38400:\
- :al=root:tc=std.38400:
-al.57600:\
- :al=root:tc=std.57600:
-al.115200:\
- :al=root:tc=std.115200:
-al.230400:\
- :al=root:tc=std.230400:
-
-#
-# Entries for 3-wire serial terminals. These don't supply carrier, so
-# clocal needs to be set, and crtscts needs to be unset.
-#
-3wire.9600|9600-3wire:\
- :np:nc:sp#9600:
-3wire.19200|19200-3wire:\
- :np:nc:sp#19200:
-3wire.38400|38400-3wire:\
- :np:nc:sp#38400:
-3wire.57600|57600-3wire:\
- :np:nc:sp#57600:
-3wire.115200|115200-3wire:\
- :np:nc:sp#115200:
-3wire.230400|230400-3wire:\
- :np:nc:sp#230400:
diff --git a/src/etc/inc/IPv6.inc b/src/etc/inc/IPv6.inc
index faacb8d..bfc8124 100644
--- a/src/etc/inc/IPv6.inc
+++ b/src/etc/inc/IPv6.inc
@@ -1,9 +1,5 @@
<?php
-/*
- pfSense_MODULE: utils
-*/
-
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
diff --git a/src/etc/inc/auth.inc b/src/etc/inc/auth.inc
index f30a996..fffe84f 100644
--- a/src/etc/inc/auth.inc
+++ b/src/etc/inc/auth.inc
@@ -1,46 +1,60 @@
<?php
-/* $Id$ */
/*
- Copyright (C) 2010 Ermal Luçi
- All rights reserved.
-
- Copyright (C) 2007, 2008 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
- All rights reserved.
-
- Copyright (C) 2006 Paul Taylor <paultaylor@winn-dixie.com>.
- All rights reserved.
-
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /usr/sbin/pw /bin/cp
- pfSense_MODULE: auth
+ auth.inc
*/
-
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
+ * Copyright (c) 2006 Paul Taylor <paultaylor@winn-dixie.com>
+ * Copyright (c) 2003-2006 Manuel Kasper <mk@neon1.net>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
/*
* NOTE : Portions of the mschapv2 support was based on the BSD licensed CHAP.php
* file courtesy of Michael Retterklieber.
@@ -151,7 +165,7 @@ if (function_exists("display_error_form") && !isset($config['system']['webgui'][
$referrer_host = str_replace(array("[", "]"), "", $referrer_host);
if ($referrer_host) {
if (strcasecmp($referrer_host, $config['system']['hostname'] . "." . $config['system']['domain']) == 0 ||
- strcasecmp($referrer_host, $config['system']['hostname']) == 0) {
+ strcasecmp($referrer_host, $config['system']['hostname']) == 0) {
$found_host = true;
}
@@ -1112,11 +1126,11 @@ function ldap_get_groups($username, $authcfg) {
$gresults = isset($authcfg['ldap_rfc2307']) ? $info : $info[0][$ldapgroupattribute];
- if(is_array($gresults)) {
+ if (is_array($gresults)) {
/* Iterate through the groups and throw them into an array */
foreach ($gresults as $grp) {
- if (((isset($authcfg['ldap_rfc2307'])) && (stristr($grp["dn"], "CN=") !== false))
- || ((!isset($authcfg['ldap_rfc2307'])) && (stristr($grp, "CN=") !== false))) {
+ if (((isset($authcfg['ldap_rfc2307'])) && (stristr($grp["dn"], "CN=") !== false)) ||
+ ((!isset($authcfg['ldap_rfc2307'])) && (stristr($grp, "CN=") !== false))) {
$grpsplit = isset($authcfg['ldap_rfc2307']) ? explode(",", $grp["dn"]) : explode(",", $grp);
$memberof[] = preg_replace("/CN=/i", "", $grpsplit[0]);
}
diff --git a/src/etc/inc/authgui.inc b/src/etc/inc/authgui.inc
index d3b701d..c3536c8 100644
--- a/src/etc/inc/authgui.inc
+++ b/src/etc/inc/authgui.inc
@@ -1,42 +1,57 @@
<?php
-/* $Id$ */
-/*
- Copyright (C) 2007, 2008 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Copyright (C) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
- All rights reserved.
-
- Copyright (C) 2006 Paul Taylor <paultaylor@winn-dixie.com>.
- All rights reserved.
-
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_MODULE: authgui
-*/
-
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2006 Bill Marquette <bill.marquette@gmail.com>
+ * Copyright (c) 2006 Paul Taylor <paultaylor@winn-dixie.com>.
+ * Copyright (c) 2003-2006 Manuel Kasper <mk@neon1.net>.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
include_once("auth.inc");
include_once("priv.inc");
if (!function_exists('platform_booting')) {
@@ -103,18 +118,26 @@ session_commit();
*/
function display_error_form($http_code, $desc) {
global $config, $g;
- $g['theme'] = get_current_theme();
+
if (isAjax()) {
printf(gettext('Error: %1$s Description: %2$s'), $http_code, $desc);
return;
}
+ $cssfile = "/bootstrap/css/pfSense.css";
+
+ if (isset($config['system']['webgui']['webguicss'])) {
+ if (file_exists("bootstrap/css/" . $config['system']['webgui']['webguicss'])) {
+ $cssfile = "/bootstrap/css/" . $config['system']['webgui']['webguicss'];
+ }
+}
+
?>
-<<<<<<< HEAD
<!DOCTYPE html>
<html lang="en">
<head>
- <link rel="stylesheet" href="/bootstrap/css/pfSense.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="<?=$cssfile?>" />
<title><?=gettext("Error: not allowed"); ?></title>
</head>
<body id="error" class="no-menu">
@@ -136,7 +159,6 @@ function display_error_form($http_code, $desc) {
function display_login_form() {
require_once("globals.inc");
global $config, $g;
- $g['theme'] = get_current_theme();
unset($input_errors);
@@ -206,13 +228,26 @@ if ($local_ip == false) {
}
}
+$cssfile = "/bootstrap/css/pfSense.css";
+
+if (isset($config['system']['webgui']['webguicss'])) {
+ if (file_exists("bootstrap/css/" . $config['system']['webgui']['webguicss'])) {
+ $cssfile = "/bootstrap/css/" . $config['system']['webgui']['webguicss'];
+ }
+}
+
?>
<!DOCTYPE html>
<html lang="en">
<head>
- <link rel="stylesheet" href="/bootstrap/css/pfSense.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="<?=$cssfile?>" />
<title><?=gettext("Login"); ?></title>
- <script>var events = events || [];</script>
+ <script type="text/javascript">
+ //<![CDATA{
+ var events = events || [];
+ //]]>
+ </script>
</head>
<body id="login" class="no-menu">
<div id="jumbotron">
@@ -264,7 +299,8 @@ if ($local_ip == false) {
</div>
</div>
- <script>
+ <script type="text/javascript">
+ //!<[CDATA[
events.push(function() {
document.cookie=
"cookie_test=1" +
@@ -278,6 +314,7 @@ if ($local_ip == false) {
// Delete it
document.cookie = "cookie_test=1; expires=Thu, 01-Jan-1970 00:00:01 GMT";
});
+ //]]>
</script>
<?php
require('foot.inc');
diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc
index f6bbb64..0730962 100644
--- a/src/etc/inc/captiveportal.inc
+++ b/src/etc/inc/captiveportal.inc
@@ -35,11 +35,6 @@
via returned RADIUS attributes. This page has been modified to delete any
added rules which may have been created by other per-user code (index.php, etc).
These changes are (c) 2004 Keycom PLC.
-
- pfSense_BUILDER_BINARIES: /sbin/ipfw /sbin/route
- pfSense_BUILDER_BINARIES: /usr/local/sbin/lighttpd /usr/local/bin/minicron /sbin/pfctl
- pfSense_BUILDER_BINARIES: /bin/hostname /bin/cp
- pfSense_MODULE: captiveportal
*/
/* include all configuration functions */
@@ -545,19 +540,14 @@ EOD;
$rulenum++;
$cprules .= "add {$rulenum} pass ip from table(100) to any out\n";
$rulenum++;
- $ips = "";
foreach ($cpips as $cpip) {
$cprules .= "table 100 add {$cpip}\n";
}
- $cprules .= "table 100 add 255.255.255.255\n";
- $cprules .= "add {$rulenum} pass ip from any to {$ips} in\n";
- $rulenum++;
- $cprules .= "add {$rulenum} pass ip from {$ips} to any out\n";
- $rulenum++;
- $cprules .= "add {$rulenum} pass icmp from {$ips} to any out icmptype 0\n";
+ $cprules .= "add {$rulenum} pass ip from any to 255.255.255.255 in\n";
$rulenum++;
- $cprules .= "add {$rulenum} pass icmp from any to {$ips} in icmptype 8 \n";
+ $cprules .= "add {$rulenum} pass ip from 255.255.255.255 to any out\n";
$rulenum++;
+
/* Allowed ips */
$cprules .= "add {$rulenum} pipe tablearg ip from table(3) to any in\n";
$rulenum++;
@@ -936,6 +926,7 @@ function captiveportal_disconnect($dbent, $radiusservers, $term_cause = 1, $stop
function captiveportal_disconnect_client($sessionid, $term_cause = 1, $logoutReason = "LOGOUT") {
global $g, $config;
+ $sessionid = SQLite3::escapeString($sessionid);
$radiusservers = captiveportal_get_radius_servers();
/* read database */
@@ -1401,7 +1392,7 @@ function radius($username, $password, $clientip, $clientmac, $type, $radiusctx =
}
function captiveportal_opendb() {
- global $g, $cpzone;
+ global $g, $config, $cpzone, $cpzoneid;
$db_path = "{$g['vardb_path']}/captiveportal{$cpzone}.db";
$createquery = "CREATE TABLE IF NOT EXISTS captiveportal (" .
@@ -1415,11 +1406,13 @@ function captiveportal_opendb() {
try {
$DB = new SQLite3($db_path);
+ $DB->busyTimeout(60000);
} catch (Exception $e) {
captiveportal_syslog("Could not open {$db_path} as an sqlite database for {$cpzone}. Error message: " . $e->getMessage() . " -- Trying again.");
unlink_if_exists($db_path);
try {
$DB = new SQLite3($db_path);
+ $DB->busyTimeout(60000);
} catch (Exception $e) {
captiveportal_syslog("Still could not open {$db_path} as an sqlite database for {$cpzone}. Error message: " . $e->getMessage() . " -- Remove the database file manually and ensure there is enough free space.");
return;
@@ -1430,6 +1423,7 @@ function captiveportal_opendb() {
captiveportal_syslog("Could not open {$db_path} as an sqlite database for {$cpzone}. Error message: {$DB->lastErrorMsg()}. Trying again.");
unlink_if_exists($db_path);
$DB = new SQLite3($db_path);
+ $DB->busyTimeout(60000);
if (!$DB) {
captiveportal_syslog("Still could not open {$db_path} as an sqlite database for {$cpzone}. Error message: {$DB->lastErrorMsg()}. Remove the database file manually and ensure there is enough free space.");
return;
@@ -1444,8 +1438,22 @@ function captiveportal_opendb() {
unset($DB);
unlink_if_exists($db_path);
$DB = new SQLite3($db_path);
+ $DB->busyTimeout(60000);
if ($DB->exec($createquery)) {
captiveportal_syslog("Successfully reinitialized tables for {$cpzone} -- database has been reset.");
+ if (!is_numericint($cpzoneid)) {
+ if (is_array($config['captiveportal'])) {
+ foreach ($config['captiveportal'] as $cpkey => $cp) {
+ if ($cpzone == $cp['zone']) {
+ $cpzoneid = $cp['zoneid'];
+ }
+ }
+ }
+ }
+ if (is_numericint($cpzoneid)) {
+ mwexec("/sbin/ipfw -x $cpzoneid table all flush");
+ captiveportal_syslog("Flushed tables for {$cpzone} after database reset.");
+ }
} else {
captiveportal_syslog("Still unable to create tables for {$cpzone}. Error message: {$DB->lastErrorMsg()}. Remove the database file manually and try again.");
}
@@ -1527,7 +1535,11 @@ function captiveportal_write_elements() {
if (is_array($cpcfg['element'])) {
conf_mount_rw();
foreach ($cpcfg['element'] as $data) {
- if (!@file_put_contents("{$g['captiveportal_element_path']}/{$data['name']}", base64_decode($data['content']))) {
+ /* Do not attempt to decode or write out empty files. */
+ if (empty($data['content']) || empty(base64_decode($data['content']))) {
+ unlink_if_exists("{$g['captiveportal_element_path']}/{$data['name']}");
+ touch("{$g['captiveportal_element_path']}/{$data['name']}");
+ } elseif (!@file_put_contents("{$g['captiveportal_element_path']}/{$data['name']}", base64_decode($data['content']))) {
printf(gettext("Error: cannot open '%s' in captiveportal_write_elements()%s"), $data['name'], "\n");
return 1;
}
@@ -1977,6 +1989,8 @@ function portal_allow($clientip, $clientmac, $username, $password = null, $attri
if ($attributes['voucher']) {
$remaining_time = $attributes['session_timeout'];
+ // Set RADIUS-Attribute to Voucher to prevent ReAuth-Reqeuest for Vouchers Bug: #2155
+ $radiusctx="voucher";
}
$writecfg = false;
diff --git a/src/etc/inc/certs.inc b/src/etc/inc/certs.inc
index 9c99952..6d260e6 100644
--- a/src/etc/inc/certs.inc
+++ b/src/etc/inc/certs.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
certs.inc
Copyright (C) 2008 Shrew Soft Inc
@@ -26,8 +25,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_MODULE: certificate_manager
*/
define("OPEN_SSL_CONF_PATH", "/etc/ssl/openssl.cnf");
@@ -284,6 +281,7 @@ function ca_inter_create(& $ca, $keylen, $lifetime, $dn, $caref, $digest_alg = "
$ca['crt'] = base64_encode($str_crt);
$ca['prv'] = base64_encode($str_key);
$ca['serial'] = 0;
+ $ca['caref'] = $caref;
return true;
}
diff --git a/src/etc/inc/config.console.inc b/src/etc/inc/config.console.inc
index 33194bf..ce9dfd2 100644
--- a/src/etc/inc/config.console.inc
+++ b/src/etc/inc/config.console.inc
@@ -36,10 +36,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
-
- pfSense_BUILDER_BINARIES: /sbin/mount /sbin/umount /sbin/halt /sbin/fsck
- pfSense_MODULE: config
*/
function set_networking_interfaces_ports() {
@@ -101,15 +97,13 @@ BEGIN MANUAL CONFIGURATION OR WE WILL PROCEED WITH AUTO CONFIGURATION.
EOD;
}
- echo <<<EOD
-
-Do you want to set up VLANs first?
-
-If you are not going to use VLANs, or only for optional interfaces, you should
-say no here and use the webConfigurator to configure VLANs later, if required.
-
-Do you want to set up VLANs now [y|n]?
-EOD;
+ echo "\n" . gettext("Do you want to set up VLANs first?");
+ echo "\n" .
+ gettext(
+ "If you are not going to use VLANs, or only for optional interfaces, you should\n" .
+ "say no here and use the webConfigurator to configure VLANs later, if required.") .
+ "\n";
+ echo "\n" . gettext("Do you want to set up VLANs now [y|n]?") . " ";
if ($auto_assign) {
$key = timeout();
@@ -314,10 +308,7 @@ EOD;
echo "OPT" . ($i+1) . " -> " . $optif[$i] . "\n";
}
- echo <<<EOD
-
-Do you want to proceed [y|n]?
-EOD;
+ echo "\n" . gettext("Do you want to proceed [y|n]?") . " ";
$key = chop(fgets($fp));
}
@@ -330,13 +321,8 @@ EOD;
$config['interfaces']['lan']['enable'] = true;
} elseif (!platform_booting() && !$auto_assign) {
-echo <<<EODD
-
-You have chosen to remove the LAN interface.
-
-Would you like to remove the LAN IP address and
-unload the interface now? [y|n]?
-EODD;
+ echo "\n" . gettext("You have chosen to remove the LAN interface.") . "\n";
+ echo "\n" . gettext("Would you like to remove the LAN IP address and \nunload the interface now [y|n]?") . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
if (isset($config['interfaces']['lan']) && $config['interfaces']['lan']['if']) {
@@ -497,13 +483,8 @@ function vlan_setup() {
$iflist = get_interface_list();
if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
-
- echo <<<EOD
-
-WARNING: all existing VLANs will be cleared if you proceed!
-
-Do you want to proceed [y|n]?
-EOD;
+ echo "\n" . gettext("WARNING: all existing VLANs will be cleared if you proceed!") . "\n";
+ echo "\n" . gettext("Do you want to proceed [y|n]?") . " ";
if (strcasecmp(chop(fgets($fp)), "y") != 0) {
return;
@@ -563,4 +544,63 @@ EOD;
}
}
+function check_for_alternate_interfaces() {
+ global $config;
+
+ // If the WAN and/or LAN devices in the factory default config do not exist,
+ // then look for alternate devices.
+ // This lets many systems boot a factory default config without being
+ // forced to do interface assignment on the console.
+
+ $specplatform = system_identify_specific_platform();
+ $default_device = array();
+
+ // If we recognise the platform, then specify the devices directly.
+ switch ($specplatform['name']) {
+ case 'alix':
+ $default_device['wan'] = "vr1";
+ $default_device['lan'] = "vr0";
+ break;
+ case 'APU':
+ $default_device['wan'] = "re1";
+ $default_device['lan'] = "re2";
+ break;
+ case 'RCC-VE':
+ $default_device['wan'] = "igb0";
+ $default_device['lan'] = "igb1";
+ break;
+ default:
+ $default_device['wan'] = "";
+ $default_device['lan'] = "";
+ break;
+ }
+
+ // Other common device names can be put here and will be looked for
+ // if the system was not one of the known platforms.
+ $other_devices_arr['wan'] = array("vr1", "re1", "igb0", "em0");
+ $other_devices_arr['lan'] = array("vr0", "re2", "igb1", "em1");
+ $interface_assignment_changed = false;
+
+ foreach ($other_devices_arr as $ifname => $other_devices) {
+ if (!does_interface_exist($config['interfaces'][$ifname]['if'])) {
+ if (does_interface_exist($default_device[$ifname])) {
+ $config['interfaces'][$ifname]['if'] = $default_device[$ifname];
+ $interface_assignment_changed = true;
+ } else {
+ foreach ($other_devices as $other_device) {
+ if (does_interface_exist($other_device)) {
+ $config['interfaces'][$ifname]['if'] = $other_device;
+ $interface_assignment_changed = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ if ($interface_assignment_changed) {
+ write_config("Factory default boot detected WAN " . $config['interfaces']['wan']['if'] . " and LAN " . $config['interfaces']['lan']['if']);
+ }
+}
+
?>
diff --git a/src/etc/inc/config.gui.inc b/src/etc/inc/config.gui.inc
index 56b5555..0883ede 100644
--- a/src/etc/inc/config.gui.inc
+++ b/src/etc/inc/config.gui.inc
@@ -36,10 +36,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
-
- pfSense_BUILDER_BINARIES: /sbin/mount /sbin/umount /sbin/halt /sbin/fsck
- pfSense_MODULE: config
*/
require_once("globals.inc");
@@ -80,8 +76,12 @@ if (file_exists("/debugging")) {
$config = parse_config();
/* set timezone */
-$timezone = $config['system']['timezone'];
-if (!$timezone) {
+if (isset($config['system']['timezone']) &&
+ !empty($config['system']['timezone'])) {
+ $timezone = $config['system']['timezone'];
+} elseif (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
+ $timezone = $g['default_timezone'];
+} else {
$timezone = "Etc/UTC";
}
date_default_timezone_set("$timezone");
diff --git a/src/etc/inc/config.inc b/src/etc/inc/config.inc
index 4792ac3..5f038fa 100644
--- a/src/etc/inc/config.inc
+++ b/src/etc/inc/config.inc
@@ -36,10 +36,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
-
- pfSense_BUILDER_BINARIES: /sbin/mount /sbin/umount /sbin/halt /sbin/fsck
- pfSense_MODULE: config
*/
if (!function_exists('platform_booting')) {
@@ -191,9 +187,6 @@ if (platform_booting(true)) {
}
}
- /* write device name to a file for rc.firmware */
- file_put_contents("{$g['varetc_path']}/cfdevice", $cfgdevice . "\n");
-
/* write out an fstab */
$fstab = "/dev/{$cfgpartition} {$g['cf_path']} {$cfgfstype} ro,noatime 1 1\n";
@@ -210,12 +203,28 @@ if (platform_booting(true)) {
$config = parse_config();
/* set timezone */
-$timezone = $config['system']['timezone'];
-if (!$timezone) {
+if (isset($config['system']['timezone']) &&
+ !empty($config['system']['timezone'])) {
+ $timezone = $config['system']['timezone'];
+} elseif (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
+ $timezone = $g['default_timezone'];
+} else {
$timezone = "Etc/UTC";
}
date_default_timezone_set("$timezone");
+/* Set the default interface language */
+if ($config['system']['language'] <> "") {
+ $g['language'] = $config['system']['language'];
+} elseif ($g['language'] == "") {
+ $g['language'] = 'en_US';
+}
+
+if (!function_exists('set_language')) {
+ require_once("pfsense-utils.inc");
+}
+set_language($g['language']);
+
if ($config_parsed == true) {
/* process packager manager custom rules */
if (is_dir("/usr/local/pkg/parse_config")) {
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index 0ea97b3..0d66706 100644
--- a/src/etc/inc/config.lib.inc
+++ b/src/etc/inc/config.lib.inc
@@ -37,10 +37,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
-
- pfSense_BUILDER_BINARIES: /sbin/mount /sbin/umount /sbin/halt
- pfSense_MODULE: config
*/
/****f* config/encrypted_configxml
@@ -250,7 +246,7 @@ function parse_config_bootup() {
if (strstr($g['platform'], "cdrom")) {
/* try copying the default config. to the floppy */
echo gettext("Resetting factory defaults...") . "\n";
- reset_factory_defaults(true);
+ reset_factory_defaults(true, false);
if (!file_exists("{$g['conf_path']}/config.xml")) {
echo gettext("No XML configuration file found - using factory defaults.\n" .
"Make sure that the configuration floppy disk with the conf/config.xml\n" .
@@ -515,7 +511,7 @@ function safe_write_file($file, $content, $force_binary) {
* null
******/
/* save the system configuration */
-function write_config($desc="Unknown", $backup = true) {
+function write_config($desc="Unknown", $backup = true, $write_config_only = false) {
global $config, $g;
if (!empty($_SERVER['REMOTE_ADDR'])) {
@@ -580,6 +576,12 @@ function write_config($desc="Unknown", $backup = true) {
unlock($lockkey);
+ if ($write_config_only) {
+ /* tell kernel to sync fs data */
+ conf_mount_ro();
+ return $config;
+ }
+
unlink_if_exists("/usr/local/pkg/pf/carp_sync_client.php");
/* tell kernel to sync fs data */
@@ -602,7 +604,7 @@ function write_config($desc="Unknown", $backup = true) {
* RESULT
* integer - indicates completion
******/
-function reset_factory_defaults($lock = false) {
+function reset_factory_defaults($lock = false, $reboot_required = true) {
global $g;
conf_mount_rw();
@@ -616,7 +618,7 @@ function reset_factory_defaults($lock = false) {
/* clear out /conf */
$dh = opendir($g['conf_path']);
while ($filename = readdir($dh)) {
- if (($filename != ".") && ($filename != "..")) {
+ if (($filename != ".") && ($filename != "..") && (!is_dir($g['conf_path'] . "/" . $filename))) {
unlink_if_exists($g['conf_path'] . "/" . $filename);
}
}
@@ -629,7 +631,12 @@ function reset_factory_defaults($lock = false) {
disable_security_checks();
/* call the wizard */
- touch("/conf/trigger_initial_wizard");
+ if ($reboot_required) {
+ // If we need a reboot first then touch a different trigger file.
+ touch("/conf/trigger_initial_wizard_after_reboot");
+ } else {
+ touch("/conf/trigger_initial_wizard");
+ }
if (!$lock) {
unlock($lockkey);
}
@@ -1017,4 +1024,4 @@ function pfSense_clear_globals() {
register_shutdown_function('pfSense_clear_globals');
-?>
+?> \ No newline at end of file
diff --git a/src/etc/inc/crypt.inc b/src/etc/inc/crypt.inc
index 8d96b26..f621588 100644
--- a/src/etc/inc/crypt.inc
+++ b/src/etc/inc/crypt.inc
@@ -1,6 +1,6 @@
<?php
-/* $Id$ */
+/* crypt.inc */
/*
Copyright (C) 2008 Shrew Soft Inc
All rights reserved.
@@ -25,10 +25,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /usr/bin/openssl
- pfSense_MODULE: crypto
-
*/
function crypt_data($val, $pass, $opt) {
diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class
index 104d4a6..1d1641b 100644
--- a/src/etc/inc/dyndns.class
+++ b/src/etc/inc/dyndns.class
@@ -33,6 +33,8 @@
* - DNSimple (dnsimple.com)
* - Google Domains (domains.google.com)
* - DNS Made Easy (www.dnsmadeeasy.com)
+ * - SPDNS (spdns.de)
+ * - SPDNS IPv6 (spdns.de)
* +----------------------------------------------------+
* Requirements:
* - PHP version 4.0.2 or higher with the CURL Library and the PCRE Library
@@ -79,6 +81,8 @@
* DNSimple - Last Tested: 09 February 2015
* Google Domains - Last Tested: 27 April 2015
* DNS Made Easy - Last Tested: 27 April 2015
+ * SPDNS - Last Tested: 04 December 2015
+ * SPDNS IPv6 - Last Tested: 04 December 2015
* +====================================================+
*
* @author E.Kristensen
@@ -179,6 +183,7 @@
switch ($dnsService) {
case 'he-net-v6':
case 'custom-v6':
+ case 'spdns-v6':
$this->_useIPv6 = true;
break;
default:
@@ -254,6 +259,8 @@
case 'dnsimple':
case 'googledomains':
case 'dnsmadeeasy':
+ case 'spdns':
+ case 'spdns-v6':
$this->_update();
if ($this->_dnsDummyUpdateDone == true) {
// If a dummy update was needed, then sleep a while and do the update again to put the proper address back.
@@ -282,7 +289,7 @@
if ($this->_dnsVerboseLog) {
log_error("DynDNS ({$this->_dnsHost}): DynDns _update() starting.");
}
-
+
if (strstr($this->_dnsRequestIf, "_vip")) {
$parentif = link_carp_interface_to_parent($this->_dnsRequestIf);
$realparentif = convert_friendly_interface_to_real_interface_name($parentif);
@@ -293,7 +300,7 @@
$ch = curl_init();
if ($this->_useIPv6 == false) {
- curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
+ curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
}
if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53 ') {
@@ -684,7 +691,7 @@
case 'cloudflare':
$needsIP = TRUE;
$dnsServer ='api.cloudflare.com';
- $dnsHost = str_replace(' ','', $this->_dnsHost);
+ $dnsHost = str_replace(' ', '', $this->_dnsHost);
$host_names = explode(".", $dnsHost);
$bottom_host_name = $host_names[count($host_names)-2] . "." . $host_names[count($host_names)-1];
@@ -697,15 +704,15 @@
// Get zone ID
$getZoneId = "https://{$dnsServer}/client/v4/zones/?name={$bottom_host_name}";
- curl_setopt($ch, CURLOPT_URL, $getZoneId);
+ curl_setopt($ch, CURLOPT_URL, $getZoneId);
$output = json_decode(curl_exec($ch));
$zone = $output->result[0]->id;
- if ($zone){ // If zone ID was found get host ID
+ if ($zone) { // If zone ID was found get host ID
$getHostId = "https://{$dnsServer}/client/v4/zones/{$zone}/dns_records?name={$this->_dnsHost}";
- curl_setopt($ch, CURLOPT_URL, $getHostId);
+ curl_setopt($ch, CURLOPT_URL, $getHostId);
$output = json_decode(curl_exec($ch));
$host = $output->result[0]->id;
- if ($host){ // If host ID was found update host
+ if ($host) { // If host ID was found update host
$hostData = array(
"content" => "{$this->_dnsIP}",
"type" => "A",
@@ -715,9 +722,9 @@
);
$data_json = json_encode($hostData);
$updateHostId = "https://{$dnsServer}/client/v4/zones/{$zone}/dns_records/{$host}";
- curl_setopt($ch, CURLOPT_URL, $updateHostId);
+ curl_setopt($ch, CURLOPT_URL, $updateHostId);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
- curl_setopt($ch, CURLOPT_POSTFIELDS,$data_json);
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $data_json);
}
}
break;
@@ -821,6 +828,23 @@
$server = "https://cp.dnsmadeeasy.com/servlet/updateip";
curl_setopt($ch, CURLOPT_URL, $server . '?username=' . $this->_dnsUser . '&password=' . $this->_dnsPass . '&id=' . $this->_dnsHost . '&ip=' . $this->_dnsIP);
break;
+ case 'spdns':
+ case 'spdns-v6':
+ $needsIP = FALSE;
+ if ($this->_dnsVerboseLog) {
+ log_error("SPDNS: ({$this->_dnsHost}) DNS update() starting.");
+ }
+ curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass);
+ $server = "https://update.spdns.de/nic/update";
+ $port = "";
+ if ($this->_dnsServer) {
+ $server = $this->_dnsServer;
+ }
+ if ($this->_dnsPort) {
+ $port = ":" . $this->_dnsPort;
+ }
+ curl_setopt($ch, CURLOPT_URL, $server .$port . '?hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP);
+ break;
default:
break;
}
@@ -1274,22 +1298,19 @@
if ($successful_update == true) {
$status = "phpDynDNS: (Success) IP Address Updated Successfully!";
} else {
- $status = "phpDynDNS: (Error) Result did not match.";
+ $status = "phpDynDNS: (Error) Result did not match. [$data]";
}
break;
case 'cloudflare':
$output = json_decode($data);
- if ($output->result->content === $this->_dnsIP){
+ if ($output->result->content === $this->_dnsIP) {
$status = "DynDNS: (Success) {$this->_dnsHost} updated to {$this->_dnsIP}";
$successful_update = true;
- }
- elseif ($output->errors[0]->code === 9103){
+ } elseif ($output->errors[0]->code === 9103) {
$status = "DynDNS ({$this->_dnsHost}): ERROR - Invalid Credentials! Don't forget to use API Key for password field with CloudFlare.";
- }
- elseif (($output->success) && (!$output->result[0]->id)) {
+ } elseif (($output->success) && (!$output->result[0]->id)) {
$status = "DynDNS ({$this->_dnsHost}): ERROR - Zone or Host ID was not found, check your hostname.";
- }
- else {
+ } else {
$status = "DynDNS ({$this->_dnsHost}): UNKNOWN ERROR - {$output->errors[0]->message}";
log_error("DynDNS ({$this->_dnsHost}): PAYLOAD: {$data}");
}
@@ -1417,6 +1438,26 @@
break;
}
break;
+ case 'spdns':
+ case 'spdns-v6':
+ if (preg_match('/notfqdn/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!";
+ } else if (preg_match('/nohost/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Error) No such host";
+ } else if (preg_match('/nochg/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address";
+ $successful_update = true;
+ } else if (preg_match('/good/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (".$this->_dnsIP.")";
+ $successful_update = true;
+ } else if (preg_match('/badauth/i', $data)) {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed";
+ } else {
+ $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)";
+ log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}");
+ $this->_debug($data);
+ }
+ break;
}
if ($successful_update == true) {
diff --git a/src/etc/inc/easyrule.inc b/src/etc/inc/easyrule.inc
index dbb8cfc..e91c8a5 100644
--- a/src/etc/inc/easyrule.inc
+++ b/src/etc/inc/easyrule.inc
@@ -27,15 +27,12 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: filter
-*/
$blockaliasname = 'EasyRuleBlockHosts';
$protocols_with_ports = array('tcp', 'udp');
require_once("functions.inc");
require_once("util.inc");
+require_once("ipsec.inc");
require_once("config.inc");
function easyrule_find_rule_interface($int) {
@@ -52,7 +49,7 @@ function easyrule_find_rule_interface($int) {
}
/* add ipsec interfaces */
- if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
+ if (ipsec_enabled()) {
$iflist["enc0"] = "IPSEC";
}
diff --git a/src/etc/inc/filter.inc b/src/etc/inc/filter.inc
index 18cae55..a06b63e 100644
--- a/src/etc/inc/filter.inc
+++ b/src/etc/inc/filter.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
filter.inc
Copyright (C) 2004-2006 Scott Ullrich
@@ -32,10 +31,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /sbin/kldload /usr/sbin/tcpdump /sbin/pfctl /bin/rm
- pfSense_BUILDER_BINARIES: /usr/sbin/inetd
- pfSense_MODULE: filter
*/
@@ -278,8 +273,6 @@ function filter_configure_sync($delete_states_if_needed = true) {
}
update_filter_reload_status(gettext("Generating ALTQ queues"));
$altq_queues = filter_generate_altq_queues();
- update_filter_reload_status(gettext("Generating Layer7 rules"));
- generate_layer7_files();
if (platform_booting() == true) {
echo ".";
}
@@ -433,31 +426,32 @@ function filter_configure_sync($delete_states_if_needed = true) {
* then output the contents of the error to the caller
*/
if ($rules_loading <> 0) {
- $saved_line_error = $rules_error[0];
- $line_error = explode(":", $rules_error[0]);
- $line_number = $line_error[1];
- $line_split = file("{$g['tmp_path']}/rules.debug");
- if (is_array($line_split)) {
- $line_error = sprintf(gettext('The line in question reads [%1$d]: %2$s'), $line_number, $line_split[$line_number-1]);
- }
- unset($line_split);
-
- /* Brutal ugly hack but required -- PF is stuck, unwedge */
- if (strstr("$rules_error[0]", "busy")) {
- exec("/sbin/pfctl -d; /sbin/pfctl -e; /sbin/pfctl -f {$g['tmp_path']}/rules.debug");
- $error_msg = gettext("PF was wedged/busy and has been reset.");
- file_notice("pf_busy", $error_msg, "pf_busy", "");
- } else {
- $_grbg = exec("/sbin/pfctl -o basic -f {$g['tmp_path']}/rules.debug.old 2>&1");
+ foreach ($rules_error as $errorline) {
+ $saved_line_error = $errorline;
+ $line_error = explode(":", $errorline);
+ $line_number = $line_error[1];
+ $line_split = file("{$g['tmp_path']}/rules.debug");
+ if (is_array($line_split)) {
+ $line_error = sprintf(gettext('The line in question reads [%1$d]: %2$s'), $line_number, $line_split[$line_number-1]);
+ }
+ unset($line_split);
+
+ /* Brutal ugly hack but required -- PF is stuck, unwedge */
+ if (strstr("$rules_error[0]", "busy")) {
+ exec("/sbin/pfctl -d; /sbin/pfctl -e; /sbin/pfctl -f {$g['tmp_path']}/rules.debug");
+ $error_msg = gettext("PF was wedged/busy and has been reset.");
+ file_notice("pf_busy", $error_msg, "pf_busy", "");
+ } else {
+ $_grbg = exec("/sbin/pfctl -o basic -f {$g['tmp_path']}/rules.debug.old 2>&1");
+ }
+ if ($line_error and $line_number) {
+ file_notice("filter_load", sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $saved_line_error, $line_error), "Filter Reload", "");
+ update_filter_reload_status(sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $saved_line_error, $line_error));
+ unlock($filterlck);
+ return;
+ }
}
unset($rules_loading, $rules_error);
-
- if ($line_error and $line_number) {
- file_notice("filter_load", sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $saved_line_error, $line_error), "Filter Reload", "");
- update_filter_reload_status(sprintf(gettext('There were error(s) loading the rules: %1$s - %2$s'), $saved_line_error, $line_error));
- unlock($filterlck);
- return;
- }
}
# If we are not using bogonsv6 then we can remove any bogonsv6 table from the running pf (if the table is not there, the kill is still fine).
@@ -465,9 +459,6 @@ function filter_configure_sync($delete_states_if_needed = true) {
$_grbg = exec("/sbin/pfctl -t bogonsv6 -T kill 2>/dev/null");
}
- update_filter_reload_status(gettext("Starting up layer7 daemon"));
- layer7_start_l7daemon();
-
if (!platform_booting()) {
if (!empty($filterdns)) {
@file_put_contents("{$g['varetc_path']}/filterdns.conf", implode("", $filterdns));
@@ -934,13 +925,13 @@ function filter_get_vpns_list() {
$vpns_arr = array();
/* ipsec */
- if (isset($config['ipsec']['enable'])) {
+ if (!function_exists('ipsec_enabled')) {
+ require_once("ipsec.inc");
+ }
+ if (ipsec_enabled()) {
if (is_array($config['ipsec']['phase2'])) {
foreach ($config['ipsec']['phase2'] as $ph2ent) {
if ((!$ph2ent['mobile']) && ($ph2ent['mode'] != 'transport')) {
- if (!function_exists('ipsec_idinfo_to_cidr')) {
- require_once("ipsec.inc");
- }
if (!is_array($ph2ent['remoteid'])) {
continue;
}
@@ -1067,7 +1058,6 @@ function filter_generate_optcfg_array() {
echo "filter_generate_optcfg_array() being called $mt\n";
}
- read_layer7_config();
/* if list */
$iflist = get_configured_interface_with_descr();
foreach ($iflist as $if => $ifdetail) {
@@ -1172,7 +1162,10 @@ function filter_generate_optcfg_array() {
}
}
/* add ipsec interfaces */
- if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
+ if (!function_exists('ipsec_enabled')) {
+ require_once("ipsec.inc");
+ }
+ if (ipsec_enabled()) {
$oic = array();
$oic['if'] = 'enc0';
$oic['descr'] = 'IPsec';
@@ -1329,12 +1322,12 @@ function filter_generate_reflection_nat($rule, &$route_table, $nat_ifs, $protoco
return $natrules;
}
-function filter_generate_reflection_proxy($rule, $nordr, $rdr_ifs, $srcaddr, $dstaddr_port, &$starting_localhost_port, &$reflection_txt) {
+function filter_generate_reflection_proxy($rule, $nordr, $rdr_ifs, $srcaddr, $dstaddr_port, &$starting_localhost_port, &$reflection_rules) {
global $FilterIflist, $config;
// Initialize natrules holder string
$natrules = "";
- $reflection_txt = array();
+ $reflection_rules = array();
if (!empty($rdr_ifs)) {
if ($config['system']['reflectiontimeout']) {
@@ -1509,17 +1502,27 @@ function filter_generate_reflection_proxy($rule, $nordr, $rdr_ifs, $srcaddr, $ds
if ($reflect_proto == "udp") {
$socktype = "dgram";
$dash_u = "-u ";
- $wait = "wait\t";
+ $wait = "yes";
} else {
$socktype = "stream";
$dash_u = "";
- $wait = "nowait/0";
+ $wait = "no";
}
foreach ($rtarget as $targip) {
if (empty($targip)) {
continue;
}
- $reflection_txt[] = "{$inetdport}\t{$socktype}\t{$reflect_proto}\t{$wait}\tnobody\t/usr/bin/nc\tnc {$dash_u}-w {$reflectiontimeout} {$targip} {$tda}\n";
+ $reflection_rule = array(
+ 'port' => $inetdport,
+ 'socket_type' => $socktype,
+ 'protocol' => $reflect_proto,
+ 'wait' => $wait,
+ 'user' => 'nobody',
+ 'server' => '/usr/bin/nc',
+ 'server_args' => "{$dash_u}-w {$reflectiontimeout} {$targip} {$tda}"
+ );
+ $reflection_rules[] = $reflection_rule;
+ unset($reflection_rule);
}
}
$inetdport++;
@@ -1532,8 +1535,6 @@ function filter_generate_reflection_proxy($rule, $nordr, $rdr_ifs, $srcaddr, $ds
break;
}
}
-
- $reflection_txt = array_unique($reflection_txt);
}
return $natrules;
@@ -1787,6 +1788,26 @@ function filter_nat_rules_generate_if ($if, $src = "any", $srcport = "", $dst =
return $natrule;
}
+function xinetd_service_entry($entry_array) {
+ $entry = <<<EOD
+service {$entry_array['port']}-{$entry_array['protocol']}
+{
+ type = unlisted
+ bind = 127.0.0.1
+ port = {$entry_array['port']}
+ socket_type = {$entry_array['socket_type']}
+ protocol = {$entry_array['protocol']}
+ wait = {$entry_array['wait']}
+ user = {$entry_array['user']}
+ server = {$entry_array['server']}
+ server_args = {$entry_array['server_args']}
+}
+
+
+EOD;
+ return $entry;
+}
+
function filter_nat_rules_generate() {
global $config, $g, $after_filter_configure_run, $FilterIflist, $GatewaysList, $aliases;
@@ -1896,12 +1917,19 @@ function filter_nat_rules_generate() {
}
/* ipsec nat */
- if (is_array($config['ipsec']) && isset($config['ipsec']['enable'])) {
+ if (!function_exists('ipsec_enabled')) {
+ require_once("ipsec.inc");
+ }
+ if (ipsec_enabled()) {
if (is_array($config['ipsec']['phase2'])) {
foreach ($config['ipsec']['phase2'] as $ph2ent) {
- if ($ph2ent['mode'] != 'transport' && !empty($ph2ent['natlocalid'])) {
- if (!function_exists('ipsec_idinfo_to_cidr')) {
- require_once("ipsec.inc");
+ if ($ph2ent['mode'] != 'transport' && !empty($ph2ent['natlocalid']) && !isset($ph2ent['disabled'])) {
+ ipsec_lookup_phase1($ph2ent, $ph1ent);
+ if (!is_array($ph1ent)) {
+ continue;
+ }
+ if (isset($ph1ent['disabled'])) {
+ continue;
}
if (!is_array($ph2ent['localid'])) {
$ph2ent['localid'] = array();
@@ -2069,13 +2097,21 @@ function filter_nat_rules_generate() {
$natrules .= "rdr on \${$FilterIflist['wan']['descr']} proto ipv6 from any to any -> {$config['diag']['ipv6nat']['ipaddr']}\n";
}
- if (file_exists("/var/etc/inetd.conf")) {
- @unlink("/var/etc/inetd.conf");
- }
- // Open inetd.conf write handle
- $inetd_fd = fopen("/var/etc/inetd.conf", "w");
+ unlink_if_exists("{$g['varetc_path']}/xinetd.conf");
+ // Open xinetd.conf write handle
+ $xinetd_fd = fopen("{$g['varetc_path']}/xinetd.conf", "w");
+
/* add tftp protocol helper */
- fwrite($inetd_fd, "tftp-proxy\tdgram\tudp\twait\t\troot\t/usr/libexec/tftp-proxy\ttftp-proxy -v\n");
+ $ftp_proxy_entry = array(
+ 'port' => 6969,
+ 'socket_type' => 'dgram',
+ 'protocol' => 'udp',
+ 'wait' => 'yes',
+ 'user' => 'root',
+ 'server' => '/usr/libexec/tftp-proxy',
+ 'server_args' => '-v'
+ );
+ fwrite($xinetd_fd, xinetd_service_entry($ftp_proxy_entry));
if (isset($config['nat']['rule'])) {
/* start reflection redirects on port 19000 of localhost */
@@ -2257,8 +2293,8 @@ function filter_nat_rules_generate() {
if ($reflection_type == "proxy" && !isset($rule['nordr'])) {
$natrules .= filter_generate_reflection_proxy($rule, $nordr, $nat_if_list, $srcaddr, $dstaddr, $starting_localhost_port, $reflection_rules);
$nat_if_list = array($natif);
- foreach ($reflection_rules as $txtline) {
- fwrite($inetd_fd, $txtline);
+ foreach ($reflection_rules as $reflection_rule) {
+ fwrite($xinetd_fd, xinetd_service_entry($reflection_rule));
}
} else if ($reflection_type == "purenat" || isset($rule['nordr'])) {
$rdr_if_list = implode(" ", $nat_if_list);
@@ -2282,7 +2318,7 @@ function filter_nat_rules_generate() {
}
}
}
- fclose($inetd_fd); // Close file handle
+ fclose($xinetd_fd); // Close file handle
$natrules .= discover_pkg_rules("nat");
@@ -2293,13 +2329,15 @@ function filter_nat_rules_generate() {
$natrules .= "\n# Reflection redirects and NAT for 1:1 mappings\n" . $reflection_txt;
}
- // Check if inetd is running, if not start it. If so, restart it gracefully.
- $helpers = isvalidproc("inetd");
- if (file_exists("/var/etc/inetd.conf")) {
- if (!$helpers) {
- mwexec("/usr/sbin/inetd -wW -R 0 -a 127.0.0.1 /var/etc/inetd.conf");
+ // Check if xinetd is running, if not start it. If so, restart it gracefully.
+ if (file_exists("{$g['varetc_path']}/xinetd.conf")) {
+ if (isvalidpid("{$g['varrun_path']}/xinetd.pid")) {
+ sigkillbypid("{$g['varrun_path']}/xinetd.pid", "HUP");
} else {
- sigkillbypid("/var/run/inetd.pid", "HUP");
+ mwexec("/usr/local/sbin/xinetd " .
+ "-syslog daemon " .
+ "-f {$g['varetc_path']}/xinetd.conf " .
+ "-pidfile {$g['varrun_path']}/xinetd.pid");
}
}
@@ -2558,7 +2596,7 @@ function filter_generate_address(& $rule, $target = "source", $isnat = false) {
function filter_generate_user_rule($rule) {
global $config, $g, $FilterIflist, $GatewaysList;
- global $layer7_rules_list, $dummynet_name_list;
+ global $dummynet_name_list;
if (isset($config['system']['developerspew'])) {
$mt = microtime();
@@ -2668,7 +2706,7 @@ function filter_generate_user_rule($rule) {
$rg = get_interface_gateway($rule['interface']);
if (is_ipaddrv4($rg)) {
$aline['reply'] = "reply-to ( {$ifcfg['if']} {$rg} ) ";
- }
+ }
}
}
/* if user has selected a custom gateway, lets work with it */
@@ -2719,15 +2757,6 @@ function filter_generate_user_rule($rule) {
}
$aline['dst'] = "to $dst ";
- //Layer7 support
- $l7_present = false;
- $l7_structures = array();
- if (isset($rule['l7container']) && $rule['l7container'] != "none") {
- $l7_present = true;
- $l7rule =& $layer7_rules_list[$rule['l7container']];
- $l7_structures = $l7rule->get_unique_structures();
- $aline['divert'] = "divert-to " . $l7rule->GetRPort() . " ";
- }
if (($rule['protocol'] == "icmp") && $rule['icmptype'] && ($rule['ipprotocol'] == "inet")) {
$aline['icmp-type'] = "icmp-type {$rule['icmptype']} ";
}
@@ -2866,7 +2895,7 @@ function filter_generate_user_rule($rule) {
$rule['nopfsync'] = true;
}
- if ($noadvoptions == false || $l7_present) {
+ if ($noadvoptions == false) {
if ((isset($rule['source-track']) and $rule['source-track'] <> "") or
(isset($rule['max']) and $rule['max'] <> "") or
(isset($rule['max-src-nodes']) and $rule['max-src-nodes'] <> "") or
@@ -2877,8 +2906,7 @@ function filter_generate_user_rule($rule) {
(isset($rule['max-src-conn-rate']) and $rule['max-src-conn-rate'] <> "") or
(isset($rule['max-src-conn-rates']) and $rule['max-src-conn-rates'] <> ""))) or
(isset($rule['sloppy'])) or
- (isset($rule['nopfsync'])) or
- ($l7_present)) {
+ (isset($rule['nopfsync']))) {
$aline['flags'] .= "( ";
if (isset($rule['sloppy'])) {
$aline['flags'] .= "sloppy ";
@@ -2917,10 +2945,6 @@ function filter_generate_user_rule($rule) {
$aline['flags'] .= "/" . $rule['max-src-conn-rates'] . ", overload <virusprot> flush global ";
}
- if (!empty($aline['divert'])) {
- $aline['flags'] .= "max-packets 8 ";
- }
-
$aline['flags'] .= " ) ";
}
}
@@ -2991,7 +3015,7 @@ function filter_generate_user_rule($rule) {
/* piece together the actual user rule */
$line .= $aline['type'] . $aline['direction'] . $aline['log'] . $aline['quick'] . $aline['interface'] .
$aline['reply'] . $aline['route'] . $aline['ipprotocol'] . $aline['prot'] . $aline['src'] . $aline['os'] . $aline['dst'] .
- $aline['divert'] . $aline['icmp-type'] . $aline['icmp6-type'] . $aline['tag'] . $aline['tagged'] . $aline['dscp'] . $aline['tracker'] .
+ $aline['icmp-type'] . $aline['icmp6-type'] . $aline['tag'] . $aline['tagged'] . $aline['dscp'] . $aline['tracker'] .
$aline['vlanprio'] . $aline['vlanprioset'] . $aline['allowopts'] . $aline['flags'] . $aline['queue'] . $aline['dnpipe'] . $aline['schedlabel'];
unset($aline);
@@ -3333,6 +3357,19 @@ EOD;
}
}
+ /* allow access to DHCP relay on interfaces */
+ if (isset($config['dhcrelay']['enable'])) {
+ $dhcifaces = explode(",", $dhcrelaycfg['interface']);
+ foreach ($dhcifaces as $dhcrelayif) {
+ if ($dhcrelayif == $on) {
+ $ipfrules .= <<<EOD
+# allow access to DHCP relay on {$oc['descr']}
+pass in {$log['pass']} quick on \${$oc['descr']} proto udp from any port = 68 to 255.255.255.255 port = 67 tracker {$increment_tracker($tracker)} label "allow access to DHCP relay"
+
+EOD;
+ }
+ }
+ }
break;
}
@@ -3460,7 +3497,10 @@ EOD;
$saved_tracker += 300;
$tracker = $saved_tracker;
/* add ipsec interfaces */
- if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
+ if (!function_exists('ipsec_enabled')) {
+ require_once("ipsec.inc");
+ }
+ if (ipsec_enabled()) {
$ipfrules .= "pass out {$log['pass']} on \$IPsec all tracker {$increment_tracker($tracker)} tracker {$increment_tracker($tracker)} keep state label \"IPsec internal host to host\"\n";
}
@@ -3948,8 +3988,10 @@ function filter_generate_ipsec_rules($log = array()) {
$increment_tracker = 'filter_rule_tracker';
$ipfrules = "\n# VPN Rules\n";
- if ((isset($config['ipsec']['enable'])) &&
- (is_array($config['ipsec']['phase1']))) {
+ if (!function_exists('ipsec_enabled')) {
+ require_once("ipsec.inc");
+ }
+ if (ipsec_enabled()) {
/* step through all phase1 entries */
foreach ($config['ipsec']['phase1'] as $ph1ent) {
$tracker += 10;
@@ -3959,9 +4001,6 @@ function filter_generate_ipsec_rules($log = array()) {
}
/* determine local and remote peer addresses */
if (!isset($ph1ent['mobile'])) {
- if (!function_exists('ipsec_get_phase1_dst')) {
- require_once("ipsec.inc");
- }
$rgip = ipsec_get_phase1_dst($ph1ent);
if (!$rgip) {
$ipfrules .= "# ERROR! Unable to determine remote IPsec peer address for {$ph1ent['remote-gateway']}\n";
diff --git a/src/etc/inc/filter_log.inc b/src/etc/inc/filter_log.inc
index 6779f4d..32ba9da 100644
--- a/src/etc/inc/filter_log.inc
+++ b/src/etc/inc/filter_log.inc
@@ -1,38 +1,57 @@
<?php
-/* $Id$ */
/*
filter_log.inc
- part of pfSesne by Scott Ullrich
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2009 Jim Pingle <myfirstname>@<mylastname>.org
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/fifolog_reader /usr/bin/tail /usr/local/sbin/clog
- pfSense_MODULE: filter
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
require 'config.inc';
@@ -42,7 +61,7 @@ $buffer_rules_normal = array();
/* format filter logs */
function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $filterinterface = null) {
- global $config, $g;
+ global $config, $g, $pattern;
/* Make sure this is a number before using it in a system call */
if (!(is_numeric($tail))) {
@@ -56,11 +75,75 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
/* Always do a reverse tail, to be sure we're grabbing the 'end' of the log. */
$logarr = "";
- if (isset($config['system']['usefifolog'])) {
- exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr);
- } else {
- exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/grep 'filterlog:' | /usr/bin/tail -r -n {$tail}", $logarr);
+ if ($logfile == "{$g['varlog_path']}/system.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/gateways.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/routing.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/resolver.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/wireless.log") { $logfile_type = "system"; }
+
+ else if ($logfile == "{$g['varlog_path']}/filter.log") { $logfile_type = "firewall"; }
+ else if ($logfile == "{$g['varlog_path']}/dhcpd.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/portalauth.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/ipsec.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/ppp.log") { $logfile_type = "system"; }
+
+ else if ($logfile == "{$g['varlog_path']}/vpn.log") { $logfile_type = "tbd"; }
+ else if ($logfile == "{$g['varlog_path']}/poes.log") { $logfile_type = "tbd"; }
+ else if ($logfile == "{$g['varlog_path']}/l2tps.log") { $logfile_type = "tbd"; }
+
+ else if ($logfile == "{$g['varlog_path']}/relayd.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/openvpn.log") { $logfile_type = "system"; }
+ else if ($logfile == "{$g['varlog_path']}/ntpd.log") { $logfile_type = "system"; }
+
+ else { $logfile_type = "unknown"; }
+
+
+# Common Regular Expression Patterns
+ $month_pattern = "[a-zA-Z]{3}";
+ $day_pattern = "[0-9]{1,2}";
+ $time_pattern = "[0-9]{2}:[0-9]{2}:[0-9]{2}";
+
+ $date_pattern = "\(" . $month_pattern . "\ +" . $day_pattern . "\ +" . $time_pattern . "\)";
+
+ $host_pattern = "\(.*?\)";
+# $host_pattern = "\([a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\)";
+
+ $process_pattern = "\(.*?\)\(?::\ +\)?";
+ $pid_pattern = "\(?:\\\[\([0-9:]*\)\\\]\)?:?";
+ $process_pid_pattern = $process_pattern . $pid_pattern;
+
+ $log_message_pattern = "\(.*\)";
+
+
+ # Construct RegEx for specific log file type.
+ if ($logfile_type == 'firewall') {
+ $pattern = "filterlog:";
+ }
+ else if ($logfile_type == 'system') {
+ $pattern = "^" . $date_pattern . "\ +" . $host_pattern . "\ +" . $process_pid_pattern . "\ +" . $log_message_pattern . "$";
}
+ else if ($logfile_type == 'tbd') {
+ $pattern = "^\(.*\)$";
+ }
+ else if ($logfile_type == 'unknown') {
+ $pattern = "^" . $date_pattern . "\ +" . $log_message_pattern . "$";
+ }
+ else {
+ $pattern = "^\(.*\)$";
+ }
+
+
+ # Get a bunch of log entries.
+ exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | /usr/bin/grep -v \"CLOG\" | /usr/bin/grep -v \"\033\" | /usr/bin/grep -E $pattern | /usr/bin/tail -r -n {$tail}", $logarr);
+
+
+ # Remove escapes and fix up the pattern for preg_match.
+ $pattern = '/' . $pattern . '/';
+ $pattern = str_replace('\(', '(', $pattern);
+ $pattern = str_replace('\)', ')', $pattern);
+ $pattern = str_replace('\[', '[', $pattern);
+ $pattern = str_replace('\]', ']', $pattern);
+
$filterlog = array();
$counter = 0;
@@ -71,7 +154,12 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
break;
}
- $flent = parse_filter_line($logent);
+ if ($logfile_type == 'firewall') { $flent = parse_firewall_log_line($logent); }
+ else if ($logfile_type == 'system') { $flent = parse_system_log_line($logent); }
+ else if ($logfile_type == 'tbd') { $flent = array(); }
+ else if ($logfile_type == 'unknown') { $flent = parse_unknown_log_line($logent); }
+ else { $flent = array(); }
+
if (!$filterinterface || ($filterinterface == $flent['interface'])) {
if ((($flent != "") && (!is_array($filtertext)) && (match_filter_line($flent, $filtertext))) ||
(($flent != "") && (is_array($filtertext)) && (match_filter_field($flent, $filtertext)))) {
@@ -81,7 +169,13 @@ function conv_log_filter($logfile, $nentries, $tail = 50, $filtertext = "", $fil
}
}
/* Since the lines are in reverse order, flip them around if needed based on the user's preference */
- return isset($config['syslog']['reverse']) ? $filterlog : array_reverse($filterlog);
+ # First get the "General Logging Options" (global) chronological order setting. Then apply specific log override if set.
+ $reverse = isset($config['syslog']['reverse']);
+ $specific_log = basename($logfile, '.log') . '_settings';
+ if ($config['syslog'][$specific_log]['cronorder'] == 'forward') $reverse = false;
+ if ($config['syslog'][$specific_log]['cronorder'] == 'reverse') $reverse = true;
+
+ return ($reverse) ? $filterlog : array_reverse($filterlog);
}
function escape_filter_regex($filtertext) {
@@ -136,7 +230,53 @@ function in_arrayi($needle, $haystack) {
return in_array(strtolower($needle), array_map('strtolower', $haystack));
}
-function parse_filter_line($line) {
+function parse_unknown_log_line($line) {
+ global $config, $g, $pattern;
+
+ $flent = array();
+ $log_split = "";
+
+ if (!preg_match($pattern, $line, $log_split)) {
+ return "";
+ }
+
+ list($all, $flent['time'], $flent['message']) = $log_split;
+
+ /* If there is time, and message, fields, then the line should be usable/good */
+ if (!((trim($flent['time']) == "") && (trim($flent['message']) == ""))) {
+ return $flent;
+ } else {
+ if ($g['debug']) {
+ log_error(sprintf(gettext("There was a error parsing log entry: %s. Please report to mailing list or forum."), $line));
+ }
+ return "";
+ }
+}
+
+function parse_system_log_line($line) {
+ global $config, $g, $pattern;
+
+ $flent = array();
+ $log_split = "";
+
+ if (!preg_match($pattern, $line, $log_split)) {
+ return "";
+ }
+
+ list($all, $flent['time'], $flent['host'], $flent['process'], $flent['pid'], $flent['message']) = $log_split;
+
+ /* If there is time, process, and message, fields, then the line should be usable/good */
+ if (!((trim($flent['time']) == "") && (trim($flent['process']) == "") && (trim($flent['message']) == ""))) {
+ return $flent;
+ } else {
+ if ($g['debug']) {
+ log_error(sprintf(gettext("There was a error parsing log entry: %s. Please report to mailing list or forum."), $line));
+ }
+ return "";
+ }
+}
+
+function parse_firewall_log_line($line) {
global $config, $g;
$flent = array();
@@ -271,7 +411,7 @@ function parse_filter_line($line) {
return $flent;
} else {
if ($g['debug']) {
- log_error(sprintf(gettext("There was a error parsing rule: %s. Please report to mailing list or forum."), $errline));
+ log_error(sprintf(gettext("There was a error parsing rule: %s. Please report to mailing list or forum."), $line));
}
return "";
}
@@ -312,11 +452,7 @@ function find_rule_by_number($rulenum, $trackernum, $type="block") {
if ($type == "rdr") {
$_gb = exec("/sbin/pfctl -vvPsn -a \"miniupnpd\" | /usr/bin/egrep " . escapeshellarg("^@{$rulenum}"), $buffer);
} else {
- if (file_exists("{$g['tmp_path']}/rules.debug")) {
- $_gb = exec("/sbin/pfctl -vvPnf {$g['tmp_path']}/rules.debug 2>/dev/null | /usr/bin/egrep " . escapeshellarg($lookup_pattern), $buffer);
- } else {
- $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep " . escapeshellarg($lookup_pattern), $buffer);
- }
+ $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep " . escapeshellarg($lookup_pattern), $buffer);
}
if (is_array($buffer)) {
return $buffer[0];
@@ -333,7 +469,7 @@ function buffer_rules_load() {
$buffer_rules_rdr = array();
$buffer_rules_normal = array();
- $_gb = exec("/sbin/pfctl -vvPsn -a \"miniupnpd\" | grep '^@'", $buffer);
+ $_gb = exec("/sbin/pfctl -vvPsn -a \"miniupnpd\" | /usr/bin/grep '^@'", $buffer);
if (is_array($buffer)) {
foreach ($buffer as $line) {
list($key, $value) = explode (" ", $line, 2);
@@ -341,11 +477,7 @@ function buffer_rules_load() {
}
}
unset($buffer, $_gb);
- if (file_exists("{$g['tmp_path']}/rules.debug")) {
- $_gb = exec("/sbin/pfctl -vvPnf {$g['tmp_path']}/rules.debug 2>/dev/null | /usr/bin/egrep '^@[0-9]+\([0-9]+\)[[:space:]].*[[:space:]]log[[:space:]]' | /usr/bin/egrep -v '^@[0-9]+\([0-9]+\)[[:space:]](nat|rdr|binat|no|scrub)'", $buffer);
- } else {
- $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep '^@[0-9]+\([0-9]+\)[[:space:]].*[[:space:]]log[[:space:]]'", $buffer);
- }
+ $_gb = exec("/sbin/pfctl -vvPsr | /usr/bin/egrep '^@[0-9]+\([0-9]+\)[[:space:]].*[[:space:]]log[[:space:]]'", $buffer);
if (is_array($buffer)) {
foreach ($buffer as $line) {
@@ -386,7 +518,7 @@ function find_rule_by_number_buffer($rulenum, $trackernum, $type) {
} else {
$ruleString = $buffer_rules_normal[$lookup_key];
list(,$rulename,) = explode("\"", $ruleString);
- $rulename = str_replace("USER_RULE: ", '<img src="/themes/' . $g['theme'] . '/images/icons/icon_frmfld_user.png" width="11" height="12" title="USER_RULE" alt="USER_RULE"/> ', $rulename);
+ $rulename = str_replace("USER_RULE: ", '<i class="fa fa-user"></i> ', $rulename);
}
return "{$rulename} ({$lookup_key})";
}
@@ -394,11 +526,11 @@ function find_rule_by_number_buffer($rulenum, $trackernum, $type) {
function find_action_image($action) {
global $g;
if ((strstr(strtolower($action), "p")) || (strtolower($action) == "rdr")) {
- return "/themes/{$g['theme']}/images/icons/icon_pass.gif";
+ return "fa-check-circle-o";
} else if (strstr(strtolower($action), "r")) {
- return "/themes/{$g['theme']}/images/icons/icon_reject.gif";
+ return "fa-times-circle-o";
} else {
- return "/themes/{$g['theme']}/images/icons/icon_block.gif";
+ return "fa-ban";
}
}
@@ -406,7 +538,7 @@ function find_action_image($action) {
function handle_ajax($nentries, $tail = 50) {
global $config;
if ($_GET['lastsawtime'] or $_POST['lastsawtime']) {
- global $filter_logfile,$filterent;
+ global $filter_logfile, $filterent;
if ($_GET['lastsawtime']) {
$lastsawtime = $_GET['lastsawtime'];
}
@@ -423,13 +555,18 @@ function handle_ajax($nentries, $tail = 50) {
$filterlog = isset($config['syslog']['reverse']) ? array_reverse($filterlog) : $filterlog;
foreach ($filterlog as $log_row) {
$row_time = strtotime($log_row['time']);
- $img = "<img border='0' src='" . find_action_image($log_row['act']) . "' alt={$log_row['act']} title={$log_row['act']} />";
if ($row_time > $lastsawtime) {
if ($log_row['proto'] == "TCP") {
$log_row['proto'] .= ":{$log_row['tcpflags']}";
}
- $btn = "<a href=\"#\" class=\"btn btn-danger btn-xs\" onClick=\"javascript:getURL('diag_logs_filter.php?getrulenum={$log_row['rulenum']},{$log_row['rulenum']}', outputrule);\">" . gettext("Block") . " </a>";
+ if ($log_row['act'] == "block") {
+ $icon_act = "fa-times text-danger";
+ } else {
+ $icon_act = "fa-check text-success";
+ }
+
+ $btn = '<i class="fa ' . $icon_act . ' icon-pointer" title="' . $log_row['act'] . '/' . $log_row['tracker'] . '" onclick="javascript:getURL(\'status_logs_filter.php?getrulenum=' . $log_row['rulenum'] . ',' . $log_row['tracker'] . ',' . $log_row['act'] . '\', outputrule);"></i>';
$new_rules .= "{$btn}||{$log_row['time']}||{$log_row['interface']}||{$log_row['srcip']}||{$log_row['srcport']}||{$log_row['dstip']}||{$log_row['dstport']}||{$log_row['proto']}||{$log_row['version']}||" . time() . "||\n";
}
}
diff --git a/src/etc/inc/functions.inc b/src/etc/inc/functions.inc
index 40e2dae..1edd6a3 100644
--- a/src/etc/inc/functions.inc
+++ b/src/etc/inc/functions.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
functions.inc
Copyright (C) 2004-2006 Scott Ullrich
@@ -29,9 +28,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_MODULE: utils
-
*/
/* BEGIN compatibility goo with HEAD */
diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc
index 3714032..9ac9c61 100644
--- a/src/etc/inc/globals.inc
+++ b/src/etc/inc/globals.inc
@@ -1,38 +1,65 @@
<?php
-/* $Id$ */
-/*
- globals.inc
- part of pfSense (https://www.pfsense.org)
- Copyright (C) 2004-2010 Scott Ullrich
-
- Originally Part of m0n0wall
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_MODULE: utils
-
-*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+
+// Global defines
+
+// Automatic panel collapse
+define(COLLAPSIBLE, 0x08);
+define(SEC_CLOSED, 0x04);
+define(SEC_OPEN, 0x00);
+
+// AddPassword method defines
+define(DMYPWD, "********");
global $g;
$g = array(
@@ -60,31 +87,26 @@ $g = array(
"product_name" => "pfSense",
"product_version" => trim(file_get_contents("/etc/version"), " \n"),
"product_copyright" => "Electric Sheep Fencing LLC",
- "product_copyright_url" => "http://www.electricsheepfencing.com",
+ "product_copyright_url" => "https://pfsense.org/license",
"product_copyright_years" => "2004 - ".date("Y"),
"product_website" => "www.pfsense.org",
"product_website_footer" => "https://www.pfsense.org/?gui=bootstrap",
"product_email" => "coreteam@pfsense.org",
"hideplatform" => false,
- "hidedownloadbackup" => false,
"hidebackupbeforeupgrade" => false,
- "disablethemeselection" => false,
"disablehelpmenu" => false,
"disablehelpicon" => false,
"disablecrashreporter" => false,
"crashreporterurl" => "https://crashreporter.pfsense.org/crash_reporter.php",
"debug" => false,
- "latest_config" => "12.2",
+ "latest_config" => "13.4",
"nopkg_platforms" => array("cdrom"),
"minimum_ram_warning" => "101",
"minimum_ram_warning_text" => "128 MB",
"wan_interface_name" => "wan",
- "xmlrpcbaseurl" => "https://packages.pfsense.org",
"captiveportal_path" => "/usr/local/captiveportal",
"captiveportal_element_path" => "/var/db/cpelements",
"captiveportal_element_sizelimit" => 1048576,
- "xmlrpcpath" => "/xmlrpc.php",
- "embeddedbootupslice" => "/dev/ad0a",
"services_dhcp_server_enable" => true,
"wireless_regex" => "/^(ndis|wi|ath|an|ral|ural|iwi|wlan|rum|run|bwn|zyd|mwl|bwi|ipw|iwn|malo|uath|upgt|urtw|wpi)/",
"help_base_url" => "/help.php",
@@ -116,7 +138,6 @@ if (file_exists("/etc/platform")) {
$g['platform'] = trim(file_get_contents("/etc/platform"));
if ($g['platform'] == "nanobsd") {
$g['firmware_update_text']="pfSense-*.img.gz";
- $g['hidedownloadbackup'] = true;
$g['hidebackupbeforeupgrade'] = true;
} else {
@@ -137,7 +158,6 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024",
"net.inet.tcp.syncookies" => "1",
"net.inet.tcp.recvspace" => "65228",
"net.inet.tcp.sendspace" => "65228",
- "net.inet.ip.fastforwarding" => "0",
"net.inet.tcp.delayed_ack" => "0",
"net.inet.udp.maxdgram" => "57344",
"net.link.bridge.pfil_onlyip" => "0",
@@ -158,7 +178,6 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024",
"kern.random.sys.harvest.ethernet" => 0,
"net.route.netisr_maxqlen" => 1024,
"net.inet.udp.checksum" => 1,
- "net.bpf.zerocopy_enable" => 1,
"net.inet.icmp.reply_from_interface" => 1,
"net.inet6.ip6.rfc6204w3" => 1,
"net.enc.out.ipsec_bpf_mask" => "0x0001",
diff --git a/src/etc/inc/growl.class b/src/etc/inc/growl.class
index 8f639e5..a6fbcc1 100644
--- a/src/etc/inc/growl.class
+++ b/src/etc/inc/growl.class
@@ -1,8 +1,4 @@
<?PHP
-/*
- pfSense_MODULE: notifications
-*/
-
class Growl
{
const GROWL_PRIORITY_LOW = -2;
@@ -99,4 +95,4 @@
}
}
-?> \ No newline at end of file
+?>
diff --git a/src/etc/inc/gwlb.inc b/src/etc/inc/gwlb.inc
index 9880cdc..1987e28 100644
--- a/src/etc/inc/gwlb.inc
+++ b/src/etc/inc/gwlb.inc
@@ -25,143 +25,163 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /sbin/route /usr/local/sbin/apinger
- pfSense_MODULE: routing
-
*/
+
require_once("config.inc");
require_once("rrd.inc");
-/* Returns an array of default values used for apinger.conf */
-function return_apinger_defaults() {
+/* Returns an array of default values used for dpinger */
+function return_dpinger_defaults() {
return array(
"latencylow" => "200",
"latencyhigh" => "500",
"losslow" => "10",
"losshigh" => "20",
- "interval" => "1",
- "down" => "10",
- "avg_delay_samples" => "10",
- "avg_loss_samples" => "50",
- "avg_loss_delay_samples" => "20");
+ "interval" => "250",
+ "loss_interval" => "1000",
+ "time_period" => "25000",
+ "alert_interval" => "1000");
}
-/*
- * Creates monitoring configuration file and
- * adds appropriate static routes.
- */
-function setup_gateways_monitor() {
- global $config, $g;
+function running_dpinger_processes() {
+ global $g;
- $gateways_arr = return_gateways_array();
- if (!is_array($gateways_arr)) {
- log_error("No gateways to monitor. Apinger will not be run.");
- killbypid("{$g['varrun_path']}/apinger.pid");
- @unlink("{$g['varrun_path']}/apinger.status");
- return;
- }
+ $pidfiles = glob("{$g['varrun_path']}/dpinger_*.pid");
- $apinger_debug = "";
- if (isset($config['system']['apinger_debug'])) {
- $apinger_debug = "debug on";
+ $result = array();
+ if ($pidfiles === FALSE) {
+ return $result;
}
- $apinger_default = return_apinger_defaults();
- $apingerconfig = <<<EOD
-
-# pfSense apinger configuration file. Automatically Generated!
-
-{$apinger_debug}
-
-## User and group the pinger should run as
-user "root"
-group "wheel"
-
-## Mailer to use (default: "/usr/lib/sendmail -t")
-#mailer "/var/qmail/bin/qmail-inject"
-
-## Location of the pid-file (default: "/var/run/apinger.pid")
-pid_file "{$g['varrun_path']}/apinger.pid"
-
-## Format of timestamp (%s macro) (default: "%b %d %H:%M:%S")
-#timestamp_format "%Y%m%d%H%M%S"
+ foreach ($pidfiles as $pidfile) {
+ if (preg_match('/^dpinger_(.+)_([^_]+)_([^_]+)\.pid$/',
+ basename($pidfile), $matches)) {
+ $socket_file = preg_replace('/\.pid$/', '.sock',
+ $pidfile);
+ $result[$matches[1]] = array(
+ 'srcip' => $matches[2],
+ 'targetip' => $matches[3],
+ 'pidfile' => $pidfile,
+ 'socket' => $socket_file
+ );
+ unset($gwinfo);
+ }
+ }
-status {
- ## File where the status information should be written to
- file "{$g['varrun_path']}/apinger.status"
- ## Interval between file updates
- ## when 0 or not set, file is written only when SIGUSR1 is received
- interval 5s
+ return $result;
}
-########################################
-# RRDTool status gathering configuration
-# Interval between RRD updates
-rrd interval 60s;
-
-## These parameters can be overridden in a specific alarm configuration
-alarm default {
- command on "/usr/local/sbin/pfSctl -c 'service reload dyndns %T' -c 'service reload ipsecdns' -c 'service reload openvpn %T' -c 'filter reload' "
- command off "/usr/local/sbin/pfSctl -c 'service reload dyndns %T' -c 'service reload ipsecdns' -c 'service reload openvpn %T' -c 'filter reload' "
- combine 10s
-}
+/*
+ * Stop one or more dpinger process
+ * default parameter $gwname is '*' that will kill all running sessions
+ * If a gateway name is passed, only this one will be killed
+ */
+function stop_dpinger($gwname = '') {
+ global $g;
-## "Down" alarm definition.
-## This alarm will be fired when target doesn't respond for 30 seconds.
-alarm down "down" {
- time {$apinger_default['down']}s
-}
+ $running_processes = running_dpinger_processes();
-## "Delay" alarm definition.
-## This alarm will be fired when responses are delayed more than 200ms
-## it will be canceled, when the delay drops below 100ms
-alarm delay "delay" {
- delay_low {$apinger_default['latencylow']}ms
- delay_high {$apinger_default['latencyhigh']}ms
-}
+ foreach ($running_processes as $running_gwname => $process) {
+ if ($gwname != '' && $running_gwname != $gwname) {
+ continue;
+ }
-## "Loss" alarm definition.
-## This alarm will be fired when packet loss goes over 20%
-## it will be canceled, when the loss drops below 10%
-alarm loss "loss" {
- percent_low {$apinger_default['losslow']}
- percent_high {$apinger_default['losshigh']}
+ if (isvalidpid($process['pidfile'])) {
+ killbypid($process['pidfile']);
+ } else {
+ @unlink($process['pidfile']);
+ }
+ }
}
-target default {
- ## How often the probe should be sent
- interval {$apinger_default['interval']}s
-
- ## How many replies should be used to compute average delay
- ## for controlling "delay" alarms
- avg_delay_samples {$apinger_default['avg_delay_samples']}
-
- ## How many probes should be used to compute average loss
- avg_loss_samples {$apinger_default['avg_loss_samples']}
+function start_dpinger($gateway) {
+ global $g;
- ## The delay (in samples) after which loss is computed
- ## without this delays larger than interval would be treated as loss
- avg_loss_delay_samples {$apinger_default['avg_loss_delay_samples']}
-
- ## Names of the alarms that may be generated for the target
- alarms "down","delay","loss"
+ if (!isset($gateway['gwifip'])) {
+ return;
+ }
- ## Location of the RRD
- #rrd file "{$g['vardb_path']}/rrd/apinger-%t.rrd"
+ $dpinger_defaults = return_dpinger_defaults();
+
+ $pidfile = "{$g['varrun_path']}/dpinger_{$gateway['name']}_" .
+ "{$gateway['gwifip']}_{$gateway['monitor']}.pid";
+ $socket = "{$g['varrun_path']}/dpinger_{$gateway['name']}_" .
+ "{$gateway['gwifip']}_{$gateway['monitor']}.sock";
+ $alarm_cmd = "{$g['etc_path']}/rc.gateway_alarm";
+
+ $params = "-S "; /* Log warnings via syslog */
+ $params .= "-r 0 "; /* Disable unused reporting thread */
+ $params .= "-i {$gateway['name']} "; /* Identifier */
+ $params .= "-B {$gateway['gwifip']} "; /* Bind src address */
+ $params .= "-p {$pidfile} "; /* PID filename */
+ $params .= "-u {$socket} "; /* Status Socket */
+ $params .= "-C \"{$alarm_cmd}\" "; /* Command to run on alarm */
+
+ $params .= "-s " .
+ (isset($gateway['interval']) && is_numeric($gateway['interval'])
+ ? $gateway['interval']
+ : $dpinger_defaults['interval']
+ ) . " ";
+
+ $params .= "-l " .
+ (isset($gateway['loss_interval']) && is_numeric($gateway['loss_interval'])
+ ? $gateway['loss_interval']
+ : $dpinger_defaults['loss_interval']
+ ) . " ";
+
+ $params .= "-t " .
+ (isset($gateway['time_period']) && is_numeric($gateway['time_period'])
+ ? $gateway['time_period']
+ : $dpinger_defaults['time_period']
+ ) . " ";
+
+ $params .= "-A " .
+ (isset($gateway['alert_interval']) && is_numeric($gateway['alert_interval'])
+ ? $gateway['alert_interval']
+ : $dpinger_defaults['alert_interval']
+ ) . " ";
+
+ $params .= "-D " .
+ (isset($gateway['latencyhigh']) && is_numeric($gateway['latencyhigh'])
+ ? $gateway['latencyhigh']
+ : $dpinger_defaults['latencyhigh']
+ ) . " ";
+
+ $params .= "-L " .
+ (isset($gateway['losshigh']) && is_numeric($gateway['losshigh'])
+ ? $gateway['losshigh']
+ : $dpinger_defaults['losshigh']
+ ) . " ";
+
+ /* Make sure we don't end up with 2 process for the same GW */
+ stop_dpinger($gateway['name']);
+
+ /* Redirect stdout to /dev/null to avoid exec() to wait for dpinger */
+ return mwexec("/usr/local/bin/dpinger {$params} {$gateway['monitor']} >/dev/null");
}
-EOD;
+/*
+ * Starts dpinger processes and adds appropriate static routes for monitor IPs
+ */
+function setup_gateways_monitor() {
+ global $config, $g;
+
+ $gateways_arr = return_gateways_array();
+ if (!is_array($gateways_arr)) {
+ log_error("No gateways to monitor. dpinger will not run.");
+ stop_dpinger();
+ return;
+ }
$monitor_ips = array();
- foreach ($gateways_arr as $name => $gateway) {
+ foreach ($gateways_arr as $gwname => $gateway) {
/* Do not monitor if such was requested */
if (isset($gateway['monitor_disable'])) {
continue;
}
if (empty($gateway['monitor']) || !is_ipaddr($gateway['monitor'])) {
if (is_ipaddr($gateway['gateway'])) {
- $gateway['monitor'] = $gateway['gateway'];
+ $gateways_arr[$gwname]['monitor'] = $gateway['gateway'];
} else { /* No chance to get an ip to monitor skip target. */
continue;
}
@@ -172,9 +192,9 @@ EOD;
continue;
}
- /* Interface ip is needed since apinger will bind a socket to it.
+ /* Interface ip is needed since dpinger will bind a socket to it.
* However the config GUI should already have checked this and when
- * PPoE is used the IP address is set to "dynamic". So using is_ipaddrv4
+ * PPPoE is used the IP address is set to "dynamic". So using is_ipaddrv4
* or is_ipaddrv6 to identify packet type would be wrong, especially as
* further checks (that can cope with the "dynamic" case) are present inside
* the if block. So using $gateway['ipprotocol'] is the better option.
@@ -208,33 +228,25 @@ EOD;
pfSense_kill_states("0.0.0.0/0", $gateway['monitor'], $gateway['interface'], "icmp");
}
} else if ($gateway['ipprotocol'] == "inet6") { // This is an IPv6 gateway...
- if ($gateway['monitor'] == $gateway['gateway']) {
- /* link locals really need a different src ip */
- if (is_linklocal($gateway['gateway'])) {
- if (!strpos($gateway['gateway'], '%')) {
- $gateway['gateway'] .= '%' . $gateway['interface'];
- }
- $gwifip = find_interface_ipv6_ll($gateway['interface'], true);
- } else {
- $gwifip = find_interface_ipv6($gateway['interface'], true);
+ if (is_linklocal($gateway['gateway']) &&
+ get_ll_scope($gateway['gateway']) == '') {
+ $gateways_arr[$gwname]['gateway'] .= '%' . $gateway['interface'];
+ }
+
+ if (is_linklocal($gateway['monitor'])) {
+ if (get_ll_scope($gateway['monitor']) == '') {
+ $gateways_arr[$gwname]['monitor'] .= '%' . $gateway['interface'];
+ }
+
+ $gwifip = find_interface_ipv6_ll($gateway['interface'], true);
+
+ if (get_ll_scope($gwifip) == '') {
+ $gwifip .= '%' . $gateway['interface'];
}
} else {
- /* 'monitor' has been set, so makes sure it has precedence over
- * 'gateway' in defining the source IP. Otherwise if 'gateway'
- * is a local link and 'monitor' is global routable then the
- * ICMP6 response would not find its way back home...
- */
$gwifip = find_interface_ipv6($gateway['interface'], true);
}
- /* Make sure srcip and target have scope defined when they are ll */
- if (is_linklocal($gwifip) && !strpos($gwifip, '%')) {
- $gwifip .= '%' . $gateway['interface'];
- }
- if (is_linklocal($gateway['monitor']) && !strpos($gateway['monitor'], '%')) {
- $gateway['monitor'] .= "%{$gateway['interface']}";
- }
-
if (!is_ipaddrv6($gwifip)) {
continue; //Skip this target
}
@@ -262,176 +274,138 @@ EOD;
}
$monitor_ips[] = $gateway['monitor'];
- $apingercfg = "target \"{$gateway['monitor']}\" {\n";
- $apingercfg .= " description \"{$name}\"\n";
- $apingercfg .= " srcip \"{$gwifip}\"\n";
-
- ## How often the probe should be sent
- if (!empty($gateway['interval']) && is_numeric($gateway['interval'])) {
- $interval = intval($gateway['interval']); # Restrict to Integer
- if ($interval < 1) {
- $interval = 1; # Minimum
- }
- if ($interval != $apinger_default['interval']) { # If not default value
- $apingercfg .= " interval " . $interval . "s\n";
- }
- }
+ $gateways_arr[$gwname]['enable_dpinger'] = true;
+ $gateways_arr[$gwname]['gwifip'] = $gwifip;
+ }
- ## How many replies should be used to compute average delay
- ## for controlling "delay" alarms
- if (!empty($gateway['avg_delay_samples']) && is_numeric($gateway['avg_delay_samples'])) {
- $avg_delay_samples = intval($gateway['avg_delay_samples']); # Restrict to Integer
- if ($avg_delay_samples < 1) {
- $avg_delay_samples = 1; # Minimum
- }
- if ($avg_delay_samples != $apinger_default['avg_delay_samples']) { # If not default value
- $apingercfg .= " avg_delay_samples " . $avg_delay_samples . "\n";
- }
- }
+ stop_dpinger();
- ## How many probes should be used to compute average loss
- if (!empty($gateway['avg_loss_samples']) && is_numeric($gateway['avg_loss_samples'])) {
- $avg_loss_samples = intval($gateway['avg_loss_samples']); # Restrict to Integer
- if ($avg_loss_samples < 1) {
- $avg_loss_samples = 1; # Minimum
- }
- if ($avg_loss_samples != $apinger_default['avg_loss_samples']) { # If not default value
- $apingercfg .= " avg_loss_samples " . $avg_loss_samples . "\n";
- }
+ /* Start new processes */
+ foreach ($gateways_arr as $gateway) {
+ if (!isset($gateway['enable_dpinger'])) {
+ continue;
}
- ## The delay (in samples) after which loss is computed
- ## without this delays larger than interval would be treated as loss
- if (!empty($gateway['avg_loss_delay_samples']) && is_numeric($gateway['avg_loss_delay_samples'])) {
- $avg_loss_delay_samples = intval($gateway['avg_loss_delay_samples']); # Restrict to Integer
- if ($avg_loss_delay_samples < 1) {
- $avg_loss_delay_samples = 1; # Minimum
- }
- if ($avg_loss_delay_samples != $apinger_default['avg_loss_delay_samples']) { # If not default value
- $apingercfg .= " avg_loss_delay_samples " . $avg_loss_delay_samples . "\n";
- }
+ if (start_dpinger($gateway) != 0) {
+ log_error("Error starting gateway monitor for " .
+ $gateway['name']);
}
+ }
- $alarms = "";
- $alarmscfg = "";
- $override = false;
- if (!empty($gateway['losslow'])) {
- $alarmscfg .= "alarm loss \"{$name}loss\" {\n";
- $alarmscfg .= "\tpercent_low {$gateway['losslow']}\n";
- $alarmscfg .= "\tpercent_high {$gateway['losshigh']}\n";
- $alarmscfg .= "}\n";
- $alarms .= "\"{$name}loss\"";
- $override = true;
- } else {
- if ($override == true) {
- $alarms .= ",";
- }
- $alarms .= "\"loss\"";
- $override = true;
- }
- if (!empty($gateway['latencylow'])) {
- $alarmscfg .= "alarm delay \"{$name}delay\" {\n";
- $alarmscfg .= "\tdelay_low {$gateway['latencylow']}ms\n";
- $alarmscfg .= "\tdelay_high {$gateway['latencyhigh']}ms\n";
- $alarmscfg .= "}\n";
- if ($override == true) {
- $alarms .= ",";
- }
- $alarms .= "\"{$name}delay\"";
- $override = true;
- } else {
- if ($override == true) {
- $alarms .= ",";
- }
- $alarms .= "\"delay\"";
- $override = true;
- }
- if (!empty($gateway['down'])) {
- $alarmscfg .= "alarm down \"{$name}down\" {\n";
- $alarmscfg .= "\ttime {$gateway['down']}s\n";
- $alarmscfg .= "}\n";
- if ($override == true) {
- $alarms .= ",";
- }
- $alarms .= "\"{$name}down\"";
- $override = true;
- } else {
- if ($override == true) {
- $alarms .= ",";
- }
- $alarms .= "\"down\"";
- $override = true;
- }
- if ($override == true) {
- $apingercfg .= "\talarms override {$alarms};\n";
- }
+ return;
+}
- if (isset($gateway['force_down'])) {
- $apingercfg .= "\tforce_down on\n";
- }
+function get_dpinger_status($gwname) {
+ global $g;
- $apingercfg .= " rrd file \"{$g['vardb_path']}/rrd/{$gateway['name']}-quality.rrd\"\n";
- $apingercfg .= "}\n";
- $apingercfg .= "\n";
+ $running_processes = running_dpinger_processes();
- $apingerconfig .= $alarmscfg;
- $apingerconfig .= $apingercfg;
+ if (!isset($running_processes[$gwname])) {
+ log_error("dpinger: No dpinger session running for gateway {$gwname}");
+ return false;
+ }
- # Create gateway quality RRD with settings more suitable for pfSense graph set,
- # since apinger uses default step (300; 5 minutes) and other settings that don't
- # match the pfSense gateway quality graph set.
- create_gateway_quality_rrd("{$g['vardb_path']}/rrd/{$gateway['name']}-quality.rrd");
+ $proc = $running_processes[$gwname];
+ unset($running_processes);
+
+ if (!file_exists($proc['socket'])) {
+ log_error("dpinger: status socket {$proc['socket']} not found");
+ return false;
}
- @file_put_contents("{$g['varetc_path']}/apinger.conf", $apingerconfig);
- unset($apingerconfig);
- /* Restart apinger process */
- if (isvalidpid("{$g['varrun_path']}/apinger.pid")) {
- sigkillbypid("{$g['varrun_path']}/apinger.pid", "HUP");
- } else {
- /* start a new apinger process */
- @unlink("{$g['varrun_path']}/apinger.status");
- sleep(1);
- mwexec_bg("/usr/local/sbin/apinger -c {$g['varetc_path']}/apinger.conf");
- sleep(1);
- sigkillbypid("{$g['varrun_path']}/apinger.pid", "USR1");
+ $fp = stream_socket_client("unix://{$proc['socket']}", $errno, $errstr, 10);
+ if (!$fp) {
+ log_error("dpinger: cannot connect to status socket {$proc['socket']} - $errstr ($errno)");
+ return false;
}
- return 0;
-}
+ $status = '';
+ while (!feof($fp)) {
+ $status .= fgets($fp, 1024);
+ }
+ fclose($fp);
-/* return the status of the apinger targets as a array */
-function return_gateways_status($byname = false) {
- global $config, $g;
+ $r = array();
+ list(
+ $r['gwname'],
+ $r['latency_avg'],
+ $r['latency_stddev'],
+ $r['loss']
+ ) = explode(' ', preg_replace('/\n/', '', $status));
+
+ $r['srcip'] = $proc['srcip'];
+ $r['targetip'] = $proc['targetip'];
- $apingerstatus = array();
- /* Always get the latest status from apinger */
- if (file_exists("{$g['varrun_path']}/apinger.pid")) {
- sigkillbypid("{$g['varrun_path']}/apinger.pid", "USR1");
+ $gateways_arr = return_gateways_array();
+ unset($gw);
+ if (isset($gateways_arr[$gwname])) {
+ $gw = $gateways_arr[$gwname];
}
- if (file_exists("{$g['varrun_path']}/apinger.status")) {
- $apingerstatus = file("{$g['varrun_path']}/apinger.status");
- } else {
- $apingerstatus = array();
+
+ $r['latency_avg'] = round($r['latency_avg']/1000, 3);
+ $r['latency_stddev'] = round($r['latency_stddev']/1000, 3);
+
+ $r['status'] = "none";
+ if (isset($gw) && isset($gw['force_down'])) {
+ $r['status'] = "force_down";
+ } else if (isset($gw)) {
+ $settings = return_dpinger_defaults();
+
+ $keys = array(
+ 'latencylow',
+ 'latencyhigh',
+ 'losslow',
+ 'losshigh'
+ );
+
+ /* Replace default values by user-defined */
+ foreach ($keys as $key) {
+ if (isset($gw[$key]) && is_numeric($gw[$key])) {
+ $settings[$key] = $gw[$key];
+ }
+ }
+
+ if ($r['latency_avg'] > $settings['latencyhigh'] ||
+ $r['loss'] > $settings['losshigh']) {
+ $r['status'] = "down";
+ } else if ($r['latency_avg'] > $settings['latencylow']) {
+ $r['status'] = "delay";
+ } else if ($r['loss'] > $settings['losslow']) {
+ $r['status'] = "loss";
+ }
}
+ return $r;
+}
+
+/* return the status of the dpinger targets as an array */
+function return_gateways_status($byname = false) {
+ global $config, $g;
+
+ $dpinger_gws = running_dpinger_processes();
$status = array();
- foreach ($apingerstatus as $line) {
- $info = explode("|", $line);
+
+ $gateways_arr = return_gateways_array();
+
+ foreach ($dpinger_gws as $gwname => $gwdata) {
+ $dpinger_status = get_dpinger_status($gwname);
+ if ($dpinger_status === false) {
+ continue;
+ }
+
if ($byname == false) {
- $target = $info[0];
+ $target = $dpinger_status['targetip'];
} else {
- $target = $info[2];
+ $target = $gwname;
}
$status[$target] = array();
- $status[$target]['monitorip'] = $info[0];
- $status[$target]['srcip'] = $info[1];
- $status[$target]['name'] = $info[2];
- $status[$target]['lastcheck'] = $info[5] ? date('r', $info[5]) : date('r');
- $status[$target]['delay'] = empty($info[6]) ? "0ms" : round($info[6], 1) ."ms" ;
- $status[$target]['loss'] = empty($info[7]) ? "0.0%" : round($info[7], 1) . "%";
- $status[$target]['status'] = trim($info[8]);
+ $status[$target]['monitorip'] = $dpinger_status['targetip'];
+ $status[$target]['srcip'] = $dpinger_status['srcip'];
+ $status[$target]['name'] = $gwname;
+ $status[$target]['delay'] = empty($dpinger_status['latency_avg']) ? "0ms" : $dpinger_status['latency_avg'] . "ms";
+ $status[$target]['loss'] = empty($dpinger_status['loss']) ? "0.0%" : round($dpinger_status['loss'], 1) . "%";
+ $status[$target]['status'] = $dpinger_status['status'];
}
/* tack on any gateways that have monitoring disabled
@@ -441,7 +415,7 @@ function return_gateways_status($byname = false) {
if (!isset($gwitem['monitor_disable'])) {
continue;
}
- if (!is_ipaddr($gwitem['monitorip'])) {
+ if (!is_ipaddr($gwitem['monitor'])) {
$realif = $gwitem['interface'];
$tgtip = get_interface_gateway($realif);
if (!is_ipaddr($tgtip)) {
@@ -449,7 +423,7 @@ function return_gateways_status($byname = false) {
}
$srcip = find_interface_ip($realif);
} else {
- $tgtip = $gwitem['monitorip'];
+ $tgtip = $gwitem['monitor'];
$srcip = find_interface_ip($realif);
}
if ($byname == true) {
@@ -462,7 +436,6 @@ function return_gateways_status($byname = false) {
if ($target == "none") {
$target = $gwitem['name'];
$status[$target]['name'] = $gwitem['name'];
- $status[$target]['lastcheck'] = date('r');
$status[$target]['delay'] = "0.0ms";
$status[$target]['loss'] = "100.0%";
$status[$target]['status'] = "down";
@@ -470,7 +443,6 @@ function return_gateways_status($byname = false) {
$status[$target]['monitorip'] = $tgtip;
$status[$target]['srcip'] = $srcip;
$status[$target]['name'] = $gwitem['name'];
- $status[$target]['lastcheck'] = date('r');
$status[$target]['delay'] = "0.0ms";
$status[$target]['loss'] = "0.0%";
$status[$target]['status'] = "none";
@@ -1249,4 +1221,4 @@ function gateway_is_gwgroup_member($name) {
return $members;
}
-?> \ No newline at end of file
+?>
diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc
index 8adadc0..49fd2ca 100644
--- a/src/etc/inc/interfaces.inc
+++ b/src/etc/inc/interfaces.inc
@@ -33,12 +33,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /sbin/dhclient /bin/sh /usr/bin/grep /usr/bin/xargs /usr/bin/awk /usr/local/sbin/choparp
- pfSense_BUILDER_BINARIES: /sbin/ifconfig /sbin/route /usr/sbin/ngctl /usr/sbin/arp /bin/kill /usr/local/sbin/mpd5
- pfSense_BUILDER_BINARIES: /usr/local/sbin/dhcp6c
- pfSense_MODULE: interfaces
-
*/
/* include all configuration functions */
@@ -228,28 +222,29 @@ function interface_vlan_configure(&$vlan) {
return;
}
$if = $vlan['if'];
- $vlanif = empty($vlan['vlanif']) ? "{$if}_vlan{$vlan['tag']}" : $vlan['vlanif'];
- $tag = $vlan['tag'];
-
if (empty($if)) {
log_error(gettext("interface_vlan_configure called with if undefined."));
return;
}
+ $vlanif = empty($vlan['vlanif']) ? "{$if}_vlan{$vlan['tag']}" : $vlan['vlanif'];
+ $tag = $vlan['tag'];
+ $pcp = empty($vlan['pcp']) ? 0 : $vlan['pcp']; /* Apply "Best Effort" if not set */
+
/* make sure the parent interface is up */
interfaces_bring_up($if);
/* Since we are going to add vlan(4) try to enable all that hardware supports. */
pfSense_interface_capabilities($if, IFCAP_VLAN_HWTAGGING|IFCAP_VLAN_MTU|IFCAP_VLAN_HWFILTER);
if (!empty($vlanif) && does_interface_exist($vlanif)) {
- interface_bring_down($vlanif, true);
- } else {
- $tmpvlanif = pfSense_interface_create("vlan");
- pfSense_interface_rename($tmpvlanif, $vlanif);
- pfSense_ngctl_name("{$tmpvlanif}:", $vlanif);
+ pfSense_interface_destroy($vlanif);
}
- pfSense_vlan_create($vlanif, $if, $tag);
+ $tmpvlanif = pfSense_interface_create("vlan");
+ pfSense_interface_rename($tmpvlanif, $vlanif);
+ pfSense_ngctl_name("{$tmpvlanif}:", $vlanif);
+
+ pfSense_vlan_create($vlanif, $if, $tag, $pcp);
interfaces_bring_up($vlanif);
@@ -807,6 +802,7 @@ function interface_gre_configure(&$gre, $grekey = "") {
$realif = get_real_interface($gre['if']);
$realifip = get_interface_ip($gre['if']);
+ $realifip6 = get_interface_ipv6($gre['if']);
/* make sure the parent interface is up */
interfaces_bring_up($realif);
@@ -820,7 +816,11 @@ function interface_gre_configure(&$gre, $grekey = "") {
}
/* Do not change the order here for more see gre(4) NOTES section. */
- mwexec("/sbin/ifconfig {$greif} tunnel {$realifip} " . escapeshellarg($gre['remote-addr']));
+ if (is_ipaddrv6($gre['remote-addr'])) {
+ mwexec("/sbin/ifconfig {$greif} inet6 tunnel {$realifip6} " . escapeshellarg($gre['remote-addr']));
+ } else {
+ mwexec("/sbin/ifconfig {$greif} tunnel {$realifip} " . escapeshellarg($gre['remote-addr']));
+ }
if ((is_ipaddrv6($gre['tunnel-local-addr'])) || (is_ipaddrv6($gre['tunnel-remote-addr']))) {
/* XXX: The prefixlen argument for tunnels of ipv6 is useless since it needs to be 128 as enforced by kernel */
//mwexec("/sbin/ifconfig {$greif} inet6 " . escapeshellarg($gre['tunnel-local-addr']) . " " . escapeshellarg($gre['tunnel-remote-addr']) . " prefixlen /" . escapeshellarg($gre['tunnel-remote-net']));
@@ -936,7 +936,11 @@ function interface_gif_configure(&$gif, $gifkey = "") {
}
/* Do not change the order here for more see gif(4) NOTES section. */
- mwexec("/sbin/ifconfig {$gifif} tunnel {$realifip} " . escapeshellarg($gif['remote-addr']));
+ if (is_ipaddrv6($gif['remote-addr'])) {
+ mwexec("/sbin/ifconfig {$gifif} inet6 tunnel {$realifip} " . escapeshellarg($gif['remote-addr']));
+ } else {
+ mwexec("/sbin/ifconfig {$gifif} tunnel {$realifip} " . escapeshellarg($gif['remote-addr']));
+ }
if ((is_ipaddrv6($gif['tunnel-local-addr'])) || (is_ipaddrv6($gif['tunnel-remote-addr']))) {
/* XXX: The prefixlen argument for tunnels of ipv6 is useless since it needs to be 128 as enforced by kernel */
//mwexec("/sbin/ifconfig {$gifif} inet6 " . escapeshellarg($gif['tunnel-local-addr']) . " " . escapeshellarg($gif['tunnel-remote-addr']) . " prefixlen /" . escapeshellarg($gif['tunnel-remote-net']));
@@ -1621,7 +1625,7 @@ function interface_ppps_configure($interface) {
interfaces_bring_up($port);
pfSense_ngctl_attach(".", $port);
/* Enable setautosrc to automatically change mac address if parent interface's changes */
- mwexec("ngctl msg {$port}: setautosrc 1");
+ mwexec("/usr/sbin/ngctl msg {$port}: setautosrc 1");
break;
case "pptp":
case "l2tp":
@@ -2019,8 +2023,8 @@ EOD;
/* we only support the 3gstats.php for huawei modems for now. Will add more later. */
/* We should be able to launch the right version for each modem */
/* We can also guess the mondev from the manufacturer */
- exec("usbconfig | egrep -ie '(huawei)'", $usbmodemoutput);
- mwexec("/bin/ps auxww|grep \"{$interface}\" |grep \"[3]gstats\" | awk '{print $2}' |xargs kill");
+ exec("/usr/sbin/usbconfig | /usr/bin/egrep -ie '(huawei)'", $usbmodemoutput);
+ mwexec("/bin/ps auxww | /usr/bin/grep \"{$interface}\" | /usr/bin/grep \"[3]gstats\" | /usr/bin/awk '{print $2}' | /usr/bin/xargs kill");
foreach ($ports as $port) {
if (preg_match("/huawei/i", implode("\n", $usbmodemoutput))) {
$mondev = substr(basename($port), 0, -1);
@@ -2653,29 +2657,8 @@ function interface_wireless_configure($if, &$wl, &$wlcfg) {
$wlcmd[] = "-wme";
}
- /* set up wep if enabled */
- $wepset = "";
- if (isset($wlcfg['wep']['enable']) && is_array($wlcfg['wep']['key'])) {
- switch ($wlcfg['wpa']['auth_algs']) {
- case "1":
- $wepset .= "authmode open wepmode on ";
- break;
- case "2":
- $wepset .= "authmode shared wepmode on ";
- break;
- case "3":
- $wepset .= "authmode mixed wepmode on ";
- }
- $i = 1;
- foreach ($wlcfg['wep']['key'] as $wepkey) {
- $wepset .= "wepkey " . escapeshellarg("{$i}:{$wepkey['value']}") . " ";
- if (isset($wepkey['txkey'])) {
- $wlcmd[] = "weptxkey {$i} ";
- }
- $i++;
- }
- $wlcmd[] = $wepset;
- } else if (isset($wlcfg['wpa']['enable'])) {
+ /* Enable wpa if it's configured. No WEP support anymore. */
+ if (isset($wlcfg['wpa']['enable'])) {
$wlcmd[] = "authmode wpa wepmode off ";
} else {
$wlcmd[] = "authmode open wepmode off ";
@@ -2732,7 +2715,6 @@ ctrl_interface_group=wheel
#macaddr_acl={$wlcfg['wpa']['macaddr_acl']}
ssid={$wlcfg['ssid']}
debug={$wlcfg['wpa']['debug_mode']}
-auth_algs={$wlcfg['wpa']['auth_algs']}
wpa={$wlcfg['wpa']['wpa_mode']}
wpa_key_mgmt={$wlcfg['wpa']['wpa_key_mgmt']}
wpa_pairwise={$wlcfg['wpa']['wpa_pairwise']}
@@ -3294,57 +3276,55 @@ function interface_configure($interface = "wan", $reloadall = false, $linkupeven
}
}
- // Limit the MTU to 1500 if no explicit MTU configured
- if ($wantedmtu == 0 && get_interface_mtu($mtuif) > 1500) {
- $wantedmtu = 1500;
+ // Set the MTU to 1500 if no explicit MTU configured
+ if ($wantedmtu == 0) {
+ $wantedmtu = 1500; /* Default */
}
- if ($wantedmtu != 0) {
- if (stristr($mtuif, "_vlan")) {
- $assignedparent = convert_real_interface_to_friendly_interface_name($mtuhwif);
- if (!empty($assignedparent) && !empty($config['interfaces'][$assignedparent]['mtu'])) {
- $parentmtu = $config['interfaces'][$assignedparent]['mtu'];
- if ($wancfg['mtu'] > $parentmtu) {
- log_error("There is a conflict on MTU between parent {$mtuhwif} and VLAN({$mtuif})");
- }
- } else {
- $parentmtu = 0;
+ if (stristr($mtuif, "_vlan")) {
+ $assignedparent = convert_real_interface_to_friendly_interface_name($mtuhwif);
+ if (!empty($assignedparent) && !empty($config['interfaces'][$assignedparent]['mtu'])) {
+ $parentmtu = $config['interfaces'][$assignedparent]['mtu'];
+ if ($wancfg['mtu'] > $parentmtu) {
+ log_error("There is a conflict on MTU between parent {$mtuhwif} and VLAN({$mtuif})");
}
+ } else {
+ $parentmtu = 0;
+ }
- $parentmtu = interface_vlan_mtu_configured($mtuhwif, $parentmtu);
+ $parentmtu = interface_vlan_mtu_configured($mtuhwif, $parentmtu);
- if (get_interface_mtu($mtuhwif) != $parentmtu) {
- pfSense_interface_mtu($mtuhwif, $parentmtu);
- }
+ if (get_interface_mtu($mtuhwif) != $parentmtu) {
+ pfSense_interface_mtu($mtuhwif, $parentmtu);
+ }
- /* All vlans need to use the same mtu value as their parent. */
- interface_vlan_adapt_mtu(link_interface_to_vlans($mtuhwif), $parentmtu);
- } else if (substr($mtuif, 0, 4) == 'lagg') {
- /* LAGG interface must be destroyed and re-created to change MTU */
- if ($wantedmtu != get_interface_mtu($mtuif)) {
- if (isset($config['laggs']['lagg']) && is_array($config['laggs']['lagg'])) {
- foreach ($config['laggs']['lagg'] as $lagg) {
- if ($lagg['laggif'] == $mtuif) {
- interface_lagg_configure($lagg);
- break;
- }
+ /* All vlans need to use the same mtu value as their parent. */
+ interface_vlan_adapt_mtu(link_interface_to_vlans($mtuhwif), $parentmtu);
+ } else if (substr($mtuif, 0, 4) == 'lagg') {
+ /* LAGG interface must be destroyed and re-created to change MTU */
+ if ($wantedmtu != get_interface_mtu($mtuif)) {
+ if (isset($config['laggs']['lagg']) && is_array($config['laggs']['lagg'])) {
+ foreach ($config['laggs']['lagg'] as $lagg) {
+ if ($lagg['laggif'] == $mtuif) {
+ interface_lagg_configure($lagg);
+ break;
}
}
}
- } else {
- if ($wantedmtu != get_interface_mtu($mtuif)) {
- pfSense_interface_mtu($mtuif, $wantedmtu);
- }
+ }
+ } else {
+ if ($wantedmtu != get_interface_mtu($mtuif)) {
+ pfSense_interface_mtu($mtuif, $wantedmtu);
+ }
- /* This case is needed when the parent of vlans is being configured */
- $vlans = link_interface_to_vlans($mtuif);
- if (is_array($vlans)) {
- interface_vlan_adapt_mtu($vlans, $wantedmtu);
- }
- unset($vlans);
+ /* This case is needed when the parent of vlans is being configured */
+ $vlans = link_interface_to_vlans($mtuif);
+ if (is_array($vlans)) {
+ interface_vlan_adapt_mtu($vlans, $wantedmtu);
}
- /* XXX: What about gre/gif/.. ? */
+ unset($vlans);
}
+ /* XXX: What about gre/gif/.. ? */
switch ($wancfg['ipaddr']) {
case 'dhcp':
@@ -4473,7 +4453,7 @@ function convert_real_interface_to_friendly_interface_name($interface = "wan", $
if (stripos($interface, "_vip")) {
foreach ($config['virtualip']['vip'] as $counter => $vip) {
if ($vip['mode'] == "carp") {
- if ($interface == "{$vip['interface']}_vip{$vip['vhid']}") {
+ if ($interface == "_vip{$vip['uniqid']}") {
return $vip['interface'];
}
}
@@ -4546,7 +4526,7 @@ function convert_friendly_interface_to_friendly_descr($interface) {
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $counter => $vip) {
if ($vip['mode'] == "carp") {
- if ($interface == "{$vip['interface']}_vip{$vip['vhid']}") {
+ if ($interface == "_vip{$vip['uniqid']}") {
return "{$vip['subnet']} - {$vip['descr']}";
}
}
@@ -4706,6 +4686,7 @@ function get_real_interface($interface = "wan", $family = "all", $realv6iface =
case "openvpn":
$wanif = "openvpn";
break;
+ case "IPsec":
case "ipsec":
case "enc0":
$wanif = "enc0";
@@ -4715,7 +4696,7 @@ function get_real_interface($interface = "wan", $family = "all", $realv6iface =
break;
default:
if (substr($interface, 0, 4) == '_vip') {
- $wanif = get_configured_carp_interface_list($interface, '', 'iface');
+ $wanif = get_configured_carp_interface_list($interface, $family, 'iface');
if (!empty($wanif)) {
$wanif = get_real_interface($wanif, $family);
}
@@ -4899,7 +4880,7 @@ function find_virtual_ip_alias($ip, $bits = null) {
* find_number_of_created_carp_interfaces: return the number of carp interfaces
*/
function find_number_of_created_carp_interfaces() {
- return `/sbin/ifconfig | grep "carp:" | wc -l`;
+ return `/sbin/ifconfig | /usr/bin/grep "carp:" | /usr/bin/wc -l`;
}
/*
@@ -5370,11 +5351,19 @@ function get_possible_listen_ips($include_ipv6_link_local=false) {
/* XXX: Maybe use array_merge below? */
$carplist = get_configured_carp_interface_list();
foreach ($carplist as $cif => $carpip) {
- $interfaces[$cif] = $carpip . ' (' . get_vip_descr($carpip) . ')';
+ if (get_vip_descr($carpip)) {
+ $interfaces[$cif] = $carpip . ' (' . get_vip_descr($carpip) . ')';
+ } else {
+ $interfaces[$cif] = $carpip;
+ }
}
$aliaslist = get_configured_ip_aliases_list();
foreach ($aliaslist as $aliasip => $aliasif) {
- $interfaces[$aliasip] = $aliasip . ' (' . get_vip_descr($aliasip) . ')';
+ if (get_vip_descr($aliasip)) {
+ $interfaces[$aliasip] = $aliasip . ' (' . get_vip_descr($aliasip) . ')';
+ } else {
+ $interfaces[$aliasip] = $aliasip;
+ }
}
$interfaces['lo0'] = 'Localhost';
@@ -5401,17 +5390,16 @@ function get_possible_traffic_source_addresses($include_ipv6_link_local=false) {
function get_interface_ip($interface = "wan") {
- $realif = get_failover_interface($interface);
+ $realif = get_failover_interface($interface, 'inet');
if (!$realif) {
return null;
}
- if (substr($realif, 0, 4) == '_vip') {
- return get_configured_carp_interface_list($realif, 'inet', 'ip');
- }
-
- if (strstr($realif, "_vip")) {
- return get_configured_carp_interface_list($realif);
+ if (substr($interface, 0, 4) == '_vip') {
+ return get_configured_carp_interface_list($interface, 'inet', 'ip');
+ } else if (substr($interface, 0, 5) == '_lloc') {
+ /* No link-local address for v4. */
+ return null;
}
$curip = find_interface_ip($realif);
@@ -5430,9 +5418,9 @@ function get_interface_ipv6($interface = "wan", $flush = false) {
return null;
}
- if (substr($realif, 0, 4) == '_vip') {
- return get_configured_carp_interface_list($realif, 'inet6', 'ip');
- } else if (substr($realif, 0, 5) == '_lloc') {
+ if (substr($interface, 0, 4) == '_vip') {
+ return get_configured_carp_interface_list($interface, 'inet6', 'ip');
+ } else if (substr($interface, 0, 5) == '_lloc') {
return get_interface_linklocal($interface);
}
diff --git a/src/etc/inc/ipsec.auth-user.php b/src/etc/inc/ipsec.auth-user.php
index 2589598..a504d11 100755
--- a/src/etc/inc/ipsec.auth-user.php
+++ b/src/etc/inc/ipsec.auth-user.php
@@ -31,10 +31,6 @@
*/
/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: openvpn
-*/
-/*
* ipsec calls this script to authenticate a user
* based on a username and password. We lookup these
* in our config.xml file and check the credentials.
@@ -123,13 +119,13 @@ if (($strictusercn === true) && ($common_name != $username)) {
$attributes = array();
foreach ($authmodes as $authmode) {
$authcfg = auth_get_authserver($authmode);
- if (!$authcfg && $authmode != "local") {
+ if (!$authcfg && $authmode != "Local Database") {
continue;
}
$authenticated = authenticate_user($username, $password, $authcfg, $attributes);
if ($authenticated == true) {
- if (stristr($authmode, "local")) {
+ if ($authmode == "Local Database") {
$user = getUserEntry($username);
if (!is_array($user) || !userHasPrivilege($user, "user-ipsec-xauth-dialin")) {
$authenticated = false;
diff --git a/src/etc/inc/ipsec.inc b/src/etc/inc/ipsec.inc
index 6654166..b1e8c19 100644
--- a/src/etc/inc/ipsec.inc
+++ b/src/etc/inc/ipsec.inc
@@ -28,10 +28,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /sbin/setkey /sbin/route
- pfSense_MODULE: ipsec
-
*/
/* IPsec defines */
@@ -42,6 +38,36 @@ $ipsec_loglevels = array("dmn" => "Daemon", "mgr" => "SA Manager", "ike" => "IKE
"imc" => "Integrity checker", "imv" => "Integrity Verifier", "pts" => "Platform Trust Service",
"tls" => "TLS handler", "esp" => "IPsec traffic", "lib" => "StrongSwan Lib");
+global $ipsec_log_sevs;
+$ipsec_log_sevs = array(
+ '-1' => 'Silent',
+ '0' => 'Audit',
+ '1' => 'Control',
+ '2' => 'Diag',
+ '3' => 'Raw',
+ '4' => 'Highest'
+);
+
+global $ipsec_log_cats;
+$ipsec_log_cats = array(
+ "dmn" => "Daemon",
+ "mgr" => "SA Manager",
+ "ike" => "IKE SA",
+ "chd" => "IKE Child SA",
+ "job" => "Job Processing",
+ "cfg" => "Configuration backend",
+ "knl" => "Kernel Interface",
+ "net" => "Networking",
+ "asn" => "ASN encoding",
+ "enc" => "Message encoding",
+ "imc" => "Integrity checker",
+ "imv" => "Integrity Verifier",
+ "pts" => "Platform Trust Service",
+ "tls" => "TLS handler",
+ "esp" => "IPsec traffic",
+ "lib" => "StrongSwan Lib"
+);
+
global $my_identifier_list;
$my_identifier_list = array(
'myaddress' => array('desc' => gettext('My IP address'), 'mobile' => true),
@@ -70,13 +96,9 @@ $ipsec_idhandling = array(
global $p1_ealgos;
$p1_ealgos = array(
'aes' => array('name' => 'AES', 'keysel' => array('lo' => 128, 'hi' => 256, 'step' => 64)),
- 'aes128gcm' => array('name' => 'AES128-GCM', 'keysel' => array('lo' => 64, 'hi' => 128, 'step' => 32)),
- 'aes192gcm' => array('name' => 'AES192-GCM', 'keysel' => array('lo' => 64, 'hi' => 128, 'step' => 32)),
- 'aes256gcm' => array('name' => 'AES256-GCM', 'keysel' => array('lo' => 64, 'hi' => 128, 'step' => 32)),
'blowfish' => array('name' => 'Blowfish', 'keysel' => array('lo' => 128, 'hi' => 256, 'step' => 64)),
'3des' => array('name' => '3DES'),
- 'cast128' => array('name' => 'CAST128'),
- 'des' => array('name' => 'DES'));
+ 'cast128' => array('name' => 'CAST128'));
global $p2_ealgos;
$p2_ealgos = array(
@@ -86,8 +108,7 @@ $p2_ealgos = array(
'aes256gcm' => array('name' => 'AES256-GCM', 'keysel' => array('lo' => 64, 'hi' => 128, 'step' => 32)),
'blowfish' => array('name' => 'Blowfish', 'keysel' => array('lo' => 128, 'hi' => 256, 'step' => 64)),
'3des' => array('name' => '3DES'),
- 'cast128' => array('name' => 'CAST128'),
- 'des' => array('name' => 'DES'));
+ 'cast128' => array('name' => 'CAST128'));
global $p1_halgos;
$p1_halgos = array(
@@ -177,6 +198,29 @@ $p2_pfskeygroups = array(
30 => '30 (brainpool ecp512)'
);
+function ipsec_enabled() {
+ global $config;
+
+ if (!isset($config['ipsec']) || !is_array($config['ipsec'])) {
+ return false;
+ }
+
+ /* Check if we have at least one phase 1 entry. */
+ if (!isset($config['ipsec']['phase1']) ||
+ !is_array($config['ipsec']['phase1']) ||
+ empty($config['ipsec']['phase1'])) {
+ return false;
+ }
+ /* Check if at least one phase 1 entry is enabled. */
+ foreach ($config['ipsec']['phase1'] as $phase1) {
+ if (!isset($phase1['disabled'])) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
/*
* ikeid management functions
*/
@@ -426,51 +470,16 @@ function ipsec_phase2_status(&$ipsec_status, &$phase2) {
return false;
}
-function ipsec_smp_dump_status() {
- global $config, $g, $custom_listtags;
-
- if (isset($config['ipsec']['enable'])) {
- if (!file_exists("{$g['varrun_path']}/charon.xml")) {
- log_error("IPsec daemon not running or has a problem!");
- return;
- }
- } else {
- return;
- }
-
- $fd = @fsockopen("unix://{$g['varrun_path']}/charon.xml");
- if (!$fd) {
- log_error("Could not read status from IPsec");
- return;
- }
- $query = '<?xml version="1.0"?><message xmlns="http://www.strongswan.org/smp/1.0" type="request" id="1">';
- $query .= '<query><ikesalist/></query></message>';
-
- @fwrite($fd, $query);
- $response = "";
- while (!strstr($sread, "</message>")) {
- $sread = fgets($fd);
- if ($sread === false) {
- break;
- }
- $response .= $sread;
- }
- fclose($fd);
+/*
+ * Wrapper to call pfSense_ipsec_list_sa() when IPsec is enabled
+ */
+function ipsec_list_sa() {
- if ($sread === false) {
- log_error("Error during reading of status from IPsec");
- return;
+ if (ipsec_enabled()) {
+ return pfSense_ipsec_list_sa();
}
- @file_put_contents("{$g['tmp_path']}/smp_status.xml", $response);
- unset($response, $sread);
-
- $custom_listtags = array('ikesa', 'childsa', 'network', 'auth');
- $response = parse_xml_config("{$g['tmp_path']}/smp_status.xml", "message");
- @unlink("{$g['tmp_path']}/smp_status.xml");
- unset($custom_listtags);
-
- return $response;
+ return array();
}
/*
@@ -584,24 +593,52 @@ function ipsec_dump_sad() {
* Return dump of mobile user list
*/
function ipsec_dump_mobile() {
- global $g, $custom_listtags;
+ global $g;
- $_gb = exec("/usr/local/sbin/ipsec stroke leases > {$g['tmp_path']}/strongswan_leases.xml");
+ $_gb = exec("/usr/local/sbin/ipsec leases 2>/dev/null", $output, $rc);
- if (!file_exists("{$g['tmp_path']}/strongswan_leases.xml")) {
+ if ($rc != 0) {
log_error(gettext("Unable to find IPsec daemon leases file. Could not display mobile user stats!"));
return array();
}
- /* This is needed for fixing #4130 */
- if (filesize("{$g['tmp_path']}/strongswan_leases.xml") < 200) {
- return array();
+ $response = array();
+ $id = -1;
+
+ /* Leases in pool '10.7.200.0/24', usage: 1/254, 1 online */
+ $lease_regex='/^Leases *in *pool *\'(?P<name>.+)\', *usage: *(?P<usage>\d+)\/(?P<size>\d+), *(?P<online>\d+) *online/';
+ /* 10.7.200.1 online 'jimp' */
+ $pool_regex='/\s*(?P<host>[\d\.]+)\s+(?P<status>online|offline)\s+\'(?P<id>.*)\'/';
+ /* no matching leases found */
+ $nopool_regex='/no *matching *leases *found/';
+
+ $lease=false;
+ foreach ($output as $line) {
+ if (preg_match($lease_regex, $line, $matches)) {
+ $id++;
+ $response['pool'][$id] = array(
+ 'name' => $matches['name'],
+ 'usage' => $matches['usage'],
+ 'size' => $matches['size'],
+ 'online' => $matches['online'],
+ );
+ $lease=true;
+ } else if ($lease) {
+ if (preg_match($nopool_regex, $line)) {
+ $response['pool'][$id]['lease'][] = array();
+ $lease=false;
+ } else if (preg_match($pool_regex, $line, $matches)) {
+ $response['pool'][$id]['lease'][] = array(
+ 'host' => $matches['host'],
+ 'status' => $matches['status'],
+ 'id' => $matches['id']
+ );
+ }
+ }
}
- $custom_listtags = array('lease', 'pool');
- $response = parse_xml_config("{$g['tmp_path']}/strongswan_leases.xml", "leases");
- @unlink("{$g['tmp_path']}/strongswan_leases.xml");
- unset($custom_listtags, $_gb);
+ unset($_gb, $lease, $output, $rc, $id, $lease_regex, $pool_regex,
+ $nopool_regex);
return $response;
}
diff --git a/src/etc/inc/itemid.inc b/src/etc/inc/itemid.inc
index c698cfa..1cbe34a 100644
--- a/src/etc/inc/itemid.inc
+++ b/src/etc/inc/itemid.inc
@@ -1,10 +1,6 @@
<?php
/*
- pfSense_MODULE: utils
-*/
-
-/*
Copyright (C) 2009 Janne Enberg <janne.enberg@lietu.net>
All rights reserved.
@@ -105,4 +101,4 @@ function get_unique_id() {
return uniqid("nat_", true);
}
-?> \ No newline at end of file
+?>
diff --git a/src/etc/inc/led.inc b/src/etc/inc/led.inc
index a08eef4..241d013 100644
--- a/src/etc/inc/led.inc
+++ b/src/etc/inc/led.inc
@@ -7,10 +7,6 @@
* LED control library that wraps around the functionality of led(4)
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/echo
- pfSense_MODULE: utils
-*/
$led_root = "/dev/led/led";
@@ -353,4 +349,4 @@ function char_to_morse($char) {
}
}
-?> \ No newline at end of file
+?>
diff --git a/src/etc/inc/meta.inc b/src/etc/inc/meta.inc
index ac8bdfc..28bf408 100644
--- a/src/etc/inc/meta.inc
+++ b/src/etc/inc/meta.inc
@@ -23,9 +23,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_MODULE: utils
-
*/
/*
diff --git a/src/etc/inc/notices.inc b/src/etc/inc/notices.inc
index 0a1657c..92f74a1 100644
--- a/src/etc/inc/notices.inc
+++ b/src/etc/inc/notices.inc
@@ -32,11 +32,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/echo
- pfSense_MODULE: notifications
-*/
-
require_once("globals.inc");
require_once("led.inc");
diff --git a/src/etc/inc/openvpn.attributes.php b/src/etc/inc/openvpn.attributes.php
index 467d691..4da9f0d 100644
--- a/src/etc/inc/openvpn.attributes.php
+++ b/src/etc/inc/openvpn.attributes.php
@@ -128,7 +128,7 @@ function parse_cisco_acl($attribs) {
$isblock = false;
}
} else if (trim($rule[$index]) == "any") {
- $tmprule .= "from any";
+ $tmprule .= "from any ";
$index++;
} else {
$tmprule .= "from {$rule[$index]}";
diff --git a/src/etc/inc/openvpn.auth-user.php b/src/etc/inc/openvpn.auth-user.php
index 0f6864b..a95051d 100644
--- a/src/etc/inc/openvpn.auth-user.php
+++ b/src/etc/inc/openvpn.auth-user.php
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
openvpn.auth-user.php
@@ -32,10 +31,6 @@
*/
/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: openvpn
-*/
-/*
* OpenVPN calls this script to authenticate a user
* based on a username and password. We lookup these
* in our config.xml file and check the credentials.
@@ -118,7 +113,7 @@ if (file_exists("{$g['varetc_path']}/openvpn/{$modeid}.ca")) {
$authenticated = false;
-if (($strictusercn === true) && ($common_name != $username)) {
+if (($strictusercn === true) && (mb_strtolower($common_name) !== mb_strtolower($username))) {
syslog(LOG_WARNING, "Username does not match certificate common name ({$username} != {$common_name}), access denied.\n");
if (isset($_GET['username'])) {
echo "FAILED";
@@ -145,7 +140,7 @@ if (!is_array($authmodes)) {
$attributes = array();
foreach ($authmodes as $authmode) {
$authcfg = auth_get_authserver($authmode);
- if (!$authcfg && $authmode != "local") {
+ if (!$authcfg && $authmode != "Local Database") {
continue;
}
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc
index c163294..9dc83c5 100644
--- a/src/etc/inc/openvpn.inc
+++ b/src/etc/inc/openvpn.inc
@@ -37,12 +37,8 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
-
- pfSense_BUILDER_BINARIES: /usr/local/sbin/openvpn /usr/bin/openssl /sbin/ifconfig
- pfSense_MODULE: openvpn
-
*/
+
require_once('config.inc');
require_once("certs.inc");
require_once('pfsense-utils.inc');
@@ -104,6 +100,9 @@ $openvpn_server_modes = array(
'server_user' => gettext("Remote Access ( User Auth )"),
'server_tls_user' => gettext("Remote Access ( SSL/TLS + User Auth )"));
+global $openvpn_tls_server_modes;
+$openvpn_tls_server_modes = array('p2p_tls', 'server_tls', 'server_user', 'server_tls_user');
+
global $openvpn_client_modes;
$openvpn_client_modes = array(
'p2p_tls' => gettext("Peer to Peer ( SSL/TLS )"),
@@ -116,6 +115,165 @@ $openvpn_compression_modes = array(
'adaptive' => gettext("Enabled with Adaptive Compression"),
'yes' => gettext("Enabled without Adaptive Compression"));
+global $openvpn_topologies;
+$openvpn_topologies = array(
+ 'subnet' => gettext("Subnet -- One IP address per client in a common subnet"),
+ 'net30' => gettext("net30 -- Isolated /30 network per client")
+// 'p2p => gettext("Peer to Peer -- One IP address per client peer-to-peer style. Does not work on Windows.")
+);
+
+function openvpn_build_mode_list() {
+ global $openvpn_server_modes;
+
+ $list = array();
+
+ foreach ($openvpn_server_modes as $name => $desc) {
+ $list[$name] = $desc;
+ }
+
+ return($list);
+}
+
+function openvpn_build_if_list() {
+ $list = array();
+
+ $interfaces = get_configured_interface_with_descr();
+ $carplist = get_configured_carp_interface_list();
+
+ foreach ($carplist as $cif => $carpip) {
+ $interfaces[$cif.'|'.$carpip] = $carpip." (".get_vip_descr($carpip).")";
+ }
+
+ $aliaslist = get_configured_ip_aliases_list();
+
+ foreach ($aliaslist as $aliasip => $aliasif) {
+ $interfaces[$aliasif.'|'.$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
+ }
+
+ $grouplist = return_gateway_groups_array();
+
+ foreach ($grouplist as $name => $group) {
+ if ($group['ipprotocol'] != inet) {
+ continue;
+ }
+
+ if ($group[0]['vip'] != "") {
+ $vipif = $group[0]['vip'];
+ } else {
+ $vipif = $group[0]['int'];
+ }
+
+ $interfaces[$name] = "GW Group {$name}";
+ }
+
+ $interfaces['lo0'] = "Localhost";
+ $interfaces['any'] = "any";
+
+ foreach ($interfaces as $iface => $ifacename) {
+ $list[$iface] = $ifacename;
+ }
+
+ return($list);
+}
+
+function openvpn_build_crl_list() {
+ global $a_crl;
+
+ $list = array('' => 'None');
+
+ foreach ($a_crl as $crl) {
+ $caname = "";
+ $ca = lookup_ca($crl['caref']);
+
+ if ($ca) {
+ $caname = " (CA: {$ca['descr']})";
+ }
+
+ $list[$crl['refid']] = $crl['descr'] . $caname;
+ }
+
+ return($list);
+}
+
+function openvpn_build_cert_list($include_none = false, $prioritize_server_certs = false) {
+ global $a_cert;
+
+ if ($include_none) {
+ $list = array('' => 'None (Username and/or Password required)');
+ } else {
+ $list = array();
+ }
+
+ $non_server_list = array();
+
+ if ($prioritize_server_certs) {
+ $list[' '] = "===== Server Certificates =====";
+ $non_server_list[' '] = "===== Non-Server Certificates =====";
+ }
+
+ foreach ($a_cert as $cert) {
+ $properties = array();
+ $propstr = "";
+ $ca = lookup_ca($cert['caref']);
+ $purpose = cert_get_purpose($cert['crt'], true);
+
+ if ($purpose['server'] == "Yes") {
+ $properties[] = "Server: Yes";
+ } elseif ($prioritize_server_certs) {
+ $properties[] = "Server: NO";
+ }
+ if ($ca) {
+ $properties[] = "CA: {$ca['descr']}";
+ }
+ if (cert_in_use($cert['refid'])) {
+ $properties[] = "In Use";
+ }
+ if (is_cert_revoked($cert)) {
+ $properties[] = "Revoked";
+ }
+
+ if (!empty($properties)) {
+ $propstr = " (" . implode(", ", $properties) . ")";
+ }
+
+ if ($prioritize_server_certs) {
+ if ($purpose['server'] == "Yes") {
+ $list[$cert['refid']] = $cert['descr'] . $propstr;
+ } else {
+ $non_server_list[$cert['refid']] = $cert['descr'] . $propstr;
+ }
+ } else {
+ $list[$cert['refid']] = $cert['descr'] . $propstr;
+ }
+ }
+
+ return(array('server' => $list, 'non-server' => $non_server_list));
+}
+
+function openvpn_build_bridge_list() {
+ $list = array();
+
+ $serverbridge_interface['none'] = "none";
+ $serverbridge_interface = array_merge($serverbridge_interface, get_configured_interface_with_descr());
+ $carplist = get_configured_carp_interface_list();
+
+ foreach ($carplist as $cif => $carpip) {
+ $serverbridge_interface[$cif.'|'.$carpip] = $carpip." (".get_vip_descr($carpip).")";
+ }
+
+ $aliaslist = get_configured_ip_aliases_list();
+
+ foreach ($aliaslist as $aliasip => $aliasif) {
+ $serverbridge_interface[$aliasif.'|'.$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
+ }
+
+ foreach ($serverbridge_interface as $iface => $ifacename) {
+ $list[$iface] = htmlspecialchars($ifacename);
+ }
+
+ return($list);
+}
+
function openvpn_create_key() {
$fp = popen("/usr/local/sbin/openvpn --genkey --secret /dev/stdout 2>/dev/null", "r");
@@ -454,7 +612,7 @@ function openvpn_add_keyfile(& $data, & $conf, $mode_id, $directive, $opt = "")
}
function openvpn_reconfigure($mode, $settings) {
- global $g, $config;
+ global $g, $config, $openvpn_tls_server_modes;
if (empty($settings)) {
return;
@@ -615,7 +773,7 @@ function openvpn_reconfigure($mode, $settings) {
// See ticket #1417
if (!empty($ip) && !empty($mask) && ($cidr < 30)) {
$conf .= "server {$ip} {$mask}\n";
- $conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc\n";
+ $conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc/server{$vpnid}\n";
if (is_ipaddr($ipv6)) {
$conf .= "server-ipv6 {$ipv6}/{$prefix}\n";
}
@@ -646,7 +804,7 @@ function openvpn_reconfigure($mode, $settings) {
if (is_ipaddr($ipv6)) {
$conf .= "server-ipv6 {$ipv6}/{$prefix}\n";
}
- $conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc\n";
+ $conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc/server{$vpnid}\n";
} else {
if ($settings['serverbridge_dhcp']) {
if ((!empty($settings['serverbridge_interface'])) && (strcmp($settings['serverbridge_interface'], "none"))) {
@@ -654,7 +812,7 @@ function openvpn_reconfigure($mode, $settings) {
$biface_sm=gen_subnet_mask(get_interface_subnet($settings['serverbridge_interface']));
if (is_ipaddrv4($biface_ip) && is_ipaddrv4($settings['serverbridge_dhcp_start']) && is_ipaddrv4($settings['serverbridge_dhcp_end'])) {
$conf .= "server-bridge {$biface_ip} {$biface_sm} {$settings['serverbridge_dhcp_start']} {$settings['serverbridge_dhcp_end']}\n";
- $conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc\n";
+ $conf .= "client-config-dir {$g['varetc_path']}/openvpn-csc/server{$vpnid}\n";
} else {
$conf .= "mode server\n";
}
@@ -883,8 +1041,11 @@ function openvpn_reconfigure($mode, $settings) {
$conf .= "float\n";
}
- if ($settings['topology_subnet']) {
- $conf .= "topology subnet\n";
+ if (in_array($settings['mode'], $openvpn_tls_server_modes)) {
+ if (empty($settings['topology'])) {
+ $settings['topology'] = "subnet";
+ }
+ $conf .= "topology {$settings['topology']}\n";
}
// New client features
@@ -1016,29 +1177,23 @@ function openvpn_delete($mode, & $settings) {
@array_map('unlink', glob("{$g['varetc_path']}/openvpn/{$mode_id}.*"));
}
-function openvpn_cleanup_csc($common_name) {
- global $g, $config;
- if (empty($common_name)) {
- return;
- }
- $fpath = "{$g['varetc_path']}/openvpn-csc/" . basename($common_name);
- if (is_file($fpath)) {
- unlink_if_exists($fpath);
- }
- return;
-}
-
function openvpn_resync_csc(& $settings) {
- global $g, $config;
+ global $g, $config, $openvpn_tls_server_modes;
- $fpath = $g['varetc_path']."/openvpn-csc/".$settings['common_name'];
+ $csc_base_path = "{$g['varetc_path']}/openvpn-csc";
if (isset($settings['disable'])) {
- unlink_if_exists($fpath);
+ openvpn_delete_csc($settings);
return;
}
openvpn_create_dirs();
+ if (empty($settings['server_list'])) {
+ $csc_server_list = array();
+ } else {
+ $csc_server_list = explode(",", $settings['server_list']);
+ }
+
$conf = '';
if ($settings['block']) {
$conf .= "disable\n";
@@ -1048,19 +1203,6 @@ function openvpn_resync_csc(& $settings) {
$conf .= "push-reset\n";
}
- if (!empty($settings['tunnel_network'])) {
- list($ip, $mask) = explode('/', $settings['tunnel_network']);
- $baselong = ip2long32($ip) & gen_subnet_mask_long($mask);
- $serverip = long2ip32($baselong + 1);
- $clientip = long2ip32($baselong + 2);
- /* Because this is being pushed, the order from the client's point of view. */
- if ($settings['dev_mode'] != 'tap') {
- $conf .= "ifconfig-push {$clientip} {$serverip}\n";
- } else {
- $conf .= "ifconfig-push {$clientip} {$mask}\n";
- }
- }
-
if ($settings['local_network']) {
$conf .= openvpn_gen_routes($settings['local_network'], "ipv4", true);
}
@@ -1084,17 +1226,61 @@ function openvpn_resync_csc(& $settings) {
}
openvpn_add_custom($settings, $conf);
-
- file_put_contents($fpath, $conf);
- chown($fpath, 'nobody');
- chgrp($fpath, 'nobody');
+ /* Loop through servers, find which ones can use this CSC */
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as $serversettings) {
+ if (isset($serversettings['disable'])) {
+ continue;
+ }
+ if (in_array($serversettings['mode'], $openvpn_tls_server_modes)) {
+ if ($serversettings['vpnid'] && (empty($csc_server_list) || in_array($serversettings['vpnid'], $csc_server_list))) {
+ $csc_path = "{$csc_base_path}/server{$serversettings['vpnid']}/" . basename($settings['common_name']);
+ $csc_conf = $conf;
+
+ if (!empty($serversettings['tunnel_network']) && !empty($settings['tunnel_network'])) {
+ list($ip, $mask) = explode('/', $settings['tunnel_network']);
+ if (($serversettings['dev_mode'] == 'tap') || ($serversettings['topology'] == "subnet")) {
+ $csc_conf .= "ifconfig-push {$ip} " . gen_subnet_mask($mask) . "\n";
+ } else {
+ /* Because this is being pushed, the order from the client's point of view. */
+ $baselong = ip2long32($ip) & gen_subnet_mask_long($mask);
+ $serverip = long2ip32($baselong + 1);
+ $clientip = long2ip32($baselong + 2);
+ $csc_conf .= "ifconfig-push {$clientip} {$serverip}\n";
+ }
+ }
+ file_put_contents($csc_path, $csc_conf);
+ chown($csc_path, 'nobody');
+ chgrp($csc_path, 'nobody');
+ }
+ }
+ }
+ }
}
function openvpn_delete_csc(& $settings) {
- global $g, $config;
+ global $g, $config, $openvpn_tls_server_modes;
+ $csc_base_path = "{$g['varetc_path']}/openvpn-csc";
+ if (empty($settings['server_list'])) {
+ $csc_server_list = array();
+ } else {
+ $csc_server_list = explode(",", $settings['server_list']);
+ }
- $fpath = $g['varetc_path']."/openvpn-csc/".$settings['common_name'];
- unlink_if_exists($fpath);
+ /* Loop through servers, find which ones used this CSC */
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as $serversettings) {
+ if (isset($serversettings['disable'])) {
+ continue;
+ }
+ if (in_array($serversettings['mode'], $openvpn_tls_server_modes)) {
+ if ($serversettings['vpnid'] && (empty($csc_server_list) || in_array($serversettings['vpnid'], $csc_server_list))) {
+ $csc_path = "{$csc_base_path}/server{$serversettings['vpnid']}/" . basename($settings['common_name']);
+ unlink_if_exists($csc_path);
+ }
+ }
+ }
+ }
}
// Resync the configuration and restart the VPN
@@ -1425,6 +1611,42 @@ function openvpn_get_client_status($client, $socket) {
return $client;
}
+function openvpn_kill_client($port, $remipp) {
+ global $g;
+
+ //$tcpsrv = "tcp://127.0.0.1:{$port}";
+ $tcpsrv = "unix://{$g['varetc_path']}/openvpn/{$port}.sock";
+ $errval = null;
+ $errstr = null;
+
+ /* open a tcp connection to the management port of each server */
+ $fp = @stream_socket_client($tcpsrv, $errval, $errstr, 1);
+ $killed = -1;
+ if ($fp) {
+ stream_set_timeout($fp, 1);
+ fputs($fp, "kill {$remipp}\n");
+ while (!feof($fp)) {
+ $line = fgets($fp, 1024);
+
+ $info = stream_get_meta_data($fp);
+ if ($info['timed_out']) {
+ break;
+ }
+
+ /* parse header list line */
+ if (strpos($line, "INFO:") !== false) {
+ continue;
+ }
+ if (strpos($line, "SUCCESS") !== false) {
+ $killed = 0;
+ }
+ break;
+ }
+ fclose($fp);
+ }
+ return $killed;
+}
+
function openvpn_refresh_crls() {
global $g, $config;
@@ -1458,13 +1680,27 @@ function openvpn_refresh_crls() {
}
function openvpn_create_dirs() {
- global $g;
+ global $g, $config, $openvpn_tls_server_modes;
if (!is_dir("{$g['varetc_path']}/openvpn")) {
safe_mkdir("{$g['varetc_path']}/openvpn", 0750);
}
if (!is_dir("{$g['varetc_path']}/openvpn-csc")) {
safe_mkdir("{$g['varetc_path']}/openvpn-csc", 0750);
}
+
+ /* Check for enabled servers and create server-specific CSC dirs */
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as $settings) {
+ if (isset($settings['disable'])) {
+ continue;
+ }
+ if (in_array($settings['mode'], $openvpn_tls_server_modes)) {
+ if ($settings['vpnid']) {
+ safe_mkdir("{$g['varetc_path']}/openvpn-csc/server{$settings['vpnid']}");
+ }
+ }
+ }
+ }
}
function openvpn_get_interface_ip($ip, $mask) {
diff --git a/src/etc/inc/openvpn.tls-verify.php b/src/etc/inc/openvpn.tls-verify.php
index 9e21342..ea17207 100644
--- a/src/etc/inc/openvpn.tls-verify.php
+++ b/src/etc/inc/openvpn.tls-verify.php
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
openvpn.tls-verify.php
@@ -31,10 +30,6 @@
*/
/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: openvpn
-*/
-/*
* OpenVPN calls this script to validate a certificate
* This script is called ONCE per DEPTH of the certificate chain
* Normal operation would have two runs - one for the server certificate
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc
index 4eefaa0..1041dec 100644
--- a/src/etc/inc/pfsense-utils.inc
+++ b/src/etc/inc/pfsense-utils.inc
@@ -31,13 +31,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig /sbin/pfctl /usr/local/bin/php-cgi /usr/bin/netstat
- pfSense_BUILDER_BINARIES: /bin/df /usr/bin/grep /usr/bin/awk /bin/rm /usr/sbin/pwd_mkdb /usr/bin/host
- pfSense_BUILDER_BINARIES: /sbin/kldload
- pfSense_MODULE: utils
-*/
-
/****f* pfsense-utils/have_natpfruleint_access
* NAME
* have_natpfruleint_access
@@ -405,21 +398,35 @@ function convert_ip_to_network_format($ip, $subnet) {
* get_carp_interface_status($carpinterface): returns the status of a carp ip
*/
function get_carp_interface_status($carpinterface) {
+ global $config;
- $interface = get_real_interface($interface);
- $carp_query = '';
- $_gb = exec("/sbin/ifconfig $interface | /usr/bin/grep -v grep | /usr/bin/grep carp: | /usr/bin/head -n 1", $carp_query);
- foreach ($carp_query as $int) {
- if (stripos($int, "MASTER")) {
- return "MASTER";
+ foreach ($config['virtualip']['vip'] as $carp) {
+ if ($carp['mode'] != "carp") {
+ continue;
}
- if (stripos($int, "BACKUP")) {
- return "BACKUP";
+ $carpif = "_vip{$carp['uniqid']}";
+ if ($carpinterface !== $carpif) {
+ continue;
}
- if (stripos($int, "INIT")) {
- return "INIT";
+
+ $interface = get_real_interface($carp['interface']);
+ $vhid = $carp['vhid'];
+ $carp_query = '';
+ $_gb = exec("/sbin/ifconfig $interface | /usr/bin/grep carp: | /usr/bin/grep \"vhid $vhid\"", $carp_query);
+ foreach ($carp_query as $int) {
+ if (stripos($int, "MASTER")) {
+ return "MASTER";
+ }
+ if (stripos($int, "BACKUP")) {
+ return "BACKUP";
+ }
+ if (stripos($int, "INIT")) {
+ return "INIT";
+ }
}
+ break;
}
+
return;
}
@@ -618,50 +625,6 @@ function merge_config_section($section_name, $new_contents) {
}
/*
- * http_post($server, $port, $url, $vars): does an http post to a web server
- * posting the vars array.
- * written by nf@bigpond.net.au
- */
-function http_post($server, $port, $url, $vars) {
- $user_agent = "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)";
- $urlencoded = "";
- while (list($key, $value) = each($vars)) {
- $urlencoded .= urlencode($key) . "=" . urlencode($value) . "&";
- }
- $urlencoded = substr($urlencoded, 0, -1);
- $content_length = strlen($urlencoded);
- $headers = "POST $url HTTP/1.1
-Accept: */*
-Accept-Language: en-au
-Content-Type: application/x-www-form-urlencoded
-User-Agent: $user_agent
-Host: $server
-Connection: Keep-Alive
-Cache-Control: no-cache
-Content-Length: $content_length
-
-";
-
- $errno = "";
- $errstr = "";
- $fp = fsockopen($server, $port, $errno, $errstr);
- if (!$fp) {
- return false;
- }
-
- fputs($fp, $headers);
- fputs($fp, $urlencoded);
-
- $ret = "";
- while (!feof($fp)) {
- $ret .= fgets($fp, 1024);
- }
- fclose($fp);
-
- return $ret;
-}
-
-/*
* php_check_syntax($code_tocheck, $errormessage): checks $code_to_check for errors
*/
if (!function_exists('php_check_syntax')) {
@@ -740,103 +703,6 @@ function rmdir_recursive($path, $follow_links=false) {
}
/*
- * call_pfsense_method(): Call a method exposed by the pfsense.org XMLRPC server.
- */
-function call_pfsense_method($method, $params, $timeout = 0) {
- global $g, $config;
-
- $xmlrpc_base_url = get_active_xml_rpc_base_url();
- $xmlrpc_path = $g['xmlrpcpath'];
-
- $xmlrpcfqdn = preg_replace("(https?://)", "", $xmlrpc_base_url);
- $ip = gethostbyname($xmlrpcfqdn);
- if ($ip == $xmlrpcfqdn) {
- return false;
- }
-
- $msg = new XML_RPC_Message($method, array(XML_RPC_Encode($params)));
- $port = 0;
- $proxyurl = "";
- $proxyport = 0;
- $proxyuser = "";
- $proxypass = "";
- if (!empty($config['system']['proxyurl'])) {
- $proxyurl = $config['system']['proxyurl'];
- }
- if (!empty($config['system']['proxyport']) && is_numeric($config['system']['proxyport'])) {
- $proxyport = $config['system']['proxyport'];
- }
- if (!empty($config['system']['proxyuser'])) {
- $proxyuser = $config['system']['proxyuser'];
- }
- if (!empty($config['system']['proxypass'])) {
- $proxypass = $config['system']['proxypass'];
- }
- $cli = new XML_RPC_Client($xmlrpc_path, $xmlrpc_base_url, $port, $proxyurl, $proxyport, $proxyuser, $proxypass);
- // If the ALT PKG Repo has a username/password set, use it.
- if ($config['system']['altpkgrepo']['username'] &&
- $config['system']['altpkgrepo']['password']) {
- $username = $config['system']['altpkgrepo']['username'];
- $password = $config['system']['altpkgrepo']['password'];
- $cli->setCredentials($username, $password);
- }
- $resp = $cli->send($msg, $timeout);
- if (!is_object($resp)) {
- log_error(sprintf(gettext("XMLRPC communication error: %s"), $cli->errstr));
- return false;
- } elseif ($resp->faultCode()) {
- log_error(sprintf(gettext('XMLRPC request failed with error %1$s: %2$s'), $resp->faultCode(), $resp->faultString()));
- return false;
- } else {
- return XML_RPC_Decode($resp->value());
- }
-}
-
-/*
- * check_firmware_version(): Check whether the current firmware installed is the most recently released.
- */
-function check_firmware_version($tocheck = "all", $return_php = true) {
- global $g, $config;
-
- $xmlrpc_base_url = get_active_xml_rpc_base_url();
- $xmlrpcfqdn = preg_replace("(https?://)", "", $xmlrpc_base_url);
- $ip = gethostbyname($xmlrpcfqdn);
- if ($ip == $xmlrpcfqdn) {
- return false;
- }
- $version = php_uname('r');
- $version = explode('-', $version);
- $rawparams = array("firmware" => array("version" => $g['product_version']),
- "kernel" => array("version" => $version[0]),
- "base" => array("version" => $version[0]),
- "platform" => trim(file_get_contents('/etc/platform')),
- "config_version" => $config['version']
- );
- unset($version);
-
- if ($tocheck == "all") {
- $params = $rawparams;
- } else {
- foreach ($tocheck as $check) {
- $params['check'] = $rawparams['check'];
- $params['platform'] = $rawparams['platform'];
- }
- }
- if ($config['system']['firmware']['branch']) {
- $params['branch'] = $config['system']['firmware']['branch'];
- }
-
- /* XXX: What is this method? */
- if (!($versions = call_pfsense_method('pfsense.get_firmware_version', $params))) {
- return false;
- } else {
- $versions["current"] = $params;
- }
-
- return $versions;
-}
-
-/*
* host_firmware_version(): Return the versions used in this install
*/
function host_firmware_version($tocheck = "") {
@@ -1436,7 +1302,7 @@ function get_interface_info($ifdescr) {
}
$usbmodemoutput = array();
- exec("usbconfig", $usbmodemoutput);
+ exec("/usr/sbin/usbconfig", $usbmodemoutput);
$mondev = "{$g['tmp_path']}/3gstats.{$ifdescr}";
if (file_exists($mondev)) {
$cellstats = file($mondev);
@@ -1588,7 +1454,7 @@ function add_hostname_to_watch($hostname) {
if ((is_fqdn($hostname)) && (!is_ipaddr($hostname))) {
$domrecords = array();
$domips = array();
- exec("host -t A " . escapeshellarg($hostname), $domrecords, $rethost);
+ exec("/usr/bin/host -t A " . escapeshellarg($hostname), $domrecords, $rethost);
if ($rethost == 0) {
foreach ($domrecords as $domr) {
$doml = explode(" ", $domr);
@@ -1646,7 +1512,7 @@ function pfsense_default_tables_size() {
function pfsense_default_table_entries_size() {
$current = `pfctl -sm | grep table-entries | awk '{print $4};'`;
- return $current;
+ return (trim($current));
}
/* Compare the current hostname DNS to the DNS cache we made
@@ -1665,7 +1531,7 @@ function compare_hostname_to_dnscache($hostname) {
if ((is_fqdn($hostname)) && (!is_ipaddr($hostname))) {
$domrecords = array();
$domips = array();
- exec("host -t A " . escapeshellarg($hostname), $domrecords, $rethost);
+ exec("/usr/bin/host -t A " . escapeshellarg($hostname), $domrecords, $rethost);
if ($rethost == 0) {
foreach ($domrecords as $domr) {
$doml = explode(" ", $domr);
@@ -1776,7 +1642,7 @@ function download_file($url, $destination, $verify_ssl = true, $connect_timeout
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- if (!isset($config['system']['host_uuid'])) {
+ if (!isset($config['system']['do_not_send_host_uuid'])) {
curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ' : ' . get_single_sysctl('kern.hostuuid'));
} else {
curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
@@ -1822,7 +1688,7 @@ function download_file_with_progress_bar($url_file, $destination_file, $readbody
curl_setopt($ch, CURLOPT_NOPROGRESS, '1');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connect_timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
- if (!isset($config['system']['host_uuid'])) {
+ if (!isset($config['system']['do_not_send_host_uuid'])) {
curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ' : ' . get_single_sysctl('kern.hostuuid'));
} else {
curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
@@ -1920,9 +1786,11 @@ function update_output_window($text) {
$log = preg_replace("/\n/", "\\n", $text);
if ($pkg_interface != "console") {
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
document.getElementById("output").textContent="<?=htmlspecialchars($log)?>";
document.getElementById("output").scrollTop = document.getElementById("output").scrollHeight;
+//]]>
</script>
<?php
}
@@ -1935,10 +1803,9 @@ function update_output_window($text) {
*/
function update_status($status) {
global $pkg_interface;
+
if ($pkg_interface == "console") {
- echo "\r{$status}";
- } else {
- echo '<script>document.getElementById("status").innerText="'. htmlspecialchars($status).'";</script>';
+ print ("{$status}");
}
/* ensure that contents are written out */
@@ -1954,7 +1821,11 @@ function update_progress_bar($percent, $first_time) {
$percent = 1;
}
if ($pkg_interface <> "console") {
- echo '<script>document.getElementById("progressbar").style.width="'. $percent.'%";</script>';
+ echo '<script type="text/javascript">';
+ echo "\n//<![CDATA[\n";
+ echo 'document.getElementById("progressbar").style.width="'. $percent.'%"';
+ echo "\n//]]>\n";
+ echo '</script>';
} else {
if (!($first_time)) {
echo "\x08\x08\x08\x08\x08";
@@ -2372,7 +2243,7 @@ function nanobsd_switch_boot_slice() {
$ABOOTFLASH = "{$BOOT_DRIVE}s{$AOLDSLICE}";
conf_mount_rw();
set_single_sysctl("kern.geom.debugflags", "16");
- exec("gpart set -a active -i {$ASLICE} {$BOOT_DRIVE}");
+ exec("/sbin/gpart set -a active -i {$ASLICE} {$BOOT_DRIVE}");
exec("/usr/sbin/boot0cfg -s {$ASLICE} -v /dev/{$BOOT_DRIVE}");
// We can't update these if they are mounted now.
if ($BOOTFLASH != $slice) {
@@ -2424,7 +2295,7 @@ EOF;
$status = false;
}
} else {
- $status = exec("sed -i \"\" \"s/pfsense{$oldufs}/pfsense{$newufs}/g\" {$fstabpath}");
+ $status = exec("/usr/bin/sed -i \"\" \"s/pfsense{$oldufs}/pfsense{$newufs}/g\" {$fstabpath}");
}
exec("/sbin/umount {$tmppath}");
rmdir($tmppath);
@@ -2820,7 +2691,7 @@ function where_is_ipaddr_configured($ipaddr, $ignore_if = "", $check_localip = f
$interface_list_vips = get_configured_vips_list(true);
foreach ($interface_list_vips as $id => $vip) {
/* Skip CARP interfaces here since they were already checked above */
- if ($id == $ignore_vip_id || (substr($ignore_if, 0, 4) == '_vip') && substr($ignore_vip_if, 5) == $vip['uniqdid']) {
+ if ($id == $ignore_vip_id || (substr($ignore_if, 0, 4) == '_vip') && $ignore_vip_if === $vip['if']) {
continue;
}
if (strcasecmp($ipaddr, $vip['ipaddr']) == 0) {
@@ -2866,7 +2737,6 @@ function pfSense_handle_custom_code($src_dir) {
}
function set_language($lang = 'en_US', $encoding = "UTF-8") {
- putenv("LANG={$lang}.{$encoding}");
setlocale(LC_ALL, "{$lang}.{$encoding}");
textdomain("pfSense");
bindtextdomain("pfSense", "/usr/local/share/locale");
@@ -2883,66 +2753,6 @@ function get_locale_list() {
return $locales;
}
-function system_get_language_code() {
- global $config, $g_languages;
-
- // a language code, as per [RFC3066]
- $language = $config['system']['language'];
- //$code = $g_languages[$language]['code'];
- $code = str_replace("_", "-", $language);
-
- if (empty($code)) {
- $code = "en-US"; // Set default code.
- }
-
- return $code;
-}
-
-function system_get_language_codeset() {
- global $config, $g_languages;
-
- $language = $config['system']['language'];
- $codeset = $g_languages[$language]['codeset'];
-
- if (empty($codeset)) {
- $codeset = "UTF-8"; // Set default codeset.
- }
-
- return $codeset;
-}
-
-/* Available languages/locales */
-$g_languages = array (
- "sq" => array("codeset" => "UTF-8", "desc" => gettext("Albanian")),
- "bg" => array("codeset" => "UTF-8", "desc" => gettext("Bulgarian")),
- "zh_CN" => array("codeset" => "UTF-8", "desc" => gettext("Chinese (Simplified)")),
- "zh_TW" => array("codeset" => "UTF-8", "desc" => gettext("Chinese (Traditional)")),
- "nl" => array("codeset" => "UTF-8", "desc" => gettext("Dutch")),
- "da" => array("codeset" => "UTF-8", "desc" => gettext("Danish")),
- "en_US" => array("codeset" => "UTF-8", "desc" => gettext("English")),
- "fi" => array("codeset" => "UTF-8", "desc" => gettext("Finnish")),
- "fr" => array("codeset" => "UTF-8", "desc" => gettext("French")),
- "de" => array("codeset" => "UTF-8", "desc" => gettext("German")),
- "el" => array("codeset" => "UTF-8", "desc" => gettext("Greek")),
- "hu" => array("codeset" => "UTF-8", "desc" => gettext("Hungarian")),
- "it" => array("codeset" => "UTF-8", "desc" => gettext("Italian")),
- "ja" => array("codeset" => "UTF-8", "desc" => gettext("Japanese")),
- "ko" => array("codeset" => "UTF-8", "desc" => gettext("Korean")),
- "lv" => array("codeset" => "UTF-8", "desc" => gettext("Latvian")),
- "nb" => array("codeset" => "UTF-8", "desc" => gettext("Norwegian (Bokmal)")),
- "pl" => array("codeset" => "UTF-8", "desc" => gettext("Polish")),
- "pt_BR" => array("codeset" => "UTF-8", "desc" => gettext("Portuguese (Brazil)")),
- "pt" => array("codeset" => "UTF-8", "desc" => gettext("Portuguese (Portugal)")),
- "ro" => array("codeset" => "UTF-8", "desc" => gettext("Romanian")),
- "ru" => array("codeset" => "UTF-8", "desc" => gettext("Russian")),
- "sl" => array("codeset" => "UTF-8", "desc" => gettext("Slovenian")),
- "tr" => array("codeset" => "UTF-8", "desc" => gettext("Turkish")),
- "es" => array("codeset" => "UTF-8", "desc" => gettext("Spanish")),
- "sv" => array("codeset" => "UTF-8", "desc" => gettext("Swedish")),
- "sk" => array("codeset" => "UTF-8", "desc" => gettext("Slovak")),
- "cs" => array("codeset" => "UTF-8", "desc" => gettext("Czech"))
-);
-
function return_hex_ipv4($ipv4) {
if (!is_ipaddrv4($ipv4)) {
return(false);
@@ -3133,7 +2943,7 @@ function get_pppoes_child_interfaces($ifpattern) {
return;
}
- exec("ifconfig", $out, $ret);
+ exec("/sbin/ifconfig", $out, $ret);
foreach ($out as $line) {
if (preg_match("/^({$ifpattern}[0-9]+):/i", $line, $match)) {
$if_arr[] = $match[1];
@@ -3183,15 +2993,4 @@ function pkg_call_plugins($plugin_type, $plugin_params) {
return $results;
}
-/* Function to find and return the active XML RPC base URL to avoid code duplication */
-function get_active_xml_rpc_base_url() {
- global $config, $g;
- /* If the user has activated the option to enable an alternate xmlrpcbaseurl, and it's not empty, then use it */
- if (isset($config['system']['altpkgrepo']['enable']) && !empty($config['system']['altpkgrepo']['xmlrpcbaseurl'])) {
- return $config['system']['altpkgrepo']['xmlrpcbaseurl'];
- } else {
- return $g['xmlrpcbaseurl'];
- }
-}
-
?>
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc
index be7a533..426a043 100644
--- a/src/etc/inc/pkg-utils.inc
+++ b/src/etc/inc/pkg-utils.inc
@@ -1,15 +1,9 @@
<?php
-/****h* pfSense/pkg-utils
- NAME
- pkg-utils.inc - Package subsystem
- DESCRIPTION
- This file contains various functions used by the pfSense package system.
- HISTORY
- $Id$
-*/
+/*
+ * pkg-utils.inc
+ */
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2005-2006 Colin Smith (ethethlay@gmail.com)
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -59,11 +53,6 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/cd /usr/bin/tar /usr/sbin/fifolog_create /bin/chmod
- pfSense_BUILDER_BINARIES: /usr/sbin/pkg_add /usr/sbin/pkg_info /usr/sbin/pkg_delete /bin/rm
- pfSense_MODULE: pkg
-*/
require_once("globals.inc");
require_once("service-utils.inc");
@@ -87,18 +76,13 @@ if (!function_exists("pkg_debug")) {
if (!$fd_log) {
if (!$fd_log = fopen("{$g['tmp_path']}/pkg_mgr_debug.log", "w")) {
- update_output_window("Warning, could not open log for writing.");
+ update_status(gettext("Warning, could not open log for writing.") . "\n");
}
}
@fwrite($fd_log, $msg);
}
}
-global $g;
-if (!isset($g['platform'])) {
- $g['platform'] = trim(file_get_contents("/etc/platform"));
-}
-
/* Remove pkg_prefix from package name if it's present */
function pkg_remove_prefix(&$pkg_name) {
global $g;
@@ -108,33 +92,55 @@ function pkg_remove_prefix(&$pkg_name) {
}
}
+/* Execute pkg update when it's necessary */
+function pkg_update($force = false) {
+ global $g;
+
+ $now = strftime('%s');
+ $last_update_file="{$g['varrun_path']}/{$g['product_name']}-upgrade-last-update";
+ if (!$force) {
+ if (file_exists($last_update_file)) {
+ $last_update = rtrim(file_get_contents($last_update_file), "\n");
+ if (!is_numericint($last_update)) {
+ $last_update = 0;
+ }
+ }
+
+ if ($last_update > 0) {
+ if ($now > $last_update && ($now - $last_update) <= (60 * 60)) {
+ return true;
+ }
+ }
+ }
+
+ $rc = pkg_call("update");
+
+ if ($rc) {
+ file_put_contents($last_update_file, $now . "\n");
+ }
+
+ return $rc;
+}
+
/* Execute a pkg call */
function pkg_call($params, $mute = false) {
- global $static_output, $g, $config;
+ global $g, $config;
if (empty($params)) {
return false;
}
$user_agent = $g['product_name'] . '/' . $g['product_version'];
- if (!isset($config['system']['host_uuid'])) {
+ if (!isset($config['system']['do_not_send_host_uuid'])) {
$user_agent .= ' : ' . get_single_sysctl('kern.hostuuid');
}
$env = array(
"HTTP_USER_AGENT" => $user_agent,
- "ASSUME_ALWAYS_YES" => "true"
+ "ASSUME_ALWAYS_YES" => "true",
+ "REPO_AUTOUPDATE" => "false"
);
- $debug_fifo = $g['tmp_path'] . "/pkg-debug.fifo";
- if (!file_exists($debug_fifo)) {
- posix_mkfifo($debug_fifo, 0600);
- }
-
- if (filetype($debug_fifo) == 'fifo') {
- $env["EVENT_PIPE"] = $debug_fifo;
- }
-
$descriptorspec = array(
1 => array("pipe", "w"), /* stdout */
2 => array("pipe", "w") /* stderr */
@@ -170,8 +176,7 @@ function pkg_call($params, $mute = false) {
}
if ($pipe === $pipes[1]) {
if (!$mute) {
- $static_output .= $content;
- update_output_window($static_output);
+ update_status($content);
}
flush();
} else if ($pipe === $pipes[2]) {
@@ -184,7 +189,7 @@ function pkg_call($params, $mute = false) {
$now = time();
- if(($now - $started) >= $maxwaittime) {
+ if (($now - $started) >= $maxwaittime) {
$rc = -1;
proc_terminate($process);
break;
@@ -196,7 +201,7 @@ function pkg_call($params, $mute = false) {
fclose($pipes[2]);
proc_close($process);
- if(!isset($rc)) {
+ if (!isset($rc)) {
$rc = $status['exitcode'];
}
@@ -207,8 +212,9 @@ function pkg_call($params, $mute = false) {
pkg_debug("pkg_call(): error_log\n{$error_log}\n");
if (!$mute) {
- $static_output .= "\n\n" . sprintf(gettext("ERROR!!! An error occurred on pkg execution (rc = %d) with parameters '%s':"), $rc, $params) . "\n" . $error_log;
- update_output_window($static_output);
+ update_status("\n\n" . sprintf(gettext(
+ "ERROR!!! An error occurred on pkg execution (rc = %d) with parameters '%s':"),
+ $rc, $params) . "\n" . $error_log . "\n");
}
return false;
@@ -223,24 +229,16 @@ function pkg_exec($params, &$stdout, &$stderr) {
}
$user_agent = $g['product_name'] . '/' . $g['product_version'];
- if (!isset($config['system']['host_uuid'])) {
+ if (!isset($config['system']['do_not_send_host_uuid'])) {
$user_agent .= ' : ' . get_single_sysctl('kern.hostuuid');
}
$env = array(
"HTTP_USER_AGENT" => $user_agent,
- "ASSUME_ALWAYS_YES" => "true"
+ "ASSUME_ALWAYS_YES" => "true",
+ "REPO_AUTOUPDATE" => "false"
);
- $debug_fifo = $g['tmp_path'] . "/pkg-debug.fifo";
- if (!file_exists($debug_fifo)) {
- posix_mkfifo($debug_fifo, 0600);
- }
-
- if (filetype($debug_fifo) == 'fifo') {
- $env["EVENT_PIPE"] = $debug_fifo;
- }
-
$descriptorspec = array(
1 => array("pipe", "w"), /* stdout */
2 => array("pipe", "w") /* stderr */
@@ -268,25 +266,53 @@ function pkg_exec($params, &$stdout, &$stderr) {
return proc_close($process);
}
+/* Compare 2 pkg versions and return:
+ * '=' - versions are the same
+ * '>' - $v1 > $v2
+ * '<' - $v1 < $v2
+ * '?' - Error
+ */
+function pkg_version_compare($v1, $v2) {
+ if (empty($v1) || empty($v2)) {
+ return '?';
+ }
+
+ $rc = pkg_exec("version -t '{$v1}' '{$v2}'", $stdout, $stderr);
+
+ if ($rc != 0) {
+ return '?';
+ }
+
+ return str_replace("\n", "", $stdout);
+}
+
/* Check if package is installed */
function is_pkg_installed($pkg_name) {
global $g;
- pkg_remove_prefix($pkg_name);
+ if (empty($pkg_name)) {
+ return false;
+ }
- return pkg_call("info -e " . $g['pkg_prefix'] . $pkg_name, true);
+ return pkg_call("info -e " . $pkg_name, true);
}
/* Install package, $pkg_name should not contain prefix */
-function pkg_install($pkg_name) {
+function pkg_install($pkg_name, $force = false) {
global $g;
$result = false;
- pkg_remove_prefix($pkg_name);
+ $shortname = $pkg_name;
+ pkg_remove_prefix($shortname);
+
+ $pkg_force = "";
+ if ($force) {
+ $pkg_force = "-f ";
+ }
- pkg_debug("Installing package {$pkg_name}\n");
- if (!is_pkg_installed($pkg_name)) {
- $result = pkg_call("install -y " . $g['pkg_prefix'] . $pkg_name);
+ pkg_debug("Installing package {$shortname}\n");
+ if ($force || !is_pkg_installed($pkg_name)) {
+ $result = pkg_call("install -y " . $pkg_force . $pkg_name);
/* Cleanup cacke to free disk space */
pkg_call("clean -y");
}
@@ -298,11 +324,12 @@ function pkg_install($pkg_name) {
function pkg_delete($pkg_name) {
global $g;
- pkg_remove_prefix($pkg_name);
+ $shortname = $pkg_name;
+ pkg_remove_prefix($shortname);
- pkg_debug("Removing package {$pkg_name}\n");
+ pkg_debug("Removing package {$shortname}\n");
if (is_pkg_installed($pkg_name)) {
- pkg_call("delete -y " . $g['pkg_prefix'] . $pkg_name);
+ pkg_call("delete -y " . $pkg_name);
/* Cleanup unecessary dependencies */
pkg_call("autoremove -y");
}
@@ -323,7 +350,7 @@ function get_package_id($package_name) {
foreach ($config['installedpackages']['package'] as $idx => $pkg) {
if ($pkg['name'] == $package_name ||
- get_package_internal_name($pkg) == $package_name) {
+ get_package_internal_name($pkg) == $package_name) {
return $idx;
}
}
@@ -348,36 +375,44 @@ function get_package_internal_name($package_data) {
// Get information about packages.
function get_pkg_info($pkgs = 'all', $info = 'all') {
- global $g, $static_output, $input_errors;
+ global $g, $input_errors;
$out = '';
$err = '';
+ unset($pkg_filter);
+ if (is_array($pkgs)) {
+ $pkg_filter = $pkgs;
+ $pkgs = 'all';
+ }
+
if ($pkgs == 'all') {
$pkgs = $g['pkg_prefix'];
}
-
/* Make sure repo metadata is up2date */
- $static_output .= "\n" . gettext("Updating package repository metadada...") . "\n";
- update_status($static_output);
-
- if (!pkg_call("update")) {
- $input_errors[] = gettext("ERROR: An error occurred when updating packages repository. Aborting...") . "\n";
- $static_output .= "\n" . gettext("ERROR: An error occurred when updating packages repository. Aborting...") . "\n";
- update_status($static_output);
+ update_status("\n" .
+ gettext("Updating package repository metadada...") . "\n");
+
+ if (!pkg_update()) {
+ $input_errors[] = gettext(
+ "ERROR: An error occurred when updating packages repository. Aborting...")
+ . "\n";
+ update_status("\n" . gettext(
+ "ERROR: An error occurred when updating packages repository. Aborting...")
+ . "\n");
return array();
}
-
$rc = pkg_exec("search -U --raw-format json-compact " . $pkgs, $out, $err);
if ($rc != 0) {
- $static_output .= "\n" . gettext("ERROR: Error trying to get packages list. Aborting...") . "\n";
- $static_output .= $err;
+ update_status("\n" . gettext(
+ "ERROR: Error trying to get packages list. Aborting...")
+ . "\n");
+ update_status($err);
$input_errors[] = gettext("ERROR: Error trying to get packages list. Aborting...") . "\n";
$input_errors[] = $err;
- update_status($static_output);
return array();
}
@@ -389,10 +424,49 @@ function get_pkg_info($pkgs = 'all', $info = 'all') {
continue;
}
+ if (isset($pkg_filter) && !in_array($pkg_info['name'], $pkg_filter)) {
+ continue;
+ }
+
+ $pkg_info['shortname'] = $pkg_info['name'];
+ pkg_remove_prefix($pkg_info['shortname']);
+
+ /* XXX: Add it to globals.inc? */
+ $pkg_info['changeloglink'] =
+ "https://github.com/pfsense/FreeBSD-ports/commits/devel/" .
+ $pkg_info['categories'][0] . '/' . $pkg_info['name'];
+
+ if (is_pkg_installed($pkg_info['name'])) {
+ $pkg_info['installed'] = true;
+
+ $rc = pkg_exec("query %v {$pkg_info['name']}", $out, $err);
+
+ if ($rc != 0) {
+ update_status("\n" . gettext(
+ "ERROR: Error trying to get package version. Aborting...")
+ . "\n");
+ update_status($err);
+ $input_errors[] = gettext("ERROR: Error trying to get package version. Aborting...") . "\n";
+ $input_errors[] = $err;
+ return array();
+ }
+
+ $pkg_info['installed_version'] = str_replace("\n", "", $out);
+ } else if (is_package_installed($pkg_info['shortname'])) {
+ $pkg_info['broken'] = true;
+ }
+
+ $pkg_info['desc'] = preg_replace('/\n+WWW:.*$/', '', $pkg_info['desc']);
+
$result[] = $pkg_info;
unset($pkg_info);
}
+ /* Sort result alphabetically */
+ usort($result, function($a, $b) {
+ return(strcasecmp ($a['name'], $b['name']));
+ });
+
return $result;
}
@@ -426,9 +500,7 @@ function resync_all_package_configs($show_message = false) {
stop_service(get_package_internal_name($package));
}
sync_package($package['name']);
- if ($pkg_interface == "console") {
- echo "\n" . gettext("Syncing packages:");
- }
+ update_status(gettext("Syncing packages...") . "\n");
}
if ($show_message == true) {
@@ -440,7 +512,7 @@ function resync_all_package_configs($show_message = false) {
}
function uninstall_package($package_name) {
- global $config, $static_output;
+ global $config;
$internal_name = $package_name;
$id = get_package_id($package_name);
@@ -448,17 +520,16 @@ function uninstall_package($package_name) {
$internal_name = get_package_internal_name($config['installedpackages']['package'][$id]);
stop_service($internal_name);
}
+ $pkg_name = $g['pkg_prefix'] . $internal_name;
- if (is_pkg_installed($internal_name)) {
- $static_output .= "Removing package...\n";
- update_output_window($static_output);
- pkg_delete($internal_name);
+ if (is_pkg_installed($pkg_name)) {
+ update_status(gettext("Removing package...") . "\n");
+ pkg_delete($pkg_name);
} else {
delete_package_xml($package_name);
}
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
/* Run <custom_php_resync_config_command> */
@@ -543,6 +614,28 @@ function read_package_config($package_name) {
return $pkg_info['package'][0];
}
+/* Read package configurationfile and return an array */
+function read_package_configurationfile($package_name) {
+ global $config, $g;
+
+ $pkg_config = array();
+ $id = get_package_id($package_name);
+
+ if ($id < 0 || !isset($config['installedpackages']['package'][$id]['configurationfile'])) {
+ return $pkg_config;
+ }
+
+ $pkg_configurationfile = $config['installedpackages']['package'][$id]['configurationfile'];
+
+ if (empty($pkg_configurationfile) || !file_exists('/usr/local/pkg/' . $pkg_configurationfile)) {
+ return $pkg_config;
+ }
+
+ $pkg_config = parse_xml_config_pkg('/usr/local/pkg/' . $pkg_configurationfile, "packagegui");
+
+ return $pkg_config;
+}
+
function get_after_install_info($package_name) {
$pkg_config = read_package_config($package_name);
@@ -566,18 +659,8 @@ function eval_once($toeval) {
return;
}
-function install_package($package_name) {
- global $g, $config, $static_output, $pkg_interface;
-
- if ($pkg_interface == "console") {
- echo "\n";
- }
-
- return pkg_install($package_name);
-}
-
function install_package_xml($package_name) {
- global $g, $config, $static_output, $pkg_interface;
+ global $g, $config, $pkg_interface;
if (($pkg_info = read_package_config($package_name)) == false) {
return false;
@@ -588,13 +671,10 @@ function install_package_xml($package_name) {
pkg_debug(gettext("Beginning package installation.") . "\n");
log_error(sprintf(gettext('Beginning package installation for %s .'), $pkg_info['name']));
- $static_output .= sprintf(gettext("Beginning package installation for %s .\n"), $pkg_info['name']);
- update_status($static_output);
/* add package information to config.xml */
$pkgid = get_package_id($pkg_info['name']);
- $static_output .= gettext("Saving updated package information...") . " ";
- update_output_window($static_output);
+ update_status(gettext("Saving updated package information...") . "\n");
if ($pkgid == -1) {
$config['installedpackages']['package'][] = $pkg_info;
$changedesc = sprintf(gettext("Installed %s package."), $pkg_info['name']);
@@ -607,37 +687,26 @@ function install_package_xml($package_name) {
unlink_if_exists('/conf/needs_package_sync');
write_config("Intermediate config write during package install for {$pkg_info['name']}.");
conf_mount_ro();
- $static_output .= $to_output;
- update_output_window($static_output);
+ update_status($to_output);
if (($pkgid = get_package_id($package_name)) == -1) {
- $static_output .= sprintf(gettext("The %s package is not installed.%sInstallation aborted."), $package_name, "\n\n");
- update_output_window($static_output);
- if ($pkg_interface <> "console") {
- echo "\n<script>document.getElementById('progressbar').style.visibility='hidden';</script>";
- echo "\n<script>document.getElementById('progholder').style.visibility='hidden';</script>";
- }
+ update_status(sprintf(gettext("The %s package is not installed.%sInstallation aborted."), $package_name, "\n\n"));
uninstall_package($package_name);
write_config($changedesc);
log_error(sprintf(gettext("Failed to install package: %s."), $pkg_info['name']));
- $static_output .= gettext("Failed to install package.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("Failed to install package.") . "\n");
return false;
}
- $configfile = substr(strrchr($pkg_info['config_file'], '/'), 1);
- if (file_exists("/usr/local/pkg/" . $configfile)) {
- $static_output .= gettext("Loading package configuration... ");
- update_output_window($static_output);
- $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $configfile, "packagegui");
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
- $static_output .= gettext("Configuring package components...\n");
+ if (file_exists("/usr/local/pkg/" . $pkg_info['configurationfile'])) {
+ update_status(gettext("Loading package configuration... "));
+ $pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $pkg_info['configurationfile'], "packagegui");
+ update_status(gettext("done.") . "\n");
+ update_status(gettext("Configuring package components...") . "\n");
if (!empty($pkg_config['filter_rules_needed'])) {
$config['installedpackages']['package'][$pkgid]['filter_rule_function'] = $pkg_config['filter_rules_needed'];
}
- update_output_window($static_output);
/* modify system files */
/* if a require exists, include it. this will
@@ -646,56 +715,45 @@ function install_package_xml($package_name) {
*/
$missing_include = false;
if ($pkg_config['include_file'] <> "") {
- $static_output .= gettext("Loading package instructions...") . "\n";
- update_output_window($static_output);
+ update_status(gettext("Loading package instructions...") . "\n");
if (file_exists($pkg_config['include_file'])) {
pkg_debug("require_once('{$pkg_config['include_file']}')\n");
require_once($pkg_config['include_file']);
} else {
pkg_debug("Missing include {$pkg_config['include_file']}\n");
$missing_include = true;
- $static_output .= "Include " . basename($pkg_config['include_file']) . " is missing!\n";
- update_output_window($static_output);
+ update_status("Include " . basename($pkg_config['include_file']) . " is missing!\n");
uninstall_package($package_name);
write_config($changedesc);
log_error(sprintf(gettext("Failed to install package: %s."), $pkg_info['name']));
- $static_output .= gettext("Failed to install package.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("Failed to install package.") . "\n");
return false;
}
}
/* custom commands */
- $static_output .= gettext("Custom commands...") . "\n";
- update_output_window($static_output);
+ update_status(gettext("Custom commands...") . "\n");
if ($missing_include == false) {
if ($pkg_config['custom_php_global_functions'] <> "") {
- $static_output .= gettext("Executing custom_php_global_functions()...");
- update_output_window($static_output);
+ update_status(gettext("Executing custom_php_global_functions()..."));
eval_once($pkg_config['custom_php_global_functions']);
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
if ($pkg_config['custom_php_install_command']) {
- $static_output .= gettext("Executing custom_php_install_command()...");
- update_output_window($static_output);
+ update_status(gettext("Executing custom_php_install_command()..."));
eval_once($pkg_config['custom_php_install_command']);
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
if ($pkg_config['custom_php_resync_config_command'] <> "") {
- $static_output .= gettext("Executing custom_php_resync_config_command()...");
- update_output_window($static_output);
+ update_status(gettext("Executing custom_php_resync_config_command()..."));
eval_once($pkg_config['custom_php_resync_config_command']);
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
}
/* sidebar items */
if (is_array($pkg_config['menu'])) {
- $static_output .= gettext("Menu items... ");
- update_output_window($static_output);
+ update_status(gettext("Menu items... "));
foreach ($pkg_config['menu'] as $menu) {
if (is_array($config['installedpackages']['menu'])) {
foreach ($config['installedpackages']['menu'] as $amenu) {
@@ -708,13 +766,11 @@ function install_package_xml($package_name) {
}
$config['installedpackages']['menu'][] = $menu;
}
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
/* services */
if (is_array($pkg_config['service'])) {
- $static_output .= gettext("Services... ");
- update_output_window($static_output);
+ update_status(gettext("Services... "));
foreach ($pkg_config['service'] as $service) {
if (is_array($config['installedpackages']['service'])) {
foreach ($config['installedpackages']['service'] as $aservice) {
@@ -727,24 +783,17 @@ function install_package_xml($package_name) {
}
$config['installedpackages']['service'][] = $service;
}
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
} else {
pkg_debug("Unable to find config file\n");
- $static_output .= gettext("Loading package configuration... failed!") . "\n\n" . gettext("Installation aborted.");
- update_output_window($static_output);
+ update_status(gettext("Loading package configuration... failed!") . "\n\n" . gettext("Installation aborted."));
pkg_debug(gettext("Unable to load package configuration. Installation aborted.") ."\n");
- if ($pkg_interface <> "console") {
- echo "\n<script>document.getElementById('progressbar').style.visibility='hidden';</script>";
- echo "\n<script>document.getElementById('progholder').style.visibility='hidden';</script>";
- }
uninstall_package($package_name);
write_config($changedesc);
log_error(sprintf(gettext("Failed to install package: %s."), $pkg_info['name']));
- $static_output .= gettext("Failed to install package.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("Failed to install package.") . "\n");
return false;
}
@@ -753,57 +802,32 @@ function install_package_xml($package_name) {
system_syslogd_start();
}
- $static_output .= gettext("Writing configuration... ");
- update_output_window($static_output);
+ update_status(gettext("Writing configuration... "));
write_config($changedesc);
log_error(sprintf(gettext("Successfully installed package: %s."), $pkg_info['name']));
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
if ($pkg_info['after_install_info']) {
- update_output_window($pkg_info['after_install_info']);
+ update_status($pkg_info['after_install_info']);
}
return true;
}
-function delete_package($package_name) {
- global $config, $g, $static_output;
-
- if (!is_package_installed($package_name)) {
- return;
- }
-
- $static_output .= sprintf(gettext("Starting package deletion for %s..."), $package_name);
- update_output_window($static_output);
-
- pkg_delete($package_name);
- $static_output .= "done.\n";
- update_output_window($static_output);
-
- return;
-}
-
function delete_package_xml($package_name, $when = "post-deinstall") {
- global $g, $config, $static_output, $pkg_interface;
+ global $g, $config, $pkg_interface;
conf_mount_rw();
$pkgid = get_package_id($package_name);
if ($pkgid == -1) {
- $static_output .= sprintf(gettext("The %s package is not installed.%sDeletion aborted."), $package_name, "\n\n");
- update_output_window($static_output);
- if ($pkg_interface <> "console") {
- echo "\n<script>document.getElementById('progressbar').style.visibility='hidden';</script>";
- echo "\n<script>document.getElementById('progholder').style.visibility='hidden';</script>";
- }
+ update_status(sprintf(gettext("The %s package is not installed.%sDeletion aborted."), $package_name, "\n\n"));
ob_flush();
sleep(1);
conf_mount_ro();
return;
}
pkg_debug(sprintf(gettext("Removing %s package... "), $package_name));
- $static_output .= sprintf(gettext("Removing %s components..."), $package_name) . "\n";
- update_output_window($static_output);
+ update_status(sprintf(gettext("Removing %s components..."), $package_name) . "\n");
/* parse package configuration */
$packages = &$config['installedpackages']['package'];
$menus =& $config['installedpackages']['menu'];
@@ -813,8 +837,7 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
$pkg_config = parse_xml_config_pkg("/usr/local/pkg/" . $packages[$pkgid]['configurationfile'], "packagegui");
/* remove menu items */
if (is_array($pkg_config['menu'])) {
- $static_output .= gettext("Menu items... ");
- update_output_window($static_output);
+ update_status(gettext("Menu items... "));
if (is_array($pkg_config['menu']) && is_array($menus)) {
foreach ($pkg_config['menu'] as $menu) {
foreach ($menus as $key => $instmenu) {
@@ -825,13 +848,11 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
}
}
}
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
/* remove services */
if (is_array($pkg_config['service'])) {
- $static_output .= gettext("Services... ");
- update_output_window($static_output);
+ update_status(gettext("Services... "));
if (is_array($pkg_config['service']) && is_array($services)) {
foreach ($pkg_config['service'] as $service) {
foreach ($services as $key => $instservice) {
@@ -853,8 +874,7 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
}
}
}
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
+ update_status(gettext("done.") . "\n");
}
/*
* XXX: Otherwise inclusion of config.inc again invalidates actions taken.
@@ -869,16 +889,14 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
*/
$missing_include = false;
if ($pkg_config['include_file'] <> "") {
- $static_output .= gettext("Loading package instructions...") . "\n";
- update_output_window($static_output);
+ update_status(gettext("Loading package instructions...") . "\n");
if (file_exists($pkg_config['include_file'])) {
pkg_debug("require_once(\"{$pkg_config['include_file']}\")\n");
require_once($pkg_config['include_file']);
} else {
pkg_debug("Missing include {$pkg_config['include_file']}\n");
$missing_include = true;
- update_output_window($static_output);
- $static_output .= "Include file " . basename($pkg_config['include_file']) . " could not be found for inclusion.\n";
+ update_status("Include file " . basename($pkg_config['include_file']) . " could not be found for inclusion.\n");
}
}
/* ermal
@@ -896,35 +914,31 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
}
/* deinstall commands */
if ($when == "post-deinstall" && $pkg_config['custom_php_deinstall_command'] <> "") {
- $static_output .= gettext("Deinstall commands... ");
- update_output_window($static_output);
+ update_status(gettext("Deinstall commands... "));
if ($missing_include == false) {
eval_once($pkg_config['custom_php_deinstall_command']);
- $static_output .= gettext("done.") . "\n";
+ update_status(gettext("done.") . "\n");
} else {
- $static_output .= "\nNot executing custom deinstall hook because an include is missing.\n";
+ update_status("\nNot executing custom deinstall hook because an include is missing.\n");
}
- update_output_window($static_output);
}
}
/* syslog */
$need_syslog_restart = false;
if (is_array($pkg_info['logging']) && $pkg_info['logging']['logfilename'] <> "") {
- $static_output .= "Syslog entries... ";
- update_output_window($static_output);
+ update_status("Syslog entries... ");
@unlink("{$g['varlog_path']}/{$pkg_info['logging']['logfilename']}");
- $static_output .= "done.\n";
- update_output_window($static_output);
+ update_status("done.\n");
$need_syslog_restart = true;
}
- /* remove config.xml entries */
- $static_output .= gettext("Configuration... ");
- update_output_window($static_output);
- unset($config['installedpackages']['package'][$pkgid]);
- $static_output .= gettext("done.") . "\n";
- update_output_window($static_output);
- write_config("Removed {$package_name} package.\n");
+ if ($when == "post-deinstall") {
+ /* remove config.xml entries */
+ update_status(gettext("Configuration... "));
+ unset($config['installedpackages']['package'][$pkgid]);
+ update_status(gettext("done.") . "\n");
+ write_config("Removed {$package_name} package.\n");
+ }
/* remove package entry from /etc/syslog.conf if needed */
/* this must be done after removing the entries from config.xml */
@@ -935,11 +949,68 @@ function delete_package_xml($package_name, $when = "post-deinstall") {
conf_mount_ro();
}
-function pkg_reinstall_all() {
- global $g, $config;
+/*
+ * Used during upgrade process or retore backup process, verify all
+ * packages installed in config.xml and install pkg accordingly
+ */
+function package_reinstall_all() {
+ global $g, $config, $pkg_interface;
- // XXX: implement
- return;
+ if (!isset($config['installedpackages']['package']) ||
+ !is_array($config['installedpackages']['package'])) {
+ return true;
+ }
+
+ $upgrade = (file_exists('/conf/needs_package_sync') && platform_booting());
+
+ /* During boot after upgrade, wait for internet connection */
+ if ($upgrade) {
+ update_status(gettext("Waiting for internet connection to update pkg metadata and fini package reinstallation"));
+ while (true) {
+ if (pkg_update(true)) {
+ break;
+ }
+ update_status('.');
+ sleep(1);
+ }
+ update_status("\n");
+ } else {
+ if (!pkg_update()) {
+ return false;
+ }
+ }
+
+ $pkg_info = get_pkg_info();
+
+ foreach ($config['installedpackages']['package'] as $package) {
+ $found = false;
+ $internal_name = get_package_internal_name($package);
+ foreach ($pkg_info as $pkg) {
+ pkg_remove_prefix($pkg['name']);
+ if ($pkg['name'] == $internal_name) {
+ $found = true;
+ break;
+ }
+ }
+
+ if (!$found) {
+ if (!function_exists("file_notice")) {
+ require_once("notices.inc");
+ }
+
+ file_notice(gettext("Package reinstall"),
+ sprintf(gettext("Package %s does not exist in current %s version and it has been removed."), $package['name'], $g['product_name']));
+ uninstall_package($package['name']);
+ }
+ }
+
+ /* Obsoleted packages were removed, lets reinstall all remaining */
+ foreach ($config['installedpackages']['package'] as $package) {
+ $internal_name = get_package_internal_name($package);
+ pkg_install($g['pkg_prefix'] . $internal_name, true);
+ }
+
+ return true;
}
function stop_packages() {
@@ -992,14 +1063,101 @@ function stop_packages() {
}
}
-function verify_all_package_servers() {
- // XXX: Remove it after GUI is ready
- return true;
+/* Identify which meta package is installed */
+function get_meta_pkg_name() {
+ global $g;
+
+ /* XXX: Use pkg annotation */
+ if (is_pkg_installed($g['product_name'])) {
+ return $g['product_name'];
+ } else if (is_pkg_installed($g['product_name'] . '-vmware')) {
+ return $g['product_name'] . '-vmware';
+ }
+ return false;
}
-function check_package_server_ssl() {
- // XXX: Remove it after GUI is ready
- return true;
+/* Identify which base package is installed */
+function get_base_pkg_name() {
+ global $g;
+
+ /* XXX: Use pkg annotation */
+ if (is_pkg_installed($g['product_name'] . '-base-' . $g['platform'])) {
+ return $g['product_name'];
+ return $g['product_name'] . '-base-' . $g['platform'];
+ } else if (is_pkg_installed($g['product_name'] . '-base')) {
+ return $g['product_name'] . '-base';
+ }
+ return false;
+}
+
+/* Verify if system needs upgrade (meta package or base) */
+function get_system_pkg_version() {
+ global $g;
+
+ $base_pkg = get_base_pkg_name();
+ $meta_pkg = get_meta_pkg_name();
+
+ if (!$base_pkg || !$meta_pkg) {
+ return false;
+ }
+
+ $info = get_pkg_info($base_pkg);
+ $pkg_name = $base_pkg;
+
+ $pkg_info = array();
+ foreach ($info as $item) {
+ if ($item['name'] == $base_pkg) {
+ $pkg_info = $item;
+ }
+ }
+
+ if (empty($pkg_info) ||
+ $pkg_info['version'] == $pkg_info['installed_version']) {
+ $info = get_pkg_info($meta_pkg);
+ $pkg_name = $meta_pkg;
+
+ foreach ($info as $item) {
+ if ($item['name'] == $meta_pkg) {
+ $pkg_info = $item;
+ }
+ }
+ }
+
+ if (empty($pkg_info)) {
+ return false;
+ }
+
+ return array(
+ 'pkg_name' => $pkg_name,
+ 'version' => $pkg_info['version'],
+ 'installed_version' => $pkg_info['installed_version']
+ );
+}
+
+/* Switch between stable and devel repos */
+function pkg_switch_repo($devel = false) {
+ global $g;
+
+ $repo_stable = $g['product_name'] . '-repo';
+ $repo_devel = $g['product_name'] . '-repo-devel';
+
+ if ($devel) {
+ $repo_target = $repo_devel;
+ } else {
+ $repo_target = $repo_stable;
+ }
+
+ if (is_pkg_installed($repo_target)) {
+ /* It's already installed */
+ return true;
+ }
+
+ /*
+ * Since both install files in the same place, just
+ * call pkg_install for target and current one will
+ * be replaced
+ */
+ return pkg_install($repo_target, true);
}
?>
diff --git a/src/etc/inc/priv.defs.inc b/src/etc/inc/priv.defs.inc
index 7d2154f..06d0418 100644
--- a/src/etc/inc/priv.defs.inc
+++ b/src/etc/inc/priv.defs.inc
@@ -1,6 +1,13 @@
<?php
/*
- * priv.defs.inc - Generated privilege definitions
+ * priv.defs.inc - Default Privilege Definitions
+ * Generated by pfSense/tools/scripts/generate-privdefs.php
+ *
+ * ***************************************************
+ * DO NOT EDIT THIS FILE. IT IS GENERATED BY A SCRIPT.
+ * ***************************************************
+ *
+ * Text is pulled from metadata headers in the referenced files.
*
*/
@@ -13,10 +20,10 @@ $priv_list['page-all']['match'] = array();
$priv_list['page-all']['match'][] = "*";
$priv_list['page-status-carp'] = array();
-$priv_list['page-status-carp']['name'] = gettext("WebCfg - Status: CARP page");
+$priv_list['page-status-carp']['name'] = gettext("WebCfg - Status: CARP");
$priv_list['page-status-carp']['descr'] = gettext("Allow access to the 'Status: CARP' page.");
$priv_list['page-status-carp']['match'] = array();
-$priv_list['page-status-carp']['match'][] = "carp_status.php*";
+$priv_list['page-status-carp']['match'][] = "status_carp.php*";
$priv_list['page-diagnostics-crash-reporter'] = array();
$priv_list['page-diagnostics-crash-reporter']['name'] = gettext("WebCfg - Crash reporter");
@@ -25,196 +32,124 @@ $priv_list['page-diagnostics-crash-reporter']['match'] = array();
$priv_list['page-diagnostics-crash-reporter']['match'][] = "crash_reporter.php*";
$priv_list['page-diagnostics-arptable'] = array();
-$priv_list['page-diagnostics-arptable']['name'] = gettext("WebCfg - Diagnostics: ARP Table page");
+$priv_list['page-diagnostics-arptable']['name'] = gettext("WebCfg - Diagnostics: ARP Table");
$priv_list['page-diagnostics-arptable']['descr'] = gettext("Allow access to the 'Diagnostics: ARP Table' page.");
$priv_list['page-diagnostics-arptable']['match'] = array();
$priv_list['page-diagnostics-arptable']['match'][] = "diag_arp.php*";
$priv_list['page-diagnostics-authentication'] = array();
-$priv_list['page-diagnostics-authentication']['name'] = gettext("WebCfg - Diagnostics: Authentication page");
+$priv_list['page-diagnostics-authentication']['name'] = gettext("WebCfg - Diagnostics: Authentication");
$priv_list['page-diagnostics-authentication']['descr'] = gettext("Allow access to the 'Diagnostics: Authentication' page.");
$priv_list['page-diagnostics-authentication']['match'] = array();
$priv_list['page-diagnostics-authentication']['match'][] = "diag_authentication.php*";
$priv_list['page-diagnostics-backup/restore'] = array();
-$priv_list['page-diagnostics-backup/restore']['name'] = gettext("WebCfg - Diagnostics: Backup/restore page");
+$priv_list['page-diagnostics-backup/restore']['name'] = gettext("WebCfg - Diagnostics: Backup/restore");
$priv_list['page-diagnostics-backup/restore']['descr'] = gettext("Allow access to the 'Diagnostics: Backup/restore' page.");
$priv_list['page-diagnostics-backup/restore']['match'] = array();
$priv_list['page-diagnostics-backup/restore']['match'][] = "diag_backup.php*";
$priv_list['page-diagnostics-configurationhistory'] = array();
-$priv_list['page-diagnostics-configurationhistory']['name'] = gettext("WebCfg - Diagnostics: Configuration History page");
+$priv_list['page-diagnostics-configurationhistory']['name'] = gettext("WebCfg - Diagnostics: Configuration History");
$priv_list['page-diagnostics-configurationhistory']['descr'] = gettext("Allow access to the 'Diagnostics: Configuration History' page.");
$priv_list['page-diagnostics-configurationhistory']['match'] = array();
$priv_list['page-diagnostics-configurationhistory']['match'][] = "diag_confbak.php*";
$priv_list['page-diagnostics-factorydefaults'] = array();
-$priv_list['page-diagnostics-factorydefaults']['name'] = gettext("WebCfg - Diagnostics: Factory defaults page");
+$priv_list['page-diagnostics-factorydefaults']['name'] = gettext("WebCfg - Diagnostics: Factory defaults");
$priv_list['page-diagnostics-factorydefaults']['descr'] = gettext("Allow access to the 'Diagnostics: Factory defaults' page.");
$priv_list['page-diagnostics-factorydefaults']['match'] = array();
$priv_list['page-diagnostics-factorydefaults']['match'][] = "diag_defaults.php*";
-$priv_list['page-diagnostics-ndptable'] = array();
-$priv_list['page-diagnostics-ndptable']['name'] = gettext("Webcfg - Diagnostics: NDP Table page");
-$priv_list['page-diagnostics-ndptable']['descr'] = gettext("Allow access to the 'Diagnostics: NDP Table' page.");
-$priv_list['page-diagnostics-ndptable']['match'] = array();
-$priv_list['page-diagnostics-ndptable']['match'][] = "diag_ndp.php*";
-
-$priv_list['page-diagnostics-restore-full-backup'] = array();
-$priv_list['page-diagnostics-restore-full-backup']['name'] = gettext("Webcfg - Diagnostics: Restore full backup");
-$priv_list['page-diagnostics-restore-full-backup']['descr'] = gettext("Allow access to the 'Diagnostics: Restore Full Backup' page.");
-$priv_list['page-diagnostics-restore-full-backup']['match'] = array();
-$priv_list['page-diagnostics-restore-full-backup']['match'][] = "system_firmware_restorefullbackup.php";
+$priv_list['page-diagnostics-dns'] = array();
+$priv_list['page-diagnostics-dns']['name'] = gettext("WebCfg - Diagnostics: DNS Lookup");
+$priv_list['page-diagnostics-dns']['descr'] = gettext("Allow access to the 'Diagnostics: DNS Lookup' page.");
+$priv_list['page-diagnostics-dns']['match'] = array();
+$priv_list['page-diagnostics-dns']['match'][] = "diag_dns.php*";
$priv_list['page-diagnostics-showstates'] = array();
-$priv_list['page-diagnostics-showstates']['name'] = gettext("WebCfg - Diagnostics: Show States page");
+$priv_list['page-diagnostics-showstates']['name'] = gettext("WebCfg - Diagnostics: Show States");
$priv_list['page-diagnostics-showstates']['descr'] = gettext("Allow access to the 'Diagnostics: Show States' page.");
$priv_list['page-diagnostics-showstates']['match'] = array();
$priv_list['page-diagnostics-showstates']['match'][] = "diag_dump_states.php*";
-$priv_list['page-diagnostics-sockets'] = array();
-$priv_list['page-diagnostics-sockets']['name'] = gettext("WebCfg - Diagnostics: Sockets page");
-$priv_list['page-diagnostics-sockets']['descr'] = gettext("Allow access to the 'Diagnostics: Sockets' page.");
-$priv_list['page-diagnostics-sockets']['match'] = array();
-$priv_list['page-diagnostics-sockets']['match'][] = "diag_sockets.php*";
+$priv_list['page-diagnostics-sourcetracking'] = array();
+$priv_list['page-diagnostics-sourcetracking']['name'] = gettext("WebCfg - Diagnostics: Show Source Tracking");
+$priv_list['page-diagnostics-sourcetracking']['descr'] = gettext("Allow access to the 'Diagnostics: Show Source Tracking' page.");
+$priv_list['page-diagnostics-sourcetracking']['match'] = array();
+$priv_list['page-diagnostics-sourcetracking']['match'][] = "diag_dump_states_sources.php*";
-$priv_list['page-diagnostics-testport'] = array();
-$priv_list['page-diagnostics-testport']['name'] = gettext("Webcfg - Diagnostics: Test Port");
-$priv_list['page-diagnostics-testport']['descr'] = gettext("Allow access to the 'Diagnostics: Test Port' page.");
-$priv_list['page-diagnostics-testport']['match'] = array();
-$priv_list['page-diagnostics-testport']['match'][] = "diag_testport.php*";
+$priv_list['page-diagnostics-gmirror'] = array();
+$priv_list['page-diagnostics-gmirror']['name'] = gettext("WebCfg - Diagnostics: GEOM Mirrors");
+$priv_list['page-diagnostics-gmirror']['descr'] = gettext("Allow access to the 'Diagnostics: GEOM Mirrors' page.");
+$priv_list['page-diagnostics-gmirror']['match'] = array();
+$priv_list['page-diagnostics-gmirror']['match'][] = "diag_gmirror.php*";
$priv_list['page-status-ipsec'] = array();
-$priv_list['page-status-ipsec']['name'] = gettext("WebCfg - Status: IPsec page");
+$priv_list['page-status-ipsec']['name'] = gettext("WebCfg - Status: IPsec");
$priv_list['page-status-ipsec']['descr'] = gettext("Allow access to the 'Status: IPsec' page.");
$priv_list['page-status-ipsec']['match'] = array();
-$priv_list['page-status-ipsec']['match'][] = "diag_ipsec.php*";
+$priv_list['page-status-ipsec']['match'][] = "status_ipsec.php*";
$priv_list['page-status-ipsec-leases'] = array();
-$priv_list['page-status-ipsec-leases']['name'] = gettext("WebCfg - Status: IPsec: Leasespage");
+$priv_list['page-status-ipsec-leases']['name'] = gettext("WebCfg - Status: IPsec: Leases");
$priv_list['page-status-ipsec-leases']['descr'] = gettext("Allow access to the 'Status: IPsec: Leases' page.");
$priv_list['page-status-ipsec-leases']['match'] = array();
-$priv_list['page-status-ipsec-leases']['match'][] = "diag_ipsec_leases.php*";
+$priv_list['page-status-ipsec-leases']['match'][] = "status_ipsec_leases.php*";
$priv_list['page-status-ipsec-sad'] = array();
-$priv_list['page-status-ipsec-sad']['name'] = gettext("WebCfg - Status: IPsec: SAD page");
+$priv_list['page-status-ipsec-sad']['name'] = gettext("WebCfg - Status: IPsec: SAD");
$priv_list['page-status-ipsec-sad']['descr'] = gettext("Allow access to the 'Status: IPsec: SAD' page.");
$priv_list['page-status-ipsec-sad']['match'] = array();
-$priv_list['page-status-ipsec-sad']['match'][] = "diag_ipsec_sad.php*";
+$priv_list['page-status-ipsec-sad']['match'][] = "status_ipsec_sad.php*";
$priv_list['page-status-ipsec-spd'] = array();
-$priv_list['page-status-ipsec-spd']['name'] = gettext("WebCfg - Status: IPsec: SPD page");
+$priv_list['page-status-ipsec-spd']['name'] = gettext("WebCfg - Status: IPsec: SPD");
$priv_list['page-status-ipsec-spd']['descr'] = gettext("Allow access to the 'Status: IPsec: SPD' page.");
$priv_list['page-status-ipsec-spd']['match'] = array();
-$priv_list['page-status-ipsec-spd']['match'][] = "diag_ipsec_spd.php*";
+$priv_list['page-status-ipsec-spd']['match'][] = "status_ipsec_spd.php*";
-$priv_list['page-status-ntp'] = array();
-$priv_list['page-status-ntp']['name'] = gettext("Webcfg - Status: NTP page");
-$priv_list['page-status-ntp']['descr'] = gettext("Allow access to the 'Status: NTP' page.");
-$priv_list['page-status-ntp']['match'] = array();
-$priv_list['page-status-ntp']['match'][] = "status_ntpd.php*";
-
-$priv_list['page-ipsecxml'] = array();
-$priv_list['page-ipsecxml']['name'] = gettext("WebCfg - Diag IPsec XML page");
-$priv_list['page-ipsecxml']['descr'] = gettext("Allow access to the 'Diag IPsec XML' page.");
-$priv_list['page-ipsecxml']['match'] = array();
-$priv_list['page-ipsecxml']['match'][] = "diag_ipsec_xml.php";
+$priv_list['page-diagnostics-limiter-info'] = array();
+$priv_list['page-diagnostics-limiter-info']['name'] = gettext("WebCfg - Diagnostics: Limiter Info");
+$priv_list['page-diagnostics-limiter-info']['descr'] = gettext("Allows access to the 'Diagnostics: Limiter Info' page");
+$priv_list['page-diagnostics-limiter-info']['match'] = array();
+$priv_list['page-diagnostics-limiter-info']['match'][] = "diag_limiter_info.php*";
$priv_list['page-diagnostics-logs-system'] = array();
-$priv_list['page-diagnostics-logs-system']['name'] = gettext("WebCfg - Diagnostics: Logs: System page");
-$priv_list['page-diagnostics-logs-system']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: System' page.");
+$priv_list['page-diagnostics-logs-system']['name'] = gettext("WebCfg - Status: Logs: System");
+$priv_list['page-diagnostics-logs-system']['descr'] = gettext("Allow access to the 'Status: System Logs: General' page.");
$priv_list['page-diagnostics-logs-system']['match'] = array();
-$priv_list['page-diagnostics-logs-system']['match'][] = "diag_logs.php*";
-
-$priv_list['page-status-systemlogs-portalauth'] = array();
-$priv_list['page-status-systemlogs-portalauth']['name'] = gettext("WebCfg - Status: System logs: Portal Auth page");
-$priv_list['page-status-systemlogs-portalauth']['descr'] = gettext("Allow access to the 'Status: System logs: Portal Auth' page.");
-$priv_list['page-status-systemlogs-portalauth']['match'] = array();
-$priv_list['page-status-systemlogs-portalauth']['match'][] = "diag_logs_auth.php*";
-
-$priv_list['page-diagnostics-logs-dhcp'] = array();
-$priv_list['page-diagnostics-logs-dhcp']['name'] = gettext("WebCfg - Diagnostics: Logs: DHCP page");
-$priv_list['page-diagnostics-logs-dhcp']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: DHCP' page.");
-$priv_list['page-diagnostics-logs-dhcp']['match'] = array();
-$priv_list['page-diagnostics-logs-dhcp']['match'][] = "diag_logs_dhcp.php*";
+$priv_list['page-diagnostics-logs-system']['match'][] = "status_logs.php";
$priv_list['page-diagnostics-logs-firewall'] = array();
-$priv_list['page-diagnostics-logs-firewall']['name'] = gettext("WebCfg - Diagnostics: Logs: Firewall page");
-$priv_list['page-diagnostics-logs-firewall']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: Firewall' page.");
+$priv_list['page-diagnostics-logs-firewall']['name'] = gettext("WebCfg - Status: Logs: Firewall");
+$priv_list['page-diagnostics-logs-firewall']['descr'] = gettext("Allow access to the 'Status: Logs: Firewall' page.");
$priv_list['page-diagnostics-logs-firewall']['match'] = array();
-$priv_list['page-diagnostics-logs-firewall']['match'][] = "diag_logs_filter.php*";
-
-$priv_list['page-diagnostics-logs-gateways'] = array();
-$priv_list['page-diagnostics-logs-gateways']['name'] = gettext("WebCfg - Diagnostics: Logs: Gateways page");
-$priv_list['page-diagnostics-logs-gateways']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: System: Gateways' page.");
-$priv_list['page-diagnostics-logs-gateways']['match'] = array();
-$priv_list['page-diagnostics-logs-gateways']['match'][] = "diag_logs_gateways.php*";
-
-$priv_list['page-diagnostics-logs-resolver'] = array();
-$priv_list['page-diagnostics-logs-resolver']['name'] = gettext("WebCfg - Diagnostics: Logs: Resolver page");
-$priv_list['page-diagnostics-logs-resolver']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: System: Resolver' page.");
-$priv_list['page-diagnostics-logs-resolver']['match'] = array();
-$priv_list['page-diagnostics-logs-resolver']['match'][] = "diag_logs_resolver.php*";
-
-$priv_list['page-hidden-nolongerincluded'] = array();
-$priv_list['page-hidden-nolongerincluded']['name'] = gettext("WebCfg - Hidden: No longer included page");
-$priv_list['page-hidden-nolongerincluded']['descr'] = gettext("Allow access to the 'Hidden: No longer included' page.");
-$priv_list['page-hidden-nolongerincluded']['match'] = array();
-$priv_list['page-hidden-nolongerincluded']['match'][] = "diag_logs_filter_dynamic.php*";
-
-$priv_list['page-status-systemlogs-ipsecvpn'] = array();
-$priv_list['page-status-systemlogs-ipsecvpn']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN page");
-$priv_list['page-status-systemlogs-ipsecvpn']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page.");
-$priv_list['page-status-systemlogs-ipsecvpn']['match'] = array();
-$priv_list['page-status-systemlogs-ipsecvpn']['match'][] = "diag_logs_ipsec.php*";
-
-$priv_list['page-status-systemlogs-ntpd'] = array();
-$priv_list['page-status-systemlogs-ntpd']['name'] = gettext("WebCfg - Status: System logs: NTP page");
-$priv_list['page-status-systemlogs-ntpd']['descr'] = gettext("Allow access to the 'Status: System logs: NTP' page.");
-$priv_list['page-status-systemlogs-ntpd']['match'] = array();
-$priv_list['page-status-systemlogs-ntpd']['match'][] = "diag_logs_ntpd.php*";
-
-$priv_list['page-status-systemlogs-openvpn'] = array();
-$priv_list['page-status-systemlogs-openvpn']['name'] = gettext("WebCfg - Status: System logs: OpenVPN page");
-$priv_list['page-status-systemlogs-openvpn']['descr'] = gettext("Allow access to the 'Status: System logs: OpenVPN' page.");
-$priv_list['page-status-systemlogs-openvpn']['match'] = array();
-$priv_list['page-status-systemlogs-openvpn']['match'][] = "diag_logs_openvpn.php*";
-
-$priv_list['page-status-systemlogs-ppp'] = array();
-$priv_list['page-status-systemlogs-ppp']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN page");
-$priv_list['page-status-systemlogs-ppp']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page.");
-$priv_list['page-status-systemlogs-ppp']['match'] = array();
-$priv_list['page-status-systemlogs-ppp']['match'][] = "diag_logs_ppp.php*";
-
-$priv_list['page-status-systemlogs-loadbalancer'] = array();
-$priv_list['page-status-systemlogs-loadbalancer']['name'] = gettext("WebCfg - Status: System logs: Load Balancer page");
-$priv_list['page-status-systemlogs-loadbalancer']['descr'] = gettext("Allow access to the 'Status: System logs: Load Balancer' page.");
-$priv_list['page-status-systemlogs-loadbalancer']['match'] = array();
-$priv_list['page-status-systemlogs-loadbalancer']['match'][] = "diag_logs_relayd.php*";
-
-$priv_list['page-status-systemlogs-routing'] = array();
-$priv_list['page-status-systemlogs-routing']['name'] = gettext("Webcfg - Status: System logs: Routing page");
-$priv_list['page-status-systemlogs-routing']['descr'] = gettext("Allow access to the 'Status: System logs: System: Routing' page.");
-$priv_list['page-status-systemlogs-routing']['match'] = array();
-$priv_list['page-status-systemlogs-routing']['match'][] = "diag_logs_routing.php*";
-
-$priv_list['page-status-systemlogs-wireless'] = array();
-$priv_list['page-status-systemlogs-wireless']['name'] = gettext("Webcfg - Status: System logs: Wireless page");
-$priv_list['page-status-systemlogs-wireless']['descr'] = gettext("Allow access to the 'Status: System logs: System: Wireless' page.");
-$priv_list['page-status-systemlogs-wireless']['match'] = array();
-$priv_list['page-status-systemlogs-wireless']['match'][] = "diag_logs_wireless.php*";
+$priv_list['page-diagnostics-logs-firewall']['match'][] = "status_logs_filter.php*";
+
+$priv_list['page-diagnostics-logs-firewall-dynamic'] = array();
+$priv_list['page-diagnostics-logs-firewall-dynamic']['name'] = gettext("WebCfg - Status: System Logs: Firewall (Dynamic View)");
+$priv_list['page-diagnostics-logs-firewall-dynamic']['descr'] = gettext("Allow access to the 'Status: System Logs: Firewall (Dynamic View)' page");
+$priv_list['page-diagnostics-logs-firewall-dynamic']['match'] = array();
+$priv_list['page-diagnostics-logs-firewall-dynamic']['match'][] = "status_logs_filter_dynamic.php*";
+
+$priv_list['page-diagnostics-logs-firewall-summary'] = array();
+$priv_list['page-diagnostics-logs-firewall-summary']['name'] = gettext("WebCfg - Status: System Logs: Firewall Log Summary");
+$priv_list['page-diagnostics-logs-firewall-summary']['descr'] = gettext("Allow access to the 'Status: System Logs: Firewall Log Summary' page");
+$priv_list['page-diagnostics-logs-firewall-summary']['match'] = array();
+$priv_list['page-diagnostics-logs-firewall-summary']['match'][] = "status_logs_filter_summary.php*";
$priv_list['page-diagnostics-logs-settings'] = array();
-$priv_list['page-diagnostics-logs-settings']['name'] = gettext("WebCfg - Diagnostics: Logs: Settings page");
-$priv_list['page-diagnostics-logs-settings']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: Settings' page.");
+$priv_list['page-diagnostics-logs-settings']['name'] = gettext("WebCfg - Status: Logs: Settings");
+$priv_list['page-diagnostics-logs-settings']['descr'] = gettext("Allow access to the 'Status: Logs: Settings' page.");
$priv_list['page-diagnostics-logs-settings']['match'] = array();
-$priv_list['page-diagnostics-logs-settings']['match'][] = "diag_logs_settings.php*";
+$priv_list['page-diagnostics-logs-settings']['match'][] = "status_logs_settings.php*";
$priv_list['page-diagnostics-logs-pptpvpn'] = array();
-$priv_list['page-diagnostics-logs-pptpvpn']['name'] = gettext("WebCfg - Diagnostics: Logs: VPN page");
-$priv_list['page-diagnostics-logs-pptpvpn']['descr'] = gettext("Allow access to the 'Diagnostics: Logs: VPN' page.");
+$priv_list['page-diagnostics-logs-pptpvpn']['name'] = gettext("WebCfg - Status: Logs: VPN");
+$priv_list['page-diagnostics-logs-pptpvpn']['descr'] = gettext("Allow access to the 'Status: Logs: VPN' page.");
$priv_list['page-diagnostics-logs-pptpvpn']['match'] = array();
-$priv_list['page-diagnostics-logs-pptpvpn']['match'][] = "diag_logs_vpn.php*";
+$priv_list['page-diagnostics-logs-pptpvpn']['match'][] = "status_logs_vpn.php*";
$priv_list['page-diagnostics-nanobsd'] = array();
$priv_list['page-diagnostics-nanobsd']['name'] = gettext("WebCfg - Diagnostics: NanoBSD");
@@ -222,86 +157,104 @@ $priv_list['page-diagnostics-nanobsd']['descr'] = gettext("Allow access to the '
$priv_list['page-diagnostics-nanobsd']['match'] = array();
$priv_list['page-diagnostics-nanobsd']['match'][] = "diag_nanobsd.php*";
+$priv_list['page-diagnostics-ndptable'] = array();
+$priv_list['page-diagnostics-ndptable']['name'] = gettext("WebCfg - Diagnostics: NDP Table");
+$priv_list['page-diagnostics-ndptable']['descr'] = gettext("Allow access to the 'Diagnostics: NDP Table' page.");
+$priv_list['page-diagnostics-ndptable']['match'] = array();
+$priv_list['page-diagnostics-ndptable']['match'][] = "diag_ndp.php*";
+
$priv_list['page-diagnostics-packetcapture'] = array();
-$priv_list['page-diagnostics-packetcapture']['name'] = gettext("WebCfg - Diagnostics: Packet Capture page");
+$priv_list['page-diagnostics-packetcapture']['name'] = gettext("WebCfg - Diagnostics: Packet Capture");
$priv_list['page-diagnostics-packetcapture']['descr'] = gettext("Allow access to the 'Diagnostics: Packet Capture' page.");
$priv_list['page-diagnostics-packetcapture']['match'] = array();
$priv_list['page-diagnostics-packetcapture']['match'][] = "diag_packet_capture.php*";
-$priv_list['page-diagnostics-patters'] = array();
-$priv_list['page-diagnostics-patters']['name'] = gettext("WebCfg - Diagnostics: Patterns page");
-$priv_list['page-diagnostics-patters']['descr'] = gettext("Allow access to the 'Diagnostics: Patterns' page.");
-$priv_list['page-diagnostics-patters']['match'] = array();
-$priv_list['page-diagnostics-patters']['match'][] = "patterns.php*";
-
-$priv_list['page-diagnostics-limiter-info'] = array();
-$priv_list['page-diagnostics-limiter-info']['name'] = gettext("Diagnostics: Limiter Info");
-$priv_list['page-diagnostics-limiter-info']['descr'] = gettext("Allows access to the 'Diagnostics: Limiter Info' page");
-$priv_list['page-diagnostics-limiter-info']['match'] = array();
-$priv_list['page-diagnostics-limiter-info']['match'][] = "diag_limiter_info.php*";
-
$priv_list['page-diagnostics-pf-info'] = array();
-$priv_list['page-diagnostics-pf-info']['name'] = gettext("Diagnostics: pfInfo");
+$priv_list['page-diagnostics-pf-info']['name'] = gettext("WebCfg - Diagnostics: pfInfo");
$priv_list['page-diagnostics-pf-info']['descr'] = gettext("Allows access to the 'Diagnostics: pfInfo' page");
$priv_list['page-diagnostics-pf-info']['match'] = array();
$priv_list['page-diagnostics-pf-info']['match'][] = "diag_pf_info.php*";
-$priv_list['page-diagnostics-system-activity'] = array();
-$priv_list['page-diagnostics-system-activity']['name'] = gettext("WebCfg - Diagnostics: System Activity");
-$priv_list['page-diagnostics-system-activity']['descr'] = gettext("Allows access to the 'Diagnostics: System Activity' page");
-$priv_list['page-diagnostics-system-activity']['match'] = array();
-$priv_list['page-diagnostics-system-activity']['match'][] = "diag_system_activity.php*";
-
-$priv_list['page-diagnostics-system-pftop'] = array();
-$priv_list['page-diagnostics-system-pftop']['name'] = gettext("Diagnostics: pfTop");
-$priv_list['page-diagnostics-system-pftop']['descr'] = gettext("Allows access to the 'Diagnostics: pfTop' page");
-$priv_list['page-diagnostics-system-pftop']['match'] = array();
-$priv_list['page-diagnostics-system-pftop']['match'][] = "diag_system_pftop.php*";
-
$priv_list['page-diagnostics-ping'] = array();
-$priv_list['page-diagnostics-ping']['name'] = gettext("WebCfg - Diagnostics: Ping page");
+$priv_list['page-diagnostics-ping']['name'] = gettext("WebCfg - Diagnostics: Ping");
$priv_list['page-diagnostics-ping']['descr'] = gettext("Allow access to the 'Diagnostics: Ping' page.");
$priv_list['page-diagnostics-ping']['match'] = array();
$priv_list['page-diagnostics-ping']['match'][] = "diag_ping.php*";
$priv_list['page-status-packagelogs'] = array();
-$priv_list['page-status-packagelogs']['name'] = gettext("WebCfg - Status: Package logs page");
+$priv_list['page-status-packagelogs']['name'] = gettext("WebCfg - Status: Package logs");
$priv_list['page-status-packagelogs']['descr'] = gettext("Allow access to the 'Status: Package logs' page.");
$priv_list['page-status-packagelogs']['match'] = array();
-$priv_list['page-status-packagelogs']['match'][] = "diag_pkglogs.php*";
+$priv_list['page-status-packagelogs']['match'][] = "status_pkglogs.php*";
$priv_list['page-diagnostics-resetstate'] = array();
-$priv_list['page-diagnostics-resetstate']['name'] = gettext("WebCfg - Diagnostics: Reset state page");
-$priv_list['page-diagnostics-resetstate']['descr'] = gettext("Allow access to the 'Diagnostics: Reset state' page.");
+$priv_list['page-diagnostics-resetstate']['name'] = gettext("WebCfg - Diagnostics: Reset states");
+$priv_list['page-diagnostics-resetstate']['descr'] = gettext("Allow access to the 'Diagnostics: Reset states' page.");
$priv_list['page-diagnostics-resetstate']['match'] = array();
$priv_list['page-diagnostics-resetstate']['match'][] = "diag_resetstate.php*";
$priv_list['page-diagnostics-routingtables'] = array();
-$priv_list['page-diagnostics-routingtables']['name'] = gettext("WebCfg - Diagnostics: Routing tables page");
+$priv_list['page-diagnostics-routingtables']['name'] = gettext("WebCfg - Diagnostics: Routing tables");
$priv_list['page-diagnostics-routingtables']['descr'] = gettext("Allow access to the 'Diagnostics: Routing tables' page.");
$priv_list['page-diagnostics-routingtables']['match'] = array();
$priv_list['page-diagnostics-routingtables']['match'][] = "diag_routes.php*";
+$priv_list['page-diagnostics-smart'] = array();
+$priv_list['page-diagnostics-smart']['name'] = gettext("WebCfg - Diagnostics: S.M.A.R.T. Monitor Tools");
+$priv_list['page-diagnostics-smart']['descr'] = gettext("Allow access to the 'Diagnostics: S.M.A.R.T. Monitor Tools' page.");
+$priv_list['page-diagnostics-smart']['match'] = array();
+$priv_list['page-diagnostics-smart']['match'][] = "diag_smart.php*";
+
+$priv_list['page-diagnostics-sockets'] = array();
+$priv_list['page-diagnostics-sockets']['name'] = gettext("WebCfg - Diagnostics: Sockets");
+$priv_list['page-diagnostics-sockets']['descr'] = gettext("Allow access to the 'Diagnostics: Sockets' page.");
+$priv_list['page-diagnostics-sockets']['match'] = array();
+$priv_list['page-diagnostics-sockets']['match'][] = "diag_sockets.php*";
+
$priv_list['page-diagnostics-statessummary'] = array();
-$priv_list['page-diagnostics-statessummary']['name'] = gettext("WebCfg - Diagnostics: States Summary page");
+$priv_list['page-diagnostics-statessummary']['name'] = gettext("WebCfg - Diagnostics: States Summary");
$priv_list['page-diagnostics-statessummary']['descr'] = gettext("Allow access to the 'Diagnostics: States Summary' page.");
$priv_list['page-diagnostics-statessummary']['match'] = array();
$priv_list['page-diagnostics-statessummary']['match'][] = "diag_states_summary.php*";
+$priv_list['page-diagnostics-system-activity'] = array();
+$priv_list['page-diagnostics-system-activity']['name'] = gettext("WebCfg - Diagnostics: System Activity");
+$priv_list['page-diagnostics-system-activity']['descr'] = gettext("Allows access to the 'Diagnostics: System Activity' page");
+$priv_list['page-diagnostics-system-activity']['match'] = array();
+$priv_list['page-diagnostics-system-activity']['match'][] = "diag_system_activity.php*";
+
+$priv_list['page-diagnostics-system-pftop'] = array();
+$priv_list['page-diagnostics-system-pftop']['name'] = gettext("WebCfg - Diagnostics: pfTop");
+$priv_list['page-diagnostics-system-pftop']['descr'] = gettext("Allows access to the 'Diagnostics: pfTop' page");
+$priv_list['page-diagnostics-system-pftop']['match'] = array();
+$priv_list['page-diagnostics-system-pftop']['match'][] = "diag_pftop.php*";
+
$priv_list['page-diagnostics-tables'] = array();
-$priv_list['page-diagnostics-tables']['name'] = gettext("WebCfg - Diagnostics: PF Table IP addresses");
+$priv_list['page-diagnostics-tables']['name'] = gettext("WebCfg - Diagnostics: pf Table IP addresses");
$priv_list['page-diagnostics-tables']['descr'] = gettext("Allow access to the 'Diagnostics: Tables' page.");
$priv_list['page-diagnostics-tables']['match'] = array();
$priv_list['page-diagnostics-tables']['match'][] = "diag_tables.php*";
+$priv_list['page-diagnostics-testport'] = array();
+$priv_list['page-diagnostics-testport']['name'] = gettext("WebCfg - Diagnostics: Test Port");
+$priv_list['page-diagnostics-testport']['descr'] = gettext("Allow access to the 'Diagnostics: Test Port' page.");
+$priv_list['page-diagnostics-testport']['match'] = array();
+$priv_list['page-diagnostics-testport']['match'][] = "diag_testport.php*";
+
$priv_list['page-diagnostics-traceroute'] = array();
-$priv_list['page-diagnostics-traceroute']['name'] = gettext("WebCfg - Diagnostics: Traceroute page");
+$priv_list['page-diagnostics-traceroute']['name'] = gettext("WebCfg - Diagnostics: Traceroute");
$priv_list['page-diagnostics-traceroute']['descr'] = gettext("Allow access to the 'Diagnostics: Traceroute' page.");
$priv_list['page-diagnostics-traceroute']['match'] = array();
$priv_list['page-diagnostics-traceroute']['match'][] = "diag_traceroute.php*";
+$priv_list['page-firewall-easyrule'] = array();
+$priv_list['page-firewall-easyrule']['name'] = gettext("WebCfg - Firewall: Easy Rule add/status");
+$priv_list['page-firewall-easyrule']['descr'] = gettext("Allow access to the 'Firewall: Easy Rule' add/status page.");
+$priv_list['page-firewall-easyrule']['match'] = array();
+$priv_list['page-firewall-easyrule']['match'][] = "easyrule.php*";
+
$priv_list['page-diagnostics-edit'] = array();
-$priv_list['page-diagnostics-edit']['name'] = gettext("WebCfg - Diagnostics: Edit FIle");
+$priv_list['page-diagnostics-edit']['name'] = gettext("WebCfg - Diagnostics: Edit File");
$priv_list['page-diagnostics-edit']['descr'] = gettext("Allow access to the 'Diagnostics: Edit File' page.");
$priv_list['page-diagnostics-edit']['match'] = array();
$priv_list['page-diagnostics-edit']['match'][] = "edit.php*";
@@ -309,139 +262,133 @@ $priv_list['page-diagnostics-edit']['match'][] = "browser.php*";
$priv_list['page-diagnostics-edit']['match'][] = "filebrowser/browser.php*";
$priv_list['page-diagnostics-command'] = array();
-$priv_list['page-diagnostics-command']['name'] = gettext("WebCfg - Diagnostics: Command page");
+$priv_list['page-diagnostics-command']['name'] = gettext("WebCfg - Diagnostics: Command");
$priv_list['page-diagnostics-command']['descr'] = gettext("Allow access to the 'Diagnostics: Command' page.");
$priv_list['page-diagnostics-command']['match'] = array();
$priv_list['page-diagnostics-command']['match'][] = "exec.php*";
$priv_list['page-firewall-aliases'] = array();
-$priv_list['page-firewall-aliases']['name'] = gettext("WebCfg - Firewall: Aliases page");
+$priv_list['page-firewall-aliases']['name'] = gettext("WebCfg - Firewall: Aliases");
$priv_list['page-firewall-aliases']['descr'] = gettext("Allow access to the 'Firewall: Aliases' page.");
$priv_list['page-firewall-aliases']['match'] = array();
$priv_list['page-firewall-aliases']['match'][] = "firewall_aliases.php*";
$priv_list['page-firewall-alias-edit'] = array();
-$priv_list['page-firewall-alias-edit']['name'] = gettext("WebCfg - Firewall: Alias: Edit page");
+$priv_list['page-firewall-alias-edit']['name'] = gettext("WebCfg - Firewall: Alias: Edit");
$priv_list['page-firewall-alias-edit']['descr'] = gettext("Allow access to the 'Firewall: Alias: Edit' page.");
$priv_list['page-firewall-alias-edit']['match'] = array();
$priv_list['page-firewall-alias-edit']['match'][] = "firewall_aliases_edit.php*";
$priv_list['page-firewall-alias-import'] = array();
-$priv_list['page-firewall-alias-import']['name'] = gettext("WebCfg - Firewall: Alias: Import page");
+$priv_list['page-firewall-alias-import']['name'] = gettext("WebCfg - Firewall: Alias: Import");
$priv_list['page-firewall-alias-import']['descr'] = gettext("Allow access to the 'Firewall: Alias: Import' page.");
$priv_list['page-firewall-alias-import']['match'] = array();
$priv_list['page-firewall-alias-import']['match'][] = "firewall_aliases_import.php*";
-$priv_list['page-firewall-nat-npt'] = array();
-$priv_list['page-firewall-nat-npt']['name'] = gettext("Webcfg - Firewall: NAT: NPT page");
-$priv_list['page-firewall-nat-npt']['descr'] = gettext("Allow access to the 'Firewall: NAT: NPT' page.");
-$priv_list['page-firewall-nat-npt']['match'] = array();
-$priv_list['page-firewall-nat-npt']['match'][] = "firewall_nat_npt.php*";
-
-$priv_list['page-firewall-nat-npt-edit'] = array();
-$priv_list['page-firewall-nat-npt-edit']['name'] = gettext("Webcfg - Firewall: NAT: NPt: Edit page");
-$priv_list['page-firewall-nat-npt-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: NPt: Edit' page.");
-$priv_list['page-firewall-nat-npt-edit']['match'] = array();
-$priv_list['page-firewall-nat-npt-edit']['match'][] = "firewall_nat_npt_edit.php*";
-
$priv_list['page-firewall-nat-portforward'] = array();
-$priv_list['page-firewall-nat-portforward']['name'] = gettext("WebCfg - Firewall: NAT: Port Forward page");
+$priv_list['page-firewall-nat-portforward']['name'] = gettext("WebCfg - Firewall: NAT: Port Forward");
$priv_list['page-firewall-nat-portforward']['descr'] = gettext("Allow access to the 'Firewall: NAT: Port Forward' page.");
$priv_list['page-firewall-nat-portforward']['match'] = array();
$priv_list['page-firewall-nat-portforward']['match'][] = "firewall_nat.php*";
$priv_list['page-firewall-nat-1-1'] = array();
-$priv_list['page-firewall-nat-1-1']['name'] = gettext("WebCfg - Firewall: NAT: 1:1 page");
+$priv_list['page-firewall-nat-1-1']['name'] = gettext("WebCfg - Firewall: NAT: 1:1");
$priv_list['page-firewall-nat-1-1']['descr'] = gettext("Allow access to the 'Firewall: NAT: 1:1' page.");
$priv_list['page-firewall-nat-1-1']['match'] = array();
$priv_list['page-firewall-nat-1-1']['match'][] = "firewall_nat_1to1.php*";
$priv_list['page-firewall-nat-1-1-edit'] = array();
-$priv_list['page-firewall-nat-1-1-edit']['name'] = gettext("WebCfg - Firewall: NAT: 1:1: Edit page");
+$priv_list['page-firewall-nat-1-1-edit']['name'] = gettext("WebCfg - Firewall: NAT: 1:1: Edit");
$priv_list['page-firewall-nat-1-1-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: 1:1: Edit' page.");
$priv_list['page-firewall-nat-1-1-edit']['match'] = array();
$priv_list['page-firewall-nat-1-1-edit']['match'][] = "firewall_nat_1to1_edit.php*";
$priv_list['page-firewall-nat-portforward-edit'] = array();
-$priv_list['page-firewall-nat-portforward-edit']['name'] = gettext("WebCfg - Firewall: NAT: Port Forward: Edit page");
+$priv_list['page-firewall-nat-portforward-edit']['name'] = gettext("WebCfg - Firewall: NAT: Port Forward: Edit");
$priv_list['page-firewall-nat-portforward-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: Port Forward: Edit' page.");
$priv_list['page-firewall-nat-portforward-edit']['match'] = array();
$priv_list['page-firewall-nat-portforward-edit']['match'][] = "firewall_nat_edit.php*";
+$priv_list['page-firewall-nat-npt'] = array();
+$priv_list['page-firewall-nat-npt']['name'] = gettext("WebCfg - Firewall: NAT: NPt");
+$priv_list['page-firewall-nat-npt']['descr'] = gettext("Allow access to the 'Firewall: NAT: NPt' page.");
+$priv_list['page-firewall-nat-npt']['match'] = array();
+$priv_list['page-firewall-nat-npt']['match'][] = "firewall_nat_npt.php*";
+
+$priv_list['page-firewall-nat-npt-edit'] = array();
+$priv_list['page-firewall-nat-npt-edit']['name'] = gettext("WebCfg - Firewall: NAT: NPt: Edit");
+$priv_list['page-firewall-nat-npt-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: NPt: Edit' page.");
+$priv_list['page-firewall-nat-npt-edit']['match'] = array();
+$priv_list['page-firewall-nat-npt-edit']['match'][] = "firewall_nat_npt_edit.php*";
+
$priv_list['page-firewall-nat-outbound'] = array();
-$priv_list['page-firewall-nat-outbound']['name'] = gettext("WebCfg - Firewall: NAT: Outbound page");
+$priv_list['page-firewall-nat-outbound']['name'] = gettext("WebCfg - Firewall: NAT: Outbound");
$priv_list['page-firewall-nat-outbound']['descr'] = gettext("Allow access to the 'Firewall: NAT: Outbound' page.");
$priv_list['page-firewall-nat-outbound']['match'] = array();
$priv_list['page-firewall-nat-outbound']['match'][] = "firewall_nat_out.php*";
$priv_list['page-firewall-nat-outbound-edit'] = array();
-$priv_list['page-firewall-nat-outbound-edit']['name'] = gettext("WebCfg - Firewall: NAT: Outbound: Edit page");
+$priv_list['page-firewall-nat-outbound-edit']['name'] = gettext("WebCfg - Firewall: NAT: Outbound: Edit");
$priv_list['page-firewall-nat-outbound-edit']['descr'] = gettext("Allow access to the 'Firewall: NAT: Outbound: Edit' page.");
$priv_list['page-firewall-nat-outbound-edit']['match'] = array();
$priv_list['page-firewall-nat-outbound-edit']['match'][] = "firewall_nat_out_edit.php*";
$priv_list['page-firewall-rules'] = array();
-$priv_list['page-firewall-rules']['name'] = gettext("WebCfg - Firewall: Rules page");
+$priv_list['page-firewall-rules']['name'] = gettext("WebCfg - Firewall: Rules");
$priv_list['page-firewall-rules']['descr'] = gettext("Allow access to the 'Firewall: Rules' page.");
$priv_list['page-firewall-rules']['match'] = array();
$priv_list['page-firewall-rules']['match'][] = "firewall_rules.php*";
$priv_list['page-firewall-rules-edit'] = array();
-$priv_list['page-firewall-rules-edit']['name'] = gettext("WebCfg - Firewall: Rules: Edit page");
+$priv_list['page-firewall-rules-edit']['name'] = gettext("WebCfg - Firewall: Rules: Edit");
$priv_list['page-firewall-rules-edit']['descr'] = gettext("Allow access to the 'Firewall: Rules: Edit' page.");
$priv_list['page-firewall-rules-edit']['match'] = array();
$priv_list['page-firewall-rules-edit']['match'][] = "firewall_rules_edit.php*";
$priv_list['page-firewall-schedules'] = array();
-$priv_list['page-firewall-schedules']['name'] = gettext("WebCfg - Firewall: Schedules page");
+$priv_list['page-firewall-schedules']['name'] = gettext("WebCfg - Firewall: Schedules");
$priv_list['page-firewall-schedules']['descr'] = gettext("Allow access to the 'Firewall: Schedules' page.");
$priv_list['page-firewall-schedules']['match'] = array();
$priv_list['page-firewall-schedules']['match'][] = "firewall_schedule.php*";
$priv_list['page-firewall-schedules-edit'] = array();
-$priv_list['page-firewall-schedules-edit']['name'] = gettext("WebCfg - Firewall: Schedules: Edit page");
+$priv_list['page-firewall-schedules-edit']['name'] = gettext("WebCfg - Firewall: Schedules: Edit");
$priv_list['page-firewall-schedules-edit']['descr'] = gettext("Allow access to the 'Firewall: Schedules: Edit' page.");
$priv_list['page-firewall-schedules-edit']['match'] = array();
$priv_list['page-firewall-schedules-edit']['match'][] = "firewall_schedule_edit.php*";
$priv_list['page-firewall-trafficshaper'] = array();
-$priv_list['page-firewall-trafficshaper']['name'] = gettext("WebCfg - Firewall: Traffic Shaper page");
+$priv_list['page-firewall-trafficshaper']['name'] = gettext("WebCfg - Firewall: Traffic Shaper");
$priv_list['page-firewall-trafficshaper']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper' page.");
$priv_list['page-firewall-trafficshaper']['match'] = array();
$priv_list['page-firewall-trafficshaper']['match'][] = "firewall_shaper.php*";
-$priv_list['page-firewall-trafficshaper-layer7'] = array();
-$priv_list['page-firewall-trafficshaper-layer7']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Layer7 page");
-$priv_list['page-firewall-trafficshaper-layer7']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Layer7' page.");
-$priv_list['page-firewall-trafficshaper-layer7']['match'] = array();
-$priv_list['page-firewall-trafficshaper-layer7']['match'][] = "firewall_shaper_layer7.php*";
-
$priv_list['page-firewall-trafficshaper-queues'] = array();
-$priv_list['page-firewall-trafficshaper-queues']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Queues page");
+$priv_list['page-firewall-trafficshaper-queues']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Queues");
$priv_list['page-firewall-trafficshaper-queues']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Queues' page.");
$priv_list['page-firewall-trafficshaper-queues']['match'] = array();
$priv_list['page-firewall-trafficshaper-queues']['match'][] = "firewall_shaper_queues.php*";
$priv_list['page-firewall-trafficshaper-limiter'] = array();
-$priv_list['page-firewall-trafficshaper-limiter']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Limiter page");
+$priv_list['page-firewall-trafficshaper-limiter']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Limiter");
$priv_list['page-firewall-trafficshaper-limiter']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Limiter' page.");
$priv_list['page-firewall-trafficshaper-limiter']['match'] = array();
$priv_list['page-firewall-trafficshaper-limiter']['match'][] = "firewall_shaper_vinterface.php*";
$priv_list['page-firewall-trafficshaper-wizard'] = array();
-$priv_list['page-firewall-trafficshaper-wizard']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Wizard page");
+$priv_list['page-firewall-trafficshaper-wizard']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Wizard");
$priv_list['page-firewall-trafficshaper-wizard']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Wizard' page.");
$priv_list['page-firewall-trafficshaper-wizard']['match'] = array();
$priv_list['page-firewall-trafficshaper-wizard']['match'][] = "firewall_shaper_wizards.php*";
$priv_list['page-firewall-virtualipaddresses'] = array();
-$priv_list['page-firewall-virtualipaddresses']['name'] = gettext("WebCfg - Firewall: Virtual IP Addresses page");
+$priv_list['page-firewall-virtualipaddresses']['name'] = gettext("WebCfg - Firewall: Virtual IP Addresses");
$priv_list['page-firewall-virtualipaddresses']['descr'] = gettext("Allow access to the 'Firewall: Virtual IP Addresses' page.");
$priv_list['page-firewall-virtualipaddresses']['match'] = array();
$priv_list['page-firewall-virtualipaddresses']['match'][] = "firewall_virtual_ip.php*";
$priv_list['page-firewall-virtualipaddress-edit'] = array();
-$priv_list['page-firewall-virtualipaddress-edit']['name'] = gettext("WebCfg - Firewall: Virtual IP Address: Edit page");
+$priv_list['page-firewall-virtualipaddress-edit']['name'] = gettext("WebCfg - Firewall: Virtual IP Address: Edit");
$priv_list['page-firewall-virtualipaddress-edit']['descr'] = gettext("Allow access to the 'Firewall: Virtual IP Address: Edit' page.");
$priv_list['page-firewall-virtualipaddress-edit']['match'] = array();
$priv_list['page-firewall-virtualipaddress-edit']['match'][] = "firewall_virtual_ip_edit.php*";
@@ -459,565 +406,548 @@ $priv_list['page-getstats']['match'] = array();
$priv_list['page-getstats']['match'][] = "getstats.php*";
$priv_list['page-diagnostics-interfacetraffic'] = array();
-$priv_list['page-diagnostics-interfacetraffic']['name'] = gettext("WebCfg - Diagnostics: Interface Traffic page");
+$priv_list['page-diagnostics-interfacetraffic']['name'] = gettext("WebCfg - Diagnostics: Interface Traffic");
$priv_list['page-diagnostics-interfacetraffic']['descr'] = gettext("Allow access to the 'Diagnostics: Interface Traffic' page.");
$priv_list['page-diagnostics-interfacetraffic']['match'] = array();
$priv_list['page-diagnostics-interfacetraffic']['match'][] = "graph.php*";
$priv_list['page-diagnostics-cpuutilization'] = array();
-$priv_list['page-diagnostics-cpuutilization']['name'] = gettext("WebCfg - Diagnostics: CPU Utilization page");
+$priv_list['page-diagnostics-cpuutilization']['name'] = gettext("WebCfg - Diagnostics: CPU Utilization");
$priv_list['page-diagnostics-cpuutilization']['descr'] = gettext("Allow access to the 'Diagnostics: CPU Utilization' page.");
$priv_list['page-diagnostics-cpuutilization']['match'] = array();
$priv_list['page-diagnostics-cpuutilization']['match'][] = "graph_cpu.php*";
+$priv_list['page-diagnostics-cpuutilization']['match'][] = "stats.php*";
$priv_list['page-diagnostics-haltsystem'] = array();
-$priv_list['page-diagnostics-haltsystem']['name'] = gettext("WebCfg - Diagnostics: Halt system page");
+$priv_list['page-diagnostics-haltsystem']['name'] = gettext("WebCfg - Diagnostics: Halt system");
$priv_list['page-diagnostics-haltsystem']['descr'] = gettext("Allow access to the 'Diagnostics: Halt system' page.");
$priv_list['page-diagnostics-haltsystem']['match'] = array();
-$priv_list['page-diagnostics-haltsystem']['match'][] = "halt.php*";
-
-$priv_list['page-requiredforjavascript'] = array();
-$priv_list['page-requiredforjavascript']['name'] = gettext("WebCfg - Required for javascript page");
-$priv_list['page-requiredforjavascript']['descr'] = gettext("Allow access to the 'Required for javascript' page.");
-$priv_list['page-requiredforjavascript']['match'] = array();
-$priv_list['page-requiredforjavascript']['match'][] = "headjs.php*";
+$priv_list['page-diagnostics-haltsystem']['match'][] = "diag_halt.php*";
$priv_list['page-xmlrpcinterfacestats'] = array();
-$priv_list['page-xmlrpcinterfacestats']['name'] = gettext("WebCfg - XMLRPC Interface Stats page");
+$priv_list['page-xmlrpcinterfacestats']['name'] = gettext("WebCfg - XMLRPC Interface Stats");
$priv_list['page-xmlrpcinterfacestats']['descr'] = gettext("Allow access to the 'XMLRPC Interface Stats' page.");
$priv_list['page-xmlrpcinterfacestats']['match'] = array();
$priv_list['page-xmlrpcinterfacestats']['match'][] = "ifstats.php*";
$priv_list['page-system-login/logout'] = array();
-$priv_list['page-system-login/logout']['name'] = gettext("WebCfg - System: Login / Logout page / Dashboard");
+$priv_list['page-system-login/logout']['name'] = gettext("WebCfg - System: Login / Logout / Dashboard");
$priv_list['page-system-login/logout']['descr'] = gettext("Allow access to the 'System: Login / Logout' page and Dashboard.");
$priv_list['page-system-login/logout']['match'] = array();
$priv_list['page-system-login/logout']['match'][] = "index.php*";
$priv_list['page-interfaces'] = array();
-$priv_list['page-interfaces']['name'] = gettext("WebCfg - Interfaces: WAN page");
+$priv_list['page-interfaces']['name'] = gettext("WebCfg - Interfaces: WAN");
$priv_list['page-interfaces']['descr'] = gettext("Allow access to the 'Interfaces' page.");
$priv_list['page-interfaces']['match'] = array();
$priv_list['page-interfaces']['match'][] = "interfaces.php*";
$priv_list['page-interfaces-assignnetworkports'] = array();
-$priv_list['page-interfaces-assignnetworkports']['name'] = gettext("WebCfg - Interfaces: Assign network ports page");
+$priv_list['page-interfaces-assignnetworkports']['name'] = gettext("WebCfg - Interfaces: Assign network ports");
$priv_list['page-interfaces-assignnetworkports']['descr'] = gettext("Allow access to the 'Interfaces: Assign network ports' page.");
$priv_list['page-interfaces-assignnetworkports']['match'] = array();
$priv_list['page-interfaces-assignnetworkports']['match'][] = "interfaces_assign.php*";
$priv_list['page-interfaces-bridge'] = array();
-$priv_list['page-interfaces-bridge']['name'] = gettext("WebCfg - Interfaces: Bridge page");
+$priv_list['page-interfaces-bridge']['name'] = gettext("WebCfg - Interfaces: Bridge");
$priv_list['page-interfaces-bridge']['descr'] = gettext("Allow access to the 'Interfaces: Bridge' page.");
$priv_list['page-interfaces-bridge']['match'] = array();
$priv_list['page-interfaces-bridge']['match'][] = "interfaces_bridge.php*";
$priv_list['page-interfaces-bridge-edit'] = array();
-$priv_list['page-interfaces-bridge-edit']['name'] = gettext("WebCfg - Interfaces: Bridge edit page");
+$priv_list['page-interfaces-bridge-edit']['name'] = gettext("WebCfg - Interfaces: Bridge edit");
$priv_list['page-interfaces-bridge-edit']['descr'] = gettext("Allow access to the 'Interfaces: Bridge : Edit' page.");
$priv_list['page-interfaces-bridge-edit']['match'] = array();
$priv_list['page-interfaces-bridge-edit']['match'][] = "interfaces_bridge_edit.php*";
$priv_list['page-interfaces-gif'] = array();
-$priv_list['page-interfaces-gif']['name'] = gettext("WebCfg - Interfaces: GIF page");
+$priv_list['page-interfaces-gif']['name'] = gettext("WebCfg - Interfaces: GIF");
$priv_list['page-interfaces-gif']['descr'] = gettext("Allow access to the 'Interfaces: GIF' page.");
$priv_list['page-interfaces-gif']['match'] = array();
$priv_list['page-interfaces-gif']['match'][] = "interfaces_gif.php*";
$priv_list['page-interfaces-gif-edit'] = array();
-$priv_list['page-interfaces-gif-edit']['name'] = gettext("WebCfg - Interfaces: GIF: Edit page");
+$priv_list['page-interfaces-gif-edit']['name'] = gettext("WebCfg - Interfaces: GIF: Edit");
$priv_list['page-interfaces-gif-edit']['descr'] = gettext("Allow access to the 'Interfaces: GIF: Edit' page.");
$priv_list['page-interfaces-gif-edit']['match'] = array();
$priv_list['page-interfaces-gif-edit']['match'][] = "interfaces_gif_edit.php*";
$priv_list['page-interfaces-gre'] = array();
-$priv_list['page-interfaces-gre']['name'] = gettext("WebCfg - Interfaces: GRE page");
+$priv_list['page-interfaces-gre']['name'] = gettext("WebCfg - Interfaces: GRE");
$priv_list['page-interfaces-gre']['descr'] = gettext("Allow access to the 'Interfaces: GRE' page.");
$priv_list['page-interfaces-gre']['match'] = array();
$priv_list['page-interfaces-gre']['match'][] = "interfaces_gre.php*";
$priv_list['page-interfaces-gre-edit'] = array();
-$priv_list['page-interfaces-gre-edit']['name'] = gettext("WebCfg - Interfaces: GRE: Edit page");
+$priv_list['page-interfaces-gre-edit']['name'] = gettext("WebCfg - Interfaces: GRE: Edit");
$priv_list['page-interfaces-gre-edit']['descr'] = gettext("Allow access to the 'Interfaces: GRE: Edit' page.");
$priv_list['page-interfaces-gre-edit']['match'] = array();
$priv_list['page-interfaces-gre-edit']['match'][] = "interfaces_gre_edit.php*";
$priv_list['page-interfaces-groups'] = array();
-$priv_list['page-interfaces-groups']['name'] = gettext("WebCfg - Interfaces: Groups page");
+$priv_list['page-interfaces-groups']['name'] = gettext("WebCfg - Interfaces: Groups");
$priv_list['page-interfaces-groups']['descr'] = gettext("Create interface groups");
$priv_list['page-interfaces-groups']['match'] = array();
$priv_list['page-interfaces-groups']['match'][] = "interfaces_groups.php*";
$priv_list['page-interfaces-groups-edit'] = array();
-$priv_list['page-interfaces-groups-edit']['name'] = gettext("Interfaces: Groups: Edit page");
+$priv_list['page-interfaces-groups-edit']['name'] = gettext("WebCfg - Interfaces: Groups: Edit");
$priv_list['page-interfaces-groups-edit']['descr'] = gettext("Allow access to the 'Interfaces: Groups: Edit' page.");
$priv_list['page-interfaces-groups-edit']['match'] = array();
$priv_list['page-interfaces-groups-edit']['match'][] = "interfaces_groups_edit.php*";
$priv_list['page-interfaces-lagg'] = array();
-$priv_list['page-interfaces-lagg']['name'] = gettext("WebCfg - Interfaces: LAGG: page");
-$priv_list['page-interfaces-lagg']['descr'] = gettext("Edit Interface LAGG");
+$priv_list['page-interfaces-lagg']['name'] = gettext("WebCfg - Interfaces: LAGG:");
+$priv_list['page-interfaces-lagg']['descr'] = gettext("Allow access to the 'Interfaces: LAGG' page.");
$priv_list['page-interfaces-lagg']['match'] = array();
$priv_list['page-interfaces-lagg']['match'][] = "interfaces_lagg.php*";
$priv_list['page-interfaces-lagg-edit'] = array();
-$priv_list['page-interfaces-lagg-edit']['name'] = gettext("Interfaces: LAGG: Edit page");
+$priv_list['page-interfaces-lagg-edit']['name'] = gettext("WebCfg - Interfaces: LAGG: Edit");
$priv_list['page-interfaces-lagg-edit']['descr'] = gettext("Allow access to the 'Interfaces: LAGG: Edit' page.");
$priv_list['page-interfaces-lagg-edit']['match'] = array();
$priv_list['page-interfaces-lagg-edit']['match'][] = "interfaces_lagg_edit.php*";
$priv_list['page-interfaces-ppps'] = array();
-$priv_list['page-interfaces-ppps']['name'] = gettext("WebCfg - Interfaces: ppps page");
-$priv_list['page-interfaces-ppps']['descr'] = gettext("Allow access to the 'Interfaces: ppps' page.");
+$priv_list['page-interfaces-ppps']['name'] = gettext("WebCfg - Interfaces: PPPs");
+$priv_list['page-interfaces-ppps']['descr'] = gettext("Allow access to the 'Interfaces: PPPs' page.");
$priv_list['page-interfaces-ppps']['match'] = array();
$priv_list['page-interfaces-ppps']['match'][] = "interfaces_ppps.php*";
$priv_list['page-interfaces-ppps-edit'] = array();
-$priv_list['page-interfaces-ppps-edit']['name'] = gettext("WebCfg - Interfaces: PPPs: Edit page");
+$priv_list['page-interfaces-ppps-edit']['name'] = gettext("WebCfg - Interfaces: PPPs: Edit");
$priv_list['page-interfaces-ppps-edit']['descr'] = gettext("Allow access to the 'Interfaces: PPPs: Edit' page.");
$priv_list['page-interfaces-ppps-edit']['match'] = array();
$priv_list['page-interfaces-ppps-edit']['match'][] = "interfaces_ppps_edit.php*";
$priv_list['page-interfaces-qinq'] = array();
-$priv_list['page-interfaces-qinq']['name'] = gettext("WebCfg - Interfaces: QinQ page");
+$priv_list['page-interfaces-qinq']['name'] = gettext("WebCfg - Interfaces: QinQ");
$priv_list['page-interfaces-qinq']['descr'] = gettext("Allow access to the 'Interfaces: QinQ' page.");
$priv_list['page-interfaces-qinq']['match'] = array();
$priv_list['page-interfaces-qinq']['match'][] = "interfaces_qinq.php*";
$priv_list['page-interfaces-qinq-edit'] = array();
-$priv_list['page-interfaces-qinq-edit']['name'] = gettext("Interfaces: QinQ: Edit page");
+$priv_list['page-interfaces-qinq-edit']['name'] = gettext("WebCfg - Interfaces: QinQ: Edit");
$priv_list['page-interfaces-qinq-edit']['descr'] = gettext("Allow access to 'Interfaces: QinQ: Edit' page");
$priv_list['page-interfaces-qinq-edit']['match'] = array();
$priv_list['page-interfaces-qinq-edit']['match'][] = "interfaces_qinq_edit.php*";
$priv_list['page-interfaces-vlan'] = array();
-$priv_list['page-interfaces-vlan']['name'] = gettext("WebCfg - Interfaces: VLAN page");
+$priv_list['page-interfaces-vlan']['name'] = gettext("WebCfg - Interfaces: VLAN");
$priv_list['page-interfaces-vlan']['descr'] = gettext("Allow access to the 'Interfaces: VLAN' page.");
$priv_list['page-interfaces-vlan']['match'] = array();
$priv_list['page-interfaces-vlan']['match'][] = "interfaces_vlan.php*";
$priv_list['page-interfaces-vlan-edit'] = array();
-$priv_list['page-interfaces-vlan-edit']['name'] = gettext("WebCfg - Interfaces: VLAN: Edit page");
+$priv_list['page-interfaces-vlan-edit']['name'] = gettext("WebCfg - Interfaces: VLAN: Edit");
$priv_list['page-interfaces-vlan-edit']['descr'] = gettext("Allow access to the 'Interfaces: VLAN: Edit' page.");
$priv_list['page-interfaces-vlan-edit']['match'] = array();
$priv_list['page-interfaces-vlan-edit']['match'][] = "interfaces_vlan_edit.php*";
$priv_list['page-interfaces-wireless'] = array();
-$priv_list['page-interfaces-wireless']['name'] = gettext("WebCfg - Interfaces: Wireless page");
+$priv_list['page-interfaces-wireless']['name'] = gettext("WebCfg - Interfaces: Wireless");
$priv_list['page-interfaces-wireless']['descr'] = gettext("Allow access to the 'Interfaces: Wireless' page.");
$priv_list['page-interfaces-wireless']['match'] = array();
$priv_list['page-interfaces-wireless']['match'][] = "interfaces_wireless.php*";
$priv_list['page-interfaces-wireless-edit'] = array();
-$priv_list['page-interfaces-wireless-edit']['name'] = gettext("WebCfg - Interfaces: Wireless edit page");
-$priv_list['page-interfaces-wireless-edit']['descr'] = gettext("Allow access to the 'Interfaces: Wireless : Edit' page.");
+$priv_list['page-interfaces-wireless-edit']['name'] = gettext("WebCfg - Interfaces: Wireless: Edit");
+$priv_list['page-interfaces-wireless-edit']['descr'] = gettext("Allow access to the 'Interfaces: Wireless: Edit' page.");
$priv_list['page-interfaces-wireless-edit']['match'] = array();
$priv_list['page-interfaces-wireless-edit']['match'][] = "interfaces_wireless_edit.php*";
$priv_list['page-system-license'] = array();
-$priv_list['page-system-license']['name'] = gettext("WebCfg - System: License page");
+$priv_list['page-system-license']['name'] = gettext("WebCfg - System: License");
$priv_list['page-system-license']['descr'] = gettext("Allow access to the 'System: License' page.");
$priv_list['page-system-license']['match'] = array();
$priv_list['page-system-license']['match'][] = "license.php*";
$priv_list['page-services-loadbalancer-monitor'] = array();
-$priv_list['page-services-loadbalancer-monitor']['name'] = gettext("WebCfg - Services: Load Balancer: Monitors page");
+$priv_list['page-services-loadbalancer-monitor']['name'] = gettext("WebCfg - Services: Load Balancer: Monitors");
$priv_list['page-services-loadbalancer-monitor']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Monitors' page.");
$priv_list['page-services-loadbalancer-monitor']['match'] = array();
$priv_list['page-services-loadbalancer-monitor']['match'][] = "load_balancer_monitor.php*";
$priv_list['page-services-loadbalancer-monitor-edit'] = array();
-$priv_list['page-services-loadbalancer-monitor-edit']['name'] = gettext("WebCfg - Services: Load Balancer: Monitor: Edit page");
+$priv_list['page-services-loadbalancer-monitor-edit']['name'] = gettext("WebCfg - Services: Load Balancer: Monitor: Edit");
$priv_list['page-services-loadbalancer-monitor-edit']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Monitor: Edit' page.");
$priv_list['page-services-loadbalancer-monitor-edit']['match'] = array();
$priv_list['page-services-loadbalancer-monitor-edit']['match'][] = "load_balancer_monitor_edit.php*";
$priv_list['page-loadbalancer-pool'] = array();
-$priv_list['page-loadbalancer-pool']['name'] = gettext("WebCfg - Load Balancer: Pool page");
+$priv_list['page-loadbalancer-pool']['name'] = gettext("WebCfg - Load Balancer: Pool");
$priv_list['page-loadbalancer-pool']['descr'] = gettext("Allow access to the 'Load Balancer: Pool' page.");
$priv_list['page-loadbalancer-pool']['match'] = array();
$priv_list['page-loadbalancer-pool']['match'][] = "load_balancer_pool.php*";
$priv_list['page-loadbalancer-pool-edit'] = array();
-$priv_list['page-loadbalancer-pool-edit']['name'] = gettext("WebCfg - Load Balancer: Pool: Edit page");
+$priv_list['page-loadbalancer-pool-edit']['name'] = gettext("WebCfg - Load Balancer: Pool: Edit");
$priv_list['page-loadbalancer-pool-edit']['descr'] = gettext("Allow access to the 'Load Balancer: Pool: Edit' page.");
$priv_list['page-loadbalancer-pool-edit']['match'] = array();
$priv_list['page-loadbalancer-pool-edit']['match'][] = "load_balancer_pool_edit.php*";
$priv_list['page-services-loadbalancer-setting'] = array();
-$priv_list['page-services-loadbalancer-setting']['name'] = gettext("Webcfg - Services: Load Balancer: setting page");
+$priv_list['page-services-loadbalancer-setting']['name'] = gettext("WebCfg - Services: Load Balancer: Settings");
$priv_list['page-services-loadbalancer-setting']['descr'] = gettext("Allow access to the 'Settings: Load Balancer: Settings' page.");
$priv_list['page-services-loadbalancer-setting']['match'] = array();
$priv_list['page-services-loadbalancer-setting']['match'][] = "load_balancer_setting.php*";
$priv_list['page-services-loadbalancer-virtualservers'] = array();
-$priv_list['page-services-loadbalancer-virtualservers']['name'] = gettext("WebCfg - Services: Load Balancer: Virtual Servers page");
+$priv_list['page-services-loadbalancer-virtualservers']['name'] = gettext("WebCfg - Services: Load Balancer: Virtual Servers");
$priv_list['page-services-loadbalancer-virtualservers']['descr'] = gettext("Allow access to the 'Services: Load Balancer: Virtual Servers' page.");
$priv_list['page-services-loadbalancer-virtualservers']['match'] = array();
$priv_list['page-services-loadbalancer-virtualservers']['match'][] = "load_balancer_virtual_server.php*";
-$priv_list['page-services-ntpd'] = array();
-$priv_list['page-services-ntpd']['name'] = gettext("Webcfg - Services: NTP");
-$priv_list['page-services-ntpd']['descr'] = gettext("Allow access to the 'Services: NTP' page.");
-$priv_list['page-services-ntpd']['match'] = array();
-$priv_list['page-services-ntpd']['match'][] = "services_ntpd.php*";
-
-$priv_list['page-services-ntp-gps'] = array();
-$priv_list['page-services-ntp-gps']['name'] = gettext("Webcfg - Status: NTP GPS page");
-$priv_list['page-services-ntp-gps']['descr'] = gettext("Allow access to the 'Status: NTP Serial GPS' page.");
-$priv_list['page-services-ntp-gps']['match'] = array();
-$priv_list['page-services-ntp-gps']['match'][] = "status_ntpd_gps.php*";
-
-$priv_list['page-services-ntp-pps'] = array();
-$priv_list['page-services-ntp-pps']['name'] = gettext("Webcfg - Status: NTP PPS page");
-$priv_list['page-services-ntp-pps']['descr'] = gettext("Allow access to the 'Status: NTP PPS' page.");
-$priv_list['page-services-ntp-pps']['match'] = array();
-$priv_list['page-services-ntp-pps']['match'][] = "status_ntpd_pps.php*";
-
$priv_list['page-loadbalancer-virtualserver-edit'] = array();
-$priv_list['page-loadbalancer-virtualserver-edit']['name'] = gettext("WebCfg - Load Balancer: Virtual Server: Edit page");
+$priv_list['page-loadbalancer-virtualserver-edit']['name'] = gettext("WebCfg - Load Balancer: Virtual Server: Edit");
$priv_list['page-loadbalancer-virtualserver-edit']['descr'] = gettext("Allow access to the 'Load Balancer: Virtual Server: Edit' page.");
$priv_list['page-loadbalancer-virtualserver-edit']['match'] = array();
$priv_list['page-loadbalancer-virtualserver-edit']['match'][] = "load_balancer_virtual_server_edit.php*";
$priv_list['page-package-settings'] = array();
-$priv_list['page-package-settings']['name'] = gettext("WebCfg - Package: Settings page");
+$priv_list['page-package-settings']['name'] = gettext("WebCfg - Package: Settings");
$priv_list['page-package-settings']['descr'] = gettext("Allow access to the 'Package: Settings' page.");
$priv_list['page-package-settings']['match'] = array();
$priv_list['page-package-settings']['match'][] = "pkg.php*";
$priv_list['page-package-edit'] = array();
-$priv_list['page-package-edit']['name'] = gettext("WebCfg - Package: Edit page");
+$priv_list['page-package-edit']['name'] = gettext("WebCfg - Package: Edit");
$priv_list['page-package-edit']['descr'] = gettext("Allow access to the 'Package: Edit' page.");
$priv_list['page-package-edit']['match'] = array();
$priv_list['page-package-edit']['match'][] = "pkg_edit.php*";
$priv_list['page-system-packagemanager'] = array();
-$priv_list['page-system-packagemanager']['name'] = gettext("WebCfg - System: Package Manager page");
+$priv_list['page-system-packagemanager']['name'] = gettext("WebCfg - System: Package Manager");
$priv_list['page-system-packagemanager']['descr'] = gettext("Allow access to the 'System: Package Manager' page.");
$priv_list['page-system-packagemanager']['match'] = array();
$priv_list['page-system-packagemanager']['match'][] = "pkg_mgr.php*";
$priv_list['page-system-packagemanager-installpackage'] = array();
-$priv_list['page-system-packagemanager-installpackage']['name'] = gettext("WebCfg - System: Package Manager: Install Package page");
+$priv_list['page-system-packagemanager-installpackage']['name'] = gettext("WebCfg - System: Package Manager: Install Package");
$priv_list['page-system-packagemanager-installpackage']['descr'] = gettext("Allow access to the 'System: Package Manager: Install Package' page.");
$priv_list['page-system-packagemanager-installpackage']['match'] = array();
$priv_list['page-system-packagemanager-installpackage']['match'][] = "pkg_mgr_install.php*";
$priv_list['page-system-packagemanager-installed'] = array();
-$priv_list['page-system-packagemanager-installed']['name'] = gettext("WebCfg - System: Package Manager: Installed page");
+$priv_list['page-system-packagemanager-installed']['name'] = gettext("WebCfg - System: Package Manager: Installed");
$priv_list['page-system-packagemanager-installed']['descr'] = gettext("Allow access to the 'System: Package Manager: Installed' page.");
$priv_list['page-system-packagemanager-installed']['match'] = array();
$priv_list['page-system-packagemanager-installed']['match'][] = "pkg_mgr_installed.php*";
-$priv_list['page-pkg-mgr-settings'] = array();
-$priv_list['page-pkg-mgr-settings']['name'] = gettext("WebCfg - Packages: Settings page");
-$priv_list['page-pkg-mgr-settings']['descr'] = gettext("Allow access to the 'Packages: Settings' page.");
-$priv_list['page-pkg-mgr-settings']['match'] = array();
-$priv_list['page-pkg-mgr-settings']['match'][] = "pkg_mgr_settings.php*";
-
$priv_list['page-diagnostics-rebootsystem'] = array();
-$priv_list['page-diagnostics-rebootsystem']['name'] = gettext("WebCfg - Diagnostics: Reboot System page");
+$priv_list['page-diagnostics-rebootsystem']['name'] = gettext("WebCfg - Diagnostics: Reboot System");
$priv_list['page-diagnostics-rebootsystem']['descr'] = gettext("Allow access to the 'Diagnostics: Reboot System' page.");
$priv_list['page-diagnostics-rebootsystem']['match'] = array();
-$priv_list['page-diagnostics-rebootsystem']['match'][] = "reboot.php*";
+$priv_list['page-diagnostics-rebootsystem']['match'][] = "diag_reboot.php*";
$priv_list['page-diagnostics-restart-httpd'] = array();
-$priv_list['page-diagnostics-restart-httpd']['name'] = gettext("WebCfg - Diagnostics: Restart HTTPD : System page");
-$priv_list['page-diagnostics-restart-httpd']['descr'] = gettext("Allow access to the 'Diagnostics: Restart HTTPD: System' page.");
+$priv_list['page-diagnostics-restart-httpd']['name'] = gettext("WebCfg - Diagnostics: Restart Web Server Daemon");
+$priv_list['page-diagnostics-restart-httpd']['descr'] = gettext("Allow access to the 'Diagnostics: Restart Web Server Daemon' page.");
$priv_list['page-diagnostics-restart-httpd']['match'] = array();
$priv_list['page-diagnostics-restart-httpd']['match'][] = "restart_httpd.php*";
$priv_list['page-services-captiveportal'] = array();
-$priv_list['page-services-captiveportal']['name'] = gettext("WebCfg - Services: Captive portal page");
+$priv_list['page-services-captiveportal']['name'] = gettext("WebCfg - Services: Captive portal");
$priv_list['page-services-captiveportal']['descr'] = gettext("Allow access to the 'Services: Captive portal' page.");
$priv_list['page-services-captiveportal']['match'] = array();
$priv_list['page-services-captiveportal']['match'][] = "services_captiveportal.php*";
$priv_list['page-services-captiveportal-filemanager'] = array();
-$priv_list['page-services-captiveportal-filemanager']['name'] = gettext("WebCfg - Services: Captive portal: File Manager page");
+$priv_list['page-services-captiveportal-filemanager']['name'] = gettext("WebCfg - Services: Captive portal: File Manager");
$priv_list['page-services-captiveportal-filemanager']['descr'] = gettext("Allow access to the 'Services: Captive portal: File Manager' page.");
$priv_list['page-services-captiveportal-filemanager']['match'] = array();
$priv_list['page-services-captiveportal-filemanager']['match'][] = "services_captiveportal_filemanager.php*";
+$priv_list['page-services-captiveportal-allowedhostnames'] = array();
+$priv_list['page-services-captiveportal-allowedhostnames']['name'] = gettext("WebCfg - Services: Captive portal: Allowed Hostnames");
+$priv_list['page-services-captiveportal-allowedhostnames']['descr'] = gettext("Allow access to the 'Services: Captive portal: Allowed Hostnames' page.");
+$priv_list['page-services-captiveportal-allowedhostnames']['match'] = array();
+$priv_list['page-services-captiveportal-allowedhostnames']['match'][] = "services_captiveportal_hostname.php*";
+
+$priv_list['page-services-captiveportal-editallowedhostnames'] = array();
+$priv_list['page-services-captiveportal-editallowedhostnames']['name'] = gettext("WebCfg - Services: Captive portal: Edit Allowed Hostnames");
+$priv_list['page-services-captiveportal-editallowedhostnames']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit Allowed Hostnames' page.");
+$priv_list['page-services-captiveportal-editallowedhostnames']['match'] = array();
+$priv_list['page-services-captiveportal-editallowedhostnames']['match'][] = "services_captiveportal_hostname_edit.php*";
+
$priv_list['page-services-captiveportal-allowedips'] = array();
-$priv_list['page-services-captiveportal-allowedips']['name'] = gettext("WebCfg - Services: Captive portal: Allowed IPs page");
+$priv_list['page-services-captiveportal-allowedips']['name'] = gettext("WebCfg - Services: Captive portal: Allowed IPs");
$priv_list['page-services-captiveportal-allowedips']['descr'] = gettext("Allow access to the 'Services: Captive portal: Allowed IPs' page.");
$priv_list['page-services-captiveportal-allowedips']['match'] = array();
$priv_list['page-services-captiveportal-allowedips']['match'][] = "services_captiveportal_ip.php*";
$priv_list['page-services-captiveportal-editallowedips'] = array();
-$priv_list['page-services-captiveportal-editallowedips']['name'] = gettext("WebCfg - Services: Captive portal: Edit Allowed IPs page");
+$priv_list['page-services-captiveportal-editallowedips']['name'] = gettext("WebCfg - Services: Captive portal: Edit Allowed IPs");
$priv_list['page-services-captiveportal-editallowedips']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit Allowed IPs' page.");
$priv_list['page-services-captiveportal-editallowedips']['match'] = array();
$priv_list['page-services-captiveportal-editallowedips']['match'][] = "services_captiveportal_ip_edit.php*";
$priv_list['page-services-captiveportal-macaddresses'] = array();
-$priv_list['page-services-captiveportal-macaddresses']['name'] = gettext("WebCfg - Services: Captive portal: Mac Addresses page");
+$priv_list['page-services-captiveportal-macaddresses']['name'] = gettext("WebCfg - Services: Captive portal: Mac Addresses");
$priv_list['page-services-captiveportal-macaddresses']['descr'] = gettext("Allow access to the 'Services: Captive portal: Mac Addresses' page.");
$priv_list['page-services-captiveportal-macaddresses']['match'] = array();
$priv_list['page-services-captiveportal-macaddresses']['match'][] = "services_captiveportal_mac.php*";
$priv_list['page-services-captiveportal-editmacaddresses'] = array();
-$priv_list['page-services-captiveportal-editmacaddresses']['name'] = gettext("WebCfg - Services: Captive portal: Edit MAC Addresses page");
+$priv_list['page-services-captiveportal-editmacaddresses']['name'] = gettext("WebCfg - Services: Captive portal: Edit MAC Addresses");
$priv_list['page-services-captiveportal-editmacaddresses']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit MAC Addresses' page.");
$priv_list['page-services-captiveportal-editmacaddresses']['match'] = array();
$priv_list['page-services-captiveportal-editmacaddresses']['match'][] = "services_captiveportal_mac_edit.php*";
-$priv_list['page-services-captiveportal-allowedhostnames'] = array();
-$priv_list['page-services-captiveportal-allowedhostnames']['name'] = gettext("WebCfg - Services: Captive portal: Allowed Hostnames page");
-$priv_list['page-services-captiveportal-allowedhostnames']['descr'] = gettext("Allow access to the 'Services: Captive portal: Allowed Hostnames' page.");
-$priv_list['page-services-captiveportal-allowedhostnames']['match'] = array();
-$priv_list['page-services-captiveportal-allowedhostnames']['match'][] = "services_captiveportal_hostname.php*";
-
-$priv_list['page-services-captiveportal-editallowedhostnames'] = array();
-$priv_list['page-services-captiveportal-editallowedhostnames']['name'] = gettext("WebCfg - Services: Captive portal: Edit Allowed Hostnames page");
-$priv_list['page-services-captiveportal-editallowedhostnames']['descr'] = gettext("Allow access to the 'Services: Captive portal: Allowed Hostnames' page.");
-$priv_list['page-services-captiveportal-editallowedhostnames']['match'] = array();
-$priv_list['page-services-captiveportal-editallowedhostnames']['match'][] = "services_captiveportal_hostname_edit.php*";
-
-$priv_list['page-services-captiveportal-editzones'] = array();
-$priv_list['page-services-captiveportal-editzones']['name'] = gettext("Webcfg - Services: Captive portal: Edit Zones page");
-$priv_list['page-services-captiveportal-editzones']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit Zones' page.");
-$priv_list['page-services-captiveportal-editzones']['match'] = array();
-$priv_list['page-services-captiveportal-editzones']['match'][] = "services_captiveportal_zones_edit.php*";
-
$priv_list['page-services-captiveportal-vouchers'] = array();
-$priv_list['page-services-captiveportal-vouchers']['name'] = gettext("WebCfg - Services: Captive portal Vouchers page");
+$priv_list['page-services-captiveportal-vouchers']['name'] = gettext("WebCfg - Services: Captive portal Vouchers");
$priv_list['page-services-captiveportal-vouchers']['descr'] = gettext("Allow access to the 'Services: Captive portal Vouchers' page.");
$priv_list['page-services-captiveportal-vouchers']['match'] = array();
$priv_list['page-services-captiveportal-vouchers']['match'][] = "services_captiveportal_vouchers.php*";
$priv_list['page-services-captiveportal-voucher-edit'] = array();
-$priv_list['page-services-captiveportal-voucher-edit']['name'] = "WebCfg - Services: Captive portal Voucher Rolls page";
-$priv_list['page-services-captiveportal-voucher-edit']['descr'] = "Allow access to the 'Services: Captive portal Edit Voucher Rolls' page.";
+$priv_list['page-services-captiveportal-voucher-edit']['name'] = gettext("WebCfg - Services: Captive portal Voucher Rolls");
+$priv_list['page-services-captiveportal-voucher-edit']['descr'] = gettext("Allow access to the 'Services: Captive portal Edit Voucher Rolls' page.");
$priv_list['page-services-captiveportal-voucher-edit']['match'] = array();
$priv_list['page-services-captiveportal-voucher-edit']['match'][] = "services_captiveportal_vouchers_edit.php*";
$priv_list['page-services-captiveportal-zones'] = array();
-$priv_list['page-services-captiveportal-zones']['name'] = gettext("WebCfg - Services: Captive portal Zones page");
+$priv_list['page-services-captiveportal-zones']['name'] = gettext("WebCfg - Services: Captive portal Zones");
$priv_list['page-services-captiveportal-zones']['descr'] = gettext("Allow access to the 'Services: Captive portal Zones' page.");
$priv_list['page-services-captiveportal-zones']['match'] = array();
$priv_list['page-services-captiveportal-zones']['match'][] = "services_captiveportal_zones.php*";
+$priv_list['page-services-captiveportal-editzones'] = array();
+$priv_list['page-services-captiveportal-editzones']['name'] = gettext("WebCfg - Services: Captive portal: Edit Zones");
+$priv_list['page-services-captiveportal-editzones']['descr'] = gettext("Allow access to the 'Services: Captive portal: Edit Zones' page.");
+$priv_list['page-services-captiveportal-editzones']['match'] = array();
+$priv_list['page-services-captiveportal-editzones']['match'][] = "services_captiveportal_zones_edit.php*";
+
$priv_list['page-services-dhcpserver'] = array();
-$priv_list['page-services-dhcpserver']['name'] = gettext("WebCfg - Services: DHCP server page");
-$priv_list['page-services-dhcpserver']['descr'] = gettext("Allow access to the 'Services: DHCP server' page.");
+$priv_list['page-services-dhcpserver']['name'] = gettext("WebCfg - Services: DHCP Server");
+$priv_list['page-services-dhcpserver']['descr'] = gettext("Allow access to the 'Services: DHCP Server' page.");
$priv_list['page-services-dhcpserver']['match'] = array();
$priv_list['page-services-dhcpserver']['match'][] = "services_dhcp.php*";
$priv_list['page-services-dhcpserver-editstaticmapping'] = array();
-$priv_list['page-services-dhcpserver-editstaticmapping']['name'] = gettext("WebCfg - Services: DHCP Server : Edit static mapping page");
-$priv_list['page-services-dhcpserver-editstaticmapping']['descr'] = gettext("Allow access to the 'Services: DHCP Server : Edit static mapping' page.");
+$priv_list['page-services-dhcpserver-editstaticmapping']['name'] = gettext("WebCfg - Services: DHCP Server: Edit static mapping");
+$priv_list['page-services-dhcpserver-editstaticmapping']['descr'] = gettext("Allow access to the 'Services: DHCP Server: Edit static mapping' page.");
$priv_list['page-services-dhcpserver-editstaticmapping']['match'] = array();
$priv_list['page-services-dhcpserver-editstaticmapping']['match'][] = "services_dhcp_edit.php*";
$priv_list['page-services-dhcprelay'] = array();
-$priv_list['page-services-dhcprelay']['name'] = gettext("WebCfg - Services: DHCP Relay page");
+$priv_list['page-services-dhcprelay']['name'] = gettext("WebCfg - Services: DHCP Relay");
$priv_list['page-services-dhcprelay']['descr'] = gettext("Allow access to the 'Services: DHCP Relay' page.");
$priv_list['page-services-dhcprelay']['match'] = array();
$priv_list['page-services-dhcprelay']['match'][] = "services_dhcp_relay.php*";
$priv_list['page-services-dhcpv6server'] = array();
-$priv_list['page-services-dhcpv6server']['name'] = gettext("Webcfg - Services: DHCPv6 server page");
+$priv_list['page-services-dhcpv6server']['name'] = gettext("WebCfg - Services: DHCPv6 server");
$priv_list['page-services-dhcpv6server']['descr'] = gettext("Allow access to the 'Services: DHCPv6 server' page.");
$priv_list['page-services-dhcpv6server']['match'] = array();
$priv_list['page-services-dhcpv6server']['match'][] = "services_dhcpv6.php*";
$priv_list['page-services-dhcpserverv6-editstaticmapping'] = array();
-$priv_list['page-services-dhcpserverv6-editstaticmapping']['name'] = gettext("Webcfg - Services: DHCPv6 Server : Edit static mapping page");
+$priv_list['page-services-dhcpserverv6-editstaticmapping']['name'] = gettext("WebCfg - Services: DHCPv6 Server: Edit static mapping");
$priv_list['page-services-dhcpserverv6-editstaticmapping']['descr'] = gettext("Allow access to the 'Services: DHCPv6 Server : Edit static mapping' page.");
$priv_list['page-services-dhcpserverv6-editstaticmapping']['match'] = array();
$priv_list['page-services-dhcpserverv6-editstaticmapping']['match'][] = "services_dhcpv6_edit.php*";
$priv_list['page-services-dhcpv6relay'] = array();
-$priv_list['page-services-dhcpv6relay']['name'] = gettext("Webcfg - Services: DHCPv6 Relay page");
+$priv_list['page-services-dhcpv6relay']['name'] = gettext("WebCfg - Services: DHCPv6 Relay");
$priv_list['page-services-dhcpv6relay']['descr'] = gettext("Allow access to the 'Services: DHCPv6 Relay' page.");
$priv_list['page-services-dhcpv6relay']['match'] = array();
$priv_list['page-services-dhcpv6relay']['match'][] = "services_dhcpv6_relay.php*";
$priv_list['page-services-dnsforwarder'] = array();
-$priv_list['page-services-dnsforwarder']['name'] = gettext("WebCfg - Services: DNS Forwarder page");
+$priv_list['page-services-dnsforwarder']['name'] = gettext("WebCfg - Services: DNS Forwarder");
$priv_list['page-services-dnsforwarder']['descr'] = gettext("Allow access to the 'Services: DNS Forwarder' page.");
$priv_list['page-services-dnsforwarder']['match'] = array();
$priv_list['page-services-dnsforwarder']['match'][] = "services_dnsmasq.php*";
$priv_list['page-services-dnsforwarder-editdomainoverride'] = array();
-$priv_list['page-services-dnsforwarder-editdomainoverride']['name'] = gettext("WebCfg - Services: DNS Forwarder: Edit Domain Override page");
+$priv_list['page-services-dnsforwarder-editdomainoverride']['name'] = gettext("WebCfg - Services: DNS Forwarder: Edit Domain Override");
$priv_list['page-services-dnsforwarder-editdomainoverride']['descr'] = gettext("Allow access to the 'Services: DNS Forwarder: Edit Domain Override' page.");
$priv_list['page-services-dnsforwarder-editdomainoverride']['match'] = array();
$priv_list['page-services-dnsforwarder-editdomainoverride']['match'][] = "services_dnsmasq_domainoverride_edit.php*";
$priv_list['page-services-dnsforwarder-edithost'] = array();
-$priv_list['page-services-dnsforwarder-edithost']['name'] = gettext("WebCfg - Services: DNS Forwarder: Edit host page");
+$priv_list['page-services-dnsforwarder-edithost']['name'] = gettext("WebCfg - Services: DNS Forwarder: Edit host");
$priv_list['page-services-dnsforwarder-edithost']['descr'] = gettext("Allow access to the 'Services: DNS Forwarder: Edit host' page.");
$priv_list['page-services-dnsforwarder-edithost']['match'] = array();
$priv_list['page-services-dnsforwarder-edithost']['match'][] = "services_dnsmasq_edit.php*";
-$priv_list['page-services-dnsresolver'] = array();
-$priv_list['page-services-dnsresolver']['name'] = gettext("WebCfg - Services: DNS Resolver page");
-$priv_list['page-services-dnsresolver']['descr'] = gettext("Allow access to the 'Services: DNS Resolver' page.");
-$priv_list['page-services-dnsresolver']['match'] = array();
-$priv_list['page-services-dnsresolver']['match'][] = "services_unbound.php*";
-
-$priv_list['page-services-dnsresolver-advanced'] = array();
-$priv_list['page-services-dnsresolver-advanced']['name'] = gettext("WebCfg - Services: DNS Resolver: Advanced page");
-$priv_list['page-services-dnsresolver-advanced']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Advanced' page.");
-$priv_list['page-services-dnsresolver-advanced']['match'] = array();
-$priv_list['page-services-dnsresolver-advanced']['match'][] = "services_unbound_advanced.php*";
-
-$priv_list['page-services-dnsresolver-acls'] = array();
-$priv_list['page-services-dnsresolver-acls']['name'] = gettext("WebCfg - Services: DNS Resolver: Access Lists page");
-$priv_list['page-services-dnsresolver-acls']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Access Lists' page.");
-$priv_list['page-services-dnsresolver-acls']['match'] = array();
-$priv_list['page-services-dnsresolver-acls']['match'][] = "services_unbound_acls.php*";
-
-$priv_list['page-services-dnsresolver-editacls'] = array();
-$priv_list['page-services-dnsresolver-editacls']['name'] = gettext("WebCfg - Services: DNS Resolver: Access Lists: Edit page");
-$priv_list['page-services-dnsresolver-editacls']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Access Lists: Edit' page.");
-$priv_list['page-services-dnsresolver-editacls']['match'] = array();
-$priv_list['page-services-dnsresolver-editacls']['match'][] = "services_unbound_acls_edit.php*";
-
-$priv_list['page-services-dnsresolver-editdomainoverride'] = array();
-$priv_list['page-services-dnsresolver-editdomainoverride']['name'] = gettext("WebCfg - Services: DNS Resolver: Edit Domain Override page");
-$priv_list['page-services-dnsresolver-editdomainoverride']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Edit Domain Override' page.");
-$priv_list['page-services-dnsresolver-editdomainoverride']['match'] = array();
-$priv_list['page-services-dnsresolver-editdomainoverride']['match'][] = "services_unbound_domainoverride_edit.php*";
-
-$priv_list['page-services-dnsresolver-edithost'] = array();
-$priv_list['page-services-dnsresolver-edithost']['name'] = gettext("WebCfg - Services: DNS Resolver: Edit host page");
-$priv_list['page-services-dnsresolver-edithost']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Edit host' page.");
-$priv_list['page-services-dnsresolver-edithost']['match'] = array();
-$priv_list['page-services-dnsresolver-edithost']['match'][] = "services_unbound_host_edit.php*";
-
$priv_list['page-services-dynamicdnsclients'] = array();
-$priv_list['page-services-dynamicdnsclients']['name'] = gettext("WebCfg - Services: Dynamic DNS clients page");
+$priv_list['page-services-dynamicdnsclients']['name'] = gettext("WebCfg - Services: Dynamic DNS clients");
$priv_list['page-services-dynamicdnsclients']['descr'] = gettext("Allow access to the 'Services: Dynamic DNS clients' page.");
$priv_list['page-services-dynamicdnsclients']['match'] = array();
$priv_list['page-services-dynamicdnsclients']['match'][] = "services_dyndns.php*";
$priv_list['page-services-dynamicdnsclient'] = array();
-$priv_list['page-services-dynamicdnsclient']['name'] = gettext("WebCfg - Services: Dynamic DNS client page");
+$priv_list['page-services-dynamicdnsclient']['name'] = gettext("WebCfg - Services: Dynamic DNS client");
$priv_list['page-services-dynamicdnsclient']['descr'] = gettext("Allow access to the 'Services: Dynamic DNS client' page.");
$priv_list['page-services-dynamicdnsclient']['match'] = array();
$priv_list['page-services-dynamicdnsclient']['match'][] = "services_dyndns_edit.php*";
$priv_list['page-services-igmpproxy'] = array();
-$priv_list['page-services-igmpproxy']['name'] = gettext("WebCfg - Services: Igmpproxy page");
-$priv_list['page-services-igmpproxy']['descr'] = gettext("Allow access to the 'Services: Igmpproxy' page.");
+$priv_list['page-services-igmpproxy']['name'] = gettext("WebCfg - Services: IGMP Proxy");
+$priv_list['page-services-igmpproxy']['descr'] = gettext("Allow access to the 'Services: IGMP Proxy' page.");
$priv_list['page-services-igmpproxy']['match'] = array();
$priv_list['page-services-igmpproxy']['match'][] = "services_igmpproxy.php*";
$priv_list['page-services-igmpproxy-edit'] = array();
-$priv_list['page-services-igmpproxy-edit']['name'] = gettext("Firewall: Igmpproxy: Edit page");
-$priv_list['page-services-igmpproxy-edit']['descr'] = gettext("Allow access to the 'Services: Igmpproxy: Edit' page.");
+$priv_list['page-services-igmpproxy-edit']['name'] = gettext("WebCfg - Services: IGMP Proxy: Edit");
+$priv_list['page-services-igmpproxy-edit']['descr'] = gettext("Allow access to the 'Services: IGMP Proxy: Edit' page.");
$priv_list['page-services-igmpproxy-edit']['match'] = array();
$priv_list['page-services-igmpproxy-edit']['match'][] = "services_igmpproxy_edit.php*";
+$priv_list['page-services-ntpd'] = array();
+$priv_list['page-services-ntpd']['name'] = gettext("WebCfg - Services: NTP");
+$priv_list['page-services-ntpd']['descr'] = gettext("Allow access to the 'Services: NTP' page.");
+$priv_list['page-services-ntpd']['match'] = array();
+$priv_list['page-services-ntpd']['match'][] = "services_ntpd.php*";
+
+$priv_list['page-services-ntpd-gps'] = array();
+$priv_list['page-services-ntpd-gps']['name'] = gettext("WebCfg - Services: NTP Serial GPS");
+$priv_list['page-services-ntpd-gps']['descr'] = gettext("Allow access to the 'Services: NTP Serial GPS' page.");
+$priv_list['page-services-ntpd-gps']['match'] = array();
+$priv_list['page-services-ntpd-gps']['match'][] = "services_ntpd_gps.php*";
+
+$priv_list['page-services-ntpd-pps'] = array();
+$priv_list['page-services-ntpd-pps']['name'] = gettext("WebCfg - Services: NTP PPS");
+$priv_list['page-services-ntpd-pps']['descr'] = gettext("Allow access to the 'Services: NTP PPS' page.");
+$priv_list['page-services-ntpd-pps']['match'] = array();
+$priv_list['page-services-ntpd-pps']['match'][] = "services_ntpd_pps.php*";
+
$priv_list['page-services-rfc2136clients'] = array();
-$priv_list['page-services-rfc2136clients']['name'] = gettext("WebCfg - Services: RFC 2136 clients page");
-$priv_list['page-services-rfc2136clients']['descr'] = gettext("Allow access to the 'Services: RFC 2136 clients' page.");
+$priv_list['page-services-rfc2136clients']['name'] = gettext("WebCfg - Services: RFC 2136 Clients");
+$priv_list['page-services-rfc2136clients']['descr'] = gettext("Allow access to the 'Services: RFC 2136 Clients' page.");
$priv_list['page-services-rfc2136clients']['match'] = array();
$priv_list['page-services-rfc2136clients']['match'][] = "services_rfc2136.php*";
+$priv_list['page-services-rfc2136edit'] = array();
+$priv_list['page-services-rfc2136edit']['name'] = gettext("WebCfg - Services: RFC 2136 Client: Edit");
+$priv_list['page-services-rfc2136edit']['descr'] = gettext("Allow access to the 'Services: RFC 2136 Client: Edit' page.");
+$priv_list['page-services-rfc2136edit']['match'] = array();
+$priv_list['page-services-rfc2136edit']['match'][] = "services_rfc2136.php*";
+
$priv_list['page-services-router-advertisements'] = array();
-$priv_list['page-services-router-advertisements']['name'] = gettext("Webcfg - Services: Router Advertisements page");
+$priv_list['page-services-router-advertisements']['name'] = gettext("WebCfg - Services: Router Advertisements");
$priv_list['page-services-router-advertisements']['descr'] = gettext("Allow access to the 'Services: Router Advertisements' page.");
$priv_list['page-services-router-advertisements']['match'] = array();
$priv_list['page-services-router-advertisements']['match'][] = "services_router_advertisements.php*";
$priv_list['page-services-snmp'] = array();
-$priv_list['page-services-snmp']['name'] = gettext("WebCfg - Services: SNMP page");
+$priv_list['page-services-snmp']['name'] = gettext("WebCfg - Services: SNMP");
$priv_list['page-services-snmp']['descr'] = gettext("Allow access to the 'Services: SNMP' page.");
$priv_list['page-services-snmp']['match'] = array();
$priv_list['page-services-snmp']['match'][] = "services_snmp.php*";
+$priv_list['page-services-dnsresolver'] = array();
+$priv_list['page-services-dnsresolver']['name'] = gettext("WebCfg - Services: DNS Resolver");
+$priv_list['page-services-dnsresolver']['descr'] = gettext("Allow access to the 'Services: DNS Resolver' page.");
+$priv_list['page-services-dnsresolver']['match'] = array();
+$priv_list['page-services-dnsresolver']['match'][] = "services_unbound.php*";
+
+$priv_list['page-services-dnsresolver-acls'] = array();
+$priv_list['page-services-dnsresolver-acls']['name'] = gettext("WebCfg - Services: DNS Resolver: Access Lists");
+$priv_list['page-services-dnsresolver-acls']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Access Lists' page.");
+$priv_list['page-services-dnsresolver-acls']['match'] = array();
+$priv_list['page-services-dnsresolver-acls']['match'][] = "services_unbound_acls.php*";
+
+$priv_list['page-services-dnsresolver-advanced'] = array();
+$priv_list['page-services-dnsresolver-advanced']['name'] = gettext("WebCfg - Services: DNS Resolver: Advanced");
+$priv_list['page-services-dnsresolver-advanced']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Advanced' page.");
+$priv_list['page-services-dnsresolver-advanced']['match'] = array();
+$priv_list['page-services-dnsresolver-advanced']['match'][] = "services_unbound_advanced.php*";
+
+$priv_list['page-services-dnsresolver-editdomainoverride'] = array();
+$priv_list['page-services-dnsresolver-editdomainoverride']['name'] = gettext("WebCfg - Services: DNS Resolver: Edit Domain Override");
+$priv_list['page-services-dnsresolver-editdomainoverride']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Edit Domain Override' page.");
+$priv_list['page-services-dnsresolver-editdomainoverride']['match'] = array();
+$priv_list['page-services-dnsresolver-editdomainoverride']['match'][] = "services_unbound_domainoverride_edit.php*";
+
+$priv_list['page-services-dnsresolver-edithost'] = array();
+$priv_list['page-services-dnsresolver-edithost']['name'] = gettext("WebCfg - Services: DNS Resolver: Edit host");
+$priv_list['page-services-dnsresolver-edithost']['descr'] = gettext("Allow access to the 'Services: DNS Resolver: Edit host' page.");
+$priv_list['page-services-dnsresolver-edithost']['match'] = array();
+$priv_list['page-services-dnsresolver-edithost']['match'][] = "services_unbound_host_edit.php*";
+
$priv_list['page-services-wakeonlan'] = array();
-$priv_list['page-services-wakeonlan']['name'] = gettext("WebCfg - Services: Wake on LAN page");
+$priv_list['page-services-wakeonlan']['name'] = gettext("WebCfg - Services: Wake on LAN");
$priv_list['page-services-wakeonlan']['descr'] = gettext("Allow access to the 'Services: Wake on LAN' page.");
$priv_list['page-services-wakeonlan']['match'] = array();
$priv_list['page-services-wakeonlan']['match'][] = "services_wol.php*";
$priv_list['page-services-wakeonlan-edit'] = array();
-$priv_list['page-services-wakeonlan-edit']['name'] = gettext("WebCfg - Services: Wake on LAN: Edit page");
+$priv_list['page-services-wakeonlan-edit']['name'] = gettext("WebCfg - Services: Wake on LAN: Edit");
$priv_list['page-services-wakeonlan-edit']['descr'] = gettext("Allow access to the 'Services: Wake on LAN: Edit' page.");
$priv_list['page-services-wakeonlan-edit']['match'] = array();
$priv_list['page-services-wakeonlan-edit']['match'][] = "services_wol_edit.php*";
-$priv_list['page-diagnostics-cpuutilization'] = array();
-$priv_list['page-diagnostics-cpuutilization']['name'] = gettext("WebCfg - Diagnostics: CPU Utilization page");
-$priv_list['page-diagnostics-cpuutilization']['descr'] = gettext("Allow access to the 'Diagnostics: CPU Utilization' page.");
-$priv_list['page-diagnostics-cpuutilization']['match'] = array();
-$priv_list['page-diagnostics-cpuutilization']['match'][] = "stats.php*";
-
$priv_list['page-hidden-detailedstatus'] = array();
-$priv_list['page-hidden-detailedstatus']['name'] = gettext("WebCfg - Hidden: Detailed Status page");
+$priv_list['page-hidden-detailedstatus']['name'] = gettext("WebCfg - Hidden: Detailed Status");
$priv_list['page-hidden-detailedstatus']['descr'] = gettext("Allow access to the 'Hidden: Detailed Status' page.");
$priv_list['page-hidden-detailedstatus']['match'] = array();
$priv_list['page-hidden-detailedstatus']['match'][] = "status.php*";
$priv_list['page-status-captiveportal'] = array();
-$priv_list['page-status-captiveportal']['name'] = gettext("WebCfg - Status: Captive portal page");
+$priv_list['page-status-captiveportal']['name'] = gettext("WebCfg - Status: Captive portal");
$priv_list['page-status-captiveportal']['descr'] = gettext("Allow access to the 'Status: Captive portal' page.");
$priv_list['page-status-captiveportal']['match'] = array();
$priv_list['page-status-captiveportal']['match'][] = "status_captiveportal.php*";
$priv_list['page-status-captiveportal-expire'] = array();
-$priv_list['page-status-captiveportal-expire']['name'] = gettext("Webcfg - Status: Captive portal Expire Vouchers page");
-$priv_list['page-status-captiveportal-expire']['descr'] = gettext("Allow access to the 'Status: Captive portal Expire Vouchers' page.");
+$priv_list['page-status-captiveportal-expire']['name'] = gettext("WebCfg - Status: Captive Portal: Expire Vouchers");
+$priv_list['page-status-captiveportal-expire']['descr'] = gettext("Allow access to the 'Status: Captive Portal: Expire Vouchers' page.");
$priv_list['page-status-captiveportal-expire']['match'] = array();
$priv_list['page-status-captiveportal-expire']['match'][] = "status_captiveportal_expire.php*";
$priv_list['page-status-captiveportal-test'] = array();
-$priv_list['page-status-captiveportal-test']['name'] = gettext("WebCfg - Status: Captive portal Test Vouchers page");
-$priv_list['page-status-captiveportal-test']['descr'] = gettext("Allow access to the 'Status: Captive portal Test Vouchers' page.");
+$priv_list['page-status-captiveportal-test']['name'] = gettext("WebCfg - Status: Captive Portal: Test Vouchers");
+$priv_list['page-status-captiveportal-test']['descr'] = gettext("Allow access to the 'Status: Captive Portal: Test Vouchers' page.");
$priv_list['page-status-captiveportal-test']['match'] = array();
$priv_list['page-status-captiveportal-test']['match'][] = "status_captiveportal_test.php*";
$priv_list['page-status-captiveportal-voucher-rolls'] = array();
-$priv_list['page-status-captiveportal-voucher-rolls']['name'] = gettext("WebCfg - Status: Captive portal Voucher Rolls page");
+$priv_list['page-status-captiveportal-voucher-rolls']['name'] = gettext("WebCfg - Status: Captive portal Voucher Rolls");
$priv_list['page-status-captiveportal-voucher-rolls']['descr'] = gettext("Allow access to the 'Status: Captive portal Voucher Rolls' page.");
$priv_list['page-status-captiveportal-voucher-rolls']['match'] = array();
$priv_list['page-status-captiveportal-voucher-rolls']['match'][] = "status_captiveportal_voucher_rolls.php*";
$priv_list['page-status-captiveportal-vouchers'] = array();
-$priv_list['page-status-captiveportal-vouchers']['name'] = gettext("WebCfg - Status: Captive portal Vouchers page");
+$priv_list['page-status-captiveportal-vouchers']['name'] = gettext("WebCfg - Status: Captive portal Vouchers");
$priv_list['page-status-captiveportal-vouchers']['descr'] = gettext("Allow access to the 'Status: Captive portal Vouchers' page.");
$priv_list['page-status-captiveportal-vouchers']['match'] = array();
$priv_list['page-status-captiveportal-vouchers']['match'][] = "status_captiveportal_vouchers.php*";
$priv_list['page-status-dhcpleases'] = array();
-$priv_list['page-status-dhcpleases']['name'] = gettext("WebCfg - Status: DHCP leases page");
+$priv_list['page-status-dhcpleases']['name'] = gettext("WebCfg - Status: DHCP leases");
$priv_list['page-status-dhcpleases']['descr'] = gettext("Allow access to the 'Status: DHCP leases' page.");
$priv_list['page-status-dhcpleases']['match'] = array();
$priv_list['page-status-dhcpleases']['match'][] = "status_dhcp_leases.php*";
$priv_list['page-status-dhcpv6leases'] = array();
-$priv_list['page-status-dhcpv6leases']['name'] = gettext("Webcfg - Status: DHCPv6 leases page");
+$priv_list['page-status-dhcpv6leases']['name'] = gettext("WebCfg - Status: DHCPv6 leases");
$priv_list['page-status-dhcpv6leases']['descr'] = gettext("Allow access to the 'Status: DHCPv6 leases' page.");
$priv_list['page-status-dhcpv6leases']['match'] = array();
$priv_list['page-status-dhcpv6leases']['match'][] = "status_dhcpv6_leases.php*";
$priv_list['page-status-filterreloadstatus'] = array();
-$priv_list['page-status-filterreloadstatus']['name'] = gettext("WebCfg - Status: Filter Reload Status page");
+$priv_list['page-status-filterreloadstatus']['name'] = gettext("WebCfg - Status: Filter Reload Status");
$priv_list['page-status-filterreloadstatus']['descr'] = gettext("Allow access to the 'Status: Filter Reload Status' page.");
$priv_list['page-status-filterreloadstatus']['match'] = array();
$priv_list['page-status-filterreloadstatus']['match'][] = "status_filter_reload.php*";
$priv_list['page-status-gatewaygroups'] = array();
-$priv_list['page-status-gatewaygroups']['name'] = gettext("WebCfg - Status: Gateway Groups page");
+$priv_list['page-status-gatewaygroups']['name'] = gettext("WebCfg - Status: Gateway Groups");
$priv_list['page-status-gatewaygroups']['descr'] = gettext("Allow access to the 'Status: Gateway Groups' page.");
$priv_list['page-status-gatewaygroups']['match'] = array();
$priv_list['page-status-gatewaygroups']['match'][] = "status_gateway_groups.php*";
$priv_list['page-status-gateways'] = array();
-$priv_list['page-status-gateways']['name'] = gettext("WebCfg - Status: Gateways page");
+$priv_list['page-status-gateways']['name'] = gettext("WebCfg - Status: Gateways");
$priv_list['page-status-gateways']['descr'] = gettext("Allow access to the 'Status: Gateways' page.");
$priv_list['page-status-gateways']['match'] = array();
$priv_list['page-status-gateways']['match'][] = "status_gateways.php*";
$priv_list['page-status-trafficgraph'] = array();
-$priv_list['page-status-trafficgraph']['name'] = gettext("WebCfg - Status: Traffic Graph page");
+$priv_list['page-status-trafficgraph']['name'] = gettext("WebCfg - Status: Traffic Graph");
$priv_list['page-status-trafficgraph']['descr'] = gettext("Allow access to the 'Status: Traffic Graph' page.");
$priv_list['page-status-trafficgraph']['match'] = array();
$priv_list['page-status-trafficgraph']['match'][] = "status_graph.php*";
@@ -1026,74 +956,80 @@ $priv_list['page-status-trafficgraph']['match'][] = "graph.php*";
$priv_list['page-status-trafficgraph']['match'][] = "ifstats.php*";
$priv_list['page-status-cpuload'] = array();
-$priv_list['page-status-cpuload']['name'] = gettext("WebCfg - Status: CPU load page");
+$priv_list['page-status-cpuload']['name'] = gettext("WebCfg - Status: CPU load");
$priv_list['page-status-cpuload']['descr'] = gettext("Allow access to the 'Status: CPU load' page.");
$priv_list['page-status-cpuload']['match'] = array();
$priv_list['page-status-cpuload']['match'][] = "status_graph_cpu.php*";
$priv_list['page-status-interfaces'] = array();
-$priv_list['page-status-interfaces']['name'] = gettext("WebCfg - Status: Interfaces page");
+$priv_list['page-status-interfaces']['name'] = gettext("WebCfg - Status: Interfaces");
$priv_list['page-status-interfaces']['descr'] = gettext("Allow access to the 'Status: Interfaces' page.");
$priv_list['page-status-interfaces']['match'] = array();
$priv_list['page-status-interfaces']['match'][] = "status_interfaces.php*";
$priv_list['page-status-loadbalancer-pool'] = array();
-$priv_list['page-status-loadbalancer-pool']['name'] = gettext("WebCfg - Status: Load Balancer: Pool page");
+$priv_list['page-status-loadbalancer-pool']['name'] = gettext("WebCfg - Status: Load Balancer: Pool");
$priv_list['page-status-loadbalancer-pool']['descr'] = gettext("Allow access to the 'Status: Load Balancer: Pool' page.");
$priv_list['page-status-loadbalancer-pool']['match'] = array();
$priv_list['page-status-loadbalancer-pool']['match'][] = "status_lb_pool.php*";
$priv_list['page-status-loadbalancer-virtualserver'] = array();
-$priv_list['page-status-loadbalancer-virtualserver']['name'] = gettext("WebCfg - Status: Load Balancer: Virtual Server page");
+$priv_list['page-status-loadbalancer-virtualserver']['name'] = gettext("WebCfg - Status: Load Balancer: Virtual Server");
$priv_list['page-status-loadbalancer-virtualserver']['descr'] = gettext("Allow access to the 'Status: Load Balancer: Virtual Server' page.");
$priv_list['page-status-loadbalancer-virtualserver']['match'] = array();
$priv_list['page-status-loadbalancer-virtualserver']['match'][] = "status_lb_vs.php*";
+$priv_list['page-status-ntp'] = array();
+$priv_list['page-status-ntp']['name'] = gettext("WebCfg - Status: NTP");
+$priv_list['page-status-ntp']['descr'] = gettext("Allow access to the 'Status: NTP' page.");
+$priv_list['page-status-ntp']['match'] = array();
+$priv_list['page-status-ntp']['match'][] = "status_ntpd.php*";
+
$priv_list['page-status-openvpn'] = array();
-$priv_list['page-status-openvpn']['name'] = gettext("WebCfg - Status: OpenVPN page");
+$priv_list['page-status-openvpn']['name'] = gettext("WebCfg - Status: OpenVPN");
$priv_list['page-status-openvpn']['descr'] = gettext("Allow access to the 'Status: OpenVPN' page.");
$priv_list['page-status-openvpn']['match'] = array();
$priv_list['page-status-openvpn']['match'][] = "status_openvpn.php*";
$priv_list['page-status-trafficshaper-queues'] = array();
-$priv_list['page-status-trafficshaper-queues']['name'] = gettext("WebCfg - Status: Traffic shaper: Queues page");
+$priv_list['page-status-trafficshaper-queues']['name'] = gettext("WebCfg - Status: Traffic shaper: Queues");
$priv_list['page-status-trafficshaper-queues']['descr'] = gettext("Allow access to the 'Status: Traffic shaper: Queues' page.");
$priv_list['page-status-trafficshaper-queues']['match'] = array();
$priv_list['page-status-trafficshaper-queues']['match'][] = "status_queues.php*";
$priv_list['page-status-rrdgraphs'] = array();
-$priv_list['page-status-rrdgraphs']['name'] = gettext("WebCfg - Status: RRD Graphs page");
+$priv_list['page-status-rrdgraphs']['name'] = gettext("WebCfg - Status: RRD Graphs");
$priv_list['page-status-rrdgraphs']['descr'] = gettext("Allow access to the 'Status: RRD Graphs' page.");
$priv_list['page-status-rrdgraphs']['match'] = array();
$priv_list['page-status-rrdgraphs']['match'][] = "status_rrd_graph.php*";
$priv_list['page-status-rrdgraphs']['match'][] = "status_rrd_graph_img.php*";
$priv_list['page-status-rrdgraph-settings'] = array();
-$priv_list['page-status-rrdgraph-settings']['name'] = gettext("WebCfg - Status: RRD Graphs settings page");
-$priv_list['page-status-rrdgraph-settings']['descr'] = gettext("Allow access to the 'Status: RRD Graphs: settings' page.");
+$priv_list['page-status-rrdgraph-settings']['name'] = gettext("WebCfg - Status: RRD Graphs: Settings");
+$priv_list['page-status-rrdgraph-settings']['descr'] = gettext("Allow access to the 'Status: RRD Graphs: Settings' page.");
$priv_list['page-status-rrdgraph-settings']['match'] = array();
$priv_list['page-status-rrdgraph-settings']['match'][] = "status_rrd_graph_settings.php*";
$priv_list['page-status-services'] = array();
-$priv_list['page-status-services']['name'] = gettext("WebCfg - Status: Services page");
+$priv_list['page-status-services']['name'] = gettext("WebCfg - Status: Services");
$priv_list['page-status-services']['descr'] = gettext("Allow access to the 'Status: Services' page.");
$priv_list['page-status-services']['match'] = array();
$priv_list['page-status-services']['match'][] = "status_services.php*";
$priv_list['page-status-upnpstatus'] = array();
-$priv_list['page-status-upnpstatus']['name'] = gettext("WebCfg - Status: UPnP Status page");
+$priv_list['page-status-upnpstatus']['name'] = gettext("WebCfg - Status: UPnP Status");
$priv_list['page-status-upnpstatus']['descr'] = gettext("Allow access to the 'Status: UPnP Status' page.");
$priv_list['page-status-upnpstatus']['match'] = array();
$priv_list['page-status-upnpstatus']['match'][] = "status_upnp.php*";
$priv_list['page-diagnostics-wirelessstatus'] = array();
-$priv_list['page-diagnostics-wirelessstatus']['name'] = gettext("WebCfg - Status: Wireless page");
+$priv_list['page-diagnostics-wirelessstatus']['name'] = gettext("WebCfg - Status: Wireless");
$priv_list['page-diagnostics-wirelessstatus']['descr'] = gettext("Allow access to the 'Status: Wireless' page.");
$priv_list['page-diagnostics-wirelessstatus']['match'] = array();
$priv_list['page-diagnostics-wirelessstatus']['match'][] = "status_wireless.php*";
$priv_list['page-system-generalsetup'] = array();
-$priv_list['page-system-generalsetup']['name'] = gettext("WebCfg - System: General Setup page");
+$priv_list['page-system-generalsetup']['name'] = gettext("WebCfg - System: General Setup");
$priv_list['page-system-generalsetup']['descr'] = gettext("Allow access to the 'System: General Setup' page.");
$priv_list['page-system-generalsetup']['match'] = array();
$priv_list['page-system-generalsetup']['match'][] = "system.php*";
@@ -1105,31 +1041,31 @@ $priv_list['page-system-advanced-admin']['match'] = array();
$priv_list['page-system-advanced-admin']['match'][] = "system_advanced_admin.php*";
$priv_list['page-system-advanced-firewall'] = array();
-$priv_list['page-system-advanced-firewall']['name'] = gettext("WebCfg - System: Advanced: Firewall and NAT page");
+$priv_list['page-system-advanced-firewall']['name'] = gettext("WebCfg - System: Advanced: Firewall and NAT");
$priv_list['page-system-advanced-firewall']['descr'] = gettext("Allow access to the 'System: Advanced: Firewall and NAT' page.");
$priv_list['page-system-advanced-firewall']['match'] = array();
$priv_list['page-system-advanced-firewall']['match'][] = "system_advanced_firewall.php*";
$priv_list['page-system-advanced-misc'] = array();
-$priv_list['page-system-advanced-misc']['name'] = gettext("WebCfg - System: Advanced: Miscellaneous page");
+$priv_list['page-system-advanced-misc']['name'] = gettext("WebCfg - System: Advanced: Miscellaneous");
$priv_list['page-system-advanced-misc']['descr'] = gettext("Allow access to the 'System: Advanced: Miscellaneous' page.");
$priv_list['page-system-advanced-misc']['match'] = array();
$priv_list['page-system-advanced-misc']['match'][] = "system_advanced_misc.php*";
$priv_list['page-system-advanced-network'] = array();
-$priv_list['page-system-advanced-network']['name'] = gettext("WebCfg - System: Advanced: Networking page");
+$priv_list['page-system-advanced-network']['name'] = gettext("WebCfg - System: Advanced: Networking");
$priv_list['page-system-advanced-network']['descr'] = gettext("Allow access to the 'System: Advanced: Networking' page.");
$priv_list['page-system-advanced-network']['match'] = array();
$priv_list['page-system-advanced-network']['match'][] = "system_advanced_network.php*";
$priv_list['page-system-advanced-notifications'] = array();
-$priv_list['page-system-advanced-notifications']['name'] = gettext("WebCfg - System: Advanced: Notifications page");
+$priv_list['page-system-advanced-notifications']['name'] = gettext("WebCfg - System: Advanced: Notifications");
$priv_list['page-system-advanced-notifications']['descr'] = gettext("Allow access to the 'System: Advanced: Notifications' page.");
$priv_list['page-system-advanced-notifications']['match'] = array();
$priv_list['page-system-advanced-notifications']['match'][] = "system_advanced_notifications.php*";
$priv_list['page-system-advanced-sysctl'] = array();
-$priv_list['page-system-advanced-sysctl']['name'] = gettext("WebCfg - System: Advanced: Tunables page");
+$priv_list['page-system-advanced-sysctl']['name'] = gettext("WebCfg - System: Advanced: Tunables");
$priv_list['page-system-advanced-sysctl']['descr'] = gettext("Allow access to the 'System: Advanced: Tunables' page.");
$priv_list['page-system-advanced-sysctl']['match'] = array();
$priv_list['page-system-advanced-sysctl']['match'][] = "system_advanced_sysctl.php*";
@@ -1158,128 +1094,110 @@ $priv_list['page-system-crlmanager']['descr'] = gettext("Allow access to the 'Sy
$priv_list['page-system-crlmanager']['match'] = array();
$priv_list['page-system-crlmanager']['match'][] = "system_crlmanager.php*";
-$priv_list['page-system-firmware-manualupdate'] = array();
-$priv_list['page-system-firmware-manualupdate']['name'] = gettext("WebCfg - System: Firmware: Manual Update page");
-$priv_list['page-system-firmware-manualupdate']['descr'] = gettext("Allow access to the 'System: Firmware: Manual Update' page.");
-$priv_list['page-system-firmware-manualupdate']['match'] = array();
-$priv_list['page-system-firmware-manualupdate']['match'][] = "system_firmware.php*";
-
-$priv_list['page-system-firmware-checkforupdate'] = array();
-$priv_list['page-system-firmware-checkforupdate']['name'] = gettext("WebCfg - System: Firmware: Check For Update page");
-$priv_list['page-system-firmware-checkforupdate']['descr'] = gettext("Allow access to the 'System: Firmware: Check For Update' page.");
-$priv_list['page-system-firmware-checkforupdate']['match'] = array();
-$priv_list['page-system-firmware-checkforupdate']['match'][] = "system_firmware_auto.php*";
-
-$priv_list['page-system-firmware-autoupdate'] = array();
-$priv_list['page-system-firmware-autoupdate']['name'] = gettext("WebCfg - System: Firmware: Auto Update page");
-$priv_list['page-system-firmware-autoupdate']['descr'] = gettext("Allow access to the 'System: Firmware: Auto Update' page.");
-$priv_list['page-system-firmware-autoupdate']['match'] = array();
-$priv_list['page-system-firmware-autoupdate']['match'][] = "system_firmware_check.php*";
-
-$priv_list['page-system-firmware-settings'] = array();
-$priv_list['page-system-firmware-settings']['name'] = gettext("WebCfg - System: Firmware: Settings page");
-$priv_list['page-system-firmware-settings']['descr'] = gettext("Allow access to the 'System: Firmware: Settings' page.");
-$priv_list['page-system-firmware-settings']['match'] = array();
-$priv_list['page-system-firmware-settings']['match'][] = "system_firmware_settings.php*";
-
$priv_list['page-system-gatewaygroups'] = array();
-$priv_list['page-system-gatewaygroups']['name'] = gettext("WebCfg - System: Gateway Groups page");
+$priv_list['page-system-gatewaygroups']['name'] = gettext("WebCfg - System: Gateway Groups");
$priv_list['page-system-gatewaygroups']['descr'] = gettext("Allow access to the 'System: Gateway Groups' page.");
$priv_list['page-system-gatewaygroups']['match'] = array();
$priv_list['page-system-gatewaygroups']['match'][] = "system_gateway_groups.php*";
$priv_list['page-system-gateways-editgatewaygroups'] = array();
-$priv_list['page-system-gateways-editgatewaygroups']['name'] = gettext("WebCfg - System: Gateways: Edit Gateway Groups page");
+$priv_list['page-system-gateways-editgatewaygroups']['name'] = gettext("WebCfg - System: Gateways: Edit Gateway Groups");
$priv_list['page-system-gateways-editgatewaygroups']['descr'] = gettext("Allow access to the 'System: Gateways: Edit Gateway Groups' page.");
$priv_list['page-system-gateways-editgatewaygroups']['match'] = array();
$priv_list['page-system-gateways-editgatewaygroups']['match'][] = "system_gateway_groups_edit.php*";
$priv_list['page-system-gateways'] = array();
-$priv_list['page-system-gateways']['name'] = gettext("WebCfg - System: Gateways page");
+$priv_list['page-system-gateways']['name'] = gettext("WebCfg - System: Gateways");
$priv_list['page-system-gateways']['descr'] = gettext("Allow access to the 'System: Gateways' page.");
$priv_list['page-system-gateways']['match'] = array();
$priv_list['page-system-gateways']['match'][] = "system_gateways.php*";
$priv_list['page-system-gateways-editgateway'] = array();
-$priv_list['page-system-gateways-editgateway']['name'] = gettext("WebCfg - System: Gateways: Edit Gateway page");
+$priv_list['page-system-gateways-editgateway']['name'] = gettext("WebCfg - System: Gateways: Edit Gateway");
$priv_list['page-system-gateways-editgateway']['descr'] = gettext("Allow access to the 'System: Gateways: Edit Gateway' page.");
$priv_list['page-system-gateways-editgateway']['match'] = array();
$priv_list['page-system-gateways-editgateway']['match'][] = "system_gateways_edit.php*";
$priv_list['page-system-groupmanager'] = array();
-$priv_list['page-system-groupmanager']['name'] = gettext("WebCfg - System: Group manager page");
+$priv_list['page-system-groupmanager']['name'] = gettext("WebCfg - System: Group manager");
$priv_list['page-system-groupmanager']['descr'] = gettext("Allow access to the 'System: Group manager' page.");
$priv_list['page-system-groupmanager']['match'] = array();
$priv_list['page-system-groupmanager']['match'][] = "system_groupmanager.php*";
$priv_list['page-system-groupmanager-addprivs'] = array();
-$priv_list['page-system-groupmanager-addprivs']['name'] = gettext("WebCfg - System: Group Manager: Add Privileges page");
+$priv_list['page-system-groupmanager-addprivs']['name'] = gettext("WebCfg - System: Group Manager: Add Privileges");
$priv_list['page-system-groupmanager-addprivs']['descr'] = gettext("Allow access to the 'System: Group Manager: Add Privileges' page.");
$priv_list['page-system-groupmanager-addprivs']['match'] = array();
$priv_list['page-system-groupmanager-addprivs']['match'][] = "system_groupmanager_addprivs.php*";
$priv_list['page-system-hasync'] = array();
-$priv_list['page-system-hasync']['name'] = gettext("Webcfg - System: High Availability Sync");
+$priv_list['page-system-hasync']['name'] = gettext("WebCfg - System: High Availability Sync");
$priv_list['page-system-hasync']['descr'] = gettext("Allow access to the 'System: High Availability Sync' page.");
$priv_list['page-system-hasync']['match'] = array();
$priv_list['page-system-hasync']['match'][] = "system_hasync.php*";
$priv_list['page-system-staticroutes'] = array();
-$priv_list['page-system-staticroutes']['name'] = gettext("WebCfg - System: Static Routes page");
+$priv_list['page-system-staticroutes']['name'] = gettext("WebCfg - System: Static Routes");
$priv_list['page-system-staticroutes']['descr'] = gettext("Allow access to the 'System: Static Routes' page.");
$priv_list['page-system-staticroutes']['match'] = array();
$priv_list['page-system-staticroutes']['match'][] = "system_routes.php*";
$priv_list['page-system-staticroutes-editroute'] = array();
-$priv_list['page-system-staticroutes-editroute']['name'] = gettext("WebCfg - System: Static Routes: Edit route page");
+$priv_list['page-system-staticroutes-editroute']['name'] = gettext("WebCfg - System: Static Routes: Edit route");
$priv_list['page-system-staticroutes-editroute']['descr'] = gettext("Allow access to the 'System: Static Routes: Edit route' page.");
$priv_list['page-system-staticroutes-editroute']['match'] = array();
$priv_list['page-system-staticroutes-editroute']['match'][] = "system_routes_edit.php*";
+$priv_list['page-system-update-settings'] = array();
+$priv_list['page-system-update-settings']['name'] = gettext("WebCfg - System: Update: Settings");
+$priv_list['page-system-update-settings']['descr'] = gettext("Allow access to the 'System: Update: Settings' page.");
+$priv_list['page-system-update-settings']['match'] = array();
+$priv_list['page-system-update-settings']['match'][] = "system_update_settings.php*";
+
$priv_list['page-system-usermanager'] = array();
-$priv_list['page-system-usermanager']['name'] = gettext("WebCfg - System: User Manager page");
+$priv_list['page-system-usermanager']['name'] = gettext("WebCfg - System: User Manager");
$priv_list['page-system-usermanager']['descr'] = gettext("Allow access to the 'System: User Manager' page.");
$priv_list['page-system-usermanager']['match'] = array();
$priv_list['page-system-usermanager']['match'][] = "system_usermanager.php*";
$priv_list['page-system-usermanager-addprivs'] = array();
-$priv_list['page-system-usermanager-addprivs']['name'] = gettext("WebCfg - System: User Manager: Add Privileges page");
+$priv_list['page-system-usermanager-addprivs']['name'] = gettext("WebCfg - System: User Manager: Add Privileges");
$priv_list['page-system-usermanager-addprivs']['descr'] = gettext("Allow access to the 'System: User Manager: Add Privileges' page.");
$priv_list['page-system-usermanager-addprivs']['match'] = array();
$priv_list['page-system-usermanager-addprivs']['match'][] = "system_usermanager_addprivs.php*";
$priv_list['page-system-usermanager-passwordmg'] = array();
-$priv_list['page-system-usermanager-passwordmg']['name'] = gettext("WebCfg - System: User Password Manager page");
+$priv_list['page-system-usermanager-passwordmg']['name'] = gettext("WebCfg - System: User Password Manager");
$priv_list['page-system-usermanager-passwordmg']['descr'] = gettext("Allow access to the 'System: User Password Manager' page.");
$priv_list['page-system-usermanager-passwordmg']['match'] = array();
$priv_list['page-system-usermanager-passwordmg']['match'][] = "system_usermanager_passwordmg.php*";
$priv_list['page-system-usermanager-settings'] = array();
-$priv_list['page-system-usermanager-settings']['name'] = gettext("WebCfg - System: User Manager: settings page");
-$priv_list['page-system-usermanager-settings']['descr'] = gettext("Allow access to the 'System: User Manager: settings' page.");
+$priv_list['page-system-usermanager-settings']['name'] = gettext("WebCfg - System: User Manager: Settings");
+$priv_list['page-system-usermanager-settings']['descr'] = gettext("Allow access to the 'System: User Manager: Settings' page.");
$priv_list['page-system-usermanager-settings']['match'] = array();
$priv_list['page-system-usermanager-settings']['match'][] = "system_usermanager_settings.php*";
+$priv_list['page-system-usermanager-settings-ldappicker'] = array();
+$priv_list['page-system-usermanager-settings-ldappicker']['name'] = gettext("WebCfg - System: User Manager: Settings: LDAP Picker");
+$priv_list['page-system-usermanager-settings-ldappicker']['descr'] = gettext("Allow access to the 'System: User Manager: Settings: LDAP Picker' page.");
+$priv_list['page-system-usermanager-settings-ldappicker']['match'] = array();
+$priv_list['page-system-usermanager-settings-ldappicker']['match'][] = "system_usermanager_settings_ldapacpicker.php*";
+
$priv_list['page-system-usermanager-settings-testldap'] = array();
-$priv_list['page-system-usermanager-settings-testldap']['name'] = gettext("WebCfg - System: User Manager: Settings: Test LDAP page");
+$priv_list['page-system-usermanager-settings-testldap']['name'] = gettext("WebCfg - System: User Manager: Settings: Test LDAP");
$priv_list['page-system-usermanager-settings-testldap']['descr'] = gettext("Allow access to the 'System: User Manager: Settings: Test LDAP' page.");
$priv_list['page-system-usermanager-settings-testldap']['match'] = array();
$priv_list['page-system-usermanager-settings-testldap']['match'][] = "system_usermanager_settings_test.php*";
-$priv_list['page-upload_progress'] = array();
-$priv_list['page-upload_progress']['name'] = gettext("WebCfg - System: Firmware: Manual Update page (progress bar)");
-$priv_list['page-upload_progress']['descr'] = gettext("Allow access to the 'System: Firmware: Manual Update: Progress bar' page.");
-$priv_list['page-upload_progress']['match'] = array();
-$priv_list['page-upload_progress']['match'][] = "upload_progress*";
-
$priv_list['page-hidden-uploadconfiguration'] = array();
-$priv_list['page-hidden-uploadconfiguration']['name'] = gettext("WebCfg - Hidden: Upload Configuration page");
+$priv_list['page-hidden-uploadconfiguration']['name'] = gettext("WebCfg - Hidden: Upload Configuration");
$priv_list['page-hidden-uploadconfiguration']['descr'] = gettext("Allow access to the 'Hidden: Upload Configuration' page.");
$priv_list['page-hidden-uploadconfiguration']['match'] = array();
$priv_list['page-hidden-uploadconfiguration']['match'][] = "uploadconfig.php*";
$priv_list['page-vpn-ipsec'] = array();
-$priv_list['page-vpn-ipsec']['name'] = gettext("WebCfg - VPN: IPsec page");
+$priv_list['page-vpn-ipsec']['name'] = gettext("WebCfg - VPN: IPsec");
$priv_list['page-vpn-ipsec']['descr'] = gettext("Allow access to the 'VPN: IPsec' page.");
$priv_list['page-vpn-ipsec']['match'] = array();
$priv_list['page-vpn-ipsec']['match'][] = "vpn_ipsec.php*";
@@ -1297,106 +1215,89 @@ $priv_list['page-vpn-ipsec-editkeys']['match'] = array();
$priv_list['page-vpn-ipsec-editkeys']['match'][] = "vpn_ipsec_keys_edit.php*";
$priv_list['page-vpn-ipsec-mobile'] = array();
-$priv_list['page-vpn-ipsec-mobile']['name'] = gettext("WebCfg - VPN: IPsec: Mobile page");
+$priv_list['page-vpn-ipsec-mobile']['name'] = gettext("WebCfg - VPN: IPsec: Mobile");
$priv_list['page-vpn-ipsec-mobile']['descr'] = gettext("Allow access to the 'VPN: IPsec: Mobile' page.");
$priv_list['page-vpn-ipsec-mobile']['match'] = array();
$priv_list['page-vpn-ipsec-mobile']['match'][] = "vpn_ipsec_mobile.php*";
$priv_list['page-vpn-ipsec-editphase1'] = array();
-$priv_list['page-vpn-ipsec-editphase1']['name'] = gettext("WebCfg - VPN: IPsec: Edit Phase 1 page");
+$priv_list['page-vpn-ipsec-editphase1']['name'] = gettext("WebCfg - VPN: IPsec: Edit Phase 1");
$priv_list['page-vpn-ipsec-editphase1']['descr'] = gettext("Allow access to the 'VPN: IPsec: Edit Phase 1' page.");
$priv_list['page-vpn-ipsec-editphase1']['match'] = array();
$priv_list['page-vpn-ipsec-editphase1']['match'][] = "vpn_ipsec_phase1.php*";
$priv_list['page-vpn-ipsec-editphase2'] = array();
-$priv_list['page-vpn-ipsec-editphase2']['name'] = gettext("WebCfg - VPN: IPsec: Edit Phase 2 page");
+$priv_list['page-vpn-ipsec-editphase2']['name'] = gettext("WebCfg - VPN: IPsec: Edit Phase 2");
$priv_list['page-vpn-ipsec-editphase2']['descr'] = gettext("Allow access to the 'VPN: IPsec: Edit Phase 2' page.");
$priv_list['page-vpn-ipsec-editphase2']['match'] = array();
$priv_list['page-vpn-ipsec-editphase2']['match'][] = "vpn_ipsec_phase2.php*";
+$priv_list['page-vpn-ipsec-settings'] = array();
+$priv_list['page-vpn-ipsec-settings']['name'] = gettext("WebCfg - VPN: IPsec: Settings");
+$priv_list['page-vpn-ipsec-settings']['descr'] = gettext("Allow access to the 'VPN: IPsec: Settings' page.");
+$priv_list['page-vpn-ipsec-settings']['match'] = array();
+$priv_list['page-vpn-ipsec-settings']['match'][] = "vpn_ipsec_settings.php*";
+
$priv_list['page-vpn-vpnl2tp'] = array();
-$priv_list['page-vpn-vpnl2tp']['name'] = gettext("WebCfg - VPN: VPN L2TP page");
-$priv_list['page-vpn-vpnl2tp']['descr'] = gettext("Allow access to the 'VPN: VPN L2TP' page.");
+$priv_list['page-vpn-vpnl2tp']['name'] = gettext("WebCfg - VPN: L2TP");
+$priv_list['page-vpn-vpnl2tp']['descr'] = gettext("Allow access to the 'VPN: L2TP' page.");
$priv_list['page-vpn-vpnl2tp']['match'] = array();
$priv_list['page-vpn-vpnl2tp']['match'][] = "vpn_l2tp.php*";
$priv_list['page-vpn-vpnl2tp-users'] = array();
-$priv_list['page-vpn-vpnl2tp-users']['name'] = gettext("WebCfg - VPN: VPN L2TP : Users page");
-$priv_list['page-vpn-vpnl2tp-users']['descr'] = gettext("Allow access to the 'VPN: VPN L2TP : Users' page.");
+$priv_list['page-vpn-vpnl2tp-users']['name'] = gettext("WebCfg - VPN: L2TP: Users");
+$priv_list['page-vpn-vpnl2tp-users']['descr'] = gettext("Allow access to the 'VPN: L2TP: Users' page.");
$priv_list['page-vpn-vpnl2tp-users']['match'] = array();
$priv_list['page-vpn-vpnl2tp-users']['match'][] = "vpn_l2tp_users.php*";
$priv_list['page-vpn-vpnl2tp-users-edit'] = array();
-$priv_list['page-vpn-vpnl2tp-users-edit']['name'] = gettext("WebCfg - VPN: VPN L2TP : Users : Edit page");
-$priv_list['page-vpn-vpnl2tp-users-edit']['descr'] = gettext("Allow access to the 'VPN: VPN L2TP : Users : Edit' page.");
+$priv_list['page-vpn-vpnl2tp-users-edit']['name'] = gettext("WebCfg - VPN: L2TP: Users: Edit");
+$priv_list['page-vpn-vpnl2tp-users-edit']['descr'] = gettext("Allow access to the 'VPN: L2TP: Users: Edit' page.");
$priv_list['page-vpn-vpnl2tp-users-edit']['match'] = array();
$priv_list['page-vpn-vpnl2tp-users-edit']['match'][] = "vpn_l2tp_users_edit.php*";
$priv_list['page-openvpn-client'] = array();
-$priv_list['page-openvpn-client']['name'] = gettext("WebCfg - OpenVPN: Client page");
+$priv_list['page-openvpn-client']['name'] = gettext("WebCfg - OpenVPN: Client");
$priv_list['page-openvpn-client']['descr'] = gettext("Allow access to the 'OpenVPN: Client' page.");
$priv_list['page-openvpn-client']['match'] = array();
$priv_list['page-openvpn-client']['match'][] = "vpn_openvpn_client.php*";
$priv_list['page-openvpn-csc'] = array();
-$priv_list['page-openvpn-csc']['name'] = gettext("WebCfg - OpenVPN: Client Specific Override page");
+$priv_list['page-openvpn-csc']['name'] = gettext("WebCfg - OpenVPN: Client Specific Override");
$priv_list['page-openvpn-csc']['descr'] = gettext("Allow access to the 'OpenVPN: Client Specific Override' page.");
$priv_list['page-openvpn-csc']['match'] = array();
$priv_list['page-openvpn-csc']['match'][] = "vpn_openvpn_csc.php*";
$priv_list['page-openvpn-server'] = array();
-$priv_list['page-openvpn-server']['name'] = gettext("WebCfg - OpenVPN: Server page");
+$priv_list['page-openvpn-server']['name'] = gettext("WebCfg - OpenVPN: Server");
$priv_list['page-openvpn-server']['descr'] = gettext("Allow access to the 'OpenVPN: Server' page.");
$priv_list['page-openvpn-server']['match'] = array();
$priv_list['page-openvpn-server']['match'][] = "vpn_openvpn_server.php*";
$priv_list['page-services-pppoeserver'] = array();
-$priv_list['page-services-pppoeserver']['name'] = gettext("WebCfg - Services: PPPoE Server page");
+$priv_list['page-services-pppoeserver']['name'] = gettext("WebCfg - Services: PPPoE Server");
$priv_list['page-services-pppoeserver']['descr'] = gettext("Allow access to the 'Services: PPPoE Server' page.");
$priv_list['page-services-pppoeserver']['match'] = array();
-$priv_list['page-services-pppoeserver']['match'][] = "vpn_pppoe.php*";
+$priv_list['page-services-pppoeserver']['match'][] = "services_pppoe.php*";
$priv_list['page-services-pppoeserver-edit'] = array();
-$priv_list['page-services-pppoeserver-edit']['name'] = gettext("WebCfg - Services: PPPoE Server: Edit page");
+$priv_list['page-services-pppoeserver-edit']['name'] = gettext("WebCfg - Services: PPPoE Server: Edit");
$priv_list['page-services-pppoeserver-edit']['descr'] = gettext("Allow access to the 'Services: PPPoE Server: Edit' page.");
$priv_list['page-services-pppoeserver-edit']['match'] = array();
-$priv_list['page-services-pppoeserver-edit']['match'][] = "vpn_pppoe_edit.php*";
-
-$priv_list['page-vpn-vpnpptp'] = array();
-$priv_list['page-vpn-vpnpptp']['name'] = gettext("WebCfg - VPN: VPN PPTP page");
-$priv_list['page-vpn-vpnpptp']['descr'] = gettext("Allow access to the 'VPN: VPN PPTP' page.");
-$priv_list['page-vpn-vpnpptp']['match'] = array();
-$priv_list['page-vpn-vpnpptp']['match'][] = "vpn_pptp.php*";
-
-$priv_list['page-vpn-vpnpptp-users'] = array();
-$priv_list['page-vpn-vpnpptp-users']['name'] = gettext("WebCfg - VPN: VPN PPTP: Users page");
-$priv_list['page-vpn-vpnpptp-users']['descr'] = gettext("Allow access to the 'VPN: VPN PPTP: Users' page.");
-$priv_list['page-vpn-vpnpptp-users']['match'] = array();
-$priv_list['page-vpn-vpnpptp-users']['match'][] = "vpn_pptp_users.php*";
-
-$priv_list['page-vpn-vpnpptp-user-edit'] = array();
-$priv_list['page-vpn-vpnpptp-user-edit']['name'] = gettext("WebCfg - VPN: VPN PPTP: User: Edit page");
-$priv_list['page-vpn-vpnpptp-user-edit']['descr'] = gettext("Allow access to the 'VPN: VPN PPTP: User: Edit' page.");
-$priv_list['page-vpn-vpnpptp-user-edit']['match'] = array();
-$priv_list['page-vpn-vpnpptp-user-edit']['match'][] = "vpn_pptp_users_edit.php*";
+$priv_list['page-services-pppoeserver-edit']['match'][] = "services_pppoe_edit.php*";
$priv_list['page-pfsensewizardsubsystem'] = array();
-$priv_list['page-pfsensewizardsubsystem']['name'] = gettext("WebCfg - pfSense wizard subsystem page");
+$priv_list['page-pfsensewizardsubsystem']['name'] = gettext("WebCfg - pfSense wizard subsystem");
$priv_list['page-pfsensewizardsubsystem']['descr'] = gettext("Allow access to the 'pfSense wizard subsystem' page.");
$priv_list['page-pfsensewizardsubsystem']['match'] = array();
$priv_list['page-pfsensewizardsubsystem']['match'][] = "wizard.php*";
$priv_list['page-xmlrpclibrary'] = array();
-$priv_list['page-xmlrpclibrary']['name'] = gettext("WebCfg - XMLRPC Library page");
+$priv_list['page-xmlrpclibrary']['name'] = gettext("WebCfg - XMLRPC Library");
$priv_list['page-xmlrpclibrary']['descr'] = gettext("Allow access to the 'XMLRPC Library' page.");
$priv_list['page-xmlrpclibrary']['match'] = array();
$priv_list['page-xmlrpclibrary']['match'][] = "xmlrpc.php*";
-$priv_list['page-firewall-easyrule'] = array();
-$priv_list['page-firewall-easyrule']['name'] = gettext("WebCfg - Firewall: Easy Rule add/status page");
-$priv_list['page-firewall-easyrule']['descr'] = gettext("Allow access to the 'Firewall: Easy Rule' add/status page.");
-$priv_list['page-firewall-easyrule']['match'] = array();
-$priv_list['page-firewall-easyrule']['match'][] = "easyrule.php*";
$priv_rmvd = array();
diff --git a/src/etc/inc/priv.inc b/src/etc/inc/priv.inc
index 851643b..676351b 100644
--- a/src/etc/inc/priv.inc
+++ b/src/etc/inc/priv.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
priv.inc
Copyright (C) 2008 Shrew Soft Inc
@@ -40,10 +39,6 @@
*/
-/*
- pfSense_MODULE: auth
-*/
-
require_once("priv.defs.inc");
/* Load and process custom privs. */
diff --git a/src/etc/inc/priv/user.priv.inc b/src/etc/inc/priv/user.priv.inc
index 6414008..fca9be2 100644
--- a/src/etc/inc/priv/user.priv.inc
+++ b/src/etc/inc/priv/user.priv.inc
@@ -3,18 +3,18 @@
global $priv_list;
$priv_list['user-services-captiveportal-login'] = array();
-$priv_list['user-services-captiveportal-login']['name'] = gettext("User - Services - Captive portal login");
+$priv_list['user-services-captiveportal-login']['name'] = gettext("User - Services: Captive Portal login");
$priv_list['user-services-captiveportal-login']['descr'] = gettext("Indicates whether the user is able to login on the captive portal.");
$priv_list['page-help-all'] = array();
-$priv_list['page-help-all']['name'] = "WebCfg - Help pages";
-$priv_list['page-help-all']['descr'] = "Show all items on help menu";
+$priv_list['page-help-all']['name'] = gettext("WebCfg - Help pages");
+$priv_list['page-help-all']['descr'] = gettext("Show all items on help menu");
$priv_list['page-help-all']['match'] = array();
$priv_list['page-help-all']['match'][] = "*help.php";
$priv_list['page-dashboard-all'] = array();
-$priv_list['page-dashboard-all']['name'] = "WebCfg - Dashboard (all)";
-$priv_list['page-dashboard-all']['descr'] = "Allow access to all pages required for the dashboard.";
+$priv_list['page-dashboard-all']['name'] = gettext("WebCfg - Dashboard (all)");
+$priv_list['page-dashboard-all']['descr'] = gettext("Allow access to all pages required for the dashboard.");
$priv_list['page-dashboard-all']['match'] = array();
$priv_list['page-dashboard-all']['match'][] = "index.php*";
$priv_list['page-dashboard-all']['match'][] = "*.widget.php*";
@@ -22,53 +22,114 @@ $priv_list['page-dashboard-all']['match'][] = "graph.php*";
$priv_list['page-dashboard-all']['match'][] = "graph_cpu.php*";
$priv_list['page-dashboard-all']['match'][] = "getstats.php*";
$priv_list['page-dashboard-all']['match'][] = "ifstats.php*";
-$priv_list['page-dashboard-all']['match'][] = "diag_logs_filter_dynamic.php*";
+$priv_list['page-dashboard-all']['match'][] = "status_logs_filter_dynamic.php*";
$priv_list['page-dashboard-widgets'] = array();
-$priv_list['page-dashboard-widgets']['name'] = "WebCfg - Dashboard widgets (direct access).";
-$priv_list['page-dashboard-widgets']['descr'] = "Allow direct access to all Dashboard widget pages, required for some widgets using AJAX.";
+$priv_list['page-dashboard-widgets']['name'] = gettext("WebCfg - Dashboard widgets (direct access).");
+$priv_list['page-dashboard-widgets']['descr'] = gettext("Allow direct access to all Dashboard widget pages, required for some widgets using AJAX.");
$priv_list['page-dashboard-widgets']['match'] = array();
$priv_list['page-dashboard-widgets']['match'][] = "*.widget.php*";
$priv_list['user-config-readonly'] = array();
-$priv_list['user-config-readonly']['name'] = "User - Config - Deny Config Write";
-$priv_list['user-config-readonly']['descr'] = "If present, ignores requests from this user to write config.xml.";
+$priv_list['user-config-readonly']['name'] = gettext("User - Config: Deny Config Write");
+$priv_list['user-config-readonly']['descr'] = gettext("If present, ignores requests from this user to write config.xml.");
$priv_list['user-shell-access'] = array();
-$priv_list['user-shell-access']['name'] = "User - System - Shell account access";
-$priv_list['user-shell-access']['descr'] = "Indicates whether the user is able to login for ".
- "example via SSH.";
+$priv_list['user-shell-access']['name'] = gettext("User - System: Shell account access");
+$priv_list['user-shell-access']['descr'] = gettext("Indicates whether the user is able to login for example via SSH.");
$priv_list['user-copy-files'] = array();
-$priv_list['user-copy-files']['name'] = "User - System - Copy files";
-$priv_list['user-copy-files']['descr'] = "Indicates whether the user is allowed to copy files ".
+$priv_list['user-copy-files']['name'] = gettext("User - System: Copy files (scp)");
+$priv_list['user-copy-files']['descr'] = gettext("Indicates whether the user is allowed to copy files ".
"onto the {$g['product_name']} appliance via SCP/SFTP. ".
"If you are going to use this privilege, you must install ".
- "scponly on the appliance (Hint: pkg_add -r scponly).";
+ "scponly on the appliance (Hint: pkg_add -r scponly).");
$priv_list['user-ssh-tunnel'] = array();
-$priv_list['user-ssh-tunnel']['name'] = "User - System - SSH tunneling";
-$priv_list['user-ssh-tunnel']['descr'] = "Indicates whether the user is able to login for ".
+$priv_list['user-ssh-tunnel']['name'] = gettext("User - System: SSH tunneling");
+$priv_list['user-ssh-tunnel']['descr'] = gettext("Indicates whether the user is able to login for ".
"tunneling via SSH when they have no shell access. ".
"Note: User - System - Copy files conflicts with ".
- "this privilege.";
+ "this privilege.");
$priv_list['user-ipsec-xauth-dialin'] = array();
-$priv_list['user-ipsec-xauth-dialin']['name'] = "User - VPN - IPsec xauth Dialin";
-$priv_list['user-ipsec-xauth-dialin']['descr'] = "Indicates whether the user is allowed to dial in via IPsec xauth ".
+$priv_list['user-ipsec-xauth-dialin']['name'] = gettext("User - VPN: IPsec xauth Dialin");
+$priv_list['user-ipsec-xauth-dialin']['descr'] = gettext("Indicates whether the user is allowed to dial in via IPsec xauth ".
"(Note: Does not allow shell access, but may allow ".
- "the user to create SSH tunnels)";
+ "the user to create SSH tunnels)");
$priv_list['user-l2tp-dialin'] = array();
-$priv_list['user-l2tp-dialin']['name'] = "User - VPN - L2TP Dialin";
-$priv_list['user-l2tp-dialin']['descr'] = "Indicates whether the user is allowed to dial in via L2TP";
-
-$priv_list['user-pptp-dialin'] = array();
-$priv_list['user-pptp-dialin']['name'] = "User - VPN - PPTP Dialin";
-$priv_list['user-pptp-dialin']['descr'] = "Indicates whether the user is allowed to dial in via PPTP";
+$priv_list['user-l2tp-dialin']['name'] = gettext("User - VPN: L2TP Dialin");
+$priv_list['user-l2tp-dialin']['descr'] = gettext("Indicates whether the user is allowed to dial in via L2TP");
$priv_list['user-pppoe-dialin'] = array();
-$priv_list['user-pppoe-dialin']['name'] = "User - VPN - PPPOE Dialin";
-$priv_list['user-pppoe-dialin']['descr'] = "Indicates whether the user is allowed to dial in via PPPOE";
+$priv_list['user-pppoe-dialin']['name'] = gettext("User - VPN: PPPOE Dialin");
+$priv_list['user-pppoe-dialin']['descr'] = gettext("Indicates whether the user is allowed to dial in via PPPOE");
+
+$priv_list['page-status-systemlogs-portalauth'] = array();
+$priv_list['page-status-systemlogs-portalauth']['name'] = gettext("WebCfg - Status: System logs: Portal Auth");
+$priv_list['page-status-systemlogs-portalauth']['descr'] = gettext("Allow access to the 'Status: System logs: Portal Auth' page.");
+$priv_list['page-status-systemlogs-portalauth']['match'] = array();
+$priv_list['page-status-systemlogs-portalauth']['match'][] = "status_logs.php?logfile=portalauth";
+
+$priv_list['page-diagnostics-logs-dhcp'] = array();
+$priv_list['page-diagnostics-logs-dhcp']['name'] = gettext("WebCfg - Status: Logs: DHCP");
+$priv_list['page-diagnostics-logs-dhcp']['descr'] = gettext("Allow access to the 'Status: Logs: DHCP' page.");
+$priv_list['page-diagnostics-logs-dhcp']['match'] = array();
+$priv_list['page-diagnostics-logs-dhcp']['match'][] = "status_logs.php?logfile=dhcpd";
+
+$priv_list['page-diagnostics-logs-gateways'] = array();
+$priv_list['page-diagnostics-logs-gateways']['name'] = gettext("WebCfg - Status: Logs: Gateways");
+$priv_list['page-diagnostics-logs-gateways']['descr'] = gettext("Allow access to the 'Status: Logs: System: Gateways' page.");
+$priv_list['page-diagnostics-logs-gateways']['match'] = array();
+$priv_list['page-diagnostics-logs-gateways']['match'][] = "status_logs.php?logfile=gateways";
+
+$priv_list['page-diagnostics-logs-resolver'] = array();
+$priv_list['page-diagnostics-logs-resolver']['name'] = gettext("WebCfg - Status: Logs: Resolver");
+$priv_list['page-diagnostics-logs-resolver']['descr'] = gettext("Allow access to the 'Status: Logs: System: Resolver' page.");
+$priv_list['page-diagnostics-logs-resolver']['match'] = array();
+$priv_list['page-diagnostics-logs-resolver']['match'][] = "status_logs.php?logfile=resolver";
+
+$priv_list['page-status-systemlogs-ipsecvpn'] = array();
+$priv_list['page-status-systemlogs-ipsecvpn']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN");
+$priv_list['page-status-systemlogs-ipsecvpn']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page.");
+$priv_list['page-status-systemlogs-ipsecvpn']['match'] = array();
+$priv_list['page-status-systemlogs-ipsecvpn']['match'][] = "status_logs.php?logfile=ipsec";
+
+$priv_list['page-status-systemlogs-ntpd'] = array();
+$priv_list['page-status-systemlogs-ntpd']['name'] = gettext("WebCfg - Status: System logs: NTP");
+$priv_list['page-status-systemlogs-ntpd']['descr'] = gettext("Allow access to the 'Status: System logs: NTP' page.");
+$priv_list['page-status-systemlogs-ntpd']['match'] = array();
+$priv_list['page-status-systemlogs-ntpd']['match'][] = "status_logs.php?logfile=ntpd";
+
+$priv_list['page-status-systemlogs-openvpn'] = array();
+$priv_list['page-status-systemlogs-openvpn']['name'] = gettext("WebCfg - Status: System logs: OpenVPN");
+$priv_list['page-status-systemlogs-openvpn']['descr'] = gettext("Allow access to the 'Status: System logs: OpenVPN' page.");
+$priv_list['page-status-systemlogs-openvpn']['match'] = array();
+$priv_list['page-status-systemlogs-openvpn']['match'][] = "status_logs.php?logfile=openvpn";
+
+$priv_list['page-status-systemlogs-ppp'] = array();
+$priv_list['page-status-systemlogs-ppp']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN");
+$priv_list['page-status-systemlogs-ppp']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page.");
+$priv_list['page-status-systemlogs-ppp']['match'] = array();
+$priv_list['page-status-systemlogs-ppp']['match'][] = "status_logs.php?logfile=ppp";
+
+$priv_list['page-status-systemlogs-loadbalancer'] = array();
+$priv_list['page-status-systemlogs-loadbalancer']['name'] = gettext("WebCfg - Status: System logs: Load Balancer");
+$priv_list['page-status-systemlogs-loadbalancer']['descr'] = gettext("Allow access to the 'Status: System logs: Load Balancer' page.");
+$priv_list['page-status-systemlogs-loadbalancer']['match'] = array();
+$priv_list['page-status-systemlogs-loadbalancer']['match'][] = "status_logs.php?logfile=relayd";
+
+$priv_list['page-status-systemlogs-routing'] = array();
+$priv_list['page-status-systemlogs-routing']['name'] = gettext("WebCfg - Status: System logs: Routing");
+$priv_list['page-status-systemlogs-routing']['descr'] = gettext("Allow access to the 'Status: System logs: System: Routing' page.");
+$priv_list['page-status-systemlogs-routing']['match'] = array();
+$priv_list['page-status-systemlogs-routing']['match'][] = "status_logs.php?logfile=routing";
+
+$priv_list['page-status-systemlogs-wireless'] = array();
+$priv_list['page-status-systemlogs-wireless']['name'] = gettext("WebCfg - Status: System logs: Wireless");
+$priv_list['page-status-systemlogs-wireless']['descr'] = gettext("Allow access to the 'Status: System logs: System: Wireless' page.");
+$priv_list['page-status-systemlogs-wireless']['match'] = array();
+$priv_list['page-status-systemlogs-wireless']['match'][] = "status_logs.php?logfile=wireless";
?>
diff --git a/src/etc/inc/radius.inc b/src/etc/inc/radius.inc
index ac610bd..a63b831 100644
--- a/src/etc/inc/radius.inc
+++ b/src/etc/inc/radius.inc
@@ -47,10 +47,6 @@
*/
-/*
- pfSense_MODULE: auth
-*/
-
require_once("PEAR.inc");
require_once("radius_authentication.inc");
require_once("radius_accounting.inc");
diff --git a/src/etc/inc/rrd.inc b/src/etc/inc/rrd.inc
index 8d4f194..50d7b42 100644
--- a/src/etc/inc/rrd.inc
+++ b/src/etc/inc/rrd.inc
@@ -28,11 +28,6 @@
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm /usr/bin/nice /usr/local/bin/rrdtool /bin/cd
- pfSense_MODULE: rrd
-*/
-
/* include all configuration functions */
function dump_rrd_to_xml($rrddatabase, $xmldumpfile) {
@@ -50,7 +45,7 @@ function dump_rrd_to_xml($rrddatabase, $xmldumpfile) {
function restore_rrd() {
global $g, $config;
- $rrddbpath = "/var/db/rrd/";
+ $rrddbpath = "{$g['vardb_path']}/rrd/";
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
$rrdrestore = "";
@@ -211,7 +206,7 @@ function enable_rrd_graphing() {
echo gettext("Generating RRD graphs...");
}
- $rrddbpath = "/var/db/rrd/";
+ $rrddbpath = "{$g['vardb_path']}/rrd/";
$rrdgraphpath = "/usr/local/www/rrd";
$traffic = "-traffic.rrd";
@@ -229,6 +224,7 @@ function enable_rrd_graphing() {
$captiveportalconcurrent = "-concurrent.rrd";
$captiveportalloggedin = "-loggedin.rrd";
$ntpd = "ntpd.rrd";
+ $dhcpd = "-dhcpd.rrd";
$rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
$netstat = "/usr/bin/netstat";
@@ -241,6 +237,7 @@ function enable_rrd_graphing() {
$spamd_gather = "/usr/local/bin/spamd_gather_stats.php";
$ifconfig = "/sbin/ifconfig";
$captiveportal_gather = "/usr/local/bin/captiveportal_gather_stats.php";
+ $dhcpd_gather = "/usr/local/bin/dhcpd_gather_stats.php";
$ntpq = "/usr/local/sbin/ntpq";
$rrdtrafficinterval = 60;
@@ -258,6 +255,7 @@ function enable_rrd_graphing() {
$rrdvpninterval = 60;
$rrdcaptiveportalinterval = 60;
$rrdntpdinterval = 60;
+ $rrddhcpdinterval = 60;
$trafficvalid = $rrdtrafficinterval * 2;
$wirelessvalid = $rrdwirelessinterval * 2;
@@ -274,6 +272,7 @@ function enable_rrd_graphing() {
$vpnvalid = $rrdvpninterval * 2;
$captiveportalvalid = $rrdcaptiveportalinterval * 2;
$ntpdvalid = $rrdntpdinterval * 2;
+ $dhcpdvalid = $rrddhcpdinterval * 2;
/* Assume 2*10GigE for now */
$downstream = 2500000000;
@@ -319,11 +318,11 @@ function enable_rrd_graphing() {
}
if (platform_booting()) {
- if (!is_dir("{$g['vardb_path']}/rrd")) {
- mkdir("{$g['vardb_path']}/rrd", 0775);
+ if (!is_dir($rrddbpath)) {
+ mkdir($rrddbpath, 0775);
}
- @chown("{$g['vardb_path']}/rrd", "nobody");
+ @chown($rrddbpath, "nobody");
}
/* process all real and pseudo interfaces */
@@ -912,6 +911,92 @@ function enable_rrd_graphing() {
}
/* End NTP statistics */
+ /* Start dhcpd statistics */
+ if (is_array($config['dhcpd'])) {
+ foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
+ if (isset($config['dhcpd'][$dhcpif]['statsgraph'])) {
+ if (!file_exists("$rrddbpath$dhcpif$dhcpd")) {
+ $rrdcreate = "$rrdtool create $rrddbpath$dhcpif$dhcpd --step $rrddhcpdinterval ";
+ $rrdcreate .= "DS:leases:GAUGE:$dhcpdvalid:0:100000 ";
+ $rrdcreate .= "DS:staticleases:GAUGE:$dhcpdvalid:0:100000 ";
+ $rrdcreate .= "DS:dhcprange:GAUGE:$dhcpdvalid:0:100000 ";
+ $rrdcreate .= "RRA:MIN:0.5:1:1200 ";
+ $rrdcreate .= "RRA:MIN:0.5:5:720 ";
+ $rrdcreate .= "RRA:MIN:0.5:60:1860 ";
+ $rrdcreate .= "RRA:MIN:0.5:1440:2284 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1:1200 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:5:720 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:60:1860 ";
+ $rrdcreate .= "RRA:AVERAGE:0.5:1440:2284 ";
+ $rrdcreate .= "RRA:MAX:0.5:1:1200 ";
+ $rrdcreate .= "RRA:MAX:0.5:5:720 ";
+ $rrdcreate .= "RRA:MAX:0.5:60:1860 ";
+ $rrdcreate .= "RRA:MAX:0.5:1440:2284 ";
+ create_new_rrd($rrdcreate);
+ unset($rrdcreate);
+ }
+
+ /* enter UNKNOWN values in the RRD so it knows we rebooted. */
+ if (platform_booting()) {
+ mwexec("$rrdtool update $rrddbpath$dhcpif$dhcpd N:U:U:U:U:U:U:U:U");
+ }
+
+ $rrdupdatesh .= "\n";
+ $rrdupdatesh .= "# polling leases for dhcp \n";
+ $rrdupdatesh .= "DHCP=`${php} -q ${dhcpd_gather} '${dhcpif}'`\n";
+ $rrdupdatesh .= "$rrdtool update $rrddbpath$dhcpif$dhcpd \${DHCP}\n";
+
+ }
+ }
+ }
+ /* END dhcpd statistics */
+
+ /* Start gateway quality */
+ $rrdupdatesh .= <<<EOD
+
+# Gateway quality graphs
+for sock in {$g['varrun_path']}/dpinger_*.sock; do
+ if [ ! -S "\$sock" ]; then
+ continue
+ fi
+
+ gw=\$(/usr/bin/nc -U \$sock | awk '{ print \$1 }')
+
+ if [ -z "\$gw" ]; then
+ continue
+ fi
+
+ delay=\$(/usr/bin/nc -U \$sock | awk '{ print \$2 }')
+ loss=\$(/usr/bin/nc -U \$sock | awk '{ print \$4 }')
+
+ if echo "\$loss" | grep -Eqv '^[0-9]+\$'; then
+ loss="U"
+ fi
+ if echo "\$delay" | grep -Eqv '^[0-9]+\$'; then
+ delay="U"
+ else
+ # Convert delay to millisecond
+ delay=\$(echo "scale=7; \$delay / 1000 / 1000" | /usr/bin/bc)
+ fi
+
+ if [ ! -f {$rrddbpath}\$gw-quality.rrd ]; then
+ {$rrdtool} create {$rrddbpath}\$gw-quality.rrd --step 60 \\
+ DS:loss:GAUGE:120:0:100 \\
+ DS:delay:GAUGE:120:0:100000 \\
+ RRA:AVERAGE:0.5:1:1200 \\
+ RRA:AVERAGE:0.5:5:720 \\
+ RRA:AVERAGE:0.5:60:1860 \\
+ RRA:AVERAGE:0.5:1440:2284
+
+ {$rrdtool} update {$rrddbpath}\$gw-quality.rrd -t loss:delay N:U:U
+ fi
+
+ {$rrdtool} update {$rrddbpath}\$gw-quality.rrd -t loss:delay N:\$loss:\$delay
+done
+
+EOD;
+ /* End gateway quality */
+
$rrdupdatesh .= "sleep 60\n";
$rrdupdatesh .= "done\n";
log_error(gettext("Creating rrd update script"));
@@ -945,41 +1030,6 @@ function enable_rrd_graphing() {
}
-# Create gateway quality RRD with settings suitable for pfSense graph set.
-function create_gateway_quality_rrd($rrd_file) {
- global $g;
-
- $rrdinterval = 60;
- $valid = $rrdinterval * 2;
- $rrdtool = "/usr/bin/nice -n20 /usr/local/bin/rrdtool";
-
- /* GATEWAY QUALITY, set up the rrd file */
- if (!file_exists("$rrd_file")) {
- $rrdcreate = "$rrdtool create $rrd_file --step $rrdinterval ";
- $rrdcreate .= "DS:loss:GAUGE:$valid:0:100 ";
- $rrdcreate .= "DS:delay:GAUGE:$valid:0:100000 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:1:1200 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:5:720 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:60:1860 ";
- $rrdcreate .= "RRA:AVERAGE:0.5:1440:2284 ";
-
- create_new_rrd($rrdcreate);
- unset($rrdcreate);
- }
-
- /* enter UNKNOWN values in the RRD so it knows we rebooted. */
- if (platform_booting()) {
- if (!is_dir("{$g['vardb_path']}/rrd")) {
- mkdir("{$g['vardb_path']}/rrd", 0775);
- }
-
- @chown("{$g['vardb_path']}/rrd", "nobody");
-
- mwexec("$rrdtool update $rrd_file N:U:U");
- }
- unset($rrdtool, $rrdinterval, $valid, $rrd_file);
-}
-
function kill_traffic_collector() {
global $g;
diff --git a/src/etc/inc/service-utils.inc b/src/etc/inc/service-utils.inc
index 265ad9f..ca72d5f 100644
--- a/src/etc/inc/service-utils.inc
+++ b/src/etc/inc/service-utils.inc
@@ -32,10 +32,6 @@
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/pgrep /bin/sh /usr/bin/killall
- pfSense_MODULE: utils
-*/
require_once("globals.inc");
require_once("captiveportal.inc");
require_once("openvpn.inc");
@@ -138,6 +134,8 @@ function stop_service($name) {
}
if (!empty($service['stopcmd'])) {
eval($service['stopcmd']);
+ } elseif (!empty($service['executable'])) {
+ mwexec("/usr/bin/killall " . escapeshellarg($service['executable']));
}
break;
@@ -153,7 +151,9 @@ function restart_service($name) {
return;
}
- stop_service($name);
+ if (is_service_running($name)) {
+ stop_service($name);
+ }
start_service($name);
if (is_array($config['installedpackages']) && is_array($config['installedpackages']['service'])) {
@@ -318,7 +318,7 @@ function get_services() {
$gateways_arr = return_gateways_array();
if (is_array($gateways_arr)) {
$pconfig = array();
- $pconfig['name'] = "apinger";
+ $pconfig['name'] = "dpinger";
$pconfig['description'] = gettext("Gateway Monitoring Daemon");
$services[] = $pconfig;
}
@@ -344,7 +344,7 @@ function get_services() {
$services[] = $pconfig;
}
- if (isset($config['ipsec']['enable'])) {
+ if (ipsec_enabled()) {
$pconfig = array();
$pconfig['name'] = "ipsec";
$pconfig['description'] = gettext("IPsec VPN");
@@ -465,7 +465,7 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false)
if (get_service_status($service)) {
$statustext = gettext("Running");
$output .= "<a title=\"" . sprintf(gettext("%s Service is"), $service["name"]) . " {$statustext}\" ><i class=\"";
- $output .= ($smallicon) ? "icon icon-play" : "icon icon-large icon-play";
+ $output .= ($smallicon) ? "fa fa-play" : "fa fa-lg fa-play";
$output .= "\" ></i></a>";
if ($withtext) {
$output .= "&nbsp;" . $statustext;
@@ -474,7 +474,7 @@ function get_service_status_icon($service, $withtext = true, $smallicon = false)
$service_enabled = is_service_enabled($service['name']);
$statustext = ($service_enabled) ? gettext("Stopped") : gettext("Disabled");
$output .= "<a title=\"" . sprintf(gettext("%s Service is"), $service["name"]) . " {$statustext}\" ><i class=\"";
- $output .= ($smallicon) ? "icon icon-remove" : "icon icon-large icon-remove";
+ $output .= ($smallicon) ? "fa fa-times" : "fa fa-lg fa-times";
$output .= "\" ></i></a>";
if ($withtext) {
$output .= "&nbsp;" . $statustext;
@@ -504,32 +504,32 @@ function get_service_control_GET_links($service, $addname = false) {
if (get_service_status($service)) {
switch ($service['name']) {
case "openvpn":
- $output .= "<a href='status_services.php?mode=restartservice&amp;service={$service['name']}&amp;vpnmode={$service['mode']}&amp;id={$service['vpnid']}'>";
+ $output .= "<a href=\"status_services.php?mode=restartservice&amp;service={$service['name']}&amp;vpnmode={$service['mode']}&amp;id={$service['vpnid']}\">";
break;
case "captiveportal":
- $output .= "<a href='status_services.php?mode=restartservice&amp;service={$service['name']}&amp;zone={$service['zone']}'>";
+ $output .= "<a href=\"status_services.php?mode=restartservice&amp;service={$service['name']}&amp;zone={$service['zone']}\">";
break;
default:
- $output .= "<a href='status_services.php?mode=restartservice&amp;service={$service['name']}'>";
+ $output .= "<a href=\"status_services.php?mode=restartservice&amp;service={$service['name']}\">";
}
- $output .= "<i class=\"icon-large icon-repeat\" title='" . sprintf(gettext("Restart %sService"), $stitle) . "' alt='restart'></i></a>\n";
+ $output .= "<i class=\"fa fa-repeat\" title=\"" . sprintf(gettext("Restart %sService"), $stitle) . "\"></i></a>\n";
switch ($service['name']) {
case "openvpn":
- $output .= "<a href='status_services.php?mode=stopservice&amp;service={$service['name']}&amp;vpnmode={$service['mode']}&amp;id={$service['vpnid']}'>";
+ $output .= "<a href=\"status_services.php?mode=stopservice&amp;service={$service['name']}&amp;vpnmode={$service['mode']}&amp;id={$service['vpnid']}\">";
break;
case "captiveportal":
- $output .= "<a href='status_services.php?mode=stopservice&amp;service={$service['name']}&amp;zone={$service['zone']}'>";
+ $output .= "<a href=\"status_services.php?mode=stopservice&amp;service={$service['name']}&amp;zone={$service['zone']}\">";
break;
default:
- $output .= "<a href='status_services.php?mode=stopservice&amp;service={$service['name']}'>";
+ $output .= "<a href=\"status_services.php?mode=stopservice&amp;service={$service['name']}\">";
}
- $output .= "<i class=\"icon-large icon-stop\" title='" . sprintf(gettext("Stop %sService"), $stitle) . "' alt='stop'></i></a>";
+ $output .= "<i class=\"fa fa-stop-circle-o\" title=\"" . sprintf(gettext("Stop %sService"), $stitle) . "\"></i></a>";
} else {
$service_enabled = is_service_enabled($service['name']);
if ($service['name'] == 'openvpn' || $service['name'] == 'captiveportal' || $service_enabled) {
$output .= sprintf($link, sprintf(gettext("Start %sService"), $stitle), 'startservice');
- $output .= '<i class="icon icon-play-circle"></i></a> ';
+ $output .= '<i class="fa fa-play-circle"></i></a> ';
}
}
@@ -549,7 +549,7 @@ function get_service_control_links($service, $addname = false) {
$link = '<a title="%s" href="#" id="captiveportal-%s-' . $service['zone'] . '">';
break;
default:
- $link = '<a title="%s" href="#" value="" id="%s-' . $service['name'] . '">';
+ $link = '<a title="%s" href="#" id="%s-' . $service['name'] . '">';
}
if (get_service_status($service)) {
@@ -558,33 +558,33 @@ function get_service_control_links($service, $addname = false) {
$output .= '<a href="#" id="openvpn-restartservice-' . $service['mode'] . '-' . $service['vpnid'] . '" >';
break;
case "captiveportal":
- $output .= '<a href="#" value="" id=captiveportal-restartservice-' . $service['zone'] . '">';
+ $output .= '<a href="#" id="captiveportal-restartservice-' . $service['zone'] . '">';
break;
default:
$output .= '<a href="#" id="restartservice-' . $service['name'] . '" >';
}
- $output .= "<i class=\"icon-large icon-repeat\" title='" . sprintf(gettext("Restart %sService"), $stitle) . "' alt='restart'></i></a>\n";
+ $output .= "<i class=\"fa fa-repeat\" title=\"" . sprintf(gettext("Restart %sService"), $stitle) . "\"></i></a>\n";
switch ($service['name']) {
case "openvpn":
$output .= '<a href="#" id="openvpn-stopservice-' . $service['mode'] . '-' . $service['vpnid'] . '" >';
break;
case "captiveportal":
- $output .= '<a href="#" value="" id=captiveportal-stopservice-' . $service['zone'] . '">';
+ $output .= '<a href="#" id="captiveportal-stopservice-' . $service['zone'] . '">';
break;
default:
$output .= '<a href="#" id="stopservice-' . $service['name'] . '">';
}
- $output .= "<i class=\"icon-large icon-stop\" title='" . sprintf(gettext("Stop %sService"), $stitle) . "' alt='stop'></i></a>";
+ $output .= "<i class=\"fa fa-stop-circle-o\" title=\"" . sprintf(gettext("Stop %sService"), $stitle) . "\"></i></a>";
} else {
$service_enabled = is_service_enabled($service['name']);
if ($service['name'] == 'openvpn' || $service['name'] == 'captiveportal' || $service_enabled) {
$output .= sprintf($link, sprintf(gettext("Start %sService"), $stitle), 'startservice');
- $output .= '<i class="icon icon-play-circle"></i></a> ';
+ $output .= '<i class="fa fa-play-circle"></i></a> ';
}
}
@@ -605,7 +605,7 @@ function service_control_start($name, $extras) {
case 'openntpd':
system_ntp_configure();
break;
- case 'apinger':
+ case 'dpinger':
setup_gateways_monitor();
break;
case 'bsnmpd':
@@ -674,8 +674,8 @@ function service_control_stop($name, $extras) {
case 'openntpd':
killbyname("openntpd");
break;
- case 'apinger':
- killbypid("{$g['varrun_path']}/apinger.pid");
+ case 'dpinger':
+ stop_dpinger();
break;
case 'bsnmpd':
killbypid("{$g['varrun_path']}/snmpd.pid");
@@ -744,8 +744,7 @@ function service_control_restart($name, $extras) {
case 'openntpd':
system_ntp_configure();
break;
- case 'apinger':
- killbypid("{$g['varrun_path']}/apinger.pid");
+ case 'dpinger':
setup_gateways_monitor();
break;
case 'bsnmpd':
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index 37fdf46..0a1d56a 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -30,16 +30,8 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall /bin/pgrep /bin/sh /usr/local/sbin/dhcpd /usr/local/sbin/igmpproxy
- pfSense_BUILDER_BINARIES: /sbin/ifconfig /usr/local/sbin/dnsmasq
- pfSense_BUILDER_BINARIES: /usr/local/sbin/miniupnpd /usr/sbin/radvd
- pfSense_BUILDER_BINARIES: /usr/local/sbin/dhcleases6 /usr/sbin/bsnmpd
- pfSense_MODULE: utils
-*/
-
-define('DYNDNS_PROVIDER_VALUES', 'citynetwork cloudflare custom custom-v6 dnsexit dnsimple dnsmadeeasy dnsomatic dyndns dyndns-custom dyndns-static dyns easydns eurodns freedns glesys googledomains gratisdns he-net he-net-v6 he-net-tunnelbroker loopia namecheap noip noip-free ods opendns ovh-dynhost route53 selfhost zoneedit');
-define('DYNDNS_PROVIDER_DESCRIPTIONS', 'City Network,CloudFlare,Custom,Custom (v6),DNSexit,DNSimple,DNS Made Easy,DNS-O-Matic,DynDNS (dynamic),DynDNS (custom),DynDNS (static),DyNS,easyDNS,Euro Dns,freeDNS,GleSYS,Google Domains,GratisDNS,HE.net,HE.net (v6),HE.net Tunnelbroker,Loopia,Namecheap,No-IP,No-IP (free),ODS.org,OpenDNS,OVH DynHOST,Route 53,SelfHost,ZoneEdit');
+define('DYNDNS_PROVIDER_VALUES', 'citynetwork cloudflare custom custom-v6 dnsexit dnsimple dnsmadeeasy dnsomatic dyndns dyndns-custom dyndns-static dyns easydns eurodns freedns glesys googledomains gratisdns he-net he-net-v6 he-net-tunnelbroker loopia namecheap noip noip-free ods opendns ovh-dynhost route53 selfhost spdns spdns-v6 zoneedit');
+define('DYNDNS_PROVIDER_DESCRIPTIONS', 'City Network,CloudFlare,Custom,Custom (v6),DNSexit,DNSimple,DNS Made Easy,DNS-O-Matic,DynDNS (dynamic),DynDNS (custom),DynDNS (static),DyNS,easyDNS,Euro Dns,freeDNS,GleSYS,Google Domains,GratisDNS,HE.net,HE.net (v6),HE.net Tunnelbroker,Loopia,Namecheap,No-IP,No-IP (free),ODS.org,OpenDNS,OVH DynHOST,Route 53,SelfHost,SPDNS,SPDNS (v6),ZoneEdit');
/* implement ipv6 route advertising daemon */
function services_radvd_configure($blacklist = array()) {
@@ -1583,8 +1575,7 @@ EOD;
fclose($igmpfl);
unset($igmpconf);
- /* NOTE: -d4 means everything LOG_WARNING and smaller */
- mwexec("/usr/local/sbin/igmpproxy -d4 -c {$g['tmp_path']}/igmpproxy.conf");
+ mwexec_bg("/usr/local/sbin/igmpproxy -v {$g['tmp_path']}/igmpproxy.conf");
log_error(gettext("Started IGMP proxy service."));
return 0;
@@ -1628,12 +1619,81 @@ function services_dhcrelay_configure() {
}
}
+ /*
+ * In order for the relay to work, it needs to be active
+ * on the interface in which the destination server sits.
+ */
$srvips = explode(",", $dhcrelaycfg['server']);
if (!is_array($srvips)) {
log_error("No destination IP has been configured!");
return;
}
+ foreach ($srvips as $srcidx => $srvip) {
+ unset($destif);
+ foreach ($iflist as $ifname) {
+ $subnet = get_interface_ip($ifname);
+ if (!is_ipaddr($subnet)) {
+ continue;
+ }
+ $subnet .= "/" . get_interface_subnet($ifname);
+ if (ip_in_subnet($srvip, $subnet)) {
+ $destif = get_real_interface($ifname);
+ break;
+ }
+ }
+ if (!isset($destif)) {
+ foreach (get_staticroutes() as $rtent) {
+ if (ip_in_subnet($srvip, $rtent['network'])) {
+ $a_gateways = return_gateways_array(true);
+ $destif = $a_gateways[$rtent['gateway']]['interface'];
+ break;
+ }
+ }
+ }
+
+ if (!isset($destif)) {
+ /* Create a array from the existing route table */
+ exec("/usr/bin/netstat -rnWf inet", $route_str);
+ array_shift($route_str);
+ array_shift($route_str);
+ array_shift($route_str);
+ array_shift($route_str);
+ $route_arr = array();
+ foreach ($route_str as $routeline) {
+ $items = preg_split("/[ ]+/i", $routeline);
+ if (is_subnetv4($items[0])) {
+ $subnet = $items[0];
+ } elseif (is_ipaddrv4($items[0])) {
+ $subnet = "{$items[0]}/32";
+ } else {
+ // Not a subnet or IP address, skip to the next line.
+ continue;
+ }
+ if (ip_in_subnet($srvip, $subnet)) {
+ $destif = trim($items[6]);
+ break;
+ }
+ }
+ }
+
+ if (!isset($destif)) {
+ if (is_array($config['gateways']['gateway_item'])) {
+ foreach ($config['gateways']['gateway_item'] as $gateway) {
+ if (isset($gateway['defaultgw'])) {
+ $destif = get_real_interface($gateway['interface']);
+ break;
+ }
+ }
+ } else {
+ $destif = get_real_interface("wan");
+ }
+ }
+
+ if (!empty($destif)) {
+ $dhcrelayifs[] = $destif;
+ }
+ }
$dhcrelayifs = array_unique($dhcrelayifs);
/* fire up dhcrelay */
@@ -1694,10 +1754,70 @@ function services_dhcrelay6_configure() {
}
$dhcrelayifs = array_unique($dhcrelayifs);
+ /*
+ * In order for the relay to work, it needs to be active
+ * on the interface in which the destination server sits.
+ */
$srvips = explode(",", $dhcrelaycfg['server']);
- if (!is_array($srvips)) {
- log_error("No destination IP has been configured!");
- return;
+ $srvifaces = array();
+ foreach ($srvips as $srcidx => $srvip) {
+ unset($destif);
+ foreach ($iflist as $ifname) {
+ $subnet = get_interface_ipv6($ifname);
+ if (!is_ipaddrv6($subnet)) {
+ continue;
+ }
+ $subnet .= "/" . get_interface_subnetv6($ifname);
+ if (ip_in_subnet($srvip, $subnet)) {
+ $destif = get_real_interface($ifname);
+ break;
+ }
+ }
+ if (!isset($destif)) {
+ if (is_array($config['staticroutes']['route'])) {
+ foreach ($config['staticroutes']['route'] as $rtent) {
+ if (ip_in_subnet($srvip, $rtent['network'])) {
+ $a_gateways = return_gateways_array(true);
+ $destif = $a_gateways[$rtent['gateway']]['interface'];
+ break;
+ }
+ }
+ }
+ }
+
+ if (!isset($destif)) {
+ /* Create a array from the existing route table */
+ exec("/usr/bin/netstat -rnWf inet6", $route_str);
+ array_shift($route_str);
+ array_shift($route_str);
+ array_shift($route_str);
+ array_shift($route_str);
+ $route_arr = array();
+ foreach ($route_str as $routeline) {
+ $items = preg_split("/[ ]+/i", $routeline);
+ if (ip_in_subnet($srvip, $items[0])) {
+ $destif = trim($items[6]);
+ break;
+ }
+ }
+ }
+
+ if (!isset($destif)) {
+ if (is_array($config['gateways']['gateway_item'])) {
+ foreach ($config['gateways']['gateway_item'] as $gateway) {
+ if (isset($gateway['defaultgw'])) {
+ $destif = get_real_interface($gateway['interface']);
+ break;
+ }
+ }
+ } else {
+ $destif = get_real_interface("wan");
+ }
+ }
+
+ if (!empty($destif)) {
+ $srvifaces[] = "{$srvip}%{$destif}";
+ }
}
/* fire up dhcrelay */
@@ -2148,10 +2268,6 @@ begemotSnmpdCommunityDisable = 1
EOD;
- if (isset($config['snmpd']['bindlan'])) {
- $config['snmpd']['bindip'] = 'lan';
- unset($config['snmpd']['bindlan']);
- }
$bind_to_ip = "0.0.0.0";
if (isset($config['snmpd']['bindip'])) {
if (is_ipaddr($config['snmpd']['bindip'])) {
@@ -2210,17 +2326,10 @@ EOD;
}
if (isset($config['snmpd']['modules']['hostres'])) {
- /* XXX: hostres module crashes APU - ticket #4403 */
- $specplatform = system_identify_specific_platform();
- if ($specplatform['name'] == 'APU') {
- log_error("'Host Resources' SNMP module was ignored because it can potentially crash system on APU boards");
- } else {
- $snmpdconf .= <<<EOD
+ $snmpdconf .= <<<EOD
begemotSnmpdModulePath."hostres" = "/usr/lib/snmp_hostres.so"
EOD;
- }
- unset($specplatform);
}
if (isset($config['snmpd']['modules']['bridge'])) {
@@ -2248,13 +2357,9 @@ EOD;
fclose($fd);
unset($snmpdconf);
- if (isset($config['snmpd']['bindlan'])) {
- $bindlan = "";
- }
-
/* run bsnmpd */
mwexec("/usr/sbin/bsnmpd -c {$g['varetc_path']}/snmpd.conf" .
- "{$bindlan} -p {$g['varrun_path']}/snmpd.pid");
+ " -p {$g['varrun_path']}/snmpd.pid");
if (platform_booting()) {
echo gettext("done.") . "\n";
@@ -2490,7 +2595,7 @@ function upnp_action ($action) {
case "stop":
killbypid("{$g['varrun_path']}/miniupnpd.pid");
while ((int)exec("/bin/pgrep -a miniupnpd | wc -l") > 0) {
- mwexec('killall miniupnpd 2>/dev/null', true);
+ mwexec('/usr/bin/killall miniupnpd 2>/dev/null', true);
}
mwexec('/sbin/pfctl -aminiupnpd -Fr 2>&1 >/dev/null');
mwexec('/sbin/pfctl -aminiupnpd -Fn 2>&1 >/dev/null');
diff --git a/src/etc/inc/shaper.inc b/src/etc/inc/shaper.inc
index f4b562e..9b57170 100644
--- a/src/etc/inc/shaper.inc
+++ b/src/etc/inc/shaper.inc
@@ -3,11 +3,13 @@
shaper.inc
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -749,6 +751,8 @@ class altq_root_queue {
'Save'
));
+ $sform->setAction("firewall_shaper.php");
+
$section = new Form_Section(null);
$section->addInput(new Form_Checkbox(
@@ -1306,9 +1310,14 @@ class priq_queue {
function build_form() {
- $sform = new Form();
+ $sform = new Form(new Form_Button(
+ 'Submit',
+ 'Save'
+ ));
- $section = new Form_Section(null);
+ $sform->setAction("firewall_shaper.php");
+
+ $section = new Form_Section("");
$section->addInput(new Form_Checkbox(
'enabled',
@@ -1318,12 +1327,21 @@ class priq_queue {
'on'
));
- $section->addInput(new Form_StaticText(
+ $section->addInput(new Form_Input(
+ 'newname',
'Name',
+ 'text',
$this->GetQname()
))->setHelp('Enter the name of the queue here. Do not use spaces and limit the size to 15 characters.');
$section->addInput(new Form_Input(
+ 'name',
+ null,
+ 'hidden',
+ $this->GetQname()
+ ));
+
+ $section->addInput(new Form_Input(
'priority',
'Priority',
'number',
@@ -1345,7 +1363,8 @@ class priq_queue {
'default',
null,
null,
- $this->GetDefault()
+ $this->GetDefault(),
+ 'default'
))->setHelp('Default Queue');
}
@@ -1375,7 +1394,7 @@ class priq_queue {
null,
null,
!empty($this->GetCodel())
- ))->setHelp('<a target="_new" href="http://www.openbsd.org/faq/pf/queueing.html#ecn">' . gettext('Explicit Congestion Notification') . '</a>');
+ ))->setHelp('<a target="_new" href="http://www.openbsd.org/faq/pf/queueing.html#ecn">' . gettext('Codel Active Queue') . '</a>');
$group->setHelp('Select options for this queue');
@@ -1388,14 +1407,21 @@ class priq_queue {
$this->GetDescription()
));
- $section->addInput(new Form_Input(
+ $sform->add($section);
+
+ $sform->addGlobal(new Form_Input(
'interface',
null,
'hidden',
$this->GetInterface()
));
- $sform->add($section);
+ $sform->addGlobal(new Form_Input(
+ 'name',
+ null,
+ 'hidden',
+ $this->GetQname()
+ ));
return($sform);
}
@@ -2227,7 +2253,7 @@ EOJS;
'text',
$this->GetU_d()
))->setHelp('d');
-
+
$group->add(new Form_Input(
'upperlimit3',
null,
@@ -2260,7 +2286,7 @@ EOJS;
'text',
$this->GetR_d()
))->setHelp('d');
-
+
$group->add(new Form_Input(
'realtime3',
null,
@@ -2292,7 +2318,7 @@ EOJS;
'text',
$this->GetL_d()
))->setHelp('d');
-
+
$group->add(new Form_Input(
'linkshare3',
null,
@@ -3735,9 +3761,10 @@ EOD;
$form .= "<tbody>";
// If there are no bandwidths defined, make a blank one for convenience
- if(empty($bandwidth))
+ if (empty($bandwidth)) {
$bandwidth = array(0 => array('bw' => '', 'bwscale' => 'Kb', 'bwsched' => 'none'));
-
+ }
+
if (is_array($bandwidth)) {
foreach ($bandwidth as $bwidx => $bw) {
$form .= '<tr>';
@@ -3748,31 +3775,31 @@ EOD;
$form .= "</td>";
$form .= '<td class="col-xs-4">';
$form .= "<select id=\"bwtype{$bwidx}\" name=\"bwtype{$bwidx}\" class=\"form-control\">";
-
+
foreach (array("Kb" => "Kbit/s", "Mb" => "Mbit/s", "Gb" => "Gbit/s", "b" => "Bit/s") as $bwsidx => $bwscale) {
$form .= "<option value=\"{$bwsidx}\"";
-
+
if ($bw['bwscale'] == $bwsidx) {
- $form .= " selected=\"selected\"";
+ $form .= " selected";
}
-
+
$form .= ">{$bwscale}</option>";
}
-
+
$form .= "</select>";
$form .= "</td>";
$form .= '<td class="col-xs-4">';
$form .= "<select id=\"bwsched{$bwidx}\" name=\"bwsched{$bwidx}\" class=\"form-control\">";
-
+
foreach ($schedules as $schd) {
$selected = "";
if ($bw['bwsched'] == $schd) {
- $selected = "selected=\"selected\"";
+ $selected = "selected";
}
-
+
$form .= "<option value='{$schd}' {$selected}>{$schd}</option>";
}
-
+
$form .= "</select>";
$form .= "</td>";
$form .= '<td>';
@@ -3804,6 +3831,7 @@ EOD;
$sform = new Form();
+ $sform->setAction("firewall_shaper.php");
$section = new Form_Section('Limiters');
@@ -3848,7 +3876,7 @@ EOD;
// if($_GET['newbwrow']) {
// array_push($bandwidth, array(count($bandwidth) => array('bw' => '', 'burst' => '', 'bwscale' => 'Kb', 'bwsched' => 'none') ));
// }
-
+
if (is_array($bandwidth)) {
$section->addInput(new Form_StaticText(
'Bandwidth',
@@ -3859,7 +3887,7 @@ EOD;
$mask = $this->GetMask();
$section->addInput(new Form_Select(
- 'scheduler',
+ 'mask',
'Mask',
$mask['type'],
array('none' => 'None', 'srcaddress' => 'Source addresses', 'dstaddress' => 'Destination addresses')
@@ -4126,7 +4154,7 @@ class dnqueue_class extends dummynet_class {
$sform = new Form();
-
+ $sform->setAction("firewall_shaper.php");
$section = new Form_Section('Limiters');
$section->addInput(new Form_Checkbox(
@@ -4163,11 +4191,12 @@ class dnqueue_class extends dummynet_class {
$bandwidth = $this->GetBandwidth();
// Delete a row
- if(isset($_GET['delbwrow']) && (count($bandwidth) > 0))
+ if (isset($_GET['delbwrow']) && (count($bandwidth) > 0)) {
unset($bandwidth[$_GET['delbwrow']]);
+ }
// Add a row
- if($_GET['newbwrow']) {
+ if ($_GET['newbwrow']) {
array_push($bandwidth, array(count($bandwidth) => array('bw' => '', 'burst' => '', 'bwscale' => 'Kb', 'bwsched' => 'none') ));
}
@@ -4176,7 +4205,7 @@ class dnqueue_class extends dummynet_class {
$row = 0;
$numrows = count($bandwidth) - 1;
- if($numrows >= 0) {
+ if ($numrows >= 0) {
foreach ($bandwidth as $bwidx => $bw) {
$group = new Form_Group($row == 0 ? 'Bandwidth':null);
@@ -4207,8 +4236,9 @@ class dnqueue_class extends dummynet_class {
'firewall_shaper_vinterface.php?pipe=' . $pipe . '&queue=' . $qname . '&action=' . $action . '&delbwrow=' . $bwidx
))->removeClass('btn-primary')->addClass('btn-danger btn-sm');
- if($row == $numrows)
+ if ($row == $numrows) {
$group->setHelp('Bandwidth is the rate (e.g. Mbit/s) to which traffic in this limiter will be restricted.');
+ }
$section->add($group);
$row++;
@@ -4336,461 +4366,6 @@ class dnqueue_class extends dummynet_class {
}
}
-// List of layer7 objects
-$layer7_rules_list = array();
-
-class layer7 {
-
- var $rname; //alias
- var $rdescription; //alias description
- var $rport; //divert port
- var $renabled; //rule enabled
- var $rsets = array(); //array of l7 associations
-
- // Auxiliary functions
-
- function GetRName() {
- return $this->rname;
- }
- function SetRName($rname) {
- $this->rname = $rname;
- }
- function GetRDescription() {
- return $this->rdescription;
- }
- function SetRDescription($rdescription) {
- $this->rdescription = $rdescription;
- }
- function GetRPort() {
- return $this->rport;
- }
- function SetRPort($rport) {
- $this->rport = $rport;
- }
- function GetREnabled() {
- return $this->renabled;
- }
- function SetREnabled($value) {
- $this->renabled = $value;
- }
- function GetRl7() {
- return $this->rsets;
- }
- function SetRl7($rsets) {
- $this->rsets = $rsets;
- }
-
- //Add a tuple (rule,structure,element) to the $rsets
-
- function add_rule($l7set) {
- $this->rsets[] = $l7set;
- }
-
- // Build the layer7 rules
- function build_l7_rules() {
- if ($this->GetREnabled() == "") {
- return;
- }
- //$l7rules = "#" . $this->rdescription . "\n";
- foreach ($this->rsets as $rl7) {
- $l7rules .= $rl7->build_rules();
- }
- return $l7rules;
- }
-
- // Read the config from array
- function ReadConfig(&$qname, &$q) {
- $this->SetRName($qname);
- $this->SetREnabled($q['enabled']);
- $this->SetRPort($q['divert_port']);
- if (isset($q['description']) && $q['description'] <> "") {
- $this->SetRDescription($q['description']);
- }
- $rsets = $q['l7rules'];
- //Put individual rules in the array
- if (is_array($rsets)) {
- $this->rsets = array(); // XXX: ugly hack
- foreach ($rsets as $l7r) {
- $l7obj = new l7rule();
- $l7obj->SetRProtocol($l7r['protocol']);
- $l7obj->SetRStructure($l7r['structure']);
- $l7obj->SetRBehaviour($l7r['behaviour']);
- $this->add_rule($l7obj);
- }
- }
- }
-
- //Generate a random port for the divert socket
- function gen_divert_port() {
- $dports = get_divert_ports(); //array of used ports
- $divert_port = 1; // Initialize
- while (($divert_port % 2) != 0 || in_array($divert_port, $dports)) {
- $divert_port = rand(40000, 60000);
- }
- return $divert_port;
- }
-
- //Helps building the left tree
- function build_tree() {
- $tree = " <li><a href=\"firewall_shaper_layer7.php?container=" . $this->GetRName() ."&amp;action=show\">";
- $tree .= $this->GetRName() . "</a>";
- $tree .= "</li>";
-
- return $tree;
- }
-
- function build_form() {
-
- $form = new Form(new Form_Button(
- 'Submit',
- 'Save'
- ));
-
- $section = new Form_Section('Traffic Shaper');
-
- $section->addInput(new Form_Checkbox(
- 'enabled',
- 'Enable/Disable',
- 'Enable/disable discipline and its children',
- ($this->GetREnabled() == "on"),
- 'on'
- ));
-
- $section->addInput(new Form_Input(
- 'container',
- 'Name',
- 'text',
- $this->GetRName()
- ));
-
- $section->addInput(new Form_Input(
- 'description',
- 'Description',
- 'text',
- $this->GetRDescription()
- ))->setHelp('You may enter a description here for your reference (not parsed).');
-
- $form->add($section);
-
- return $form;
- }
-
- //Write the setting to the $config array
- function wconfig() {
- global $config;
-
- if (!is_array($config['l7shaper']['container'])) {
- $config['l7shaper']['container'] = array();
- }
- //
- $cflink =& get_l7c_reference_to_me_in_config($this->GetRName());
- // Test if this rule exists already
- if (!$cflink) {
- $cflink =& $config['l7shaper']['container'][];
- }
- $cflink['name'] = $this->GetRName();
- $cflink['enabled'] = $this->GetREnabled();
- $cflink['description'] = $this->GetRDescription();
- $cflink['divert_port'] = $this->GetRPort();
-
- // Destroy previously existent rules
- if (is_array($cflink['rules'])) {
- unset($cflink['l7rules']);
- }
-
- $cflink['l7rules'] = array();
-
- $i = 0;
- foreach ($this->rsets as $rulel7) {
- $cflink['l7rules'][$i]['protocol'] = $rulel7->GetRProtocol();
- $cflink['l7rules'][$i]['structure'] = $rulel7->GetRStructure();
- $cflink['l7rules'][$i]['behaviour'] = $rulel7->GetRBehaviour();
- $i++;
- }
- }
-
- //This function is necessary to help producing the overload options for keep state
- function get_unique_structures() {
-
- $unique_structures = array("action" => false, "dummynet" => false, "altq" => false);
- foreach ($this->rsets as $l7rule) {
- if ($l7rule->GetRStructure() == "action") {
- $unique_structures['action'] = true;
- } else if ($l7rule->GetRStructure() == "limiter") {
- $unique_structures['dummynet'] = true;
- } else {
- $unique_structures['altq'] = true;
- }
- }
- //Delete non used structures so we don't have to check this in filter.inc
- foreach ($unique_structures as $key => $value) {
- if (!$value) {
- unset($unique_structures[$key]);
- }
- }
- return $unique_structures;
- }
-
- function validate_input($data, &$input_errors) {
- $reqdfields[] = "container";
- $reqdfieldsn[] = gettext("Name");
-
- shaper_do_input_validation($data, $reqdfields, $reqdfieldsn, $input_errors);
-
- if (!preg_match("/^[a-zA-Z0-9_-]+$/", $data['container'])) {
- $input_errors[] = gettext("Queue names must be alphanumeric and _ or - only.");
- }
- }
-
- function delete_l7c() {
- mwexec("/bin/pkill -f 'ipfw-classifyd .* -p ". $this->GetRPort() . "'", true);
- unset_l7_object_by_reference($this->GetRName());
- cleanup_l7_from_rules($this->GetRName());
- }
-}
-
-class l7rule {
-
- var $rprotocol; //protocol
- var $rstructure; //action, limiter, queue
- var $rbehaviour; //allow, block, queue_name, pipe_number ...
-
- //Auxiliary Functions
-
- function GetRProtocol() {
- return $this->rprotocol;
- }
- function SetRProtocol($rprotocol) {
- $this->rprotocol = $rprotocol;
- }
- function GetRStructure() {
- return $this->rstructure;
- }
- function SetRStructure($rstructure) {
- $this->rstructure = $rstructure;
- }
- function GetRBehaviour() {
- return $this->rbehaviour;
- }
- function SetRBehaviour($rbehaviour) {
- $this->rbehaviour = $rbehaviour;
- }
-
- //XXX Do we need to test any particularity for AltQ queues?
- function build_rules() {
- global $dummynet_pipe_list;
- switch ($this->GetRStructure()) {
- case "limiter":
- read_dummynet_config();
- $dn_list =& get_unique_dnqueue_list();
- $found = false;
- if (is_array($dn_list)) {
- foreach ($dn_list as $key => $value) {
- if ($key == $this->GetRBehaviour()) {
- if ($value[0] == "?") {
- $l7rule = $this->GetRProtocol() . " = dnqueue " . substr($value, 1) . "\n";
- } else {
- $l7rule = $this->GetRProtocol() . " = dnpipe " . $value . "\n";
- }
- $found = true;
- }
- if ($found) {
- break;
- }
- }
- }
- break;
- default: //This is for action and for altq
- $l7rule = $this->GetRProtocol() . " = " . $this->GetRStructure() . " " . $this->GetRBehaviour() . "\n";
- break;
- }
- return $l7rule;
- }
-}
-
-/*
- * This function allows to return an array with all the used divert socket ports
- */
-function get_divert_ports() {
- global $layer7_rules_list;
- $dports = array();
-
- foreach ($layer7_rules_list as $l7r) {
- $dports[] = $l7r->GetRPort();
- }
-
- return $dports;
-}
-
-function &get_l7c_reference_to_me_in_config(&$name) {
- global $config;
-
- $ptr = NULL;
-
- if (is_array($config['l7shaper']['container'])) {
- foreach ($config['l7shaper']['container'] as $key => $value) {
- if ($value['name'] == $name) {
- $ptr =& $config['l7shaper']['container'][$key];
- }
- }
- }
- return $ptr;
- // $ptr can be null. has to be checked later
-}
-
-function unset_l7_object_by_reference(&$name) {
- global $config;
-
- if (is_array($config['l7shaper']['container'])) {
- foreach ($config['l7shaper']['container'] as $key => $value) {
- if ($value['name'] == $name) {
- unset($config['l7shaper']['container'][$key]['l7rules']);
- unset($config['l7shaper']['container'][$key]);
- break;
- }
- }
- }
-}
-
-function read_layer7_config() {
- global $layer7_rules_list, $config;
-
- if (!is_array($config['l7shaper']['container']) || !count($config['l7shaper']['container'])) {
- $layer7_rules_list = array();
- return;
- }
-
- $l7cs = &$config['l7shaper']['container'];
-
- $layer7_rules_list = array();
-
- foreach ($l7cs as $conf) {
- if (empty($conf['name'])) {
- continue; /* XXX: grrrrrr at php */
- }
- $root =& new layer7();
- $root->ReadConfig($conf['name'], $conf);
- $layer7_rules_list[$root->GetRName()] = &$root;
- }
-}
-
-function update_layer7_custom_patterns() {
- global $config;
-
- if (!is_array($config['l7shaper']['custom_pat'])) {
- return;
- }
-
- foreach ($config['l7shaper']['custom_pat'] as $filename => $filecontent) {
- if (!file_exists("/usr/local/share/protocols/" . $filename)) {
- @file_put_contents("/usr/local/share/protocols/" . $filename, base64_decode($filecontent));
- }
- }
-}
-
-function generate_layer7_files() {
- global $layer7_rules_list, $g;
-
- read_layer7_config();
-
- if (!empty($layer7_rules_list)) {
- if (!is_module_loaded("ipdivert.ko")) {
- mwexec("/sbin/kldload ipdivert.ko");
- }
-
- array_map('unlink', glob("{$g['tmp_path']}/*.l7"));
- }
-
- update_layer7_custom_patterns();
-
- foreach ($layer7_rules_list as $l7rules) {
- if ($l7rules->GetREnabled()) {
- $filename = $l7rules->GetRName() . ".l7";
- $path = "{$g['tmp_path']}/" . $filename;
-
- $rules = $l7rules->build_l7_rules();
-
- $fp = fopen($path, 'w');
- fwrite($fp, $rules);
- fclose($fp);
- }
- }
-}
-
-function layer7_start_l7daemon() {
- global $layer7_rules_list, $g;
-
- /*
- * XXX: ermal - Needed ?!
- * read_layer7_config();
- */
-
- foreach ($layer7_rules_list as $l7rules) {
- if ($l7rules->GetREnabled()) {
- $filename = $l7rules->GetRName() . ".l7";
- $path = "{$g['tmp_path']}/" . $filename;
-
- unset($l7pid);
- /* Only reread the configuration rather than restart to avoid losing information. */
- exec("/bin/pgrep -f 'ipfw-classifyd .* -p ". $l7rules->GetRPort() . "'", $l7pid);
- if (count($l7pid) > 0) {
- log_error(sprintf(gettext("Sending HUP signal to %s"), $l7pid[0]));
- mwexec("/bin/kill -HUP {$l7pid[0]}");
- } else {
- // XXX: Hardcoded number of packets to garbage collect and queue length.
- $ipfw_classifyd_init = "/usr/local/sbin/ipfw-classifyd -n 8 -q 700 -c {$path} -p " . $l7rules->GetRPort() . " -P /usr/local/share/protocols";
- mwexec_bg($ipfw_classifyd_init);
- }
- }
- }
-}
-
-// This function uses /usr/local/share/protocols as a default directory for searching .pat files
-function generate_protocols_array() {
-
- update_layer7_custom_patterns();
-
- $protocols = return_dir_as_array("/usr/local/share/protocols");
- $protocols_new = array();
- if (is_array($protocols)) {
- foreach ($protocols as $key => $proto) {
- if (strstr($proto, ".pat")) {
- $protocols_new[$key] =& str_replace(".pat", "", $proto);
- }
- }
- sort($protocols_new);
- }
- return $protocols_new;
-}
-
-function get_l7_unique_list() {
- global $layer7_rules_list;
-
- $l7list = array();
- if (is_array($layer7_rules_list)) {
- foreach ($layer7_rules_list as $l7c) {
- if ($l7c->GetREnabled()) {
- $l7list[] = $l7c->GetRName();
- }
- }
- }
-
- return $l7list;
-}
-
-// Disable a removed l7 container from the filter
-function cleanup_l7_from_rules(&$name) {
- global $config;
-
- if (is_array($config['filter']['rule'])) {
- foreach ($config['filter']['rule'] as $key => $rule) {
- if ($rule['l7container'] == $name) {
- unset($config['filter']['rule'][$key]['l7container']);
- }
- }
- }
-}
-
function get_dummynet_name_list() {
$dn_name_list =& get_unique_dnqueue_list();
@@ -5149,7 +4724,7 @@ function build_iface_without_this_queue($iface, $qname) {
}
-$default_shaper_msg = sprintf(gettext("Welcome to the %s Traffic Shaper."), $g['product_name']) . "</b><br />";
+$default_shaper_msg = sprintf(gettext("Welcome to the %s Traffic Shaper."), $g['product_name']) . "<br />";
$default_shaper_msg .= gettext("The tree on the left helps you navigate through the queues.<br />"
. "Buttons at the bottom represent queue actions and are activated accordingly.");
diff --git a/src/etc/inc/simplepie/simplepie.inc b/src/etc/inc/simplepie/simplepie.inc
index 32f158e..7052eb4 100644
--- a/src/etc/inc/simplepie/simplepie.inc
+++ b/src/etc/inc/simplepie/simplepie.inc
@@ -4010,16 +4010,16 @@ class SimplePie_Item
$temp = explode(':', $this->sanitize($duration_parent[0]['data'], SIMPLEPIE_CONSTRUCT_TEXT));
if (sizeof($temp) > 0)
{
- $seconds = (int)array_pop($temp);
+ (int) $seconds = array_pop($temp);
}
if (sizeof($temp) > 0)
{
- $minutes = (int)array_pop($temp);
+ (int) $minutes = array_pop($temp);
$seconds += $minutes * 60;
}
if (sizeof($temp) > 0)
{
- $hours = (int)array_pop($temp);
+ (int) $hours = array_pop($temp);
$seconds += $hours * 3600;
}
unset($temp);
@@ -9132,6 +9132,8 @@ class SimplePie_Misc
return 'Adobe-Symbol-Encoding';
case 'ami1251':
+ case 'ami1251':
+ case 'amiga1251':
case 'amiga1251':
return 'Amiga-1251';
@@ -9226,6 +9228,7 @@ class SimplePie_Misc
case 'csiso646danish':
case 'dk':
case 'ds2089':
+ case 'ds2089':
case 'iso646dk':
return 'DS_2089';
@@ -9722,6 +9725,7 @@ class SimplePie_Misc
return 'IBM1026';
case 'ibm1047':
+ case 'ibm1047':
return 'IBM1047';
case 'csiso143iecp271':
@@ -9887,6 +9891,7 @@ class SimplePie_Misc
return 'ISO-8859-14';
case 'iso885915':
+ case 'iso885915':
case 'latin9':
return 'ISO-8859-15';
@@ -10434,6 +10439,9 @@ class SimplePie_Misc
case 'windows1254':
return 'Windows-1254';
+ case 'windows1254':
+ return 'windows-1254';
+
case 'windows1255':
return 'windows-1255';
@@ -11144,6 +11152,7 @@ class SimplePie_Decode_HTML_Entities
case "\x09":
case "\x0A":
case "\x0B":
+ case "\x0B":
case "\x0C":
case "\x20":
case "\x3C":
diff --git a/src/etc/inc/smtp.inc b/src/etc/inc/smtp.inc
index 035a30a..9a70e90 100644
--- a/src/etc/inc/smtp.inc
+++ b/src/etc/inc/smtp.inc
@@ -6,10 +6,6 @@
*
*/
-/*
- pfSense_MODULE: notifications
-*/
-
class smtp_class
{
var $user="";
diff --git a/src/etc/inc/system.inc b/src/etc/inc/system.inc
index 1a8f9dd..c125bc2 100644
--- a/src/etc/inc/system.inc
+++ b/src/etc/inc/system.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
system.inc
part of m0n0wall (http://m0n0.ch/wall)
@@ -29,16 +28,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/powerd /usr/bin/killall /sbin/route
- pfSense_BUILDER_BINARIES: /bin/hostname /bin/ls /usr/sbin/syslogd
- pfSense_BUILDER_BINARIES: /usr/sbin/pccardd /usr/local/sbin/lighttpd /bin/chmod /bin/mkdir
- pfSense_BUILDER_BINARIES: /usr/bin/tar /usr/local/sbin/ntpd /usr/local/sbin/ntpdate
- pfSense_BUILDER_BINARIES: /usr/bin/nohup /sbin/dmesg /usr/local/sbin/atareinit /sbin/kldload
- pfSense_BUILDER_BINARIES: /usr/local/sbin/filterdns
- pfSense_MODULE: utils
-*/
-
function activate_powerd() {
global $config, $g;
@@ -587,6 +576,24 @@ function system_routing_configure($interface = "") {
}
}
+ $gateways_arr = return_gateways_array(false, true);
+ foreach ($gateways_arr as $gateway) {
+ // setup static interface routes for nonlocal gateways
+ if (isset($gateway["nonlocalgateway"])) {
+ $srgatewayip = $gateway['gateway'];
+ $srinterfacegw = $gateway['interface'];
+ if (is_ipaddr($srgatewayip) && !empty($srinterfacegw)) {
+ $inet = (!is_ipaddrv4($srgatewayip) ? "-inet6" : "-inet");
+ $cmd = "/sbin/route change {$inet} " . escapeshellarg($srgatewayip) . " ";
+ mwexec($cmd . "-iface " . escapeshellarg($srinterfacegw));
+ if (isset($config['system']['route-debug'])) {
+ $mt = microtime();
+ log_error("ROUTING debug: $mt - $cmd -iface $srinterfacegw ");
+ }
+ }
+ }
+ }
+
if ($dont_add_route == false) {
if (!empty($interface) && $interface != $interfacegw) {
;
@@ -771,7 +778,7 @@ function system_syslogd_get_remote_servers($syslogcfg, $facility = "*.*") {
// Rather than repeatedly use the same code, use this function to build a list of remote servers.
$facility .= " ".
$remote_servers = "";
- $pad_to = 56;
+ $pad_to = max(strlen($facility), 56);
$padding = ceil(($pad_to - strlen($facility))/8)+1;
if ($syslogcfg['remoteserver']) {
$remote_servers .= "{$facility}" . str_repeat("\t", $padding) . "@" . system_syslogd_fixup_server($syslogcfg['remoteserver']) . "\n";
@@ -785,6 +792,41 @@ function system_syslogd_get_remote_servers($syslogcfg, $facility = "*.*") {
return $remote_servers;
}
+function clear_log_file($logfile = "/var/log/system.log", $restart_syslogd = true) {
+ global $config, $g;
+ if ($restart_syslogd) {
+ exec("/usr/bin/killall syslogd");
+ }
+ if (isset($config['system']['disablesyslogclog'])) {
+ unlink($logfile);
+ touch($logfile);
+ } else {
+ $log_size = isset($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : "511488";
+ $log_size = isset($config['syslog'][basename($logfile, '.log') . '_settings']['logfilesize']) ? $config['syslog'][basename($logfile, '.log') . '_settings']['logfilesize'] : $log_size;
+ exec("/usr/local/sbin/clog -i -s {$log_size} " . escapeshellarg($logfile));
+ }
+ if ($restart_syslogd) {
+ system_syslogd_start();
+ }
+}
+
+function clear_all_log_files($restart = false) {
+ global $g;
+ exec("/usr/bin/killall syslogd");
+
+ $log_files = array("system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth", "ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing");
+ foreach ($log_files as $lfile) {
+ clear_log_file("{$g['varlog_path']}/{$lfile}.log", false);
+ }
+
+ if ($restart) {
+ system_syslogd_start();
+ killbyname("dhcpd");
+ services_dhcpd_configure();
+ }
+ return;
+}
+
function system_syslogd_start() {
global $config, $g;
if (isset($config['system']['developerspew'])) {
@@ -800,19 +842,11 @@ function system_syslogd_start() {
echo gettext("Starting syslog...");
}
- if (is_process_running("fifolog_writer")) {
- mwexec('/bin/pkill fifolog_writer');
- }
-
// Which logging type are we using this week??
if (isset($config['system']['disablesyslogclog'])) {
$log_directive = "";
$log_create_directive = "/usr/bin/touch ";
$log_size = "";
- } else if (isset($config['system']['usefifolog'])) {
- $log_directive = "|/usr/sbin/fifolog_writer ";
- $log_size = isset($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : "10240";
- $log_create_directive = "/usr/sbin/fifolog_create -s ";
} else { // Defaults to CLOG
$log_directive = "%";
$log_size = isset($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : "10240";
@@ -821,7 +855,7 @@ function system_syslogd_start() {
$syslogd_extra = "";
if (isset($syslogcfg)) {
- $separatelogfacilities = array('ntp', 'ntpd', 'ntpdate', 'charon', 'ipsec_starter', 'openvpn', 'pptps', 'poes', 'l2tps', 'relayd', 'hostapd', 'dnsmasq', 'filterdns', 'unbound', 'dhcpd', 'dhcrelay', 'dhclient', 'dhcp6c', 'apinger', 'radvd', 'routed', 'olsrd', 'zebra', 'ospfd', 'bgpd', 'miniupnpd', 'filterlog');
+ $separatelogfacilities = array('ntp', 'ntpd', 'ntpdate', 'charon', 'ipsec_starter', 'openvpn', 'pptps', 'poes', 'l2tps', 'relayd', 'hostapd', 'dnsmasq', 'filterdns', 'unbound', 'dhcpd', 'dhcrelay', 'dhclient', 'dhcp6c', 'dpinger', 'radvd', 'routed', 'olsrd', 'zebra', 'ospfd', 'bgpd', 'miniupnpd', 'filterlog');
$syslogconf = "";
if ($config['installedpackages']['package']) {
foreach ($config['installedpackages']['package'] as $package) {
@@ -881,11 +915,11 @@ function system_syslogd_start() {
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.*");
}
- $syslogconf .= "!apinger\n";
+ $syslogconf .= "!dpinger\n";
if (!isset($syslogcfg['disablelocallogging'])) {
$syslogconf .= "*.* {$log_directive}{$g['varlog_path']}/gateways.log\n";
}
- if (isset($syslogcfg['apinger'])) {
+ if (isset($syslogcfg['dpinger'])) {
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.*");
}
@@ -930,11 +964,7 @@ function system_syslogd_start() {
local3.* {$log_directive}{$g['varlog_path']}/vpn.log
local4.* {$log_directive}{$g['varlog_path']}/portalauth.log
local7.* {$log_directive}{$g['varlog_path']}/dhcpd.log
-*.notice;kern.debug;lpr.info;mail.crit;daemon.none; {$log_directive}{$g['varlog_path']}/system.log
-news.err;local0.none;local3.none;local4.none; {$log_directive}{$g['varlog_path']}/system.log
-local7.none {$log_directive}{$g['varlog_path']}/system.log
-security.* {$log_directive}{$g['varlog_path']}/system.log
-auth.info;authpriv.info;daemon.info {$log_directive}{$g['varlog_path']}/system.log
+*.notice;kern.debug;lpr.info;mail.crit;daemon.none;news.err;local0.none;local3.none;local4.none;local7.none;security.*;auth.info;authpriv.info;daemon.info {$log_directive}{$g['varlog_path']}/system.log
auth.info;authpriv.info |exec /usr/local/sbin/sshlockout_pf 15
*.emerg *
@@ -950,11 +980,7 @@ EOD;
$syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "local7.*");
}
if (isset($syslogcfg['system'])) {
- $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.notice;kern.debug;lpr.info;mail.crit;");
- $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "news.err;local0.none;local3.none;local7.none");
- $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "security.*");
- $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "auth.info;authpriv.info;daemon.info");
- $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.emerg");
+ $syslogconf .= system_syslogd_get_remote_servers($syslogcfg, "*.emerg;*.notice;kern.debug;lpr.info;mail.crit;news.err;local0.none;local3.none;local7.none;security.*;auth.info;authpriv.info;daemon.info");
}
if (isset($syslogcfg['logall'])) {
// Make everything mean everything, including facilities excluded above.
@@ -1501,13 +1527,27 @@ EOD;
function system_get_timezone_list() {
global $g;
- $file_list = glob("/usr/share/zoneinfo/*/*");
+ $file_list = array_merge(
+ glob("/usr/share/zoneinfo/[A-Z]*"),
+ glob("/usr/share/zoneinfo/*/*"),
+ glob("/usr/share/zoneinfo/*/*/*")
+ );
if (empty($file_list)) {
$file_list[] = $g['default_timezone'];
+ } else {
+ /* Remove directories from list */
+ $file_list = array_filter($file_list, function($v) {
+ return !is_dir($v);
+ });
}
- return str_replace('/usr/share/zoneinfo/', '', $file_list);
+ /* Remove directory prefix */
+ $file_list = str_replace('/usr/share/zoneinfo/', '', $file_list);
+
+ sort($file_list);
+
+ return $file_list;
}
function system_timezone_configure() {
@@ -1741,6 +1781,10 @@ function system_ntp_configure($start_ntpd=true) {
$ntpcfg .= ' refid ';
$ntpcfg .= $config['ntpd']['gps']['refid'];
}
+ if (!empty($config['ntpd']['gps']['stratum'])) {
+ $ntpcfg .= ' stratum ';
+ $ntpcfg .= $config['ntpd']['gps']['stratum'];
+ }
$ntpcfg .= "\n";
} elseif (is_array($config['ntpd']) && !empty($config['ntpd']['gpsport']) &&
file_exists('/dev/'.$config['ntpd']['gpsport']) &&
diff --git a/src/etc/inc/unbound.inc b/src/etc/inc/unbound.inc
index 043ced2..ccae458 100644
--- a/src/etc/inc/unbound.inc
+++ b/src/etc/inc/unbound.inc
@@ -25,10 +25,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_BUILDER_BINARIES: /usr/local/sbin/unbound /usr/local/sbin/unbound-anchor /usr/local/sbin/unbound-checkconf
- pfSense_BUILDER_BINARIES: /usr/local/sbin/unbound-control /usr/local/sbin/unbound-control-setup
- pfSense_MODULE: unbound
*/
/* include all configuration functions */
@@ -103,14 +99,52 @@ function unbound_optimization() {
}
+function test_unbound_config($unboundcfg, &$output) {
+ global $g;
+
+ $cfgfile = "{$g['unbound_chroot_path']}/unbound.test.conf";
+ $unboundcfgtxt = unbound_generate_config_text($unboundcfg);
+ file_put_contents($cfgfile, $unboundcfgtxt);
+
+ $rv = 0;
+ exec("/usr/local/sbin/unbound-checkconf {$cfgfile} 2>&1", $output, $rv);
+ unlink_if_exists($cfgfile);
+
+ return $rv;
+}
+
+
function unbound_generate_config() {
+ global $g;
+
+ $unboundcfgtxt = unbound_generate_config_text();
+
+ // Configure static Host entries
+ unbound_add_host_entries();
+
+ // Configure Domain Overrides
+ unbound_add_domain_overrides();
+
+ // Configure Unbound access-lists
+ unbound_acls_config();
+
+ create_unbound_chroot_path();
+ file_put_contents("{$g['unbound_chroot_path']}/unbound.conf", $unboundcfgtxt);
+}
+
+
+function unbound_generate_config_text($unboundcfg=NULL) {
+
global $config, $g;
+ if (is_null($unboundcfg)) {
+ $unboundcfg = $config['unbound'];
+ }
// Setup optimization
$optimization = unbound_optimization();
// Setup DNSSEC support
- if (isset($config['unbound']['dnssec'])) {
+ if (isset($unboundcfg['dnssec'])) {
$module_config = "validator iterator";
$anchor_file = "auto-trust-anchor-file: {$g['unbound_chroot_path']}/root.key";
} else {
@@ -133,8 +167,8 @@ EOF;
// Determine interfaces to run on
$bindints = "";
- if (!empty($config['unbound']['active_interface'])) {
- $active_interfaces = explode(",", $config['unbound']['active_interface']);
+ if (!empty($unboundcfg['active_interface'])) {
+ $active_interfaces = explode(",", $unboundcfg['active_interface']);
if (in_array("all", $active_interfaces, true)) {
$bindints .= "interface: 0.0.0.0\n";
$bindints .= "interface: ::0\n";
@@ -142,7 +176,7 @@ EOF;
} else {
foreach ($active_interfaces as $ubif) {
if (is_ipaddr($ubif)) {
- //$bindints .= "interface: $ubif\n"; -- until redmine #4062 is fixed, then uncomment this.
+ $bindints .= "interface: $ubif\n";
} else {
$intip = get_interface_ip($ubif);
if (is_ipaddrv4($intip)) {
@@ -150,9 +184,7 @@ EOF;
}
$intip = get_interface_ipv6($ubif);
if (is_ipaddrv6($intip)) {
- if (!is_linklocal($intip)) { // skipping link local for the moment to not break people's configs: https://redmine.pfsense.org/issues/4062
- $bindints .= "interface: $intip\n";
- }
+ $bindints .= "interface: $intip\n";
}
}
}
@@ -166,9 +198,9 @@ EOF;
// Determine interfaces to run on
$outgoingints = "";
- if (!empty($config['unbound']['outgoing_interface'])) {
+ if (!empty($unboundcfg['outgoing_interface'])) {
$outgoingints = "# Outgoing interfaces to be used\n";
- $outgoing_interfaces = explode(",", $config['unbound']['outgoing_interface']);
+ $outgoing_interfaces = explode(",", $unboundcfg['outgoing_interface']);
foreach ($outgoing_interfaces as $outif) {
$outip = get_interface_ip($outif);
if (is_ipaddr($outip)) {
@@ -182,7 +214,7 @@ EOF;
}
// Allow DNS Rebind for forwarded domains
- if (isset($config['unbound']['domainoverrides']) && is_array($config['unbound']['domainoverrides'])) {
+ if (isset($unboundcfg['domainoverrides']) && is_array($unboundcfg['domainoverrides'])) {
if (!isset($config['system']['webgui']['nodnsrebindcheck'])) {
$private_domains = "# Set private domains in case authoritative name server returns a Private IP address\n";
$private_domains .= unbound_add_domain_overrides("private");
@@ -190,21 +222,12 @@ EOF;
$reverse_zones .= unbound_add_domain_overrides("reverse");
}
- // Configure static Host entries
- unbound_add_host_entries();
-
- // Configure Domain Overrides
- unbound_add_domain_overrides();
-
// Configure Unbound statistics
$statistics = unbound_statistics();
- // Configure Unbound access-lists
- unbound_acls_config();
-
// Add custom Unbound options
- if ($config['unbound']['custom_options']) {
- $custom_options_source = explode("\n", base64_decode($config['unbound']['custom_options']));
+ if ($unboundcfg['custom_options']) {
+ $custom_options_source = explode("\n", base64_decode($unboundcfg['custom_options']));
$custom_options = "# Unbound custom options\n";
foreach ($custom_options_source as $ent) {
$custom_options .= $ent."\n";
@@ -212,31 +235,31 @@ EOF;
}
// Server configuration variables
- $port = (is_port($config['unbound']['port'])) ? $config['unbound']['port'] : "53";
- $hide_identity = isset($config['unbound']['hideidentity']) ? "yes" : "no";
- $hide_version = isset($config['unbound']['hideversion']) ? "yes" : "no";
- $harden_dnssec_stripped = isset($config['unbound']['dnssecstripped']) ? "yes" : "no";
- $prefetch = isset($config['unbound']['prefetch']) ? "yes" : "no";
- $prefetch_key = isset($config['unbound']['prefetchkey']) ? "yes" : "no";
- $outgoing_num_tcp = (!empty($config['unbound']['outgoing_num_tcp'])) ? $config['unbound']['outgoing_num_tcp'] : "10";
- $incoming_num_tcp = (!empty($config['unbound']['incoming_num_tcp'])) ? $config['unbound']['incoming_num_tcp'] : "10";
- $edns_buffer_size = (!empty($config['unbound']['edns_buffer_size'])) ? $config['unbound']['edns_buffer_size'] : "4096";
- $num_queries_per_thread = (!empty($config['unbound']['num_queries_per_thread'])) ? $config['unbound']['num_queries_per_thread'] : "4096";
- $jostle_timeout = (!empty($config['unbound']['jostle_timeout'])) ? $config['unbound']['jostle_timeout'] : "200";
- $cache_max_ttl = (!empty($config['unbound']['cache_max_ttl'])) ? $config['unbound']['cache_max_ttl'] : "86400";
- $cache_min_ttl = (!empty($config['unbound']['cache_min_ttl'])) ? $config['unbound']['cache_min_ttl'] : "0";
- $infra_host_ttl = (!empty($config['unbound']['infra_host_ttl'])) ? $config['unbound']['infra_host_ttl'] : "900";
- $infra_cache_numhosts = (!empty($config['unbound']['infra_cache_numhosts'])) ? $config['unbound']['infra_cache_numhosts'] : "10000";
- $unwanted_reply_threshold = (!empty($config['unbound']['unwanted_reply_threshold'])) ? $config['unbound']['unwanted_reply_threshold'] : "0";
+ $port = (is_port($unboundcfg['port'])) ? $unboundcfg['port'] : "53";
+ $hide_identity = isset($unboundcfg['hideidentity']) ? "yes" : "no";
+ $hide_version = isset($unboundcfg['hideversion']) ? "yes" : "no";
+ $harden_dnssec_stripped = isset($unboundcfg['dnssecstripped']) ? "yes" : "no";
+ $prefetch = isset($unboundcfg['prefetch']) ? "yes" : "no";
+ $prefetch_key = isset($unboundcfg['prefetchkey']) ? "yes" : "no";
+ $outgoing_num_tcp = (!empty($unboundcfg['outgoing_num_tcp'])) ? $unboundcfg['outgoing_num_tcp'] : "10";
+ $incoming_num_tcp = (!empty($unboundcfg['incoming_num_tcp'])) ? $unboundcfg['incoming_num_tcp'] : "10";
+ $edns_buffer_size = (!empty($unboundcfg['edns_buffer_size'])) ? $unboundcfg['edns_buffer_size'] : "4096";
+ $num_queries_per_thread = (!empty($unboundcfg['num_queries_per_thread'])) ? $unboundcfg['num_queries_per_thread'] : "4096";
+ $jostle_timeout = (!empty($unboundcfg['jostle_timeout'])) ? $unboundcfg['jostle_timeout'] : "200";
+ $cache_max_ttl = (!empty($unboundcfg['cache_max_ttl'])) ? $unboundcfg['cache_max_ttl'] : "86400";
+ $cache_min_ttl = (!empty($unboundcfg['cache_min_ttl'])) ? $unboundcfg['cache_min_ttl'] : "0";
+ $infra_host_ttl = (!empty($unboundcfg['infra_host_ttl'])) ? $unboundcfg['infra_host_ttl'] : "900";
+ $infra_cache_numhosts = (!empty($unboundcfg['infra_cache_numhosts'])) ? $unboundcfg['infra_cache_numhosts'] : "10000";
+ $unwanted_reply_threshold = (!empty($unboundcfg['unwanted_reply_threshold'])) ? $unboundcfg['unwanted_reply_threshold'] : "0";
if ($unwanted_reply_threshold == "disabled") {
$unwanted_reply_threshold = "0";
}
- $msg_cache_size = (!empty($config['unbound']['msgcachesize'])) ? $config['unbound']['msgcachesize'] : "4";
- $verbosity = isset($config['unbound']['log_verbosity']) ? $config['unbound']['log_verbosity'] : 1;
- $use_caps = isset($config['unbound']['use_caps']) ? "yes" : "no";
+ $msg_cache_size = (!empty($unboundcfg['msgcachesize'])) ? $unboundcfg['msgcachesize'] : "4";
+ $verbosity = isset($unboundcfg['log_verbosity']) ? $unboundcfg['log_verbosity'] : 1;
+ $use_caps = isset($unboundcfg['use_caps']) ? "yes" : "no";
// Set up forwarding if it is configured
- if (isset($config['unbound']['forwarding'])) {
+ if (isset($unboundcfg['forwarding'])) {
$dnsservers = array();
if (isset($config['system']['dnsallowoverride'])) {
$ns = array_unique(get_nameservers());
@@ -356,10 +379,7 @@ include: {$g['unbound_chroot_path']}/remotecontrol.conf
EOD;
- create_unbound_chroot_path();
- file_put_contents("{$g['unbound_chroot_path']}/unbound.conf", $unboundconf);
-
- return 0;
+ return $unboundconf;
}
function unbound_remote_control_setup() {
@@ -470,7 +490,16 @@ function do_as_unbound_user($cmd) {
mwexec("echo '/usr/local/sbin/unbound-control reload' | /usr/bin/su -m unbound", true);
break;
case "unbound-anchor":
+ // sanity check root.key because unbound-anchor will fail without manual removal otherwise. redmine #5334
+ if (file_exists("{$g['unbound_chroot_path']}/root.key")) {
+ $rootkeycheck = mwexec("/usr/bin/grep 'autotrust trust anchor file' {$g['unbound_chroot_path']}/root.key", true);
+ if ($rootkeycheck != "0") {
+ log_error("Unbound root.key file is corrupt, removing and recreating.");
+ unlink_if_exists("{$g['unbound_chroot_path']}/root.key");
+ }
+ }
mwexec("echo '/usr/local/sbin/unbound-anchor -a {$g['unbound_chroot_path']}/root.key' | /usr/bin/su -m unbound", true);
+ pfSense_fsync("{$g['unbound_chroot_path']}/root.key");
break;
case "unbound-control-setup":
mwexec("echo '/usr/local/sbin/unbound-control-setup -d {$g['unbound_chroot_path']}' | /usr/bin/su -m unbound", true);
@@ -526,7 +555,13 @@ function unbound_add_domain_overrides($pvt_rev="") {
function unbound_add_host_entries() {
global $config, $g;
- $unbound_entries = "local-zone: \"{$config['system']['domain']}\" transparent\n";
+ if (empty($config['unbound']['system_domain_local_zone_type'])) {
+ $system_domain_local_zone_type = "transparent";
+ } else {
+ $system_domain_local_zone_type = $config['unbound']['system_domain_local_zone_type'];
+ }
+
+ $unbound_entries = "local-zone: \"{$config['system']['domain']}\" $system_domain_local_zone_type\n";
$hosts = read_hosts();
$added_ptr = array();
diff --git a/src/etc/inc/upgrade_config.inc b/src/etc/inc/upgrade_config.inc
index 9bf570e..14db11e 100644
--- a/src/etc/inc/upgrade_config.inc
+++ b/src/etc/inc/upgrade_config.inc
@@ -1,39 +1,57 @@
<?php
/*
upgrade_config.inc
- Copyright (C) 2004-2009 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/find /bin/cd /usr/local/bin/rrdtool /usr/bin/nice
- pfSense_MODULE: config
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
if (!function_exists("dump_rrd_to_xml")) {
require("rrd.inc");
@@ -378,7 +396,6 @@ function upgrade_017_to_018() {
function upgrade_018_to_019() {
global $config;
- $config['theme'] = "metallic";
}
@@ -694,54 +711,50 @@ function upgrade_040_to_041() {
$config['sysctl']['item'][8]['descr'] = gettext("Maximum outgoing TCP datagram size");
$config['sysctl']['item'][8]['value'] = "default";
- $config['sysctl']['item'][9]['tunable'] = "net.inet.ip.fastforwarding";
- $config['sysctl']['item'][9]['descr'] = gettext("Fastforwarding (see http://lists.freebsd.org/pipermail/freebsd-net/2004-January/002534.html)");
+ $config['sysctl']['item'][9]['tunable'] = "net.inet.tcp.delayed_ack";
+ $config['sysctl']['item'][9]['descr'] = gettext("Do not delay ACK to try and piggyback it onto a data packet");
$config['sysctl']['item'][9]['value'] = "default";
- $config['sysctl']['item'][10]['tunable'] = "net.inet.tcp.delayed_ack";
- $config['sysctl']['item'][10]['descr'] = gettext("Do not delay ACK to try and piggyback it onto a data packet");
+ $config['sysctl']['item'][10]['tunable'] = "net.inet.udp.maxdgram";
+ $config['sysctl']['item'][10]['descr'] = gettext("Maximum outgoing UDP datagram size");
$config['sysctl']['item'][10]['value'] = "default";
- $config['sysctl']['item'][11]['tunable'] = "net.inet.udp.maxdgram";
- $config['sysctl']['item'][11]['descr'] = gettext("Maximum outgoing UDP datagram size");
+ $config['sysctl']['item'][11]['tunable'] = "net.link.bridge.pfil_onlyip";
+ $config['sysctl']['item'][11]['descr'] = gettext("Handling of non-IP packets which are not passed to pfil (see if_bridge(4))");
$config['sysctl']['item'][11]['value'] = "default";
- $config['sysctl']['item'][12]['tunable'] = "net.link.bridge.pfil_onlyip";
- $config['sysctl']['item'][12]['descr'] = gettext("Handling of non-IP packets which are not passed to pfil (see if_bridge(4))");
+ $config['sysctl']['item'][12]['tunable'] = "net.link.tap.user_open";
+ $config['sysctl']['item'][12]['descr'] = gettext("Allow unprivileged access to tap(4) device nodes");
$config['sysctl']['item'][12]['value'] = "default";
- $config['sysctl']['item'][13]['tunable'] = "net.link.tap.user_open";
- $config['sysctl']['item'][13]['descr'] = gettext("Allow unprivileged access to tap(4) device nodes");
+ $config['sysctl']['item'][13]['tunable'] = "kern.randompid";
+ $config['sysctl']['item'][13]['descr'] = gettext("Randomize PID's (see src/sys/kern/kern_fork.c: sysctl_kern_randompid())");
$config['sysctl']['item'][13]['value'] = "default";
- $config['sysctl']['item'][15]['tunable'] = "kern.randompid";
- $config['sysctl']['item'][15]['descr'] = gettext("Randomize PID's (see src/sys/kern/kern_fork.c: sysctl_kern_randompid())");
+ $config['sysctl']['item'][14]['tunable'] = "net.inet.tcp.inflight.enable";
+ $config['sysctl']['item'][14]['descr'] = gettext("The system will attempt to calculate the bandwidth delay product for each connection and limit the amount of data queued to the network to just the amount required to maintain optimum throughput. ");
+ $config['sysctl']['item'][14]['value'] = "default";
+
+ $config['sysctl']['item'][15]['tunable'] = "net.inet.icmp.icmplim";
+ $config['sysctl']['item'][15]['descr'] = gettext("Set ICMP Limits");
$config['sysctl']['item'][15]['value'] = "default";
- $config['sysctl']['item'][16]['tunable'] = "net.inet.tcp.inflight.enable";
- $config['sysctl']['item'][16]['descr'] = gettext("The system will attempt to calculate the bandwidth delay product for each connection and limit the amount of data queued to the network to just the amount required to maintain optimum throughput. ");
+ $config['sysctl']['item'][16]['tunable'] = "net.inet.tcp.tso";
+ $config['sysctl']['item'][16]['descr'] = gettext("TCP Offload engine");
$config['sysctl']['item'][16]['value'] = "default";
- $config['sysctl']['item'][17]['tunable'] = "net.inet.icmp.icmplim";
- $config['sysctl']['item'][17]['descr'] = gettext("Set ICMP Limits");
+ $config['sysctl']['item'][17]['tunable'] = "net.inet.ip.portrange.first";
+ $config['sysctl']['item'][17]['descr'] = "Set the ephemeral port range starting port";
$config['sysctl']['item'][17]['value'] = "default";
- $config['sysctl']['item'][18]['tunable'] = "net.inet.tcp.tso";
- $config['sysctl']['item'][18]['descr'] = gettext("TCP Offload engine");
+ $config['sysctl']['item'][18]['tunable'] = "hw.syscons.kbd_reboot";
+ $config['sysctl']['item'][18]['descr'] = "Enables ctrl+alt+delete";
$config['sysctl']['item'][18]['value'] = "default";
- $config['sysctl']['item'][19]['tunable'] = "net.inet.ip.portrange.first";
- $config['sysctl']['item'][19]['descr'] = "Set the ephemeral port range starting port";
+ $config['sysctl']['item'][19]['tunable'] = "kern.ipc.maxsockbuf";
+ $config['sysctl']['item'][19]['descr'] = "Maximum socket buffer size";
$config['sysctl']['item'][19]['value'] = "default";
- $config['sysctl']['item'][20]['tunable'] = "hw.syscons.kbd_reboot";
- $config['sysctl']['item'][20]['descr'] = "Enables ctrl+alt+delete";
- $config['sysctl']['item'][20]['value'] = "default";
-
- $config['sysctl']['item'][21]['tunable'] = "kern.ipc.maxsockbuf";
- $config['sysctl']['item'][21]['descr'] = "Maximum socket buffer size";
- $config['sysctl']['item'][21]['value'] = "default";
-
}
}
@@ -2144,10 +2157,6 @@ function upgrade_054_to_055() {
@unlink("{$g['tmp_path']}/{$xmldump}");
@unlink("{$g['tmp_path']}/{$xmldumpnew}");
}
- /* let apinger recreate required files */
- if (!platform_booting()) {
- setup_gateways_monitor();
- }
/* build a list of traffic and packets databases */
$databases = return_dir_as_array($rrddbpath, '/-(traffic|packets)\.rrd$/');
@@ -2428,13 +2437,7 @@ function upgrade_061_to_062() {
function upgrade_062_to_063() {
/* Upgrade legacy Themes to the new pfsense_ng */
- global $config;
-
- switch ($config['theme']) {
- case "nervecenter":
- $config['theme'] = "pfsense_ng";
- break;
- }
+ // Not supported in 2.3+
}
@@ -3809,10 +3812,6 @@ function upgrade_117_to_118() {
$ph1_entry['peerid_data'] =
preg_replace('/\/\s*emailAddress\s*=\s*/', ', E=', $ph1_entry['peerid_data']);
}
- // iketype 'auto' was removed and is really v2, update accordingly
- if ($ph1_entry['iketype'] == "auto") {
- $ph1_entry['iketype'] = "ikev2";
- }
}
}
@@ -3834,6 +3833,24 @@ function upgrade_118_to_119() {
}
function upgrade_119_to_120() {
+ require_once("ipsec.inc");
+ global $config, $ipsec_log_cats;
+
+ if (!is_array($config['ipsec'])) {
+ return;
+ }
+
+ // add 1 to configured log levels as part of redmine #5340
+ foreach ($ipsec_log_cats as $lkey => $ldescr) {
+ if (isset($config['ipsec']["ipsec_{$lkey}"])) {
+ $config['ipsec']["ipsec_{$lkey}"] = $config['ipsec']["ipsec_{$lkey}"] + 1;
+ }
+ }
+
+}
+
+
+function upgrade_120_to_121() {
global $config;
if (!isset($config['installedpackages']['miniupnpd']['config'][0])) {
@@ -3852,7 +3869,7 @@ function upgrade_119_to_120() {
}
}
-function upgrade_120_to_121() {
+function upgrade_121_to_122() {
global $config;
foreach ($config['system']['user'] as &$user) {
if (isset($user['nt-hash'])) {
@@ -3861,7 +3878,7 @@ function upgrade_120_to_121() {
}
}
-function upgrade_121_to_122() {
+function upgrade_122_to_123() {
global $config;
// PPTP server was removed
@@ -3959,4 +3976,288 @@ function upgrade_121_to_122() {
}
}
+function upgrade_123_to_124() {
+ if (isset($config['system']['altpkgrepo'])) {
+ unset($config['system']['altpkgrepo']);
+ }
+
+ if (isset($config['theme'])) {
+ unset($config['theme']);
+ }
+}
+
+function upgrade_124_to_125() {
+ global $config;
+
+ /* Find interfaces with WEP configured. */
+ foreach ($config['interfaces'] as $ifname => $intf) {
+ if (!is_array($intf['wireless'])) {
+ continue;
+ }
+
+ /* Generate a notice, disable interface, remove WEP settings */
+ if (isset($intf['wireless']['wep']['enable'])) {
+ if (!function_exists("file_notice")) {
+ require_once("notices.inc");
+ }
+ file_notice("WirelessSettings", "WEP is no longer supported. It will be disabled on the {$ifname} interface and the interface will be disabled. Please reconfigure the interface.");
+ unset($config['interfaces'][$ifname]['wireless']['wep']);
+ if (isset($intf['enable'])) {
+ unset($config['interfaces'][$ifname]['enable']);
+ }
+ }
+ }
+}
+
+function upgrade_125_to_126() {
+ require_once("ipsec.inc");
+ global $config, $ipsec_log_cats, $ipsec_log_sevs;
+
+ $def_loglevel = 1;
+ if (!is_array($config['ipsec'])) {
+ return;
+ }
+
+ if (!isset($config['ipsec']['logging']) || !is_array($config['ipsec']['logging'])) {
+ $config['ipsec']['logging'] = array();
+ }
+
+ /* subtract 2 from ipsec log levels. the value stored in the config.xml
+ * will now match the strongswan level exactly.
+ */
+ foreach (array_keys($ipsec_log_cats) as $cat) {
+ if (!isset($config['ipsec']["ipsec_{$cat}"])) {
+ $new_level = $def_loglevel;
+ } else {
+ $new_level = intval($config['ipsec']["ipsec_{$cat}"]) - 2;
+ }
+
+ if (in_array($new_level, array_keys($ipsec_log_sevs))) {
+ $config['ipsec']['logging'][$cat] = $new_level;
+ } else {
+ $config['ipsec']['logging'][$cat] = $def_loglevel;
+ }
+ unset($config['ipsec']["ipsec_{$cat}"]);
+ }
+}
+
+// prior to v2.3 <widgets><sequence> contains a list of widgets with display types:
+// none, close, hide, & show
+// v2.3 & later uses:
+// close & open
+// widgets not in use are simply not in the list
+function upgrade_126_to_127() {
+ global $config;
+
+ if (!isset($config['widgets']['sequence'])) {
+ return;
+ }
+
+ $cur_widgets = explode(',', trim($config['widgets']['sequence']));
+ $new_widgets = array();
+
+ foreach ($cur_widgets as $widget) {
+ list($file, $col, $display) = explode(':', $widget);
+
+ switch ($display) {
+ case 'hide':
+ $display = 'close';
+ break;
+ case 'show':
+ $display = 'open';
+ break;
+ case 'open':
+ break;
+ default:
+ continue 2;
+ }
+
+ /* Remove '-container' from widget name */
+ $file = preg_replace('/-container$/', '', $file);
+
+ $new_widgets[] = "{$file}:{$col}:{$display}";
+ }
+
+ $config['widgets']['sequence'] = implode(',', $new_widgets);
+
+}
+
+function upgrade_127_to_128() {
+ global $config;
+
+ // If bindip is not already specified then migrate the old SNMP bindlan flag to a bindip setting
+ if (isset($config['snmpd']['bindlan'])) {
+ if (!isset($config['snmpd']['bindip'])) {
+ $config['snmpd']['bindip'] = 'lan';
+ }
+ unset($config['snmpd']['bindlan']);
+ }
+}
+
+function upgrade_128_to_129() {
+ global $config;
+
+ /* net.inet.ip.fastforwarding does not exist in 2.3. */
+ if (!isset($config['sysctl']['item']) ||
+ !is_array($config['sysctl']['item'])) {
+ return;
+ }
+
+ foreach ($config['sysctl']['item'] as $idx => $sysctl) {
+ if ($sysctl['tunable'] == "net.inet.ip.fastforwarding") {
+ unset($config['sysctl']['item'][$idx]);
+ }
+ if ($sysctl['tunable'] == "net.inet.ipsec.debug") {
+ $config['sysctl']['item'][$idx]['value'] = "0";
+ }
+ }
+
+ /* IPSEC is always on in 2.3. */
+ if (isset($config['ipsec']['enable'])) {
+ unset($config['ipsec']['enable']);
+ } else if (is_array($config['ipsec']['phase1'])) {
+ /*
+ * If IPsec was globally disabled, disable all
+ * phase1 entries
+ */
+ foreach ($config['ipsec']['phase1'] as $idx => $p1) {
+ $config['ipsec']['phase1'][$idx]['disabled'] = true;
+ }
+ }
+}
+
+function upgrade_129_to_130() {
+ global $config;
+
+ /* Change OpenVPN topology_subnet checkbox into topology multi-select #5526 */
+ if (is_array($config['openvpn']) && is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as & $serversettings) {
+ if (isset($serversettings['topology_subnet'])) {
+ unset($serversettings['topology_subnet']);
+ $serversettings['topology'] = "subnet";
+ } else {
+ $serversettings['topology'] = "net30";
+ }
+ }
+ }
+}
+
+function upgrade_130_to_131() {
+ global $config;
+
+ if (isset($config['syslog']['apinger'])) {
+ $config['syslog']['dpinger'] = true;
+ unset($config['syslog']['apinger']);
+ }
+
+ if (isset($config['system']['apinger_debug'])) {
+ unset($config['system']['apinger_debug']);
+ }
+
+ if (!isset($config['gateways']['gateway_item']) ||
+ !is_array($config['gateways']['gateway_item'])) {
+ return;
+ }
+
+ foreach ($config['gateways']['gateway_item'] as &$gw) {
+ // dpinger uses milliseconds
+ if (isset($gw['interval']) &&
+ is_numeric($gw['interval'])) {
+ $gw['interval'] = $gw['interval'] * 1000;
+ }
+ if (isset($gw['down']) &&
+ is_numeric($gw['down'])) {
+ $gw['loss_interval'] = $gw['down'] * 1000;
+ unset($gw['down']);
+ }
+
+ if (isset($gw['avg_delay_samples'])) {
+ unset($gw['avg_delay_samples']);
+ }
+ if (isset($gw['avg_delay_samples_calculated'])) {
+ unset($gw['avg_delay_samples_calculated']);
+ }
+ if (isset($gw['avg_loss_samples'])) {
+ unset($gw['avg_loss_samples']);
+ }
+ if (isset($gw['avg_loss_samples_calculated'])) {
+ unset($gw['avg_loss_samples_calculated']);
+ }
+ if (isset($gw['avg_loss_delay_samples'])) {
+ unset($gw['avg_loss_delay_samples']);
+ }
+ if (isset($gw['avg_loss_delay_samples_calculated'])) {
+ unset($gw['avg_loss_delay_samples_calculated']);
+ }
+ }
+}
+
+function upgrade_131_to_132() {
+ global $config;
+ if (isset($config['system']['usefifolog'])) {
+ unset($config['system']['usefifolog']);
+ clear_all_log_files(false);
+ }
+}
+
+function upgrade_132_to_133() {
+ global $config;
+
+ if (isset($config['ipsec']['phase1']) &&
+ is_array($config['ipsec']['phase1'])) {
+ foreach ($config['ipsec']['phase1'] as &$p1) {
+ if (isset($p1['encryption-algorithm']['name']) &&
+ $p1['encryption-algorithm']['name'] == 'des') {
+ $p1['disabled'] = true;
+ file_notice("IPsec",
+ "DES is no longer supported, IPsec phase 1 " .
+ "item '{$p1['descr']}' is being disabled.");
+ }
+ }
+ }
+
+ if (isset($config['ipsec']['phase2']) &&
+ is_array($config['ipsec']['phase2'])) {
+ foreach ($config['ipsec']['phase2'] as &$p2) {
+ if (!isset($p2['encryption-algorithm-option']) ||
+ !is_array($p2['encryption-algorithm-option'])) {
+ continue;
+ }
+
+ foreach ($p2['encryption-algorithm-option'] as $ealgo) {
+ if ($ealgo['name'] == 'des') {
+ $p2['disabled'] = true;
+ file_notice("IPsec",
+ "DES is no longer supported, IPsec phase 2 " .
+ "item '{$p2['descr']}' is being disabled.");
+ }
+ }
+ }
+ }
+}
+
+// Determine the highest column number in use and set dashboardcolumns accordingly
+function upgrade_133_to_134() {
+ global $config;
+
+ if (!isset($config['widgets']['sequence']) || isset($config['system']['webgui']['dashboardcolumns'])) {
+ return;
+ }
+
+ $cur_widgets = explode(',', trim($config['widgets']['sequence']));
+ $maxcols = 2;
+
+ foreach ($cur_widgets as $widget) {
+ list($file, $col, $display) = explode(':', $widget);
+
+ if (($display != 'none') && ($display != 'hide')) {
+ preg_match('#[0-9]+$#', $col, $column);
+ if ($column[0] > $maxcols) {
+ $maxcols = $column[0];
+ }
+ }
+ }
+
+ $config['system']['webgui']['dashboardcolumns'] = $maxcols % 10;
+}
?>
diff --git a/src/etc/inc/util.inc b/src/etc/inc/util.inc
index 315ccb8..b542566 100644
--- a/src/etc/inc/util.inc
+++ b/src/etc/inc/util.inc
@@ -1,40 +1,60 @@
<?php
/*
util.inc
- part of the pfSense project (https://www.pfsense.org)
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- pfSense_BUILDER_BINARIES: /bin/ps /bin/kill /usr/bin/killall /sbin/ifconfig /usr/bin/netstat
- pfSense_BUILDER_BINARIES: /usr/bin/awk /sbin/dmesg /sbin/ping /usr/local/sbin/gzsig /usr/sbin/arp
- pfSense_BUILDER_BINARIES: /sbin/conscontrol /sbin/devd /bin/ps
- pfSense_MODULE: utils
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
/* kill a process by pid file */
function killbypid($pidfile) {
@@ -372,7 +392,7 @@ function gen_subnetv4_max($ipaddr, $bits) {
if ($bits == 32) {
return $ipaddr;
}
- return long2ip32(ip2long($ipaddr) | ~gen_subnet_mask_long($bits));
+ return long2ip32(ip2long($ipaddr) | (~gen_subnet_mask_long($bits) & 0xFFFFFFFF));
}
return "";
}
@@ -401,17 +421,20 @@ function gen_subnet_mask($bits) {
return long2ip(gen_subnet_mask_long($bits));
}
-/* Convert long int to IP address, truncating to 32-bits. */
+/* Convert long int to IPv4 address
+ Returns '' if not valid IPv4 (including if any bits >32 are non-zero) */
function long2ip32($ip) {
return long2ip($ip & 0xFFFFFFFF);
}
-/* Convert IP address to long int, truncated to 32-bits to avoid sign extension on 64-bit platforms. */
+/* Convert IPv4 address to long int, truncated to 32-bits to avoid sign extension on 64-bit platforms.
+ Returns '' if not valid IPv4. */
function ip2long32($ip) {
return (ip2long($ip) & 0xFFFFFFFF);
}
-/* Convert IP address to unsigned long int. */
+/* Convert IPv4 address to unsigned long int.
+ Returns '' if not valid IPv4. */
function ip2ulong($ip) {
return sprintf("%u", ip2long32($ip));
}
@@ -502,73 +525,127 @@ function ip_range_to_address_array($startip, $endip, $max_size = 5000) {
return $rangeaddresses;
}
-/* Convert a range of IPv4 addresses to an array of subnets which can contain the range. */
-/* Note: IPv6 ranges are not yet supported here. */
-function ip_range_to_subnet_array($startip, $endip) {
- if (!is_ipaddrv4($startip) || !is_ipaddrv4($endip)) {
+/* Convert an IPv4 or IPv6 IP range to an array of subnets which can contain the range.
+ Algorithm and embodying code PD'ed by Stilez - enjoy as you like :-)
+
+ Documented on pfsense dev list 19-20 May 2013. Summary:
+
+ The algorithm looks at patterns of 0's and 1's in the least significant bit(s), whether IPv4 or IPv6.
+ These are all that needs checking to identify a _guaranteed_ correct, minimal and optimal subnet array.
+
+ As a result, string/binary pattern matching of the binary IP is very efficient. It uses just 2 pattern-matching rules
+ to chop off increasingly larger subnets at both ends that can't be part of larger subnets, until nothing's left.
+
+ (a) If any range has EITHER low bit 1 (in startip) or 0 (in endip), that end-point is _always guaranteed_ to be optimally
+ represented by its own 'single IP' CIDR; the remaining range then shrinks by one IP up or down, causing the new end-point's
+ low bit to change from 1->0 (startip) or 0->1 (endip). Only one edge case needs checking: if a range contains exactly 2
+ adjacent IPs of this format, then the two IPs themselves are required to span it, and we're done.
+ Once this rule is applied, the remaining range is _guaranteed_ to end in 0's and 1's so rule (b) can now be used, and its
+ low bits can now be ignored.
+
+ (b) If any range has BOTH startip and endip ending in some number of 0's and 1's respectively, these low bits can
+ *always* be ignored and "bit-shifted" for subnet spanning. So provided we remember the bits we've place-shifted, we can
+ _always_ right-shift and chop off those bits, leaving a smaller range that has EITHER startip ending in 1 or endip ending
+ in 0 (ie can now apply (a) again) or the entire range has vanished and we're done.
+ We then loop to redo (a) again on the remaining (place shifted) range until after a few loops, the remaining (place shifted)
+ range 'vanishes' by meeting the exit criteria of (a) or (b), and we're done.
+*/
+
+function ip_range_to_subnet_array($ip1, $ip2) {
+
+ if (is_ipaddrv4($ip1) && is_ipaddrv4($ip2)) {
+ $proto = 'ipv4'; // for clarity
+ $bits = 32;
+ $ip1bin = decbin(ip2long32($ip1));
+ $ip2bin = decbin(ip2long32($ip2));
+ } elseif (is_ipaddrv6($ip1) && is_ipaddrv6($ip2)) {
+ $proto = 'ipv6';
+ $bits = 128;
+ $ip1bin = Net_IPv6::_ip2Bin($ip1);
+ $ip2bin = Net_IPv6::_ip2Bin($ip2);
+ } else {
return array();
}
- if (ip_greater_than($startip, $endip)) {
- // Swap start and end so we can process sensibly.
- $temp = $startip;
- $startip = $endip;
- $endip = $temp;
+ // it's *crucial* that binary strings are guaranteed the expected length; do this for certainty even though for IPv6 it's redundant
+ $ip1bin = str_pad($ip1bin, $bits, '0', STR_PAD_LEFT);
+ $ip2bin = str_pad($ip2bin, $bits, '0', STR_PAD_LEFT);
+
+ if ($ip1bin == $ip2bin) {
+ return array($ip1 . '/' . $bits); // exit if ip1=ip2 (trivial case)
+ }
+
+ if ($ip1bin > $ip2bin) {
+ list ($ip1bin, $ip2bin) = array($ip2bin, $ip1bin); // swap if needed (ensures ip1 < ip2)
}
- // Container for subnets within this range.
$rangesubnets = array();
+ $netsize = 0;
- // Figure out what the smallest subnet is that holds the number of IPs in the given range.
- $cidr = find_smallest_cidr_v4(ip_range_size_v4($startip, $endip));
+ do {
+ // at loop start, $ip1 is guaranteed strictly less than $ip2 (important for edge case trapping and preventing accidental binary wrapround)
+ // which means the assignments $ip1 += 1 and $ip2 -= 1 will always be "binary-wrapround-safe"
- // Loop here to reduce subnet size and retest as needed. We need to make sure
- // that the target subnet is wholly contained between $startip and $endip.
- for ($cidr; $cidr <= 32; $cidr++) {
- // Find the network and broadcast addresses for the subnet being tested.
- $targetsub_min = gen_subnet($startip, $cidr);
- $targetsub_max = gen_subnet_max($startip, $cidr);
+ // step #1 if start ip (as shifted) ends in any '1's, then it must have a single cidr to itself (any cidr would include the '0' below it)
- // Check best case where the range is exactly one subnet.
- if (($targetsub_min == $startip) && ($targetsub_max == $endip)) {
- // Hooray, the range is exactly this subnet!
- return array("{$startip}/{$cidr}");
+ if (substr($ip1bin, -1, 1) == '1') {
+ // the start ip must be in a separate one-IP cidr range
+ $new_subnet_ip = substr($ip1bin, $netsize, $bits - $netsize) . str_repeat('0', $netsize);
+ $rangesubnets[$new_subnet_ip] = $bits - $netsize;
+ $n = strrpos($ip1bin, '0'); //can't be all 1's
+ $ip1bin = ($n == 0 ? '' : substr($ip1bin, 0, $n)) . '1' . str_repeat('0', $bits - $n - 1); // BINARY VERSION OF $ip1 += 1
}
- // These remaining scenarios will find a subnet that uses the largest
- // chunk possible of the range being tested, and leave the rest to be
- // tested recursively after the loop.
+ // step #2, if end ip (as shifted) ends in any zeros then that must have a cidr to itself (as cidr cant span the 1->0 gap)
- // Check if the subnet begins with $startip and ends before $endip
- if (($targetsub_min == $startip) && ip_less_than($targetsub_max, $endip)) {
- break;
+ if (substr($ip2bin, -1, 1) == '0') {
+ // the end ip must be in a separate one-IP cidr range
+ $new_subnet_ip = substr($ip2bin, $netsize, $bits - $netsize) . str_repeat('0', $netsize);
+ $rangesubnets[$new_subnet_ip] = $bits - $netsize;
+ $n = strrpos($ip2bin, '1'); //can't be all 0's
+ $ip2bin = ($n == 0 ? '' : substr($ip2bin, 0, $n)) . '0' . str_repeat('1', $bits - $n - 1); // BINARY VERSION OF $ip2 -= 1
+ // already checked for the edge case where end = start+1 and start ends in 0x1, above, so it's safe
}
- // Check if the subnet ends at $endip and starts after $startip
- if (ip_greater_than($targetsub_min, $startip) && ($targetsub_max == $endip)) {
- break;
+ // this is the only edge case arising from increment/decrement.
+ // it happens if the range at start of loop is exactly 2 adjacent ips, that spanned the 1->0 gap. (we will have enumerated both by now)
+
+ if ($ip2bin < $ip1bin) {
+ continue;
}
- // Check if the subnet is between $startip and $endip
- if (ip_greater_than($targetsub_min, $startip) && ip_less_than($targetsub_max, $endip)) {
- break;
+ // step #3 the start and end ip MUST now end in '0's and '1's respectively
+ // so we have a non-trivial range AND the last N bits are no longer important for CIDR purposes.
+
+ $shift = $bits - max(strrpos($ip1bin, '0'), strrpos($ip2bin, '1')); // num of low bits which are '0' in ip1 and '1' in ip2
+ $ip1bin = str_repeat('0', $shift) . substr($ip1bin, 0, $bits - $shift);
+ $ip2bin = str_repeat('0', $shift) . substr($ip2bin, 0, $bits - $shift);
+ $netsize += $shift;
+ if ($ip1bin == $ip2bin) {
+ // we're done.
+ $new_subnet_ip = substr($ip1bin, $netsize, $bits - $netsize) . str_repeat('0', $netsize);
+ $rangesubnets[$new_subnet_ip] = $bits - $netsize;
+ continue;
}
- }
- // Some logic that will recursively search from $startip to the first IP before the start of the subnet we just found.
- // NOTE: This may never be hit, the way the above algo turned out, but is left for completeness.
- if ($startip != $targetsub_min) {
- $rangesubnets = array_merge($rangesubnets, ip_range_to_subnet_array($startip, ip_before($targetsub_min)));
- }
+ // at this point there's still a remaining range, and either startip ends with '1', or endip ends with '0'. So repeat cycle.
+ } while ($ip1bin < $ip2bin);
- // Add in the subnet we found before, to preserve ordering
- $rangesubnets[] = "{$targetsub_min}/{$cidr}";
+ // subnets are ordered by bit size. Re sort by IP ("naturally") and convert back to IPv4/IPv6
- // And some more logic that will search after the subnet we found to fill in to the end of the range.
- if ($endip != $targetsub_max) {
- $rangesubnets = array_merge($rangesubnets, ip_range_to_subnet_array(ip_after($targetsub_max), $endip));
+ ksort($rangesubnets, SORT_STRING);
+ $out = array();
+
+ foreach ($rangesubnets as $ip => $netmask) {
+ if ($proto == 'ipv4') {
+ $i = str_split($ip, 8);
+ $out[] = implode('.', array(bindec($i[0]), bindec($i[1]), bindec($i[2]), bindec($i[3]))) . '/' . $netmask;
+ } else {
+ $out[] = Net_IPv6::compress(Net_IPv6::_bin2Ip($ip)) . '/' . $netmask;
+ }
}
- return $rangesubnets;
+
+ return $out;
}
/* returns true if $range is a valid pair of IPv4 or IPv6 addresses separated by a "-"
@@ -738,12 +815,10 @@ function subnet_size($subnet) {
if (is_subnetv4($subnet)) {
list ($ip, $bits) = explode("/", $subnet);
return round(exp(log(2) * (32 - $bits)));
- }
- else if (is_subnetv6($subnet)) {
+ } else if (is_subnetv6($subnet)) {
list ($ip, $bits) = explode("/", $subnet);
return round(exp(log(2) * (128 - $bits)));
- }
- else {
+ } else {
return 0;
}
}
@@ -1015,51 +1090,57 @@ function get_configured_carp_interface_list($carpinterface = '', $family = 'inet
$iflist = array();
- if (is_array($config['virtualip']['vip'])) {
- $viparr = &$config['virtualip']['vip'];
- foreach ($viparr as $vip) {
- switch ($vip['mode']) {
- case "carp":
- if (!empty($carpinterface)) {
- if ($carpinterface == "_vip{$vip['uniqid']}") {
- switch ($what) {
- case 'subnet':
- if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
- return $vip['subnet_bits'];
- } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
- return $vip['subnet_bits'];
- }
- break;
- case 'iface':
- if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
- return $vip['interface'];
- } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
- return $vip['interface'];
- }
- break;
- case 'vip':
- if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
- return $vip;
- } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
- return $vip;
- }
- break;
- case 'ip':
- default:
- if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
- return $vip['subnet'];
- } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
- return $vip['subnet'];
- }
- break;
- }
- }
- } else {
- $iflist["_vip{$vip['uniqid']}"] = $vip['subnet'];
- }
- break;
- }
+ if (!is_array($config['virtualip']['vip']) || empty($config['virtualip']['vip'])) {
+ return $iflist;
+ }
+
+ $viparr = &$config['virtualip']['vip'];
+ foreach ($viparr as $vip) {
+ if ($vip['mode'] != "carp") {
+ continue;
+ }
+
+ if (empty($carpinterface)) {
+ $iflist["_vip{$vip['uniqid']}"] = $vip['subnet'];
+ continue;
+ }
+
+ if ($carpinterface != "_vip{$vip['uniqid']}") {
+ continue;
+ }
+
+ switch ($what) {
+ case 'subnet':
+ if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
+ return $vip['subnet_bits'];
+ } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
+ return $vip['subnet_bits'];
+ }
+ break;
+ case 'iface':
+ if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
+ return $vip['interface'];
+ } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
+ return $vip['interface'];
+ }
+ break;
+ case 'vip':
+ if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
+ return $vip;
+ } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
+ return $vip;
+ }
+ break;
+ case 'ip':
+ default:
+ if ($family == 'inet' && is_ipaddrv4($vip['subnet'])) {
+ return $vip['subnet'];
+ } else if ($family == 'inet6' && is_ipaddrv6($vip['subnet'])) {
+ return $vip['subnet'];
+ }
+ break;
}
+ break;
}
return $iflist;
@@ -1097,7 +1178,7 @@ function get_configured_vips_list() {
$viparr = &$config['virtualip']['vip'];
foreach ($viparr as $vip) {
if ($vip['mode'] == "carp") {
- $alias_list[] = array("ipaddr" => $vip['subnet'], "if" => "{$vip['interface']}_vip{$vip['vhid']}");
+ $alias_list[] = array("ipaddr" => $vip['subnet'], "if" => "_vip{$vip['uniqid']}");
} else {
$alias_list[] = array("ipaddr" => $vip['subnet'], "if" => $vip['interface']);
}
@@ -1449,8 +1530,9 @@ function mwexec($command, $nologentry = false, $clearsigmask = false, $backgroun
// run in foreground, and (optionally) log if nonzero return
$outputarray = array();
exec("$command 2>&1", $outputarray, $retval);
- if (($retval <> 0) && (!$nologentry || isset($config['system']['developerspew'])))
+ if (($retval <> 0) && (!$nologentry || isset($config['system']['developerspew']))) {
log_error(sprintf(gettext("The command '%1\$s' returned exit code '%2\$d', the output was '%3\$s' "), $command, $retval, implode(" ", $outputarray)));
+ }
}
if ($clearsigmask) {
@@ -1465,13 +1547,13 @@ function mwexec_bg($command, $clearsigmask = false) {
return mwexec($command, false, $clearsigmask, true);
}
-/* unlink a file, if it exists */
+/* unlink a file, or pattern-match of a file, if it exists
+ if the file/path contains glob() compatible wildcards, all matching files will be unlinked
+ if no matches, no error occurs */
function unlink_if_exists($fn) {
$to_do = glob($fn);
- if (is_array($to_do)) {
- foreach ($to_do as $filename) {
- @unlink($filename);
- }
+ if (is_array($to_do) && count($to_do) > 0) {
+ @array_map("unlink", $to_do);
} else {
@unlink($fn);
}
@@ -1549,17 +1631,6 @@ function alias_expand_urltable($name) {
return null;
}
-/* verify (and remove) the digital signature on a file - returns 0 if OK */
-function verify_digital_signature($fname) {
- global $g;
-
- if (!file_exists("/usr/local/sbin/gzsig")) {
- return 4;
- }
-
- return mwexec("/usr/local/sbin/gzsig verify {$g['etc_path']}/pubkey.pem < " . escapeshellarg($fname));
-}
-
/* obtain MAC address given an IP address by looking at the ARP table */
function arp_get_mac_by_ip($ip) {
mwexec("/sbin/ping -c 1 -t 1 " . escapeshellarg($ip), true);
@@ -2182,32 +2253,6 @@ function array_exclude($needle, $haystack) {
return $result;
}
-function get_current_theme() {
- global $config, $g;
- /*
- * if user has selected a custom template, use it.
- * otherwise default to pfsense template
- */
- if (($g["disablethemeselection"] === true) && !empty($g["default_theme"]) && (is_dir($g["www_path"].'/themes/'.$g["default_theme"]))) {
- $theme = $g["default_theme"];
- } elseif ($config['theme'] <> "" && (is_dir($g["www_path"].'/themes/'.$config['theme']))) {
- $theme = $config['theme'];
- } else {
- $theme = "pfsense";
- }
- /*
- * If this device is an apple ipod/iphone
- * switch the theme to one that works with it.
- */
- $lowres_ua = array("iPhone", "iPod", "iPad", "Android", "BlackBerry", "Opera Mini", "Opera Mobi", "PlayBook", "IEMobile");
- foreach ($lowres_ua as $useragent) {
- if (strstr($_SERVER['HTTP_USER_AGENT'], $useragent)) {
- $theme = (empty($g['theme_lowres']) && (is_dir($g["www_path"].'/themes/'.$g['theme_lowres']))) ? "pfsense" : $g['theme_lowres'];
- }
- }
- return $theme;
-}
-
/* Define what is preferred, IPv4 or IPv6 */
function prefer_ipv4_or_ipv6() {
global $config;
@@ -2229,7 +2274,12 @@ function post_redirect($page, $params) {
foreach ($params as $key => $value) {
print "<input type=\"hidden\" name=\"{$key}\" value=\"{$value}\" />\n";
}
- print "</form><script type=\"text/javascript\">document.formredir.submit();</script>\n";
+ print "</form>\n";
+ print "<script type=\"text/javascript\">\n";
+ print "//<![CDATA[\n";
+ print "document.formredir.submit();\n";
+ print "//]]>\n";
+ print "</script>\n";
print "</body></html>\n";
}
diff --git a/src/etc/inc/uuid.php b/src/etc/inc/uuid.php
deleted file mode 100644
index 700f392..0000000
--- a/src/etc/inc/uuid.php
+++ /dev/null
@@ -1,327 +0,0 @@
-<?php
-/*-
- * Copyright (c) 2008 Fredrik Lindberg - http://www.shapeshifter.se
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-/*
- * UUID (RFC4122) Generator
- * http://tools.ietf.org/html/rfc4122
- *
- * Implements version 1, 3, 4 and 5
- */
-class UUID {
- /* UUID versions */
- const UUID_TIME = 1; /* Time based UUID */
- const UUID_NAME_MD5 = 3; /* Name based (MD5) UUID */
- const UUID_RANDOM = 4; /* Random UUID */
- const UUID_NAME_SHA1 = 5; /* Name based (SHA1) UUID */
-
- /* UUID formats */
- const FMT_FIELD = 100;
- const FMT_STRING = 101;
- const FMT_BINARY = 102;
- const FMT_QWORD = 1; /* Quad-word, 128-bit (not impl.) */
- const FMT_DWORD = 2; /* Double-word, 64-bit (not impl.) */
- const FMT_WORD = 4; /* Word, 32-bit (not impl.) */
- const FMT_SHORT = 8; /* Short (not impl.) */
- const FMT_BYTE = 16; /* Byte */
- const FMT_DEFAULT = 16;
-
- /* Field UUID representation */
- static private $m_uuid_field = array(
- 'time_low' => 0, /* 32-bit */
- 'time_mid' => 0, /* 16-bit */
- 'time_hi' => 0, /* 16-bit */
- 'clock_seq_hi' => 0, /* 8-bit */
- 'clock_seq_low' => 0, /* 8-bit */
- 'node' => array() /* 48-bit */
- );
-
- static private $m_generate = array(
- self::UUID_TIME => "generateTime",
- self::UUID_RANDOM => "generateRandom",
- self::UUID_NAME_MD5 => "generateNameMD5",
- self::UUID_NAME_SHA1 => "generateNameSHA1"
- );
-
- static private $m_convert = array(
- self::FMT_FIELD => array(
- self::FMT_BYTE => "conv_field2byte",
- self::FMT_STRING => "conv_field2string",
- self::FMT_BINARY => "conv_field2binary"
- ),
- self::FMT_BYTE => array(
- self::FMT_FIELD => "conv_byte2field",
- self::FMT_STRING => "conv_byte2string",
- self::FMT_BINARY => "conv_byte2binary"
- ),
- self::FMT_STRING => array(
- self::FMT_BYTE => "conv_string2byte",
- self::FMT_FIELD => "conv_string2field",
- self::FMT_BINARY => "conv_string2binary"
- ),
- );
-
- /* Swap byte order of a 32-bit number */
- static private function swap32($x) {
- return (($x & 0x000000ff) << 24) | (($x & 0x0000ff00) << 8) |
- (($x & 0x00ff0000) >> 8) | (($x & 0xff000000) >> 24);
- }
-
- /* Swap byte order of a 16-bit number */
- static private function swap16($x) {
- return (($x & 0x00ff) << 8) | (($x & 0xff00) >> 8);
- }
-
- /* Auto-detect UUID format */
- static private function detectFormat($src) {
- if (is_string($src))
- return self::FMT_STRING;
- else if (is_array($src)) {
- $len = count($src);
- if ($len == 1 || ($len % 2) == 0)
- return $len;
- else
- return (-1);
- }
- else
- return self::FMT_BINARY;
- }
-
- /*
- * Public API, generate a UUID of 'type' in format 'fmt' for
- * the given namespace 'ns' and node 'node'
- */
- static public function generate($type, $fmt = self::FMT_BYTE,
- $node = "", $ns = "") {
- $func = self::$m_generate[$type];
- if (!isset($func))
- return null;
- $conv = self::$m_convert[self::FMT_FIELD][$fmt];
-
- $uuid = self::$func($ns, $node);
- return self::$conv($uuid);
- }
-
- /*
- * Public API, convert a UUID from one format to another
- */
- static public function convert($uuid, $from, $to) {
- $conv = self::$m_convert[$from][$to];
- if (!isset($conv))
- return ($uuid);
-
- return (self::$conv($uuid));
- }
-
- /*
- * Generate an UUID version 4 (pseudo random)
- */
- static private function generateRandom($ns, $node) {
- $uuid = self::$m_uuid_field;
-
- $uuid['time_hi'] = (4 << 12) | (mt_rand(0, 0x1000));
- $uuid['clock_seq_hi'] = (1 << 7) | mt_rand(0, 128);
- $uuid['time_low'] = mt_rand(0, 0xffffffff);
- $uuid['time_mid'] = mt_rand(0, 0x0000ffff);
- $uuid['clock_seq_low'] = mt_rand(0, 255);
- for ($i = 0; $i < 6; $i++)
- $uuid['node'][$i] = mt_rand(0, 255);
- return ($uuid);
- }
-
- /*
- * Generate UUID version 3 and 5 (name based)
- */
- static private function generateName($ns, $node, $hash, $version) {
- $ns_fmt = self::detectFormat($ns);
- $field = self::convert($ns, $ns_fmt, self::FMT_FIELD);
-
- /* Swap byte order to keep it in big endian on all platforms */
- $field['time_low'] = self::swap32($field['time_low']);
- $field['time_mid'] = self::swap16($field['time_mid']);
- $field['time_hi'] = self::swap16($field['time_hi']);
-
- /* Convert the namespace to binary and concatenate node */
- $raw = self::convert($field, self::FMT_FIELD, self::FMT_BINARY);
- $raw .= $node;
-
- /* Hash the namespace and node and convert to a byte array */
- $val = $hash($raw, true);
- $tmp = unpack('C16', $val);
- foreach (array_keys($tmp) as $key)
- $byte[$key - 1] = $tmp[$key];
-
- /* Convert byte array to a field array */
- $field = self::conv_byte2field($byte);
-
- $field['time_low'] = self::swap32($field['time_low']);
- $field['time_mid'] = self::swap16($field['time_mid']);
- $field['time_hi'] = self::swap16($field['time_hi']);
-
- /* Apply version and constants */
- $field['clock_seq_hi'] &= 0x3f;
- $field['clock_seq_hi'] |= (1 << 7);
- $field['time_hi'] &= 0x0fff;
- $field['time_hi'] |= ($version << 12);
-
- return ($field);
- }
- static private function generateNameMD5($ns, $node) {
- return self::generateName($ns, $node, "md5",
- self::UUID_NAME_MD5);
- }
- static private function generateNameSHA1($ns, $node) {
- return self::generateName($ns, $node, "sha1",
- self::UUID_NAME_SHA1);
- }
-
- /*
- * Generate UUID version 1 (time based)
- */
- static private function generateTime($ns, $node) {
- $uuid = self::$m_uuid_field;
-
- /*
- * Get current time in 100 ns intervals. The magic value
- * is the offset between UNIX epoch and the UUID UTC
- * time base October 15, 1582.
- */
- $tp = gettimeofday();
- $time = ($tp['sec'] * 10000000) + ($tp['usec'] * 10) +
- 0x01B21DD213814000;
-
- /* Work around PHP 32-bit bit-operation limits */
- $q = intval($time / 0xffffffff);
- $low = $time - ($q * (0xffffffff + 1));
- $high = intval(($time - $low) / 0xffffffff);
-
- $uuid['time_low'] = $low;
- $uuid['time_mid'] = $high & 0x0000ffff;
- $uuid['time_hi'] = ($high & 0x0fff) | (self::UUID_TIME << 12);
-
- /*
- * We don't support saved state information and generate
- * a random clock sequence each time.
- */
- $uuid['clock_seq_hi'] = (1 << 7) | mt_rand(0, 128);
- $uuid['clock_seq_low'] = mt_rand(0, 255);
-
- /*
- * Node should be set to the 48-bit IEEE node identifier, but
- * we leave it for the user to supply the node.
- */
- for ($i = 0; $i < 6; $i++)
- $uuid['node'][$i] = ord(substr($node, $i, 1));
-
- return ($uuid);
- }
-
- /* Assumes correct byte order */
- static private function conv_field2byte($src) {
- $uuid[0] = ($src['time_low'] & 0xff000000) >> 24;
- $uuid[1] = ($src['time_low'] & 0x00ff0000) >> 16;
- $uuid[2] = ($src['time_low'] & 0x0000ff00) >> 8;
- $uuid[3] = ($src['time_low'] & 0x000000ff);
- $uuid[4] = ($src['time_mid'] & 0xff00) >> 8;
- $uuid[5] = ($src['time_mid'] & 0x00ff);
- $uuid[6] = ($src['time_hi'] & 0xff00) >> 8;
- $uuid[7] = ($src['time_hi'] & 0x00ff);
- $uuid[8] = $src['clock_seq_hi'];
- $uuid[9] = $src['clock_seq_low'];
-
- for ($i = 0; $i < 6; $i++)
- $uuid[10+$i] = $src['node'][$i];
-
- return ($uuid);
- }
-
- static private function conv_field2string($src) {
- $str = sprintf(
- '%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x',
- ($src['time_low']), ($src['time_mid']), ($src['time_hi']),
- $src['clock_seq_hi'], $src['clock_seq_low'],
- $src['node'][0], $src['node'][1], $src['node'][2],
- $src['node'][3], $src['node'][4], $src['node'][5]);
- return ($str);
- }
-
- static private function conv_field2binary($src) {
- $byte = self::conv_field2byte($src);
- return self::conv_byte2binary($byte);
- }
-
- static private function conv_byte2field($uuid) {
- $field = self::$m_uuid_field;
- $field['time_low'] = ($uuid[0] << 24) | ($uuid[1] << 16) |
- ($uuid[2] << 8) | $uuid[3];
- $field['time_mid'] = ($uuid[4] << 8) | $uuid[5];
- $field['time_hi'] = ($uuid[6] << 8) | $uuid[7];
- $field['clock_seq_hi'] = $uuid[8];
- $field['clock_seq_low'] = $uuid[9];
-
- for ($i = 0; $i < 6; $i++)
- $field['node'][$i] = $uuid[10+$i];
- return ($field);
- }
-
- static public function conv_byte2string($src) {
- $field = self::conv_byte2field($src);
- return self::conv_field2string($field);
- }
-
- static private function conv_byte2binary($src) {
- $raw = pack('C16', $src[0], $src[1], $src[2], $src[3],
- $src[4], $src[5], $src[6], $src[7], $src[8], $src[9],
- $src[10], $src[11], $src[12], $src[13], $src[14], $src[15]);
- return ($raw);
- }
-
- static private function conv_string2field($src) {
- $parts = sscanf($src, '%x-%x-%x-%x-%02x%02x%02x%02x%02x%02x');
- $field = self::$m_uuid_field;
- $field['time_low'] = ($parts[0]);
- $field['time_mid'] = ($parts[1]);
- $field['time_hi'] = ($parts[2]);
- $field['clock_seq_hi'] = ($parts[3] & 0xff00) >> 8;
- $field['clock_seq_low'] = $parts[3] & 0x00ff;
- for ($i = 0; $i < 6; $i++)
- $field['node'][$i] = $parts[4+$i];
-
- return ($field);
- }
-
- static private function conv_string2byte($src) {
- $field = self::conv_string2field($src);
- return self::conv_field2byte($field);
- }
-
- static private function conv_string2binary($src) {
- $byte = self::conv_string2byte($src);
- return self::conv_byte2binary($byte);
- }
-}
-
-?> \ No newline at end of file
diff --git a/src/etc/inc/voucher.inc b/src/etc/inc/voucher.inc
index 2e0f5f5..31078e2 100644
--- a/src/etc/inc/voucher.inc
+++ b/src/etc/inc/voucher.inc
@@ -29,11 +29,6 @@
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/bin/voucher
- pfSense_MODULE: captiveportal
-*/
-
/* include all configuration functions */
if (!function_exists('captiveportal_syslog')) {
require_once("captiveportal.inc");
@@ -588,8 +583,9 @@ function voucher_configure_zone($sync = false) {
$roll = $rollent['number'];
$len = ($rollent['count'] >> 3) + 1;
- if (strlen(base64_decode($rollent['used'])) != $len)
+ if (strlen(base64_decode($rollent['used'])) != $len) {
$rollent['used'] = base64_encode(str_repeat("\000", $len));
+ }
voucher_write_used_db($roll, $rollent['used']);
$minutes = $rollent['minutes'];
$active_vouchers = array();
diff --git a/src/etc/inc/vpn.inc b/src/etc/inc/vpn.inc
index e277da5..50f0b01 100644
--- a/src/etc/inc/vpn.inc
+++ b/src/etc/inc/vpn.inc
@@ -1,5 +1,4 @@
<?php
-
/*
vpn.inc
Copyright (C) 2004 Scott Ullrich
@@ -33,32 +32,36 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_BUILDER_BINARIES: /usr/local/sbin/ipsec /usr/local/libexec/ipsec/charon /usr/local/libexec/ipsec/starter
- pfSense_BUILDER_BINARIES: /usr/local/sbin/filterdns /usr/local/sbin/mpd4
- pfSense_MODULE: vpn
-*/
-
require_once("ipsec.inc");
require_once("filter.inc");
-function vpn_ipsec_configure_loglevels($forconfig = false) {
- global $config, $ipsec_loglevels;
+function vpn_update_daemon_loglevel($category, $level) {
+ global $ipsec_log_cats, $ipsec_log_sevs;
- $cfgtext = array();
- foreach ($ipsec_loglevels as $lkey => $ldescr) {
- if (!isset($config['ipsec']["ipsec_{$lkey}"]) && !$forconfig) {
- mwexec("/usr/local/sbin/ipsec stroke loglevel {$lkey} -- -1", false);
- } else if (is_numeric($config['ipsec']["ipsec_{$lkey}"]) &&
- intval($config['ipsec']["ipsec_{$lkey}"]) >= 0 && intval($config['ipsec']["ipsec_{$lkey}"]) <= 5) {
- $forconfig ? $cfgtext[] = "${lkey} " . (intval($config['ipsec']["ipsec_{$lkey}"]) - 1) :
- mwexec("/usr/local/sbin/ipsec stroke loglevel {$lkey} " . (intval($config['ipsec']["ipsec_{$lkey}"]) - 1) , false);
+ if (in_array($category, array_keys($ipsec_log_cats), true) && in_array(intval($level), array_keys($ipsec_log_sevs), true)) {
+
+ /* if you're setting to -1, need to add "--" to args */
+ $argterm = "";
+ if ($level == "-1") {
+ $argterm = "--";
}
+
+ mwexec("/usr/local/sbin/ipsec stroke loglevel {$category} {$argterm} {$level}");
}
- if ($forconfig) {
- return implode(',', $cfgtext);
+}
+
+function vpn_logging_cfgtxt() {
+ global $config, $ipsec_log_cats, $ipsec_log_sevs;
+
+ $cfgtext = array();
+ foreach (array_keys($ipsec_log_cats) as $cat) {
+ if (is_numeric($config['ipsec']['logging'][$cat]) &&
+ in_array(intval($config['ipsec']['logging'][$cat]), array_keys($ipsec_log_sevs), true)) {
+ $cfgtext[] = "${cat} = {$config['ipsec']['logging'][$cat]}";
+ }
}
+
+ return $cfgtext;
}
/* include all configuration functions */
@@ -128,13 +131,14 @@ function vpn_ipsec_configure($restart = false) {
/* get the automatic ping_hosts.sh ready */
unlink_if_exists("{$g['vardb_path']}/ipsecpinghosts");
touch("{$g['vardb_path']}/ipsecpinghosts");
+ $ipsecpinghostsactive = false;
/* service may have been enabled, disabled, or otherwise changed in a way requiring rule updates */
filter_configure();
$syscfg = $config['system'];
$ipseccfg = $config['ipsec'];
- if (!isset($ipseccfg['enable'])) {
+ if (!ipsec_enabled()) {
/* try to stop charon */
mwexec("/usr/local/sbin/ipsec stop");
/* Stop dynamic monitoring */
@@ -143,9 +147,8 @@ function vpn_ipsec_configure($restart = false) {
/* wait for process to die */
sleep(2);
- /* disallow IPSEC, it is off */
+ /* IPSEC is off, shutdown enc interface.*/
mwexec("/sbin/ifconfig enc0 down");
- set_single_sysctl("net.inet.ip.ipsec_in_use", "0");
return 0;
}
@@ -160,7 +163,6 @@ function vpn_ipsec_configure($restart = false) {
$crlpath = "{$g['varetc_path']}/ipsec/ipsec.d/crls";
mwexec("/sbin/ifconfig enc0 up");
- set_single_sysctl("net.inet.ip.ipsec_in_use", "1");
if (php_uname('m') != "amd64") {
set_single_sysctl("net.inet.ipsec.directdispatch", "0");
}
@@ -172,6 +174,11 @@ function vpn_ipsec_configure($restart = false) {
if (!is_dir("{$g['varetc_path']}/ipsec/ipsec.d")) {
mkdir("{$g['varetc_path']}/ipsec/ipsec.d");
}
+ // delete these paths first to ensure old CAs, certs and CRLs aren't left behind. redmine #5238
+ rmdir_recursive($capath);
+ rmdir_recursive($keypath);
+ rmdir_recursive($crlpath);
+ rmdir_recursive($certpath);
if (!is_dir($capath)) {
mkdir($capath);
}
@@ -197,14 +204,49 @@ function vpn_ipsec_configure($restart = false) {
mkdir("{$g['varetc_path']}/ipsec/ipsec.d/reqs");
}
+ if (!file_exists("/usr/local/etc/ipsec.d") ||
+ !is_link("/usr/local/etc/ipsec.d")) {
+ conf_mount_rw();
+ if (file_exists("/usr/local/etc/ipsec.d")) {
+ rmdir_recursive("/usr/local/etc/ipsec.d");
+ }
+ @symlink("{$g['varetc_path']}/ipsec/ipsec.d",
+ "/usr/local/etc/ipsec.d");
+ conf_mount_ro();
+ }
+ if (!file_exists("{$g['varetc_path']}/etc/strongswan.d") ||
+ !is_link("{$g['varetc_path']}/etc/strongswan.d")) {
+ conf_mount_rw();
+ if (is_link("{$g['varetc_path']}/etc/strongswan.d")) {
+ @unlink("{$g['varetc_path']}/etc/strongswan.d");
+ } else {
+ rmdir_recursive("{$g['varetc_path']}/etc/strongswan.d");
+ }
+ @symlink("/usr/local/etc/strongswan.d",
+ "{$g['varetc_path']}/ipsec/strongswan.d");
+ conf_mount_ro();
+ }
+ if (!file_exists("/usr/local/etc/strongswan.conf") ||
+ !is_link("/usr/local/etc/strongswan.conf")) {
+ conf_mount_rw();
+ @unlink("/usr/local/etc/strongswan.conf");
+ @symlink("{$g['varetc_path']}/ipsec/strongswan.conf",
+ "/usr/local/etc/strongswan.conf");
+ conf_mount_ro();
+ }
+ if (!file_exists("/usr/local/etc/ipsec.conf") ||
+ !is_link("/usr/local/etc/ipsec.conf")) {
+ conf_mount_rw();
+ @unlink("/usr/local/etc/ipsec.conf");
+ @symlink("{$g['varetc_path']}/ipsec/ipsec.conf",
+ "/usr/local/etc/ipsec.conf");
+ conf_mount_ro();
+ }
if (platform_booting()) {
echo gettext("Configuring IPsec VPN... ");
}
- /* fastforwarding is not compatible with ipsec tunnels */
- set_single_sysctl("net.inet.ip.fastforwarding", "0");
-
/* resolve all local, peer addresses and setup pings */
$ipmap = array();
$rgmap = array();
@@ -213,6 +255,7 @@ function vpn_ipsec_configure($restart = false) {
$aggressive_mode_psk = false;
unset($iflist);
$ifacesuse = array();
+ $mobile_ipsec_auth = "";
if (is_array($a_phase1) && count($a_phase1)) {
$ipsecpinghosts = "";
@@ -256,6 +299,7 @@ function vpn_ipsec_configure($restart = false) {
try to resolve it now and add it to the list for filterdns */
if (isset ($ph1ent['mobile'])) {
+ $mobile_ipsec_auth = $ph1ent['authentication_method'];
continue;
}
@@ -336,6 +380,7 @@ function vpn_ipsec_configure($restart = false) {
}
if (is_ipaddr($srcip)) {
$ipsecpinghosts[] = "{$srcip}|{$dstip}|3|||||{$family}|\n";
+ $ipsecpinghostsactive = true;
}
}
}
@@ -396,11 +441,19 @@ function vpn_ipsec_configure($restart = false) {
unset($stronconf);
+ $strongswanlog = "";
+ $ipsecloglevels = vpn_logging_cfgtxt();
+ if (is_array($ipsecloglevels)) {
+ foreach ($ipsecloglevels as $loglevel) {
+ $strongswanlog .= "\t\t" . $loglevel . "\n";
+ }
+ }
$strongswan = <<<EOD
# Automatically generated config file - DO NOT MODIFY. Changes will be overwritten.
starter {
-load_warning = no
+ load_warning = no
+ config_file = {$g['varetc_path']}/ipsec/ipsec.conf
}
charon {
@@ -416,53 +469,61 @@ cisco_unity = {$unity_enabled}
{$ifacesuse}
{$makebeforebreak}
-# And two loggers using syslog. The subsections define the facility to log
-# to, currently one of: daemon, auth.
syslog {
identifier = charon
- # default level to the LOG_DAEMON facility
+ # log everything under daemon since it ends up in the same place regardless with our syslog.conf
daemon {
ike_name = yes
+{$strongswanlog}
}
- # very minimalistic IKE auditing logs to LOG_AUTHPRIV
+ # disable logging under auth so logs aren't duplicated
auth {
default = -1
- ike = 1
- ike_name = yes
}
}
+ plugins {
+ stroke {
+ secrets_file = {$g['varetc_path']}/ipsec/ipsec.secrets
+ }
+
EOD;
- $strongswan .= "\tplugins {\n";
+ /* Find RADIUS servers designated for Mobile IPsec user auth */
+ $radius_server_txt = "";
+ $user_sources = explode(',', $config['ipsec']['client']['user_source']);
+ foreach ($user_sources as $user_source) {
+ $auth_server = auth_get_authserver($user_source);
+ $nice_user_source = strtolower(preg_replace('/\s+/', '_', $user_source));
+ if ($auth_server && $auth_server['type'] === 'radius') {
+ $radius_server_txt .= <<<EOD
+ {$nice_user_source} {
+ address = {$auth_server['host']}
+ secret = "{$auth_server['radius_secret']}"
+ auth_port = {$auth_server['radius_auth_port']}
+ acct_port = {$auth_server['radius_acct_port']}
+ }
+
+EOD;
+ }
+ }
- $a_servers = auth_get_authserver_list();
- foreach ($a_servers as $id => $pconfig) {
- if ($id == $config['ipsec']['client']['user_source'] && $pconfig['type'] == "radius") {
- $strongswan .= <<<EOD
+ /* write an eap-radius config section if appropriate */
+ if (strlen($radius_server_txt) && ($mobile_ipsec_auth === "eap-radius")) {
+ $strongswan .= <<<EOD
eap-radius {
class_group = yes
eap_start = no
servers {
- primary {
- address = {$pconfig['host']}
- secret = {$pconfig['radius_secret']}
- auth_port = {$pconfig['radius_auth_port']}
- acct_port = {$pconfig['radius_acct_port']}
- }
+{$radius_server_txt}
}
}
EOD;
- break;
- }
}
if (is_array($a_client) && isset($a_client['enable'])) {
$strongswan .= "\t\tattr {\n";
- if ($a_client['pool_address'] && $a_client['pool_netbits']) {
- $strongswan .= "\t\t\tsubnet = {$a_client['pool_address']}/{$a_client['pool_netbits']}\n";
- }
$cfgservers = array();
if (!empty($a_client['dns_server1'])) {
@@ -514,6 +575,7 @@ EOD;
}
if (!empty($net_list)) {
+ $strongswan .= "\t\t\tsubnet = {$net_list}\n";
$strongswan .= "\t\t\tsplit-include = {$net_list}\n";
unset($net_list);
}
@@ -570,28 +632,6 @@ EOD;
@file_put_contents("{$g['varetc_path']}/ipsec/strongswan.conf", $strongswan);
unset($strongswan);
- /* generate CA certificates files */
- if (is_array($config['ca']) && count($config['ca'])) {
- foreach ($config['ca'] as $ca) {
- if (!isset($ca['crt'])) {
- log_error(sprintf(gettext("Error: Invalid certificate info for %s"), $ca['descr']));
- continue;
- }
- $cert = base64_decode($ca['crt']);
- $x509cert = openssl_x509_parse(openssl_x509_read($cert));
- if (!is_array($x509cert) || !isset($x509cert['hash'])) {
- log_error(sprintf(gettext("Error: Invalid certificate hash info for %s"), $ca['descr']));
- continue;
- }
- $fname = "{$capath}/{$x509cert['hash']}.0.crt";
- if (!@file_put_contents($fname, $cert)) {
- log_error(sprintf(gettext("Error: Cannot write IPsec CA file for %s"), $ca['descr']));
- continue;
- }
- unset($cert);
- }
- }
-
/* write out CRL files */
if (is_array($config['crl']) && count($config['crl'])) {
foreach ($config['crl'] as $crl) {
@@ -609,6 +649,7 @@ EOD;
$pskconf = "";
+ $vpncas = array();
if (is_array($a_phase1) && count($a_phase1)) {
foreach ($a_phase1 as $ph1ent) {
@@ -628,6 +669,16 @@ EOD;
continue;
}
+ /* add signing CA cert chain of server cert
+ * to the list of CAs to write
+ */
+ $cachain = ca_chain_array($cert);
+ if ($cachain && is_array($cachain)) {
+ foreach ($cachain as $cacrt) {
+ $vpncas[$cacrt['refid']] = $cacrt;
+ }
+ }
+
@chmod($certpath, 0600);
$ph1keyfile = "{$keypath}/cert-{$ikeid}.key";
@@ -676,6 +727,41 @@ EOD;
}
}
}
+
+ /* if the client authenticates with a cert add the
+ * client cert CA chain to the list of CAs to write
+ */
+ if (in_array($ph1ent['authentication_method'],
+ array('rsasig', 'eap-tls', 'xauth_rsa_server'))) {
+
+ if (!empty($ph1ent['caref']) && !array_key_exists($ph1ent['caref'], $vpncas)) {
+ $thisca = lookup_ca($ph1ent['caref']);
+ $vpncas[$ph1ent['caref']] = $thisca;
+
+ /* follow chain up to root */
+ $cachain = ca_chain_array($thisca);
+ if ($cachain and is_array($cachain)) {
+ foreach ($cachain as $cacrt) {
+ $vpncas[$cacrt['refid']] = $cacrt;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ /* write the required CAs */
+ foreach ($vpncas as $carefid => $cadata) {
+ $cacrt = base64_decode($cadata['crt']);
+ $cacrtattrs = openssl_x509_parse($cacrt);
+ if (!is_array($cacrtattrs) || !isset($cacrtattrs['hash'])) {
+ log_error(sprintf(gettext("Error: Invalid certificate hash info for %s"), $cadata['descr']));
+ continue;
+ }
+ $cafilename = "{$capath}/{$cacrtattrs['hash']}.0.crt";
+ if (!@file_put_contents($cafilename, $cacrt)) {
+ log_error(sprintf(gettext("Error: Cannot write IPsec CA file for %s"), $cadata['descr']));
+ continue;
}
}
@@ -724,7 +810,6 @@ EOD;
$ipsecconf .= "# This file is automatically generated. Do not edit\n";
$ipsecconf .= "config setup\n\tuniqueids = {$uniqueids}\n";
- $ipsecconf .= "\tcharondebug=\"" . vpn_ipsec_configure_loglevels(true) . "\"\n";
if (isset($config['ipsec']['strictcrlpolicy'])) {
$ipsecconf .= "\tstrictcrlpolicy = yes \n";
@@ -942,6 +1027,21 @@ EOD;
}
}
+ if (!empty($ph1ent['caref'])) {
+ $ca = lookup_ca($ph1ent['caref']);
+ if ($ca) {
+ $casubarr = cert_get_subject_array($ca['crt']);
+ $casub = "";
+ foreach ($casubarr as $casubfield) {
+ if (empty($casub)) {
+ $casub = "/";
+ }
+ $casub .= "{$casubfield['a']}={$casubfield['v']}/";
+ }
+
+ }
+ }
+
$authentication = "";
switch ($ph1ent['authentication_method']) {
case 'eap-mschapv2':
@@ -950,6 +1050,7 @@ EOD;
$authentication .= "leftauth=pubkey\n\trightauth=eap-mschapv2";
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
+ $authentication .= "\n\tleftsendcert=always";
}
}
break;
@@ -959,13 +1060,18 @@ EOD;
$authentication .= "leftauth=pubkey\n\trightauth=eap-tls";
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
+ $authentication .= "\n\tleftsendcert=always";
}
} else {
$authentication = "leftauth=eap-tls\n\trightauth=eap-tls";
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
+ $authentication .= "\n\tleftsendcert=always";
}
}
+ if (isset($casub)) {
+ $authentication .= "\n\trightca=\"$casub\"";
+ }
break;
case 'eap-radius':
if (isset($ph1ent['mobile'])) {
@@ -973,11 +1079,13 @@ EOD;
$authentication .= "leftauth=pubkey\n\trightauth=eap-radius";
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
+ $authentication .= "\n\tleftsendcert=always";
}
} else {
$authentication = "leftauth=eap-radius\n\trightauth=eap-radius";
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
+ $authentication .= "\n\tleftsendcert=always";
}
}
break;
@@ -987,6 +1095,9 @@ EOD;
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
}
+ if (isset($casub)) {
+ $authentication .= "\n\trightca=\"$casub\"";
+ }
break;
case 'xauth_psk_server':
$authentication = "leftauth = psk\n\trightauth = psk";
@@ -1000,6 +1111,9 @@ EOD;
if (!empty($ph1ent['certref'])) {
$authentication .= "\n\tleftcert={$certpath}/cert-{$ph1ent['ikeid']}.crt";
}
+ if (isset($casub)) {
+ $authentication .= "\n\trightca=\"$casub\"";
+ }
break;
case 'hybrid_rsa_server':
$authentication = "leftauth = pubkey\n\trightauth = xauth-generic";
@@ -1102,7 +1216,8 @@ EOD;
$tunneltype = "type = transport";
if ((($ph1ent['authentication_method'] == "xauth_psk_server") ||
- ($ph1ent['authentication_method'] == "pre_shared_key")) && isset($ph1ent['mobile'])) {
+ ($ph1ent['authentication_method'] == "pre_shared_key")) &&
+ isset($ph1ent['mobile'])) {
$left_spec = "%any";
} else {
$tmpsubnet = ipsec_get_phase1_src($ph1ent);
@@ -1318,6 +1433,11 @@ EOD;
}
}
+ // run ping_hosts.sh once if it's enabled to avoid wait for minicron
+ if ($ipsecpinghostsactive == true) {
+ mwexec_bg("/usr/local/bin/ping_hosts.sh");
+ }
+
if ($natfilterrules == true) {
filter_configure();
}
@@ -1677,10 +1797,16 @@ function vpn_l2tp_configure() {
$l2tp_listen="set l2tp self $ipaddr";
}
- if ($l2tpcfg['paporchap'] == "chap") {
- $paporchap = "set link enable chap";
- } else {
- $paporchap = "set link enable pap";
+ switch ($l2tpcfg['paporchap']) {
+ case 'chap':
+ $paporchap = "set link enable chap";
+ break;
+ case 'chap-msv2':
+ $paporchap = "set link enable chap-msv2";
+ break;
+ default:
+ $paporchap = "set link enable pap";
+ break;
}
/* write mpd.conf */
diff --git a/src/etc/inc/vslb.inc b/src/etc/inc/vslb.inc
index 05bef31..cb2c50b 100644
--- a/src/etc/inc/vslb.inc
+++ b/src/etc/inc/vslb.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
vslb.inc
Copyright (C) 2005-2008 Bill Marquette
@@ -28,12 +27,6 @@
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/sbin/relayd
- pfSense_MODULE: routing
-*/
-
-
/* include all configuration functions */
class Monitor {
diff --git a/src/etc/inc/xmlparse.inc b/src/etc/inc/xmlparse.inc
index 08d9b19..cd44aa5 100644
--- a/src/etc/inc/xmlparse.inc
+++ b/src/etc/inc/xmlparse.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
xmlparse.inc
functions to parse/dump configuration files in XML format
diff --git a/src/etc/inc/xmlparse_attr.inc b/src/etc/inc/xmlparse_attr.inc
index ab90e98..c9f6c3a 100644
--- a/src/etc/inc/xmlparse_attr.inc
+++ b/src/etc/inc/xmlparse_attr.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
xmlparse_attr.inc
functions to parse configuration files in XML format with attributes
diff --git a/src/etc/inc/xmlreader.inc b/src/etc/inc/xmlreader.inc
index 960acb1..3982c60 100644
--- a/src/etc/inc/xmlreader.inc
+++ b/src/etc/inc/xmlreader.inc
@@ -1,5 +1,4 @@
<?php
-/* $Id$ */
/*
xmlreader.inc
functions to parse/dump configuration files in XML format
@@ -30,10 +29,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_MODULE: utils
-*/
-
/* The following items will be treated as arrays in config.xml */
function listtags() {
/*
diff --git a/src/etc/inc/xmlrpc.inc b/src/etc/inc/xmlrpc.inc
index e96e783..001777c 100644
--- a/src/etc/inc/xmlrpc.inc
+++ b/src/etc/inc/xmlrpc.inc
@@ -1,7 +1,5 @@
<?php
/*
- $Id$
-
xmlrpc.inc
Copyright (C) 2005-2006 Colin Smith
All rights reserved.
@@ -28,11 +26,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: utils
-*/
-
require_once("auth.inc");
require_once("xmlrpc_client.inc");
@@ -52,30 +45,6 @@ function xmlrpc_params_to_php($params) {
* xmlrpc_value_to_php: Convert an XMLRPC value into a PHP scalar/array and return it.
*/
function xmlrpc_value_to_php($raw_value) {
- /*
- switch ($raw_value->kindOf()) {
- case "scalar":
- if ($raw_value->scalartyp() == "boolean") {
- $return = (boolean) $raw_value->scalarval();
- }
- $return = $raw_value->scalarval();
- break;
- case "array":
- $return = array();
- for ($i = 0; $i < $raw_value->arraysize(); $i++) {
- $value = $raw_value->arraymem($i);
- $return[] = xmlrpc_value_to_php($value);
- }
- break;
- case "struct":
- $return = array();
- for ($i = 0; $i < $raw_value->arraysize(); $i++) {
- list($key, $value) = $raw_value->structeach();
- $return[$key] = xmlrpc_value_to_php($value);
- }
- break;
- }
- */
return XML_RPC_decode($raw_value);
}
@@ -85,25 +54,6 @@ function xmlrpc_value_to_php($raw_value) {
function php_value_to_xmlrpc($value, $force_array = false) {
$toreturn = XML_RPC_encode($value);
return $force_array ? array($toreturn) : $toreturn;
- /*
- if (gettype($value) == "array") {
- $xmlrpc_type = "array";
- $toreturn = array();
- foreach ($value as $key => $val) {
- if (is_string($key)) {
- $xmlrpc_type = "struct";
- }
- $toreturn[$key] = php_value_to_xmlrpc($val);
- }
- return new XML_RPC_Value($toreturn, $xmlrpc_type);
- } else {
- if ($force_array == true) {
- return new XML_RPC_Value(array(new XML_RPC_Value($value, gettype($value))), "array");
- } else {
- return new XML_RPC_Value($value, gettype($value));
- }
- }
- */
}
/*
@@ -123,7 +73,8 @@ function xmlrpc_auth(&$params) {
array_shift($params);
unset($params['xmlrpcauth']);
return true;
- } else if (!empty($params['xmlrpcauth']) && (authenticate_user("admin", $params['xmlrpcauth'], $authcfg) ||
+ } else if (!empty($params['xmlrpcauth']) &&
+ (authenticate_user("admin", $params['xmlrpcauth'], $authcfg) ||
authenticate_user("admin", $params['xmlrpcauth']))) {
array_shift($params);
unset($params['xmlrpcauth']);
@@ -133,7 +84,8 @@ function xmlrpc_auth(&$params) {
array_shift($params);
unset($params['xmlrpcauth']);
return true;
- } else if (!empty($params['xmlrpcauth']) && authenticate_user("admin", $params['xmlrpcauth'])) {
+ } else if (!empty($params['xmlrpcauth']) &&
+ authenticate_user("admin", $params['xmlrpcauth'])) {
array_shift($params);
unset($params['xmlrpcauth']);
return true;
diff --git a/src/etc/inc/xmlrpc_client.inc b/src/etc/inc/xmlrpc_client.inc
index fbbf977..a701419 100644
--- a/src/etc/inc/xmlrpc_client.inc
+++ b/src/etc/inc/xmlrpc_client.inc
@@ -911,38 +911,28 @@ class XML_RPC_Client extends XML_RPC_Base {
print "\n---END---</pre>\n";
}
- /*
- * If we're using a proxy open a socket to the proxy server
- * instead to the xml-rpc server
- */
+ $ctx_options = array();
+
+ /* Add proxy to context when it's set */
if ($this->proxy) {
- if ($this->proxy_protocol == 'http://') {
- $protocol = '';
- } else {
- $protocol = $this->proxy_protocol;
- }
- if ($timeout > 0) {
- $fp = @fsockopen($protocol . $this->proxy, $this->proxy_port,
- $this->errno, $this->errstr, $timeout);
- } else {
- $fp = @fsockopen($protocol . $this->proxy, $this->proxy_port,
- $this->errno, $this->errstr);
- }
- } else {
- if ($this->protocol == 'http://') {
- $protocol = '';
- } else {
- $protocol = $this->protocol;
- }
- if ($timeout > 0) {
- $fp = @fsockopen($protocol . $server, $port,
- $this->errno, $this->errstr, $timeout);
- } else {
- $fp = @fsockopen($protocol . $server, $port,
- $this->errno, $this->errstr);
- }
+ $ctx_options['http'] = array(
+ 'proxy' => "{$this->proxy_protocol}{$this->proxy}:{$this->proxy_port}"
+ );
}
+ /* Disable SSL certificate check since it's used only by HA nowadays */
+ $ctx_options['ssl'] = array(
+ 'verify_peer' => false,
+ 'verify_peer_name' => false
+ );
+
+ $ctx = stream_context_create($ctx_options);
+
+ $fp = stream_socket_client("{$this->protocol}{$server}:{$port}",
+ $this->errno, $this->errstr,
+ ($timeout > 0 ? $timeout : ini_get("default_socket_timeout")),
+ STREAM_CLIENT_CONNECT, $ctx);
+
/*
* Just raising the error without returning it is strange,
* but keep it here for backwards compatibility.
@@ -961,14 +951,6 @@ class XML_RPC_Client extends XML_RPC_Base {
return 0;
}
- if ($timeout) {
- /*
- * Using socket_set_timeout() because stream_set_timeout()
- * was introduced in 4.3.0, but we need to support 4.2.0.
- */
- socket_set_timeout($fp, $timeout);
- }
-
if (!fputs($fp, $op, strlen($op))) {
$this->errstr = 'Write error';
return 0;
diff --git a/src/etc/inc/xmlrpc_server.inc b/src/etc/inc/xmlrpc_server.inc
index f4d8a46..627078a 100644
--- a/src/etc/inc/xmlrpc_server.inc
+++ b/src/etc/inc/xmlrpc_server.inc
@@ -246,7 +246,7 @@ function XML_RPC_Server_debugmsg($m)
* ),
* 1,
* 0
- * );
+ * );
* </code>
*
* @category Web Services
@@ -562,8 +562,8 @@ class XML_RPC_Server
$XML_RPC_xh[$parser]['isf'] = 0;
$XML_RPC_xh[$parser]['params'] = array();
$XML_RPC_xh[$parser]['method'] = '';
- $XML_RPC_xh[$parser]['stack'] = array();
- $XML_RPC_xh[$parser]['valuestack'] = array();
+ $XML_RPC_xh[$parser]['stack'] = array();
+ $XML_RPC_xh[$parser]['valuestack'] = array();
$plist = '';
diff --git a/src/etc/inc/zeromq.inc b/src/etc/inc/zeromq.inc
deleted file mode 100644
index 6b513d3..0000000
--- a/src/etc/inc/zeromq.inc
+++ /dev/null
@@ -1,340 +0,0 @@
-<?php
-/*
- zeromq.inc
- part of the pfSense project (https://www.pfsense.org)
- Copyright 2010 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-define('ZEROMQ_AUTH_FAIL', 'authfail');
-define('ZEROMQ_TRUE', 'true');
-define('ZEROMQ_FASLE', 'false');
-
-$do_not_include_config_gui_inc = true;
-require_once("auth.inc");
-
-//$debug = true;
-
-/* zeromq_send: Send a message to a member node */
-function zeromq_send($protocol = "tcp", $ipaddress = "127.0.0.1", $port = "8888",
- $method, $params, $username, $password) {
-
- global $debug;
-
- /* Set calling function and auth information */
- $xmlparams = array(
- $username,
- $password,
- $method,
- $params
- );
-
- /* Create new queue object */
- $queue = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REQ, "MySock1");
- $queue->connect("{$protocol}://{$ipaddress}:{$port}");
-
- /* Assign socket 1 to the queue, send and receive */
- $result = $queue->send(serialize($xmlparams))->recv();
-
- /* xmlrpc_params_to_php() the result and return */
- $unserializedresult = unserialize($result);
-
- /* Return the result to the caller */
- return $unserializedresult;
-}
-
-function zeromq_server($protocol = "tcp", $ipaddress = "127.0.0.1", $port = "8888") {
- global $debug;
- if (!$ipaddress || !$port) {
- if ($debug) {
- echo "ERROR: You must pass, proto, ipaddress and port\n";
- }
- return;
- }
- if ($debug) {
- echo "Creating ZMQSocket()\n";
- }
- $server = new ZMQSocket(new ZMQContext(), ZMQ::SOCKET_REP);
- if ($debug) {
- echo "Binding to {$protocol}://{$ipaddress}:{$port}\n";
- }
- $server->bind("{$protocol}://{$ipaddress}:{$port}");
- if ($debug) {
- echo "Entering while() loop\n";
- }
- while ($msg = $server->recv()) {
- // Convert the XML to a PHP array
- $message = unserialize($msg);
- if ($debug) {
- echo "Message received:\n";
- print_r($message);
- }
- switch ($message[2]) {
- case "pfsense.exec_shell":
- $function_to_call = "exec_shell_zeromq";
- break;
- case "pfsense.exec_php":
- $function_to_call = "exec_php_zeromq";
- break;
- case "pfsense.filter_configure":
- $function_to_call = "filter_configure_zeromq";
- break;
- case "pfsense.interfaces_carp_configure":
- $function_to_call = "interfaces_carp_configure_zeromq";
- break;
- case "pfsense.backup_config_section":
- $function_to_call = "backup_config_section_zeromq";
- break;
- case "pfsense.restore_config_section":
- $function_to_call = "restore_config_section_zeromq";
- break;
- case "pfsense.merge_config_section":
- $function_to_call = "merge_config_section_zeromq";
- break;
- case "pfsense.merge_installedpackages_section_zeromq":
- $function_to_call = "merge_installedpackages_section_zeromq";
- break;
- case "pfsense.check_firmware_version":
- $function_to_call = "check_firmware_version_zeromq";
- break;
- case "pfsense.reboot":
- $function_to_call = "reboot_zeromq";
- break;
- case "pfsense.get_notices":
- $function_to_call = "get_notices_zeromq";
- break;
- }
- if (!$function_to_call) {
- if ($debug) {
- echo "ERROR: Could not find a function to call";
- }
- return;
- } else {
- if ($debug) {
- echo "Invoking function {$message[2]}()\n;";
- }
- }
- /* Call function that is being invoked */
- $result = $function_to_call($message);
- /* echo back the result */
- $server->send($result);
- }
-}
-
-function zeromq_auth($params) {
- global $config, $g, $debug;
-
- $username = $params[0];
- $passwd = $params[1];
-
- $user = getUserEntry($username);
- if (!$user) {
- if ($debug) {
- echo "Could not locate user $username with getUserEntry()\n";
- }
- return false;
- }
-
- if (is_account_disabled($username) || is_account_expired($username)) {
- if ($debug) {
- echo "Returning account expired/disabled\n";
- }
- return false;
- }
-
- if ($user['password']) {
- $passwd = crypt($passwd, $user['password']);
- if ($passwd == $user['password']) {
- return true;
- }
- }
-
- if ($user['md5-hash']) {
- $passwd = md5($passwd);
- if ($passwd == $user['md5-hash']) {
- return true;
- }
- }
-
- if ($debug) {
- echo "zeromq_auth() fall through == false\n";
- }
-
- return false;
-}
-
-function exec_php_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- if ($debug) {
- echo "Auth failed in exec_shell_zeromq()\n";
- }
- return ZEROMQ_AUTH_FAIL;
- }
- $exec_php = $params[3];
- if ($debug) {
- echo "Running exec_php_zeromq(): {$exec_php}\n";
- }
- eval($exec_php);
- if ($toreturn) {
- return serialize($toreturn);
- } else {
- return ZEROMQ_FASLE;
- }
-}
-
-function exec_shell_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- if ($debug) {
- echo "Auth failed in exec_shell_zeromq()\n";
- }
- return ZEROMQ_AUTH_FAIL;
- }
- $shell_cmd = $params[3];
- if ($debug) {
- echo "Running exec_shell_zeromq(): {$shell_cmd}\n";
- }
- mwexec($shell_cmd);
- return ZEROMQ_FASLE;
-}
-
-function backup_config_section_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- $val = array_intersect_key($config, array_flip($params[3]));
- return serialize($val);
-}
-
-function restore_config_section_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- $config = array_merge($config, $params[3]);
- $mergedkeys = implode(",", array_keys($params[3]));
- write_config(sprintf(gettext("Merged in config (%s sections) from ZeroMQ client."), $mergedkeys));
- return ZEROMQ_FASLE;
-}
-
-function merge_installedpackages_section_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- $config['installedpackages'] = array_merge($config['installedpackages'], $params[0]);
- $mergedkeys = implode(",", array_keys($params[3]));
- write_config(sprintf(gettext("Merged in config (%s sections) from ZeroMQ client."), $mergedkeys));
- return ZEROMQ_FASLE;
-}
-
-function merge_config_section_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- $config = array_merge_recursive_unique($config, $params[0]);
- $mergedkeys = implode(",", array_keys($params[3]));
- write_config("Merged in config ({$mergedkeys} sections) from ZeroMQ client.");
- return ZEROMQ_FASLE;
-}
-
-function filter_configure_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- filter_configure();
- system_routing_configure();
- setup_gateways_monitor();
- relayd_configure();
- require_once("openvpn.inc");
- openvpn_resync_all();
- services_dhcpd_configure();
- if (isset($config['dnsmasq']['enable'])) {
- services_dnsmasq_configure();
- } elseif (isset($config['unbound']['enable'])) {
- services_unbound_configure();
- }
- local_sync_accounts();
- return ZEROMQ_FASLE;
-}
-
-function interfaces_carp_configure_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- interfaces_sync_setup();
- interfaces_vips_configure();
- return ZEROMQ_FASLE;
-}
-
-function check_firmware_version_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- return serialize(check_firmware_version(false));
-}
-
-function reboot_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- mwexec_bg("/etc/rc.reboot");
- return ZEROMQ_FASLE;
-}
-
-function get_notices_zeromq($raw_params) {
- global $config, $g, $debug;
- $params = $raw_params;
- if (zeromq_auth($raw_params) == false) {
- return ZEROMQ_AUTH_FAIL;
- }
- if (!function_exists("get_notices")) {
- require("notices.inc");
- }
- if (!$params) {
- $toreturn = get_notices();
- } else {
- $toreturn = get_notices($params);
- }
- return serialize($toreturn);
-}
-
-?>
diff --git a/src/etc/login.conf b/src/etc/login.conf
index 1e61a9f..98324e2 100644
--- a/src/etc/login.conf
+++ b/src/etc/login.conf
@@ -35,7 +35,7 @@ default:\
:maxproc=unlimited:\
:sbsize=unlimited:\
:vmemoryuse=unlimited:\
- :idletime=unlimited:\
+ :idletime=unlimited:\
:priority=0:\
:ignoretime@:\
:umask=022:
@@ -81,7 +81,7 @@ russian|Russian Users Accounts:\
######################################################################
##
## Example entries
-##
+##
######################################################################
######################################################################
diff --git a/src/etc/pfSense.obsoletedfiles b/src/etc/pfSense.obsoletedfiles
index 647866f..5b5b7d0 100644
--- a/src/etc/pfSense.obsoletedfiles
+++ b/src/etc/pfSense.obsoletedfiles
@@ -8,16 +8,20 @@
/etc/auth.conf
/etc/current-supfile
/etc/defaults/pccard.conf
+/etc/fbtab
/etc/freebsd-update.conf
/etc/gnats
/etc/hostid
/etc/hosts.lpd
/etc/inc/array_intersect_key.inc
/etc/inc/cmd_chain.inc
+/etc/inc/dot.hushlogin
/etc/inc/lb.inc
/etc/inc/m0n0
/etc/inc/regdomain.inc
/etc/inc/sysctl.inc
+/etc/inc/uuid.php
+/etc/inc/zeromq.inc
/etc/isdn
/etc/locate.rc
/etc/mail.rc
@@ -54,6 +58,7 @@
/etc/phpshellsessions/restartftphelper
/etc/ping_hosts.sh
/etc/portsnap.conf
+/etc/rc.create_full_backup
/etc/rc.d/amd
/etc/rc.d/auto_linklocal
/etc/rc.d/bluetooth
@@ -87,7 +92,9 @@
/etc/rc.d/uzip
/etc/rc.dyndns.storecache
/etc/rc.firewall6
-/etc/rc.initial_firmware_update
+/etc/rc.firmware
+/etc/rc.firmware_auto
+/etc/rc.initial.firmware_update
/etc/rc.linkup.sh
/etc/rc.parse-isc-dhcpd
/etc/rc.sendmail
@@ -214,6 +221,7 @@
/usr/bin/ntpq
/usr/bin/objcopy
/usr/bin/objdump
+/usr/bin/pbisyscmd
/usr/bin/pfbtops
/usr/bin/pic
/usr/bin/post-grohtml
@@ -436,7 +444,6 @@
/usr/local/bin/tickadj
/usr/local/bin/verifysig
/usr/local/etc/pkg.conf
-/usr/local/include
/usr/local/info
/usr/local/lib/engines
/usr/local/lib/engines/lib4758cca.so
@@ -454,6 +461,12 @@
/usr/local/lib/event2
/usr/local/lib/event2/libevent_core-2.0.so.6
/usr/local/lib/event2/libevent_pthreads-2.0.so.6
+/usr/local/lib/ipsec/plugins/libstrongswan-eap-aka-3gpp2.so
+/usr/local/lib/ipsec/plugins/libstrongswan-eap-aka.so
+/usr/local/lib/ipsec/plugins/libstrongswan-gmp.so
+/usr/local/lib/ipsec/plugins/libstrongswan-smp.so
+/usr/local/lib/ipsec/plugins/libstrongswan-smp.a
+/usr/local/lib/ipsec/plugins/libstrongswan-smp.la
/usr/local/lib/libcrypto.a
/usr/local/lib/libcrypto.so
/usr/local/lib/libcrypto.so.8
@@ -466,13 +479,8 @@
/usr/local/lib/libevent-1.2.so
/usr/local/lib/libevent-1.3e.so.1
/usr/local/lib/libevent-1.4.so.4
-/usr/local/lib/libevtlog.so.0
/usr/local/lib/libfreetype.so.9
-/usr/local/lib/libglib-2.0.so.0
-/usr/local/lib/libgmodule-2.0.so.0
-/usr/local/lib/libgthread-2.0.so.0
/usr/local/lib/libhistory.so.5
-/usr/local/lib/libiconv.so.3
/usr/local/lib/libidn.so.17
/usr/local/lib/libipsec.so
/usr/local/lib/libipsec.so.0
@@ -568,7 +576,6 @@
/usr/local/lib/lighttpd/mod_webdav.a
/usr/local/lib/lighttpd/mod_webdav.la
/usr/local/lib/mysql/libmysqlclient.so.15
-/usr/local/lib/mysql/libmysqlclient.so.18
/usr/local/lib/olsrd_dot_draw.so.0.3
/usr/local/lib/olsrd_dyn_gw.so.0.4
/usr/local/lib/olsrd_dyn_gw_plain.so.0.4
@@ -580,6 +587,7 @@
/usr/local/lib/olsrd_power.so.0.3
/usr/local/lib/olsrd_secure.so.0.5
/usr/local/lib/olsrd_txtinfo.so.0.1
+/usr/local/lib/php.ini
/usr/local/lib/php/20060613
/usr/local/lib/php/20090626
/usr/local/lib/php/20121212
@@ -611,8 +619,6 @@
/usr/local/pkg/openvpn_cli.xml
/usr/local/pkg/openvpn_csc.xml
/usr/local/pkg/routed
-/usr/local/pkg/routed.inc
-/usr/local/pkg/routed.xml
/usr/local/pkg/routed/routed.inc
/usr/local/pkg/routed/routed.xml
/usr/local/pkg/sasyncd.xml
@@ -623,18 +629,39 @@
/usr/local/sbin/dnsextd
/usr/local/sbin/dnswatch
/usr/local/sbin/env4801
-/usr/local/sbin/fping
/usr/local/sbin/ftpsesame
/usr/local/sbin/grub-install1
/usr/local/sbin/ipfw_context
+/usr/local/sbin/ipfw-classifyd
/usr/local/sbin/kbdcheck
/usr/local/sbin/mdnsd
/usr/local/sbin/mini_httpd
/usr/local/sbin/mpd
/usr/local/sbin/olsrd
+/usr/local/sbin/pbi
+/usr/local/sbin/pbi-crashhandler
+/usr/local/sbin/pbi_add
+/usr/local/sbin/pbi_addrepo
+/usr/local/sbin/pbi_autobuild
+/usr/local/sbin/pbi_browser
+/usr/local/sbin/pbi_create
+/usr/local/sbin/pbi_delete
+/usr/local/sbin/pbi_deleterepo
+/usr/local/sbin/pbi_icon
+/usr/local/sbin/pbi_indextool
+/usr/local/sbin/pbi_info
+/usr/local/sbin/pbi_listrepo
+/usr/local/sbin/pbi_makepatch
+/usr/local/sbin/pbi_makeport
/usr/local/sbin/pbi_makeport_chroot
+/usr/local/sbin/pbi_makerepo
+/usr/local/sbin/pbi_metatool
+/usr/local/sbin/pbi_patch
/usr/local/sbin/pbi_pbid
+/usr/local/sbin/pbi_update
+/usr/local/sbin/pbi_update_hashdir
/usr/local/sbin/pfsense-upgrade.sh
+/usr/local/sbin/pfSense-upgrade-GUI.sh
/usr/local/sbin/pftpx
/usr/local/sbin/racoon
/usr/local/sbin/racoon_watch.sh
@@ -644,7 +671,6 @@
/usr/local/sbin/setkey
/usr/local/sbin/slbd
/usr/local/sbin/slbd.sh
-/usr/local/sbin/syslog-ng
/usr/local/share/aclocal
/usr/local/share/dict
/usr/local/share/doc
@@ -710,10 +736,14 @@
/usr/local/share/locale/zh_TW.Big5
/usr/local/share/misc
/usr/local/share/nls
+/usr/local/share/pbi-keys
+/usr/local/share/protocols
/usr/local/share/sgml
/usr/local/share/skel
+/usr/local/share/strongswan/templates/config/plugins/smp.conf
/usr/local/share/xml
/usr/local/www/auto_complete_helper.js
+/usr/local/www/carp_status.php
/usr/local/www/classes/maintable.inc
/usr/local/www/code-syntax-highlighter
/usr/local/www/csrf/csrf-secret.php
@@ -724,8 +754,16 @@
/usr/local/www/dfuife.css
/usr/local/www/dfuife.js
/usr/local/www/diag_dhcp_leases.php
+/usr/local/www/diag_ipsec.php
+/usr/local/www/diag_ipsec_leases.php
+/usr/local/www/diag_ipsec_sad.php
+/usr/local/www/diag_ipsec_spd.php
+/usr/local/www/diag_logs.php
/usr/local/www/diag_logs_auth.php
/usr/local/www/diag_logs_dhcp.php
+/usr/local/www/diag_logs_filter.php
+/usr/local/www/diag_logs_filter_dynamic.php
+/usr/local/www/diag_logs_filter_summary.php
/usr/local/www/diag_logs_gateways.php
/usr/local/www/diag_logs_ipsec.php
/usr/local/www/diag_logs_ntpd.php
@@ -734,9 +772,14 @@
/usr/local/www/diag_logs_relayd.php
/usr/local/www/diag_logs_resolver.php
/usr/local/www/diag_logs_routing.php
+/usr/local/www/diag_logs_settings.php
/usr/local/www/diag_logs_slbd.php
+/usr/local/www/diag_logs_vpn.php
/usr/local/www/diag_logs_wireless.php
+/usr/local/www/diag_patterns.php
+/usr/local/www/diag_pkglogs.php
/usr/local/www/diag_showbogons.php
+/usr/local/diag_system_pftop.php
/usr/local/www/dom-drag.js
/usr/local/www/draglist.js
/usr/local/www/dtree.js
@@ -748,11 +791,13 @@
/usr/local/www/firewall_nat_server_edit.php
/usr/local/www/firewall_rules_schedule_logic.php
/usr/local/www/firewall_shaper_edit.php
+/usr/local/www/firewall_shaper_layer7.php
/usr/local/www/firewall_shaper_queues_edit.php
/usr/local/www/fred-bg.png
/usr/local/www/fred.png
/usr/local/www/green_dot.jpg
/usr/local/www/gui.css
+/usr/local/www/halt.php
/usr/local/www/headjs.php
/usr/local/www/ifstats.cgi
/usr/local/www/includes/javascript.inc.php
@@ -781,12 +826,14 @@
/usr/local/www/niftycssprintCode.css
/usr/local/www/niftyjsCode.js
/usr/local/www/pool.js
+/usr/local/www/pkg_mgr_settings.php
/usr/local/www/preload.php
/usr/local/www/progress.php
/usr/local/www/protochart
/usr/local/www/protochart/ProtoChart.js
/usr/local/www/protochart/excanvas-compressed.js
/usr/local/www/protochart/excanvas.js
+/usr/local/www/reboot.php
/usr/local/www/row_helper.js
/usr/local/www/row_helper_dynamic.js
/usr/local/www/row_toggle.js
@@ -799,10 +846,16 @@
/usr/local/www/services_proxyarp_edit.php
/usr/local/www/services_usermanager.php
/usr/local/www/shortcuts/pkg_upnp.inc
+/usr/local/www/sortable/sortable.min.js
/usr/local/www/status_slbd_pool.php
/usr/local/www/status_slbd_vs.php
/usr/local/www/system_advanced.php
/usr/local/www/system_advanced_create_certs.php
+/usr/local/www/system_firmware.php
+/usr/local/www/system_firmware_auto.php
+/usr/local/www/system_firmware_check.php
+/usr/local/www/system_firmware_settings.php
+/usr/local/www/system_firmware_restorefullbackup.php
/usr/local/www/system_usermanager_addcert.php
/usr/local/www/themes
/usr/local/www/ticker.js
@@ -823,6 +876,8 @@
/usr/local/www/vpn_openvpn_crl_edit.php
/usr/local/www/vpn_openvpn_srv.php
/usr/local/www/vpn_openvpn_srv_edit.php
+/usr/local/www/vpn_pppoe.php
+/usr/local/www/vpn_pppoe_edit.php
/usr/local/www/vpn_pppoe_users.php
/usr/local/www/vpn_pppoe_users_edit.php
/usr/local/www/wizards/traffic_shaper_wizard.inc
@@ -830,6 +885,7 @@
/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.inc
/usr/local/www/wizards/traffic_shaper_wizard_multi_lan.xml
/usr/local/www/wlan_strong_key_generator
+/usr/pbi
/usr/sbin/arlcontrol
/usr/sbin/audit
/usr/sbin/auditd
@@ -960,6 +1016,7 @@
/usr/share/zoneinfo/GMT
/usr/share/zoneinfo.tgz
/var/db/dhclient.leases.sis1
+/var/db/pbi
/var/db/rrd/71
/var/db/rrd/index.html
/var/dhcpd/lib/libc.so.6
diff --git a/src/etc/phpshellsessions/gitsync b/src/etc/phpshellsessions/gitsync
index 25d1996..3aa072f 100644
--- a/src/etc/phpshellsessions/gitsync
+++ b/src/etc/phpshellsessions/gitsync
@@ -48,7 +48,7 @@ while (!empty($temp_args)) {
switch ($arg) {
case "--help":
echo "Usage: playback gitsync [options] [[repository] <branch>]\nOptions:\n";
- foreach($valid_args as $arg_name => $arg_desc) {
+ foreach ($valid_args as $arg_name => $arg_desc) {
echo $arg_name . "\n" . $arg_desc;
}
exit;
@@ -307,27 +307,24 @@ exec("cd $CODIR/pfSenseGITREPO/pfSenseGITREPO && {$GIT_BIN} rev-parse -q --verif
exec("mkdir -p /tmp/lighttpd/cache/compress/");
-// Nuke CVS and pfSense tarballs
-exec("cd ${CODIR}/pfSenseGITREPO/pfSenseGITREPO && find . -name CVS -exec rm -rf {} \; 2>/dev/null");
-exec("cd ${CODIR}/pfSenseGITREPO/pfSenseGITREPO && find . -name pfSense.tgz -exec rm {} \; 2>/dev/null");
-
// Remove files that we do not want to overwrite the system with
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/crontab 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/master.passwd 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/passwd 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/fstab 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/ttys 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/group 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/fstab 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/platform 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/boot/device.hints 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/boot/loader.conf 2>/dev/null");
-exec("rm ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/boot/loader.rc 2>/dev/null");
-exec("rm -rf ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/conf*");
-exec("rm -rf ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/cf 2>/dev/null");
-exec("rm -rf ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/root/.shrc");
-exec("rm -rf ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/root/.tcshrc");
-exec("rm -f ${CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/syslog.conf 2>/dev/null");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/crontab");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/master.passwd");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/passwd");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/fstab");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/ttys");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/group");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/fstab");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/platform");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/boot/device.hints");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/boot/loader.conf");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/boot/loader.rc");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/etc/syslog.conf");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/root/.shrc");
+@unlink("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/root/.tcshrc");
+exec("rm -rf {$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/conf*");
+exec("rm -rf {$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/cf 2>/dev/null");
+@chmod("{$CODIR}/pfSenseGITREPO/pfSenseGITREPO/src/tmp", 01777);
echo "===> Installing new files...\n";
@@ -384,7 +381,7 @@ function post_cvssync_commands() {
if (file_exists("/etc/rc.php_ini_setup")) {
echo "===> Running /etc/rc.php_ini_setup...";
- exec("/etc/rc.php_ini_setup");
+ exec("/etc/rc.php_ini_setup >/dev/null 2>&1");
echo "\n";
}
diff --git a/src/etc/phpshellsessions/installpkg b/src/etc/phpshellsessions/installpkg
index 1ac71bf..a0e74c6 100644
--- a/src/etc/phpshellsessions/installpkg
+++ b/src/etc/phpshellsessions/installpkg
@@ -10,27 +10,16 @@ if (is_array($command_split)) {
$args = array_slice($argv, 2);
}
-$pkg_name = $args[0];
+$pkg_name = $args[1];
-echo "Installing package \"{$pkg_name}\"...\n";
+pkg_remove_prefix($pkg_name);
-echo "Trying to fetch package info...";
-$pkg_info = get_pkg_info();
-if ($pkg_info) {
- echo " Done.\n";
-} else {
- echo "\n" . gettext(' >>> Unable to get pkg info.') . "\n";
- return;
-}
-
-$static_output = "";
-$pkg_interface = "console";
+echo "Installing package \"{$pkg_name}\"... ";
-if (empty($pkg_info[$pkg_name])) {
- echo "\nPackage not found.\n";
- return;
+if (mwexec("/usr/local/sbin/{$g['product_name']}-upgrade -y -i {$g['pkg_prefix']}{$pkg_name}") == 0) {
+ echo "Done.\n";
+ return true;
+} else {
+ echo "Failed.\n";
+ return false;
}
-
-install_package($pkg_name);
-
-echo "\nDone.\n";
diff --git a/src/etc/phpshellsessions/uninstallpkg b/src/etc/phpshellsessions/uninstallpkg
index 9030e56..941a8af 100644
--- a/src/etc/phpshellsessions/uninstallpkg
+++ b/src/etc/phpshellsessions/uninstallpkg
@@ -10,25 +10,15 @@ if (is_array($command_split)) {
$args = array_slice($argv, 2);
}
-$pkg_name = $args[0];
-$pkg_info = array();
+$pkg_name = $args[1];
+pkg_remove_prefix($pkg_name);
-echo "Removing package \"{$pkg_name}\"...\n";
+echo "Removing package \"{$pkg_name}\"... ";
-foreach ($config['installedpackages']['package'] as $package) {
- if ($pkg_name == $package['name']) {
- $pkg_info = $package;
- }
-}
-
-$static_output = "";
-$pkg_interface = "console";
-
-if (empty($pkg_info)) {
- echo "\nPackage not installed.\n";
- return;
+if (mwexec("/usr/local/sbin/{$g['product_name']}-upgrade -y -r {$g['pkg_prefix']}{$pkg_name}") == 0) {
+ echo "Done.\n";
+ return true;
+} else {
+ echo "Failed.\n";
+ return false;
}
-
-uninstall_package($pkg_name);
-
-echo "\nDone.\n";
diff --git a/src/etc/printcap b/src/etc/printcap
deleted file mode 100644
index e69de29..0000000
--- a/src/etc/printcap
+++ /dev/null
diff --git a/src/etc/protocols b/src/etc/protocols
deleted file mode 100644
index 763cbcd..0000000
--- a/src/etc/protocols
+++ /dev/null
@@ -1,158 +0,0 @@
-#
-# Internet protocols
-#
-# $FreeBSD: stable/10/etc/protocols 250453 2013-05-10 13:57:44Z eadler $
-# from: @(#)protocols 5.1 (Berkeley) 4/17/89
-#
-# See also http://www.iana.org/assignments/protocol-numbers
-#
-ip 0 IP # internet protocol, pseudo protocol number
-#hopopt 0 HOPOPT # hop-by-hop options for ipv6
-icmp 1 ICMP # internet control message protocol
-igmp 2 IGMP # internet group management protocol
-ggp 3 GGP # gateway-gateway protocol
-ipencap 4 IP-ENCAP # IP encapsulated in IP (officially ``IP'')
-st2 5 ST2 # ST2 datagram mode (RFC 1819) (officially ``ST'')
-tcp 6 TCP # transmission control protocol
-cbt 7 CBT # CBT, Tony Ballardie <A.Ballardie@cs.ucl.ac.uk>
-egp 8 EGP # exterior gateway protocol
-igp 9 IGP # any private interior gateway (Cisco: for IGRP)
-bbn-rcc 10 BBN-RCC-MON # BBN RCC Monitoring
-nvp 11 NVP-II # Network Voice Protocol
-pup 12 PUP # PARC universal packet protocol
-argus 13 ARGUS # ARGUS
-emcon 14 EMCON # EMCON
-xnet 15 XNET # Cross Net Debugger
-chaos 16 CHAOS # Chaos
-udp 17 UDP # user datagram protocol
-mux 18 MUX # Multiplexing protocol
-dcn 19 DCN-MEAS # DCN Measurement Subsystems
-hmp 20 HMP # host monitoring protocol
-prm 21 PRM # packet radio measurement protocol
-xns-idp 22 XNS-IDP # Xerox NS IDP
-trunk-1 23 TRUNK-1 # Trunk-1
-trunk-2 24 TRUNK-2 # Trunk-2
-leaf-1 25 LEAF-1 # Leaf-1
-leaf-2 26 LEAF-2 # Leaf-2
-rdp 27 RDP # "reliable datagram" protocol
-irtp 28 IRTP # Internet Reliable Transaction Protocol
-iso-tp4 29 ISO-TP4 # ISO Transport Protocol Class 4
-netblt 30 NETBLT # Bulk Data Transfer Protocol
-mfe-nsp 31 MFE-NSP # MFE Network Services Protocol
-merit-inp 32 MERIT-INP # MERIT Internodal Protocol
-dccp 33 DCCP # Datagram Congestion Control Protocol
-3pc 34 3PC # Third Party Connect Protocol
-idpr 35 IDPR # Inter-Domain Policy Routing Protocol
-xtp 36 XTP # Xpress Tranfer Protocol
-ddp 37 DDP # Datagram Delivery Protocol
-idpr-cmtp 38 IDPR-CMTP # IDPR Control Message Transport Proto
-tp++ 39 TP++ # TP++ Transport Protocol
-il 40 IL # IL Transport Protocol
-ipv6 41 IPV6 # ipv6
-sdrp 42 SDRP # Source Demand Routing Protocol
-ipv6-route 43 IPV6-ROUTE # routing header for ipv6
-ipv6-frag 44 IPV6-FRAG # fragment header for ipv6
-idrp 45 IDRP # Inter-Domain Routing Protocol
-rsvp 46 RSVP # Resource ReSerVation Protocol
-gre 47 GRE # Generic Routing Encapsulation
-dsr 48 DSR # Dynamic Source Routing Protocol
-bna 49 BNA # BNA
-esp 50 ESP # encapsulating security payload
-ah 51 AH # authentication header
-i-nlsp 52 I-NLSP # Integrated Net Layer Security TUBA
-swipe 53 SWIPE # IP with Encryption
-narp 54 NARP # NBMA Address Resolution Protocol
-mobile 55 MOBILE # IP Mobility
-tlsp 56 TLSP # Transport Layer Security Protocol
-skip 57 SKIP # SKIP
-ipv6-icmp 58 IPV6-ICMP icmp6 # ICMP for IPv6
-ipv6-nonxt 59 IPV6-NONXT # no next header for ipv6
-ipv6-opts 60 IPV6-OPTS # destination options for ipv6
-# 61 # any host internal protocol
-cftp 62 CFTP # CFTP
-# 63 # any local network
-sat-expak 64 SAT-EXPAK # SATNET and Backroom EXPAK
-kryptolan 65 KRYPTOLAN # Kryptolan
-rvd 66 RVD # MIT Remote Virtual Disk Protocol
-ippc 67 IPPC # Internet Pluribus Packet Core
-# 68 # any distributed filesystem
-sat-mon 69 SAT-MON # SATNET Monitoring
-visa 70 VISA # VISA Protocol
-ipcv 71 IPCV # Internet Packet Core Utility
-cpnx 72 CPNX # Computer Protocol Network Executive
-cphb 73 CPHB # Computer Protocol Heart Beat
-wsn 74 WSN # Wang Span Network
-pvp 75 PVP # Packet Video Protocol
-br-sat-mon 76 BR-SAT-MON # Backroom SATNET Monitoring
-sun-nd 77 SUN-ND # SUN ND PROTOCOL-Temporary
-wb-mon 78 WB-MON # WIDEBAND Monitoring
-wb-expak 79 WB-EXPAK # WIDEBAND EXPAK
-iso-ip 80 ISO-IP # ISO Internet Protocol
-vmtp 81 VMTP # Versatile Message Transport
-secure-vmtp 82 SECURE-VMTP # SECURE-VMTP
-vines 83 VINES # VINES
-ttp 84 TTP # TTP
-#iptm 84 IPTM # Protocol Internet Protocol Traffic
-nsfnet-igp 85 NSFNET-IGP # NSFNET-IGP
-dgp 86 DGP # Dissimilar Gateway Protocol
-tcf 87 TCF # TCF
-eigrp 88 EIGRP # Enhanced Interior Routing Protocol (Cisco)
-ospf 89 OSPFIGP # Open Shortest Path First IGP
-sprite-rpc 90 Sprite-RPC # Sprite RPC Protocol
-larp 91 LARP # Locus Address Resolution Protocol
-mtp 92 MTP # Multicast Transport Protocol
-ax.25 93 AX.25 # AX.25 Frames
-ipip 94 IPIP # Yet Another IP encapsulation
-micp 95 MICP # Mobile Internetworking Control Pro.
-scc-sp 96 SCC-SP # Semaphore Communications Sec. Pro.
-etherip 97 ETHERIP # Ethernet-within-IP Encapsulation
-encap 98 ENCAP # Yet Another IP encapsulation
-# 99 # any private encryption scheme
-gmtp 100 GMTP # GMTP
-ifmp 101 IFMP # Ipsilon Flow Management Protocol
-pnni 102 PNNI # PNNI over IP
-pim 103 PIM # Protocol Independent Multicast
-aris 104 ARIS # ARIS
-scps 105 SCPS # SCPS
-qnx 106 QNX # QNX
-a/n 107 A/N # Active Networks
-ipcomp 108 IPComp # IP Payload Compression Protocol
-snp 109 SNP # Sitara Networks Protocol
-compaq-peer 110 Compaq-Peer # Compaq Peer Protocol
-ipx-in-ip 111 IPX-in-IP # IPX in IP
-carp 112 CARP vrrp # Common Address Redundancy Protocol
-pgm 113 PGM # PGM Reliable Transport Protocol
-# 114 # any 0-hop protocol
-l2tp 115 L2TP # Layer Two Tunneling Protocol
-ddx 116 DDX # D-II Data Exchange
-iatp 117 IATP # Interactive Agent Transfer Protocol
-stp 118 STP # Schedule Transfer Protocol
-srp 119 SRP # SpectraLink Radio Protocol
-uti 120 UTI # UTI
-smp 121 SMP # Simple Message Protocol
-sm 122 SM # SM
-ptp 123 PTP # Performance Transparency Protocol
-isis 124 ISIS # ISIS over IPv4
-fire 125 FIRE
-crtp 126 CRTP # Combat Radio Transport Protocol
-crudp 127 CRUDP # Combat Radio User Datagram
-sscopmce 128 SSCOPMCE
-iplt 129 IPLT
-sps 130 SPS # Secure Packet Shield
-pipe 131 PIPE # Private IP Encapsulation within IP
-sctp 132 SCTP # Stream Control Transmission Protocol
-fc 133 FC # Fibre Channel
-rsvp-e2e-ignore 134 RSVP-E2E-IGNORE # Aggregation of RSVP for IP reservations
-mobility-header 135 Mobility-Header # Mobility Support in IPv6
-udplite 136 UDPLite # The UDP-Lite Protocol
-mpls-in-ip 137 MPLS-IN-IP # Encapsulating MPLS in IP
-manet 138 MANET # MANET Protocols (RFC5498)
-hip 139 HIP # Host Identity Protocol (RFC5201)
-shim6 140 SHIM6 # Shim6 Protocol (RFC5533)
-wesp 141 WESP # Wrapped Encapsulating Security Payload (RFC5840)
-rohc 142 ROHC # Robust Header Compression (RFC5858)
-# 138-254 # Unassigned
-pfsync 240 PFSYNC # PF Synchronization
-# 253-254 # Use for experimentation and testing (RFC3692)
-# 255 # Reserved
-divert 258 DIVERT # Divert pseudo-protocol [non IANA]
diff --git a/src/etc/pubkey.pem b/src/etc/pubkey.pem
deleted file mode 100644
index 7dd575d..0000000
--- a/src/etc/pubkey.pem
+++ /dev/null
@@ -1 +0,0 @@
-ssh-dss AAAAB3NzaC1kc3MAAACBAN08c22jym3KCRUF8/rKNXgU/J0vv6UC9eCta/ATTNgeW/z2rp/HsjcPkMLx9dLaqufShC0VzsUbGlqCsdQT8jfwBiLG2pjUkX20qTStRG/rs9Tv0rS/8eVNT/DbQ6zL3PTdp+XAIq+KQLucqcBazTqSzyF7ghZ7OVmsX1/ixTP3AAAAFQCYcP378X/dQ08l6u8O5uvEtxbvEwAAAIEAyOOuWttXGrprzBhKrjhop58bZTOZp0J0IMHMwi/J+K3HUuPZnaltGoW21MjqSvVor4m22r/3b8aUIom+jp4I/bmpxTOUgO6owTlCVX614fGPWcCw2M017aghQ/vUa/92DaMLO//FYD8X2b7WgyPNrJh9ckZ14oncBleJUfXmue8AAACBAKw00/IkoMJzTumFfT9+Jb442O1KZvtGyj1YWpyYXf3xbQFGXND7m4rTIS2zPvTcOauCHbZwZ9uBxE4zTdlGJ4XirPEbWwOl1TU71bZ3OqonVesyqSC04LLiuLGlIHyXxyc/UCzg1UL8mCBlLzqmPUkJoL0ZINo8Raqip8WM63KM root@freebsd-nexus-computers.pfsense.org
diff --git a/src/etc/rc b/src/etc/rc
index b7cefb4..21d68be 100755
--- a/src/etc/rc
+++ b/src/etc/rc
@@ -45,7 +45,7 @@ if [ -e /root/force_fsck ]; then
/sbin/fsck -y -F -t ufs
fi
-if [ ! "${PLATFORM}" = "cdrom" ]; then
+if [ "${PLATFORM}" != "cdrom" ]; then
/sbin/fsck -p -F
FSCK_ACTION_NEEDED=0
case $? in
@@ -96,9 +96,35 @@ if [ ! "${PLATFORM}" = "cdrom" ]; then
fi
USE_MFS_TMPVAR=$(/usr/local/sbin/read_xml_tag.sh boolean system/use_mfs_tmpvar)
+ unset MOVE_PKG_DATA
+ if [ "$PLATFORM" = "${product}" ]; then
+ # If use MFS var is disabled, move files back to place
+ if [ "${USE_MFS_TMPVAR}" != "true" -a -f /root/var/db/pkg/local.sqlite ]; then
+ MOVE_PKG_DATA=1
+ rm -rf /var/db/pkg 2>/dev/null
+ rm -rf /var/cache/pkg 2>/dev/null
+ mv /root/var/db/pkg /var/db
+ mv /root/var/cache/pkg /var/cache
+ # If use MFS var is enabled, move files to a safe place
+ elif [ "${USE_MFS_TMPVAR}" = "true" -a -f /var/db/pkg/local.sqlite ]; then
+ MOVE_PKG_DATA=1
+ /bin/mkdir -p /root/var/db /root/var/cache
+ mv /var/db/pkg /root/var/db
+ mv /var/cache/pkg /root/var/cache
+ fi
+ elif [ "${PLATFORM}" = "nanobsd" ]; then
+ MOVE_PKG_DATA=1
+ fi
+
if [ "${PLATFORM}" = "nanobsd" ] || [ "${USE_MFS_TMPVAR}" = "true" ]; then
/etc/rc.embedded
fi
+
+ if [ -n "${MOVE_PKG_DATA}" -o "${USE_MFS_TMPVAR}" = "true" ]; then
+ /bin/mkdir -p /var/db /var/cache
+ ln -sf ../../root/var/db/pkg /var/db/pkg
+ ln -sf ../../root/var/cache/pkg /var/cache/pkg
+ fi
fi
/bin/rm -f /root/force_fsck
@@ -165,28 +191,9 @@ echo
/sbin/conscontrol mute off >/dev/null
if [ "$PLATFORM" = "${product}" ]; then
- # If use MFS var is disabled, move files back to place
- if [ "${USE_MFS_TMPVAR}" != "true" -a -d /root/var/db/pkg ]; then
- rm -rf /var/db/pkg 2>/dev/null
- rm -rf /var/cache/pkg 2>/dev/null
- mv /root/var/db/pkg /var/db
- mv /root/var/cache/pkg /var/cache
- # If use MFS var is enabled, move files to a safe place
- elif [ "${USE_MFS_TMPVAR}" = "true" -a ! -d /root/var/db/pkg ]; then
- /bin/mkdir -p /root/var/db /root/var/cache
- mv /var/db/pkg /root/var/db
- mv /var/cache/pkg /root/var/cache
- ln -sf ../../root/var/db/pkg /var/db/pkg
- ln -sf ../../root/var/cache/pkg /var/cache/pkg
- fi
-
SWAPDEVICE=`/bin/cat /etc/fstab | /usr/bin/grep swap | /usr/bin/cut -f1`
/sbin/swapon -a 2>/dev/null >/dev/null
/etc/rc.savecore
-elif [ "${PLATFORM}" = "nanobsd" ]; then
- /bin/mkdir -p /var/db /var/cache
- ln -sf ../../root/var/db/pkg /var/db/pkg
- ln -sf ../../root/var/cache/pkg /var/cache/pkg
fi
if [ "$PLATFORM" = "cdrom" ] ; then
@@ -217,6 +224,22 @@ fi
# Cleanup configuration files from previous instance
/bin/rm -rf /var/etc/*
+# Workaround for ipsec symlinks, otherwise it's going to break
+# strongswan pkg upgrade
+
+if [ -L /usr/local/etc/ipsec.d ]; then
+ rm -f /usr/local/etc/ipsec.d
+fi
+if [ -L /usr/local/etc/ipsec.conf ]; then
+ rm -f /usr/local/etc/ipsec.conf
+fi
+if [ -L /usr/local/etc/strongswan.d ]; then
+ rm -f /usr/local/etc/strongswan.d
+fi
+if [ -L /usr/local/etc/strongswan.conf ]; then
+ rm -f /usr/local/etc/strongswan.conf
+fi
+
echo -n "Creating symlinks..."
# Repair symlinks if they are broken
if [ -f /etc/newsyslog.conf ]; then
@@ -285,7 +308,6 @@ trap "echo 'Reboot interrupted'; exit 1" 3
echo -n "."
DISABLESYSLOGCLOG=$(/usr/local/sbin/read_xml_tag.sh boolean system/disablesyslogclog)
-ENABLEFIFOLOG=$(/usr/local/sbin/read_xml_tag.sh boolean system/usefifolog)
LOG_FILES="system filter dhcpd vpn pptps poes l2tps openvpn portalauth ipsec ppp relayd wireless lighttpd ntpd gateways resolver routing"
DEFAULT_LOG_FILE_SIZE=$(/usr/local/sbin/read_xml_tag.sh string syslog/logfilesize)
@@ -296,17 +318,12 @@ for logfile in $LOG_FILES; do
/usr/bin/touch /var/log/$logfile.log
else
if [ ! -f /var/log/$logfile.log ]; then
- if [ "$ENABLEFIFOLOG" = "true" ]; then
- # generate fifolog files
- /usr/sbin/fifolog_create -s ${DEFAULT_LOG_FILE_SIZE} /var/log/$logfile.log
- else
- /usr/local/sbin/clog -i -s ${DEFAULT_LOG_FILE_SIZE} /var/log/$logfile.log
- fi
+ /usr/local/sbin/clog -i -s ${DEFAULT_LOG_FILE_SIZE} /var/log/$logfile.log
fi
fi
done
-# change permissions on newly created fifolog files.
+# change permissions on newly created log files.
/bin/chmod 0600 /var/log/*.log
echo -n "."
@@ -345,9 +362,9 @@ echo "done."
/usr/local/sbin/${product}-upgrade -y -b 2
# Run the php.ini setup file and populate
-# /usr/local/etc/php.ini and /usr/local/lib/php.ini
+# /usr/local/etc/php.ini
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
-/usr/local/sbin/php-fpm -c /usr/local/lib/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
+/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
# Launch external configuration loader for supported platforms
if [ "$PLATFORM" = "nanobsd" ]; then
diff --git a/src/etc/rc.banner b/src/etc/rc.banner
index 5e64dae..8974a05 100755
--- a/src/etc/rc.banner
+++ b/src/etc/rc.banner
@@ -1,8 +1,6 @@
#!/usr/local/bin/php-cgi -f
<?php
/*
- $Id$
-
rc.banner
part of pfSense
Copyright (C) 2005 Scott Ullrich and Colin Smith
diff --git a/src/etc/rc.bootup b/src/etc/rc.bootup
index e4a83f1..b7c3afb 100755
--- a/src/etc/rc.bootup
+++ b/src/etc/rc.bootup
@@ -132,6 +132,18 @@ if (file_exists("/root/firmware.tgz")) {
unlink("/root/firmware.tgz");
}
+/* Reinstall of packages after reboot has been requested */
+if (file_exists('/conf/needs_package_sync_after_reboot')) {
+ touch('/conf/needs_package_sync');
+ @unlink('/conf/needs_package_sync_after_reboot');
+}
+
+/* Triggering of the initial setup wizard after reboot has been requested */
+if (file_exists('/conf/trigger_initial_wizard_after_reboot')) {
+ touch('/conf/trigger_initial_wizard');
+ @unlink('/conf/trigger_initial_wizard_after_reboot');
+}
+
/* start devd (dhclient now uses it) */
echo "Starting device manager (devd)...";
mute_kernel_msgs();
@@ -152,6 +164,10 @@ echo "done.\n";
/* run any early shell commands specified in config.xml */
system_do_shell_commands(1);
+if (file_exists("/conf/trigger_initial_wizard")) {
+ check_for_alternate_interfaces();
+}
+
/*
* Determine if we need to throw a interface exception
* and ask the user to reassign interfaces. This will
@@ -393,16 +409,14 @@ if (file_exists("/sbin/shutdown.old")) {
}
/* Resync / Reinstall packages if need be */
-if (file_exists('/conf/needs_package_sync')) {
- if ($config['installedpackages'] <> '' && is_array($config['installedpackages']['package'])) {
- require_once("pkg-utils.inc");
- if ($g['platform'] == $g['product_name'] || $g['platform'] == "nanobsd") {
- mark_subsystem_dirty('packagelock');
- pkg_reinstall_all();
- clear_subsystem_dirty('packagelock');
- }
+if (file_exists('/conf/needs_package_sync') &&
+ ($g['platform'] == $g['product_name'] || $g['platform'] == "nanobsd")) {
+ require_once("pkg-utils.inc");
+ mark_subsystem_dirty('packagelock');
+ if (package_reinstall_all()) {
+ @unlink('/conf/needs_package_sync');
}
- @unlink('/conf/needs_package_sync');
+ clear_subsystem_dirty('packagelock');
}
/* Give syslogd a kick after everything else has been initialized, otherwise it can occasionally
diff --git a/src/etc/rc.captiveportal_configure b/src/etc/rc.captiveportal_configure
index 45c26bf..586583d 100755
--- a/src/etc/rc.captiveportal_configure
+++ b/src/etc/rc.captiveportal_configure
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.captiveportal_configure
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.carpbackup b/src/etc/rc.carpbackup
index bf27a17..e74ea3c 100755
--- a/src/etc/rc.carpbackup
+++ b/src/etc/rc.carpbackup
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.carpbackup
part of pfSense (https://www.pfsense.org)
@@ -51,10 +50,10 @@ $friendly_descr = convert_friendly_interface_to_friendly_descr($friendly);
$vips = link_interface_to_vips($friendly, '', $vhid);
$carp_iface = "{$friendly}_vip{$vhid}";
-if(is_array($vips)) {
+if (is_array($vips)) {
foreach ($vips as $vip) {
$notificationmsg = sprintf('Carp cluster member "(%1$s): (%2$s)" has resumed the state "BACKUP" for vhid %3$s', $argument, $friendly_descr, $vhid);
-
+
notify_via_smtp($notificationmsg);
notify_via_growl($notificationmsg);
log_error($notificationmsg);
diff --git a/src/etc/rc.carpmaster b/src/etc/rc.carpmaster
index 8413b04..79e8262 100755
--- a/src/etc/rc.carpmaster
+++ b/src/etc/rc.carpmaster
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.carpmaster
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.conf_mount_ro b/src/etc/rc.conf_mount_ro
index 6beb5e8..7e34f3d 100755
--- a/src/etc/rc.conf_mount_ro
+++ b/src/etc/rc.conf_mount_ro
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.conf_mount_ro
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.conf_mount_rw b/src/etc/rc.conf_mount_rw
index b153e36..f9ac2b9 100755
--- a/src/etc/rc.conf_mount_rw
+++ b/src/etc/rc.conf_mount_rw
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.conf_mount_rw
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.create_full_backup b/src/etc/rc.create_full_backup
deleted file mode 100755
index 048e68b..0000000
--- a/src/etc/rc.create_full_backup
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-FILENAME="pfSense-full-backup-`date "+%Y%m%d-%H%M"`.tgz"
-echo ">>> Creating full backup to /root/$FILENAME"
-tar czPf /root/$FILENAME \
- --exclude dev/* \
- --exclude tmp/* \
- --exclude var/db \
- --exclude var/run/* \
- --exclude root/* \
- --exclude var/empty/* \
- --exclude var/empty \
- --exclude var/etc \
- /
-
-echo ">>> Backup completed. Note: this backup includes config.xml!"
-echo ">>> To restore this backup run this command:"
-echo " /etc/rc.restore_full_backup /root/$FILENAME"
diff --git a/src/etc/rc.dhclient_cron b/src/etc/rc.dhclient_cron
index a38932d..06009b2 100755
--- a/src/etc/rc.dhclient_cron
+++ b/src/etc/rc.dhclient_cron
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.dhclient_cron
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.dyndns.update b/src/etc/rc.dyndns.update
index 543b5a0..f1f44a5 100755
--- a/src/etc/rc.dyndns.update
+++ b/src/etc/rc.dyndns.update
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.dyndns.update
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.expireaccounts b/src/etc/rc.expireaccounts
index 3befa17..8777eef 100755
--- a/src/etc/rc.expireaccounts
+++ b/src/etc/rc.expireaccounts
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.expireaccounts
part of pfSense
diff --git a/src/etc/rc.filter_configure b/src/etc/rc.filter_configure
index 2c996e9..2b159a9 100755
--- a/src/etc/rc.filter_configure
+++ b/src/etc/rc.filter_configure
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.filter_configure
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.filter_configure_sync b/src/etc/rc.filter_configure_sync
index 86ab309..7135bff 100755
--- a/src/etc/rc.filter_configure_sync
+++ b/src/etc/rc.filter_configure_sync
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.filter_configure_sync
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.filter_synchronize b/src/etc/rc.filter_synchronize
index b7148eb..4964f5c 100755
--- a/src/etc/rc.filter_synchronize
+++ b/src/etc/rc.filter_synchronize
@@ -359,9 +359,6 @@ if (is_array($config['hasync'])) {
if ($hasync['synchronizetrafficshaperlimiter'] != "" and is_array($config['dnshaper'])) {
$sections[] = 'dnshaper';
}
- if ($hasync['synchronizetrafficshaperlayer7'] != "" and is_array($config['l7shaper'])) {
- $sections[] = 'l7shaper';
- }
if ($hasync['synchronizestaticroutes'] != "") {
if (!is_array($config['staticroutes'])) {
$config['staticroutes'] = array();
diff --git a/src/etc/rc.firmware b/src/etc/rc.firmware
deleted file mode 100755
index e8d549f..0000000
--- a/src/etc/rc.firmware
+++ /dev/null
@@ -1,476 +0,0 @@
-#!/bin/sh
-
-# /etc/rc.firmware
-# originally part of m0n0wall (http://neon1.net/m0n0wall)
-# Copyright (C) 2005-2009 Scott Ullrich <sullrich@pfsense.org>.
-# Copyright (C) 2003 Manuel Kasper <mk@neon1.net>.
-# All rights reserved.
-
-# mount /cf
-/etc/rc.conf_mount_rw
-
-# Reset file(s)
-echo "" >/conf/upgrade_log.txt
-echo "" >/conf/firmware_update_misc_log.txt
-echo "" >/conf/fdisk_upgrade_log.txt
-
-exec 3>&2 2>>/conf/firmware_update_misc_log.txt
-
-export ACTION=$1
-export IMG=$2
-if [ $# -eq 3 ]; then
- export CUSTOMIMG=$3
-fi
-
-file_notice() {
- /usr/local/bin/php-cgi -q -d auto_prepend_file=config.inc <<ENDOFF
- <?php
- require_once("globals.inc");
- require_once("functions.inc");
- file_notice("$1", "$2", "$1", "");
- ?>
-ENDOFF
-}
-
-output_env_to_log() {
- date >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- ls -lah /dev/ >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- ls -lah $IMG >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- md5 $IMG >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- mount >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- top >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-}
-
-backup_chflags() {
- TOPROCESS="bin lib libexec sbin usr"
- for files in $TOPROCESS; do
- /usr/sbin/mtree -Pcp /${files} | bzip2 -9 > /tmp/chflags.dist.${files}.bz2 2>> /conf/upgrade_log.txt
- done
-}
-
-restore_chflags() {
- TOPROCESS="bin lib libexec sbin usr"
- for files in $TOPROCESS; do
- cd / && /usr/bin/bzcat /tmp/chflags.dist.${files}.bz2 | /usr/sbin/mtree -P -p /${files} >> /conf/upgrade_log.txt 2>&1
- done
-}
-
-remove_chflags() {
- TOPROCESS="bin lib libexec sbin usr"
- for files in $TOPROCESS; do
- /bin/chflags -R noschg /${files}
- /bin/chmod -R u+rw /${files}
- done
-}
-
-case $ACTION in
-enable)
- touch /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
- echo "Enable" >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
- /etc/rc.conf_mount_ro
- ;;
-auto)
- touch /var/run/firmwarelock.dirty
- backup_chflags
- remove_chflags
- /etc/rc.firmware_auto
- restore_chflags
- /etc/rc.conf_mount_ro
- ;;
-pfSenseNanoBSDupgrade)
-
- # Sanity check - bail early if there's no firmware file!
- if [ ! -r $IMG ]; then
- echo "2nd parameter has not been passed or file does not exist. Exiting." >> /conf/upgrade_log.txt 2>&1
- /etc/rc.conf_mount_ro
- exit 1
- fi
-
- # Prevent full upgrade file from being used to upgrade
- if [ `echo $IMG | grep "full"` ]; then
- echo "You cannot use a full file for upgrade. Please use a file labelled nanobsd upgrade."
- file_notice "NanoBSDUpgradeFailure" "You have attempted to use a full NanoBSD installation file as an upgrade. Please use a NanoBSD file labelled 'upgrade' instead."
- rm -f $IMG
- /etc/rc.conf_mount_ro
- exit 1
- fi
-
- touch /var/run/firmwarelock.dirty
-
- echo "NanoBSD Firmware upgrade in progress..." >> /conf/upgrade_log.txt 2>&1
- echo "NanoBSD Firmware upgrade in progress..." | wall
- /etc/rc.notify_message -e -g -m "NanoBSD Firmware upgrade in progress..."
-
- # backup config
- /bin/mkdir -p /tmp/configbak
- cp -Rp /conf/* /tmp/configbak 2>/dev/null
-
- # Remove logs from backup dir to avoid clobbering upon restore.
- rm /tmp/configbak/*_log.txt 2>/dev/null
-
- echo "" >> /conf/upgrade_log.txt
-
- echo "Installing ${IMG}." >> /conf/upgrade_log.txt 2>&1
- echo "Installing ${IMG}." | wall
-
- # resolve glabel label that we booted from
- BOOT_DEVICE=`/sbin/mount | /usr/bin/grep pfsense | /usr/bin/cut -d'/' -f4 | /usr/bin/cut -d' ' -f1`
- # resolve glabel to the real boot dev entry
- REAL_BOOT_DEVICE=`/sbin/glabel list | /usr/bin/grep -B2 ufs/${BOOT_DEVICE} | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' '`
- # grab the boot device, example ad1, ad0
- BOOT_DRIVE=`/sbin/glabel list | /usr/bin/grep -B2 ufs/pfsense | /usr/bin/head -n 1 | /usr/bin/cut -f3 -d' ' | /usr/bin/cut -d's' -f1`
- # test the slice. if we are on slice 1 we need to flash 2 and vice versa
- if [ `echo $REAL_BOOT_DEVICE | /usr/bin/grep "s1"` ]; then
- SLICE="2"
- OLDSLICE="1"
- TOFLASH="${BOOT_DRIVE}s${SLICE}"
- COMPLETE_PATH="${BOOT_DRIVE}s${SLICE}a"
- GLABEL_SLICE="pfsense1"
- UFS_ID="1"
- OLD_UFS_ID="0"
- else
- SLICE="1"
- OLDSLICE="2"
- TOFLASH="${BOOT_DRIVE}s${SLICE}"
- COMPLETE_PATH="${BOOT_DRIVE}s${SLICE}a"
- GLABEL_SLICE="pfsense0"
- UFS_ID="0"
- OLD_UFS_ID="1"
- fi
-
- # Output specific information that this script is using
- echo "SLICE ${SLICE}" >> /conf/upgrade_log.txt
- echo "OLDSLICE ${OLDSLICE}" >> /conf/upgrade_log.txt
- echo "TOFLASH ${TOFLASH}" >> /conf/upgrade_log.txt
- echo "COMPLETE_PATH ${COMPLETE_PATH}" >> /conf/upgrade_log.txt
- echo "GLABEL_SLICE ${GLABEL_SLICE}" >> /conf/upgrade_log.txt
-
- # First ensure the new file can fit inside the
- # slice that we are going to be operating on.
- NEW_IMG_SIZE=`echo $((\`gzip -l ${IMG} | grep -v compressed | awk '{ print $2}'\` / 1024 / 1024))`
- SIZE=`/sbin/fdisk ${COMPLETE_PATH} | /usr/bin/grep Meg | /usr/bin/awk '{ print $5 }' | /usr/bin/cut -d"(" -f2`
- # USB slices are under-reported even more than CF slices when viewed
- # directly, instead of when looking at the entire disk. Compensate
- # by adding exactly 6MB. 4MB was consistently 2MB too few, and
- # was resulting in failing upgrades on USB Flash based installs.
- SIZE=`expr $SIZE + 6`
- if [ "$SIZE" -lt "$NEW_IMG_SIZE" ]; then
- file_notice "UpgradeFailure" "Upgrade failed due to the upgrade image being larger than the partition that is configured on disk. Halting. Size on disk: $SIZE < Size of new image: $NEW_IMG_SIZE"
- echo "Upgrade failed. Please check the system log file for more information" | wall
- rm -f $IMG
- rm -f /var/run/firmwarelock.dirty
- rm -f /var/run/firmware.lock
- rm -f ${IMG}
- /etc/rc.conf_mount_ro
- exit 1
- fi
-
- # Output environment information to log file
- output_env_to_log
-
- # Grab a before upgrade look at fdisk
- echo "" >> /conf/fdisk_upgrade_log.txt
- echo "Before upgrade fdisk/bsdlabel" >> /conf/fdisk_upgrade_log.txt
- fdisk $BOOT_DRIVE >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s1 >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s2 >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s3 >> /conf/fdisk_upgrade_log.txt
- echo "---------------------------------------------------------------" >> /conf/fdisk_upgrade_log.txt
- echo "" >> /conf/fdisk_upgrade_log.txt
-
- # Log that we are really doing a NanoBSD upgrade
- echo "" >> /conf/upgrade_log.txt
- echo "NanoBSD upgrade starting" >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- # Remove TOFLASH and get ready for new flash image
- echo "" >> /conf/upgrade_log.txt
- echo "dd if=/dev/zero of=/dev/${TOFLASH} bs=1m count=1" >> /conf/upgrade_log.txt
- dd if=/dev/zero of=/dev/${TOFLASH} bs=1m count=1 >> /conf/upgrade_log.txt 2>&1
-
- # Stream gzipped image to dd and explode image to new area
- echo "" >> /conf/upgrade_log.txt
- echo "/usr/bin/gzip -dc $IMG | /bin/dd of=/dev/${TOFLASH} obs=64k" >> /conf/upgrade_log.txt
- /usr/bin/gzip -dc $IMG | /bin/dd of=/dev/${TOFLASH} obs=64k >> /conf/upgrade_log.txt 2>&1
-
- # Grab an after upgrade look at fdisk
- echo "" >> /conf/fdisk_upgrade_log.txt
- echo "After upgrade fdisk/bsdlabel" >> /conf/upgrade_log.txt
- fdisk $BOOT_DRIVE >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s1 >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s2 >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s3 >> /conf/fdisk_upgrade_log.txt
- echo "---------------------------------------------------------------" >> /conf/fdisk_upgrade_log.txt
- echo "" >> /conf/fdisk_upgrade_log.txt
-
- # Ensure that our new system is sound and bail if it is not and file a notice
- echo "" >> /conf/upgrade_log.txt
- echo "/sbin/fsck_ufs -y /dev/${COMPLETE_PATH}" >> /conf/upgrade_log.txt
- /sbin/fsck_ufs -y /dev/${COMPLETE_PATH} >> /conf/upgrade_log.txt 2>&1
- if [ $? != 0 ]; then
- file_notice "UpgradeFailure" "{\$g['product_name']} upgrade has failed. Your system has been left in a usable state."
- rm -f $IMG
- rm -f /var/run/firmwarelock.dirty
- rm -f /var/run/firmware.lock
- /etc/rc.conf_mount_ro
- exit 1
- fi
-
- # Enable foot shooting
- sysctl kern.geom.debugflags=16
-
- # Add back the corresponding glabel
- echo "" >> /conf/upgrade_log.txt
- echo "/sbin/tunefs -L ${GLABEL_SLICE} /dev/${COMPLETE_PATH}" >> /conf/upgrade_log.txt
- /sbin/tunefs -L ${GLABEL_SLICE} /dev/${COMPLETE_PATH} >> /conf/upgrade_log.txt 2>&1
-
- # restore config
- cp -Rp /tmp/configbak/* /conf 2>/dev/null
-
- # Remove upgrade file
- rm -f $IMG
-
- # Mount newly prepared slice
- mkdir /tmp/$GLABEL_SLICE
- mount /dev/ufs/$GLABEL_SLICE /tmp/$GLABEL_SLICE
-
- # If /boot/loader.conf.local exists
- # copy to the other slice.
- if [ -f /boot/loader.conf.local ]; then
- cp /boot/loader.conf.local /tmp/$GLABEL_SLICE/boot/loader.conf.local
- fi
-
- # If /tmp/$GLABEL_SLICE/usr/local/share/pfSense/post_upgrade_command exists
- # after update then execute the command.
- echo "Checking for post_upgrade_command..." >> /conf/upgrade_log.txt
- if [ -f /tmp/$GLABEL_SLICE/usr/local/share/pfSense/post_upgrade_command ]; then
- echo "Found post_upgrade_command, executing ($GLABEL_SLICE)..." >> /conf/upgrade_log.txt
- sh /tmp/$GLABEL_SLICE/usr/local/share/pfSense/post_upgrade_command $GLABEL_SLICE >> /conf/upgrade_log.txt 2>&1
- fi
-
- # Update fstab
- cp /etc/fstab /tmp/$GLABEL_SLICE/etc/fstab
- sed -i "" "s/pfsense${OLD_UFS_ID}/pfsense${UFS_ID}/g" /tmp/$GLABEL_SLICE/etc/fstab
- if [ $? != 0 ]; then
- echo "Something went wrong when trying to update the fstab entry. Aborting upgrade."
- file_notice "UpgradeFailure" "Something went wrong when trying to update the fstab entry. Aborting upgrade."
- rm -f $IMG
- rm -f /var/run/firmwarelock.dirty
- rm -f /var/run/firmware.lock
- umount /tmp/$GLABEL_SLICE
- /etc/rc.conf_mount_ro
- exit 1
- fi
- echo "" >> /conf/upgrade_log.txt
- cat /tmp/$GLABEL_SLICE/etc/fstab >> /conf/upgrade_log.txt
-
- echo "" >> /conf/upgrade_log.txt
- find /tmp/$GLABEL_SLICE >/conf/file_upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- # Unmount newly prepared slice
- umount /tmp/$GLABEL_SLICE
-
- sync
-
- # Set active mount slice in fdisk
- echo "" >> /conf/upgrade_log.txt
- echo "gpart set -a active -i ${SLICE} ${BOOT_DRIVE}" >> /conf/upgrade_log.txt
- gpart set -a active -i ${SLICE} ${BOOT_DRIVE} >> /conf/upgrade_log.txt 2>&1
-
- sync
-
- # Set active boot source - NanoBSD does not do this but otherwise we
- # end up with the wrong partition being active.
- echo "" >> /conf/upgrade_log.txt
- echo "/usr/sbin/boot0cfg -s ${SLICE} -v /dev/${BOOT_DRIVE}" >> /conf/upgrade_log.txt
- /usr/sbin/boot0cfg -s ${SLICE} -v /dev/${BOOT_DRIVE} >> /conf/upgrade_log.txt 2>&1
-
- # Disable foot shooting
- sysctl kern.geom.debugflags=0
-
- # Grab a final look at fdisk
- echo "" >> /conf/fdisk_upgrade_log.txt
- echo "Final upgrade fdisk/bsdlabel" >> /conf/fdisk_upgrade_log.txt
- fdisk $BOOT_DRIVE >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s1 >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s2 >> /conf/fdisk_upgrade_log.txt
- bsdlabel -A ${BOOT_DRIVE}s3 >> /conf/fdisk_upgrade_log.txt
- echo "---------------------------------------------------------------" >> /conf/fdisk_upgrade_log.txt
- echo "" >> /conf/fdisk_upgrade_log.txt
-
- # Remove extra stuff
- rm -rf /usr/savecore/*
-
- date >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- # Trigger a package reinstallation on reboot
- touch /conf/needs_package_sync
-
- # remount /cf ro
- /etc/rc.conf_mount_ro
- /bin/sync
-
- echo "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds." >> /conf/upgrade_log.txt 2>&1
- echo "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds." | wall
- /etc/rc.notify_message -e -g -m "NanoBSD Firmware upgrade is complete. Rebooting in 10 seconds."
-
- sleep 10
-
- rm -f /var/run/firmwarelock.dirty
- rm -f /var/run/firmware.lock
- . /etc/rc.reboot
-
- ;;
-pfSenseupgrade)
-
- # Sanity check - bail early if there's no firmware file!
- if [ ! -r $IMG ]; then
- echo "2nd parameter has not been passed or file does not exist. Exiting." >> /conf/upgrade_log.txt 2>&1
- /etc/rc.conf_mount_ro
- exit
- fi
-
- # wait 1 second before beginning
- sleep 1
-
- # Log that we are really doing a pfSense upgrade
- echo "" >> /conf/upgrade_log.txt
- echo "pfSenseupgrade upgrade starting" >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- touch /var/run/firmwarelock.dirty
-
- if [ -f /tmp/perform_full_backup.txt ]; then
- echo "Performing full backup" >> /conf/upgrade_log.txt
- /etc/rc.create_full_backup
- rm /tmp/perform_full_backup.txt
- fi
-
- touch /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- # Output environment information to log file
- output_env_to_log
-
- backup_chflags
- remove_chflags
-
- # Do we have a pre-upgrade hook in the update file?
- if [ `tar tvzf $IMG | grep /usr/local/share/pfSense/pre_upgrade_command | wc -l` -gt 0 ]; then
- tar xzvf $IMG -C / ./usr/local/share/pfSense/pre_upgrade_command >> /conf/upgrade_log.txt 2>&1
- chmod a+rx /usr/local/share/pfSense/pre_upgrade_command >> /conf/upgrade_log.txt 2>&1
- sh /usr/local/share/pfSense/pre_upgrade_command >> /conf/upgrade_log.txt 2>&1
- fi
-
- echo "Firmware upgrade in progress..." >> /conf/upgrade_log.txt 2>&1
- echo "Firmware upgrade in progress..." | wall
- /etc/rc.notify_message -e -g -m "Firmware upgrade in progress..."
-
- # backup config
- [ -d /tmp/configbak ] && rm -rf /tmp/configbak
- /bin/mkdir -p /tmp/configbak
- cp -Rp /conf/* /tmp/configbak 2>/dev/null
-
- # Remove logs from backup dir to avoid clobbering upon restore.
- rm /tmp/configbak/*_log.txt 2>/dev/null
-
- # tar explode image onto hd
- killall -9 check_reload_status
- killall -9 check_reload_status
- echo "Installing $IMG." >> /conf/upgrade_log.txt 2>&1
- cd / && /usr/bin/tar --exclude=./dev -xzUPf $IMG >> /conf/upgrade_log.txt 2>&1
- /usr/local/sbin/check_reload_status
- echo "Image installed $IMG." >> /conf/upgrade_log.txt 2>&1
-
- # process custom image if its passed
- if [ $# -eq 3 ]; then
- if [ -f $CUSTOMIMG ]; then
- echo "Custom image $CUSTOMIMG found." >> /conf/upgrade_log.txt 2>&1
- echo "Custom image ($CUSTOMIMG) found." >> /conf/upgrade_log.txt 2>&1
- PWD_DIR=`pwd`
- cd / && /usr/bin/tar xzPUf $CUSTOMIMG >> /conf/upgrade_log.txt 2>&1
- cd $PWD_DIR
- echo "Custom image $CUSTOMIMG installed." >> /conf/upgrade_log.txt 2>&1
- fi
- fi
-
- # restore config
- cp -Rp /tmp/configbak/* /conf 2>/dev/null
-
- # restore /etc symlinks
- rm /etc/hosts
- ln -s /var/etc/hosts /etc/hosts
-
- restore_chflags
-
- # Remove upgrade file
- rm -f $IMG
-
- if [ -e /etc/init_bootloader.sh ]; then
- if [ ! -x /etc/init_bootloader.sh ]; then
- chmod ug+x /etc/init_bootloader.sh
- fi
- /etc/init_bootloader.sh >> /conf/upgrade_log.txt 2>&1
- fi
-
- # Remove saved commit ID for gitsync
- rm -f /etc/version.gitsync
-
- # If /usr/local/share/pfSense/post_upgrade_command exists after update
- # then execute the command.
- if [ -f /usr/local/share/pfSense/post_upgrade_command ]; then
- if [ ! -x /usr/local/share/pfSense/post_upgrade_command ]; then
- chmod ug+x /usr/local/share/pfSense/post_upgrade_command
- fi
- /usr/local/share/pfSense/post_upgrade_command >> /conf/upgrade_log.txt 2>&1
- fi
-
- # remove unused files
- rm -rf /etc/rc.conf
- rm -rf /usr/savecore/*
-
- date >> /conf/upgrade_log.txt
- echo "" >> /conf/upgrade_log.txt
-
- # remount /cf ro
- /etc/rc.conf_mount_ro
-
- # release the firmware lock
- rm -f /var/run/firmwarelock.dirty
- rm -f /var/run/firmware.lock
- /bin/sync
-
- echo "Firmware upgrade is complete. Rebooting in 10 seconds." >> /conf/upgrade_log.txt 2>&1
- echo "Firmware upgrade is complete. Rebooting in 10 seconds." | wall
- /etc/rc.notify_message -e -g -m "Firmware upgrade is complete. Rebooting in 10 seconds."
-
- # Sleep and allow disks to catch up
- sleep 10
-
- # If the archive has unpacked a file called
- # /tmp/no_upgrade_reboot_required then do
- # not reboot after upgrade.
- if [ -f /tmp/no_upgrade_reboot_required ]; then
- rm /tmp/no_upgrade_reboot_required
- else
- . /etc/rc.reboot
- fi
-
- ;;
-esac
-
diff --git a/src/etc/rc.firmware_auto b/src/etc/rc.firmware_auto
deleted file mode 100755
index 47ad8c9..0000000
--- a/src/etc/rc.firmware_auto
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/sh
-
-# /etc/rc.firmware_auto
-# Copyright (C) 2005-2015 Electric Sheep Fencing LLC
-# Part of pfSense
-
-# $Id$
-
-FMBASEURL=$1
-FMFILENAME=$2
-FETCHFILENAME=$1/$2
-
-# Read product_name from $g, defaults to pfSense
-product=$(/usr/local/sbin/read_global_var product_name pfSense)
-
-# wait 5 seconds before beginning
-sleep 5
-
-logger -p daemon.info -i -t AutoUpgrade "Auto Upgrade started"
-
-HTTP_AUTH=""
-
-# if username and password is passed, let fetch utilize.
-if [ $# -gt 3 ]; then
-HTTP_AUTH="basic:*:$3:$4"
-fi
-
-if [ $# -gt 1 ]; then
- echo "Downloading $FMFILENAME from $FMBASEURL ..." | logger -p daemon.info -i -t AutoUpgrade
- /usr/bin/fetch -o /tmp/latest.tgz $FETCHFILENAME | logger -p daemon.info -i -t AutoUpgrade
- echo "Downloading $FMFILENAME.sha256 from $FMBASEURL ..." | logger -p daemon.info -i -t AutoUpgrade
- /usr/bin/fetch -o /tmp/latest.tgz.sha256 $FETCHFILENAME.sha256 | logger -p daemon.info -i -t AutoUpgrade
-fi
-
-DLHASH=`/bin/cat /tmp/latest.tgz.sha256 | cut -d" " -f4 `
-FILEHASH=`/sbin/sha256 /tmp/latest.tgz | cut -d" " -f4`
-
-PLATFORM=`cat /etc/platform`
-
-echo " Package sha256: ${DLHASH}" | logger -p daemon.info -i -t AutoUpgrade
-echo "Downloaded sha256: ${FILEHASH}" | logger -p daemon.info -i -t AutoUpgrade
-
-if [ "$DLHASH" = "" ]; then
- echo "Downloaded sha256 is null. Require proxy auth?" | logger -p daemon.info -i -t AutoUpgrade
- exit 1
-fi
-
-if [ "$FILEHASH" = "" ]; then
- echo "Downloaded file's sha256 is null." | logger -p daemon.info -i -t AutoUpgrade
- exit 1
-fi
-
-if [ "$DLHASH" = "$FILEHASH" ]; then
- echo "sha256 hashes match." | logger -p daemon.info -i -t AutoUpgrade
- echo "Beginning ${product} upgrade." | wall
- if [ "$PLATFORM" = "nanobsd" ]; then
- /usr/local/bin/php-cgi /etc/rc.conf_mount_rw
- fi
- if [ -r "/tmp/custom.tgz" ]; then
- sh /etc/rc.firmware ${product}upgrade /tmp/latest.tgz /tmp/custom.tgz
- else
- if [ "$PLATFORM" = "nanobsd" ]; then
- sh /etc/rc.firmware ${product}NanoBSDupgrade /tmp/latest.tgz
- else
- sh /etc/rc.firmware ${product}upgrade /tmp/latest.tgz
- fi
- fi
- exit 0
-fi
-
-echo "sha256 hashes do not match. Upgrade aborted." | logger -p daemon.info -i -t AutoUpgrade
-rm /tmp/latest*
-exit 1
diff --git a/src/usr/local/sbin/pfSense-upgrade-GUI.sh b/src/etc/rc.gateway_alarm
index aea5976..a1afb65 100755
--- a/src/usr/local/sbin/pfSense-upgrade-GUI.sh
+++ b/src/etc/rc.gateway_alarm
@@ -1,7 +1,8 @@
#!/bin/sh
-
-
-# Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+#
+# rc.gateway_alarm
+#
+# Copyright (c) 2015 Electric Sheep Fencing, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,112 +48,16 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# OF THE POSSIBILITY OF SUCH DAMAGE.
-# Script is a simple wrapper around pfSense-upgrade. It is called from pkg_install.php to perform an
-# installation or remval.
-# FIFO is set up, log files named
-
-message () {
-if ( $VERBOSE ) ; then
- echo "$1"
-fi
-}
-
-usage () {
- echo "pfSense-upgrade-GUI.sh [flags] [-i || -r] PACKAGE_NAME"
- echo "Allows the web GUI to invoke the package installation script"
- echo " -f : Force (Ignore lockfile)"
- echo " -h : This help"
- echo " -r : Install package"
- echo " -i : Remove package"
- echo " -v : Verbose"
-}
-
-if [ $# -lt 2 ] ; then
- echo "Usage: inst.sh [-i || -r] PACKAGE"
- echo "e.g.: inst.sh -i pfSense-pkg-sudo"
-fi
-
-VERBOSE=false
-FORCE=false
-
-while getopts fhirv opt; do
- case ${opt} in
- f)
- FORCE=true
- ;;
- h)
- usage
- exit 0
- ;;
- i)
- ACTION="-i"
- ;;
- r)
- ACTION="-r"
- ;;
- v)
- VERBOSE=true
- ;;
- *)
- echo "Error: Unsupported option $(opt)"
- usage
- exit 1
- ;;
- esac
-done
+GW="$1"
-shift $((OPTIND-1))
-PKG=$1
-
-if [ $ACTION == "-i" ] ; then
- message "Installing $PKG"
-elif [ $ACTION == "-r" ] ; then
- message "Removing $PKG"
-fi
-
-UPDATEINPROGRESS=2
-LOCKFILE=/tmp/pkg-upgate-GUI.lck
-LOGFILE="webgui-log.txt"
-FIFO=/tmp/upgr.fifo
-JSONFILE="/cf/conf/webgui-log.json"
-
-if [ -e $LOCKFILE ] ; then
- if ( $FORCE ) ; then
- message "Removing lockfile $LOCKFILE"
- rm -f $LOCKFILE
- else
- eval $(stat -s $LOCKFILE)
- NOW=`date +%s`
- let AGE="$NOW-$st_ctime" >/dev/null
-
- if [ $AGE -lt 300 ] ; then
- message "Update in progress!"
- exit $UPDATEINPROGRESS
- else
- message "Removing stale lockfile $LOCKFILE"
- rm -f $LOCKFILE
- fi
- fi
+if [ -z "$GW" ]; then
+ exit 1
fi
-touch $LOCKFILE
-
-if [ -e $FIFO ] ; then
- rm $FIFO 2>/dev/null
-fi
-
-mkfifo $FIFO
-
-# Capture the JSON progress status and send it to the file we are watching
-tail -f $FIFO >$JSONFILE &
-TAILPID=$!
-
-message "Calling pfSense-upgrade with -l $LOGFILE -p $FIFO $ACTION $PKG"
-
-/usr/local/sbin/pfSense-upgrade -l $LOGFILE -p $FIFO $ACTION $PKG >/dev/null
-
-kill $TAILPID
-rm $FIFO 2>/dev/null
-rm $LOCKFILE
+/usr/local/sbin/pfSctl \
+ -c "service reload dyndns ${GW}" \
+ -c "service reload ipsecdns" \
+ -c "service reload openvpn ${GW}" \
+ -c "filter reload" >/dev/null 2>&1
-exit 0
+exit $?
diff --git a/src/etc/rc.halt b/src/etc/rc.halt
index fd6318b..94a676f 100755
--- a/src/etc/rc.halt
+++ b/src/etc/rc.halt
@@ -1,6 +1,6 @@
#!/bin/sh
-# $Id$
+# /etc/rc.halt
if ! /usr/bin/lockf -s -t 30 /tmp/config.lock /usr/bin/true; then
echo "Cannot halt at this moment, a config write operation is in progress and 30 seconds have passed."
diff --git a/src/etc/rc.initial b/src/etc/rc.initial
index 3d20ff1..ae78375 100755
--- a/src/etc/rc.initial
+++ b/src/etc/rc.initial
@@ -28,6 +28,18 @@ if [ -f /etc/rc.local ]; then
fi
fi
+# Parse command line parameters
+while [ $# -gt 0 ]; do
+ case $1 in
+ -c ) shift
+ /bin/sh -c $1
+ exit
+ ;;
+ * )
+ esac
+ shift
+done
+
CONFIG="/cf/conf/config.xml"
WORD="https"
@@ -71,7 +83,7 @@ echo " 0) Logout (SSH only) 9) pfTop"
echo " 1) Assign Interfaces 10) Filter Logs"
echo " 2) Set interface(s) IP address 11) Restart webConfigurator"
echo " 3) Reset webConfigurator password 12) ${product} Developer Shell"
-echo " 4) Reset to factory defaults 13) Upgrade from console"
+echo " 4) Reset to factory defaults 13) Update from console"
echo " 5) Reboot system ${sshd_option}"
echo " 6) Halt system 15) Restore recent configuration"
echo " 7) Ping host 16) Restart PHP-FPM"
diff --git a/src/etc/rc.initial.defaults b/src/etc/rc.initial.defaults
index 6901dae..c80a18d 100755
--- a/src/etc/rc.initial.defaults
+++ b/src/etc/rc.initial.defaults
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.defaults
part of m0n0wall (http://m0n0.ch/wall)
@@ -37,24 +36,13 @@
$fp = fopen('php://stdin', 'r');
- echo <<<EOD
-
-You are about to reset the firewall to factory defaults.
-The firewall will reboot after resetting the configuration.
-
-Do you want to proceed [y|n]?
-EOD;
+ echo "\n" . gettext("You are about to reset the firewall to factory defaults.");
+ echo "\n" . gettext("The firewall will reboot after resetting the configuration.");
+ echo "\n" . gettext("Do you want to proceed [y|n]?") . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
-
reset_factory_defaults();
-
- echo <<<EOD
-
-{$g['product_name']} is rebooting now.
-
-EOD;
-
+ echo "\n" . sprintf(gettext("%s is rebooting now."), $g['product_name']) . "\n";
system_reboot_sync();
}
diff --git a/src/etc/rc.initial.firmware_update b/src/etc/rc.initial.firmware_update
deleted file mode 100755
index 143dbbd..0000000
--- a/src/etc/rc.initial.firmware_update
+++ /dev/null
@@ -1,190 +0,0 @@
-#!/usr/local/bin/php-cgi -f
-
-<?php
-
-require("globals.inc");
-require("config.inc");
-require("functions.inc");
-
-echo "Starting the {$g['product_name']} console firmware update system";
-
-require("functions.inc");
-echo ".";
-
-if (isset($config['system']['firmware']['alturl']['enable'])) {
- $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
-} else {
- $updater_url = $g['update_url'];
-}
-
-$nanosize = "";
-if ($g['platform'] == "nanobsd") {
- if (!isset($g['enableserial_force'])) {
- $nanosize = "-nanobsd-vga-";
- } else {
- $nanosize = "-nanobsd-";
- }
-
- $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt")));
- $update_filename = "latest{$nanosize}.img.gz";
-} else {
- $update_filename = "latest.tgz";
-}
-$autoupdateurl = "{$updater_url}/{$update_filename}";
-
-$fp = fopen('php://stdin', 'r');
-
-echo ".\n\n";
-
-$shell_active = true;
-
-echo "1) Update from a URL\n";
-echo "2) Update from a local file\n";
-echo "Q) Quit\n";
-
-echo "\nPlease select an option to continue: ";
-
-$pkg_interface = 'console';
-$command = strtoupper(chop(fgets($fp)));
-
-switch ($command) {
- case "q":
- case "quit":
- echo "\n";
- fclose($fp);
- die;
- break;
- case "1":
- echo "\nEnter the URL to the .tgz or .img.gz update file. \nType 'auto' to use {$autoupdateurl}\n> ";
- $url = chop(fgets($fp));
- if (!$url) {
- fclose($fp);
- die;
- }
- if ($url == "auto") {
- $url = $autoupdateurl;
- }
- $status = does_url_exist($url);
- if ($status) {
- conf_mount_rw();
- mark_subsystem_dirty('firmware');
- unlink_if_exists("/root/firmware.tgz");
- echo "\nFetching file... ";
- download_file_with_progress_bar($url, '/root/firmware.tgz');
- if (!file_exists("/root/firmware.tgz")) {
- echo "Something went wrong during file transfer. Exiting.\n\n";
- fclose($fp);
- clear_subsystem_dirty('firmware');
- die;
- }
- $status = does_url_exist("$url.sha256");
- if ($status) {
- echo "\nFetching sha256... ";
- download_file_with_progress_bar($url . ".sha256", '/root/firmware.tgz.sha256');
- echo "\n";
- } else {
- echo "\n\nWARNING.\n";
- echo "\nCould not locate a sha256 file. We cannot verify the download once completed.\n\n";
- echo "Do you still want to proceed with the upgrade [n]? ";
- $answer = strtoupper(chop(fgets($fp)));
- if ($answer == "Y" or $answer == "YES") {
- echo "\nContinuing upgrade...";
- } else {
- echo "\nUpgrade cancelled.\n\n";
- die;
- }
- }
- if (file_exists("/root/firmware.tgz.sha256")) {
- $source_sha256 = trim(`cat /root/firmware.tgz.sha256 | awk '{ print \$4 }'`, "\r");
- $file_sha256 = trim(`sha256 /root/firmware.tgz | awk '{ print \$4 }'`, "\r");
- echo "URL sha256: $source_sha256\n";
- echo "Downloaded file sha256: $file_sha256\n";
- if ($source_sha256 <> $file_sha256) {
- echo "\n\nsha256 checksum does not match. Cancelling upgrade.\n\n";
- unlink_if_exists("/root/firmware.tgz.sha256");
- fclose($fp);
- clear_subsystem_dirty('firmware');
- die -1;
- }
- echo "\nsha256 checksum matches.\n";
- unlink_if_exists("/root/firmware.tgz.sha256");
- }
- if (strstr($url, "nanobsd")) {
- echo "NanoBSD upgrade file detected...\n";
- $type = "nanobsd";
- } else {
- $type = "normal";
- }
- do_upgrade("/root/firmware.tgz", $type);
- clear_subsystem_dirty('firmware');
- exit;
- }
- case "2":
- echo "\nEnter the complete path to the .tgz or .img.gz update file: ";
- $path = chop(fgets($fp));
- if (!$path) {
- fclose($fp);
- die;
- }
- if (stristr($path, "nanobsd")) {
- $type = "nanobsd";
- }
- if (file_exists($path)) {
- mark_subsystem_dirty('firmware');
- do_upgrade($path, $type);
- clear_subsystem_dirty('firmware');
- } else {
- echo "\nCould not find file.\n\n";
- fclose($fp);
- die -1;
- }
-}
-
-function do_upgrade($path, $type) {
- global $g, $fp;
-
- $sigchk = verify_digital_signature($path);
- if ($sigchk == 1) {
- $sig_warning = "The digital signature on this image is invalid.";
- } elseif ($sigchk == 2) {
- $sig_warning = "This image is not digitally signed.";
- } elseif (($sigchk == 3) || ($sigchk == 4)) {
- $sig_warning = "There has been an error verifying the signature on this image.";
- }
- if ($sig_warning) {
- $sig_warning = "\nWARNING! ACHTUNG! DANGER!\n\n{$sig_warning}\n\n" .
- "This means that the image you uploaded is not an official/supported image and\n" .
- "may lead to unexpected behavior or security compromises.\n\n" .
- "Only install images that come from sources that you trust, and make sure\n".
- "that the image has not been tampered with.\n\n".
- "Do you want to install this image anyway at your own risk [n]?";
- echo $sig_warning;
- $command = strtoupper(chop(fgets($fp)));
- if (strtoupper($command) == "Y" or strtoupper($command) == "Y" or strtoupper($command) == "YES") {
- echo "\nContinuing upgrade...";
- } else {
- echo "\nUpgrade cancelled.\n\n";
- die;
- }
- }
- mark_subsystem_dirty('firmwarelock');
- echo "\nOne moment please...\nInvoking firmware upgrade...";
- if ($type == "nanobsd") {
- mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade $path");
- } else {
- mwexec_bg("/etc/rc.firmware pfSenseupgrade $path");
- }
- sleep(10);
- while (is_subsystem_dirty('firmwarelock')) {
- sleep(1);
- echo ".";
- }
- sleep(10);
- echo "Done. Rebooting...\n\n";
- clear_subsystem_dirty('firmwarelock');
-}
-
-exec("rm -f /root/*.sha256");
-fclose($fp);
-
-?>
diff --git a/src/etc/rc.initial.halt b/src/etc/rc.initial.halt
index 9ff189b..27377b5 100755
--- a/src/etc/rc.initial.halt
+++ b/src/etc/rc.initial.halt
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.halt
part of pfSense (www.pfSense.com)
@@ -38,21 +37,11 @@
$fp = fopen('php://stdin', 'r');
- echo <<<EOD
-
-{$g['product_name']} will shutdown and halt system. This may take a few minutes, depending on your hardware.
-
-Do you want to proceed [y|n]?
-EOD;
+ echo "\n" . sprintf(gettext("%s will shutdown and halt system. This may take a few minutes, depending on your hardware."), $g['product_name']) . "\n";
+ echo gettext("Do you want to proceed [y|n]?") . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
-
- echo <<<EOD
-
-{$g['product_name']} will shutdown and halt system now.
-
-EOD;
-
+ echo "\n" . sprintf(gettext("%s will shutdown and halt system now."), $g['product_name']) . "\n";
system_halt();
}
diff --git a/src/etc/rc.initial.password b/src/etc/rc.initial.password
index b5e01ed..969745b 100755
--- a/src/etc/rc.initial.password
+++ b/src/etc/rc.initial.password
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.password
part of m0n0wall (http://m0n0.ch/wall)
@@ -41,14 +40,14 @@
echo "\n" . gettext('
The webConfigurator admin password and privileges will be reset to the default (which is "' . strtolower($g['product_name']) . '").') . "\n" .
- gettext('Do you want to proceed [y|n]?');
+ gettext('Do you want to proceed [y|n]?') . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
if (isset($config['system']['webgui']['authmode']) &&
- $config['system']['webgui']['authmode'] != "Local Database") {
+ $config['system']['webgui']['authmode'] != "Local Database") {
echo "\n" . gettext('
The User manager authentication server is set to "' . $config['system']['webgui']['authmode'] . '".') . "\n" .
- gettext('Do you want to set it back to Local Database [y|n]?');
+ gettext('Do you want to set it back to Local Database [y|n]?') . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
$config['system']['webgui']['authmode'] = "Local Database";
}
@@ -77,7 +76,7 @@ The User manager authentication server is set to "' . $config['system']['webgui'
write_config(gettext("password changed from console menu"));
echo "\n" . gettext('
-The password for the webConfigurator has been reset and
+The password for the webConfigurator has been reset and
the default username has been set to "admin".') . "\n" .
gettext('
Remember to set the password to something else than
diff --git a/src/etc/rc.initial.ping b/src/etc/rc.initial.ping
index 055d556..6a553e7 100755
--- a/src/etc/rc.initial.ping
+++ b/src/etc/rc.initial.ping
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.ping
part of m0n0wall (http://m0n0.ch/wall)
diff --git a/src/etc/rc.initial.reboot b/src/etc/rc.initial.reboot
index 38f9e3b..fdcc480 100755
--- a/src/etc/rc.initial.reboot
+++ b/src/etc/rc.initial.reboot
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.reboot
part of m0n0wall (http://m0n0.ch/wall)
@@ -38,21 +37,11 @@
$fp = fopen('php://stdin', 'r');
- echo <<<EOD
-
-{$g['product_name']} will reboot. This may take a few minutes, depending on your hardware.
-
-Do you want to proceed [y|n]?
-EOD;
+ echo "\n" . sprintf(gettext("%s will reboot. This may take a few minutes, depending on your hardware."), $g['product_name']) . "\n";
+ echo gettext("Do you want to proceed [y|n]?") . " ";
if (strcasecmp(chop(fgets($fp)), "y") == 0) {
-
- echo <<<EOD
-
-{$g['product_name']} is rebooting now.
-
-EOD;
-
+ echo "\n" . sprintf(gettext("%s is rebooting now."), $g['product_name']) . "\n";
system_reboot_sync();
}
diff --git a/src/etc/rc.initial.setlanip b/src/etc/rc.initial.setlanip
index e33a05a..4f51ca9 100755
--- a/src/etc/rc.initial.setlanip
+++ b/src/etc/rc.initial.setlanip
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -q
<?php
-/* $Id$ */
/*
rc.initial.setlanip
part of m0n0wall (http://m0n0.ch/wall)
diff --git a/src/etc/rc.initial.setports b/src/etc/rc.initial.setports
index 147912f..e70547d 100755
--- a/src/etc/rc.initial.setports
+++ b/src/etc/rc.initial.setports
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.setports
part of m0n0wall (http://m0n0.ch/wall)
diff --git a/src/etc/rc.initial.store_config_to_removable_device b/src/etc/rc.initial.store_config_to_removable_device
index a40df6f..a7814c1 100755
--- a/src/etc/rc.initial.store_config_to_removable_device
+++ b/src/etc/rc.initial.store_config_to_removable_device
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.initial.store_config_to_removable_device
part of m0n0wall (http://m0n0.ch/wall)
diff --git a/src/etc/rc.interfaces_carp_configure b/src/etc/rc.interfaces_carp_configure
index 33a0b38..62131c8 100755
--- a/src/etc/rc.interfaces_carp_configure
+++ b/src/etc/rc.interfaces_carp_configure
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.interfaces_carp_configure
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.interfaces_lan_configure b/src/etc/rc.interfaces_lan_configure
index 2924cf9..8cfcbe8 100755
--- a/src/etc/rc.interfaces_lan_configure
+++ b/src/etc/rc.interfaces_lan_configure
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.interfaces_lan_configure
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.interfaces_opt_configure b/src/etc/rc.interfaces_opt_configure
index c00877a..74bcaa9 100755
--- a/src/etc/rc.interfaces_opt_configure
+++ b/src/etc/rc.interfaces_opt_configure
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.interfaces_opt_configure
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.interfaces_wan_configure b/src/etc/rc.interfaces_wan_configure
index 9b064d0..fbb7e55 100755
--- a/src/etc/rc.interfaces_wan_configure
+++ b/src/etc/rc.interfaces_wan_configure
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.interfaces_wan_configure
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.kill_states b/src/etc/rc.kill_states
index 715c860..571cc90 100755
--- a/src/etc/rc.kill_states
+++ b/src/etc/rc.kill_states
@@ -1,31 +1,54 @@
#!/usr/local/bin/php-cgi -f
<?php
/*
- rc.kill_states
- Copyright (C) 2013 Renato Botelho (garga@pfsense.org)
- part of pfSense (https://www.pfsense.org)
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
+ * rc.kill_states
+ *
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense® software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
/* parse the configuration and include all functions used below */
require_once("globals.inc");
diff --git a/src/etc/rc.newroutedns b/src/etc/rc.newroutedns
index de3a081..31d0ace 100755
--- a/src/etc/rc.newroutedns
+++ b/src/etc/rc.newroutedns
@@ -1,31 +1,54 @@
#!/usr/local/bin/php-cgi -f
<?php
/*
- rc.newroutedns
- Copyright (C) 2013 Renato Botelho <garga@pfsense.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
+ * rc.newroutedns
+ *
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense® software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
/* parse the configuration and include all functions used below */
require_once("util.inc");
diff --git a/src/etc/rc.newwanip b/src/etc/rc.newwanip
index ea44b81..45cef96 100755
--- a/src/etc/rc.newwanip
+++ b/src/etc/rc.newwanip
@@ -216,8 +216,8 @@ if (!is_ipaddr($oldip) || $curwanip != $oldip || !is_ipaddrv4($config['interface
/*
* Some services (e.g. dyndns, see ticket #4066) depend on
* filter_configure() to be called before, otherwise pass out
- * route-to rules have the old ip set in 'from' and connection
- * do not go through correct link
+ * route-to rules have the old ip set in 'from' and connections
+ * do not go through the correct link
*/
filter_configure_sync();
diff --git a/src/etc/rc.ntpdate b/src/etc/rc.ntpdate
index 4bdc647..02f53aa 100755
--- a/src/etc/rc.ntpdate
+++ b/src/etc/rc.ntpdate
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id: */
/*
rc.ntpdate
part of m0n0wall (http://m0n0.ch/wall)
diff --git a/src/etc/rc.openvpn b/src/etc/rc.openvpn
index cda8067..790f9c8 100755
--- a/src/etc/rc.openvpn
+++ b/src/etc/rc.openvpn
@@ -76,7 +76,7 @@ if (isset($_GET['interface'])) {
}
if ((is_array($config['openvpn']['openvpn-server']) && count($config['openvpn']['openvpn-server'])) ||
- (is_array($config['openvpn']['openvpn-client']) && count($config['openvpn']['openvpn-client']))) {
+ (is_array($config['openvpn']['openvpn-client']) && count($config['openvpn']['openvpn-client']))) {
if (empty($argument) || $argument == "all") {
$argument = "all";
$log_text = "all";
diff --git a/src/etc/rc.packages b/src/etc/rc.packages
index 59fb5ca..f4ec045 100755
--- a/src/etc/rc.packages
+++ b/src/etc/rc.packages
@@ -1,6 +1,5 @@
#!/usr/local/bin/php -f
<?php
-/* $Id$ */
/*
rc.packages
part of pfSense (https://www.pfsense.org)
@@ -74,15 +73,15 @@ if ($pkg == '' || $when == '') {
pkg_remove_prefix($pkg);
switch ($when) {
-case "post-install":
- install_package_xml($pkg);
- break;
-case "deinstall":
-case "post-deinstall":
- delete_package_xml($pkg, $when);
- break;
-default:
- usage();
+ case "post-install":
+ install_package_xml($pkg);
+ break;
+ case "deinstall":
+ case "post-deinstall":
+ delete_package_xml($pkg, $when);
+ break;
+ default:
+ usage();
}
?>
diff --git a/src/etc/rc.php-fpm_restart b/src/etc/rc.php-fpm_restart
index 6ce04c6..a9a9ee1 100755
--- a/src/etc/rc.php-fpm_restart
+++ b/src/etc/rc.php-fpm_restart
@@ -5,7 +5,7 @@ echo ">>> Killing php-fpm"
sleep 2
# Run the php.ini setup file and populate
-# /usr/local/etc/php.ini and /usr/local/lib/php.ini
+# /usr/local/etc/php.ini
/etc/rc.conf_mount_rw
/etc/rc.php_ini_setup 2>/tmp/php_errors.txt
/bin/rm -f /var/run/php-fpm.pid 2>/dev/null
@@ -13,5 +13,5 @@ sleep 2
/etc/rc.conf_mount_ro
echo ">>> Restarting php-fpm" | /usr/bin/logger -p daemon.info -i -t rc.php-fpm_restart
echo ">>> Starting php-fpm"
-/usr/local/sbin/php-fpm -c /usr/local/lib/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
+/usr/local/sbin/php-fpm -c /usr/local/etc/php.ini -y /usr/local/lib/php-fpm.conf -RD 2>&1 >/dev/null
diff --git a/src/etc/rc.php_ini_setup b/src/etc/rc.php_ini_setup
index b4038e7..7d1054e 100755
--- a/src/etc/rc.php_ini_setup
+++ b/src/etc/rc.php_ini_setup
@@ -151,9 +151,6 @@ PHP_ZEND_MODULES=""
if [ -f /usr/local/etc/php.ini ]; then
/bin/rm /usr/local/etc/php.ini
fi
-if [ -f /usr/local/lib/php.ini ]; then
- /bin/rm /usr/local/lib/php.ini
-fi
LOADED_MODULES=`/usr/local/bin/php-cgi -m | /usr/bin/grep -v "\["`
unset TIMEZONE
@@ -176,7 +173,7 @@ fi
# Populate a dummy php.ini to avoid
# the file being clobbered and the firewall
# not being able to boot back up.
-/bin/cat >/usr/local/lib/php.ini <<EOF
+/bin/cat >/usr/local/etc/php.ini <<EOF
; File generated from /etc/rc.php_ini_setup
output_buffering = "0"
expose_php = Off
@@ -194,7 +191,7 @@ post_max_size = 200M
html_errors = Off
zlib.output_compression = Off
zlib.output_compression_level = 1
-include_path = ".:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg"
+include_path = ".:/etc/inc:/usr/local/www:/usr/local/captiveportal:/usr/local/pkg:/usr/local/www/classes:/usr/local/www/classes/Form"
display_startup_errors=on
display_errors=on
log_errors=on
@@ -206,9 +203,6 @@ date.timezone="${TIMEZONE}"
EOF
-# Copy php.ini file to etc/ too (cli)
-/bin/cp /usr/local/lib/php.ini /usr/local/etc/php.ini
-
# Loop through and generate modules to load.
# Take into account modules built into php.
for EXT in $PHPMODULES; do
@@ -222,7 +216,7 @@ for EXT in $PHPMODULES; do
if [ "$SHOULDADD" = "true" ]; then
# Ensure extension exists before adding.
if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then
- echo "extension=${EXT}.so" >> /usr/local/lib/php.ini
+ echo "extension=${EXT}.so" >> /usr/local/etc/php.ini
fi
fi
done
@@ -231,13 +225,13 @@ done
for EXT in $PHP_ZEND_MODULES; do
# Ensure extension exists before adding.
if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then
- echo "zend_extension=${EXT}.so" >> /usr/local/lib/php.ini
+ echo "zend_extension=${EXT}.so" >> /usr/local/etc/php.ini
fi
done
if [ "$LOWMEM" != "TRUE" ]; then
- /bin/cat >>/usr/local/lib/php.ini <<EOF
+ /bin/cat >>/usr/local/etc/php.ini <<EOF
; opcache Settings
opcache.enabled="1"
@@ -246,13 +240,13 @@ opcache.memory_consumption="${OPCACHEMEMSIZE}"
EOF
else
- /bin/cat >>/usr/local/lib/php.ini <<EOF
+ /bin/cat >>/usr/local/etc/php.ini <<EOF
; opcache Settings
opcache.enabled="0"
EOF
fi
- /bin/cat >>/usr/local/lib/php.ini <<EOF
+ /bin/cat >>/usr/local/etc/php.ini <<EOF
[suhosin]
suhosin.get.max_array_depth = 5000
@@ -343,9 +337,6 @@ EOF
fi
-# Copy php.ini file to etc/ too (cli)
-/bin/cp /usr/local/lib/php.ini /usr/local/etc/php.ini
-
# Remove old log file if it exists.
if [ -f /var/run/php_modules_load_errors.txt ]; then
/bin/rm /var/run/php_modules_load_errors.txt
@@ -376,12 +367,9 @@ for EXT in $PHPMODULESLC; do
if [ "$SHOULDREMOVE" = "true" ]; then
if [ -f "${EXTENSIONSDIR}${EXT}.so" ]; then
echo ">>> ${EXT} did not load correctly. Removing from php.ini..." >> /var/run/php_modules_load_errors.txt
- /bin/cat /usr/local/lib/php.ini | /usr/bin/grep -v $EXT > /tmp/php.ini
- /bin/rm -f /usr/local/lib/php.ini
- /bin/mv /tmp/php.ini /usr/local/lib/php.ini
+ /bin/cat /usr/local/etc/php.ini | /usr/bin/grep -v $EXT > /tmp/php.ini
+ /bin/rm -f /usr/local/etc/php.ini
+ /bin/mv /tmp/php.ini /usr/local/etc/php.ini
fi
fi
done
-
-# Copy php.ini file to etc/ too (cli)
-/bin/cp /usr/local/lib/php.ini /usr/local/etc/php.ini
diff --git a/src/etc/rc.prunecaptiveportal b/src/etc/rc.prunecaptiveportal
index c4b760a..d53d2bb 100755
--- a/src/etc/rc.prunecaptiveportal
+++ b/src/etc/rc.prunecaptiveportal
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.prunecaptiveportal
part of m0n0wall (http://m0n0.ch/wall)
diff --git a/src/etc/rc.reload_all b/src/etc/rc.reload_all
index 162553c..39007a8 100755
--- a/src/etc/rc.reload_all
+++ b/src/etc/rc.reload_all
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.reload_all
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.reload_interfaces b/src/etc/rc.reload_interfaces
index e34588f..59bfe79 100755
--- a/src/etc/rc.reload_interfaces
+++ b/src/etc/rc.reload_interfaces
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.reload_interfaces
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.savevoucher b/src/etc/rc.savevoucher
index 22e592d..824641d 100755
--- a/src/etc/rc.savevoucher
+++ b/src/etc/rc.savevoucher
@@ -1,6 +1,7 @@
#!/usr/local/bin/php-cgi -f
<?php
/*
+ rc.savevoucher
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
diff --git a/src/etc/rc.start_packages b/src/etc/rc.start_packages
index 233c236..011e2e7 100755
--- a/src/etc/rc.start_packages
+++ b/src/etc/rc.start_packages
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.start_packages
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/rc.update_alias_url_data b/src/etc/rc.update_alias_url_data
index fd56b43..65a13ba 100755
--- a/src/etc/rc.update_alias_url_data
+++ b/src/etc/rc.update_alias_url_data
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -f
<?php
-/* $Id$ */
/*
rc.update_alias_url_data
part of pfSense (https://www.pfsense.org)
diff --git a/src/etc/services b/src/etc/services
deleted file mode 100644
index 1f85da0..0000000
--- a/src/etc/services
+++ /dev/null
@@ -1,4111 +0,0 @@
-#
-# Network services, Internet style
-#
-# Note that it is presently the policy of IANA to assign a single well-known
-# port number for both TCP and UDP; hence, most entries here have two entries
-# even if the protocol doesn't support UDP operations.
-#
-# The latest IANA port assignments can be gotten from
-#
-# http://www.iana.org/assignments/port-numbers
-#
-# The Well Known Ports are those from 0 through 1023.
-# The Registered Ports are those from 1024 through 49151
-# The Dynamic and/or Private Ports are those from 49152 through 65535
-#
-# Kerberos services are for Kerberos v4, and are unofficial. Sites running
-# v5 should uncomment v5 entries and comment v4 entries.
-#
-# $FreeBSD: src/etc/services,v 1.62.2.12 2003/02/01 16:48:17 schweikh Exp $
-# From: @(#)services 5.8 (Berkeley) 5/9/91
-#
-# WELL KNOWN PORT NUMBERS
-#
-rtmp 1/ddp #Routing Table Maintenance Protocol
-tcpmux 1/tcp #TCP Port Service Multiplexer
-tcpmux 1/udp #TCP Port Service Multiplexer
-nbp 2/ddp #Name Binding Protocol
-compressnet 2/tcp #Management Utility
-compressnet 2/udp #Management Utility
-compressnet 3/tcp #Compression Process
-compressnet 3/udp #Compression Process
-echo 4/ddp #AppleTalk Echo Protocol
-rje 5/tcp #Remote Job Entry
-rje 5/udp #Remote Job Entry
-zip 6/ddp #Zone Information Protocol
-echo 7/tcp
-echo 7/udp
-discard 9/tcp sink null
-discard 9/udp sink null
-systat 11/tcp users #Active Users
-systat 11/udp users #Active Users
-daytime 13/tcp
-daytime 13/udp
-qotd 17/tcp quote #Quote of the Day
-qotd 17/udp quote #Quote of the Day
-msp 18/tcp #Message Send Protocol
-msp 18/udp #Message Send Protocol
-chargen 19/tcp ttytst source #Character Generator
-chargen 19/udp ttytst source #Character Generator
-ftp-data 20/tcp #File Transfer [Default Data]
-ftp-data 20/udp #File Transfer [Default Data]
-ftp 21/tcp #File Transfer [Control]
-ftp 21/udp #File Transfer [Control]
-ssh 22/tcp #Secure Shell Login
-ssh 22/udp #Secure Shell Login
-telnet 23/tcp
-telnet 23/udp
-# 24/tcp any private mail system
-# 24/udp any private mail system
-smtp 25/tcp mail #Simple Mail Transfer
-smtp 25/udp mail #Simple Mail Transfer
-nsw-fe 27/tcp #NSW User System FE
-nsw-fe 27/udp #NSW User System FE
-msg-icp 29/tcp #MSG ICP
-msg-icp 29/udp #MSG ICP
-msg-auth 31/tcp #MSG Authentication
-msg-auth 31/udp #MSG Authentication
-dsp 33/tcp #Display Support Protocol
-dsp 33/udp #Display Support Protocol
-# 35/tcp any private printer server
-# 35/udp any private printer server
-time 37/tcp timserver
-time 37/udp timserver
-rap 38/tcp #Route Access Protocol
-rap 38/udp #Route Access Protocol
-rlp 39/tcp resource #Resource Location Protocol
-rlp 39/udp resource #Resource Location Protocol
-graphics 41/tcp
-graphics 41/udp
-nameserver 42/tcp name #Host Name Server
-nameserver 42/udp name #Host Name Server
-nicname 43/tcp whois
-nicname 43/udp whois
-mpm-flags 44/tcp #MPM FLAGS Protocol
-mpm-flags 44/udp #MPM FLAGS Protocol
-mpm 45/tcp #Message Processing Module [recv]
-mpm 45/udp #Message Processing Module [recv]
-mpm-snd 46/tcp #MPM [default send]
-mpm-snd 46/udp #MPM [default send]
-ni-ftp 47/tcp #NI FTP
-ni-ftp 47/udp #NI FTP
-auditd 48/tcp #Digital Audit Daemon
-auditd 48/udp #Digital Audit Daemon
-tacacs 49/tcp #Login Host Protocol (TACACS)
-tacacs 49/udp #Login Host Protocol (TACACS)
-re-mail-ck 50/tcp #Remote Mail Checking Protocol
-re-mail-ck 50/udp #Remote Mail Checking Protocol
-la-maint 51/tcp #IMP Logical Address Maintenance
-la-maint 51/udp #IMP Logical Address Maintenance
-xns-time 52/tcp #XNS Time Protocol
-xns-time 52/udp #XNS Time Protocol
-domain 53/tcp #Domain Name Server
-domain 53/udp #Domain Name Server
-xns-ch 54/tcp #XNS Clearinghouse
-xns-ch 54/udp #XNS Clearinghouse
-isi-gl 55/tcp #ISI Graphics Language
-isi-gl 55/udp #ISI Graphics Language
-xns-auth 56/tcp #XNS Authentication
-xns-auth 56/udp #XNS Authentication
-mtp 57/tcp # deprecated
-#PROBLEMS!==============================================================
-# 57/tcp any private terminal access
-#PROBLEMS!==============================================================
-# 57/udp any private terminal access
-xns-mail 58/tcp #XNS Mail
-xns-mail 58/udp #XNS Mail
-# 59/tcp any private file service
-# 59/udp any private file service
-ni-mail 61/tcp #NI MAIL
-ni-mail 61/udp #NI MAIL
-acas 62/tcp #ACA Services
-acas 62/udp #ACA Services
-whois++ 63/tcp
-whois++ 63/udp
-covia 64/tcp #Communications Integrator (CI)
-covia 64/udp #Communications Integrator (CI)
-tacacs-ds 65/tcp #TACACS-Database Service
-tacacs-ds 65/udp #TACACS-Database Service
-sql*net 66/tcp #Oracle SQL*NET
-sql*net 66/udp #Oracle SQL*NET
-bootps 67/tcp dhcps #Bootstrap Protocol Server
-bootps 67/udp dhcps #Bootstrap Protocol Server
-bootpc 68/tcp dhcpc #Bootstrap Protocol Client
-bootpc 68/udp dhcpc #Bootstrap Protocol Client
-tftp 69/tcp #Trivial File Transfer
-tftp 69/udp #Trivial File Transfer
-tftp-proxy 6969/udp
-gopher 70/tcp
-gopher 70/udp
-netrjs-1 71/tcp #Remote Job Service
-netrjs-1 71/udp #Remote Job Service
-netrjs-2 72/tcp #Remote Job Service
-netrjs-2 72/udp #Remote Job Service
-netrjs-3 73/tcp #Remote Job Service
-netrjs-3 73/udp #Remote Job Service
-netrjs-4 74/tcp #Remote Job Service
-netrjs-4 74/udp #Remote Job Service
-# 75/tcp any private dial out service
-# 75/udp any private dial out service
-deos 76/tcp #Distributed External Object Store
-deos 76/udp #Distributed External Object Store
-netrjs 77/tcp
-#PROBLEMS!==============================================================
-# 77/tcp any private RJE service
-#PROBLEMS!==============================================================
-# 77/udp any private RJE service
-vettcp 78/tcp
-vettcp 78/udp
-finger 79/tcp
-finger 79/udp
-http 80/tcp www www-http #World Wide Web HTTP
-http 80/udp www www-http #World Wide Web HTTP
-hosts2-ns 81/tcp #HOSTS2 Name Server
-hosts2-ns 81/udp #HOSTS2 Name Server
-xfer 82/tcp #XFER Utility
-xfer 82/udp #XFER Utility
-mit-ml-dev 83/tcp #MIT ML Device
-mit-ml-dev 83/udp #MIT ML Device
-ctf 84/tcp #Common Trace Facility
-ctf 84/udp #Common Trace Facility
-mit-ml-dev 85/tcp #MIT ML Device
-mit-ml-dev 85/udp #MIT ML Device
-mfcobol 86/tcp #Micro Focus Cobol
-mfcobol 86/udp #Micro Focus Cobol
-ttylink 87/tcp
-#PROBLEMS!===========================================================
-# 87/tcp any private terminal link
-#PROBLEMS!===========================================================
-# 87/udp any private terminal link
-kerberos-sec 88/tcp kerberos # krb5 # Kerberos (v5)
-kerberos-sec 88/udp kerberos # krb5 # Kerberos (v5)
-su-mit-tg 89/tcp #SU/MIT Telnet Gateway
-su-mit-tg 89/udp #SU/MIT Telnet Gateway
-dnsix 90/tcp #DNSIX Securit Attribute Token Map
-dnsix 90/udp #DNSIX Securit Attribute Token Map
-mit-dov 91/tcp #MIT Dover Spooler
-mit-dov 91/udp #MIT Dover Spooler
-npp 92/tcp #Network Printing Protocol
-npp 92/udp #Network Printing Protocol
-dcp 93/tcp #Device Control Protocol
-dcp 93/udp #Device Control Protocol
-objcall 94/tcp #Tivoli Object Dispatcher
-objcall 94/udp #Tivoli Object Dispatcher
-supdup 95/tcp
-supdup 95/udp
-dixie 96/tcp #DIXIE Protocol Specification
-dixie 96/udp #DIXIE Protocol Specification
-swift-rvf 97/tcp #Swift Remote Virtural File Protocol
-swift-rvf 97/udp #Swift Remote Virtural File Protocol
-tacnews 98/tcp #TAC News, Unofficial: Red Hat linuxconf
-tacnews 98/udp #TAC News, Unofficial: Red Hat linuxconf
-metagram 99/tcp #Metagram Relay
-metagram 99/udp #Metagram Relay
-newacct 100/tcp #[unauthorized use]
-hostname 101/tcp hostnames #NIC Host Name Server
-hostname 101/udp hostnames #NIC Host Name Server
-iso-tsap 102/tcp tsap #ISO-TSAP Class 0
-iso-tsap 102/udp tsap #ISO-TSAP Class 0
-gppitnp 103/tcp #Genesis Point-to-Point Trans Net
-gppitnp 103/udp #Genesis Point-to-Point Trans Net
-acr-nema 104/tcp #ACR-NEMA Digital Imag. & Comm. 300
-acr-nema 104/udp #ACR-NEMA Digital Imag. & Comm. 300
-csnet-ns 105/tcp cso-ns cso #Mailbox Name Nameserver
-csnet-ns 105/udp cso-ns cso #Mailbox Name Nameserver
-pop3pw 106/tcp 3com-tsmux #Eudora compatible PW changer
-3com-tsmux 106/udp
-rtelnet 107/tcp #Remote Telnet Service
-rtelnet 107/udp #Remote Telnet Service
-snagas 108/tcp #SNA Gateway Access Server
-snagas 108/udp #SNA Gateway Access Server
-pop2 109/tcp postoffice #Post Office Protocol - Version 2
-pop2 109/udp postoffice #Post Office Protocol - Version 2
-pop3 110/tcp #Post Office Protocol - Version 3
-pop3 110/udp #Post Office Protocol - Version 3
-sunrpc 111/tcp rpcbind #SUN Remote Procedure Call
-sunrpc 111/udp rpcbind #SUN Remote Procedure Call
-mcidas 112/tcp #McIDAS Data Transmission Protocol
-mcidas 112/udp #McIDAS Data Transmission Protocol
-auth 113/tcp ident tap #Authentication Service
-auth 113/udp ident tap #Authentication Service
-audionews 114/tcp #Audio News Multicast
-audionews 114/udp #Audio News Multicast
-sftp 115/tcp #Simple File Transfer Protocol
-sftp 115/udp #Simple File Transfer Protocol
-ansanotify 116/tcp #ANSA REX Notify
-ansanotify 116/udp #ANSA REX Notify
-uucp-path 117/tcp #UUCP Path Service
-uucp-path 117/udp #UUCP Path Service
-sqlserv 118/tcp #SQL Services
-sqlserv 118/udp #SQL Services
-nntp 119/tcp usenet #Network News Transfer Protocol
-nntp 119/udp usenet #Network News Transfer Protocol
-cfdptkt 120/tcp
-cfdptkt 120/udp
-erpc 121/tcp #Encore Expedited Remote Pro.Call
-erpc 121/udp #Encore Expedited Remote Pro.Call
-smakynet 122/tcp
-smakynet 122/udp
-ntp 123/tcp #Network Time Protocol
-ntp 123/udp #Network Time Protocol
-ansatrader 124/tcp #ANSA REX Trader
-ansatrader 124/udp #ANSA REX Trader
-locus-map 125/tcp #Locus PC-Interface Net Map Ser
-locus-map 125/udp #Locus PC-Interface Net Map Ser
-unitary 126/tcp #Unisys Unitary Login
-unitary 126/udp #Unisys Unitary Login
-locus-con 127/tcp #Locus PC-Interface Conn Server
-locus-con 127/udp #Locus PC-Interface Conn Server
-gss-xlicen 128/tcp #GSS X License Verification
-gss-xlicen 128/udp #GSS X License Verification
-pwdgen 129/tcp #Password Generator Protocol
-pwdgen 129/udp #Password Generator Protocol
-cisco-fna 130/tcp #cisco FNATIVE
-cisco-fna 130/udp #cisco FNATIVE
-cisco-tna 131/tcp #cisco TNATIVE
-cisco-tna 131/udp #cisco TNATIVE
-cisco-sys 132/tcp #cisco SYSMAINT
-cisco-sys 132/udp #cisco SYSMAINT
-statsrv 133/tcp #Statistics Service
-statsrv 133/udp #Statistics Service
-ingres-net 134/tcp #INGRES-NET Service
-ingres-net 134/udp #INGRES-NET Service
-loc-srv 135/tcp epmap #Location Service
-loc-srv 135/udp epmap #Location Service
-profile 136/tcp #PROFILE Naming System
-profile 136/udp #PROFILE Naming System
-netbios-ns 137/tcp #NETBIOS Name Service
-netbios-ns 137/udp #NETBIOS Name Service
-netbios-dgm 138/tcp #NETBIOS Datagram Service
-netbios-dgm 138/udp #NETBIOS Datagram Service
-netbios-ssn 139/tcp #NETBIOS Session Service
-netbios-ssn 139/udp #NETBIOS Session Service
-emfis-data 140/tcp #EMFIS Data Service
-emfis-data 140/udp #EMFIS Data Service
-emfis-cntl 141/tcp #EMFIS Control Service
-emfis-cntl 141/udp #EMFIS Control Service
-bl-idm 142/tcp #Britton-Lee IDM
-bl-idm 142/udp #Britton-Lee IDM
-imap 143/tcp imap2 imap4 #Interim Mail Access Protocol v2
-imap 143/udp imap2 imap4 #Interim Mail Access Protocol v2
-NeWS 144/tcp # Window System
-NeWS 144/udp # Window System
-#PROBLEMS!==============================================================
-#uma 144/tcp #Universal Management Architecture
-#uma 144/udp #Universal Management Architecture
-#PROBLEMS!==============================================================
-uaac 145/tcp #UAAC Protocol
-uaac 145/udp #UAAC Protocol
-iso-tp0 146/tcp
-iso-tp0 146/udp
-iso-ip 147/tcp
-iso-ip 147/udp
-cronus 148/tcp jargon #CRONUS-SUPPORT
-cronus 148/udp jargon #CRONUS-SUPPORT
-aed-512 149/tcp #AED 512 Emulation Service
-aed-512 149/udp #AED 512 Emulation Service
-sql-net 150/tcp
-sql-net 150/udp
-hems 151/tcp
-hems 151/udp
-bftp 152/tcp #Background File Transfer Program
-bftp 152/udp #Background File Transfer Program
-sgmp 153/tcp
-sgmp 153/udp
-netsc-prod 154/tcp
-netsc-prod 154/udp
-netsc-dev 155/tcp
-netsc-dev 155/udp
-sqlsrv 156/tcp #SQL Service
-sqlsrv 156/udp #SQL Service
-knet-cmp 157/tcp #KNET/VM Command/Message Protocol
-knet-cmp 157/udp #KNET/VM Command/Message Protocol
-pcmail-srv 158/tcp #PCMail Server
-pcmail-srv 158/udp #PCMail Server
-nss-routing 159/tcp
-nss-routing 159/udp
-sgmp-traps 160/tcp
-sgmp-traps 160/udp
-snmp 161/tcp
-snmp 161/udp
-snmptrap 162/tcp snmp-trap
-snmptrap 162/udp snmp-trap
-cmip-man 163/tcp #CMIP/TCP Manager
-cmip-man 163/udp #CMIP/TCP Manager
-cmip-agent 164/tcp #CMIP/TCP Agent
-smip-agent 164/udp #CMIP/TCP Agent
-xns-courier 165/tcp #Xerox
-xns-courier 165/udp #Xerox
-s-net 166/tcp #Sirius Systems
-s-net 166/udp #Sirius Systems
-namp 167/tcp
-namp 167/udp
-rsvd 168/tcp
-rsvd 168/udp
-send 169/tcp
-send 169/udp
-print-srv 170/tcp #Network PostScript
-print-srv 170/udp #Network PostScript
-multiplex 171/tcp #Network Innovations Multiplex
-multiplex 171/udp #Network Innovations Multiplex
-cl/1 172/tcp #Network Innovations CL/1
-cl/1 172/udp #Network Innovations CL/1
-xyplex-mux 173/tcp
-xyplex-mux 173/udp
-mailq 174/tcp
-mailq 174/udp
-vmnet 175/tcp
-vmnet 175/udp
-genrad-mux 176/tcp
-genrad-mux 176/udp
-xdmcp 177/tcp #X Display Manager Control Protocol
-xdmcp 177/udp #X Display Manager Control Protocol
-NextStep 178/tcp nextstep NeXTStep #NextStep Window Server
-NextStep 178/udp nextstep NeXTStep #NextStep Window Server
-bgp 179/tcp #Border Gateway Protocol
-bgp 179/udp #Border Gateway Protocol
-ris 180/tcp #Intergraph
-ris 180/udp #Intergraph
-unify 181/tcp
-unify 181/udp
-audit 182/tcp #Unisys Audit SITP
-audit 182/udp #Unisys Audit SITP
-ocbinder 183/tcp
-ocbinder 183/udp
-ocserver 184/tcp
-ocserver 184/udp
-remote-kis 185/tcp
-remote-kis 185/udp
-kis 186/tcp #KIS Protocol
-kis 186/udp #KIS Protocol
-aci 187/tcp #Application Communication Interface
-aci 187/udp #Application Communication Interface
-mumps 188/tcp #Plus Five's MUMPS
-mumps 188/udp #Plus Five's MUMPS
-qft 189/tcp #Queued File Transport
-qft 189/udp #Queued File Transport
-gacp 190/tcp #Gateway Access Control Protocol
-gacp 190/udp cacp #Gateway Access Control Protocol
-prospero 191/tcp #Prospero Directory Service
-prospero 191/udp #Prospero Directory Service
-osu-nms 192/tcp #OSU Network Monitoring System
-osu-nms 192/udp #OSU Network Monitoring System
-srmp 193/tcp #Spider Remote Monitoring Protocol
-srmp 193/udp #Spider Remote Monitoring Protocol
-irc 194/tcp #Internet Relay Chat Protocol
-irc 194/udp #Internet Relay Chat Protocol
-dn6-nlm-aud 195/tcp #DNSIX Network Level Module Audit
-dn6-nlm-aud 195/udp #DNSIX Network Level Module Audit
-dn6-smm-red 196/tcp #DNSIX Session Mgt Module Audit Redir
-dn6-smm-red 196/udp #DNSIX Session Mgt Module Audit Redir
-dls 197/tcp #Directory Location Service
-dls 197/udp #Directory Location Service
-dls-mon 198/tcp #Directory Location Service Monitor
-dls-mon 198/udp #Directory Location Service Monitor
-smux 199/tcp
-smux 199/udp
-src 200/tcp #IBM System Resource Controller
-src 200/udp #IBM System Resource Controller
-at-rtmp 201/tcp #AppleTalk Routing Maintenance
-at-rtmp 201/udp #AppleTalk Routing Maintenance
-at-nbp 202/tcp #AppleTalk Name Binding
-at-nbp 202/udp #AppleTalk Name Binding
-at-3 203/tcp #AppleTalk Unused
-at-3 203/udp #AppleTalk Unused
-at-echo 204/tcp #AppleTalk Echo
-at-echo 204/udp #AppleTalk Echo
-at-5 205/tcp #AppleTalk Unused
-at-5 205/udp #AppleTalk Unused
-at-zis 206/tcp #AppleTalk Zone Information
-at-zis 206/udp #AppleTalk Zone Information
-at-7 207/tcp #AppleTalk Unused
-at-7 207/udp #AppleTalk Unused
-at-8 208/tcp #AppleTalk Unused
-at-8 208/udp #AppleTalk Unused
-qmtp 209/tcp #The Quick Mail Transfer Protocol
-qmtp 209/udp #The Quick Mail Transfer Protocol
-#PROBLEMS!==============================================================
-#tam 209/tcp #Trivial Authenticated Mail Protocol
-#tam 209/udp #Trivial Authenticated Mail Protocol
-#PROBLEMS!==============================================================
-z39.50 210/tcp wais #ANSI Z39.50
-z39.50 210/udp wais #ANSI Z39.50
-914c/g 211/tcp #Texas Instruments 914C/G Terminal
-914c/g 211/udp #Texas Instruments 914C/G Terminal
-anet 212/tcp #ATEXSSTR
-anet 212/udp #ATEXSSTR
-ipx 213/tcp
-ipx 213/udp
-vmpwscs 214/tcp
-vmpwscs 214/udp
-softpc 215/tcp #Insignia Solutions
-softpc 215/udp #Insignia Solutions
-CAIlic 216/tcp atls #Computer Associates Int'l License Server
-CAIlic 216/udp atls #Computer Associates Int'l License Server
-dbase 217/tcp #dBASE Unix
-dbase 217/udp #dBASE Unix
-mpp 218/tcp #Netix Message Posting Protocol
-mpp 218/udp #Netix Message Posting Protocol
-uarps 219/tcp #Unisys ARPs
-uarps 219/udp #Unisys ARPs
-#imap3@220 was never used and never should have been allocated. See PR 46294.
-#imap3 220/tcp #Interactive Mail Access Protocol v3
-#imap3 220/udp #Interactive Mail Access Protocol v3
-fln-spx 221/tcp #Berkeley rlogind with SPX auth
-fln-spx 221/udp #Berkeley rlogind with SPX auth
-rsh-spx 222/tcp #Berkeley rshd with SPX auth
-rsh-spx 222/udp #Berkeley rshd with SPX auth
-cdc 223/tcp #Certificate Distribution Center
-cdc 223/udp #Certificate Distribution Center
-direct 242/tcp
-direct 242/udp
-sur-meas 243/tcp #Survey Measurement
-sur-meas 243/udp #Survey Measurement
-dayna 244/tcp
-dayna 244/udp
-link 245/tcp
-link 245/udp
-dsp3270 246/tcp #Display Systems Protocol
-dsp3270 246/udp #Display Systems Protocol
-subntbcst_tftp 247/tcp #subntbcst_tftp
-subntbcst_tftp 247/udp #subntbcst_tftp
-bhfhs 248/tcp
-bhfhs 248/udp
-# 249-255 reserved
-rap 256/tcp
-rap 256/udp
-set 257/tcp #secure electronic transaction
-set 257/udp #secure electronic transaction
-yak-chat 258/tcp #yak winsock personal chat
-yak-chat 258/udp #yak winsock personal chat
-esro-gen 259/tcp #efficient short remote operations
-esro-gen 259/udp #efficient short remote operations
-openport 260/tcp
-openport 260/udp
-nsiiops 261/tcp #iiop name service over tls/ssl
-nsiiops 261/udp #iiop name service over tls/ssl
-arcisdms 262/tcp
-arcisdms 262/udp
-hdap 263/tcp
-hdap 263/udp
-bgmp 264/tcp
-bgmp 264/udp
-# 265-279 unassigned
-http-mgmt 280/tcp
-http-mgmt 280/udp
-personal-link 281/tcp
-personal-link 281/udp
-cableport-ax 282/tcp #cable port a/x
-cableport-ax 282/udp #cable port a/x
-# 283-307 unassigned
-novastorbakcup 308/tcp #novastor backup
-novastorbakcup 308/udp #novastor backup
-entrusttime 309/tcp
-entrusttime 309/udp
-bhmds 310/tcp
-bhmds 310/udp
-asip-webadmin 311/tcp #appleshare ip webadmin
-asip-webadmin 311/udp #appleshare ip webadmin
-vslmp 312/tcp
-vslmp 312/udp
-magenta-logic 313/tcp
-magenta-logic 313/udp
-opalis-robot 314/tcp
-opalis-robot 314/udp
-dpsi 315/tcp
-dpsi 315/udp
-decauth 316/tcp
-decauth 316/udp
-zannet 317/tcp
-zannet 317/udp
-# 318-320 #unassigned
-pip 321/tcp
-pip 321/udp
-# 322-343 #unassigned
-pdap 344/tcp #Prospero Data Access Protocol
-pdap 344/udp #Prospero Data Access Protocol
-pawserv 345/tcp #Perf Analysis Workbench
-pawserv 345/udp #Perf Analysis Workbench
-zserv 346/tcp #Zebra server
-zserv 346/udp #Zebra server
-fatserv 347/tcp #Fatmen Server
-fatserv 347/udp #Fatmen Server
-csi-sgwp 348/tcp #Cabletron Management Protocol
-csi-sgwp 348/udp #Cabletron Management Protocol
-mftp 349/tcp
-mftp 349/udp
-matip-type-a 350/tcp #MATIP Type A
-matip-type-a 350/udp
-matip-type-b 351/tcp #MATIP Type B
-matip-type-b 351/udp
-bhoetty 351/tcp #unassigned but widespread use
-bhoetty 351/udp #unassigned but widespread use
-dtag-ste-sb 352/tcp #DTAG
-dtag-ste-sb 352/udp #DTAG
-bhoedap4 352/tcp #unassigned but widespread use
-bhoedap4 352/udp #unassigned but widespread use
-ndsauth 353/tcp
-ndsauth 353/udp
-bh611 354/tcp
-bh611 354/udp
-datex-asn 355/tcp
-datex-asn 355/udp
-cloanto-net-1 356/tcp #Cloanto Net 1
-cloanto-net-1 356/udp
-bhevent 357/tcp
-bhevent 357/udp
-shrinkwrap 358/tcp
-shrinkwrap 358/udp
-tenebris_nts 359/tcp #Tenebris Network Trace Service
-tenebris_nts 359/udp #Tenebris Network Trace Service
-scoi2odialog 360/tcp
-scoi2odialog 360/udp
-semantix 361/tcp
-semantix 361/udp
-srssend 362/tcp #SRS Send
-srssend 362/udp #SRS Send
-rsvp_tunnel 363/tcp
-rsvp_tunnel 363/udp
-aurora-cmgr 364/tcp
-aurora-cmgr 364/udp
-dtk 365/tcp #Deception Tool Kit - Fred Cohen <fc@all.net>
-dtk 365/udp #Deception Tool Kit - Fred Cohen <fc@all.net>
-odmr 366/tcp
-odmr 366/udp
-mortgageware 367/tcp
-mortgageware 367/udp
-qbikgdp 368/tcp #QbikGDP
-qbikgdp 368/udp
-rpc2portmap 369/tcp
-rpc2portmap 369/udp
-codaauth2 370/tcp
-codaauth2 370/udp
-clearcase 371/tcp
-clearcase 371/udp
-ulistserv 372/tcp ulistproc #Unix Listserv
-ulistserv 372/udp ulistproc #Unix Listserv
-legent-1 373/tcp #Legent Corporation (now Computer Associates Intl.)
-legent-1 373/udp #Legent Corporation (now Computer Associates Intl.)
-legent-2 374/tcp #Legent Corporation (now Computer Associates Intl.)
-legent-2 374/udp #Legent Corporation (now Computer Associates Intl.)
-hassle 375/tcp
-hassle 375/udp
-nip 376/tcp #Amiga Envoy Network Inquiry Proto
-nip 376/udp #Amiga Envoy Network Inquiry Proto
-tnETOS 377/tcp #NEC Corporation
-tnETOS 377/udp #NEC Corporation
-dsETOS 378/tcp #NEC Corporation
-dsETOS 378/udp #NEC Corporation
-is99c 379/tcp #TIA/EIA/IS-99 modem client
-is99c 379/udp #TIA/EIA/IS-99 modem client
-is99s 380/tcp #TIA/EIA/IS-99 modem server
-is99s 380/udp #TIA/EIA/IS-99 modem server
-hp-collector 381/tcp #hp performance data collector
-hp-collector 381/udp #hp performance data collector
-hp-managed-node 382/tcp #hp performance data managed node
-hp-managed-node 382/udp #hp performance data managed node
-hp-alarm-mgr 383/tcp #hp performance data alarm manager
-hp-alarm-mgr 383/udp #hp performance data alarm manager
-arns 384/tcp #A Remote Network Server System
-arns 384/udp #A Remote Network Server System
-ibm-app 385/tcp #IBM Application
-ibm-app 385/udp #IBM Application
-asa 386/tcp #ASA Message Router Object Def.
-asa 386/udp #ASA Message Router Object Def.
-aurp 387/tcp #Appletalk Update-Based Routing Pro.
-aurp 387/udp #Appletalk Update-Based Routing Pro.
-unidata-ldm 388/tcp #Unidata LDM Version 4
-unidata-ldm 388/udp #Unidata LDM Version 4
-ldap 389/tcp #Lightweight Directory Access Protocol
-ldap 389/udp #Lightweight Directory Access Protocol
-uis 390/tcp
-uis 390/udp
-synotics-relay 391/tcp #SynOptics SNMP Relay Port
-synotics-relay 391/udp #SynOptics SNMP Relay Port
-synotics-broker 392/tcp #SynOptics Port Broker Port
-synotics-broker 392/udp #SynOptics Port Broker Port
-dis 393/tcp #Data Interpretation System
-dis 393/udp #Data Interpretation System
-embl-ndt 394/tcp #EMBL Nucleic Data Transfer
-embl-ndt 394/udp #EMBL Nucleic Data Transfer
-netcp 395/tcp #NETscout Control Protocol
-netcp 395/udp #NETscout Control Protocol
-netware-ip 396/tcp #Novell Netware over IP
-netware-ip 396/udp #Novell Netware over IP
-mptn 397/tcp #Multi Protocol Trans. Net.
-mptn 397/udp #Multi Protocol Trans. Net.
-kryptolan 398/tcp
-kryptolan 398/udp
-iso-tsap-c2 399/tcp #ISO-TSAP Class 2
-iso-tsap-c2 399/udp #ISO-TSAP Class 2
-work-sol 400/tcp #Workstation Solutions
-work-sol 400/udp #Workstation Solutions
-ups 401/tcp #Uninterruptible Power Supply
-ups 401/udp #Uninterruptible Power Supply
-genie 402/tcp #Genie Protocol
-genie 402/udp #Genie Protocol
-decap 403/tcp
-decap 403/udp
-nced 404/tcp
-nced 404/udp
-ncld 405/tcp
-ncld 405/udp
-imsp 406/tcp #Interactive Mail Support Protocol
-imsp 406/udp #Interactive Mail Support Protocol
-timbuktu 407/tcp
-timbuktu 407/udp
-prm-sm 408/tcp #Prospero Resource Manager Sys. Man.
-prm-sm 408/udp #Prospero Resource Manager Sys. Man.
-prm-nm 409/tcp #Prospero Resource Manager Node Man.
-prm-nm 409/udp #Prospero Resource Manager Node Man.
-decladebug 410/tcp #DECLadebug Remote Debug Protocol
-decladebug 410/udp #DECLadebug Remote Debug Protocol
-rmt 411/tcp #Remote MT Protocol
-rmt 411/udp #Remote MT Protocol
-synoptics-trap 412/tcp #Trap Convention Port
-synoptics-trap 412/udp #Trap Convention Port
-smsp 413/tcp
-smsp 413/udp
-infoseek 414/tcp
-infoseek 414/udp
-bnet 415/tcp
-bnet 415/udp
-silverplatter 416/tcp
-silverplatter 416/udp
-onmux 417/tcp
-onmux 417/udp
-hyper-g 418/tcp
-hyper-g 418/udp
-ariel1 419/tcp
-ariel1 419/udp
-smpte 420/tcp
-smpte 420/udp
-ariel2 421/tcp
-ariel2 421/udp
-ariel3 422/tcp
-ariel3 422/udp
-opc-job-start 423/tcp #IBM Operations Planning and Control Start
-opc-job-start 423/udp #IBM Operations Planning and Control Start
-opc-job-track 424/tcp #IBM Operations Planning and Control Track
-opc-job-track 424/udp #IBM Operations Planning and Control Track
-icad-el 425/tcp
-icad-el 425/udp
-smartsdp 426/tcp
-smartsdp 426/udp
-svrloc 427/tcp #Server Location
-svrloc 427/udp #Server Location
-ocs_cmu 428/tcp
-ocs_cmu 428/udp
-ocs_amu 429/tcp
-ocs_amu 429/udp
-utmpsd 430/tcp
-utmpsd 430/udp
-utmpcd 431/tcp
-utmpcd 431/udp
-iasd 432/tcp
-iasd 432/udp
-nnsp 433/tcp
-nnsp 433/udp
-mobileip-agent 434/tcp
-mobileip-agent 434/udp
-mobilip-mn 435/tcp
-mobilip-mn 435/udp
-dna-cml 436/tcp
-dna-cml 436/udp
-comscm 437/tcp
-comscm 437/udp
-dsfgw 438/tcp
-dsfgw 438/udp
-dasp 439/tcp
-dasp 439/udp
-sgcp 440/tcp
-sgcp 440/udp
-decvms-sysmgt 441/tcp
-decvms-sysmgt 441/udp
-cvc_hostd 442/tcp
-cvc_hostd 442/udp
-https 443/tcp
-https 443/udp
-snpp 444/tcp #Simple Network Paging Protocol
-snpp 444/udp #Simple Network Paging Protocol
-# [RFC1568]
-microsoft-ds 445/tcp
-microsoft-ds 445/udp
-ddm-rdb 446/tcp
-ddm-rdb 446/udp
-ddm-dfm 447/tcp
-ddm-dfm 447/udp
-ddm-ssl 448/tcp ddm-byte
-ddm-ssl 448/udp ddm-byte
-as-servermap 449/tcp #AS Server Mapper
-as-servermap 449/udp #AS Server Mapper
-tserver 450/tcp
-tserver 450/udp
-sfs-smp-net 451/tcp #Cray Network Semaphore server
-sfs-smp-net 451/udp #Cray Network Semaphore server
-sfs-config 452/tcp #Cray SFS config server
-sfs-config 452/udp #Cray SFS config server
-creativeserver 453/tcp #CreativeServer
-creativeserver 453/udp #CreativeServer
-contentserver 454/tcp #ContentServer
-contentserver 454/udp #ContentServer
-creativepartnr 455/tcp #CreativePartnr
-creativepartnr 455/udp #CreativePartnr
-macon-tcp 456/tcp
-macon-udp 456/udp
-scohelp 457/tcp
-scohelp 457/udp
-appleqtc 458/tcp #apple quick time
-appleqtc 458/udp #apple quick time
-ampr-rcmd 459/tcp
-ampr-rcmd 459/udp
-skronk 460/tcp
-skronk 460/udp
-datasurfsrv 461/tcp
-datasurfsrv 461/udp
-datasurfsrvsec 462/tcp
-datasurfsrvsec 462/udp
-alpes 463/tcp
-alpes 463/udp
-#
-kpasswd5 464/tcp # Kerberos (v5)
-kpasswd5 464/udp # Kerberos (v5)
-#PROBLEMS!==============================================================
-# IANA has offically assigned these two ports as ``kpasswd''
-#kpasswd 464/tcp # Kerberos (v5)
-#kpasswd 464/udp # Kerberos (v5)
-#PROBLEMS!==============================================================
-smtps 465/tcp #smtp protocol over TLS/SSL (was ssmtp)
-smtps 465/udp #smtp protocol over TLS/SSL (was ssmtp)
-digital-vrc 466/tcp
-digital-vrc 466/udp
-mylex-mapd 467/tcp
-mylex-mapd 467/udp
-photuris 468/tcp
-photuris 468/udp
-rcp 469/tcp #Radio Control Protocol
-rcp 469/udp #Radio Control Protocol
-scx-proxy 470/tcp
-scx-proxy 470/udp
-mondex 471/tcp
-mondex 471/udp
-ljk-login 472/tcp
-ljk-login 472/udp
-hybrid-pop 473/tcp
-hybrid-pop 473/udp
-tn-tl-w1 474/tcp
-tn-tl-w2 474/udp
-tcpnethaspsrv 475/tcp
-tcpnethaspsrv 475/udp
-tn-tl-fd1 476/tcp
-tn-tl-fd1 476/udp
-ss7ns 477/tcp
-ss7ns 477/udp
-spsc 478/tcp
-spsc 478/udp
-iafserver 479/tcp
-iafserver 479/udp
-iafdbase 480/tcp
-iafdbase 480/udp
-ph 481/tcp
-ph 481/udp
-bgs-nsi 482/tcp
-bgs-nsi 482/udp
-ulpnet 483/tcp
-ulpnet 483/udp
-integra-sme 484/tcp #Integra Software Management Environment
-integra-sme 484/udp #Integra Software Management Environment
-powerburst 485/tcp #Air Soft Power Burst
-powerburst 485/udp #Air Soft Power Burst
-avian 486/tcp
-avian 486/udp
-saft 487/tcp #saft Simple Asynchronous File Transfer
-saft 487/udp #saft Simple Asynchronous File Transfer
-gss-http 488/tcp
-gss-http 488/udp
-nest-protocol 489/tcp
-nest-protocol 489/udp
-micom-pfs 490/tcp
-micom-pfs 490/udp
-go-login 491/tcp
-go-login 491/udp
-ticf-1 492/tcp #Transport Independent Convergence for FNA
-ticf-1 492/udp #Transport Independent Convergence for FNA
-ticf-2 493/tcp #Transport Independent Convergence for FNA
-ticf-2 493/udp #Transport Independent Convergence for FNA
-pov-ray 494/tcp
-pov-ray 494/udp
-intecourier 495/tcp
-intecourier 495/udp
-pim-rp-disc 496/tcp
-pim-rp-disc 496/udp
-dantz 497/tcp
-dantz 497/udp
-siam 498/tcp
-siam 498/udp
-iso-ill 499/tcp #ISO ILL Protocol
-iso-ill 499/udp #ISO ILL Protocol
-isakmp 500/tcp
-isakmp 500/udp
-stmf 501/tcp
-stmf 501/udp
-asa-appl-proto 502/tcp
-asa-appl-proto 502/udp
-intrinsa 503/tcp
-intrinsa 503/udp
-citadel 504/tcp
-citadel 504/udp
-mailbox-lm 505/tcp
-mailbox-lm 505/udp
-ohimsrv 506/tcp
-ohimsrv 506/udp
-crs 507/tcp
-crs 507/udp
-xvttp 508/tcp
-xvttp 508/udp
-snare 509/tcp
-snare 509/udp
-fcp 510/tcp #FirstClass Protocol
-fcp 510/udp #FirstClass Protocol
-passgo 511/tcp
-passgo 511/udp
-#
-# Berkeley-specific services
-#
-exec 512/tcp #remote process execution;
-# authentication performed using
-# passwords and UNIX login names
-biff 512/udp comsat #used by mail system to notify users
-# of new mail received; currently
-# receives messages only from
-# processes on the same machine
-login 513/tcp #remote login a la telnet;
-# automatic authentication performed
-# based on priviledged port numbers
-# and distributed data bases which
-# identify "authentication domains"
-who 513/udp whod #maintains data bases showing who's
-# logged in to machines on a local
-# net and the load average of the
-# machine
-shell 514/tcp cmd #like exec, but automatic
-# authentication is performed as for
-# login server
-syslog 514/udp
-printer 515/tcp spooler
-printer 515/udp spooler
-videotex 516/tcp
-videotex 516/udp
-talk 517/tcp #like tenex link, but across
-# machine - unfortunately, doesn't
-# use link protocol (this is actually
-# just a rendezvous port from which a
-# tcp connection is established)
-talk 517/udp #like tenex link, but across
-# machine - unfortunately, doesn't
-# use link protocol (this is actually
-# just a rendezvous port from which a
-# tcp connection is established)
-ntalk 518/tcp
-ntalk 518/udp
-utime 519/tcp unixtime
-utime 519/udp unixtime
-efs 520/tcp #extended file name server
-router 520/udp route routed #local routing process (on site);
-# uses variant of Xerox NS routing
-# information protocol
-ripng 521/tcp
-ripng 521/udp
-ulp 522/tcp
-ulp 522/udp
-ibm-db2 523/tcp
-ibm-db2 523/udp
-ncp 524/tcp
-ncp 524/udp
-timed 525/tcp timeserver
-timed 525/udp timeserver
-tempo 526/tcp newdate
-tempo 526/udp newdate
-stx 527/tcp #Stock IXChange
-stx 527/udp #Stock IXChange
-custix 528/tcp #Customer IXChange
-custix 528/udp #Customer IXChange
-irc-serv 529/tcp
-irc-serv 529/udp
-courier 530/tcp rpc
-courier 530/udp rpc
-conference 531/tcp chat
-conference 531/udp chat
-netnews 532/tcp readnews
-netnews 532/udp readnews
-netwall 533/tcp #for emergency broadcasts
-netwall 533/udp #for emergency broadcasts
-mm-admin 534/tcp #MegaMedia Admin
-mm-admin 534/udp #MegaMedia Admin
-iiop 535/tcp
-iiop 535/udp
-opalis-rdv 536/tcp
-opalis-rdv 536/udp
-nmsp 537/tcp #Networked Media Streaming Protocol
-nmsp 537/udp #Networked Media Streaming Protocol
-gdomap 538/tcp
-gdomap 538/udp
-apertus-ldp 539/tcp #Apertus Technologies Load Determination
-apertus-ldp 539/udp #Apertus Technologies Load Determination
-uucp 540/tcp uucpd
-uucp 540/udp uucpd
-uucp-rlogin 541/tcp
-uucp-rlogin 541/udp
-commerce 542/tcp
-commerce 542/udp
-klogin 543/tcp # Kerberos (v4/v5)
-klogin 543/udp # Kerberos (v4/v5)
-kshell 544/tcp krcmd # Kerberos (v4/v5)
-kshell 544/udp krcmd # Kerberos (v4/v5)
-appleqtcsrvr 545/tcp
-appleqtcsrvr 545/udp
-dhcpv6-client 546/tcp #DHCPv6 Client
-dhcpv6-client 546/udp #DHCPv6 Client
-dhcpv6-server 547/tcp #DHCPv6 Server
-dhcpv6-server 547/udp #DHCPv6 Server
-afpovertcp 548/tcp #AFP over TCP
-afpovertcp 548/udp #AFP over TCP
-idfp 549/tcp
-idfp 549/udp
-new-rwho 550/tcp new-who
-new-rwho 550/udp new-who
-cybercash 551/tcp
-cybercash 551/udp
-deviceshare 552/tcp
-deviceshare 552/udp
-pirp 553/tcp
-pirp 553/udp
-rtsp 554/tcp #Real Time Stream Control Protocol
-rtsp 554/udp #Real Time Stream Control Protocol
-dsf 555/tcp
-dsf 555/udp
-remotefs 556/tcp rfs rfs_server # Brunhoff remote filesystem
-remotefs 556/udp rfs rfs_server # Brunhoff remote filesystem
-openvms-sysipc 557/tcp
-openvms-sysipc 557/udp
-sdnskmp 558/tcp
-sdnskmp 558/udp
-teedtap 559/tcp
-teedtap 559/udp
-rmonitor 560/tcp rmonitord
-rmonitor 560/udp rmonitord
-monitor 561/tcp
-monitor 561/udp
-chshell 562/tcp chcmd
-chshell 562/udp chcmd
-nntps 563/tcp snntp #nntp protocol over TLS/SSL
-nntps 563/udp snntp #nntp protocol over TLS/SSL
-9pfs 564/tcp #plan 9 file service
-9pfs 564/udp #plan 9 file service
-whoami 565/tcp
-whoami 565/udp
-streettalk 566/tcp
-banyan-rpc 567/tcp
-banyan-rpc 567/udp
-ms-shuttle 568/tcp #Microsoft shuttle
-ms-shuttle 568/udp #Microsoft shuttle
-ms-rome 569/tcp #Microsoft rome
-ms-rome 569/udp #Microsoft rome
-meter 570/tcp #demon
-meter 570/udp #demon
-umeter 571/tcp #udemon
-umeter 571/udp #udemon
-sonar 572/tcp
-sonar 572/udp
-banyan-vip 573/tcp
-banyan-vip 573/udp
-ftp-agent 574/tcp #FTP Software Agent System
-ftp-agent 574/udp #FTP Software Agent System
-vemmi 575/tcp
-vemmi 575/udp
-ipcd 576/tcp
-ipcd 576/udp
-vnas 577/tcp
-vnas 577/udp
-ipdd 578/tcp
-ipdd 578/udp
-decbsrv 579/tcp
-decbsrv 579/udp
-sntp-heartbeat 580/tcp
-sntp-heartbeat 580/udp
-bdp 581/tcp #Bundle Discovery Protocol
-bdp 581/udp #Bundle Discovery Protocol
-scc-security 582/tcp
-scc-security 582/udp
-philips-vc 583/tcp #Philips Video-Conferencing
-philips-vc 583/udp #Philips Video-Conferencing
-keyserver 584/tcp
-keyserver 584/udp
-#imap4-ssl@585 never should have been allocated. See PR 46294.
-#imap4-ssl 585/tcp #IMAP4+SSL (use of 585 is not recommended,
-#imap4-ssl 585/udp # use 993 instead)
-password-chg 586/tcp
-password-chg 586/udp
-submission 587/tcp
-submission 587/udp
-cal 588/tcp
-cal 588/udp
-eyelink 589/tcp
-eyelink 589/udp
-tns-cml 590/tcp
-tns-cml 590/udp
-http-alt 591/tcp #FileMaker, Inc. - HTTP Alternate (see Port 80)
-http-alt 591/udp #FileMaker, Inc. - HTTP Alternate (see Port 80)
-eudora-set 592/tcp
-eudora-set 592/udp
-http-rpc-epmap 593/tcp #HTTP RPC Ep Map
-http-rpc-epmap 593/udp #HTTP RPC Ep Map
-tpip 594/tcp
-tpip 594/udp
-cab-protocol 595/tcp
-cab-protocol 595/udp
-smsd 596/tcp
-smsd 596/udp
-ptcnameservice 597/tcp #PTC Name Service
-ptcnameservice 597/udp #PTC Name Service
-sco-websrvrmg3 598/tcp #SCO Web Server Manager 3
-sco-websrvrmg3 598/udp #SCO Web Server Manager 3
-acp 599/tcp #Aeolon Core Protocol
-acp 599/udp #Aeolon Core Protocol
-ipcserver 600/tcp #Sun IPC server
-ipcserver 600/udp #Sun IPC server
-nqs 607/tcp
-nqs 607/udp
-urm 606/tcp #Cray Unified Resource Manager
-urm 606/udp #Cray Unified Resource Manager
-sift-uft 608/tcp #Sender-Initiated/Unsolicited File Transfer
-sift-uft 608/udp #Sender-Initiated/Unsolicited File Transfer
-npmp-trap 609/tcp
-npmp-trap 609/udp
-npmp-local 610/tcp
-npmp-local 610/udp
-npmp-gui 611/tcp
-npmp-gui 611/udp
-sshell 614/tcp #SSLshell
-sshell 614/udp
-ipp 631/tcp #IPP (Internet Printing Protocol)
-ipp 631/udp #IPP (Internet Printing Protocol)
-ginad 634/tcp
-ginad 634/udp
-ldaps 636/tcp sldap #ldap protocol over TLS/SSL
-ldaps 636/udp sldap
-mdqs 666/tcp
-mdqs 666/udp
-#PROBLEMS!===============================================
-doom 666/tcp #doom Id Software
-doom 666/udp #doom Id Software
-#PROBLEMS!===============================================
-acap 674/tcp #Application Configuration Access Protocol
-acap 674/udp #Application Configuration Access Protocol
-elcsd 704/tcp #errlog copy/server daemon
-elcsd 704/udp #errlog copy/server daemon
-entrustmanager 709/tcp #EntrustManager
-entrustmanager 709/udp #EntrustManager
-netviewdm1 729/tcp #IBM NetView DM/6000 Server/Client
-netviewdm1 729/udp #IBM NetView DM/6000 Server/Client
-netviewdm2 730/tcp #IBM NetView DM/6000 send/tcp
-netviewdm2 730/udp #IBM NetView DM/6000 send/tcp
-netviewdm3 731/tcp #IBM NetView DM/6000 receive/tcp
-netviewdm3 731/udp #IBM NetView DM/6000 receive/tcp
-netgw 741/tcp
-netgw 741/udp
-netrcs 742/tcp #Network based Rev. Cont. Sys.
-netrcs 742/udp #Network based Rev. Cont. Sys.
-flexlm 744/tcp #Flexible License Manager
-flexlm 744/udp #Flexible License Manager
-fujitsu-dev 747/tcp #Fujitsu Device Control
-fujitsu-dev 747/udp #Fujitsu Device Control
-ris-cm 748/tcp #Russell Info Sci Calendar Manager
-ris-cm 748/udp #Russell Info Sci Calendar Manager
-kerberos-adm 749/tcp #Kerberos administration (v5)
-kerberos-adm 749/udp #Kerberos administration (v5)
-kerberos-iv 750/udp kdc # Kerberos (v4)
-kerberos-iv 750/tcp kdc # Kerberos (v4)
-#PROBLEMS!========================================================
-#rfile 750/tcp
-#loadav 750/udp
-#PROBLEMS!========================================================
-kerberos_master 751/tcp # Kerberos `kadmin' (v4)
-kerberos_master 751/udp # Kerberos `kadmin' (v4)
-#PROBLEMS!========================================================
-pump 751/tcp
-pump 751/udp
-#PROBLEMS!========================================================
-qrh 752/tcp
-qrh 752/udp
-rrh 753/tcp
-rrh 753/udp
-krb_prop 754/tcp krb5_prop # kerberos/v5 server propagation
-#PROBLEMS!========================================================
-tell 754/tcp #send
-#PROBLEMS!========================================================
-tell 754/udp #send
-nlogin 758/tcp
-nlogin 758/udp
-con 759/tcp
-con 759/udp
-krbupdate 760/tcp kreg # Kerberos (v4) registration
-#PROBLEMS!========================================================
-ns 760/tcp
-#PROBLEMS!========================================================
-ns 760/udp
-kpasswd 761/tcp kpwd # Kerberos (v4) "passwd"
-#PROBLEMS!========================================================
-rxe 761/tcp
-#PROBLEMS!========================================================
-rxe 761/udp
-quotad 762/tcp
-quotad 762/udp
-cycleserv 763/tcp
-cycleserv 763/udp
-omserv 764/tcp
-omserv 764/udp
-webster 765/tcp
-webster 765/udp
-phonebook 767/tcp #phone
-phonebook 767/udp #phone
-vid 769/tcp
-vid 769/udp
-cadlock 770/tcp
-cadlock 770/udp
-rtip 771/tcp
-rtip 771/udp
-cycleserv2 772/tcp
-cycleserv2 772/udp
-submit 773/tcp
-notify 773/udp
-rpasswd 774/tcp
-acmaint_dbd 774/udp
-entomb 775/tcp
-acmaint_transd 775/udp
-wpages 776/tcp
-wpages 776/udp
-wpgs 780/tcp
-wpgs 780/udp
-concert 786/tcp
-concert 786/udp
-mdbs_daemon 800/tcp
-mdbs_daemon 800/udp
-device 801/tcp
-device 801/udp
-supfilesrv 871/tcp # for SUP
-rsync 873/tcp
-rsync 873/udp
-accessbuilder 888/tcp
-accessbuilder 888/udp
-swat 901/tcp # samba web configuration tool
-ftps-data 989/tcp # ftp protocol, data, over TLS/SSL
-ftps-data 989/udp
-ftps 990/tcp # ftp protocol, control, over TLS/SSL
-ftps 990/udp
-telnets 992/tcp # telnet protocol over TLS/SSL
-telnets 992/udp
-imaps 993/tcp # imap4 protocol over TLS/SSL
-imaps 993/udp
-ircs 994/tcp # irc protocol over TLS/SSL
-ircs 994/udp
-pop3s 995/tcp spop3 # pop3 protocol over TLS/SSL
-pop3s 995/udp spop3
-vsinet 996/tcp
-vsinet 996/udp
-maitrd 997/tcp
-maitrd 997/udp
-busboy 998/tcp
-puparp 998/udp
-garcon 999/tcp
-applix 999/udp #Applix ac
-puprouter 999/tcp
-puprouter 999/udp
-cadlock 1000/tcp
-ock 1000/udp
-#
-# REGISTERED PORT NUMBERS
-#
-blackjack 1025/tcp #network blackjack
-blackjack 1025/udp #network blackjack
-iad1 1030/tcp #BBN IAD
-iad1 1030/udp #BBN IAD
-iad2 1031/tcp #BBN IAD
-iad2 1031/udp #BBN IAD
-iad3 1032/tcp #BBN IAD
-iad3 1032/udp #BBN IAD
-nim 1058/tcp
-nim 1058/udp
-nimreg 1059/tcp
-nimreg 1059/udp
-instl_boots 1067/tcp #Installation Bootstrap Proto. Serv.
-instl_boots 1067/udp #Installation Bootstrap Proto. Serv.
-instl_bootc 1068/tcp #Installation Bootstrap Proto. Cli.
-instl_bootc 1068/udp #Installation Bootstrap Proto. Cli.
-socks 1080/tcp
-socks 1080/udp
-ansoft-lm-1 1083/tcp #Anasoft License Manager
-ansoft-lm-1 1083/udp #Anasoft License Manager
-ansoft-lm-2 1084/tcp #Anasoft License Manager
-ansoft-lm-2 1084/udp #Anasoft License Manager
-webobjects 1085/tcp #Web Objects
-webobjects 1085/udp #Web Objects
-kpop 1109/tcp #Unofficial
-kpop 1109/udp #Unofficial
-nfsd-status 1110/tcp #Cluster status info
-nfsd-keepalive 1110/udp #Client status info
-supfiledbg 1127/tcp # for SUP
-nfa 1155/tcp #Network File Access
-nfa 1155/udp #Network File Access
-phone 1167/udp #conference calling
-skkserv 1178/tcp #SKK (kanji input)
-lupa 1212/tcp
-lupa 1212/udp
-nerv 1222/tcp #SNI R&D network
-nerv 1222/udp #SNI R&D network
-hermes 1248/tcp
-hermes 1248/udp
-healthd 1281/tcp #healthd
-healthd 1281/udp #healthd
-alta-ana-lm 1346/tcp #Alta Analytics License Manager
-alta-ana-lm 1346/udp #Alta Analytics License Manager
-bbn-mmc 1347/tcp #multi media conferencing
-bbn-mmc 1347/udp #multi media conferencing
-bbn-mmx 1348/tcp #multi media conferencing
-bbn-mmx 1348/udp #multi media conferencing
-sbook 1349/tcp #Registration Network Protocol
-sbook 1349/udp #Registration Network Protocol
-editbench 1350/tcp #Registration Network Protocol
-editbench 1350/udp #Registration Network Protocol
-equationbuilder 1351/tcp #Digital Tool Works (MIT)
-equationbuilder 1351/udp #Digital Tool Works (MIT)
-lotusnote 1352/tcp #Lotus Note
-lotusnote 1352/udp #Lotus Note
-relief 1353/tcp #Relief Consulting
-relief 1353/udp #Relief Consulting
-rightbrain 1354/tcp #RightBrain Software
-rightbrain 1354/udp #RightBrain Software
-intuitive-edge 1355/tcp #Intuitive Edge
-intuitive-edge 1355/udp #Intuitive Edge
-cuillamartin 1356/tcp #CuillaMartin Company
-cuillamartin 1356/udp #CuillaMartin Company
-pegboard 1357/tcp #Electronic PegBoard
-pegboard 1357/udp #Electronic PegBoard
-connlcli 1358/tcp
-connlcli 1358/udp
-ftsrv 1359/tcp
-ftsrv 1359/udp
-mimer 1360/tcp
-mimer 1360/udp
-linx 1361/tcp
-linx 1361/udp
-timeflies 1362/tcp
-timeflies 1362/udp
-ndm-requester 1363/tcp #Network DataMover Requester
-ndm-requester 1363/udp #Network DataMover Requester
-ndm-server 1364/tcp #Network DataMover Server
-ndm-server 1364/udp #Network DataMover Server
-adapt-sna 1365/tcp #Network Software Associates
-adapt-sna 1365/udp #Network Software Associates
-netware-csp 1366/tcp #Novell NetWare Comm Service Platform
-netware-csp 1366/udp #Novell NetWare Comm Service Platform
-dcs 1367/tcp
-dcs 1367/udp
-screencast 1368/tcp
-screencast 1368/udp
-gv-us 1369/tcp #GlobalView to Unix Shell
-gv-us 1369/udp #GlobalView to Unix Shell
-us-gv 1370/tcp #Unix Shell to GlobalView
-us-gv 1370/udp #Unix Shell to GlobalView
-fc-cli 1371/tcp #Fujitsu Config Protocol
-fc-cli 1371/udp #Fujitsu Config Protocol
-fc-ser 1372/tcp #Fujitsu Config Protocol
-fc-ser 1372/udp #Fujitsu Config Protocol
-chromagrafx 1373/tcp
-chromagrafx 1373/udp
-molly 1374/tcp #EPI Software Systems
-molly 1374/udp #EPI Software Systems
-bytex 1375/tcp
-bytex 1375/udp
-ibm-pps 1376/tcp #IBM Person to Person Software
-ibm-pps 1376/udp #IBM Person to Person Software
-cichlid 1377/tcp #Cichlid License Manager
-cichlid 1377/udp #Cichlid License Manager
-elan 1378/tcp #Elan License Manager
-elan 1378/udp #Elan License Manager
-dbreporter 1379/tcp #Integrity Solutions
-dbreporter 1379/udp #Integrity Solutions
-telesis-licman 1380/tcp #Telesis Network License Manager
-telesis-licman 1380/udp #Telesis Network License Manager
-apple-licman 1381/tcp #Apple Network License Manager
-apple-licman 1381/udp #Apple Network License Manager
-#udt_os 1382/tcp
-#udt_os 1382/udp
-gwha 1383/tcp #GW Hannaway Network License Manager
-gwha 1383/udp #GW Hannaway Network License Manager
-os-licman 1384/tcp #Objective Solutions License Manager
-os-licman 1384/udp #Objective Solutions License Manager
-atex_elmd 1385/tcp #Atex Publishing License Manager
-atex_elmd 1385/udp #Atex Publishing License Manager
-checksum 1386/tcp #CheckSum License Manager
-checksum 1386/udp #CheckSum License Manager
-cadsi-lm 1387/tcp #Computer Aided Design Software Inc LM
-cadsi-lm 1387/udp #Computer Aided Design Software Inc LM
-objective-dbc 1388/tcp #Objective Solutions DataBase Cache
-objective-dbc 1388/udp #Objective Solutions DataBase Cache
-iclpv-dm 1389/tcp #Document Manager
-iclpv-dm 1389/udp #Document Manager
-iclpv-sc 1390/tcp #Storage Controller
-iclpv-sc 1390/udp #Storage Controller
-iclpv-sas 1391/tcp #Storage Access Server
-iclpv-sas 1391/udp #Storage Access Server
-iclpv-pm 1392/tcp #Print Manager
-iclpv-pm 1392/udp #Print Manager
-iclpv-nls 1393/tcp #Network Log Server
-iclpv-nls 1393/udp #Network Log Server
-iclpv-nlc 1394/tcp #Network Log Client
-iclpv-nlc 1394/udp #Network Log Client
-iclpv-wsm 1395/tcp #PC Workstation Manager software
-iclpv-wsm 1395/udp #PC Workstation Manager software
-dvl-activemail 1396/tcp #DVL Active Mail
-dvl-activemail 1396/udp #DVL Active Mail
-audio-activmail 1397/tcp #Audio Active Mail
-audio-activmail 1397/udp #Audio Active Mail
-video-activmail 1398/tcp #Video Active Mail
-video-activmail 1398/udp #Video Active Mail
-cadkey-licman 1399/tcp #Cadkey License Manager
-cadkey-licman 1399/udp #Cadkey License Manager
-cadkey-tablet 1400/tcp #Cadkey Tablet Daemon
-cadkey-tablet 1400/udp #Cadkey Tablet Daemon
-goldleaf-licman 1401/tcp #Goldleaf License Manager
-goldleaf-licman 1401/udp #Goldleaf License Manager
-prm-sm-np 1402/tcp #Prospero Resource Manager
-prm-sm-np 1402/udp #Prospero Resource Manager
-prm-nm-np 1403/tcp #Prospero Resource Manager
-prm-nm-np 1403/udp #Prospero Resource Manager
-igi-lm 1404/tcp #Infinite Graphics License Manager
-igi-lm 1404/udp #Infinite Graphics License Manager
-ibm-res 1405/tcp #IBM Remote Execution Starter
-ibm-res 1405/udp #IBM Remote Execution Starter
-netlabs-lm 1406/tcp #NetLabs License Manager
-netlabs-lm 1406/udp #NetLabs License Manager
-dbsa-lm 1407/tcp #DBSA License Manager
-dbsa-lm 1407/udp #DBSA License Manager
-sophia-lm 1408/tcp #Sophia License Manager
-sophia-lm 1408/udp #Sophia License Manager
-here-lm 1409/tcp #Here License Manager
-here-lm 1409/udp #Here License Manager
-hiq 1410/tcp #HiQ License Manager
-hiq 1410/udp #HiQ License Manager
-af 1411/tcp #AudioFile
-af 1411/udp #AudioFile
-innosys 1412/tcp
-innosys 1412/udp
-innosys-acl 1413/tcp
-innosys-acl 1413/udp
-ibm-mqseries 1414/tcp #IBM MQSeries
-ibm-mqseries 1414/udp #IBM MQSeries
-dbstar 1415/tcp
-dbstar 1415/udp
-novell-lu6.2 1416/tcp #Novell LU6.2
-novell-lu6.2 1416/udp #Novell LU6.2
-timbuktu-srv1 1417/tcp #Timbuktu Service 1 Port
-timbuktu-srv1 1417/udp #Timbuktu Service 1 Port
-timbuktu-srv2 1418/tcp #Timbuktu Service 2 Port
-timbuktu-srv2 1418/udp #Timbuktu Service 2 Port
-timbuktu-srv3 1419/tcp #Timbuktu Service 3 Port
-timbuktu-srv3 1419/udp #Timbuktu Service 3 Port
-timbuktu-srv4 1420/tcp #Timbuktu Service 4 Port
-timbuktu-srv4 1420/udp #Timbuktu Service 4 Port
-gandalf-lm 1421/tcp #Gandalf License Manager
-gandalf-lm 1421/udp #Gandalf License Manager
-autodesk-lm 1422/tcp #Autodesk License Manager
-autodesk-lm 1422/udp #Autodesk License Manager
-essbase 1423/tcp #Essbase Arbor Software
-essbase 1423/udp #Essbase Arbor Software
-hybrid 1424/tcp #Hybrid Encryption Protocol
-hybrid 1424/udp #Hybrid Encryption Protocol
-zion-lm 1425/tcp #Zion Software License Manager
-zion-lm 1425/udp #Zion Software License Manager
-sas-1 1426/tcp #Satellite-data Acquisition System 1
-sas-1 1426/udp #Satellite-data Acquisition System 1
-mloadd 1427/tcp #mloadd monitoring tool
-mloadd 1427/udp #mloadd monitoring tool
-informatik-lm 1428/tcp #Informatik License Manager
-informatik-lm 1428/udp #Informatik License Manager
-nms 1429/tcp #Hypercom NMS
-nms 1429/udp #Hypercom NMS
-tpdu 1430/tcp #Hypercom TPDU
-tpdu 1430/udp #Hypercom TPDU
-rgtp 1431/tcp #Reverse Gossip Transport
-rgtp 1431/udp #Reverse Gossip Transport
-blueberry-lm 1432/tcp #Blueberry Software License Manager
-blueberry-lm 1432/udp #Blueberry Software License Manager
-ms-sql-s 1433/tcp #Microsoft-SQL-Server
-ms-sql-s 1433/udp #Microsoft-SQL-Server
-ms-sql-m 1434/tcp #Microsoft-SQL-Monitor
-ms-sql-m 1434/udp #Microsoft-SQL-Monitor
-ibm-cics 1435/tcp
-ibm-cics 1435/udp
-sas-2 1436/tcp #Satellite-data Acquisition System 2
-sas-2 1436/udp #Satellite-data Acquisition System 2
-tabula 1437/tcp
-tabula 1437/udp
-eicon-server 1438/tcp #Eicon Security Agent/Server
-eicon-server 1438/udp #Eicon Security Agent/Server
-eicon-x25 1439/tcp #Eicon X25/SNA Gateway
-eicon-x25 1439/udp #Eicon X25/SNA Gateway
-eicon-slp 1440/tcp #Eicon Service Location Protocol
-eicon-slp 1440/udp #Eicon Service Location Protocol
-cadis-1 1441/tcp #Cadis License Management
-cadis-1 1441/udp #Cadis License Management
-cadis-2 1442/tcp #Cadis License Management
-cadis-2 1442/udp #Cadis License Management
-ies-lm 1443/tcp #Integrated Engineering Software
-ies-lm 1443/udp #Integrated Engineering Software
-marcam-lm 1444/tcp #Marcam License Management
-marcam-lm 1444/udp #Marcam License Management
-proxima-lm 1445/tcp #Proxima License Manager
-proxima-lm 1445/udp #Proxima License Manager
-ora-lm 1446/tcp #Optical Research Associates License Manager
-ora-lm 1446/udp #Optical Research Associates License Manager
-apri-lm 1447/tcp #Applied Parallel Research LM
-apri-lm 1447/udp #Applied Parallel Research LM
-oc-lm 1448/tcp #OpenConnect License Manager
-oc-lm 1448/udp #OpenConnect License Manager
-peport 1449/tcp
-peport 1449/udp
-dwf 1450/tcp #Tandem Distributed Workbench Facility
-dwf 1450/udp #Tandem Distributed Workbench Facility
-infoman 1451/tcp #IBM Information Management
-infoman 1451/udp #IBM Information Management
-gtegsc-lm 1452/tcp #GTE Government Systems License Man
-gtegsc-lm 1452/udp #GTE Government Systems License Man
-genie-lm 1453/tcp #Genie License Manager
-genie-lm 1453/udp #Genie License Manager
-interhdl_elmd 1454/tcp #interHDL License Manager
-interhdl_elmd 1454/udp #interHDL License Manager
-esl-lm 1455/tcp #ESL License Manager
-esl-lm 1455/udp #ESL License Manager
-dca 1456/tcp
-dca 1456/udp
-valisys-lm 1457/tcp #Valisys License Manager
-valisys-lm 1457/udp #Valisys License Manager
-nrcabq-lm 1458/tcp #Nichols Research Corp.
-nrcabq-lm 1458/udp #Nichols Research Corp.
-proshare1 1459/tcp #Proshare Notebook Application
-proshare1 1459/udp #Proshare Notebook Application
-proshare2 1460/tcp #Proshare Notebook Application
-proshare2 1460/udp #Proshare Notebook Application
-ibm_wrless_lan 1461/tcp #IBM Wireless LAN
-ibm_wrless_lan 1461/udp #IBM Wireless LAN
-world-lm 1462/tcp #World License Manager
-world-lm 1462/udp #World License Manager
-nucleus 1463/tcp
-nucleus 1463/udp
-msl_lmd 1464/tcp #MSL License Manager
-msl_lmd 1464/udp #MSL License Manager
-pipes 1465/tcp #Pipes Platform
-pipes 1465/udp #Pipes Platform mfarlin@peerlogic.com
-oceansoft-lm 1466/tcp #Ocean Software License Manager
-oceansoft-lm 1466/udp #Ocean Software License Manager
-csdmbase 1467/tcp
-csdmbase 1467/udp
-csdm 1468/tcp
-csdm 1468/udp
-aal-lm 1469/tcp #Active Analysis Limited License Manager
-aal-lm 1469/udp #Active Analysis Limited License Manager
-uaiact 1470/tcp #Universal Analytics
-uaiact 1470/udp #Universal Analytics
-csdmbase 1471/tcp
-csdmbase 1471/udp
-csdm 1472/tcp
-csdm 1472/udp
-openmath 1473/tcp
-openmath 1473/udp
-telefinder 1474/tcp
-telefinder 1474/udp
-taligent-lm 1475/tcp #Taligent License Manager
-taligent-lm 1475/udp #Taligent License Manager
-clvm-cfg 1476/tcp
-clvm-cfg 1476/udp
-ms-sna-server 1477/tcp
-ms-sna-server 1477/udp
-ms-sna-base 1478/tcp
-ms-sna-base 1478/udp
-dberegister 1479/tcp
-dberegister 1479/udp
-pacerforum 1480/tcp
-pacerforum 1480/udp
-airs 1481/tcp
-airs 1481/udp
-miteksys-lm 1482/tcp #Miteksys License Manager
-miteksys-lm 1482/udp #Miteksys License Manager
-afs 1483/tcp #AFS License Manager
-afs 1483/udp #AFS License Manager
-confluent 1484/tcp #Confluent License Manager
-confluent 1484/udp #Confluent License Manager
-lansource 1485/tcp
-lansource 1485/udp
-nms_topo_serv 1486/tcp
-nms_topo_serv 1486/udp
-localinfosrvr 1487/tcp
-localinfosrvr 1487/udp
-docstor 1488/tcp
-docstor 1488/udp
-dmdocbroker 1489/tcp
-dmdocbroker 1489/udp
-insitu-conf 1490/tcp
-insitu-conf 1490/udp
-anynetgateway 1491/tcp
-anynetgateway 1491/udp
-stone-design-1 1492/tcp
-stone-design-1 1492/udp
-netmap_lm 1493/tcp
-netmap_lm 1493/udp
-ica 1494/tcp
-ica 1494/udp
-cvc 1495/tcp
-cvc 1495/udp
-liberty-lm 1496/tcp
-liberty-lm 1496/udp
-rfx-lm 1497/tcp
-rfx-lm 1497/udp
-watcom-sql 1498/tcp
-watcom-sql 1498/udp
-fhc 1499/tcp #Federico Heinz Consultora
-fhc 1499/udp #Federico Heinz Consultora
-vlsi-lm 1500/tcp #VLSI License Manager
-vlsi-lm 1500/udp #VLSI License Manager
-sas-3 1501/tcp #Satellite-data Acquisition System 3
-sas-3 1501/udp #Satellite-data Acquisition System 3
-shivadiscovery 1502/tcp #Shiva
-shivadiscovery 1502/udp #Shiva
-imtc-mcs 1503/tcp #Databeam
-imtc-mcs 1503/udp #Databeam
-evb-elm 1504/tcp #EVB Software Engineering License Manager
-evb-elm 1504/udp #EVB Software Engineering License Manager
-funkproxy 1505/tcp #Funk Software, Inc.
-funkproxy 1505/udp #Funk Software, Inc.
-utcd 1506/tcp #Universal Time daemon (utcd)
-utcd 1506/udp #Universal Time daemon (utcd)
-symplex 1507/tcp
-symplex 1507/udp
-diagmond 1508/tcp
-diagmond 1508/udp
-robcad-lm 1509/tcp #Robcad, Ltd. License Manager
-robcad-lm 1509/udp #Robcad, Ltd. License Manager
-mvx-lm 1510/tcp #Midland Valley Exploration Ltd. Lic. Man.
-mvx-lm 1510/udp #Midland Valley Exploration Ltd. Lic. Man.
-3l-l1 1511/tcp
-3l-l1 1511/udp
-wins 1512/tcp #Microsoft's Windows Internet Name Service
-wins 1512/udp #Microsoft's Windows Internet Name Service
-fujitsu-dtc 1513/tcp #Fujitsu Systems Business of America, Inc
-fujitsu-dtc 1513/udp #Fujitsu Systems Business of America, Inc
-fujitsu-dtcns 1514/tcp #Fujitsu Systems Business of America, Inc
-fujitsu-dtcns 1514/udp #Fujitsu Systems Business of America, Inc
-ifor-protocol 1515/tcp
-ifor-protocol 1515/udp
-vpad 1516/tcp #Virtual Places Audio data
-vpad 1516/udp #Virtual Places Audio data
-vpac 1517/tcp #Virtual Places Audio control
-vpac 1517/udp #Virtual Places Audio control
-vpvd 1518/tcp #Virtual Places Video data
-vpvd 1518/udp #Virtual Places Video data
-vpvc 1519/tcp #Virtual Places Video control
-vpvc 1519/udp #Virtual Places Video control
-atm-zip-office 1520/tcp #atm zip office
-atm-zip-office 1520/udp #atm zip office
-ncube-lm 1521/tcp #nCube License Manager
-ncube-lm 1521/udp #nCube License Manager
-rna-lm 1522/tcp #Ricardo North America License Manager
-rna-lm 1522/udp #Ricardo North America License Manager
-cichild-lm 1523/tcp
-cichild-lm 1523/udp
-ingreslock 1524/tcp #ingres
-ingreslock 1524/udp #ingres
-prospero-np 1525/tcp #Prospero Directory Service non-priv
-prospero-np 1525/udp #Prospero Directory Service non-priv
-#PROBLEMS!========================================================
-orasrv 1525/tcp #oracle
-orasrv 1525/udp #oracle
-#PROBLEMS!========================================================
-pdap-np 1526/tcp #Prospero Data Access Prot non-priv
-pdap-np 1526/udp #Prospero Data Access Prot non-priv
-tlisrv 1527/tcp #oracle
-tlisrv 1527/udp #oracle
-mciautoreg 1528/tcp
-mciautoreg 1528/udp
-support 1529/tcp prmsd gnatsd # cygnus bug tracker
-coauthor 1529/tcp #oracle
-coauthor 1529/udp #oracle
-rap-service 1530/tcp
-rap-service 1530/udp
-rap-listen 1531/tcp
-rap-listen 1531/udp
-miroconnect 1532/tcp
-miroconnect 1532/udp
-virtual-places 1533/tcp #Virtual Places Software
-virtual-places 1533/udp #Virtual Places Software
-micromuse-lm 1534/tcp
-micromuse-lm 1534/udp
-ampr-info 1535/tcp
-ampr-info 1535/udp
-ampr-inter 1536/tcp
-ampr-inter 1536/udp
-sdsc-lm 1537/tcp
-sdsc-lm 1537/udp
-3ds-lm 1538/tcp
-3ds-lm 1538/udp
-intellistor-lm 1539/tcp #Intellistor License Manager
-intellistor-lm 1539/udp #Intellistor License Manager
-rds 1540/tcp
-rds 1540/udp
-rds2 1541/tcp
-rds2 1541/udp
-gridgen-elmd 1542/tcp
-gridgen-elmd 1542/udp
-simba-cs 1543/tcp
-simba-cs 1543/udp
-aspeclmd 1544/tcp
-aspeclmd 1544/udp
-vistium-share 1545/tcp
-vistium-share 1545/udp
-abbaccuray 1546/tcp
-abbaccuray 1546/udp
-laplink 1547/tcp
-laplink 1547/udp
-axon-lm 1548/tcp #Axon License Manager
-axon-lm 1548/udp #Axon License Manager
-shivahose 1549/tcp #Shiva Hose
-shivasound 1549/udp #Shiva Sound
-3m-image-lm 1550/tcp #Image Storage license manager 3M Company
-3m-image-lm 1550/udp #Image Storage license manager 3M Company
-hecmtl-db 1551/tcp
-hecmtl-db 1551/udp
-pciarray 1552/tcp
-pciarray 1552/udp
-issd 1600/tcp
-issd 1600/udp
-# IMPORTANT NOTE: Ports 1645/1646 are the traditional radius ports used by
-# many vendors without obtaining official IANA assignment. The official
-# assignment is now ports 1812/1813 and users are encouraged to migrate
-# when possible to these new ports.
-#radius 1645/udp #RADIUS authentication protocol (old)
-#radacct 1646/udp #RADIUS accounting protocol (old)
-nkd 1650/tcp
-nkd 1650/udp
-shiva_confsrvr 1651/tcp
-shiva_confsrvr 1651/udp
-xnmp 1652/tcp
-xnmp 1652/udp
-netview-aix-1 1661/tcp
-netview-aix-1 1661/udp
-netview-aix-2 1662/tcp
-netview-aix-2 1662/udp
-netview-aix-3 1663/tcp
-netview-aix-3 1663/udp
-netview-aix-4 1664/tcp
-netview-aix-4 1664/udp
-netview-aix-5 1665/tcp
-netview-aix-5 1665/udp
-netview-aix-6 1666/tcp
-netview-aix-6 1666/udp
-netview-aix-7 1667/tcp
-netview-aix-7 1667/udp
-netview-aix-8 1668/tcp
-netview-aix-8 1668/udp
-netview-aix-9 1669/tcp
-netview-aix-9 1669/udp
-netview-aix-10 1670/tcp
-netview-aix-10 1670/udp
-netview-aix-11 1671/tcp
-netview-aix-11 1671/udp
-netview-aix-12 1672/tcp
-netview-aix-12 1672/udp
-l2f 1701/tcp #l2f
-l2f 1701/udp #l2f
-l2tp 1701/tcp #Layer 2 Tunnelling Protocol
-l2tp 1701/udp #Layer 2 Tunnelling Protocol
-pptp 1723/tcp #Point-to-point tunnelling protocol
-# IMPORTANT NOTE: See comments for ports 1645/1646 when using older equipment
-radius 1812/udp #RADIUS authentication protocol (IANA sanctioned)
-radacct 1813/udp #RADIUS accounting protocol (IANA sanctioned)
-licensedaemon 1986/tcp #cisco license management
-licensedaemon 1986/udp #cisco license management
-tr-rsrb-p1 1987/tcp #cisco RSRB Priority 1 port
-tr-rsrb-p1 1987/udp #cisco RSRB Priority 1 port
-tr-rsrb-p2 1988/tcp #cisco RSRB Priority 2 port
-tr-rsrb-p2 1988/udp #cisco RSRB Priority 2 port
-tr-rsrb-p3 1989/tcp #cisco RSRB Priority 3 port
-tr-rsrb-p3 1989/udp #cisco RSRB Priority 3 port
-#PROBLEMS!===================================================
-mshnet 1989/tcp #MHSnet system
-mshnet 1989/udp #MHSnet system
-#PROBLEMS!===================================================
-stun-p1 1990/tcp #cisco STUN Priority 1 port
-stun-p1 1990/udp #cisco STUN Priority 1 port
-stun-p2 1991/tcp #cisco STUN Priority 2 port
-stun-p2 1991/udp #cisco STUN Priority 2 port
-stun-p3 1992/tcp #cisco STUN Priority 3 port
-stun-p3 1992/udp #cisco STUN Priority 3 port
-#PROBLEMS!===================================================
-ipsendmsg 1992/tcp
-ipsendmsg 1992/udp
-#PROBLEMS!===================================================
-snmp-tcp-port 1993/tcp #cisco SNMP TCP port
-snmp-tcp-port 1993/udp #cisco SNMP TCP port
-stun-port 1994/tcp #cisco serial tunnel port
-stun-port 1994/udp #cisco serial tunnel port
-perf-port 1995/tcp #cisco perf port
-perf-port 1995/udp #cisco perf port
-tr-rsrb-port 1996/tcp #cisco Remote SRB port
-tr-rsrb-port 1996/udp #cisco Remote SRB port
-gdp-port 1997/tcp #cisco Gateway Discovery Protocol
-gdp-port 1997/udp #cisco Gateway Discovery Protocol
-x25-svc-port 1998/tcp #cisco X.25 service (XOT)
-x25-svc-port 1998/udp #cisco X.25 service (XOT)
-tcp-id-port 1999/tcp #cisco identification port
-tcp-id-port 1999/udp #cisco identification port
-callbook 2000/tcp
-callbook 2000/udp
-dc 2001/tcp
-wizard 2001/udp #curry
-globe 2002/tcp
-globe 2002/udp
-cfingerd 2003/tcp #GNU finger
-mailbox 2004/tcp
-emce 2004/udp #CCWS mm conf
-berknet 2005/tcp
-oracle 2005/udp
-invokator 2006/tcp
-raid-cc 2006/udp #raid
-dectalk 2007/tcp
-raid-am 2007/udp
-conf 2008/tcp
-terminaldb 2008/udp
-news 2009/tcp
-whosockami 2009/udp
-search 2010/tcp
-pipe_server 2010/udp
-raid-cc 2011/tcp #raid
-servserv 2011/udp
-ttyinfo 2012/tcp
-raid-ac 2012/udp
-raid-am 2013/tcp
-raid-cd 2013/udp
-troff 2014/tcp
-raid-sf 2014/udp
-cypress 2015/tcp
-raid-cs 2015/udp
-bootserver 2016/tcp
-bootserver 2016/udp
-cypress-stat 2017/tcp
-bootclient 2017/udp
-terminaldb 2018/tcp
-rellpack 2018/udp
-whosockami 2019/tcp
-about 2019/udp
-xinupageserver 2020/tcp
-xinupageserver 2020/udp
-servexec 2021/tcp
-xinuexpansion1 2021/udp
-down 2022/tcp
-xinuexpansion2 2022/udp
-xinuexpansion3 2023/tcp
-xinuexpansion3 2023/udp
-xinuexpansion4 2024/tcp
-xinuexpansion4 2024/udp
-ellpack 2025/tcp
-xribs 2025/udp
-scrabble 2026/tcp
-scrabble 2026/udp
-shadowserver 2027/tcp
-shadowserver 2027/udp
-submitserver 2028/tcp
-submitserver 2028/udp
-device2 2030/tcp
-device2 2030/udp
-blackboard 2032/tcp
-blackboard 2032/udp
-glogger 2033/tcp
-glogger 2033/udp
-scoremgr 2034/tcp
-scoremgr 2034/udp
-imsldoc 2035/tcp
-imsldoc 2035/udp
-objectmanager 2038/tcp
-objectmanager 2038/udp
-lam 2040/tcp
-lam 2040/udp
-interbase 2041/tcp
-interbase 2041/udp
-isis 2042/tcp
-isis 2042/udp
-isis-bcast 2043/tcp
-isis-bcast 2043/udp
-rimsl 2044/tcp
-rimsl 2044/udp
-cdfunc 2045/tcp
-cdfunc 2045/udp
-sdfunc 2046/tcp
-sdfunc 2046/udp
-#dls 2047/tcp
-#dls 2047/udp
-dls-monitor 2048/tcp
-dls-monitor 2048/udp
-nfsd 2049/tcp nfs # NFS server daemon
-nfsd 2049/udp nfs # NFS server daemon
-#PROBLEMS!=============================================================
-#shilp 2049/tcp
-#shilp 2049/udp
-#PROBLEMS!=============================================================
-dlsrpn 2065/tcp #Data Link Switch Read Port Number
-dlsrpn 2065/udp #Data Link Switch Read Port Number
-dlswpn 2067/tcp #Data Link Switch Write Port Number
-dlswpn 2067/udp #Data Link Switch Write Port Number
-zephyr-clt 2103/udp #Zephyr serv-hm connection
-zephyr-hm 2104/udp #Zephyr hostmanager
-#PROBLEMS!=============================================================
-#zephyr-hm-srv 2105/udp #Zephyr hm-serv connection
-#PROBLEMS!=============================================================
-eklogin 2105/tcp #Kerberos (v4) encrypted rlogin
-eklogin 2105/udp #Kerberos (v4) encrypted rlogin
-ekshell 2106/tcp #Kerberos (v4) encrypted rshell
-ekshell 2106/udp #Kerberos (v4) encrypted rshell
-rkinit 2108/tcp #Kerberos (v4) remote initialization
-rkinit 2108/udp #Kerberos (v4) remote initialization
-ats 2201/tcp #Advanced Training System Program
-ats 2201/udp #Advanced Training System Program
-ivs-video 2232/tcp #IVS Video default
-ivs-video 2232/udp #IVS Video default
-ivsd 2241/tcp #IVS Daemon
-ivsd 2241/udp #IVS Daemon
-pehelp 2307/tcp
-pehelp 2307/udp
-cvspserver 2401/tcp #CVS network server
-cvspserver 2401/udp #CVS network server
-venus 2430/tcp #venus
-venus 2430/udp #venus
-venus-se 2431/tcp #venus-se
-venus-se 2431/udp #venus-se
-codasrv 2432/tcp #codasrv
-codasrv 2432/udp #codasrv
-codasrv-se 2433/tcp #codasrv-se
-codasrv-se 2433/udp #codasrv-se
-rtsserv 2500/tcp #Resource Tracking system server
-rtsserv 2500/udp #Resource Tracking system server
-rtsclient 2501/tcp #Resource Tracking system client
-rtsclient 2501/udp #Resource Tracking system client
-hp-3000-telnet 2564/tcp #HP 3000 NS/VT block mode telnet
-zebrasrv 2600/tcp #zebra service
-zebra 2601/tcp #zebra vty
-ripd 2602/tcp #RIPd vty
-ripngd 2603/tcp #RIPngd vty
-ospfd 2604/tcp #OSPFd vty
-bgpd 2605/tcp #BGPd vty
-ospf6d 2606/tcp #OSPF6d vty
-listen 2766/tcp #System V listener port
-www-dev 2784/tcp #world wide web - development
-www-dev 2784/udp #world wide web - development
-dict 2628/tcp #RFC 2229
-dict 2628/udp #RFC 2229
-eppc 3031/tcp #Remote AppleEvents/PPC Toolbox
-eppc 3031/udp #Remote AppleEvents/PPC Toolbox
-NSWS 3049/tcp
-NSWS 3049/udp
-sj3 3086/tcp #SJ3 (kanji input)
-vmodem 3141/tcp
-vmodem 3141/udp
-ccmail 3264/tcp #cc:mail/lotus
-ccmail 3264/udp #cc:mail/lotus
-dec-notes 3333/tcp #DEC Notes
-dec-notes 3333/udp #DEC Notes
-rsvp-encap 3455/udp #RSVP encapsulated in UDP
-mapper-nodemgr 3984/tcp #MAPPER network node manager
-mapper-nodemgr 3984/udp #MAPPER network node manager
-mapper-mapethd 3985/tcp #MAPPER TCP/IP server
-mapper-mapethd 3985/udp #MAPPER TCP/IP server
-mapper-ws_ethd 3986/tcp #MAPPER workstation server
-mapper-ws_ethd 3986/udp #MAPPER workstation server
-bmap 3421/tcp #Bull Apprise portmapper
-bmap 3421/udp #Bull Apprise portmapper
-prsvp 3455/tcp #RSVP Port
-prsvp 3455/udp #RSVP Port
-vat 3456/tcp #VAT default data
-vat 3456/udp #VAT default data
-vat-control 3457/tcp #VAT default control
-vat-control 3457/udp #VAT default control
-udt_os 3900/tcp #Unidata UDT OS
-udt_os 3900/udp #Unidata UDT OS
-netcheque 4008/tcp #NetCheque accounting
-netcheque 4008/udp #NetCheque accounting
-lockd 4045/udp # NFS lock daemon/manager
-lockd 4045/tcp
-nuts_dem 4132/tcp #NUTS Daemon
-nuts_dem 4132/udp #NUTS Daemon
-nuts_bootp 4133/tcp #NUTS Bootp Server
-nuts_bootp 4133/udp #NUTS Bootp Server
-rwhois 4321/tcp #Remote Who Is
-rwhois 4321/udp #Remote Who Is
-unicall 4343/tcp
-unicall 4343/udp
-krb524 4444/tcp
-krb524 4444/udp
-# PROBLEM krb524 assigned the port,
-# PROBLEM nv used it without an assignment
-nv-video 4444/tcp #NV Video default
-nv-video 4444/udp #NV Video default
-sae-urn 4500/tcp
-sae-urn 4500/udp
-fax 4557/tcp #FAX transmission service
-hylafax 4559/tcp #HylaFAX client-server protocol
-rfa 4672/tcp #remote file access server
-rfa 4672/udp #remote file access server
-commplex-main 5000/tcp
-commplex-main 5000/udp
-commplex-link 5001/tcp
-commplex-link 5001/udp
-rfe 5002/tcp #radio free ethernet
-rfe 5002/udp #radio free ethernet
-telelpathstart 5010/tcp
-telelpathstart 5010/udp
-telelpathattack 5011/tcp
-telelpathattack 5011/udp
-mmcc 5050/tcp #multimedia conference control tool
-mmcc 5050/udp #multimedia conference control tool
-rmonitor_secure 5145/tcp
-rmonitor_secure 5145/udp
-aol 5190/tcp #America-Online
-aol 5190/udp #America-Online
-aol-1 5191/tcp #AmericaOnline1
-aol-1 5191/udp #AmericaOnline1
-aol-2 5192/tcp #AmericaOnline2
-aol-2 5192/udp #AmericaOnline2
-aol-3 5193/tcp #AmericaOnline3
-aol-3 5193/udp #AmericaOnline3
-jabber-client 5222/tcp #Jabber Client Connection
-jabber-client 5222/udp #Jabber Client Connection
-padl2sim 5236/tcp
-padl2sim 5236/udp
-jabber-server 5269/tcp #Jabber Server Connection
-jabber-server 5269/udp #Jabber Server Connection
-hacl-hb 5300/tcp # HA cluster heartbeat
-hacl-hb 5300/udp # HA cluster heartbeat
-hacl-gs 5301/tcp # HA cluster general services
-hacl-gs 5301/udp # HA cluster general services
-hacl-cfg 5302/tcp # HA cluster configuration
-hacl-cfg 5302/udp # HA cluster configuration
-hacl-probe 5303/tcp # HA cluster probing
-hacl-probe 5303/udp # HA cluster probing
-hacl-local 5304/tcp
-hacl-local 5304/udp
-hacl-test 5305/tcp
-hacl-test 5305/udp
-cfengine 5308/tcp
-cfengine 5308/udp
-postgresql 5432/tcp #PostgreSQL Database
-postgresql 5432/udp #PostgreSQL Database
-rplay 5555/udp
-canna 5680/tcp #Canna (Japanese Input)
-proshareaudio 5713/tcp #proshare conf audio
-proshareaudio 5713/udp #proshare conf audio
-prosharevideo 5714/tcp #proshare conf video
-prosharevideo 5714/udp #proshare conf video
-prosharedata 5715/tcp #proshare conf data
-prosharedata 5715/udp #proshare conf data
-prosharerequest 5716/tcp #proshare conf request
-prosharerequest 5716/udp #proshare conf request
-prosharenotify 5717/tcp #proshare conf notify
-prosharenotify 5717/udp #proshare conf notify
-cvsup 5999/tcp #CVSup file transfer/John Polstra/FreeBSD
-x11 6000/tcp #6000-6063 are assigned to X Window System
-x11 6000/udp
-x11-ssh 6010/tcp #Unofficial name, for convenience
-x11-ssh 6010/udp
-softcm 6110/tcp #HP SoftBench CM
-softcm 6110/udp #HP SoftBench CM
-spc 6111/tcp #HP SoftBench Sub-Process Control
-spc 6111/udp #HP SoftBench Sub-Process Control
-meta-corp 6141/tcp #Meta Corporation License Manager
-meta-corp 6141/udp #Meta Corporation License Manager
-aspentec-lm 6142/tcp #Aspen Technology License Manager
-aspentec-lm 6142/udp #Aspen Technology License Manager
-watershed-lm 6143/tcp #Watershed License Manager
-watershed-lm 6143/udp #Watershed License Manager
-statsci1-lm 6144/tcp #StatSci License Manager - 1
-statsci1-lm 6144/udp #StatSci License Manager - 1
-statsci2-lm 6145/tcp #StatSci License Manager - 2
-statsci2-lm 6145/udp #StatSci License Manager - 2
-lonewolf-lm 6146/tcp #Lone Wolf Systems License Manager
-lonewolf-lm 6146/udp #Lone Wolf Systems License Manager
-montage-lm 6147/tcp #Montage License Manager
-montage-lm 6147/udp #Montage License Manager
-ricardo-lm 6148/tcp #Ricardo North America License Manager
-ricardo-lm 6148/udp #Ricardo North America License Manager
-xdsxdm 6558/tcp
-xdsxdm 6558/udp
-ircd 6667/tcp #Internet Relay Chat (unoffical)
-acmsoda 6969/tcp
-acmsoda 6969/udp
-afs3-fileserver 7000/tcp #file server itself
-afs3-fileserver 7000/udp #file server itself
-afs3-callback 7001/tcp #callbacks to cache managers
-afs3-callback 7001/udp #callbacks to cache managers
-afs3-prserver 7002/tcp #users & groups database
-afs3-prserver 7002/udp #users & groups database
-afs3-vlserver 7003/tcp #volume location database
-afs3-vlserver 7003/udp #volume location database
-afs3-kaserver 7004/tcp #AFS/Kerberos authentication service
-afs3-kaserver 7004/udp #AFS/Kerberos authentication service
-afs3-volser 7005/tcp #volume management server
-afs3-volser 7005/udp #volume management server
-afs3-errors 7006/tcp #error interpretation service
-afs3-errors 7006/udp #error interpretation service
-afs3-bos 7007/tcp #basic overseer process
-afs3-bos 7007/udp #basic overseer process
-afs3-update 7008/tcp #server-to-server updater
-afs3-update 7008/udp #server-to-server updater
-afs3-rmtsys 7009/tcp #remote cache manager service
-afs3-rmtsys 7009/udp #remote cache manager service
-afs3-resserver 7010/tcp #MR-AFS residence server
-afs3-resserver 7010/udp #MR-AFS residence server
-afs3-remio 7011/tcp #MR-AFS remote IO server
-afs3-remio 7011/udp #MR-AFS remote IO server
-ups-onlinet 7010/tcp #onlinet uninterruptable power supplies
-ups-onlinet 7010/udp #onlinet uninterruptable power supplies
-font-service 7100/tcp #X Font Service
-font-service 7100/udp #X Font Service
-fodms 7200/tcp #FODMS FLIP
-fodms 7200/udp #FODMS FLIP
-dlip 7201/tcp
-dlip 7201/udp
-ftp-proxy 8021/tcp # pf ftp-proxy
-spamd 8025/tcp # spamd(8)
-spamd-sync 8025/udp # spamd(8) synchronisation
-spamd-cfg 8026/tcp # spamd(8) configuration
-natd 8668/divert # Network Address Translation
-jetdirect 9100/tcp #HP JetDirect card
-man 9535/tcp
-man 9535/udp
-sd 9876/tcp #Session Director
-sd 9876/udp #Session Director
-amanda 10080/udp #Dump server control
-amandaidx 10082/tcp #Amanda indexing
-amidxtape 10083/tcp #Amanda tape indexing
-isode-dua 17007/tcp
-isode-dua 17007/udp
-biimenu 18000/tcp #Beckman Instruments, Inc.
-biimenu 18000/udp #Beckman Instruments, Inc.
-19000 19000/tcp # pfSense nat bouncing
-19000 19000/udp # pfSense nat bouncing
-19001 19001/tcp # pfSense nat bouncing
-19001 19001/udp # pfSense nat bouncing
-19002 19002/tcp # pfSense nat bouncing
-19002 19002/udp # pfSense nat bouncing
-19003 19003/tcp # pfSense nat bouncing
-19003 19003/udp # pfSense nat bouncing
-19004 19004/tcp # pfSense nat bouncing
-19004 19004/udp # pfSense nat bouncing
-19005 19005/tcp # pfSense nat bouncing
-19005 19005/udp # pfSense nat bouncing
-19006 19006/tcp # pfSense nat bouncing
-19006 19006/udp # pfSense nat bouncing
-19007 19007/tcp # pfSense nat bouncing
-19007 19007/udp # pfSense nat bouncing
-19008 19008/tcp # pfSense nat bouncing
-19008 19008/udp # pfSense nat bouncing
-19009 19009/tcp # pfSense nat bouncing
-19009 19009/udp # pfSense nat bouncing
-19010 19010/tcp # pfSense nat bouncing
-19010 19010/udp # pfSense nat bouncing
-19011 19011/tcp # pfSense nat bouncing
-19011 19011/udp # pfSense nat bouncing
-19012 19012/tcp # pfSense nat bouncing
-19012 19012/udp # pfSense nat bouncing
-19013 19013/tcp # pfSense nat bouncing
-19013 19013/udp # pfSense nat bouncing
-19014 19014/tcp # pfSense nat bouncing
-19014 19014/udp # pfSense nat bouncing
-19015 19015/tcp # pfSense nat bouncing
-19015 19015/udp # pfSense nat bouncing
-19016 19016/tcp # pfSense nat bouncing
-19016 19016/udp # pfSense nat bouncing
-19017 19017/tcp # pfSense nat bouncing
-19017 19017/udp # pfSense nat bouncing
-19018 19018/tcp # pfSense nat bouncing
-19018 19018/udp # pfSense nat bouncing
-19019 19019/tcp # pfSense nat bouncing
-19019 19019/udp # pfSense nat bouncing
-19020 19020/tcp # pfSense nat bouncing
-19020 19020/udp # pfSense nat bouncing
-19021 19021/tcp # pfSense nat bouncing
-19021 19021/udp # pfSense nat bouncing
-19022 19022/tcp # pfSense nat bouncing
-19022 19022/udp # pfSense nat bouncing
-19023 19023/tcp # pfSense nat bouncing
-19023 19023/udp # pfSense nat bouncing
-19024 19024/tcp # pfSense nat bouncing
-19024 19024/udp # pfSense nat bouncing
-19025 19025/tcp # pfSense nat bouncing
-19025 19025/udp # pfSense nat bouncing
-19026 19026/tcp # pfSense nat bouncing
-19026 19026/udp # pfSense nat bouncing
-19027 19027/tcp # pfSense nat bouncing
-19027 19027/udp # pfSense nat bouncing
-19028 19028/tcp # pfSense nat bouncing
-19028 19028/udp # pfSense nat bouncing
-19029 19029/tcp # pfSense nat bouncing
-19029 19029/udp # pfSense nat bouncing
-19030 19030/tcp # pfSense nat bouncing
-19030 19030/udp # pfSense nat bouncing
-19031 19031/tcp # pfSense nat bouncing
-19031 19031/udp # pfSense nat bouncing
-19032 19032/tcp # pfSense nat bouncing
-19032 19032/udp # pfSense nat bouncing
-19033 19033/tcp # pfSense nat bouncing
-19033 19033/udp # pfSense nat bouncing
-19034 19034/tcp # pfSense nat bouncing
-19034 19034/udp # pfSense nat bouncing
-19035 19035/tcp # pfSense nat bouncing
-19035 19035/udp # pfSense nat bouncing
-19036 19036/tcp # pfSense nat bouncing
-19036 19036/udp # pfSense nat bouncing
-19037 19037/tcp # pfSense nat bouncing
-19037 19037/udp # pfSense nat bouncing
-19038 19038/tcp # pfSense nat bouncing
-19038 19038/udp # pfSense nat bouncing
-19039 19039/tcp # pfSense nat bouncing
-19039 19039/udp # pfSense nat bouncing
-19040 19040/tcp # pfSense nat bouncing
-19040 19040/udp # pfSense nat bouncing
-19041 19041/tcp # pfSense nat bouncing
-19041 19041/udp # pfSense nat bouncing
-19042 19042/tcp # pfSense nat bouncing
-19042 19042/udp # pfSense nat bouncing
-19043 19043/tcp # pfSense nat bouncing
-19043 19043/udp # pfSense nat bouncing
-19044 19044/tcp # pfSense nat bouncing
-19044 19044/udp # pfSense nat bouncing
-19045 19045/tcp # pfSense nat bouncing
-19045 19045/udp # pfSense nat bouncing
-19046 19046/tcp # pfSense nat bouncing
-19046 19046/udp # pfSense nat bouncing
-19047 19047/tcp # pfSense nat bouncing
-19047 19047/udp # pfSense nat bouncing
-19048 19048/tcp # pfSense nat bouncing
-19048 19048/udp # pfSense nat bouncing
-19049 19049/tcp # pfSense nat bouncing
-19049 19049/udp # pfSense nat bouncing
-19050 19050/tcp # pfSense nat bouncing
-19050 19050/udp # pfSense nat bouncing
-19051 19051/tcp # pfSense nat bouncing
-19051 19051/udp # pfSense nat bouncing
-19052 19052/tcp # pfSense nat bouncing
-19052 19052/udp # pfSense nat bouncing
-19053 19053/tcp # pfSense nat bouncing
-19053 19053/udp # pfSense nat bouncing
-19054 19054/tcp # pfSense nat bouncing
-19054 19054/udp # pfSense nat bouncing
-19055 19055/tcp # pfSense nat bouncing
-19055 19055/udp # pfSense nat bouncing
-19056 19056/tcp # pfSense nat bouncing
-19056 19056/udp # pfSense nat bouncing
-19057 19057/tcp # pfSense nat bouncing
-19057 19057/udp # pfSense nat bouncing
-19058 19058/tcp # pfSense nat bouncing
-19058 19058/udp # pfSense nat bouncing
-19059 19059/tcp # pfSense nat bouncing
-19059 19059/udp # pfSense nat bouncing
-19060 19060/tcp # pfSense nat bouncing
-19060 19060/udp # pfSense nat bouncing
-19061 19061/tcp # pfSense nat bouncing
-19061 19061/udp # pfSense nat bouncing
-19062 19062/tcp # pfSense nat bouncing
-19062 19062/udp # pfSense nat bouncing
-19063 19063/tcp # pfSense nat bouncing
-19063 19063/udp # pfSense nat bouncing
-19064 19064/tcp # pfSense nat bouncing
-19064 19064/udp # pfSense nat bouncing
-19065 19065/tcp # pfSense nat bouncing
-19065 19065/udp # pfSense nat bouncing
-19066 19066/tcp # pfSense nat bouncing
-19066 19066/udp # pfSense nat bouncing
-19067 19067/tcp # pfSense nat bouncing
-19067 19067/udp # pfSense nat bouncing
-19068 19068/tcp # pfSense nat bouncing
-19068 19068/udp # pfSense nat bouncing
-19069 19069/tcp # pfSense nat bouncing
-19069 19069/udp # pfSense nat bouncing
-19070 19070/tcp # pfSense nat bouncing
-19070 19070/udp # pfSense nat bouncing
-19071 19071/tcp # pfSense nat bouncing
-19071 19071/udp # pfSense nat bouncing
-19072 19072/tcp # pfSense nat bouncing
-19072 19072/udp # pfSense nat bouncing
-19073 19073/tcp # pfSense nat bouncing
-19073 19073/udp # pfSense nat bouncing
-19074 19074/tcp # pfSense nat bouncing
-19074 19074/udp # pfSense nat bouncing
-19075 19075/tcp # pfSense nat bouncing
-19075 19075/udp # pfSense nat bouncing
-19076 19076/tcp # pfSense nat bouncing
-19076 19076/udp # pfSense nat bouncing
-19077 19077/tcp # pfSense nat bouncing
-19077 19077/udp # pfSense nat bouncing
-19078 19078/tcp # pfSense nat bouncing
-19078 19078/udp # pfSense nat bouncing
-19079 19079/tcp # pfSense nat bouncing
-19079 19079/udp # pfSense nat bouncing
-19080 19080/tcp # pfSense nat bouncing
-19080 19080/udp # pfSense nat bouncing
-19081 19081/tcp # pfSense nat bouncing
-19081 19081/udp # pfSense nat bouncing
-19082 19082/tcp # pfSense nat bouncing
-19082 19082/udp # pfSense nat bouncing
-19083 19083/tcp # pfSense nat bouncing
-19083 19083/udp # pfSense nat bouncing
-19084 19084/tcp # pfSense nat bouncing
-19084 19084/udp # pfSense nat bouncing
-19085 19085/tcp # pfSense nat bouncing
-19085 19085/udp # pfSense nat bouncing
-19086 19086/tcp # pfSense nat bouncing
-19086 19086/udp # pfSense nat bouncing
-19087 19087/tcp # pfSense nat bouncing
-19087 19087/udp # pfSense nat bouncing
-19088 19088/tcp # pfSense nat bouncing
-19088 19088/udp # pfSense nat bouncing
-19089 19089/tcp # pfSense nat bouncing
-19089 19089/udp # pfSense nat bouncing
-19090 19090/tcp # pfSense nat bouncing
-19090 19090/udp # pfSense nat bouncing
-19091 19091/tcp # pfSense nat bouncing
-19091 19091/udp # pfSense nat bouncing
-19092 19092/tcp # pfSense nat bouncing
-19092 19092/udp # pfSense nat bouncing
-19093 19093/tcp # pfSense nat bouncing
-19093 19093/udp # pfSense nat bouncing
-19094 19094/tcp # pfSense nat bouncing
-19094 19094/udp # pfSense nat bouncing
-19095 19095/tcp # pfSense nat bouncing
-19095 19095/udp # pfSense nat bouncing
-19096 19096/tcp # pfSense nat bouncing
-19096 19096/udp # pfSense nat bouncing
-19097 19097/tcp # pfSense nat bouncing
-19097 19097/udp # pfSense nat bouncing
-19098 19098/tcp # pfSense nat bouncing
-19098 19098/udp # pfSense nat bouncing
-19099 19099/tcp # pfSense nat bouncing
-19099 19099/udp # pfSense nat bouncing
-19100 19100/tcp # pfSense nat bouncing
-19100 19100/udp # pfSense nat bouncing
-19101 19101/tcp # pfSense nat bouncing
-19101 19101/udp # pfSense nat bouncing
-19102 19102/tcp # pfSense nat bouncing
-19102 19102/udp # pfSense nat bouncing
-19103 19103/tcp # pfSense nat bouncing
-19103 19103/udp # pfSense nat bouncing
-19104 19104/tcp # pfSense nat bouncing
-19104 19104/udp # pfSense nat bouncing
-19105 19105/tcp # pfSense nat bouncing
-19105 19105/udp # pfSense nat bouncing
-19106 19106/tcp # pfSense nat bouncing
-19106 19106/udp # pfSense nat bouncing
-19107 19107/tcp # pfSense nat bouncing
-19107 19107/udp # pfSense nat bouncing
-19108 19108/tcp # pfSense nat bouncing
-19108 19108/udp # pfSense nat bouncing
-19109 19109/tcp # pfSense nat bouncing
-19109 19109/udp # pfSense nat bouncing
-19110 19110/tcp # pfSense nat bouncing
-19110 19110/udp # pfSense nat bouncing
-19111 19111/tcp # pfSense nat bouncing
-19111 19111/udp # pfSense nat bouncing
-19112 19112/tcp # pfSense nat bouncing
-19112 19112/udp # pfSense nat bouncing
-19113 19113/tcp # pfSense nat bouncing
-19113 19113/udp # pfSense nat bouncing
-19114 19114/tcp # pfSense nat bouncing
-19114 19114/udp # pfSense nat bouncing
-19115 19115/tcp # pfSense nat bouncing
-19115 19115/udp # pfSense nat bouncing
-19116 19116/tcp # pfSense nat bouncing
-19116 19116/udp # pfSense nat bouncing
-19117 19117/tcp # pfSense nat bouncing
-19117 19117/udp # pfSense nat bouncing
-19118 19118/tcp # pfSense nat bouncing
-19118 19118/udp # pfSense nat bouncing
-19119 19119/tcp # pfSense nat bouncing
-19119 19119/udp # pfSense nat bouncing
-19120 19120/tcp # pfSense nat bouncing
-19120 19120/udp # pfSense nat bouncing
-19121 19121/tcp # pfSense nat bouncing
-19121 19121/udp # pfSense nat bouncing
-19122 19122/tcp # pfSense nat bouncing
-19122 19122/udp # pfSense nat bouncing
-19123 19123/tcp # pfSense nat bouncing
-19123 19123/udp # pfSense nat bouncing
-19124 19124/tcp # pfSense nat bouncing
-19124 19124/udp # pfSense nat bouncing
-19125 19125/tcp # pfSense nat bouncing
-19125 19125/udp # pfSense nat bouncing
-19126 19126/tcp # pfSense nat bouncing
-19126 19126/udp # pfSense nat bouncing
-19127 19127/tcp # pfSense nat bouncing
-19127 19127/udp # pfSense nat bouncing
-19128 19128/tcp # pfSense nat bouncing
-19128 19128/udp # pfSense nat bouncing
-19129 19129/tcp # pfSense nat bouncing
-19129 19129/udp # pfSense nat bouncing
-19130 19130/tcp # pfSense nat bouncing
-19130 19130/udp # pfSense nat bouncing
-19131 19131/tcp # pfSense nat bouncing
-19131 19131/udp # pfSense nat bouncing
-19132 19132/tcp # pfSense nat bouncing
-19132 19132/udp # pfSense nat bouncing
-19133 19133/tcp # pfSense nat bouncing
-19133 19133/udp # pfSense nat bouncing
-19134 19134/tcp # pfSense nat bouncing
-19134 19134/udp # pfSense nat bouncing
-19135 19135/tcp # pfSense nat bouncing
-19135 19135/udp # pfSense nat bouncing
-19136 19136/tcp # pfSense nat bouncing
-19136 19136/udp # pfSense nat bouncing
-19137 19137/tcp # pfSense nat bouncing
-19137 19137/udp # pfSense nat bouncing
-19138 19138/tcp # pfSense nat bouncing
-19138 19138/udp # pfSense nat bouncing
-19139 19139/tcp # pfSense nat bouncing
-19139 19139/udp # pfSense nat bouncing
-19140 19140/tcp # pfSense nat bouncing
-19140 19140/udp # pfSense nat bouncing
-19141 19141/tcp # pfSense nat bouncing
-19141 19141/udp # pfSense nat bouncing
-19142 19142/tcp # pfSense nat bouncing
-19142 19142/udp # pfSense nat bouncing
-19143 19143/tcp # pfSense nat bouncing
-19143 19143/udp # pfSense nat bouncing
-19144 19144/tcp # pfSense nat bouncing
-19144 19144/udp # pfSense nat bouncing
-19145 19145/tcp # pfSense nat bouncing
-19145 19145/udp # pfSense nat bouncing
-19146 19146/tcp # pfSense nat bouncing
-19146 19146/udp # pfSense nat bouncing
-19147 19147/tcp # pfSense nat bouncing
-19147 19147/udp # pfSense nat bouncing
-19148 19148/tcp # pfSense nat bouncing
-19148 19148/udp # pfSense nat bouncing
-19149 19149/tcp # pfSense nat bouncing
-19149 19149/udp # pfSense nat bouncing
-19150 19150/tcp # pfSense nat bouncing
-19150 19150/udp # pfSense nat bouncing
-19151 19151/tcp # pfSense nat bouncing
-19151 19151/udp # pfSense nat bouncing
-19152 19152/tcp # pfSense nat bouncing
-19152 19152/udp # pfSense nat bouncing
-19153 19153/tcp # pfSense nat bouncing
-19153 19153/udp # pfSense nat bouncing
-19154 19154/tcp # pfSense nat bouncing
-19154 19154/udp # pfSense nat bouncing
-19155 19155/tcp # pfSense nat bouncing
-19155 19155/udp # pfSense nat bouncing
-19156 19156/tcp # pfSense nat bouncing
-19156 19156/udp # pfSense nat bouncing
-19157 19157/tcp # pfSense nat bouncing
-19157 19157/udp # pfSense nat bouncing
-19158 19158/tcp # pfSense nat bouncing
-19158 19158/udp # pfSense nat bouncing
-19159 19159/tcp # pfSense nat bouncing
-19159 19159/udp # pfSense nat bouncing
-19160 19160/tcp # pfSense nat bouncing
-19160 19160/udp # pfSense nat bouncing
-19161 19161/tcp # pfSense nat bouncing
-19161 19161/udp # pfSense nat bouncing
-19162 19162/tcp # pfSense nat bouncing
-19162 19162/udp # pfSense nat bouncing
-19163 19163/tcp # pfSense nat bouncing
-19163 19163/udp # pfSense nat bouncing
-19164 19164/tcp # pfSense nat bouncing
-19164 19164/udp # pfSense nat bouncing
-19165 19165/tcp # pfSense nat bouncing
-19165 19165/udp # pfSense nat bouncing
-19166 19166/tcp # pfSense nat bouncing
-19166 19166/udp # pfSense nat bouncing
-19167 19167/tcp # pfSense nat bouncing
-19167 19167/udp # pfSense nat bouncing
-19168 19168/tcp # pfSense nat bouncing
-19168 19168/udp # pfSense nat bouncing
-19169 19169/tcp # pfSense nat bouncing
-19169 19169/udp # pfSense nat bouncing
-19170 19170/tcp # pfSense nat bouncing
-19170 19170/udp # pfSense nat bouncing
-19171 19171/tcp # pfSense nat bouncing
-19171 19171/udp # pfSense nat bouncing
-19172 19172/tcp # pfSense nat bouncing
-19172 19172/udp # pfSense nat bouncing
-19173 19173/tcp # pfSense nat bouncing
-19173 19173/udp # pfSense nat bouncing
-19174 19174/tcp # pfSense nat bouncing
-19174 19174/udp # pfSense nat bouncing
-19175 19175/tcp # pfSense nat bouncing
-19175 19175/udp # pfSense nat bouncing
-19176 19176/tcp # pfSense nat bouncing
-19176 19176/udp # pfSense nat bouncing
-19177 19177/tcp # pfSense nat bouncing
-19177 19177/udp # pfSense nat bouncing
-19178 19178/tcp # pfSense nat bouncing
-19178 19178/udp # pfSense nat bouncing
-19179 19179/tcp # pfSense nat bouncing
-19179 19179/udp # pfSense nat bouncing
-19180 19180/tcp # pfSense nat bouncing
-19180 19180/udp # pfSense nat bouncing
-19181 19181/tcp # pfSense nat bouncing
-19181 19181/udp # pfSense nat bouncing
-19182 19182/tcp # pfSense nat bouncing
-19182 19182/udp # pfSense nat bouncing
-19183 19183/tcp # pfSense nat bouncing
-19183 19183/udp # pfSense nat bouncing
-19184 19184/tcp # pfSense nat bouncing
-19184 19184/udp # pfSense nat bouncing
-19185 19185/tcp # pfSense nat bouncing
-19185 19185/udp # pfSense nat bouncing
-19186 19186/tcp # pfSense nat bouncing
-19186 19186/udp # pfSense nat bouncing
-19187 19187/tcp # pfSense nat bouncing
-19187 19187/udp # pfSense nat bouncing
-19188 19188/tcp # pfSense nat bouncing
-19188 19188/udp # pfSense nat bouncing
-19189 19189/tcp # pfSense nat bouncing
-19189 19189/udp # pfSense nat bouncing
-19190 19190/tcp # pfSense nat bouncing
-19190 19190/udp # pfSense nat bouncing
-19191 19191/tcp # pfSense nat bouncing
-19191 19191/udp # pfSense nat bouncing
-19192 19192/tcp # pfSense nat bouncing
-19192 19192/udp # pfSense nat bouncing
-19193 19193/tcp # pfSense nat bouncing
-19193 19193/udp # pfSense nat bouncing
-19194 19194/tcp # pfSense nat bouncing
-19194 19194/udp # pfSense nat bouncing
-19195 19195/tcp # pfSense nat bouncing
-19195 19195/udp # pfSense nat bouncing
-19196 19196/tcp # pfSense nat bouncing
-19196 19196/udp # pfSense nat bouncing
-19197 19197/tcp # pfSense nat bouncing
-19197 19197/udp # pfSense nat bouncing
-19198 19198/tcp # pfSense nat bouncing
-19198 19198/udp # pfSense nat bouncing
-19199 19199/tcp # pfSense nat bouncing
-19199 19199/udp # pfSense nat bouncing
-19200 19200/tcp # pfSense nat bouncing
-19200 19200/udp # pfSense nat bouncing
-19201 19201/tcp # pfSense nat bouncing
-19201 19201/udp # pfSense nat bouncing
-19202 19202/tcp # pfSense nat bouncing
-19202 19202/udp # pfSense nat bouncing
-19203 19203/tcp # pfSense nat bouncing
-19203 19203/udp # pfSense nat bouncing
-19204 19204/tcp # pfSense nat bouncing
-19204 19204/udp # pfSense nat bouncing
-19205 19205/tcp # pfSense nat bouncing
-19205 19205/udp # pfSense nat bouncing
-19206 19206/tcp # pfSense nat bouncing
-19206 19206/udp # pfSense nat bouncing
-19207 19207/tcp # pfSense nat bouncing
-19207 19207/udp # pfSense nat bouncing
-19208 19208/tcp # pfSense nat bouncing
-19208 19208/udp # pfSense nat bouncing
-19209 19209/tcp # pfSense nat bouncing
-19209 19209/udp # pfSense nat bouncing
-19210 19210/tcp # pfSense nat bouncing
-19210 19210/udp # pfSense nat bouncing
-19211 19211/tcp # pfSense nat bouncing
-19211 19211/udp # pfSense nat bouncing
-19212 19212/tcp # pfSense nat bouncing
-19212 19212/udp # pfSense nat bouncing
-19213 19213/tcp # pfSense nat bouncing
-19213 19213/udp # pfSense nat bouncing
-19214 19214/tcp # pfSense nat bouncing
-19214 19214/udp # pfSense nat bouncing
-19215 19215/tcp # pfSense nat bouncing
-19215 19215/udp # pfSense nat bouncing
-19216 19216/tcp # pfSense nat bouncing
-19216 19216/udp # pfSense nat bouncing
-19217 19217/tcp # pfSense nat bouncing
-19217 19217/udp # pfSense nat bouncing
-19218 19218/tcp # pfSense nat bouncing
-19218 19218/udp # pfSense nat bouncing
-19219 19219/tcp # pfSense nat bouncing
-19219 19219/udp # pfSense nat bouncing
-19220 19220/tcp # pfSense nat bouncing
-19220 19220/udp # pfSense nat bouncing
-19221 19221/tcp # pfSense nat bouncing
-19221 19221/udp # pfSense nat bouncing
-19222 19222/tcp # pfSense nat bouncing
-19222 19222/udp # pfSense nat bouncing
-19223 19223/tcp # pfSense nat bouncing
-19223 19223/udp # pfSense nat bouncing
-19224 19224/tcp # pfSense nat bouncing
-19224 19224/udp # pfSense nat bouncing
-19225 19225/tcp # pfSense nat bouncing
-19225 19225/udp # pfSense nat bouncing
-19226 19226/tcp # pfSense nat bouncing
-19226 19226/udp # pfSense nat bouncing
-19227 19227/tcp # pfSense nat bouncing
-19227 19227/udp # pfSense nat bouncing
-19228 19228/tcp # pfSense nat bouncing
-19228 19228/udp # pfSense nat bouncing
-19229 19229/tcp # pfSense nat bouncing
-19229 19229/udp # pfSense nat bouncing
-19230 19230/tcp # pfSense nat bouncing
-19230 19230/udp # pfSense nat bouncing
-19231 19231/tcp # pfSense nat bouncing
-19231 19231/udp # pfSense nat bouncing
-19232 19232/tcp # pfSense nat bouncing
-19232 19232/udp # pfSense nat bouncing
-19233 19233/tcp # pfSense nat bouncing
-19233 19233/udp # pfSense nat bouncing
-19234 19234/tcp # pfSense nat bouncing
-19234 19234/udp # pfSense nat bouncing
-19235 19235/tcp # pfSense nat bouncing
-19235 19235/udp # pfSense nat bouncing
-19236 19236/tcp # pfSense nat bouncing
-19236 19236/udp # pfSense nat bouncing
-19237 19237/tcp # pfSense nat bouncing
-19237 19237/udp # pfSense nat bouncing
-19238 19238/tcp # pfSense nat bouncing
-19238 19238/udp # pfSense nat bouncing
-19239 19239/tcp # pfSense nat bouncing
-19239 19239/udp # pfSense nat bouncing
-19240 19240/tcp # pfSense nat bouncing
-19240 19240/udp # pfSense nat bouncing
-19241 19241/tcp # pfSense nat bouncing
-19241 19241/udp # pfSense nat bouncing
-19242 19242/tcp # pfSense nat bouncing
-19242 19242/udp # pfSense nat bouncing
-19243 19243/tcp # pfSense nat bouncing
-19243 19243/udp # pfSense nat bouncing
-19244 19244/tcp # pfSense nat bouncing
-19244 19244/udp # pfSense nat bouncing
-19245 19245/tcp # pfSense nat bouncing
-19245 19245/udp # pfSense nat bouncing
-19246 19246/tcp # pfSense nat bouncing
-19246 19246/udp # pfSense nat bouncing
-19247 19247/tcp # pfSense nat bouncing
-19247 19247/udp # pfSense nat bouncing
-19248 19248/tcp # pfSense nat bouncing
-19248 19248/udp # pfSense nat bouncing
-19249 19249/tcp # pfSense nat bouncing
-19249 19249/udp # pfSense nat bouncing
-19250 19250/tcp # pfSense nat bouncing
-19250 19250/udp # pfSense nat bouncing
-19251 19251/tcp # pfSense nat bouncing
-19251 19251/udp # pfSense nat bouncing
-19252 19252/tcp # pfSense nat bouncing
-19252 19252/udp # pfSense nat bouncing
-19253 19253/tcp # pfSense nat bouncing
-19253 19253/udp # pfSense nat bouncing
-19254 19254/tcp # pfSense nat bouncing
-19254 19254/udp # pfSense nat bouncing
-19255 19255/tcp # pfSense nat bouncing
-19255 19255/udp # pfSense nat bouncing
-19256 19256/tcp # pfSense nat bouncing
-19256 19256/udp # pfSense nat bouncing
-19257 19257/tcp # pfSense nat bouncing
-19257 19257/udp # pfSense nat bouncing
-19258 19258/tcp # pfSense nat bouncing
-19258 19258/udp # pfSense nat bouncing
-19259 19259/tcp # pfSense nat bouncing
-19259 19259/udp # pfSense nat bouncing
-19260 19260/tcp # pfSense nat bouncing
-19260 19260/udp # pfSense nat bouncing
-19261 19261/tcp # pfSense nat bouncing
-19261 19261/udp # pfSense nat bouncing
-19262 19262/tcp # pfSense nat bouncing
-19262 19262/udp # pfSense nat bouncing
-19263 19263/tcp # pfSense nat bouncing
-19263 19263/udp # pfSense nat bouncing
-19264 19264/tcp # pfSense nat bouncing
-19264 19264/udp # pfSense nat bouncing
-19265 19265/tcp # pfSense nat bouncing
-19265 19265/udp # pfSense nat bouncing
-19266 19266/tcp # pfSense nat bouncing
-19266 19266/udp # pfSense nat bouncing
-19267 19267/tcp # pfSense nat bouncing
-19267 19267/udp # pfSense nat bouncing
-19268 19268/tcp # pfSense nat bouncing
-19268 19268/udp # pfSense nat bouncing
-19269 19269/tcp # pfSense nat bouncing
-19269 19269/udp # pfSense nat bouncing
-19270 19270/tcp # pfSense nat bouncing
-19270 19270/udp # pfSense nat bouncing
-19271 19271/tcp # pfSense nat bouncing
-19271 19271/udp # pfSense nat bouncing
-19272 19272/tcp # pfSense nat bouncing
-19272 19272/udp # pfSense nat bouncing
-19273 19273/tcp # pfSense nat bouncing
-19273 19273/udp # pfSense nat bouncing
-19274 19274/tcp # pfSense nat bouncing
-19274 19274/udp # pfSense nat bouncing
-19275 19275/tcp # pfSense nat bouncing
-19275 19275/udp # pfSense nat bouncing
-19276 19276/tcp # pfSense nat bouncing
-19276 19276/udp # pfSense nat bouncing
-19277 19277/tcp # pfSense nat bouncing
-19277 19277/udp # pfSense nat bouncing
-19278 19278/tcp # pfSense nat bouncing
-19278 19278/udp # pfSense nat bouncing
-19279 19279/tcp # pfSense nat bouncing
-19279 19279/udp # pfSense nat bouncing
-19280 19280/tcp # pfSense nat bouncing
-19280 19280/udp # pfSense nat bouncing
-19281 19281/tcp # pfSense nat bouncing
-19281 19281/udp # pfSense nat bouncing
-19282 19282/tcp # pfSense nat bouncing
-19282 19282/udp # pfSense nat bouncing
-19283 19283/tcp # pfSense nat bouncing
-19283 19283/udp # pfSense nat bouncing
-19284 19284/tcp # pfSense nat bouncing
-19284 19284/udp # pfSense nat bouncing
-19285 19285/tcp # pfSense nat bouncing
-19285 19285/udp # pfSense nat bouncing
-19286 19286/tcp # pfSense nat bouncing
-19286 19286/udp # pfSense nat bouncing
-19287 19287/tcp # pfSense nat bouncing
-19287 19287/udp # pfSense nat bouncing
-19288 19288/tcp # pfSense nat bouncing
-19288 19288/udp # pfSense nat bouncing
-19289 19289/tcp # pfSense nat bouncing
-19289 19289/udp # pfSense nat bouncing
-19290 19290/tcp # pfSense nat bouncing
-19290 19290/udp # pfSense nat bouncing
-19291 19291/tcp # pfSense nat bouncing
-19291 19291/udp # pfSense nat bouncing
-19292 19292/tcp # pfSense nat bouncing
-19292 19292/udp # pfSense nat bouncing
-19293 19293/tcp # pfSense nat bouncing
-19293 19293/udp # pfSense nat bouncing
-19294 19294/tcp # pfSense nat bouncing
-19294 19294/udp # pfSense nat bouncing
-19295 19295/tcp # pfSense nat bouncing
-19295 19295/udp # pfSense nat bouncing
-19296 19296/tcp # pfSense nat bouncing
-19296 19296/udp # pfSense nat bouncing
-19297 19297/tcp # pfSense nat bouncing
-19297 19297/udp # pfSense nat bouncing
-19298 19298/tcp # pfSense nat bouncing
-19298 19298/udp # pfSense nat bouncing
-19299 19299/tcp # pfSense nat bouncing
-19299 19299/udp # pfSense nat bouncing
-19300 19300/tcp # pfSense nat bouncing
-19300 19300/udp # pfSense nat bouncing
-19301 19301/tcp # pfSense nat bouncing
-19301 19301/udp # pfSense nat bouncing
-19302 19302/tcp # pfSense nat bouncing
-19302 19302/udp # pfSense nat bouncing
-19303 19303/tcp # pfSense nat bouncing
-19303 19303/udp # pfSense nat bouncing
-19304 19304/tcp # pfSense nat bouncing
-19304 19304/udp # pfSense nat bouncing
-19305 19305/tcp # pfSense nat bouncing
-19305 19305/udp # pfSense nat bouncing
-19306 19306/tcp # pfSense nat bouncing
-19306 19306/udp # pfSense nat bouncing
-19307 19307/tcp # pfSense nat bouncing
-19307 19307/udp # pfSense nat bouncing
-19308 19308/tcp # pfSense nat bouncing
-19308 19308/udp # pfSense nat bouncing
-19309 19309/tcp # pfSense nat bouncing
-19309 19309/udp # pfSense nat bouncing
-19310 19310/tcp # pfSense nat bouncing
-19310 19310/udp # pfSense nat bouncing
-19311 19311/tcp # pfSense nat bouncing
-19311 19311/udp # pfSense nat bouncing
-19312 19312/tcp # pfSense nat bouncing
-19312 19312/udp # pfSense nat bouncing
-19313 19313/tcp # pfSense nat bouncing
-19313 19313/udp # pfSense nat bouncing
-19314 19314/tcp # pfSense nat bouncing
-19314 19314/udp # pfSense nat bouncing
-19315 19315/tcp # pfSense nat bouncing
-19315 19315/udp # pfSense nat bouncing
-19316 19316/tcp # pfSense nat bouncing
-19316 19316/udp # pfSense nat bouncing
-19317 19317/tcp # pfSense nat bouncing
-19317 19317/udp # pfSense nat bouncing
-19318 19318/tcp # pfSense nat bouncing
-19318 19318/udp # pfSense nat bouncing
-19319 19319/tcp # pfSense nat bouncing
-19319 19319/udp # pfSense nat bouncing
-19320 19320/tcp # pfSense nat bouncing
-19320 19320/udp # pfSense nat bouncing
-19321 19321/tcp # pfSense nat bouncing
-19321 19321/udp # pfSense nat bouncing
-19322 19322/tcp # pfSense nat bouncing
-19322 19322/udp # pfSense nat bouncing
-19323 19323/tcp # pfSense nat bouncing
-19323 19323/udp # pfSense nat bouncing
-19324 19324/tcp # pfSense nat bouncing
-19324 19324/udp # pfSense nat bouncing
-19325 19325/tcp # pfSense nat bouncing
-19325 19325/udp # pfSense nat bouncing
-19326 19326/tcp # pfSense nat bouncing
-19326 19326/udp # pfSense nat bouncing
-19327 19327/tcp # pfSense nat bouncing
-19327 19327/udp # pfSense nat bouncing
-19328 19328/tcp # pfSense nat bouncing
-19328 19328/udp # pfSense nat bouncing
-19329 19329/tcp # pfSense nat bouncing
-19329 19329/udp # pfSense nat bouncing
-19330 19330/tcp # pfSense nat bouncing
-19330 19330/udp # pfSense nat bouncing
-19331 19331/tcp # pfSense nat bouncing
-19331 19331/udp # pfSense nat bouncing
-19332 19332/tcp # pfSense nat bouncing
-19332 19332/udp # pfSense nat bouncing
-19333 19333/tcp # pfSense nat bouncing
-19333 19333/udp # pfSense nat bouncing
-19334 19334/tcp # pfSense nat bouncing
-19334 19334/udp # pfSense nat bouncing
-19335 19335/tcp # pfSense nat bouncing
-19335 19335/udp # pfSense nat bouncing
-19336 19336/tcp # pfSense nat bouncing
-19336 19336/udp # pfSense nat bouncing
-19337 19337/tcp # pfSense nat bouncing
-19337 19337/udp # pfSense nat bouncing
-19338 19338/tcp # pfSense nat bouncing
-19338 19338/udp # pfSense nat bouncing
-19339 19339/tcp # pfSense nat bouncing
-19339 19339/udp # pfSense nat bouncing
-19340 19340/tcp # pfSense nat bouncing
-19340 19340/udp # pfSense nat bouncing
-19341 19341/tcp # pfSense nat bouncing
-19341 19341/udp # pfSense nat bouncing
-19342 19342/tcp # pfSense nat bouncing
-19342 19342/udp # pfSense nat bouncing
-19343 19343/tcp # pfSense nat bouncing
-19343 19343/udp # pfSense nat bouncing
-19344 19344/tcp # pfSense nat bouncing
-19344 19344/udp # pfSense nat bouncing
-19345 19345/tcp # pfSense nat bouncing
-19345 19345/udp # pfSense nat bouncing
-19346 19346/tcp # pfSense nat bouncing
-19346 19346/udp # pfSense nat bouncing
-19347 19347/tcp # pfSense nat bouncing
-19347 19347/udp # pfSense nat bouncing
-19348 19348/tcp # pfSense nat bouncing
-19348 19348/udp # pfSense nat bouncing
-19349 19349/tcp # pfSense nat bouncing
-19349 19349/udp # pfSense nat bouncing
-19350 19350/tcp # pfSense nat bouncing
-19350 19350/udp # pfSense nat bouncing
-19351 19351/tcp # pfSense nat bouncing
-19351 19351/udp # pfSense nat bouncing
-19352 19352/tcp # pfSense nat bouncing
-19352 19352/udp # pfSense nat bouncing
-19353 19353/tcp # pfSense nat bouncing
-19353 19353/udp # pfSense nat bouncing
-19354 19354/tcp # pfSense nat bouncing
-19354 19354/udp # pfSense nat bouncing
-19355 19355/tcp # pfSense nat bouncing
-19355 19355/udp # pfSense nat bouncing
-19356 19356/tcp # pfSense nat bouncing
-19356 19356/udp # pfSense nat bouncing
-19357 19357/tcp # pfSense nat bouncing
-19357 19357/udp # pfSense nat bouncing
-19358 19358/tcp # pfSense nat bouncing
-19358 19358/udp # pfSense nat bouncing
-19359 19359/tcp # pfSense nat bouncing
-19359 19359/udp # pfSense nat bouncing
-19360 19360/tcp # pfSense nat bouncing
-19360 19360/udp # pfSense nat bouncing
-19361 19361/tcp # pfSense nat bouncing
-19361 19361/udp # pfSense nat bouncing
-19362 19362/tcp # pfSense nat bouncing
-19362 19362/udp # pfSense nat bouncing
-19363 19363/tcp # pfSense nat bouncing
-19363 19363/udp # pfSense nat bouncing
-19364 19364/tcp # pfSense nat bouncing
-19364 19364/udp # pfSense nat bouncing
-19365 19365/tcp # pfSense nat bouncing
-19365 19365/udp # pfSense nat bouncing
-19366 19366/tcp # pfSense nat bouncing
-19366 19366/udp # pfSense nat bouncing
-19367 19367/tcp # pfSense nat bouncing
-19367 19367/udp # pfSense nat bouncing
-19368 19368/tcp # pfSense nat bouncing
-19368 19368/udp # pfSense nat bouncing
-19369 19369/tcp # pfSense nat bouncing
-19369 19369/udp # pfSense nat bouncing
-19370 19370/tcp # pfSense nat bouncing
-19370 19370/udp # pfSense nat bouncing
-19371 19371/tcp # pfSense nat bouncing
-19371 19371/udp # pfSense nat bouncing
-19372 19372/tcp # pfSense nat bouncing
-19372 19372/udp # pfSense nat bouncing
-19373 19373/tcp # pfSense nat bouncing
-19373 19373/udp # pfSense nat bouncing
-19374 19374/tcp # pfSense nat bouncing
-19374 19374/udp # pfSense nat bouncing
-19375 19375/tcp # pfSense nat bouncing
-19375 19375/udp # pfSense nat bouncing
-19376 19376/tcp # pfSense nat bouncing
-19376 19376/udp # pfSense nat bouncing
-19377 19377/tcp # pfSense nat bouncing
-19377 19377/udp # pfSense nat bouncing
-19378 19378/tcp # pfSense nat bouncing
-19378 19378/udp # pfSense nat bouncing
-19379 19379/tcp # pfSense nat bouncing
-19379 19379/udp # pfSense nat bouncing
-19380 19380/tcp # pfSense nat bouncing
-19380 19380/udp # pfSense nat bouncing
-19381 19381/tcp # pfSense nat bouncing
-19381 19381/udp # pfSense nat bouncing
-19382 19382/tcp # pfSense nat bouncing
-19382 19382/udp # pfSense nat bouncing
-19383 19383/tcp # pfSense nat bouncing
-19383 19383/udp # pfSense nat bouncing
-19384 19384/tcp # pfSense nat bouncing
-19384 19384/udp # pfSense nat bouncing
-19385 19385/tcp # pfSense nat bouncing
-19385 19385/udp # pfSense nat bouncing
-19386 19386/tcp # pfSense nat bouncing
-19386 19386/udp # pfSense nat bouncing
-19387 19387/tcp # pfSense nat bouncing
-19387 19387/udp # pfSense nat bouncing
-19388 19388/tcp # pfSense nat bouncing
-19388 19388/udp # pfSense nat bouncing
-19389 19389/tcp # pfSense nat bouncing
-19389 19389/udp # pfSense nat bouncing
-19390 19390/tcp # pfSense nat bouncing
-19390 19390/udp # pfSense nat bouncing
-19391 19391/tcp # pfSense nat bouncing
-19391 19391/udp # pfSense nat bouncing
-19392 19392/tcp # pfSense nat bouncing
-19392 19392/udp # pfSense nat bouncing
-19393 19393/tcp # pfSense nat bouncing
-19393 19393/udp # pfSense nat bouncing
-19394 19394/tcp # pfSense nat bouncing
-19394 19394/udp # pfSense nat bouncing
-19395 19395/tcp # pfSense nat bouncing
-19395 19395/udp # pfSense nat bouncing
-19396 19396/tcp # pfSense nat bouncing
-19396 19396/udp # pfSense nat bouncing
-19397 19397/tcp # pfSense nat bouncing
-19397 19397/udp # pfSense nat bouncing
-19398 19398/tcp # pfSense nat bouncing
-19398 19398/udp # pfSense nat bouncing
-19399 19399/tcp # pfSense nat bouncing
-19399 19399/udp # pfSense nat bouncing
-19400 19400/tcp # pfSense nat bouncing
-19400 19400/udp # pfSense nat bouncing
-19401 19401/tcp # pfSense nat bouncing
-19401 19401/udp # pfSense nat bouncing
-19402 19402/tcp # pfSense nat bouncing
-19402 19402/udp # pfSense nat bouncing
-19403 19403/tcp # pfSense nat bouncing
-19403 19403/udp # pfSense nat bouncing
-19404 19404/tcp # pfSense nat bouncing
-19404 19404/udp # pfSense nat bouncing
-19405 19405/tcp # pfSense nat bouncing
-19405 19405/udp # pfSense nat bouncing
-19406 19406/tcp # pfSense nat bouncing
-19406 19406/udp # pfSense nat bouncing
-19407 19407/tcp # pfSense nat bouncing
-19407 19407/udp # pfSense nat bouncing
-19408 19408/tcp # pfSense nat bouncing
-19408 19408/udp # pfSense nat bouncing
-19409 19409/tcp # pfSense nat bouncing
-19409 19409/udp # pfSense nat bouncing
-19410 19410/tcp # pfSense nat bouncing
-19410 19410/udp # pfSense nat bouncing
-19411 19411/tcp # pfSense nat bouncing
-19411 19411/udp # pfSense nat bouncing
-19412 19412/tcp # pfSense nat bouncing
-19412 19412/udp # pfSense nat bouncing
-19413 19413/tcp # pfSense nat bouncing
-19413 19413/udp # pfSense nat bouncing
-19414 19414/tcp # pfSense nat bouncing
-19414 19414/udp # pfSense nat bouncing
-19415 19415/tcp # pfSense nat bouncing
-19415 19415/udp # pfSense nat bouncing
-19416 19416/tcp # pfSense nat bouncing
-19416 19416/udp # pfSense nat bouncing
-19417 19417/tcp # pfSense nat bouncing
-19417 19417/udp # pfSense nat bouncing
-19418 19418/tcp # pfSense nat bouncing
-19418 19418/udp # pfSense nat bouncing
-19419 19419/tcp # pfSense nat bouncing
-19419 19419/udp # pfSense nat bouncing
-19420 19420/tcp # pfSense nat bouncing
-19420 19420/udp # pfSense nat bouncing
-19421 19421/tcp # pfSense nat bouncing
-19421 19421/udp # pfSense nat bouncing
-19422 19422/tcp # pfSense nat bouncing
-19422 19422/udp # pfSense nat bouncing
-19423 19423/tcp # pfSense nat bouncing
-19423 19423/udp # pfSense nat bouncing
-19424 19424/tcp # pfSense nat bouncing
-19424 19424/udp # pfSense nat bouncing
-19425 19425/tcp # pfSense nat bouncing
-19425 19425/udp # pfSense nat bouncing
-19426 19426/tcp # pfSense nat bouncing
-19426 19426/udp # pfSense nat bouncing
-19427 19427/tcp # pfSense nat bouncing
-19427 19427/udp # pfSense nat bouncing
-19428 19428/tcp # pfSense nat bouncing
-19428 19428/udp # pfSense nat bouncing
-19429 19429/tcp # pfSense nat bouncing
-19429 19429/udp # pfSense nat bouncing
-19430 19430/tcp # pfSense nat bouncing
-19430 19430/udp # pfSense nat bouncing
-19431 19431/tcp # pfSense nat bouncing
-19431 19431/udp # pfSense nat bouncing
-19432 19432/tcp # pfSense nat bouncing
-19432 19432/udp # pfSense nat bouncing
-19433 19433/tcp # pfSense nat bouncing
-19433 19433/udp # pfSense nat bouncing
-19434 19434/tcp # pfSense nat bouncing
-19434 19434/udp # pfSense nat bouncing
-19435 19435/tcp # pfSense nat bouncing
-19435 19435/udp # pfSense nat bouncing
-19436 19436/tcp # pfSense nat bouncing
-19436 19436/udp # pfSense nat bouncing
-19437 19437/tcp # pfSense nat bouncing
-19437 19437/udp # pfSense nat bouncing
-19438 19438/tcp # pfSense nat bouncing
-19438 19438/udp # pfSense nat bouncing
-19439 19439/tcp # pfSense nat bouncing
-19439 19439/udp # pfSense nat bouncing
-19440 19440/tcp # pfSense nat bouncing
-19440 19440/udp # pfSense nat bouncing
-19441 19441/tcp # pfSense nat bouncing
-19441 19441/udp # pfSense nat bouncing
-19442 19442/tcp # pfSense nat bouncing
-19442 19442/udp # pfSense nat bouncing
-19443 19443/tcp # pfSense nat bouncing
-19443 19443/udp # pfSense nat bouncing
-19444 19444/tcp # pfSense nat bouncing
-19444 19444/udp # pfSense nat bouncing
-19445 19445/tcp # pfSense nat bouncing
-19445 19445/udp # pfSense nat bouncing
-19446 19446/tcp # pfSense nat bouncing
-19446 19446/udp # pfSense nat bouncing
-19447 19447/tcp # pfSense nat bouncing
-19447 19447/udp # pfSense nat bouncing
-19448 19448/tcp # pfSense nat bouncing
-19448 19448/udp # pfSense nat bouncing
-19449 19449/tcp # pfSense nat bouncing
-19449 19449/udp # pfSense nat bouncing
-19450 19450/tcp # pfSense nat bouncing
-19450 19450/udp # pfSense nat bouncing
-19451 19451/tcp # pfSense nat bouncing
-19451 19451/udp # pfSense nat bouncing
-19452 19452/tcp # pfSense nat bouncing
-19452 19452/udp # pfSense nat bouncing
-19453 19453/tcp # pfSense nat bouncing
-19453 19453/udp # pfSense nat bouncing
-19454 19454/tcp # pfSense nat bouncing
-19454 19454/udp # pfSense nat bouncing
-19455 19455/tcp # pfSense nat bouncing
-19455 19455/udp # pfSense nat bouncing
-19456 19456/tcp # pfSense nat bouncing
-19456 19456/udp # pfSense nat bouncing
-19457 19457/tcp # pfSense nat bouncing
-19457 19457/udp # pfSense nat bouncing
-19458 19458/tcp # pfSense nat bouncing
-19458 19458/udp # pfSense nat bouncing
-19459 19459/tcp # pfSense nat bouncing
-19459 19459/udp # pfSense nat bouncing
-19460 19460/tcp # pfSense nat bouncing
-19460 19460/udp # pfSense nat bouncing
-19461 19461/tcp # pfSense nat bouncing
-19461 19461/udp # pfSense nat bouncing
-19462 19462/tcp # pfSense nat bouncing
-19462 19462/udp # pfSense nat bouncing
-19463 19463/tcp # pfSense nat bouncing
-19463 19463/udp # pfSense nat bouncing
-19464 19464/tcp # pfSense nat bouncing
-19464 19464/udp # pfSense nat bouncing
-19465 19465/tcp # pfSense nat bouncing
-19465 19465/udp # pfSense nat bouncing
-19466 19466/tcp # pfSense nat bouncing
-19466 19466/udp # pfSense nat bouncing
-19467 19467/tcp # pfSense nat bouncing
-19467 19467/udp # pfSense nat bouncing
-19468 19468/tcp # pfSense nat bouncing
-19468 19468/udp # pfSense nat bouncing
-19469 19469/tcp # pfSense nat bouncing
-19469 19469/udp # pfSense nat bouncing
-19470 19470/tcp # pfSense nat bouncing
-19470 19470/udp # pfSense nat bouncing
-19471 19471/tcp # pfSense nat bouncing
-19471 19471/udp # pfSense nat bouncing
-19472 19472/tcp # pfSense nat bouncing
-19472 19472/udp # pfSense nat bouncing
-19473 19473/tcp # pfSense nat bouncing
-19473 19473/udp # pfSense nat bouncing
-19474 19474/tcp # pfSense nat bouncing
-19474 19474/udp # pfSense nat bouncing
-19475 19475/tcp # pfSense nat bouncing
-19475 19475/udp # pfSense nat bouncing
-19476 19476/tcp # pfSense nat bouncing
-19476 19476/udp # pfSense nat bouncing
-19477 19477/tcp # pfSense nat bouncing
-19477 19477/udp # pfSense nat bouncing
-19478 19478/tcp # pfSense nat bouncing
-19478 19478/udp # pfSense nat bouncing
-19479 19479/tcp # pfSense nat bouncing
-19479 19479/udp # pfSense nat bouncing
-19480 19480/tcp # pfSense nat bouncing
-19480 19480/udp # pfSense nat bouncing
-19481 19481/tcp # pfSense nat bouncing
-19481 19481/udp # pfSense nat bouncing
-19482 19482/tcp # pfSense nat bouncing
-19482 19482/udp # pfSense nat bouncing
-19483 19483/tcp # pfSense nat bouncing
-19483 19483/udp # pfSense nat bouncing
-19484 19484/tcp # pfSense nat bouncing
-19484 19484/udp # pfSense nat bouncing
-19485 19485/tcp # pfSense nat bouncing
-19485 19485/udp # pfSense nat bouncing
-19486 19486/tcp # pfSense nat bouncing
-19486 19486/udp # pfSense nat bouncing
-19487 19487/tcp # pfSense nat bouncing
-19487 19487/udp # pfSense nat bouncing
-19488 19488/tcp # pfSense nat bouncing
-19488 19488/udp # pfSense nat bouncing
-19489 19489/tcp # pfSense nat bouncing
-19489 19489/udp # pfSense nat bouncing
-19490 19490/tcp # pfSense nat bouncing
-19490 19490/udp # pfSense nat bouncing
-19491 19491/tcp # pfSense nat bouncing
-19491 19491/udp # pfSense nat bouncing
-19492 19492/tcp # pfSense nat bouncing
-19492 19492/udp # pfSense nat bouncing
-19493 19493/tcp # pfSense nat bouncing
-19493 19493/udp # pfSense nat bouncing
-19494 19494/tcp # pfSense nat bouncing
-19494 19494/udp # pfSense nat bouncing
-19495 19495/tcp # pfSense nat bouncing
-19495 19495/udp # pfSense nat bouncing
-19496 19496/tcp # pfSense nat bouncing
-19496 19496/udp # pfSense nat bouncing
-19497 19497/tcp # pfSense nat bouncing
-19497 19497/udp # pfSense nat bouncing
-19498 19498/tcp # pfSense nat bouncing
-19498 19498/udp # pfSense nat bouncing
-19499 19499/tcp # pfSense nat bouncing
-19499 19499/udp # pfSense nat bouncing
-19500 19500/tcp # pfSense nat bouncing
-19500 19500/udp # pfSense nat bouncing
-19501 19501/tcp # pfSense nat bouncing
-19501 19501/udp # pfSense nat bouncing
-19502 19502/tcp # pfSense nat bouncing
-19502 19502/udp # pfSense nat bouncing
-19503 19503/tcp # pfSense nat bouncing
-19503 19503/udp # pfSense nat bouncing
-19504 19504/tcp # pfSense nat bouncing
-19504 19504/udp # pfSense nat bouncing
-19505 19505/tcp # pfSense nat bouncing
-19505 19505/udp # pfSense nat bouncing
-19506 19506/tcp # pfSense nat bouncing
-19506 19506/udp # pfSense nat bouncing
-19507 19507/tcp # pfSense nat bouncing
-19507 19507/udp # pfSense nat bouncing
-19508 19508/tcp # pfSense nat bouncing
-19508 19508/udp # pfSense nat bouncing
-19509 19509/tcp # pfSense nat bouncing
-19509 19509/udp # pfSense nat bouncing
-19510 19510/tcp # pfSense nat bouncing
-19510 19510/udp # pfSense nat bouncing
-19511 19511/tcp # pfSense nat bouncing
-19511 19511/udp # pfSense nat bouncing
-19512 19512/tcp # pfSense nat bouncing
-19512 19512/udp # pfSense nat bouncing
-19513 19513/tcp # pfSense nat bouncing
-19513 19513/udp # pfSense nat bouncing
-19514 19514/tcp # pfSense nat bouncing
-19514 19514/udp # pfSense nat bouncing
-19515 19515/tcp # pfSense nat bouncing
-19515 19515/udp # pfSense nat bouncing
-19516 19516/tcp # pfSense nat bouncing
-19516 19516/udp # pfSense nat bouncing
-19517 19517/tcp # pfSense nat bouncing
-19517 19517/udp # pfSense nat bouncing
-19518 19518/tcp # pfSense nat bouncing
-19518 19518/udp # pfSense nat bouncing
-19519 19519/tcp # pfSense nat bouncing
-19519 19519/udp # pfSense nat bouncing
-19520 19520/tcp # pfSense nat bouncing
-19520 19520/udp # pfSense nat bouncing
-19521 19521/tcp # pfSense nat bouncing
-19521 19521/udp # pfSense nat bouncing
-19522 19522/tcp # pfSense nat bouncing
-19522 19522/udp # pfSense nat bouncing
-19523 19523/tcp # pfSense nat bouncing
-19523 19523/udp # pfSense nat bouncing
-19524 19524/tcp # pfSense nat bouncing
-19524 19524/udp # pfSense nat bouncing
-19525 19525/tcp # pfSense nat bouncing
-19525 19525/udp # pfSense nat bouncing
-19526 19526/tcp # pfSense nat bouncing
-19526 19526/udp # pfSense nat bouncing
-19527 19527/tcp # pfSense nat bouncing
-19527 19527/udp # pfSense nat bouncing
-19528 19528/tcp # pfSense nat bouncing
-19528 19528/udp # pfSense nat bouncing
-19529 19529/tcp # pfSense nat bouncing
-19529 19529/udp # pfSense nat bouncing
-19530 19530/tcp # pfSense nat bouncing
-19530 19530/udp # pfSense nat bouncing
-19531 19531/tcp # pfSense nat bouncing
-19531 19531/udp # pfSense nat bouncing
-19532 19532/tcp # pfSense nat bouncing
-19532 19532/udp # pfSense nat bouncing
-19533 19533/tcp # pfSense nat bouncing
-19533 19533/udp # pfSense nat bouncing
-19534 19534/tcp # pfSense nat bouncing
-19534 19534/udp # pfSense nat bouncing
-19535 19535/tcp # pfSense nat bouncing
-19535 19535/udp # pfSense nat bouncing
-19536 19536/tcp # pfSense nat bouncing
-19536 19536/udp # pfSense nat bouncing
-19537 19537/tcp # pfSense nat bouncing
-19537 19537/udp # pfSense nat bouncing
-19538 19538/tcp # pfSense nat bouncing
-19538 19538/udp # pfSense nat bouncing
-19539 19539/tcp # pfSense nat bouncing
-19539 19539/udp # pfSense nat bouncing
-19540 19540/tcp # pfSense nat bouncing
-19540 19540/udp # pfSense nat bouncing
-19541 19541/tcp # pfSense nat bouncing
-19541 19541/udp # pfSense nat bouncing
-19542 19542/tcp # pfSense nat bouncing
-19542 19542/udp # pfSense nat bouncing
-19543 19543/tcp # pfSense nat bouncing
-19543 19543/udp # pfSense nat bouncing
-19544 19544/tcp # pfSense nat bouncing
-19544 19544/udp # pfSense nat bouncing
-19545 19545/tcp # pfSense nat bouncing
-19545 19545/udp # pfSense nat bouncing
-19546 19546/tcp # pfSense nat bouncing
-19546 19546/udp # pfSense nat bouncing
-19547 19547/tcp # pfSense nat bouncing
-19547 19547/udp # pfSense nat bouncing
-19548 19548/tcp # pfSense nat bouncing
-19548 19548/udp # pfSense nat bouncing
-19549 19549/tcp # pfSense nat bouncing
-19549 19549/udp # pfSense nat bouncing
-19550 19550/tcp # pfSense nat bouncing
-19550 19550/udp # pfSense nat bouncing
-19551 19551/tcp # pfSense nat bouncing
-19551 19551/udp # pfSense nat bouncing
-19552 19552/tcp # pfSense nat bouncing
-19552 19552/udp # pfSense nat bouncing
-19553 19553/tcp # pfSense nat bouncing
-19553 19553/udp # pfSense nat bouncing
-19554 19554/tcp # pfSense nat bouncing
-19554 19554/udp # pfSense nat bouncing
-19555 19555/tcp # pfSense nat bouncing
-19555 19555/udp # pfSense nat bouncing
-19556 19556/tcp # pfSense nat bouncing
-19556 19556/udp # pfSense nat bouncing
-19557 19557/tcp # pfSense nat bouncing
-19557 19557/udp # pfSense nat bouncing
-19558 19558/tcp # pfSense nat bouncing
-19558 19558/udp # pfSense nat bouncing
-19559 19559/tcp # pfSense nat bouncing
-19559 19559/udp # pfSense nat bouncing
-19560 19560/tcp # pfSense nat bouncing
-19560 19560/udp # pfSense nat bouncing
-19561 19561/tcp # pfSense nat bouncing
-19561 19561/udp # pfSense nat bouncing
-19562 19562/tcp # pfSense nat bouncing
-19562 19562/udp # pfSense nat bouncing
-19563 19563/tcp # pfSense nat bouncing
-19563 19563/udp # pfSense nat bouncing
-19564 19564/tcp # pfSense nat bouncing
-19564 19564/udp # pfSense nat bouncing
-19565 19565/tcp # pfSense nat bouncing
-19565 19565/udp # pfSense nat bouncing
-19566 19566/tcp # pfSense nat bouncing
-19566 19566/udp # pfSense nat bouncing
-19567 19567/tcp # pfSense nat bouncing
-19567 19567/udp # pfSense nat bouncing
-19568 19568/tcp # pfSense nat bouncing
-19568 19568/udp # pfSense nat bouncing
-19569 19569/tcp # pfSense nat bouncing
-19569 19569/udp # pfSense nat bouncing
-19570 19570/tcp # pfSense nat bouncing
-19570 19570/udp # pfSense nat bouncing
-19571 19571/tcp # pfSense nat bouncing
-19571 19571/udp # pfSense nat bouncing
-19572 19572/tcp # pfSense nat bouncing
-19572 19572/udp # pfSense nat bouncing
-19573 19573/tcp # pfSense nat bouncing
-19573 19573/udp # pfSense nat bouncing
-19574 19574/tcp # pfSense nat bouncing
-19574 19574/udp # pfSense nat bouncing
-19575 19575/tcp # pfSense nat bouncing
-19575 19575/udp # pfSense nat bouncing
-19576 19576/tcp # pfSense nat bouncing
-19576 19576/udp # pfSense nat bouncing
-19577 19577/tcp # pfSense nat bouncing
-19577 19577/udp # pfSense nat bouncing
-19578 19578/tcp # pfSense nat bouncing
-19578 19578/udp # pfSense nat bouncing
-19579 19579/tcp # pfSense nat bouncing
-19579 19579/udp # pfSense nat bouncing
-19580 19580/tcp # pfSense nat bouncing
-19580 19580/udp # pfSense nat bouncing
-19581 19581/tcp # pfSense nat bouncing
-19581 19581/udp # pfSense nat bouncing
-19582 19582/tcp # pfSense nat bouncing
-19582 19582/udp # pfSense nat bouncing
-19583 19583/tcp # pfSense nat bouncing
-19583 19583/udp # pfSense nat bouncing
-19584 19584/tcp # pfSense nat bouncing
-19584 19584/udp # pfSense nat bouncing
-19585 19585/tcp # pfSense nat bouncing
-19585 19585/udp # pfSense nat bouncing
-19586 19586/tcp # pfSense nat bouncing
-19586 19586/udp # pfSense nat bouncing
-19587 19587/tcp # pfSense nat bouncing
-19587 19587/udp # pfSense nat bouncing
-19588 19588/tcp # pfSense nat bouncing
-19588 19588/udp # pfSense nat bouncing
-19589 19589/tcp # pfSense nat bouncing
-19589 19589/udp # pfSense nat bouncing
-19590 19590/tcp # pfSense nat bouncing
-19590 19590/udp # pfSense nat bouncing
-19591 19591/tcp # pfSense nat bouncing
-19591 19591/udp # pfSense nat bouncing
-19592 19592/tcp # pfSense nat bouncing
-19592 19592/udp # pfSense nat bouncing
-19593 19593/tcp # pfSense nat bouncing
-19593 19593/udp # pfSense nat bouncing
-19594 19594/tcp # pfSense nat bouncing
-19594 19594/udp # pfSense nat bouncing
-19595 19595/tcp # pfSense nat bouncing
-19595 19595/udp # pfSense nat bouncing
-19596 19596/tcp # pfSense nat bouncing
-19596 19596/udp # pfSense nat bouncing
-19597 19597/tcp # pfSense nat bouncing
-19597 19597/udp # pfSense nat bouncing
-19598 19598/tcp # pfSense nat bouncing
-19598 19598/udp # pfSense nat bouncing
-19599 19599/tcp # pfSense nat bouncing
-19599 19599/udp # pfSense nat bouncing
-19600 19600/tcp # pfSense nat bouncing
-19600 19600/udp # pfSense nat bouncing
-19601 19601/tcp # pfSense nat bouncing
-19601 19601/udp # pfSense nat bouncing
-19602 19602/tcp # pfSense nat bouncing
-19602 19602/udp # pfSense nat bouncing
-19603 19603/tcp # pfSense nat bouncing
-19603 19603/udp # pfSense nat bouncing
-19604 19604/tcp # pfSense nat bouncing
-19604 19604/udp # pfSense nat bouncing
-19605 19605/tcp # pfSense nat bouncing
-19605 19605/udp # pfSense nat bouncing
-19606 19606/tcp # pfSense nat bouncing
-19606 19606/udp # pfSense nat bouncing
-19607 19607/tcp # pfSense nat bouncing
-19607 19607/udp # pfSense nat bouncing
-19608 19608/tcp # pfSense nat bouncing
-19608 19608/udp # pfSense nat bouncing
-19609 19609/tcp # pfSense nat bouncing
-19609 19609/udp # pfSense nat bouncing
-19610 19610/tcp # pfSense nat bouncing
-19610 19610/udp # pfSense nat bouncing
-19611 19611/tcp # pfSense nat bouncing
-19611 19611/udp # pfSense nat bouncing
-19612 19612/tcp # pfSense nat bouncing
-19612 19612/udp # pfSense nat bouncing
-19613 19613/tcp # pfSense nat bouncing
-19613 19613/udp # pfSense nat bouncing
-19614 19614/tcp # pfSense nat bouncing
-19614 19614/udp # pfSense nat bouncing
-19615 19615/tcp # pfSense nat bouncing
-19615 19615/udp # pfSense nat bouncing
-19616 19616/tcp # pfSense nat bouncing
-19616 19616/udp # pfSense nat bouncing
-19617 19617/tcp # pfSense nat bouncing
-19617 19617/udp # pfSense nat bouncing
-19618 19618/tcp # pfSense nat bouncing
-19618 19618/udp # pfSense nat bouncing
-19619 19619/tcp # pfSense nat bouncing
-19619 19619/udp # pfSense nat bouncing
-19620 19620/tcp # pfSense nat bouncing
-19620 19620/udp # pfSense nat bouncing
-19621 19621/tcp # pfSense nat bouncing
-19621 19621/udp # pfSense nat bouncing
-19622 19622/tcp # pfSense nat bouncing
-19622 19622/udp # pfSense nat bouncing
-19623 19623/tcp # pfSense nat bouncing
-19623 19623/udp # pfSense nat bouncing
-19624 19624/tcp # pfSense nat bouncing
-19624 19624/udp # pfSense nat bouncing
-19625 19625/tcp # pfSense nat bouncing
-19625 19625/udp # pfSense nat bouncing
-19626 19626/tcp # pfSense nat bouncing
-19626 19626/udp # pfSense nat bouncing
-19627 19627/tcp # pfSense nat bouncing
-19627 19627/udp # pfSense nat bouncing
-19628 19628/tcp # pfSense nat bouncing
-19628 19628/udp # pfSense nat bouncing
-19629 19629/tcp # pfSense nat bouncing
-19629 19629/udp # pfSense nat bouncing
-19630 19630/tcp # pfSense nat bouncing
-19630 19630/udp # pfSense nat bouncing
-19631 19631/tcp # pfSense nat bouncing
-19631 19631/udp # pfSense nat bouncing
-19632 19632/tcp # pfSense nat bouncing
-19632 19632/udp # pfSense nat bouncing
-19633 19633/tcp # pfSense nat bouncing
-19633 19633/udp # pfSense nat bouncing
-19634 19634/tcp # pfSense nat bouncing
-19634 19634/udp # pfSense nat bouncing
-19635 19635/tcp # pfSense nat bouncing
-19635 19635/udp # pfSense nat bouncing
-19636 19636/tcp # pfSense nat bouncing
-19636 19636/udp # pfSense nat bouncing
-19637 19637/tcp # pfSense nat bouncing
-19637 19637/udp # pfSense nat bouncing
-19638 19638/tcp # pfSense nat bouncing
-19638 19638/udp # pfSense nat bouncing
-19639 19639/tcp # pfSense nat bouncing
-19639 19639/udp # pfSense nat bouncing
-19640 19640/tcp # pfSense nat bouncing
-19640 19640/udp # pfSense nat bouncing
-19641 19641/tcp # pfSense nat bouncing
-19641 19641/udp # pfSense nat bouncing
-19642 19642/tcp # pfSense nat bouncing
-19642 19642/udp # pfSense nat bouncing
-19643 19643/tcp # pfSense nat bouncing
-19643 19643/udp # pfSense nat bouncing
-19644 19644/tcp # pfSense nat bouncing
-19644 19644/udp # pfSense nat bouncing
-19645 19645/tcp # pfSense nat bouncing
-19645 19645/udp # pfSense nat bouncing
-19646 19646/tcp # pfSense nat bouncing
-19646 19646/udp # pfSense nat bouncing
-19647 19647/tcp # pfSense nat bouncing
-19647 19647/udp # pfSense nat bouncing
-19648 19648/tcp # pfSense nat bouncing
-19648 19648/udp # pfSense nat bouncing
-19649 19649/tcp # pfSense nat bouncing
-19649 19649/udp # pfSense nat bouncing
-19650 19650/tcp # pfSense nat bouncing
-19650 19650/udp # pfSense nat bouncing
-19651 19651/tcp # pfSense nat bouncing
-19651 19651/udp # pfSense nat bouncing
-19652 19652/tcp # pfSense nat bouncing
-19652 19652/udp # pfSense nat bouncing
-19653 19653/tcp # pfSense nat bouncing
-19653 19653/udp # pfSense nat bouncing
-19654 19654/tcp # pfSense nat bouncing
-19654 19654/udp # pfSense nat bouncing
-19655 19655/tcp # pfSense nat bouncing
-19655 19655/udp # pfSense nat bouncing
-19656 19656/tcp # pfSense nat bouncing
-19656 19656/udp # pfSense nat bouncing
-19657 19657/tcp # pfSense nat bouncing
-19657 19657/udp # pfSense nat bouncing
-19658 19658/tcp # pfSense nat bouncing
-19658 19658/udp # pfSense nat bouncing
-19659 19659/tcp # pfSense nat bouncing
-19659 19659/udp # pfSense nat bouncing
-19660 19660/tcp # pfSense nat bouncing
-19660 19660/udp # pfSense nat bouncing
-19661 19661/tcp # pfSense nat bouncing
-19661 19661/udp # pfSense nat bouncing
-19662 19662/tcp # pfSense nat bouncing
-19662 19662/udp # pfSense nat bouncing
-19663 19663/tcp # pfSense nat bouncing
-19663 19663/udp # pfSense nat bouncing
-19664 19664/tcp # pfSense nat bouncing
-19664 19664/udp # pfSense nat bouncing
-19665 19665/tcp # pfSense nat bouncing
-19665 19665/udp # pfSense nat bouncing
-19666 19666/tcp # pfSense nat bouncing
-19666 19666/udp # pfSense nat bouncing
-19667 19667/tcp # pfSense nat bouncing
-19667 19667/udp # pfSense nat bouncing
-19668 19668/tcp # pfSense nat bouncing
-19668 19668/udp # pfSense nat bouncing
-19669 19669/tcp # pfSense nat bouncing
-19669 19669/udp # pfSense nat bouncing
-19670 19670/tcp # pfSense nat bouncing
-19670 19670/udp # pfSense nat bouncing
-19671 19671/tcp # pfSense nat bouncing
-19671 19671/udp # pfSense nat bouncing
-19672 19672/tcp # pfSense nat bouncing
-19672 19672/udp # pfSense nat bouncing
-19673 19673/tcp # pfSense nat bouncing
-19673 19673/udp # pfSense nat bouncing
-19674 19674/tcp # pfSense nat bouncing
-19674 19674/udp # pfSense nat bouncing
-19675 19675/tcp # pfSense nat bouncing
-19675 19675/udp # pfSense nat bouncing
-19676 19676/tcp # pfSense nat bouncing
-19676 19676/udp # pfSense nat bouncing
-19677 19677/tcp # pfSense nat bouncing
-19677 19677/udp # pfSense nat bouncing
-19678 19678/tcp # pfSense nat bouncing
-19678 19678/udp # pfSense nat bouncing
-19679 19679/tcp # pfSense nat bouncing
-19679 19679/udp # pfSense nat bouncing
-19680 19680/tcp # pfSense nat bouncing
-19680 19680/udp # pfSense nat bouncing
-19681 19681/tcp # pfSense nat bouncing
-19681 19681/udp # pfSense nat bouncing
-19682 19682/tcp # pfSense nat bouncing
-19682 19682/udp # pfSense nat bouncing
-19683 19683/tcp # pfSense nat bouncing
-19683 19683/udp # pfSense nat bouncing
-19684 19684/tcp # pfSense nat bouncing
-19684 19684/udp # pfSense nat bouncing
-19685 19685/tcp # pfSense nat bouncing
-19685 19685/udp # pfSense nat bouncing
-19686 19686/tcp # pfSense nat bouncing
-19686 19686/udp # pfSense nat bouncing
-19687 19687/tcp # pfSense nat bouncing
-19687 19687/udp # pfSense nat bouncing
-19688 19688/tcp # pfSense nat bouncing
-19688 19688/udp # pfSense nat bouncing
-19689 19689/tcp # pfSense nat bouncing
-19689 19689/udp # pfSense nat bouncing
-19690 19690/tcp # pfSense nat bouncing
-19690 19690/udp # pfSense nat bouncing
-19691 19691/tcp # pfSense nat bouncing
-19691 19691/udp # pfSense nat bouncing
-19692 19692/tcp # pfSense nat bouncing
-19692 19692/udp # pfSense nat bouncing
-19693 19693/tcp # pfSense nat bouncing
-19693 19693/udp # pfSense nat bouncing
-19694 19694/tcp # pfSense nat bouncing
-19694 19694/udp # pfSense nat bouncing
-19695 19695/tcp # pfSense nat bouncing
-19695 19695/udp # pfSense nat bouncing
-19696 19696/tcp # pfSense nat bouncing
-19696 19696/udp # pfSense nat bouncing
-19697 19697/tcp # pfSense nat bouncing
-19697 19697/udp # pfSense nat bouncing
-19698 19698/tcp # pfSense nat bouncing
-19698 19698/udp # pfSense nat bouncing
-19699 19699/tcp # pfSense nat bouncing
-19699 19699/udp # pfSense nat bouncing
-19700 19700/tcp # pfSense nat bouncing
-19700 19700/udp # pfSense nat bouncing
-19701 19701/tcp # pfSense nat bouncing
-19701 19701/udp # pfSense nat bouncing
-19702 19702/tcp # pfSense nat bouncing
-19702 19702/udp # pfSense nat bouncing
-19703 19703/tcp # pfSense nat bouncing
-19703 19703/udp # pfSense nat bouncing
-19704 19704/tcp # pfSense nat bouncing
-19704 19704/udp # pfSense nat bouncing
-19705 19705/tcp # pfSense nat bouncing
-19705 19705/udp # pfSense nat bouncing
-19706 19706/tcp # pfSense nat bouncing
-19706 19706/udp # pfSense nat bouncing
-19707 19707/tcp # pfSense nat bouncing
-19707 19707/udp # pfSense nat bouncing
-19708 19708/tcp # pfSense nat bouncing
-19708 19708/udp # pfSense nat bouncing
-19709 19709/tcp # pfSense nat bouncing
-19709 19709/udp # pfSense nat bouncing
-19710 19710/tcp # pfSense nat bouncing
-19710 19710/udp # pfSense nat bouncing
-19711 19711/tcp # pfSense nat bouncing
-19711 19711/udp # pfSense nat bouncing
-19712 19712/tcp # pfSense nat bouncing
-19712 19712/udp # pfSense nat bouncing
-19713 19713/tcp # pfSense nat bouncing
-19713 19713/udp # pfSense nat bouncing
-19714 19714/tcp # pfSense nat bouncing
-19714 19714/udp # pfSense nat bouncing
-19715 19715/tcp # pfSense nat bouncing
-19715 19715/udp # pfSense nat bouncing
-19716 19716/tcp # pfSense nat bouncing
-19716 19716/udp # pfSense nat bouncing
-19717 19717/tcp # pfSense nat bouncing
-19717 19717/udp # pfSense nat bouncing
-19718 19718/tcp # pfSense nat bouncing
-19718 19718/udp # pfSense nat bouncing
-19719 19719/tcp # pfSense nat bouncing
-19719 19719/udp # pfSense nat bouncing
-19720 19720/tcp # pfSense nat bouncing
-19720 19720/udp # pfSense nat bouncing
-19721 19721/tcp # pfSense nat bouncing
-19721 19721/udp # pfSense nat bouncing
-19722 19722/tcp # pfSense nat bouncing
-19722 19722/udp # pfSense nat bouncing
-19723 19723/tcp # pfSense nat bouncing
-19723 19723/udp # pfSense nat bouncing
-19724 19724/tcp # pfSense nat bouncing
-19724 19724/udp # pfSense nat bouncing
-19725 19725/tcp # pfSense nat bouncing
-19725 19725/udp # pfSense nat bouncing
-19726 19726/tcp # pfSense nat bouncing
-19726 19726/udp # pfSense nat bouncing
-19727 19727/tcp # pfSense nat bouncing
-19727 19727/udp # pfSense nat bouncing
-19728 19728/tcp # pfSense nat bouncing
-19728 19728/udp # pfSense nat bouncing
-19729 19729/tcp # pfSense nat bouncing
-19729 19729/udp # pfSense nat bouncing
-19730 19730/tcp # pfSense nat bouncing
-19730 19730/udp # pfSense nat bouncing
-19731 19731/tcp # pfSense nat bouncing
-19731 19731/udp # pfSense nat bouncing
-19732 19732/tcp # pfSense nat bouncing
-19732 19732/udp # pfSense nat bouncing
-19733 19733/tcp # pfSense nat bouncing
-19733 19733/udp # pfSense nat bouncing
-19734 19734/tcp # pfSense nat bouncing
-19734 19734/udp # pfSense nat bouncing
-19735 19735/tcp # pfSense nat bouncing
-19735 19735/udp # pfSense nat bouncing
-19736 19736/tcp # pfSense nat bouncing
-19736 19736/udp # pfSense nat bouncing
-19737 19737/tcp # pfSense nat bouncing
-19737 19737/udp # pfSense nat bouncing
-19738 19738/tcp # pfSense nat bouncing
-19738 19738/udp # pfSense nat bouncing
-19739 19739/tcp # pfSense nat bouncing
-19739 19739/udp # pfSense nat bouncing
-19740 19740/tcp # pfSense nat bouncing
-19740 19740/udp # pfSense nat bouncing
-19741 19741/tcp # pfSense nat bouncing
-19741 19741/udp # pfSense nat bouncing
-19742 19742/tcp # pfSense nat bouncing
-19742 19742/udp # pfSense nat bouncing
-19743 19743/tcp # pfSense nat bouncing
-19743 19743/udp # pfSense nat bouncing
-19744 19744/tcp # pfSense nat bouncing
-19744 19744/udp # pfSense nat bouncing
-19745 19745/tcp # pfSense nat bouncing
-19745 19745/udp # pfSense nat bouncing
-19746 19746/tcp # pfSense nat bouncing
-19746 19746/udp # pfSense nat bouncing
-19747 19747/tcp # pfSense nat bouncing
-19747 19747/udp # pfSense nat bouncing
-19748 19748/tcp # pfSense nat bouncing
-19748 19748/udp # pfSense nat bouncing
-19749 19749/tcp # pfSense nat bouncing
-19749 19749/udp # pfSense nat bouncing
-19750 19750/tcp # pfSense nat bouncing
-19750 19750/udp # pfSense nat bouncing
-19751 19751/tcp # pfSense nat bouncing
-19751 19751/udp # pfSense nat bouncing
-19752 19752/tcp # pfSense nat bouncing
-19752 19752/udp # pfSense nat bouncing
-19753 19753/tcp # pfSense nat bouncing
-19753 19753/udp # pfSense nat bouncing
-19754 19754/tcp # pfSense nat bouncing
-19754 19754/udp # pfSense nat bouncing
-19755 19755/tcp # pfSense nat bouncing
-19755 19755/udp # pfSense nat bouncing
-19756 19756/tcp # pfSense nat bouncing
-19756 19756/udp # pfSense nat bouncing
-19757 19757/tcp # pfSense nat bouncing
-19757 19757/udp # pfSense nat bouncing
-19758 19758/tcp # pfSense nat bouncing
-19758 19758/udp # pfSense nat bouncing
-19759 19759/tcp # pfSense nat bouncing
-19759 19759/udp # pfSense nat bouncing
-19760 19760/tcp # pfSense nat bouncing
-19760 19760/udp # pfSense nat bouncing
-19761 19761/tcp # pfSense nat bouncing
-19761 19761/udp # pfSense nat bouncing
-19762 19762/tcp # pfSense nat bouncing
-19762 19762/udp # pfSense nat bouncing
-19763 19763/tcp # pfSense nat bouncing
-19763 19763/udp # pfSense nat bouncing
-19764 19764/tcp # pfSense nat bouncing
-19764 19764/udp # pfSense nat bouncing
-19765 19765/tcp # pfSense nat bouncing
-19765 19765/udp # pfSense nat bouncing
-19766 19766/tcp # pfSense nat bouncing
-19766 19766/udp # pfSense nat bouncing
-19767 19767/tcp # pfSense nat bouncing
-19767 19767/udp # pfSense nat bouncing
-19768 19768/tcp # pfSense nat bouncing
-19768 19768/udp # pfSense nat bouncing
-19769 19769/tcp # pfSense nat bouncing
-19769 19769/udp # pfSense nat bouncing
-19770 19770/tcp # pfSense nat bouncing
-19770 19770/udp # pfSense nat bouncing
-19771 19771/tcp # pfSense nat bouncing
-19771 19771/udp # pfSense nat bouncing
-19772 19772/tcp # pfSense nat bouncing
-19772 19772/udp # pfSense nat bouncing
-19773 19773/tcp # pfSense nat bouncing
-19773 19773/udp # pfSense nat bouncing
-19774 19774/tcp # pfSense nat bouncing
-19774 19774/udp # pfSense nat bouncing
-19775 19775/tcp # pfSense nat bouncing
-19775 19775/udp # pfSense nat bouncing
-19776 19776/tcp # pfSense nat bouncing
-19776 19776/udp # pfSense nat bouncing
-19777 19777/tcp # pfSense nat bouncing
-19777 19777/udp # pfSense nat bouncing
-19778 19778/tcp # pfSense nat bouncing
-19778 19778/udp # pfSense nat bouncing
-19779 19779/tcp # pfSense nat bouncing
-19779 19779/udp # pfSense nat bouncing
-19780 19780/tcp # pfSense nat bouncing
-19780 19780/udp # pfSense nat bouncing
-19781 19781/tcp # pfSense nat bouncing
-19781 19781/udp # pfSense nat bouncing
-19782 19782/tcp # pfSense nat bouncing
-19782 19782/udp # pfSense nat bouncing
-19783 19783/tcp # pfSense nat bouncing
-19783 19783/udp # pfSense nat bouncing
-19784 19784/tcp # pfSense nat bouncing
-19784 19784/udp # pfSense nat bouncing
-19785 19785/tcp # pfSense nat bouncing
-19785 19785/udp # pfSense nat bouncing
-19786 19786/tcp # pfSense nat bouncing
-19786 19786/udp # pfSense nat bouncing
-19787 19787/tcp # pfSense nat bouncing
-19787 19787/udp # pfSense nat bouncing
-19788 19788/tcp # pfSense nat bouncing
-19788 19788/udp # pfSense nat bouncing
-19789 19789/tcp # pfSense nat bouncing
-19789 19789/udp # pfSense nat bouncing
-19790 19790/tcp # pfSense nat bouncing
-19790 19790/udp # pfSense nat bouncing
-19791 19791/tcp # pfSense nat bouncing
-19791 19791/udp # pfSense nat bouncing
-19792 19792/tcp # pfSense nat bouncing
-19792 19792/udp # pfSense nat bouncing
-19793 19793/tcp # pfSense nat bouncing
-19793 19793/udp # pfSense nat bouncing
-19794 19794/tcp # pfSense nat bouncing
-19794 19794/udp # pfSense nat bouncing
-19795 19795/tcp # pfSense nat bouncing
-19795 19795/udp # pfSense nat bouncing
-19796 19796/tcp # pfSense nat bouncing
-19796 19796/udp # pfSense nat bouncing
-19797 19797/tcp # pfSense nat bouncing
-19797 19797/udp # pfSense nat bouncing
-19798 19798/tcp # pfSense nat bouncing
-19798 19798/udp # pfSense nat bouncing
-19799 19799/tcp # pfSense nat bouncing
-19799 19799/udp # pfSense nat bouncing
-19800 19800/tcp # pfSense nat bouncing
-19800 19800/udp # pfSense nat bouncing
-19801 19801/tcp # pfSense nat bouncing
-19801 19801/udp # pfSense nat bouncing
-19802 19802/tcp # pfSense nat bouncing
-19802 19802/udp # pfSense nat bouncing
-19803 19803/tcp # pfSense nat bouncing
-19803 19803/udp # pfSense nat bouncing
-19804 19804/tcp # pfSense nat bouncing
-19804 19804/udp # pfSense nat bouncing
-19805 19805/tcp # pfSense nat bouncing
-19805 19805/udp # pfSense nat bouncing
-19806 19806/tcp # pfSense nat bouncing
-19806 19806/udp # pfSense nat bouncing
-19807 19807/tcp # pfSense nat bouncing
-19807 19807/udp # pfSense nat bouncing
-19808 19808/tcp # pfSense nat bouncing
-19808 19808/udp # pfSense nat bouncing
-19809 19809/tcp # pfSense nat bouncing
-19809 19809/udp # pfSense nat bouncing
-19810 19810/tcp # pfSense nat bouncing
-19810 19810/udp # pfSense nat bouncing
-19811 19811/tcp # pfSense nat bouncing
-19811 19811/udp # pfSense nat bouncing
-19812 19812/tcp # pfSense nat bouncing
-19812 19812/udp # pfSense nat bouncing
-19813 19813/tcp # pfSense nat bouncing
-19813 19813/udp # pfSense nat bouncing
-19814 19814/tcp # pfSense nat bouncing
-19814 19814/udp # pfSense nat bouncing
-19815 19815/tcp # pfSense nat bouncing
-19815 19815/udp # pfSense nat bouncing
-19816 19816/tcp # pfSense nat bouncing
-19816 19816/udp # pfSense nat bouncing
-19817 19817/tcp # pfSense nat bouncing
-19817 19817/udp # pfSense nat bouncing
-19818 19818/tcp # pfSense nat bouncing
-19818 19818/udp # pfSense nat bouncing
-19819 19819/tcp # pfSense nat bouncing
-19819 19819/udp # pfSense nat bouncing
-19820 19820/tcp # pfSense nat bouncing
-19820 19820/udp # pfSense nat bouncing
-19821 19821/tcp # pfSense nat bouncing
-19821 19821/udp # pfSense nat bouncing
-19822 19822/tcp # pfSense nat bouncing
-19822 19822/udp # pfSense nat bouncing
-19823 19823/tcp # pfSense nat bouncing
-19823 19823/udp # pfSense nat bouncing
-19824 19824/tcp # pfSense nat bouncing
-19824 19824/udp # pfSense nat bouncing
-19825 19825/tcp # pfSense nat bouncing
-19825 19825/udp # pfSense nat bouncing
-19826 19826/tcp # pfSense nat bouncing
-19826 19826/udp # pfSense nat bouncing
-19827 19827/tcp # pfSense nat bouncing
-19827 19827/udp # pfSense nat bouncing
-19828 19828/tcp # pfSense nat bouncing
-19828 19828/udp # pfSense nat bouncing
-19829 19829/tcp # pfSense nat bouncing
-19829 19829/udp # pfSense nat bouncing
-19830 19830/tcp # pfSense nat bouncing
-19830 19830/udp # pfSense nat bouncing
-19831 19831/tcp # pfSense nat bouncing
-19831 19831/udp # pfSense nat bouncing
-19832 19832/tcp # pfSense nat bouncing
-19832 19832/udp # pfSense nat bouncing
-19833 19833/tcp # pfSense nat bouncing
-19833 19833/udp # pfSense nat bouncing
-19834 19834/tcp # pfSense nat bouncing
-19834 19834/udp # pfSense nat bouncing
-19835 19835/tcp # pfSense nat bouncing
-19835 19835/udp # pfSense nat bouncing
-19836 19836/tcp # pfSense nat bouncing
-19836 19836/udp # pfSense nat bouncing
-19837 19837/tcp # pfSense nat bouncing
-19837 19837/udp # pfSense nat bouncing
-19838 19838/tcp # pfSense nat bouncing
-19838 19838/udp # pfSense nat bouncing
-19839 19839/tcp # pfSense nat bouncing
-19839 19839/udp # pfSense nat bouncing
-19840 19840/tcp # pfSense nat bouncing
-19840 19840/udp # pfSense nat bouncing
-19841 19841/tcp # pfSense nat bouncing
-19841 19841/udp # pfSense nat bouncing
-19842 19842/tcp # pfSense nat bouncing
-19842 19842/udp # pfSense nat bouncing
-19843 19843/tcp # pfSense nat bouncing
-19843 19843/udp # pfSense nat bouncing
-19844 19844/tcp # pfSense nat bouncing
-19844 19844/udp # pfSense nat bouncing
-19845 19845/tcp # pfSense nat bouncing
-19845 19845/udp # pfSense nat bouncing
-19846 19846/tcp # pfSense nat bouncing
-19846 19846/udp # pfSense nat bouncing
-19847 19847/tcp # pfSense nat bouncing
-19847 19847/udp # pfSense nat bouncing
-19848 19848/tcp # pfSense nat bouncing
-19848 19848/udp # pfSense nat bouncing
-19849 19849/tcp # pfSense nat bouncing
-19849 19849/udp # pfSense nat bouncing
-19850 19850/tcp # pfSense nat bouncing
-19850 19850/udp # pfSense nat bouncing
-19851 19851/tcp # pfSense nat bouncing
-19851 19851/udp # pfSense nat bouncing
-19852 19852/tcp # pfSense nat bouncing
-19852 19852/udp # pfSense nat bouncing
-19853 19853/tcp # pfSense nat bouncing
-19853 19853/udp # pfSense nat bouncing
-19854 19854/tcp # pfSense nat bouncing
-19854 19854/udp # pfSense nat bouncing
-19855 19855/tcp # pfSense nat bouncing
-19855 19855/udp # pfSense nat bouncing
-19856 19856/tcp # pfSense nat bouncing
-19856 19856/udp # pfSense nat bouncing
-19857 19857/tcp # pfSense nat bouncing
-19857 19857/udp # pfSense nat bouncing
-19858 19858/tcp # pfSense nat bouncing
-19858 19858/udp # pfSense nat bouncing
-19859 19859/tcp # pfSense nat bouncing
-19859 19859/udp # pfSense nat bouncing
-19860 19860/tcp # pfSense nat bouncing
-19860 19860/udp # pfSense nat bouncing
-19861 19861/tcp # pfSense nat bouncing
-19861 19861/udp # pfSense nat bouncing
-19862 19862/tcp # pfSense nat bouncing
-19862 19862/udp # pfSense nat bouncing
-19863 19863/tcp # pfSense nat bouncing
-19863 19863/udp # pfSense nat bouncing
-19864 19864/tcp # pfSense nat bouncing
-19864 19864/udp # pfSense nat bouncing
-19865 19865/tcp # pfSense nat bouncing
-19865 19865/udp # pfSense nat bouncing
-19866 19866/tcp # pfSense nat bouncing
-19866 19866/udp # pfSense nat bouncing
-19867 19867/tcp # pfSense nat bouncing
-19867 19867/udp # pfSense nat bouncing
-19868 19868/tcp # pfSense nat bouncing
-19868 19868/udp # pfSense nat bouncing
-19869 19869/tcp # pfSense nat bouncing
-19869 19869/udp # pfSense nat bouncing
-19870 19870/tcp # pfSense nat bouncing
-19870 19870/udp # pfSense nat bouncing
-19871 19871/tcp # pfSense nat bouncing
-19871 19871/udp # pfSense nat bouncing
-19872 19872/tcp # pfSense nat bouncing
-19872 19872/udp # pfSense nat bouncing
-19873 19873/tcp # pfSense nat bouncing
-19873 19873/udp # pfSense nat bouncing
-19874 19874/tcp # pfSense nat bouncing
-19874 19874/udp # pfSense nat bouncing
-19875 19875/tcp # pfSense nat bouncing
-19875 19875/udp # pfSense nat bouncing
-19876 19876/tcp # pfSense nat bouncing
-19876 19876/udp # pfSense nat bouncing
-19877 19877/tcp # pfSense nat bouncing
-19877 19877/udp # pfSense nat bouncing
-19878 19878/tcp # pfSense nat bouncing
-19878 19878/udp # pfSense nat bouncing
-19879 19879/tcp # pfSense nat bouncing
-19879 19879/udp # pfSense nat bouncing
-19880 19880/tcp # pfSense nat bouncing
-19880 19880/udp # pfSense nat bouncing
-19881 19881/tcp # pfSense nat bouncing
-19881 19881/udp # pfSense nat bouncing
-19882 19882/tcp # pfSense nat bouncing
-19882 19882/udp # pfSense nat bouncing
-19883 19883/tcp # pfSense nat bouncing
-19883 19883/udp # pfSense nat bouncing
-19884 19884/tcp # pfSense nat bouncing
-19884 19884/udp # pfSense nat bouncing
-19885 19885/tcp # pfSense nat bouncing
-19885 19885/udp # pfSense nat bouncing
-19886 19886/tcp # pfSense nat bouncing
-19886 19886/udp # pfSense nat bouncing
-19887 19887/tcp # pfSense nat bouncing
-19887 19887/udp # pfSense nat bouncing
-19888 19888/tcp # pfSense nat bouncing
-19888 19888/udp # pfSense nat bouncing
-19889 19889/tcp # pfSense nat bouncing
-19889 19889/udp # pfSense nat bouncing
-19890 19890/tcp # pfSense nat bouncing
-19890 19890/udp # pfSense nat bouncing
-19891 19891/tcp # pfSense nat bouncing
-19891 19891/udp # pfSense nat bouncing
-19892 19892/tcp # pfSense nat bouncing
-19892 19892/udp # pfSense nat bouncing
-19893 19893/tcp # pfSense nat bouncing
-19893 19893/udp # pfSense nat bouncing
-19894 19894/tcp # pfSense nat bouncing
-19894 19894/udp # pfSense nat bouncing
-19895 19895/tcp # pfSense nat bouncing
-19895 19895/udp # pfSense nat bouncing
-19896 19896/tcp # pfSense nat bouncing
-19896 19896/udp # pfSense nat bouncing
-19897 19897/tcp # pfSense nat bouncing
-19897 19897/udp # pfSense nat bouncing
-19898 19898/tcp # pfSense nat bouncing
-19898 19898/udp # pfSense nat bouncing
-19899 19899/tcp # pfSense nat bouncing
-19899 19899/udp # pfSense nat bouncing
-19900 19900/tcp # pfSense nat bouncing
-19900 19900/udp # pfSense nat bouncing
-19901 19901/tcp # pfSense nat bouncing
-19901 19901/udp # pfSense nat bouncing
-19902 19902/tcp # pfSense nat bouncing
-19902 19902/udp # pfSense nat bouncing
-19903 19903/tcp # pfSense nat bouncing
-19903 19903/udp # pfSense nat bouncing
-19904 19904/tcp # pfSense nat bouncing
-19904 19904/udp # pfSense nat bouncing
-19905 19905/tcp # pfSense nat bouncing
-19905 19905/udp # pfSense nat bouncing
-19906 19906/tcp # pfSense nat bouncing
-19906 19906/udp # pfSense nat bouncing
-19907 19907/tcp # pfSense nat bouncing
-19907 19907/udp # pfSense nat bouncing
-19908 19908/tcp # pfSense nat bouncing
-19908 19908/udp # pfSense nat bouncing
-19909 19909/tcp # pfSense nat bouncing
-19909 19909/udp # pfSense nat bouncing
-19910 19910/tcp # pfSense nat bouncing
-19910 19910/udp # pfSense nat bouncing
-19911 19911/tcp # pfSense nat bouncing
-19911 19911/udp # pfSense nat bouncing
-19912 19912/tcp # pfSense nat bouncing
-19912 19912/udp # pfSense nat bouncing
-19913 19913/tcp # pfSense nat bouncing
-19913 19913/udp # pfSense nat bouncing
-19914 19914/tcp # pfSense nat bouncing
-19914 19914/udp # pfSense nat bouncing
-19915 19915/tcp # pfSense nat bouncing
-19915 19915/udp # pfSense nat bouncing
-19916 19916/tcp # pfSense nat bouncing
-19916 19916/udp # pfSense nat bouncing
-19917 19917/tcp # pfSense nat bouncing
-19917 19917/udp # pfSense nat bouncing
-19918 19918/tcp # pfSense nat bouncing
-19918 19918/udp # pfSense nat bouncing
-19919 19919/tcp # pfSense nat bouncing
-19919 19919/udp # pfSense nat bouncing
-19920 19920/tcp # pfSense nat bouncing
-19920 19920/udp # pfSense nat bouncing
-19921 19921/tcp # pfSense nat bouncing
-19921 19921/udp # pfSense nat bouncing
-19922 19922/tcp # pfSense nat bouncing
-19922 19922/udp # pfSense nat bouncing
-19923 19923/tcp # pfSense nat bouncing
-19923 19923/udp # pfSense nat bouncing
-19924 19924/tcp # pfSense nat bouncing
-19924 19924/udp # pfSense nat bouncing
-19925 19925/tcp # pfSense nat bouncing
-19925 19925/udp # pfSense nat bouncing
-19926 19926/tcp # pfSense nat bouncing
-19926 19926/udp # pfSense nat bouncing
-19927 19927/tcp # pfSense nat bouncing
-19927 19927/udp # pfSense nat bouncing
-19928 19928/tcp # pfSense nat bouncing
-19928 19928/udp # pfSense nat bouncing
-19929 19929/tcp # pfSense nat bouncing
-19929 19929/udp # pfSense nat bouncing
-19930 19930/tcp # pfSense nat bouncing
-19930 19930/udp # pfSense nat bouncing
-19931 19931/tcp # pfSense nat bouncing
-19931 19931/udp # pfSense nat bouncing
-19932 19932/tcp # pfSense nat bouncing
-19932 19932/udp # pfSense nat bouncing
-19933 19933/tcp # pfSense nat bouncing
-19933 19933/udp # pfSense nat bouncing
-19934 19934/tcp # pfSense nat bouncing
-19934 19934/udp # pfSense nat bouncing
-19935 19935/tcp # pfSense nat bouncing
-19935 19935/udp # pfSense nat bouncing
-19936 19936/tcp # pfSense nat bouncing
-19936 19936/udp # pfSense nat bouncing
-19937 19937/tcp # pfSense nat bouncing
-19937 19937/udp # pfSense nat bouncing
-19938 19938/tcp # pfSense nat bouncing
-19938 19938/udp # pfSense nat bouncing
-19939 19939/tcp # pfSense nat bouncing
-19939 19939/udp # pfSense nat bouncing
-19940 19940/tcp # pfSense nat bouncing
-19940 19940/udp # pfSense nat bouncing
-19941 19941/tcp # pfSense nat bouncing
-19941 19941/udp # pfSense nat bouncing
-19942 19942/tcp # pfSense nat bouncing
-19942 19942/udp # pfSense nat bouncing
-19943 19943/tcp # pfSense nat bouncing
-19943 19943/udp # pfSense nat bouncing
-19944 19944/tcp # pfSense nat bouncing
-19944 19944/udp # pfSense nat bouncing
-19945 19945/tcp # pfSense nat bouncing
-19945 19945/udp # pfSense nat bouncing
-19946 19946/tcp # pfSense nat bouncing
-19946 19946/udp # pfSense nat bouncing
-19947 19947/tcp # pfSense nat bouncing
-19947 19947/udp # pfSense nat bouncing
-19948 19948/tcp # pfSense nat bouncing
-19948 19948/udp # pfSense nat bouncing
-19949 19949/tcp # pfSense nat bouncing
-19949 19949/udp # pfSense nat bouncing
-19950 19950/tcp # pfSense nat bouncing
-19950 19950/udp # pfSense nat bouncing
-19951 19951/tcp # pfSense nat bouncing
-19951 19951/udp # pfSense nat bouncing
-19952 19952/tcp # pfSense nat bouncing
-19952 19952/udp # pfSense nat bouncing
-19953 19953/tcp # pfSense nat bouncing
-19953 19953/udp # pfSense nat bouncing
-19954 19954/tcp # pfSense nat bouncing
-19954 19954/udp # pfSense nat bouncing
-19955 19955/tcp # pfSense nat bouncing
-19955 19955/udp # pfSense nat bouncing
-19956 19956/tcp # pfSense nat bouncing
-19956 19956/udp # pfSense nat bouncing
-19957 19957/tcp # pfSense nat bouncing
-19957 19957/udp # pfSense nat bouncing
-19958 19958/tcp # pfSense nat bouncing
-19958 19958/udp # pfSense nat bouncing
-19959 19959/tcp # pfSense nat bouncing
-19959 19959/udp # pfSense nat bouncing
-19960 19960/tcp # pfSense nat bouncing
-19960 19960/udp # pfSense nat bouncing
-19961 19961/tcp # pfSense nat bouncing
-19961 19961/udp # pfSense nat bouncing
-19962 19962/tcp # pfSense nat bouncing
-19962 19962/udp # pfSense nat bouncing
-19963 19963/tcp # pfSense nat bouncing
-19963 19963/udp # pfSense nat bouncing
-19964 19964/tcp # pfSense nat bouncing
-19964 19964/udp # pfSense nat bouncing
-19965 19965/tcp # pfSense nat bouncing
-19965 19965/udp # pfSense nat bouncing
-19966 19966/tcp # pfSense nat bouncing
-19966 19966/udp # pfSense nat bouncing
-19967 19967/tcp # pfSense nat bouncing
-19967 19967/udp # pfSense nat bouncing
-19968 19968/tcp # pfSense nat bouncing
-19968 19968/udp # pfSense nat bouncing
-19969 19969/tcp # pfSense nat bouncing
-19969 19969/udp # pfSense nat bouncing
-19970 19970/tcp # pfSense nat bouncing
-19970 19970/udp # pfSense nat bouncing
-19971 19971/tcp # pfSense nat bouncing
-19971 19971/udp # pfSense nat bouncing
-19972 19972/tcp # pfSense nat bouncing
-19972 19972/udp # pfSense nat bouncing
-19973 19973/tcp # pfSense nat bouncing
-19973 19973/udp # pfSense nat bouncing
-19974 19974/tcp # pfSense nat bouncing
-19974 19974/udp # pfSense nat bouncing
-19975 19975/tcp # pfSense nat bouncing
-19975 19975/udp # pfSense nat bouncing
-19976 19976/tcp # pfSense nat bouncing
-19976 19976/udp # pfSense nat bouncing
-19977 19977/tcp # pfSense nat bouncing
-19977 19977/udp # pfSense nat bouncing
-19978 19978/tcp # pfSense nat bouncing
-19978 19978/udp # pfSense nat bouncing
-19979 19979/tcp # pfSense nat bouncing
-19979 19979/udp # pfSense nat bouncing
-19980 19980/tcp # pfSense nat bouncing
-19980 19980/udp # pfSense nat bouncing
-19981 19981/tcp # pfSense nat bouncing
-19981 19981/udp # pfSense nat bouncing
-19982 19982/tcp # pfSense nat bouncing
-19982 19982/udp # pfSense nat bouncing
-19983 19983/tcp # pfSense nat bouncing
-19983 19983/udp # pfSense nat bouncing
-19984 19984/tcp # pfSense nat bouncing
-19984 19984/udp # pfSense nat bouncing
-19985 19985/tcp # pfSense nat bouncing
-19985 19985/udp # pfSense nat bouncing
-19986 19986/tcp # pfSense nat bouncing
-19986 19986/udp # pfSense nat bouncing
-19987 19987/tcp # pfSense nat bouncing
-19987 19987/udp # pfSense nat bouncing
-19988 19988/tcp # pfSense nat bouncing
-19988 19988/udp # pfSense nat bouncing
-19989 19989/tcp # pfSense nat bouncing
-19989 19989/udp # pfSense nat bouncing
-19990 19990/tcp # pfSense nat bouncing
-19990 19990/udp # pfSense nat bouncing
-19991 19991/tcp # pfSense nat bouncing
-19991 19991/udp # pfSense nat bouncing
-19992 19992/tcp # pfSense nat bouncing
-19992 19992/udp # pfSense nat bouncing
-19993 19993/tcp # pfSense nat bouncing
-19993 19993/udp # pfSense nat bouncing
-19994 19994/tcp # pfSense nat bouncing
-19994 19994/udp # pfSense nat bouncing
-19995 19995/tcp # pfSense nat bouncing
-19995 19995/udp # pfSense nat bouncing
-19996 19996/tcp # pfSense nat bouncing
-19996 19996/udp # pfSense nat bouncing
-19997 19997/tcp # pfSense nat bouncing
-19997 19997/udp # pfSense nat bouncing
-19998 19998/tcp # pfSense nat bouncing
-19998 19998/udp # pfSense nat bouncing
-19999 19999/tcp # pfSense nat bouncing
-19999 19999/udp # pfSense nat bouncing
-dbbrowse 47557/tcp #Databeam Corporation
-dbbrowse 47557/udp #Databeam Corporation
-wnn4 22273/tcp #Wnn4 (Japanese input)
-wnn4_Cn 22289/tcp #Wnn4 (Chinese input)
-wnn4_Tw 22321/tcp #Wnn4 (Taiwanse input)
-wnn4_Kr 22305/tcp #Wnn4 (Korean input)
-wnn6 22273/tcp #Wnn6 (Japanese input)
-wnn6_Cn 22289/tcp #Wnn6 (Chinese input)
-wnn6_Tw 22321/tcp #Wnn6 (Taiwanse input)
-wnn6_Kr 22305/tcp #Wnn6 (Korean input)
-wnn6_DS 26208/tcp #Wnn6 (Dserver)
diff --git a/src/etc/sshd b/src/etc/sshd
index 05ddb63..2e59824 100755
--- a/src/etc/sshd
+++ b/src/etc/sshd
@@ -163,7 +163,7 @@
$generate_keys = array();
foreach ($keys as $key) {
if (!file_exists("{$sshConfigDir}/ssh_host_{$key['suffix']}key") ||
- !file_exists("{$sshConfigDir}/ssh_host_{$key['suffix']}key.pub")) {
+ !file_exists("{$sshConfigDir}/ssh_host_{$key['suffix']}key.pub")) {
$generate_keys[] = $key;
}
}
diff --git a/src/etc/ssl/openssl.cnf b/src/etc/ssl/openssl.cnf
index 41664e6..3ea2df5 100644
--- a/src/etc/ssl/openssl.cnf
+++ b/src/etc/ssl/openssl.cnf
@@ -275,7 +275,7 @@ authorityKeyIdentifier=keyid:always,issuer:always
# So we do this instead.
basicConstraints = CA:true
-# Key usage: this is typical for a CA certificate.
+# Key usage: this is typical for a CA certificate.
keyUsage = cRLSign, keyCertSign
# Some might want this also
diff --git a/src/sbin/dhclient-script b/src/sbin/dhclient-script
index 98e4aa8..0695eff 100755
--- a/src/sbin/dhclient-script
+++ b/src/sbin/dhclient-script
@@ -18,11 +18,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#
-NETSTAT=/usr/bin/netstat
-GREP=/usr/bin/grep
-AWK=/usr/bin/awk
HOSTNAME=/bin/hostname
-GREP=/usr/bin/grep
ROUTE=/sbin/route
SED=/usr/bin/sed
ARP=/usr/sbin/arp
@@ -114,7 +110,7 @@ add_new_address() {
$LOGGER "New Routers ($interface): $new_routers"
- # This is necessary otherwise apinger will try to ping all 1s address
+ # This is necessary otherwise dpinger will try to ping all 1s address
if [ -n "$new_routers" ] && [ "$new_routers" != "255.255.255.255" ]; then
echo $new_routers > /tmp/${interface}_router
fi
@@ -305,13 +301,6 @@ if [ -f /etc/dhclient-enter-hooks ]; then
fi
fi
-#if [ -x $ROUTE ]; then
-# if_defaultroute=`$ROUTE -n get -inet default | $GREP interface | $AWK '{print $2}'`
-#else
-# $LOGGER "if_defaultroute"
-# if_defaultroute="x"
-#fi
-
$LOGGER $reason
case $reason in
MEDIUM)
diff --git a/src/usr/local/bin/captiveportal_gather_stats.php b/src/usr/local/bin/captiveportal_gather_stats.php
index 23d6b5d..87f0375 100644
--- a/src/usr/local/bin/captiveportal_gather_stats.php
+++ b/src/usr/local/bin/captiveportal_gather_stats.php
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -q
<?php
-/* $Id$ */
/*
captiveportal_gather_stats.php
Copyright (C) 2011 Warren Baker
diff --git a/src/usr/local/bin/dhcpd_gather_stats.php b/src/usr/local/bin/dhcpd_gather_stats.php
new file mode 100644
index 0000000..b16e887
--- /dev/null
+++ b/src/usr/local/bin/dhcpd_gather_stats.php
@@ -0,0 +1,212 @@
+#!/usr/local/bin/php-cgi -q
+<?php
+/* $Id$ */
+/*
+ dhcpd_gather_stats.php
+ Copyright (C) 2013-2015 Electric Sheep Fencing, LP
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+require_once("config.inc");
+require("interfaces.inc");
+/* echo the rrd required syntax */
+echo "N:";
+$result = array();
+$result['active'] = "NaN";
+$result['static'] ="NaN";
+$result['range'] ="NaN";
+
+if (is_array($config['dhcpd'][$argv[1]])) {
+
+ $leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases";
+ $leases_contents = file($leasesfile);
+ $dhcpif = $argv[1] ;
+
+ function remove_duplicate($array, $field) {
+ foreach ($array as $sub) {
+ $cmp[] = $sub[$field];
+ }
+ $unique = array_unique(array_reverse($cmp, true));
+ foreach ($unique as $k => $rien) {
+ $new[] = $array[$k];
+ }
+ return $new;
+ }
+ $awk = "/usr/bin/awk";
+ /* this pattern sticks comments into a single array item */
+ $cleanpattern = "'{ gsub(\"#.*\", \"\");} { gsub(\";\", \"\"); print;}'";
+ /* We then split the leases file by } */
+ $splitpattern = "'BEGIN { RS=\"}\";} {for (i=1; i<=NF; i++) printf \"%s \", \$i; printf \"}\\n\";}'";
+
+ /* stuff the leases file in a proper format into a array by line */
+ exec("/bin/cat {$leasesfile} | {$awk} {$cleanpattern} | {$awk} {$splitpattern}", $leases_content);
+ $pools = array();
+ $leases = array();
+ $i = 0;
+ $l = 0;
+ $p = 0;
+
+ // Put everything together again
+ foreach ($leases_content as $lease) {
+ /* split the line by space */
+ $data = explode(" ", $lease);
+ /* walk the fields */
+ $f = 0;
+ $fcount = count($data);
+ /* with less than 20 fields there is nothing useful */
+ if ($fcount < 20) {
+ $i++;
+ continue;
+ }
+ while ($f < $fcount) {
+ switch ($data[$f]) {
+ case "failover":
+ $pools[$p]['name'] = trim($data[$f+2], '"');
+ $pools[$p]['name'] = "{$pools[$p]['name']} (" . convert_friendly_interface_to_friendly_descr(substr($pools[$p]['name'], 5)) . ")";
+ $pools[$p]['mystate'] = $data[$f+7];
+ $pools[$p]['peerstate'] = $data[$f+14];
+ $pools[$p]['mydate'] = $data[$f+10];
+ $pools[$p]['mydate'] .= " " . $data[$f+11];
+ $pools[$p]['peerdate'] = $data[$f+17];
+ $pools[$p]['peerdate'] .= " " . $data[$f+18];
+ $p++;
+ $i++;
+ continue 3;
+ case "lease":
+ $leases[$l]['ip'] = $data[$f+1];
+ $leases[$l]['type'] = "dynamic";
+ $f = $f+2;
+ break;
+ case "starts":
+ $leases[$l]['start'] = $data[$f+2];
+ $leases[$l]['start'] .= " " . $data[$f+3];
+ $f = $f+3;
+ break;
+ case "ends":
+ if ($data[$f+1] == "never") {
+ // Quote from dhcpd.leases(5) man page:
+ // If a lease will never expire, date is never instead of an actual date.
+ $leases[$l]['end'] = gettext("Never");
+ $f = $f+1;
+ } else {
+ $leases[$l]['end'] = $data[$f+2];
+ $leases[$l]['end'] .= " " . $data[$f+3];
+ $f = $f+3;
+ }
+ break;
+ case "tstp":
+ $f = $f+3;
+ break;
+ case "tsfp":
+ $f = $f+3;
+ break;
+ case "atsfp":
+ $f = $f+3;
+ break;
+ case "cltt":
+ $f = $f+3;
+ break;
+ case "binding":
+ switch ($data[$f+2]) {
+ case "active":
+ $leases[$l]['act'] = "active";
+ break;
+ case "free":
+ $leases[$l]['act'] = "expired";
+ $leases[$l]['online'] = "offline";
+ break;
+ case "backup":
+ $leases[$l]['act'] = "reserved";
+ $leases[$l]['online'] = "offline";
+ break;
+ }
+ $f = $f+1;
+ break;
+ case "next":
+ /* skip the next binding statement */
+ $f = $f+3;
+ break;
+ case "rewind":
+ /* skip the rewind binding statement */
+ $f = $f+3;
+ break;
+ case "uid":
+ $f = $f+1;
+ break;
+ }
+ $f++;
+ }
+ $l++;
+ $i++;
+ /* slowly chisel away at the source array */
+ array_shift($leases_content);
+ }
+ /* remove the old array */
+ unset($lease_content);
+
+ /* remove duplicate items by mac address */
+ if (count($leases) > 0) {
+ $leases = remove_duplicate($leases, "ip");
+ }
+
+ if (count($pools) > 0) {
+ $pools = remove_duplicate($pools, "name");
+ asort($pools);
+ }
+
+ foreach ($config['interfaces'] as $ifname => $ifarr) {
+ if (is_array($config['dhcpd'][$ifname]) &&
+ is_array($config['dhcpd'][$ifname]['staticmap'])) {
+ $staticmap_array_index = 0;
+ foreach ($config['dhcpd'][$ifname]['staticmap'] as $static) {
+ $slease = array();
+ $slease['ip'] = $static['ipaddr'];
+ $slease['act'] = "static";
+ $slease['staticmap_array_index'] = $staticmap_array_index;
+ $leases[] = $slease;
+ $staticmap_array_index++;
+ }
+ }
+ }
+ $ifcfgip = get_interface_ip($dhcpif);
+ $ifcfgsn = get_interface_subnet($dhcpif);
+ $subnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
+ $subnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))));
+
+ $result['range'] = (ip2ulong($config['dhcpd'][$dhcpif]['range']['to'])) - (ip2ulong($config['dhcpd'][$dhcpif]['range']['from'])) ;
+
+ foreach ($leases as $data) {
+ $lip = ip2ulong($data['ip']);
+
+ if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1)
+ continue;
+ if ($data['act'] != "static") {
+ if (($lip >= ip2ulong($config['dhcpd'][$dhcpif]['range']['from'])) && ($lip <= ip2ulong($config['dhcpd'][$dhcpif]['range']['to']))) {
+ $result['active'] = $result['active'] + 1;
+ }
+ }
+ else {
+ if (($lip >= $subnet_start) && ($lip <= $subnet_end)) {
+ $result['static'] = $result['static'] + 1;
+ }
+ }
+ }
+}
+echo $result['active'].":".$result['static'].":".$result['range'] ;
diff --git a/src/usr/local/bin/filterparser.php b/src/usr/local/bin/filterparser.php
index fa60262..0fb76bf 100755
--- a/src/usr/local/bin/filterparser.php
+++ b/src/usr/local/bin/filterparser.php
@@ -1,6 +1,5 @@
#!/usr/local/bin/php-cgi -q
<?php
-/* $Id$ */
/*
filterparser.php
part of pfSesne by Scott Ullrich
@@ -36,9 +35,6 @@
clog /var/log/filter.log | tail -50 | /usr/local/www/filterparser.php
clog -f /var/log/filter.log | /usr/local/www/filterparser.php
*/
-/*
- pfSense_MODULE: logs
-*/
include_once("functions.inc");
include_once("filter_log.inc");
diff --git a/src/usr/local/captiveportal/index.php b/src/usr/local/captiveportal/index.php
index b851e91..93c4e30 100644
--- a/src/usr/local/captiveportal/index.php
+++ b/src/usr/local/captiveportal/index.php
@@ -1,6 +1,5 @@
<?php
/*
- $Id$
part of m0n0wall (http://m0n0.ch/wall)
Copyright (C) 2013-2015 Electric Sheep Fencing, LP
@@ -29,9 +28,6 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_MODULE: captiveportal
-*/
require_once("auth.inc");
require_once("functions.inc");
@@ -156,7 +152,9 @@ setTimeout('window.close();',5000) ;
</html>
EOD;
- captiveportal_disconnect_client($_POST['logout_id']);
+
+ $safe_logout_id = SQLite3::escapeString($_POST['logout_id']);
+ captiveportal_disconnect_client($safe_logout_id);
} else if ($macfilter && $clientmac && captiveportal_blocked_mac($clientmac)) {
captiveportal_logportalauth($clientmac, $clientmac, $clientip, "Blocked MAC address");
diff --git a/src/usr/local/captiveportal/radius_accounting.inc b/src/usr/local/captiveportal/radius_accounting.inc
index 2d9c97e..ab11cb2 100644
--- a/src/usr/local/captiveportal/radius_accounting.inc
+++ b/src/usr/local/captiveportal/radius_accounting.inc
@@ -1,9 +1,6 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/*
-
- $Id$
-
Copyright (c) 2006, Jonathan De Graeve <jonathan.de.graeve@imelda.be>
All rights reserved.
@@ -38,10 +35,6 @@
*/
-/*
- pfSense_MODULE: captiveportal
-*/
-
define('GIGAWORDS_RIGHT_OPERAND', '4294967296'); // 2^32
/*
diff --git a/src/usr/local/captiveportal/radius_authentication.inc b/src/usr/local/captiveportal/radius_authentication.inc
index 9938e24..ce14225 100644
--- a/src/usr/local/captiveportal/radius_authentication.inc
+++ b/src/usr/local/captiveportal/radius_authentication.inc
@@ -1,8 +1,6 @@
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
/*
- $Id$
-
Copyright (c) 2006, Jonathan De Graeve <jonathan.de.graeve@imelda.be>
All rights reserved.
@@ -38,10 +36,6 @@
*/
/*
- pfSense_MODULE: captiveportal
-*/
-
-/*
RADIUS AUTHENTICATION
---------------------
*/
diff --git a/src/usr/local/pkg/miniupnpd.inc b/src/usr/local/pkg/miniupnpd.inc
index 4ea768c..8b258e0 100644
--- a/src/usr/local/pkg/miniupnpd.inc
+++ b/src/usr/local/pkg/miniupnpd.inc
@@ -241,9 +241,11 @@
$config_text .= "model_number=" . $g['product_version'] . "\n";
/* upnp access restrictions */
- foreach ($upnp_config['row'] as $row) {
- if ($row['permuser']) {
- $config_text .= "{$row["permuser"]}\n";
+ if (is_array($upnp_config['row'])) {
+ foreach ($upnp_config['row'] as $row) {
+ if ($row['permuser']) {
+ $config_text .= "{$row["permuser"]}\n";
+ }
}
}
diff --git a/src/usr/local/pkg/miniupnpd.xml b/src/usr/local/pkg/miniupnpd.xml
index 33d8ac4..b67a60d 100644
--- a/src/usr/local/pkg/miniupnpd.xml
+++ b/src/usr/local/pkg/miniupnpd.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<packagegui>
- <title>Services: UPnP &amp; NAT-PMP</title>
+ <title>Services/UPnP &amp; NAT-PMP</title>
<name>miniupnpd</name>
<version>20100712</version>
<savetext>Change</savetext>
diff --git a/src/usr/local/sbin/gmirror_status_check.php b/src/usr/local/sbin/gmirror_status_check.php
index f19a5d1..b6cceb6 100644
--- a/src/usr/local/sbin/gmirror_status_check.php
+++ b/src/usr/local/sbin/gmirror_status_check.php
@@ -27,12 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/gmirror /sbin/geom /usr/bin/grep /usr/bin/egrep /usr/bin/cut /usr/bin/head
- pfSense_BUILDER_BINARIES: /sbin/mount /usr/bin/awk /usr/bin/sed
- pfSense_MODULE: gmirror
-*/
-
require_once("config.inc");
require_once("notices.inc");
require_once("globals.inc");
diff --git a/src/usr/local/sbin/pfSense-upgrade b/src/usr/local/sbin/pfSense-upgrade
index 2aaf563..297476d 100755
--- a/src/usr/local/sbin/pfSense-upgrade
+++ b/src/usr/local/sbin/pfSense-upgrade
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+# Copyright (c) 2015 Electric Sheep Fencing, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@@ -47,15 +47,21 @@
# OF THE POSSIBILITY OF SUCH DAMAGE.
usage() {
- echo "Usage: $(basename ${0}) [-bdy] [-u|-i PKG_NAME|-r PKG_NAME]" >&2
+ echo "Usage: $(basename ${0}) [-46bdyf] [-u|-i PKG_NAME|-r PKG_NAME]" >&2
+ echo " -4 - Force IPv4"
+ echo " -6 - Force IPv6"
echo " -b - Platform is booting" >&2
+ echo " -c - Check if upgrade is necessary" >&2
echo " -d - Turn on debug" >&2
+ echo " -f - Force package installation" >&2
echo " -h - Show this usage help" >&2
- echo " -l - Logfile name in /cf/conf/ (defaults to upgrade_log.txt)" >&2
- echo " -p FIFO - Write pkg progress to FIFO"
- echo " -y - Consider yes as the answer for any possible interaction" >&2
+ echo " -l - Logfile path (defaults to /cf/conf/upgrade_log.txt)" >&2
+ echo " -n - Dry run" >&2
+ echo " -p socket - Write pkg progress to socket"
+ echo " -R - Do not reboot (this can be dangerous)"
+ echo " -y - Assume yes as the answer to any possible interaction" >&2
echo "" >&2
- echo "Following parameters are mutually exclusive:" >&2
+ echo "The following parameters are mutually exclusive:" >&2
echo " -i PKG_NAME - Install package PKG_NAME" >&2
echo " -r PKG_NAME - Remove package PKG_NAME" >&2
echo " -u - Update repository information" >&2
@@ -93,11 +99,18 @@ _exec() {
_echo -n ">>> ${_msg}... "
if [ -z "${_stdout}" ]; then
_echo ""
- ${_cmd} 2>&1 | tee -a ${logfile}
+ # Ref. http://stackoverflow.com/questions/1221833/bash-pipe-output-and-capture-exit-status
+ exec 4>&1
+ local _result=$({ { ${_cmd} 2>&1 3>&-; printf $? 1>&3; } 4>&- | \
+ tee -a ${logfile} 1>&4; } 3>&1)
+ exec 4>&-
else
- ${_cmd} >${_stdout} 2>&1 | tee -a ${logfile}
+ # Ref. http://stackoverflow.com/questions/1221833/bash-pipe-output-and-capture-exit-status
+ exec 4>&1
+ local _result=$({ { ${_cmd} >${_stdout} 2>&1 3>&-; printf $? 1>&3; } 4>&- | \
+ tee -a ${logfile} 1>&4; } 3>&1)
+ exec 4>&-
fi
- local _result=$?
if [ ${_result} -eq 0 -o -n "${_ignore_result}" ]; then
[ -n "${_stdout}" ] \
@@ -106,7 +119,7 @@ _exec() {
else
[ -n "${_stdout}" ] \
&& _echo "failed."
- exit 1
+ _exit 1
fi
}
@@ -127,15 +140,42 @@ _exit() {
/etc/rc.conf_mount_ro
fi
+ if [ -n "${nc_pid}" ] && ps -p ${nc_pid} >/dev/null 2>&1; then
+ kill ${nc_pid}
+ fi
+
local _rc=${1:-"0"}
# If EVENT_PIPE is defined, GUI is calling
- [ -n "${EVENT_PIPE}" ] \
+ [ -n "${progress_socket}" ] \
&& _echo "__RC=${_rc}"
exit ${_rc}
}
+pkg_with_pb() {
+ local _event_pipe=""
+
+ if [ -n "${progress_socket}" ]; then
+ if [ -e "${chroot_dir}${progress_socket}" ]; then
+ rm -f ${chroot_dir}${progress_socket}
+ fi
+
+ _event_pipe="-o EVENT_PIPE=${progress_socket}"
+
+ nc -lU ${chroot_dir}${progress_socket} >> ${progress_file} &
+ nc_pid=$!
+
+ while [ ! -e "${chroot_dir}${progress_socket}" ]; do
+ sleep 0.1
+ done
+ fi
+
+ pkg ${_event_pipe} $@
+ nc_pid=""
+ return $?
+}
+
fetch_upgrade_packages() {
local _pkgs_to_fetch=""
if [ "${platform}" = "nanobsd" ]; then
@@ -161,14 +201,14 @@ fetch_upgrade_packages() {
fi
_echo ">>> Downloading upgrade packages..."
- if ! pkg ${pkg_chroot} upgrade -F 2>&1 | tee -a ${logfile}; then
+ if ! pkg_with_pb ${pkg_chroot} upgrade -F 2>&1 | tee -a ${logfile}; then
_echo "ERROR: It was not possible to download packages"
_exit 1
fi
if [ -n "${_pkgs_to_fetch}" ]; then
_echo ">>> Fetching packages not present on upgrade partition..."
- if ! pkg ${pkg_chroot} fetch -d ${_pkgs_to_fetch} 2>&1 | tee -a ${logfile}; then
+ if ! pkg_with_pb ${pkg_chroot} fetch -d ${_pkgs_to_fetch} 2>&1 | tee -a ${logfile}; then
_echo "ERROR: It was not possible to fetch packages"
_exit 1
fi
@@ -202,14 +242,14 @@ pkg_unlock() {
pkg_update() {
local _run_update=1
- unset _force
+ local _force=""
if [ "${1}" = "force" ]; then
local _force=1
fi
if [ -z "${_force}" -a -f ${last_update_file} ]; then
local _last_update=$(head -n 1 ${last_update_file})
- # Verify if content contain only numbers
+ # Verify if content contains only numbers
if echo "${_last_update}" | grep -E -q '^[0-9]+$'; then
local _now=$(date +%s)
# Only run update hourly, and if last update is in the future
@@ -227,7 +267,7 @@ pkg_update() {
pkg_upgrade() {
# figure out which kernel variant is running
- export kernel_pkg=$(pkg query %n $(pkg info ${product}-kernel-\*))
+ export kernel_pkg=$(pkg query %n $(pkg info ${product}-kernel-\* | grep -v -- -debug-))
if [ -z "${kernel_pkg}" ]; then
_echo "ERROR: It was not possible to identify which ${product} kernel is installed"
@@ -266,31 +306,38 @@ pkg_upgrade() {
_exit 0
fi
- if [ $(pkg upgrade -r ${product}-core -nq | wc -l) -gt 1 ]; then
- setup_nanobsd_env
- need_reboot=1
+ if [ -n "${dry_run}" ]; then
+ pkg ${pkg_chroot} upgrade -nq 2>&1 | tee -a ${logfile}
+ _exit 0
fi
- pkg_unlock ${kernel_pkg}
-
- if [ "${platform}" = "nanobsd" ] && \
- [ $(pkg ${pkg_chroot} upgrade -nq | wc -l) -le 1 ]; then
- _echo "**** WARNING ****"
- _echo "Reboot will be required!!"
- _echo "Secondary partition is up to date"
- if [ -z "${yes}" ]; then
- _echo -n "Proceed with upgrade? (y/N) "
- read answer
- if [ "${answer}" != "y" ]; then
- _echo "Aborting..."
- _exit 0
+ if [ $(pkg upgrade -r ${product}-core -nq | wc -l) -gt 1 ]; then
+ if [ "${platform}" = "nanobsd" ]; then
+ _echo "**** WARNING ****"
+ _echo "Duplicate slice required!!"
+ _echo ""
+ _echo "Before starting the upgrade process, the currently mounted nanobsd partition"
+ _echo "needs to be cloned to the secondary partition, where the update will happen"
+ _echo ""
+ _echo "After installation a reboot will be required to switch partition."
+ _echo ""
+ if [ -z "${yes}" ]; then
+ _echo -n "Proceed with upgrade? (y/N) "
+ read answer
+ if [ "${answer}" != "y" ]; then
+ _echo "Aborting..."
+ _exit 0
+ fi
+ # Do not make the user have to answer again.
+ yes=1
fi
+ setup_nanobsd_env
fi
- switch_active_nanobsd_partition
- /etc/rc.reboot &
- _exit 0
+ need_reboot=1
fi
+ pkg_unlock ${kernel_pkg}
+
if [ -z "${yes}" ]; then
# Show user which packages are going to be upgraded
pkg ${pkg_chroot} upgrade -nq 2>&1 | tee -a ${logfile}
@@ -319,8 +366,7 @@ pkg_upgrade() {
next_stage=2
if [ -n "${need_reboot}" -a "${platform}" != "nanobsd" ]; then
- _echo "Rebooting..."
- /etc/rc.reboot &
+ do_reboot
_exit 0
fi
fi
@@ -328,6 +374,24 @@ pkg_upgrade() {
if [ "${next_stage}" = "2" ]; then
pkg_lock "${pkg_prefix}*"
+ # XXX: Workaround to upgrade strongswan
+ # If those symlinks are present, pkg exit because it expects them
+ # to be a directory
+ if [ $(pkg ${pkg_chroot} upgrade -nq strongswan | wc -l) -gt 1 ]; then
+ if [ -L ${chroot_dir}/usr/local/etc/ipsec.d ]; then
+ rm -f ${chroot_dir}/usr/local/etc/ipsec.d
+ fi
+ if [ -L ${chroot_dir}/usr/local/etc/ipsec.conf ]; then
+ rm -f ${chroot_dir}/usr/local/etc/ipsec.conf
+ fi
+ if [ -L ${chroot_dir}/usr/local/etc/strongswan.d ]; then
+ rm -f ${chroot_dir}/usr/local/etc/strongswan.d
+ fi
+ if [ -L ${chroot_dir}/usr/local/etc/strongswan.conf ]; then
+ rm -f ${chroot_dir}/usr/local/etc/strongswan.conf
+ fi
+ fi
+
if [ $(pkg ${pkg_chroot} upgrade -nq | wc -l) -gt 1 ]; then
_echo "Upgrading necessary packages..."
if ! pkg ${pkg_chroot} upgrade 2>&1 | tee -a ${logfile}; then
@@ -338,6 +402,10 @@ pkg_upgrade() {
fi
fi
+ # XXX: workaround for #5300
+ sort -u ${chroot_dir}/usr/local/etc/php/extensions.ini > /tmp/extensions.ini
+ mv /tmp/extensions.ini ${chroot_dir}/usr/local/etc/php/extensions.ini
+
pkg ${pkg_chroot} annotate -q -M ${kernel_pkg} next_stage 3
next_stage=3
@@ -345,8 +413,7 @@ pkg_upgrade() {
if [ -n "${need_reboot}" -a "${platform}" = "nanobsd" ]; then
switch_active_nanobsd_partition
- _echo "Rebooting..."
- /etc/rc.reboot &
+ do_reboot
_exit 0
fi
@@ -371,6 +438,54 @@ pkg_upgrade() {
_exec "pkg ${pkg_chroot} autoremove" "Removing unnecessary packages" mute ignore_result
_exec "pkg ${pkg_chroot} clean" "Cleanup pkg cache" mute ignore_result
fi
+
+ gitsync=$(/usr/local/sbin/read_xml_tag.sh boolean system/gitsync/synconupgrade)
+ if [ "${gitsync}" = "true" ]; then
+ repository_url=$(/usr/local/sbin/read_xml_tag.sh string system/gitsync/repositoryurl)
+ branch=$(/usr/local/sbin/read_xml_tag.sh string system/gitsync/branch)
+
+ # Repository URL is not mandatory
+ if [ -n "${branch}" ]; then
+ _exec "/usr/local/sbin/pfSsh.php playback gitsync \
+ ${repositoryurl} ${branch} --upgrading" \
+ "Running gitsync" mute ignore_result
+ fi
+ fi
+}
+
+check_upgrade() {
+ # figure out main meta package name
+ if is_pkg_installed ${product}-vmware; then
+ local _meta_pkg="${product}-vmware"
+ elif is_pkg_installed ${product}; then
+ local _meta_pkg="${product}"
+ else
+ _echo "ERROR: It was not possible to identify which ${product} meta package is installed"
+ _exit 1
+ fi
+
+ pkg_update
+
+ if [ "$(compare_pkg_version ${_meta_pkg})" = "<" ]; then
+ local _new_version=$(pkg rquery %v ${_meta_pkg})
+ _echo "${_new_version} version of ${product} is available"
+ _exit 2
+ else
+ for _pkg in $(pkg query -e "%n ~ ${product}-*" %n); do
+ # Ignore additional packages
+ if echo "${_pkg}" | grep -q "^${pkg_prefix}"; then
+ continue
+ fi
+ if [ "$(compare_pkg_version ${_pkg})" = "<" ]; then
+ local _new_version=$(pkg rquery %v ${_pkg})
+ _echo "${_new_version} version of ${_pkg} is available"
+ _exit 2
+ fi
+ done
+ fi
+
+ _echo "Your system is up to date"
+ _exit 0
}
setup_nanobsd_env() {
@@ -388,17 +503,30 @@ setup_nanobsd_env() {
_exit 1
fi
- _exec "mount ${_update_partition} ${chroot_dir}" "Mounting second partition to run upgrade" mute
+ # Remove /dev
+ _update_partition=$(echo ${_update_partition} | sed 's,^/dev/,,')
+ local _update_slice=$(glabel status -s | awk "\$1 == \"${_update_partition}\" { print \$3 }")
- pkg_chroot="-c ${chroot_dir}"
+ if [ -z "${_update_slice}" -o ! -e "/dev/${_update_slice}" ]; then
+ _echo "Secondary slice (${_update_slice}), use_update_sliced for upgrade not found"
+ _exit 1
+ fi
- pkg_update force
+ _update_slice="/dev/${_update_slice}"
- if [ "$(compare_pkg_version pkg)" = "<" ]; then
- _exec "pkg ${pkg_chroot} upgrade pkg" "Upgrading pkg" mute
- pkg_update force
- fi
+ # Clone slice using same logic from nanobsd_clone_slice()
+ sysctl kern.geom.debugflags=16 >/dev/null 2>&1
+ _exec "dd if=/dev/zero of=${_update_slice} bs=1m count=1" "Cleaning secondary partition" mute
+ _exec "dd if=${_cur_partition} of=${_update_slice} bs=64k" "Duplicating current slice" mute
+ _exec "tunefs -L ${_update_partition##*/} ${_update_slice}" "Restoring slice label" mute
+ sysctl kern.geom.debugflags=0 >/dev/null 2>&1
+
+ _exec "mount /dev/${_update_partition} ${chroot_dir}" "Mounting second partition to run upgrade" mute
+
+ sed -i '' -e "s,^${_cur_partition},/dev/${_update_partition}," \
+ ${chroot_dir}/etc/fstab
+ pkg_chroot="-c ${chroot_dir}"
}
switch_active_nanobsd_partition() {
@@ -471,6 +599,11 @@ compare_pkg_version() {
pkg_install() {
local _pkg_name="${1}"
+ local _force=""
+ if [ -n "${2}" ]; then
+ _force="-f"
+ fi
+
if [ -z "${_pkg_name}" ]; then
_echo "ERROR: Blank package name"
_exit 1
@@ -481,21 +614,23 @@ pkg_install() {
if is_pkg_installed ${_pkg_name}; then
local _cversion=$(compare_pkg_version ${_pkg_name})
- if [ "${_cversion}" = "=" ]; then
- _echo "Package ${_pkg_name} is up to date"
- _exit 0
- elif [ "${_cversion}" = ">" ]; then
- _echo "Installed ${_pkg_name} version is newer than remote"
- _exit 0
+ if [ -z "${_force}" ]; then
+ if [ "${_cversion}" = "=" ]; then
+ _echo "Package ${_pkg_name} is up to date"
+ _exit 0
+ elif [ "${_cversion}" = ">" ]; then
+ _echo "Installed ${_pkg_name} version is newer than remote"
+ _exit 0
+ fi
fi
- local _cmd="upgrade"
+ local _cmd="upgrade ${_force}"
local _msg="Upgrading"
else
local _cmd="install"
local _msg="Installing"
fi
- _exec "pkg ${_cmd} ${_pkg_name}" "${_msg} ${_pkg_name}"
+ _exec "pkg_with_pb ${_cmd} ${_pkg_name}" "${_msg} ${_pkg_name}"
_exec "pkg clean" "Cleaning up cache" mute ignore_result
}
@@ -512,13 +647,33 @@ pkg_delete() {
_exit 1
fi
- _exec "pkg delete ${_pkg_name}" "Removing ${_pkg_name}"
+ _exec "pkg_with_pb delete ${_pkg_name}" "Removing ${_pkg_name}"
_exec "pkg autoremove" "Removing stale packages" mute ignore_result
}
+# Reinstall every pfSense-pkg-* package
+pkg_reinstall_all() {
+ for _pkg in $(pkg query -e '%a == 0' %n); do
+ case ${_pkg} in "${pkg_prefix}"* )
+ _echo "Reinstalling ${_pkg}"
+ pkg_install ${_pkg} 1
+ ;;
+ esac
+ done
+}
+
+do_reboot() {
+ _echo "Upgrade is complete. Rebooting in 10 seconds."
+ echo "Upgrade is complete. Rebooting in 10 seconds." | wall
+ /etc/rc.notify_message -e -g -m "Upgrade is complete. Rebooting in 10 seconds."
+ if [ -z "${dont_reboot}" ]; then
+ (sleep 10 && /etc/rc.reboot) &
+ fi
+}
+
pid_file="/var/run/$(basename $0).pid"
last_update_file="/var/run/$(basename $0)-last-update"
-logfile=/cf/conf/upgrade_log.txt
+logfile="/cf/conf/upgrade_log.txt"
stdout='/dev/null'
# pkg should not ask for confirmations
@@ -537,25 +692,63 @@ if [ "${platform}" = "nanobsd" ] || [ "${USE_MFS_TMPVAR}" = "true" ]; then
export PKG_CACHEDIR=/root/var/cache/pkg
fi
+product_version=$(cat /etc/version)
+do_not_send_host_uuid=$(/usr/local/sbin/read_xml_tag.sh boolean system/do_not_send_host_uuid)
+if [ "${do_not_send_host_uuid}" != "true" ]; then
+ hostuuid=$(sysctl kern.hostuuid)
+ export HTTP_USER_AGENT="${product}/${product_version}:${hostuuid}"
+else
+ export HTTP_USER_AGENT="${product}/${product_version}"
+fi
+
# Upgrade process on nanobsd will happen in chroot
export pkg_chroot=""
export chroot_dir=""
+# Save nc_pid to be able to kill it
+export nc_pid=""
+
+unset dry_run
+unset dont_reboot
unset booting
unset boot_stage
+unset force
unset yes
-unset progress_fifo
+unset progress_file
+unset progress_socket
unset action
unset action_pkg
-while getopts b:di:hp:l:r:uy opt; do
+unset force_ipv4
+unset force_ipv6
+while getopts 46b:cdfi:hp:l:nr:Ruy opt; do
case ${opt} in
+ 4)
+ if [ -n "${force_ipv6}" ]; then
+ usage
+ _exit 1
+ fi
+ force_ipv4=1
+ ;;
+ 6)
+ if [ -n "${force_ipv4}" ]; then
+ usage
+ _exit 1
+ fi
+ force_ipv6=1
+ ;;
b)
booting=1
boot_stage="${OPTARG}"
;;
+ c)
+ action="check"
+ ;;
d)
stdout=''
;;
+ f)
+ force=1
+ ;;
i)
if [ -n "${action}" ]; then
usage
@@ -569,10 +762,21 @@ while getopts b:di:hp:l:r:uy opt; do
_exit 0
;;
l)
- logfile="/cf/conf/${OPTARG}"
+ logfile="${OPTARG}"
+ if [ -z "${logfile}" ]; then
+ usage
+ _exit 1
+ fi
+ ;;
+ n)
+ dry_run=1
;;
p)
- progress_fifo="${OPTARG}"
+ progress_socket="${OPTARG}"
+ if [ -z "${progress_socket}" ]; then
+ usage
+ _exit 1
+ fi
;;
r)
if [ -n "${action}" ]; then
@@ -582,6 +786,9 @@ while getopts b:di:hp:l:r:uy opt; do
action="delete"
action_pkg="${OPTARG}"
;;
+ R)
+ dont_reboot=1
+ ;;
u)
if [ -n "${action}" ]; then
usage
@@ -599,6 +806,12 @@ while getopts b:di:hp:l:r:uy opt; do
esac
done
+if [ -n "${force_ipv4}" ]; then
+ export IP_VERSION="4"
+elif [ -n "${force_ipv6}" ]; then
+ export IP_VERSION="6"
+fi
+
# Set default action when no parameter is set
: ${action:="upgrade"}
@@ -615,18 +828,20 @@ echo $$ > ${pid_file}
trap _exit 1 2 15 EXIT
-if [ -n "${progress_fifo}" ]; then
- if [ ! -e "${progress_fifo}" ]; then
- mkfifo ${progress_fifo}
- fi
- if [ ! -p "${progress_fifo}" ]; then
- _echo "ERROR: ${progress_fifo} is not a FIFO"
- _exit 1
- fi
- export EVENT_PIPE="${progress_fifo}"
+if [ "${action}" != "upgrade" -a -f "${logfile}" ]; then
+ rm -f ${logfile}
+fi
+
+progress_file=${logfile%.*}.json
+
+if [ -e "${progress_file}" ]; then
+ rm -f ${progress_file}
fi
case "${action}" in
+ check)
+ check_upgrade
+ ;;
upgrade)
pkg_upgrade
;;
@@ -634,7 +849,11 @@ case "${action}" in
pkg_update force
;;
install)
- pkg_install ${action_pkg}
+ if [ ${action_pkg} == "ALL_PACKAGES" ] && [ -n ${force} ]; then
+ pkg_reinstall_all
+ else
+ pkg_install ${action_pkg} ${force}
+ fi
;;
delete)
pkg_delete ${action_pkg}
diff --git a/src/usr/local/sbin/ppp-ipv6 b/src/usr/local/sbin/ppp-ipv6
new file mode 100755
index 0000000..aa0536c
--- /dev/null
+++ b/src/usr/local/sbin/ppp-ipv6
@@ -0,0 +1,121 @@
+#!/usr/local/bin/php -f
+<?php
+/*
+ ppp-ipv6
+
+ PPP IPv6 helper
+
+*/
+
+require_once("globals.inc");
+require_once("interfaces.inc");
+
+function interface_ipv6_lower($interface_real) {
+ global $g, $config;
+
+ if (!empty($interface_real)) {
+ $interface = convert_real_interface_to_friendly_interface_name($interface_real);
+
+ if (!empty($interface) && is_array($config['interfaces'][$interface]) && interface_isppp_type($interface)) {
+ $ifcfg = $config['interfaces'][$interface];
+
+ if (!empty($ifcfg['ipaddrv6'])) {
+ switch ($ifcfg['ipaddrv6']) {
+ case 'slaac':
+ case 'dhcp6':
+ // bring down dhcp6c if it is running
+ $pidv6 = find_dhcp6c_process($interface_real);
+ if ($pidv6) {
+ posix_kill($pidv6, SIGTERM);
+ sleep(3);
+ }
+ unlink_if_exists("{$g['varetc_path']}/dhcp6c_{$interface}.conf");
+
+ // disable router advertisements (and therefore SLAAC)
+ mwexec("/sbin/ifconfig " . escapeshellarg($interface_real) . " inet6 -accept_rtadv");
+
+ // remove any autoconfigured IPv6 addresses
+ exec("/sbin/ifconfig " . escapeshellarg($interface_real) . " inet6", $ifconfig_output);
+ foreach ($ifconfig_output as $output) {
+ if (preg_match('{ \A \s+ inet6 \s+ (\S+) .* autoconf .* \Z}xmsi', $output, $matches)) {
+ mwexec("/sbin/ifconfig " . escapeshellarg($interface_real) . " inet6 " . escapeshellarg($matches[1]) . " delete");
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+}
+
+function interface_ipv6_raise($interface_real) {
+ global $config;
+
+ if (!empty($interface_real)) {
+ $interface = convert_real_interface_to_friendly_interface_name($interface_real);
+
+ if (!empty($interface) && is_array($config['interfaces'][$interface]) && interface_isppp_type($interface)) {
+ $ifcfg = $config['interfaces'][$interface];
+
+ if (!empty($ifcfg['ipaddrv6'])) {
+ switch ($ifcfg['ipaddrv6']) {
+ case 'slaac':
+ case 'dhcp6':
+ $pidv6 = find_dhcp6c_process($interface_real);
+ if (empty($pidv6)) {
+ // only fire if router advertisements off
+ // (if router advertisements are on, rtsold might be primed to fire dhcp6c already)
+ exec("/sbin/ifconfig " . escapeshellarg($interface_real) . " inet6", $ifconfig_output);
+ $start = true;
+ foreach ($ifconfig_output as $output) {
+ if (preg_match('{ \A .* ACCEPT_RTADV .* \Z}xmsi', $output)) {
+ $start = false;
+ break;
+ }
+ }
+ if ($start) {
+ interface_dhcpv6_configure($interface, $ifcfg);
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ }
+}
+
+// main entry point
+if ($argc != 3) {
+ goto error;
+}
+
+$interface_real = trim($argv[1], " \n\t");
+if (empty($interface_real)) {
+ goto error;
+}
+
+switch (strtolower($argv[2])) {
+ case 'up':
+ interface_ipv6_raise($interface_real);
+ break;
+ case 'down':
+ interface_ipv6_lower($interface_real);
+ break;
+ default:
+ goto error;
+ break;
+}
+
+exit(0);
+
+error:
+if (!empty($argv[0])) {
+ echo("Usage: " . substr(strrchr('/' . $argv[0], '/'), 1) . " <PPP interface> up|down\n");
+}
+exit(1);
+
+?>
diff --git a/src/usr/local/sbin/ppp-linkdown b/src/usr/local/sbin/ppp-linkdown
index 62d07ed..6fca066 100755
--- a/src/usr/local/sbin/ppp-linkdown
+++ b/src/usr/local/sbin/ppp-linkdown
@@ -1,6 +1,7 @@
#!/bin/sh
IF="${1}"
+PROTOCOL="${2}"
LOCAL_IP="${3}"
if [ -f /tmp/${IF}up ] && [ -f /conf/${IF}.log ]; then
@@ -10,17 +11,20 @@ fi
/etc/rc.kill_states ${IF} ${LOCAL_IP}
-if [ -s "/tmp/${IF}_defaultgw" ]; then
+if [ "${PROTOCOL}" == "inet" && -s "/tmp/${IF}_defaultgw" ]; then
GW=`head -n 1 /tmp/${IF}_defaultgw`
[ -n "${GW}" ] \
- && /sbin/route delete default ${GW}
+ && /sbin/route -q delete default ${GW}
+fi
+if [ "${PROTOCOL}" == "inet6" ]; then
+ /usr/local/sbin/ppp-ipv6 ${IF} down
fi
# delete the node just in case mpd cannot do that
/usr/sbin/ngctl shutdown ${IF}:
if [ -f "/var/etc/nameserver_${IF}" ]; then
# Remove old entries
for nameserver in `cat /var/etc/nameserver_${IF}`; do
- /sbin/route delete ${nameserver} >/dev/null 2>&1
+ /sbin/route -q delete ${nameserver} >/dev/null 2>&1
done
/bin/rm -f /var/etc/nameserver_${IF}
fi
diff --git a/src/usr/local/sbin/ppp-linkup b/src/usr/local/sbin/ppp-linkup
index e6604a3..fc6172d 100755
--- a/src/usr/local/sbin/ppp-linkup
+++ b/src/usr/local/sbin/ppp-linkup
@@ -4,61 +4,70 @@ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
DNSALLOWOVERRIDE=$(/usr/local/sbin/read_xml_tag.sh boolean system/dnsallowoverride)
-if [ "${2}" == "inet" ]; then
+IF="${1}"
+PROTOCOL="${2}"
+LOCAL_IP="${3}"
+REMOTE_IP="${4}"
+AUTH_NAME="${5}"
+DNS1_RAW="${6}"
+DNS2_RAW="${7}"
- OLD_ROUTER=`cat /tmp/${1}_router`
+if [ "${PROTOCOL}" == "inet" ]; then
+
+ OLD_ROUTER=`cat /tmp/${IF}_router`
if [ -n "${OLD_ROUTER}" ]; then
echo "Removing states to old router ${OLD_ROUTER}" | logger -t ppp-linkup
- pfctl -i ${1} -k 0.0.0.0/0 -k ${OLD_ROUTER}/32
- pfctl -i ${1} -k ${OLD_ROUTER}/32 -k 0.0.0.0/0
+ pfctl -i ${IF} -k 0.0.0.0/0 -k ${OLD_ROUTER}/32
+ pfctl -i ${IF} -k ${OLD_ROUTER}/32 -k 0.0.0.0/0
fi
# let the configuration system know that the ipv4 has changed.
- echo ${4} > /tmp/${1}_router
- echo ${3} > /tmp/${1}_ip
- touch /tmp/${1}up
+ echo ${REMOTE_IP} > /tmp/${IF}_router
+ echo ${LOCAL_IP} > /tmp/${IF}_ip
+ touch /tmp/${IF}up
if [ "${DNSALLOWOVERRIDE}" = "true" ]; then
# write nameservers to file
- echo -n "" > /var/etc/nameserver_${1}
- if echo "${6}" | grep -q dns1; then
- DNS1=`echo "${6}" | awk '{print $2}'`
- echo "${DNS1}" >> /var/etc/nameserver_${1}
- route change "${DNS1}" ${4}
+ echo -n "" > /var/etc/nameserver_${IF}
+ if echo "${DNS1_RAW}" | grep -q dns1; then
+ DNS1=`echo "${DNS1_RAW}" | awk '{print $2}'`
+ echo "${DNS1}" >> /var/etc/nameserver_${IF}
+ route change "${DNS1}" ${REMOTE_IP}
fi
- if echo "${7}" | grep -q dns2; then
- DNS2=`echo "${7}" | awk '{print $2}'`
- echo "${DNS2}" >> /var/etc/nameserver_${1}
- route change "${DNS2}" ${4}
+ if echo "${DNS2_RAW}" | grep -q dns2; then
+ DNS2=`echo "${DNS2_RAW}" | awk '{print $2}'`
+ echo "${DNS2}" >> /var/etc/nameserver_${IF}
+ route change "${DNS2}" ${REMOTE_IP}
fi
pfSctl -c 'service reload dns'
sleep 1
fi
- pfSctl -c "interface newip ${1}"
+ pfSctl -c "interface newip ${IF}"
-elif [ "${2}" == "inet6" ]; then
+elif [ "${PROTOCOL}" == "inet6" ]; then
+ /usr/local/sbin/ppp-ipv6 ${IF} up
# let the configuration system know that the ipv6 has changed.
- echo ${4} |cut -d% -f1 > /tmp/${1}_routerv6
- echo ${3} |cut -d% -f1 > /tmp/${1}_ipv6
- touch /tmp/${1}upv6
+ echo ${REMOTE_IP} |cut -d% -f1 > /tmp/${IF}_routerv6
+ echo ${LOCAL_IP} |cut -d% -f1 > /tmp/${IF}_ipv6
+ touch /tmp/${IF}upv6
if [ "${DNSALLOWOVERRIDE}" = "true" ]; then
# write nameservers to file
- echo -n "" > /var/etc/nameserver_v6${1}
- if echo "${6}" | grep -q dns1; then
- DNS1=`echo "${6}" | awk '{print $2}'`
- echo "${DNS1}" >> /var/etc/nameserver_v6${1}
- route change -inet6 "${DNS1}" ${4}
+ echo -n "" > /var/etc/nameserver_v6${IF}
+ if echo "${DNS1_RAW}" | grep -q dns1; then
+ DNS1=`echo "${DNS1_RAW}" | awk '{print $2}'`
+ echo "${DNS1}" >> /var/etc/nameserver_v6${IF}
+ route change -inet6 "${DNS1}" ${REMOTE_IP}
fi
- if echo "${7}" | grep -q dns2; then
- DNS2=`echo "${7}" | awk '{print $2}'`
- echo "${DNS2}" >> /var/etc/nameserver_v6${1}
- route change -inet6 "${DNS2}" ${4}
+ if echo "${DNS2_RAW}" | grep -q dns2; then
+ DNS2=`echo "${DNS2_RAW}" | awk '{print $2}'`
+ echo "${DNS2}" >> /var/etc/nameserver_v6${IF}
+ route change -inet6 "${DNS2}" ${REMOTE_IP}
fi
pfSctl -c 'service reload dns'
sleep 1
fi
- pfSctl -c "interface newipv6 ${1}"
+ pfSctl -c "interface newipv6 ${IF}"
fi
exit 0
diff --git a/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot b/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot
index efc71b6..7342e22 100644
--- a/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot
+++ b/src/usr/local/share/locale/en/LC_MESSAGES/pfSense.pot
@@ -813,10 +813,6 @@ msgstr ""
msgid "Generating ALTQ queues"
msgstr ""
-#: etc/inc/filter.inc:261
-msgid "Generating Layer7 rules"
-msgstr ""
-
#: etc/inc/filter.inc:265
msgid "Loading filter rules"
msgstr ""
@@ -871,10 +867,6 @@ msgstr ""
msgid "There were error(s) loading the rules: %1$s - %2$s"
msgstr ""
-#: etc/inc/filter.inc:388
-msgid "Starting up layer7 daemon"
-msgstr ""
-
#: etc/inc/filter.inc:447
msgid "Processing down interface states"
msgstr ""
@@ -2545,14 +2537,6 @@ msgstr ""
msgid "Allow access to the 'Firewall: Traffic Shaper' page."
msgstr ""
-#: etc/inc/priv.defs.inc:414
-msgid "WebCfg - Firewall: Traffic Shaper: Layer7 page"
-msgstr ""
-
-#: etc/inc/priv.defs.inc:415
-msgid "Allow access to the 'Firewall: Traffic Shaper: Layer7' page."
-msgstr ""
-
#: etc/inc/priv.defs.inc:420
msgid "WebCfg - Firewall: Traffic Shaper: Queues page"
msgstr ""
@@ -4868,10 +4852,6 @@ msgstr ""
msgid "slots"
msgstr ""
-#: etc/inc/shaper.inc:3885
-msgid "Enable/Disable layer7 Container"
-msgstr ""
-
#: etc/inc/shaper.inc:4150
#, php-format
msgid "Sending HUP signal to %s"
@@ -5812,7 +5792,6 @@ msgstr ""
#: usr/local/www/carp_status.php:199 usr/local/www/diag_packet_capture.php:262
#: usr/local/www/diag_packet_capture.php:348
-#: usr/local/www/firewall_shaper_layer7.php:66
#: usr/local/www/interfaces_wireless.php:137 usr/local/www/pkg_edit.php:936
#: usr/local/www/services_ntpd_pps.php:138 usr/local/www/status_graph.php:338
#: usr/local/www/status_graph_cpu.php:54 usr/local/www/status_queues.php:187
@@ -5827,7 +5806,6 @@ msgid "You can configure high availability sync settings"
msgstr ""
#: usr/local/www/carp_status.php:201
-#: usr/local/www/firewall_shaper_layer7.php:67
#: usr/local/www/firewall_virtual_ip.php:308 usr/local/www/interfaces.php:3490
#: usr/local/www/interfaces.php:3499 usr/local/www/status_queues.php:189
msgid "here"
@@ -5888,7 +5866,7 @@ msgstr ""
#: usr/local/www/diag_dump_states_sources.php:66
#: usr/local/www/diag_gmirror.php:46 usr/local/www/diag_nanobsd.php:50
#: usr/local/www/diag_ndp.php:107 usr/local/www/diag_packet_capture.php:88
-#: usr/local/www/diag_patterns.php:63 usr/local/www/diag_ping.php:47
+#: usr/local/www/diag_ping.php:47
#: usr/local/www/diag_resetstate.php:65 usr/local/www/diag_routes.php:71
#: usr/local/www/diag_smart.php:18 usr/local/www/diag_sockets.php:45
#: usr/local/www/diag_states_summary.php:187 usr/local/www/diag_tables.php:45
@@ -6291,7 +6269,6 @@ msgstr ""
#: usr/local/www/diag_backup.php:201 usr/local/www/fbegin.inc:132
#: usr/local/www/firewall_shaper.php:55
-#: usr/local/www/firewall_shaper_layer7.php:60
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:74
msgid "Traffic Shaper"
@@ -6663,7 +6640,6 @@ msgstr ""
#: usr/local/www/firewall_rules_edit.php:1738
#: usr/local/www/firewall_schedule_edit.php:1168
#: usr/local/www/firewall_shaper.php:351
-#: usr/local/www/firewall_shaper_layer7.php:566
#: usr/local/www/firewall_shaper_vinterface.php:319
#: usr/local/www/firewall_virtual_ip_edit.php:509
#: usr/local/www/interfaces.php:3379 usr/local/www/interfaces_assign.php:553
@@ -7567,7 +7543,6 @@ msgstr ""
#: usr/local/www/firewall_nat_out_edit.php:146
#: usr/local/www/firewall_nat_out_edit.php:513
#: usr/local/www/firewall_rules_edit.php:988
-#: usr/local/www/firewall_shaper_layer7.php:467
#: usr/local/www/interfaces_bridge_edit.php:310
#: usr/local/www/load_balancer_relay_action_edit.php:121
#: usr/local/www/load_balancer_relay_action_edit.php:425
@@ -7685,7 +7660,6 @@ msgstr ""
#: usr/local/www/firewall_schedule.php:51
#: usr/local/www/firewall_schedule_edit.php:62
#: usr/local/www/firewall_shaper.php:55
-#: usr/local/www/firewall_shaper_layer7.php:60
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:74
#: usr/local/www/firewall_virtual_ip.php:203
@@ -8861,35 +8835,6 @@ msgstr ""
msgid "Packets Captured:"
msgstr ""
-#: usr/local/www/diag_patterns.php:43 usr/local/www/diag_patterns.php:85
-msgid "Upload Pattern file"
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:49
-#, php-format
-msgid "Added custom l7 pattern %s"
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:51
-msgid "Uploaded file to"
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:54
-msgid "Warning: You must upload a file with .pat extension."
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:63
-msgid "Add layer7 pattern"
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:74
-msgid "Upload layer7 pattern file"
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:77
-msgid "File to upload:"
-msgstr ""
-
#: usr/local/www/diag_pf_info.php:101
msgid "Gathering PF information, please wait..."
msgstr ""
@@ -9310,7 +9255,6 @@ msgid "entries in this table."
msgstr ""
#: usr/local/www/diag_tables.php:169
-#: usr/local/www/firewall_shaper_layer7.php:572
#: usr/local/www/services_dhcpv6.php:809
#: usr/local/www/system_firmware_restorefullbackup.php:164
msgid "Delete"
@@ -9911,6 +9855,14 @@ msgid ""
"changes in the GUI until this is complete."
msgstr ""
+#: usr/local/www/head.inc:476
+msgid ""
+"<p>If the above message is still displayed after a couple of hours, use "
+"the 'Clear Package Lock' button on the "
+"<a href='diag_backup.php' title='Backup/Restore'>Backup/Restore page</a> "
+"and reinstall packages manually."
+msgstr ""
+
#: usr/local/www/firewall_aliases.php:109
#, php-format
msgid "Cannot delete alias. Currently in use by %s"
@@ -9925,7 +9877,6 @@ msgstr ""
#: usr/local/www/firewall_nat_npt.php:90
#: usr/local/www/firewall_nat_out.php:226
#: usr/local/www/firewall_shaper.php:406
-#: usr/local/www/firewall_shaper_layer7.php:402
#: usr/local/www/firewall_shaper_queues.php:189
#: usr/local/www/firewall_shaper_vinterface.php:386
#: usr/local/www/firewall_shaper_wizards.php:97
@@ -10325,7 +10276,6 @@ msgid "remove this entry"
msgstr ""
#: usr/local/www/firewall_aliases_edit.php:843
-#: usr/local/www/firewall_shaper_layer7.php:556
#: usr/local/www/interfaces_groups_edit.php:322
#: usr/local/www/interfaces_qinq_edit.php:390
#: usr/local/www/services_dhcp.php:1197 usr/local/www/services_dhcpv6.php:817
@@ -10348,7 +10298,6 @@ msgstr ""
#: usr/local/www/firewall_rules_edit.php:1262
#: usr/local/www/firewall_rules_edit.php:1739
#: usr/local/www/firewall_schedule_edit.php:1169
-#: usr/local/www/firewall_shaper_layer7.php:569
#: usr/local/www/firewall_virtual_ip_edit.php:510
#: usr/local/www/interfaces.php:1856 usr/local/www/interfaces.php:1962
#: usr/local/www/interfaces.php:3380
@@ -11984,14 +11933,6 @@ msgstr ""
msgid "ID must be an integer"
msgstr ""
-#: usr/local/www/firewall_rules_edit.php:526
-msgid "You can only select a layer7 container for TCP and/or UDP protocols"
-msgstr ""
-
-#: usr/local/www/firewall_rules_edit.php:528
-msgid "You can only select a layer7 container for Pass type rules."
-msgstr ""
-
#: usr/local/www/firewall_rules_edit.php:533
msgid ""
"You can only specify the maximum number of established connections per host "
@@ -12494,22 +12435,6 @@ msgstr ""
msgid "Choose the Acknowledge Queue only if you have selected Queue."
msgstr ""
-#: usr/local/www/firewall_rules_edit.php:1673
-#: usr/local/www/firewall_shaper.php:415
-#: usr/local/www/firewall_shaper_layer7.php:60
-#: usr/local/www/firewall_shaper_layer7.php:411
-#: usr/local/www/firewall_shaper_queues.php:198
-#: usr/local/www/firewall_shaper_vinterface.php:395
-#: usr/local/www/firewall_shaper_wizards.php:106
-msgid "Layer7"
-msgstr ""
-
-#: usr/local/www/firewall_rules_edit.php:1696
-msgid ""
-"Choose a Layer7 container to apply application protocol inspection rules. "
-"These are valid for TCP and UDP protocols only."
-msgstr ""
-
#: usr/local/www/firewall_schedule.php:78
#, php-format
msgid "Cannot delete Schedule. Currently in use by %s"
@@ -12717,7 +12642,6 @@ msgid "The traffic shaper configuration has been changed."
msgstr ""
#: usr/local/www/firewall_shaper.php:412
-#: usr/local/www/firewall_shaper_layer7.php:408
#: usr/local/www/firewall_shaper_queues.php:195
#: usr/local/www/firewall_shaper_vinterface.php:392
#: usr/local/www/firewall_shaper_wizards.php:103
@@ -12725,7 +12649,6 @@ msgid "By Interface"
msgstr ""
#: usr/local/www/firewall_shaper.php:413
-#: usr/local/www/firewall_shaper_layer7.php:409
#: usr/local/www/firewall_shaper_queues.php:196
#: usr/local/www/firewall_shaper_vinterface.php:393
#: usr/local/www/firewall_shaper_wizards.php:104
@@ -12733,7 +12656,6 @@ msgid "By Queue"
msgstr ""
#: usr/local/www/firewall_shaper.php:414
-#: usr/local/www/firewall_shaper_layer7.php:410
#: usr/local/www/firewall_shaper_queues.php:197
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_vinterface.php:394
@@ -12742,7 +12664,6 @@ msgid "Limiter"
msgstr ""
#: usr/local/www/firewall_shaper.php:416
-#: usr/local/www/firewall_shaper_layer7.php:412
#: usr/local/www/firewall_shaper_queues.php:199
#: usr/local/www/firewall_shaper_vinterface.php:396
#: usr/local/www/firewall_shaper_wizards.php:74
@@ -12757,43 +12678,10 @@ msgstr ""
msgid "Remove Shaper"
msgstr ""
-#: usr/local/www/firewall_shaper_layer7.php:67
-msgid "You can add new layer7 protocol patterns by simply uploading the file"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:112
-msgid "Layer7 Rules Container not found!"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:162
-msgid "Found the following repeated protocol definitions"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:402
#: usr/local/www/firewall_shaper_queues.php:189
msgid "The traffic shaper configuration has been changed"
msgstr ""
-#: usr/local/www/firewall_shaper_layer7.php:433
-msgid "Create new l7 rules group"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:446
-msgid "Rule(s)"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:458
-msgid "Add one or more rules"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:474
-msgid "Structure"
-msgstr ""
-
-#: usr/local/www/firewall_shaper_layer7.php:481
-msgid "Behaviour"
-msgstr ""
-
#: usr/local/www/firewall_shaper_queues.php:173
msgid "Firewall: Shaper: By Queues View"
msgstr ""
diff --git a/src/usr/local/share/locale/ja/LC_MESSAGES/pfSense.po b/src/usr/local/share/locale/ja/LC_MESSAGES/pfSense.po
index 6b417dc..b9d66c6 100644
--- a/src/usr/local/share/locale/ja/LC_MESSAGES/pfSense.po
+++ b/src/usr/local/share/locale/ja/LC_MESSAGES/pfSense.po
@@ -340,11 +340,6 @@ msgstr "ALTQキューを生成する"
msgid "Generating Limiter rules"
msgstr "リミッタールールを生成する"
-#: etc/inc/filter.inc:234 etc/inc/filter.inc:232 etc/inc/filter.inc:231
-#: etc/inc/filter.inc:206 etc/inc/filter.inc:206
-msgid "Generating Layer7 rules"
-msgstr "生成レイヤ7ルール"
-
#: etc/inc/filter.inc:238 etc/inc/filter.inc:236 etc/inc/filter.inc:235
#: etc/inc/filter.inc:210 etc/inc/filter.inc:210
msgid "Loading filter rules"
@@ -488,11 +483,6 @@ msgstr "ルールのロード中にエラー(S)がありました:%1$s - %
msgid "PF was wedged/busy and has been reset."
msgstr "PFは忙しい/押し込まれ、リセットされました。"
-#: etc/inc/filter.inc:355 etc/inc/filter.inc:357 etc/inc/filter.inc:360
-#: etc/inc/filter.inc:329 etc/inc/filter.inc:333 etc/inc/filter.inc:333
-msgid "Starting up layer7 daemon"
-msgstr "レイヤ7デーモンを起動"
-
#: etc/inc/filter.inc:403 etc/inc/filter.inc:405 etc/inc/filter.inc:408
#: etc/inc/filter.inc:380 etc/inc/filter.inc:384 etc/inc/filter.inc:384
msgid "Processing down interface states"
@@ -3090,12 +3080,6 @@ msgstr ""ヒント:同じ親の下にキューの場合、これはキュー
msgid "slots"
msgstr "スロット"
-#: etc/inc/shaper.inc:3494 etc/inc/shaper.inc:3506 etc/inc/shaper.inc:3661
-#: etc/inc/shaper.inc:3662 etc/inc/shaper.inc:3669 etc/inc/shaper.inc:3737
-#: etc/inc/shaper.inc:3842
-msgid "Enable/Disable layer7 Container"
-msgstr "レイヤ7コンテナを有効または無効にします"
-
#: etc/inc/shaper.inc:3744 etc/inc/shaper.inc:3756 etc/inc/shaper.inc:3911
#: etc/inc/shaper.inc:3912 etc/inc/shaper.inc:3919 etc/inc/shaper.inc:3987
#: etc/inc/shaper.inc:4092
@@ -4854,18 +4838,6 @@ msgstr "WebCfg - ファイアウォール:トラフィックシェイパーペ
msgid "Allow access to the 'Firewall: Traffic Shaper' page."
msgstr "ページ: 「トラフィック·シェイパーファイアウォール」へのアクセスを許可します。"
-#: etc/inc/priv.defs.inc:346 etc/inc/priv.defs.inc:364
-#: etc/inc/priv.defs.inc:370 etc/inc/priv.defs.inc:366
-#: etc/inc/priv.defs.inc:366
-msgid "WebCfg - Firewall: Traffic Shaper: Layer7 page"
-msgstr "WebCfg - ファイアウォール:トラフィックシェイパー:レイヤ7ページ"
-
-#: etc/inc/priv.defs.inc:347 etc/inc/priv.defs.inc:365
-#: etc/inc/priv.defs.inc:371 etc/inc/priv.defs.inc:367
-#: etc/inc/priv.defs.inc:367
-msgid "Allow access to the 'Firewall: Traffic Shaper: Layer7' page."
-msgstr "ページ': Traffic Shaperはレイヤ7ファイアウォール」へのアクセスを許可します。"
-
#: etc/inc/priv.defs.inc:352 etc/inc/priv.defs.inc:370
#: etc/inc/priv.defs.inc:376 etc/inc/priv.defs.inc:372
#: etc/inc/priv.defs.inc:372
@@ -7334,7 +7306,6 @@ msgid "The virtual server configuration has been changed"
msgstr "仮想サーバーの構成が変更されました"
#: usr/local/www/load_balancer_virtual_server.php:108
-#: usr/local/www/firewall_shaper_layer7.php:401
#: usr/local/www/firewall_shaper_vinterface.php:366
#: usr/local/www/firewall_shaper_wizards.php:96
#: usr/local/www/firewall_aliases.php:160
@@ -7388,7 +7359,7 @@ msgstr "仮想サーバーの構成が変更されました"
#: usr/local/www/firewall_virtual_ip.php:204
#: usr/local/www/firewall_nat.php:183 usr/local/www/firewall_nat_out.php:311
#: usr/local/www/services_dnsmasq.php:175 usr/local/www/interfaces.php:1364
-#: usr/local/www/firewall_shaper_layer7.php:401 usr/local/www/vpn_pppoe.php:98
+#: usr/local/www/vpn_pppoe.php:98
#: usr/local/www/firewall_shaper.php:405
#: usr/local/www/firewall_shaper_vinterface.php:386
#: usr/local/www/vpn_ipsec.php:139 usr/local/www/firewall_virtual_ip.php:204
@@ -7459,7 +7430,6 @@ msgid "Monitors"
msgstr "モニター"
#: usr/local/www/load_balancer_virtual_server.php:129
-#: usr/local/www/firewall_shaper_layer7.php:466
#: usr/local/www/interfaces_bridge_edit.php:291
#: usr/local/www/firewall_nat_edit.php:182
#: usr/local/www/firewall_nat_edit.php:185
@@ -7521,7 +7491,6 @@ msgstr "モニター"
#: usr/local/www/firewall_rules_edit.php:857
#: usr/local/www/firewall_nat_edit.php:532
#: usr/local/www/interfaces_bridge_edit.php:304
-#: usr/local/www/firewall_shaper_layer7.php:466
#: usr/local/www/vpn_openvpn_client.php:452
#: usr/local/www/vpn_openvpn_client.php:938
#: usr/local/www/firewall_rules_edit.php:857
@@ -7670,7 +7639,7 @@ msgstr "プールのフォールバック"
#: usr/local/www/diag_confbak.php:98 usr/local/www/halt.php:59
#: usr/local/www/diag_smart.php:14 usr/local/www/diag_states_summary.php:185
#: usr/local/www/system_firmware_auto.php:60
-#: usr/local/www/diag_patterns.php:58 usr/local/www/diag_dns.php:34
+#: usr/local/www/diag_dns.php:34
#: usr/local/www/reboot.php:51 usr/local/www/edit.php:39
#: usr/local/www/diag_ping.php:43 usr/local/www/diag_resetstate.php:64
#: usr/local/www/diag_routes.php:45 usr/local/www/diag_traceroute.php:45
@@ -7700,7 +7669,7 @@ msgstr "プールのフォールバック"
#: usr/local/www/diag_packet_capture.php:43 usr/local/www/diag_routes.php:45
#: usr/local/www/diag_traceroute.php:46 usr/local/www/diag_smart.php:14
#: usr/local/www/exec.php:93 usr/local/www/halt.php:54
-#: usr/local/www/diag_patterns.php:58 usr/local/www/diag_backup.php:581
+#: usr/local/www/diag_backup.php:581
#: usr/local/www/diag_ping.php:44 usr/local/www/diag_resetstate.php:64
#: usr/local/www/system_firmware_restorefullbackup.php:104
#: usr/local/www/diag_dns.php:34 usr/local/www/edit.php:41
@@ -7753,14 +7722,11 @@ msgid " the latest bogon data."
msgstr "最新のbogonデータ。"
#: usr/local/www/diag_tables.php:162
-#: usr/local/www/firewall_shaper_layer7.php:576
#: usr/local/www/services_dhcpv6.php:758
#: usr/local/www/system_firmware_restorefullbackup.php:163
#: usr/local/www/diag_tables.php:161 usr/local/www/services_dhcpv6.php:853
#: usr/local/www/services_dhcpv6.php:784 usr/local/www/diag_tables.php:165
#: usr/local/www/services_dhcpv6.php:801
-#: usr/local/www/firewall_shaper_layer7.php:571
-#: usr/local/www/firewall_shaper_layer7.php:571
#: usr/local/www/diag_tables.php:165 usr/local/www/services_dhcpv6.php:801
#: usr/local/www/system_firmware_restorefullbackup.php:163
msgid "Delete"
@@ -7880,7 +7846,6 @@ msgstr "パッケージ·エディター"
#: usr/local/www/pkg_edit.php:405
#: usr/local/www/firewall_aliases_import.php:154
-#: usr/local/www/firewall_shaper_layer7.php:569
#: usr/local/www/firewall_shaper_vinterface.php:307
#: usr/local/www/services_dnsmasq_domainoverride_edit.php:130
#: usr/local/www/firewall_virtual_ip_edit.php:546
@@ -8116,7 +8081,6 @@ msgstr "パッケージ·エディター"
#: usr/local/www/vpn_ipsec_phase2.php:791 usr/local/www/services_snmp.php:430
#: usr/local/www/interfaces_qinq_edit.php:398
#: usr/local/www/interfaces.php:2664
-#: usr/local/www/firewall_shaper_layer7.php:565
#: usr/local/www/services_router_advertisements.php:395
#: usr/local/www/system_gateways_edit.php:634
#: usr/local/www/services_dyndns_edit.php:378
@@ -8152,7 +8116,7 @@ msgstr "パッケージ·エディター"
#: usr/local/www/interfaces_groups_edit.php:320 usr/local/www/pkg_edit.php:422
#: usr/local/www/interfaces_bridge_edit.php:598
#: usr/local/www/services_dnsmasq.php:312 usr/local/www/interfaces.php:2699
-#: usr/local/www/firewall_shaper_layer7.php:565 usr/local/www/vpn_l2tp.php:449
+#: usr/local/www/vpn_l2tp.php:449
#: usr/local/www/services_router_advertisements.php:395
#: usr/local/www/system_gateways_edit.php:665
#: usr/local/www/system_camanager.php:366
@@ -8259,7 +8223,6 @@ msgstr "保存"
msgid "Advanced features"
msgstr "高度な機能"
-#: usr/local/www/pkg_edit.php:817 usr/local/www/firewall_shaper_layer7.php:65
#: usr/local/www/diag_packet_capture.php:203 usr/local/www/vpn_ipsec.php:422
#: usr/local/www/interfaces_wireless.php:133 usr/local/www/vpn_pptp.php:477
#: usr/local/www/status_graph.php:291 usr/local/www/carp_status.php:194
@@ -8280,7 +8243,7 @@ msgstr "高度な機能"
#: usr/local/www/status_graph.php:330
#: usr/local/www/diag_packet_capture.php:208
#: usr/local/www/diag_packet_capture.php:288 usr/local/www/pkg_edit.php:921
-#: usr/local/www/firewall_shaper_layer7.php:65 usr/local/www/vpn_ipsec.php:438
+#: usr/local/www/vpn_ipsec.php:438
#: usr/local/www/status_graph_cpu.php:53 usr/local/www/status_graph.php:330
#: usr/local/www/diag_packet_capture.php:208
#: usr/local/www/diag_packet_capture.php:288
@@ -8293,7 +8256,6 @@ msgstr "ノート"
#: usr/local/www/pkg_edit.php:823 usr/local/www/pkg_edit.php:835
#: usr/local/www/firewall_aliases_import.php:155
-#: usr/local/www/firewall_shaper_layer7.php:573
#: usr/local/www/services_dnsmasq_domainoverride_edit.php:130
#: usr/local/www/firewall_virtual_ip_edit.php:546
#: usr/local/www/services_wol_edit.php:157
@@ -8417,7 +8379,6 @@ msgstr "ノート"
#: usr/local/www/interfaces_qinq_edit.php:399
#: usr/local/www/interfaces.php:1547 usr/local/www/interfaces.php:1652
#: usr/local/www/interfaces.php:2665
-#: usr/local/www/firewall_shaper_layer7.php:568
#: usr/local/www/system_gateways_edit.php:634
#: usr/local/www/services_dyndns_edit.php:379
#: usr/local/www/firewall_rules_edit.php:1128
@@ -8444,7 +8405,6 @@ msgstr "ノート"
#: usr/local/www/interfaces_bridge_edit.php:598
#: usr/local/www/interfaces.php:1586 usr/local/www/interfaces.php:1691
#: usr/local/www/interfaces.php:2700
-#: usr/local/www/firewall_shaper_layer7.php:568
#: usr/local/www/system_gateways_edit.php:665
#: usr/local/www/interfaces_wireless_edit.php:197
#: usr/local/www/load_balancer_relay_protocol_edit.php:278
@@ -9130,7 +9090,6 @@ msgid "System Logs, Firewall Tab"
msgstr "システムログ、ファイアウォールタブ"
#: usr/local/www/firewall_aliases_import.php:48
-#: usr/local/www/firewall_shaper_layer7.php:59
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:73
#: usr/local/www/firewall_virtual_ip_edit.php:281
@@ -9212,7 +9171,6 @@ msgstr "システムログ、ファイアウォールタブ"
#: usr/local/www/firewall_nat_out_edit.php:329
#: usr/local/www/firewall_virtual_ip.php:189
#: usr/local/www/firewall_nat_edit.php:452 usr/local/www/firewall_nat.php:166
-#: usr/local/www/firewall_shaper_layer7.php:59
#: usr/local/www/firewall_shaper.php:54 usr/local/www/diag_logs_auth.php:67
#: usr/local/www/diag_logs_settings.php:223
#: usr/local/www/firewall_shaper_vinterface.php:54
@@ -9397,13 +9355,11 @@ msgstr "「キャリッジリターンで区切られたインポートする別
msgid "The list may contain only IP addresses."
msgstr "リストは、 IPアドレスを含んでもよい。"
-#: usr/local/www/firewall_shaper_layer7.php:59
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:73
#: usr/local/www/firewall_shaper.php:54 usr/local/www/diag_backup.php:121
#: usr/local/www/fbegin.inc:114 usr/local/www/fbegin.inc:131
#: usr/local/www/diag_backup.php:199 usr/local/www/fbegin.inc:140
-#: usr/local/www/fbegin.inc:132 usr/local/www/firewall_shaper_layer7.php:59
#: usr/local/www/firewall_shaper.php:54
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:73
@@ -9411,40 +9367,6 @@ msgstr "リストは、 IPアドレスを含んでもよい。"
msgid "Traffic Shaper"
msgstr "トラフィックシェー"
-#: usr/local/www/firewall_shaper_layer7.php:59
-#: usr/local/www/firewall_shaper_layer7.php:410
-#: usr/local/www/firewall_shaper_vinterface.php:375
-#: usr/local/www/firewall_shaper_wizards.php:105
-#: usr/local/www/firewall_rules_edit.php:1443
-#: usr/local/www/firewall_shaper.php:412
-#: usr/local/www/firewall_shaper_queues.php:196
-#: usr/local/www/firewall_rules_edit.php:1514
-#: usr/local/www/firewall_shaper_vinterface.php:385
-#: usr/local/www/firewall_shaper.php:413
-#: usr/local/www/firewall_shaper_vinterface.php:392
-#: usr/local/www/firewall_rules_edit.php:1529
-#: usr/local/www/firewall_shaper.php:414
-#: usr/local/www/firewall_shaper_vinterface.php:395
-#: usr/local/www/firewall_rules_edit.php:1537
-#: usr/local/www/firewall_shaper_queues.php:197
-#: usr/local/www/firewall_shaper_wizards.php:106
-#: usr/local/www/firewall_rules_edit.php:1548
-#: usr/local/www/firewall_shaper_layer7.php:59
-#: usr/local/www/firewall_shaper_layer7.php:410
-#: usr/local/www/firewall_shaper.php:414
-#: usr/local/www/firewall_shaper_vinterface.php:395
-#: usr/local/www/firewall_rules_edit.php:1548
-#: usr/local/www/firewall_shaper_queues.php:197
-#: usr/local/www/firewall_shaper_wizards.php:106
-msgid "Layer7"
-msgstr "レイヤ7"
-
-#: usr/local/www/firewall_shaper_layer7.php:66
-#: usr/local/www/firewall_shaper_layer7.php:66
-msgid "You can add new layer7 protocol patterns by simply uploading the file"
-msgstr "あなたは、単にファイルをアップロードすることにより、新たなレイヤ7プロトコルのパターンを追加することができます"
-
-#: usr/local/www/firewall_shaper_layer7.php:66
#: usr/local/www/firewall_virtual_ip.php:243 usr/local/www/interfaces.php:2550
#: usr/local/www/interfaces.php:2559 usr/local/www/carp_status.php:196
#: usr/local/www/status_queues.php:174 usr/local/www/status_queues.php:182
@@ -9457,32 +9379,18 @@ msgstr "あなたは、単にファイルをアップロードすることによ
#: usr/local/www/interfaces.php:2783 usr/local/www/interfaces.php:2820
#: usr/local/www/interfaces.php:2829 usr/local/www/firewall_virtual_ip.php:292
#: usr/local/www/interfaces.php:2806 usr/local/www/interfaces.php:2815
-#: usr/local/www/firewall_shaper_layer7.php:66
#: usr/local/www/firewall_virtual_ip.php:292
#: usr/local/www/status_queues.php:165 usr/local/www/interfaces.php:2806
#: usr/local/www/interfaces.php:2815 usr/local/www/carp_status.php:189
msgid "here"
msgstr "ここに"
-#: usr/local/www/firewall_shaper_layer7.php:111
-#: usr/local/www/firewall_shaper_layer7.php:111
-msgid "Layer7 Rules Container not found!"
-msgstr "レイヤ7ルールコンテナが見つかりません !"
-
-#: usr/local/www/firewall_shaper_layer7.php:161
-#: usr/local/www/firewall_shaper_layer7.php:161
-msgid "Found the following repeated protocol definitions"
-msgstr "次の反復プロトコル定義を見つけた"
-
-#: usr/local/www/firewall_shaper_layer7.php:401
#: usr/local/www/firewall_shaper_queues.php:187
#: usr/local/www/firewall_shaper_queues.php:188
-#: usr/local/www/firewall_shaper_layer7.php:401
#: usr/local/www/firewall_shaper_queues.php:188
msgid "The traffic shaper configuration has been changed"
msgstr "トラフィックシェーパの構成が変更されました"
-#: usr/local/www/firewall_shaper_layer7.php:407
#: usr/local/www/firewall_shaper_vinterface.php:372
#: usr/local/www/firewall_shaper_wizards.php:102
#: usr/local/www/firewall_shaper.php:409
@@ -9494,7 +9402,6 @@ msgstr "トラフィックシェーパの構成が変更されました"
#: usr/local/www/firewall_shaper_vinterface.php:392
#: usr/local/www/firewall_shaper_queues.php:194
#: usr/local/www/firewall_shaper_wizards.php:103
-#: usr/local/www/firewall_shaper_layer7.php:407
#: usr/local/www/firewall_shaper.php:411
#: usr/local/www/firewall_shaper_vinterface.php:392
#: usr/local/www/firewall_shaper_queues.php:194
@@ -9502,7 +9409,6 @@ msgstr "トラフィックシェーパの構成が変更されました"
msgid "By Interface"
msgstr "インタフェースで"
-#: usr/local/www/firewall_shaper_layer7.php:408
#: usr/local/www/firewall_shaper_vinterface.php:373
#: usr/local/www/firewall_shaper_wizards.php:103
#: usr/local/www/firewall_shaper.php:410
@@ -9514,7 +9420,6 @@ msgstr "インタフェースで"
#: usr/local/www/firewall_shaper_vinterface.php:393
#: usr/local/www/firewall_shaper_queues.php:195
#: usr/local/www/firewall_shaper_wizards.php:104
-#: usr/local/www/firewall_shaper_layer7.php:408
#: usr/local/www/firewall_shaper.php:412
#: usr/local/www/firewall_shaper_vinterface.php:393
#: usr/local/www/firewall_shaper_queues.php:195
@@ -9522,7 +9427,6 @@ msgstr "インタフェースで"
msgid "By Queue"
msgstr "キューによって"
-#: usr/local/www/firewall_shaper_layer7.php:409
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_vinterface.php:374
#: usr/local/www/firewall_shaper_wizards.php:104
@@ -9535,7 +9439,6 @@ msgstr "キューによって"
#: usr/local/www/firewall_shaper_vinterface.php:394
#: usr/local/www/firewall_shaper_queues.php:196
#: usr/local/www/firewall_shaper_wizards.php:105
-#: usr/local/www/firewall_shaper_layer7.php:409
#: usr/local/www/firewall_shaper.php:413
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_vinterface.php:394
@@ -9544,7 +9447,6 @@ msgstr "キューによって"
msgid "Limiter"
msgstr "リミッタ"
-#: usr/local/www/firewall_shaper_layer7.php:411
#: usr/local/www/firewall_shaper_vinterface.php:376
#: usr/local/www/firewall_shaper_wizards.php:73
#: usr/local/www/firewall_shaper_wizards.php:106
@@ -9566,7 +9468,6 @@ msgstr "リミッタ"
#: usr/local/www/firewall_shaper_vinterface.php:396
#: usr/local/www/firewall_shaper_queues.php:198
#: usr/local/www/firewall_shaper_wizards.php:107
-#: usr/local/www/firewall_shaper_layer7.php:411
#: usr/local/www/firewall_shaper.php:415
#: usr/local/www/firewall_shaper_vinterface.php:396
#: usr/local/www/vpn_openvpn_client.php:399
@@ -9578,32 +9479,6 @@ msgstr "リミッタ"
msgid "Wizards"
msgstr "ウィザーズ"
-#: usr/local/www/firewall_shaper_layer7.php:432
-#: usr/local/www/firewall_shaper_layer7.php:432
-msgid "Create new l7 rules group"
-msgstr "新しいL7ルール·グループを作成する"
-
-#: usr/local/www/firewall_shaper_layer7.php:445
-#: usr/local/www/firewall_shaper_layer7.php:445
-msgid "Rule(s)"
-msgstr "規則(単数または複数)"
-
-#: usr/local/www/firewall_shaper_layer7.php:457
-#: usr/local/www/firewall_shaper_layer7.php:457
-msgid "Add one or more rules"
-msgstr "1つ以上のルールを追加"
-
-#: usr/local/www/firewall_shaper_layer7.php:473
-#: usr/local/www/firewall_shaper_layer7.php:473
-msgid "Structure"
-msgstr "構造"
-
-#: usr/local/www/firewall_shaper_layer7.php:480
-#: usr/local/www/firewall_shaper_layer7.php:480
-msgid "Behaviour"
-msgstr "行動"
-
-#: usr/local/www/firewall_shaper_layer7.php:558
#: usr/local/www/interfaces_groups_edit.php:315
#: usr/local/www/firewall_aliases_edit.php:680
#: usr/local/www/interfaces_qinq_edit.php:387
@@ -9628,13 +9503,11 @@ msgstr "行動"
#: usr/local/www/system_certmanager.php:818
#: usr/local/www/services_dhcpv6.php:811
#: usr/local/www/interfaces_qinq_edit.php:391
-#: usr/local/www/firewall_shaper_layer7.php:555
#: usr/local/www/services_router_advertisements.php:353
#: usr/local/www/services_dhcp.php:1123
#: usr/local/www/system_certmanager.php:820
#: usr/local/www/firewall_aliases_edit.php:717
#: usr/local/www/interfaces_groups_edit.php:313
-#: usr/local/www/firewall_shaper_layer7.php:555
#: usr/local/www/services_router_advertisements.php:353
#: usr/local/www/vpn_pppoe_edit.php:577 usr/local/www/services_dhcp.php:1123
#: usr/local/www/system_certmanager.php:820
@@ -19462,24 +19335,6 @@ msgstr "「あなたは、 1キューとINとOUTのための1つの仮想イン
msgid "ID must be an integer"
msgstr "IDは整数でなければなりません"
-#: usr/local/www/firewall_rules_edit.php:428
-#: usr/local/www/firewall_rules_edit.php:460
-#: usr/local/www/firewall_rules_edit.php:461
-#: usr/local/www/firewall_rules_edit.php:464
-#: usr/local/www/firewall_rules_edit.php:470
-#: usr/local/www/firewall_rules_edit.php:470
-msgid "You can only select a layer7 container for TCP and/or UDP protocols"
-msgstr "あなただけのTCPおよび/またはUDPプロトコルのためのレイヤ7コンテナを選択することができます"
-
-#: usr/local/www/firewall_rules_edit.php:430
-#: usr/local/www/firewall_rules_edit.php:462
-#: usr/local/www/firewall_rules_edit.php:463
-#: usr/local/www/firewall_rules_edit.php:466
-#: usr/local/www/firewall_rules_edit.php:472
-#: usr/local/www/firewall_rules_edit.php:472
-msgid "You can only select a layer7 container for Pass type rules."
-msgstr "あなただけの通過型ルールのレイヤ7のコンテナを選択することができます。"
-
#: usr/local/www/firewall_rules_edit.php:443
#: usr/local/www/firewall_rules_edit.php:475
#: usr/local/www/firewall_rules_edit.php:476
@@ -20241,17 +20096,6 @@ msgstr "Ackqueue /キュー"
msgid "Choose the Acknowledge Queue only if you have selected Queue."
msgstr "キューを選択した場合にのみ肯定応答キューを選択してください。"
-#: usr/local/www/firewall_rules_edit.php:1466
-#: usr/local/www/firewall_rules_edit.php:1537
-#: usr/local/www/firewall_rules_edit.php:1552
-#: usr/local/www/firewall_rules_edit.php:1560
-#: usr/local/www/firewall_rules_edit.php:1571
-#: usr/local/www/firewall_rules_edit.php:1571
-msgid ""
-"Choose a Layer7 container to apply application protocol inspection rules. "
-"These are valid for TCP and UDP protocols only."
-msgstr "「アプリケーションプロトコルインスペクションルールを適用するレイヤ7のコンテナを選択します。 「これらはTCPおよびUDPのみのプロトコルに有効です。"
-
#: usr/local/www/firewall_schedule.php:50
#: usr/local/www/firewall_schedule_edit.php:61 usr/local/www/fbegin.inc:113
#: usr/local/www/system_advanced_misc.php:380 usr/local/www/fbegin.inc:130
@@ -26036,7 +25880,6 @@ msgstr "MB /秒"
msgid "GB/s"
msgstr "GB /秒"
-#: usr/local/www/diag_patterns.php:43
#: usr/local/www/services_captiveportal_filemanager.php:195
#: usr/local/www/exec.php:290 usr/local/www/exec.php:300
#: usr/local/www/exec.php:292 usr/local/www/exec.php:302
@@ -26046,31 +25889,6 @@ msgstr "GB /秒"
msgid "Upload"
msgstr "アップロード"
-#: usr/local/www/diag_patterns.php:46 usr/local/www/diag_patterns.php:46
-msgid "Uploaded file to"
-msgstr "アップロードされたファイルへの"
-
-#: usr/local/www/diag_patterns.php:49 usr/local/www/diag_patterns.php:49
-msgid "Warning: You must upload a file with .pat extension."
-msgstr "警告:あなたはパットの拡張子を持つファイルをアップロードする必要があります。"
-
-#: usr/local/www/diag_patterns.php:58 usr/local/www/diag_patterns.php:58
-msgid "Add layer7 pattern"
-msgstr "レイヤ7パターンを追加"
-
-#: usr/local/www/diag_patterns.php:69 usr/local/www/diag_patterns.php:69
-msgid "Upload layer7 pattern file"
-msgstr "レイヤ7のパターンファイルをアップロード"
-
-#: usr/local/www/diag_patterns.php:72 usr/local/www/diag_patterns.php:72
-msgid "File to upload:"
-msgstr "アップロードするファイル:"
-
-#: usr/local/www/diag_patterns.php:80 usr/local/www/diag_patterns.php:43
-#: usr/local/www/diag_patterns.php:43 usr/local/www/diag_patterns.php:80
-msgid "Upload Pattern file"
-msgstr "パターンファイルをアップロード"
-
#: usr/local/www/vpn_ipsec_keys.php:64 usr/local/www/vpn_ipsec_keys.php:64
msgid "Deleted IPsec Pre-Shared Key"
msgstr "削除されたIPsecの事前共有キー"
diff --git a/src/usr/local/share/locale/pt_BR/LC_MESSAGES/pfSense.po b/src/usr/local/share/locale/pt_BR/LC_MESSAGES/pfSense.po
index a4f299d..b013681 100644
--- a/src/usr/local/share/locale/pt_BR/LC_MESSAGES/pfSense.po
+++ b/src/usr/local/share/locale/pt_BR/LC_MESSAGES/pfSense.po
@@ -325,11 +325,6 @@ msgstr "Gerando filas ALTQ"
msgid "Generating Limiter rules"
msgstr "Gerando regras Limiter"
-#: etc/inc/filter.inc:234 etc/inc/filter.inc:232 etc/inc/filter.inc:231
-#: etc/inc/filter.inc:206 etc/inc/filter.inc:221
-msgid "Generating Layer7 rules"
-msgstr "Gerando regras Layer7"
-
#: etc/inc/filter.inc:238 etc/inc/filter.inc:236 etc/inc/filter.inc:235
#: etc/inc/filter.inc:210 etc/inc/filter.inc:225
msgid "Loading filter rules"
@@ -457,11 +452,6 @@ msgstr "Houve erro(s) carregando as regras: %1$s - %2$s"
msgid "PF was wedged/busy and has been reset."
msgstr "PF estava travado/ocupado e foi reiniciado."
-#: etc/inc/filter.inc:355 etc/inc/filter.inc:357 etc/inc/filter.inc:360
-#: etc/inc/filter.inc:329 etc/inc/filter.inc:333 etc/inc/filter.inc:348
-msgid "Starting up layer7 daemon"
-msgstr "Iniciando daemon layer7"
-
#: etc/inc/filter.inc:403 etc/inc/filter.inc:405 etc/inc/filter.inc:408
#: etc/inc/filter.inc:380 etc/inc/filter.inc:384
msgid "Processing down interface states"
@@ -2758,12 +2748,6 @@ msgstr "Dica: Para filas abaixo do mesmo pai, isso especifica o compartilhamento
msgid "slots"
msgstr "slots"
-#: etc/inc/shaper.inc:3494 etc/inc/shaper.inc:3506 etc/inc/shaper.inc:3661
-#: etc/inc/shaper.inc:3662 etc/inc/shaper.inc:3669 etc/inc/shaper.inc:3737
-#: etc/inc/shaper.inc:3842 etc/inc/shaper.inc:3868
-msgid "Enable/Disable layer7 Container"
-msgstr "Habilitar/Desabilitar Contêiner de layer7"
-
#: etc/inc/shaper.inc:3744 etc/inc/shaper.inc:3756 etc/inc/shaper.inc:3911
#: etc/inc/shaper.inc:3912 etc/inc/shaper.inc:3919 etc/inc/shaper.inc:3987
#: etc/inc/shaper.inc:4092 etc/inc/shaper.inc:4118
@@ -4393,16 +4377,6 @@ msgstr "WebCfg - Página Firewall: Traffic Shaper"
msgid "Allow access to the 'Firewall: Traffic Shaper' page."
msgstr "Permitir acesso à página 'Firewall: Traffic Shaper'."
-#: etc/inc/priv.defs.inc:346 etc/inc/priv.defs.inc:364
-#: etc/inc/priv.defs.inc:370 etc/inc/priv.defs.inc:366
-msgid "WebCfg - Firewall: Traffic Shaper: Layer7 page"
-msgstr "WebCfg - Página Firewall: Traffic Shaper: Layer7"
-
-#: etc/inc/priv.defs.inc:347 etc/inc/priv.defs.inc:365
-#: etc/inc/priv.defs.inc:371 etc/inc/priv.defs.inc:367
-msgid "Allow access to the 'Firewall: Traffic Shaper: Layer7' page."
-msgstr "Permitir acesso à página 'Firewall: Traffic Shaper: Layer7'."
-
#: etc/inc/priv.defs.inc:352 etc/inc/priv.defs.inc:370
#: etc/inc/priv.defs.inc:376 etc/inc/priv.defs.inc:372
msgid "WebCfg - Firewall: Traffic Shaper: Queues page"
@@ -6471,7 +6445,6 @@ msgid "The virtual server configuration has been changed"
msgstr "A configuração do servidor virtual foi modificada"
#: usr/local/www/load_balancer_virtual_server.php:108
-#: usr/local/www/firewall_shaper_layer7.php:401
#: usr/local/www/firewall_shaper_vinterface.php:366
#: usr/local/www/firewall_shaper_wizards.php:96
#: usr/local/www/firewall_aliases.php:160
@@ -6562,7 +6535,6 @@ msgid "Monitors"
msgstr "Monitores"
#: usr/local/www/load_balancer_virtual_server.php:129
-#: usr/local/www/firewall_shaper_layer7.php:466
#: usr/local/www/interfaces_bridge_edit.php:291
#: usr/local/www/firewall_nat_edit.php:182
#: usr/local/www/firewall_nat_edit.php:185
@@ -6731,7 +6703,7 @@ msgstr "Pool de Fall Back"
#: usr/local/www/diag_confbak.php:98 usr/local/www/halt.php:59
#: usr/local/www/diag_smart.php:14 usr/local/www/diag_states_summary.php:185
#: usr/local/www/system_firmware_auto.php:60
-#: usr/local/www/diag_patterns.php:58 usr/local/www/diag_dns.php:34
+#: usr/local/www/diag_dns.php:34
#: usr/local/www/reboot.php:51 usr/local/www/edit.php:39
#: usr/local/www/diag_ping.php:43 usr/local/www/diag_resetstate.php:64
#: usr/local/www/diag_routes.php:45 usr/local/www/diag_traceroute.php:45
@@ -6789,13 +6761,11 @@ msgid " the latest bogon data."
msgstr " dados de bogon mais recente."
#: usr/local/www/diag_tables.php:162
-#: usr/local/www/firewall_shaper_layer7.php:576
#: usr/local/www/services_dhcpv6.php:758
#: usr/local/www/system_firmware_restorefullbackup.php:163
#: usr/local/www/diag_tables.php:161 usr/local/www/services_dhcpv6.php:853
#: usr/local/www/services_dhcpv6.php:784 usr/local/www/diag_tables.php:165
#: usr/local/www/services_dhcpv6.php:801
-#: usr/local/www/firewall_shaper_layer7.php:571
msgid "Delete"
msgstr "Excluir"
@@ -6886,7 +6856,6 @@ msgstr "Editor de Pacote"
#: usr/local/www/pkg_edit.php:405
#: usr/local/www/firewall_aliases_import.php:154
-#: usr/local/www/firewall_shaper_layer7.php:569
#: usr/local/www/firewall_shaper_vinterface.php:307
#: usr/local/www/services_dnsmasq_domainoverride_edit.php:130
#: usr/local/www/firewall_virtual_ip_edit.php:546
@@ -7122,7 +7091,6 @@ msgstr "Editor de Pacote"
#: usr/local/www/vpn_ipsec_phase2.php:791 usr/local/www/services_snmp.php:430
#: usr/local/www/interfaces_qinq_edit.php:398
#: usr/local/www/interfaces.php:2664
-#: usr/local/www/firewall_shaper_layer7.php:565
#: usr/local/www/services_router_advertisements.php:395
#: usr/local/www/system_gateways_edit.php:634
#: usr/local/www/services_dyndns_edit.php:378
@@ -7189,7 +7157,6 @@ msgstr "Salvar"
msgid "Advanced features"
msgstr "Recursos avançados"
-#: usr/local/www/pkg_edit.php:817 usr/local/www/firewall_shaper_layer7.php:65
#: usr/local/www/diag_packet_capture.php:203 usr/local/www/vpn_ipsec.php:422
#: usr/local/www/interfaces_wireless.php:133 usr/local/www/vpn_pptp.php:477
#: usr/local/www/status_graph.php:291 usr/local/www/carp_status.php:194
@@ -7216,7 +7183,6 @@ msgstr "Nota"
#: usr/local/www/pkg_edit.php:823 usr/local/www/pkg_edit.php:835
#: usr/local/www/firewall_aliases_import.php:155
-#: usr/local/www/firewall_shaper_layer7.php:573
#: usr/local/www/services_dnsmasq_domainoverride_edit.php:130
#: usr/local/www/firewall_virtual_ip_edit.php:546
#: usr/local/www/services_wol_edit.php:157
@@ -7340,7 +7306,6 @@ msgstr "Nota"
#: usr/local/www/interfaces_qinq_edit.php:399
#: usr/local/www/interfaces.php:1547 usr/local/www/interfaces.php:1652
#: usr/local/www/interfaces.php:2665
-#: usr/local/www/firewall_shaper_layer7.php:568
#: usr/local/www/system_gateways_edit.php:634
#: usr/local/www/services_dyndns_edit.php:379
#: usr/local/www/firewall_rules_edit.php:1128
@@ -7909,7 +7874,6 @@ msgid "System Logs, Firewall Tab"
msgstr "Logs de Sistema, Firewall Tab"
#: usr/local/www/firewall_aliases_import.php:48
-#: usr/local/www/firewall_shaper_layer7.php:59
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:73
#: usr/local/www/firewall_virtual_ip_edit.php:281
@@ -8111,7 +8075,6 @@ msgstr "Cole nos alias para importar separada por retorno de carro. Exemplos com
msgid "The list may contain only IP addresses."
msgstr "Esta lista pode conter apenas endereços IP."
-#: usr/local/www/firewall_shaper_layer7.php:59
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:73
#: usr/local/www/firewall_shaper.php:54 usr/local/www/diag_backup.php:121
@@ -8121,33 +8084,6 @@ msgstr "Esta lista pode conter apenas endereços IP."
msgid "Traffic Shaper"
msgstr "Traffic Shaper"
-#: usr/local/www/firewall_shaper_layer7.php:59
-#: usr/local/www/firewall_shaper_layer7.php:410
-#: usr/local/www/firewall_shaper_vinterface.php:375
-#: usr/local/www/firewall_shaper_wizards.php:105
-#: usr/local/www/firewall_rules_edit.php:1443
-#: usr/local/www/firewall_shaper.php:412
-#: usr/local/www/firewall_shaper_queues.php:196
-#: usr/local/www/firewall_rules_edit.php:1514
-#: usr/local/www/firewall_shaper_vinterface.php:385
-#: usr/local/www/firewall_shaper.php:413
-#: usr/local/www/firewall_shaper_vinterface.php:392
-#: usr/local/www/firewall_rules_edit.php:1529
-#: usr/local/www/firewall_shaper.php:414
-#: usr/local/www/firewall_shaper_vinterface.php:395
-#: usr/local/www/firewall_rules_edit.php:1537
-#: usr/local/www/firewall_shaper_queues.php:197
-#: usr/local/www/firewall_shaper_wizards.php:106
-#: usr/local/www/firewall_rules_edit.php:1548
-#: usr/local/www/firewall_rules_edit.php:1596
-msgid "Layer7"
-msgstr "Layer7"
-
-#: usr/local/www/firewall_shaper_layer7.php:66
-msgid "You can add new layer7 protocol patterns by simply uploading the file"
-msgstr "Você pode adicionar um novo padrão de protocolo layer7 simplesmente carregando o arquivo"
-
-#: usr/local/www/firewall_shaper_layer7.php:66
#: usr/local/www/firewall_virtual_ip.php:243 usr/local/www/interfaces.php:2550
#: usr/local/www/interfaces.php:2559 usr/local/www/carp_status.php:196
#: usr/local/www/status_queues.php:174 usr/local/www/status_queues.php:182
@@ -8166,21 +8102,11 @@ msgstr "Você pode adicionar um novo padrão de protocolo layer7 simplesmente ca
msgid "here"
msgstr "aqui"
-#: usr/local/www/firewall_shaper_layer7.php:111
-msgid "Layer7 Rules Container not found!"
-msgstr "Contâiner de Regras Layer7 não encontrado!"
-
-#: usr/local/www/firewall_shaper_layer7.php:161
-msgid "Found the following repeated protocol definitions"
-msgstr "Encontradas as seguintes definições de protocolo repetidas"
-
-#: usr/local/www/firewall_shaper_layer7.php:401
#: usr/local/www/firewall_shaper_queues.php:187
#: usr/local/www/firewall_shaper_queues.php:188
msgid "The traffic shaper configuration has been changed"
msgstr "A configuração do traffic shaper foi modificada"
-#: usr/local/www/firewall_shaper_layer7.php:407
#: usr/local/www/firewall_shaper_vinterface.php:372
#: usr/local/www/firewall_shaper_wizards.php:102
#: usr/local/www/firewall_shaper.php:409
@@ -8195,7 +8121,6 @@ msgstr "A configuração do traffic shaper foi modificada"
msgid "By Interface"
msgstr "Por Interface"
-#: usr/local/www/firewall_shaper_layer7.php:408
#: usr/local/www/firewall_shaper_vinterface.php:373
#: usr/local/www/firewall_shaper_wizards.php:103
#: usr/local/www/firewall_shaper.php:410
@@ -8210,7 +8135,6 @@ msgstr "Por Interface"
msgid "By Queue"
msgstr "Por Fila"
-#: usr/local/www/firewall_shaper_layer7.php:409
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_vinterface.php:374
#: usr/local/www/firewall_shaper_wizards.php:104
@@ -8226,7 +8150,6 @@ msgstr "Por Fila"
msgid "Limiter"
msgstr "Limitador"
-#: usr/local/www/firewall_shaper_layer7.php:411
#: usr/local/www/firewall_shaper_vinterface.php:376
#: usr/local/www/firewall_shaper_wizards.php:73
#: usr/local/www/firewall_shaper_wizards.php:106
@@ -8251,27 +8174,6 @@ msgstr "Limitador"
msgid "Wizards"
msgstr "Wizards"
-#: usr/local/www/firewall_shaper_layer7.php:432
-msgid "Create new l7 rules group"
-msgstr "Criar um novo grupo de regras l7"
-
-#: usr/local/www/firewall_shaper_layer7.php:445
-msgid "Rule(s)"
-msgstr "Regra(s)"
-
-#: usr/local/www/firewall_shaper_layer7.php:457
-msgid "Add one or more rules"
-msgstr "Adicionar uma ou mais regras"
-
-#: usr/local/www/firewall_shaper_layer7.php:473
-msgid "Structure"
-msgstr "Estrutura"
-
-#: usr/local/www/firewall_shaper_layer7.php:480
-msgid "Behaviour"
-msgstr "Comportamento"
-
-#: usr/local/www/firewall_shaper_layer7.php:558
#: usr/local/www/interfaces_groups_edit.php:315
#: usr/local/www/firewall_aliases_edit.php:680
#: usr/local/www/interfaces_qinq_edit.php:387
@@ -8296,7 +8198,6 @@ msgstr "Comportamento"
#: usr/local/www/system_certmanager.php:818
#: usr/local/www/services_dhcpv6.php:811
#: usr/local/www/interfaces_qinq_edit.php:391
-#: usr/local/www/firewall_shaper_layer7.php:555
#: usr/local/www/services_router_advertisements.php:353
#: usr/local/www/services_dhcp.php:1123
#: usr/local/www/system_certmanager.php:820
@@ -16377,22 +16278,6 @@ msgstr "Você não pode selecionar uma fila e uma interface virtual para Entrada
msgid "ID must be an integer"
msgstr "ID deve ser um inteiro"
-#: usr/local/www/firewall_rules_edit.php:428
-#: usr/local/www/firewall_rules_edit.php:460
-#: usr/local/www/firewall_rules_edit.php:461
-#: usr/local/www/firewall_rules_edit.php:464
-#: usr/local/www/firewall_rules_edit.php:470
-msgid "You can only select a layer7 container for TCP and/or UDP protocols"
-msgstr "Você somente pode selecionar um conteiner layer7 para TCP e/ou protocolos UDP"
-
-#: usr/local/www/firewall_rules_edit.php:430
-#: usr/local/www/firewall_rules_edit.php:462
-#: usr/local/www/firewall_rules_edit.php:463
-#: usr/local/www/firewall_rules_edit.php:466
-#: usr/local/www/firewall_rules_edit.php:472
-msgid "You can only select a layer7 container for Pass type rules."
-msgstr "Você somente pode selecionar um conteiner layer7 para regras de tipo Liberação."
-
#: usr/local/www/firewall_rules_edit.php:443
#: usr/local/www/firewall_rules_edit.php:475
#: usr/local/www/firewall_rules_edit.php:476
@@ -17095,15 +16980,6 @@ msgstr "Reconhecimento/Fila"
msgid "Choose the Acknowledge Queue only if you have selected Queue."
msgstr "Escolha a Fila de Acordo somente se você selecionou Fila."
-#: usr/local/www/firewall_rules_edit.php:1466
-#: usr/local/www/firewall_rules_edit.php:1537
-#: usr/local/www/firewall_rules_edit.php:1552
-#: usr/local/www/firewall_rules_edit.php:1560
-#: usr/local/www/firewall_rules_edit.php:1571
-#: usr/local/www/firewall_rules_edit.php:1619
-msgid "Choose a Layer7 container to apply application protocol inspection rules. These are valid for TCP and UDP protocols only."
-msgstr "Escolha o contâiner Layer7 para aplicar regras de inspeção de protocolo de aplicação. Essas são válidas somente para protocolos TCP e UDP."
-
#: usr/local/www/firewall_schedule.php:50
#: usr/local/www/firewall_schedule_edit.php:61 usr/local/www/fbegin.inc:113
#: usr/local/www/system_advanced_misc.php:380 usr/local/www/fbegin.inc:130
@@ -22183,7 +22059,6 @@ msgstr "MB/s"
msgid "GB/s"
msgstr "BG/s"
-#: usr/local/www/diag_patterns.php:43
#: usr/local/www/services_captiveportal_filemanager.php:195
#: usr/local/www/exec.php:290 usr/local/www/exec.php:300
#: usr/local/www/exec.php:292 usr/local/www/exec.php:302
@@ -22191,30 +22066,6 @@ msgstr "BG/s"
msgid "Upload"
msgstr "Carregar"
-#: usr/local/www/diag_patterns.php:46
-msgid "Uploaded file to"
-msgstr "Arquivo carregado em"
-
-#: usr/local/www/diag_patterns.php:49
-msgid "Warning: You must upload a file with .pat extension."
-msgstr "Atenção: Você deve fazer o carregamento de um arquivo com extensão .pat."
-
-#: usr/local/www/diag_patterns.php:58
-msgid "Add layer7 pattern"
-msgstr "Adicionar amostra de camada 7"
-
-#: usr/local/www/diag_patterns.php:69
-msgid "Upload layer7 pattern file"
-msgstr "Upload de arquivo padrão Layer7"
-
-#: usr/local/www/diag_patterns.php:72
-msgid "File to upload:"
-msgstr "Arquivo para carregar:"
-
-#: usr/local/www/diag_patterns.php:80 usr/local/www/diag_patterns.php:43
-msgid "Upload Pattern file"
-msgstr "Enviar arquivo de padrões"
-
#: usr/local/www/vpn_ipsec_keys.php:64
msgid "Deleted IPsec Pre-Shared Key"
msgstr "Chave pré-compartilhada IPsec apagada"
diff --git a/src/usr/local/share/locale/tr/LC_MESSAGES/pfSense.po b/src/usr/local/share/locale/tr/LC_MESSAGES/pfSense.po
index a11fe8f..07b6eac 100644
--- a/src/usr/local/share/locale/tr/LC_MESSAGES/pfSense.po
+++ b/src/usr/local/share/locale/tr/LC_MESSAGES/pfSense.po
@@ -845,10 +845,6 @@ msgstr "Fiitre kuralları oluşturuluyor"
msgid "Generating ALTQ queues"
msgstr "ALTQ kuyrukları oluşturuluyor"
-#: etc/inc/filter.inc:261
-msgid "Generating Layer7 rules"
-msgstr "Layer7 kuralları oluşturuluyor"
-
#: etc/inc/filter.inc:265
msgid "Loading filter rules"
msgstr "Filtreleme kuralları yükleniyor"
@@ -903,10 +899,6 @@ msgstr "PF sıkışmış/meşgul oldu ve tekrar başlatılıyor."
msgid "There were error(s) loading the rules: %1$s - %2$s"
msgstr "Kurallar yüklenirken hata(lar) vardı: %1$s - %2$s"
-#: etc/inc/filter.inc:388
-msgid "Starting up layer7 daemon"
-msgstr "layer7 servisi başlatılıyor"
-
#: etc/inc/filter.inc:447
msgid "Processing down interface states"
msgstr "Kapalı arabirim durumları işleniyor"
@@ -2619,15 +2611,6 @@ msgstr "WebCfg - Güvenlik Duvarı: Trafik Şekillendirici sayfası"
msgid "Allow access to the 'Firewall: Traffic Shaper' page."
msgstr "'Güvenlik Duvarı: Trafik Şekillendirici' sayfasını erişime açar."
-#: etc/inc/priv.defs.inc:414
-msgid "WebCfg - Firewall: Traffic Shaper: Layer7 page"
-msgstr "WebCfg - Güvenlik Duvarı: Trafik Şekillendirici: Layer7 sayfası"
-
-#: etc/inc/priv.defs.inc:415
-msgid "Allow access to the 'Firewall: Traffic Shaper: Layer7' page."
-msgstr ""
-"'Güvenlik Duvarı: Trafik Şekillendirici: Layer7' sayfasını erişime açar."
-
#: etc/inc/priv.defs.inc:420
msgid "WebCfg - Firewall: Traffic Shaper: Queues page"
msgstr "WebCfg - Güvenlik Duvarı: Trafik Şekillendirici: Kuyruklar sayfası"
@@ -5041,10 +5024,6 @@ msgstr ""
msgid "slots"
msgstr "yuvalar"
-#: etc/inc/shaper.inc:3885
-msgid "Enable/Disable layer7 Container"
-msgstr "Layer7 Barındırıcı Etkinleştir/Kapat"
-
#: etc/inc/shaper.inc:4150
#, php-format
msgid "Sending HUP signal to %s"
@@ -6035,7 +6014,6 @@ msgstr "Tanımlı herhangi bir CARP arabirimi tespit edilememiştir."
#: usr/local/www/carp_status.php:199 usr/local/www/diag_packet_capture.php:262
#: usr/local/www/diag_packet_capture.php:348
-#: usr/local/www/firewall_shaper_layer7.php:66
#: usr/local/www/interfaces_wireless.php:137 usr/local/www/pkg_edit.php:936
#: usr/local/www/services_ntpd_pps.php:138 usr/local/www/status_graph.php:338
#: usr/local/www/status_graph_cpu.php:54 usr/local/www/status_queues.php:187
@@ -6050,7 +6028,6 @@ msgid "You can configure high availability sync settings"
msgstr "Yüksek erişilebilirlik senkronize ayarlarını yapılandırabilirsiniz"
#: usr/local/www/carp_status.php:201
-#: usr/local/www/firewall_shaper_layer7.php:67
#: usr/local/www/firewall_virtual_ip.php:308 usr/local/www/interfaces.php:3490
#: usr/local/www/interfaces.php:3499 usr/local/www/status_queues.php:189
msgid "here"
@@ -6115,7 +6092,7 @@ msgstr "- Hata raporunu temizle ve anasayfaya geri dön"
#: usr/local/www/diag_dump_states_sources.php:66
#: usr/local/www/diag_gmirror.php:46 usr/local/www/diag_nanobsd.php:50
#: usr/local/www/diag_ndp.php:107 usr/local/www/diag_packet_capture.php:88
-#: usr/local/www/diag_patterns.php:63 usr/local/www/diag_ping.php:47
+#: usr/local/www/diag_ping.php:47
#: usr/local/www/diag_resetstate.php:65 usr/local/www/diag_routes.php:71
#: usr/local/www/diag_smart.php:18 usr/local/www/diag_sockets.php:45
#: usr/local/www/diag_states_summary.php:187 usr/local/www/diag_tables.php:45
@@ -6520,7 +6497,6 @@ msgstr "SNMP Sunucu"
#: usr/local/www/diag_backup.php:201 usr/local/www/fbegin.inc:132
#: usr/local/www/firewall_shaper.php:55
-#: usr/local/www/firewall_shaper_layer7.php:60
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:74
msgid "Traffic Shaper"
@@ -6912,7 +6888,6 @@ msgstr ""
#: usr/local/www/firewall_rules_edit.php:1738
#: usr/local/www/firewall_schedule_edit.php:1168
#: usr/local/www/firewall_shaper.php:351
-#: usr/local/www/firewall_shaper_layer7.php:566
#: usr/local/www/firewall_shaper_vinterface.php:319
#: usr/local/www/firewall_virtual_ip_edit.php:509
#: usr/local/www/interfaces.php:3379 usr/local/www/interfaces_assign.php:553
@@ -7827,7 +7802,6 @@ msgstr "Hedef"
#: usr/local/www/firewall_nat_out_edit.php:146
#: usr/local/www/firewall_nat_out_edit.php:513
#: usr/local/www/firewall_rules_edit.php:988
-#: usr/local/www/firewall_shaper_layer7.php:467
#: usr/local/www/interfaces_bridge_edit.php:310
#: usr/local/www/load_balancer_relay_action_edit.php:121
#: usr/local/www/load_balancer_relay_action_edit.php:425
@@ -7947,7 +7921,6 @@ msgstr "Genel"
#: usr/local/www/firewall_schedule.php:51
#: usr/local/www/firewall_schedule_edit.php:62
#: usr/local/www/firewall_shaper.php:55
-#: usr/local/www/firewall_shaper_layer7.php:60
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_wizards.php:74
#: usr/local/www/firewall_virtual_ip.php:203
@@ -8401,7 +8374,7 @@ msgstr "NOT: IE8 kullanıcıları uyumluluk görünümünü etkinleştirmelidir.
#: usr/local/www/diag_logs_ipsec.php:93
#, php-format
msgid "Last %s IPsec log entries"
-msgstr "IPSec son %s günlük girdisi"
+msgstr "IPsec son %s günlük girdisi"
#: usr/local/www/diag_logs_ntpd.php:87
#, php-format
@@ -9167,35 +9140,6 @@ msgstr "Paket Yakalama durdu."
msgid "Packets Captured:"
msgstr "Yakalanan Paket Sayısı:"
-#: usr/local/www/diag_patterns.php:43 usr/local/www/diag_patterns.php:85
-msgid "Upload Pattern file"
-msgstr "Desen dosyası yükle"
-
-#: usr/local/www/diag_patterns.php:49
-#, php-format
-msgid "Added custom l7 pattern %s"
-msgstr ""
-
-#: usr/local/www/diag_patterns.php:51
-msgid "Uploaded file to"
-msgstr "Yüklenen dosyanın konumu"
-
-#: usr/local/www/diag_patterns.php:54
-msgid "Warning: You must upload a file with .pat extension."
-msgstr "Uyarı: Yüklenecek dosya .pat uzantısında olmalıdır."
-
-#: usr/local/www/diag_patterns.php:63
-msgid "Add layer7 pattern"
-msgstr "Layer7 deseni ekle"
-
-#: usr/local/www/diag_patterns.php:74
-msgid "Upload layer7 pattern file"
-msgstr "Layer7 desen dosyası yükle"
-
-#: usr/local/www/diag_patterns.php:77
-msgid "File to upload:"
-msgstr "Yüklenecek dosya:"
-
#: usr/local/www/diag_pf_info.php:101
msgid "Gathering PF information, please wait..."
msgstr "PF bilgisi toplanıyor, lütfen bekleyiniz..."
@@ -9631,7 +9575,6 @@ msgid "entries in this table."
msgstr "girdileri sil."
#: usr/local/www/diag_tables.php:169
-#: usr/local/www/firewall_shaper_layer7.php:572
#: usr/local/www/services_dhcpv6.php:809
#: usr/local/www/system_firmware_restorefullbackup.php:164
msgid "Delete"
@@ -10272,7 +10215,6 @@ msgstr "Grup listesi değiştirildi."
#: usr/local/www/firewall_nat_npt.php:90
#: usr/local/www/firewall_nat_out.php:226
#: usr/local/www/firewall_shaper.php:406
-#: usr/local/www/firewall_shaper_layer7.php:402
#: usr/local/www/firewall_shaper_queues.php:189
#: usr/local/www/firewall_shaper_vinterface.php:386
#: usr/local/www/firewall_shaper_wizards.php:97
@@ -10694,7 +10636,6 @@ msgid "remove this entry"
msgstr "bu girdiyi sil"
#: usr/local/www/firewall_aliases_edit.php:843
-#: usr/local/www/firewall_shaper_layer7.php:556
#: usr/local/www/interfaces_groups_edit.php:322
#: usr/local/www/interfaces_qinq_edit.php:390
#: usr/local/www/services_dhcp.php:1197 usr/local/www/services_dhcpv6.php:817
@@ -10717,7 +10658,6 @@ msgstr "başka giriş ekle"
#: usr/local/www/firewall_rules_edit.php:1262
#: usr/local/www/firewall_rules_edit.php:1739
#: usr/local/www/firewall_schedule_edit.php:1169
-#: usr/local/www/firewall_shaper_layer7.php:569
#: usr/local/www/firewall_virtual_ip_edit.php:510
#: usr/local/www/interfaces.php:1856 usr/local/www/interfaces.php:1962
#: usr/local/www/interfaces.php:3380
@@ -12436,14 +12376,6 @@ msgstr ""
msgid "ID must be an integer"
msgstr "Kimlik değeri tamsayı olmalıdır"
-#: usr/local/www/firewall_rules_edit.php:526
-msgid "You can only select a layer7 container for TCP and/or UDP protocols"
-msgstr "Sadece TCP ve UDP protokolleri için layer7 barındırıcı seçilebilir"
-
-#: usr/local/www/firewall_rules_edit.php:528
-msgid "You can only select a layer7 container for Pass type rules."
-msgstr "Sadece İzin türü kurallar için layer7 barındırıcı seçilebilir."
-
#: usr/local/www/firewall_rules_edit.php:533
msgid ""
"You can only specify the maximum number of established connections per host "
@@ -12987,24 +12919,6 @@ msgstr "Alındılama kuyruğu/Kuyruk"
msgid "Choose the Acknowledge Queue only if you have selected Queue."
msgstr "Sadece Kuyruk seçtiyseniz Alındılama Kuyruğu'nu seçin."
-#: usr/local/www/firewall_rules_edit.php:1673
-#: usr/local/www/firewall_shaper.php:415
-#: usr/local/www/firewall_shaper_layer7.php:60
-#: usr/local/www/firewall_shaper_layer7.php:411
-#: usr/local/www/firewall_shaper_queues.php:198
-#: usr/local/www/firewall_shaper_vinterface.php:395
-#: usr/local/www/firewall_shaper_wizards.php:106
-msgid "Layer7"
-msgstr "Layer7"
-
-#: usr/local/www/firewall_rules_edit.php:1696
-msgid ""
-"Choose a Layer7 container to apply application protocol inspection rules. "
-"These are valid for TCP and UDP protocols only."
-msgstr ""
-"Uygulama protokolü inceleme kurallarını uygulamak için Layer7 barındırıcı "
-"seçiniz. Bu seçenekler sadece TCP ve UDP protokolleri için geçerlidir."
-
#: usr/local/www/firewall_schedule.php:78
#, php-format
msgid "Cannot delete Schedule. Currently in use by %s"
@@ -13222,7 +13136,6 @@ msgid "The traffic shaper configuration has been changed."
msgstr "Trafik şekillendirici yapılandırması değiştirildi."
#: usr/local/www/firewall_shaper.php:412
-#: usr/local/www/firewall_shaper_layer7.php:408
#: usr/local/www/firewall_shaper_queues.php:195
#: usr/local/www/firewall_shaper_vinterface.php:392
#: usr/local/www/firewall_shaper_wizards.php:103
@@ -13230,7 +13143,6 @@ msgid "By Interface"
msgstr "Arabirime Göre"
#: usr/local/www/firewall_shaper.php:413
-#: usr/local/www/firewall_shaper_layer7.php:409
#: usr/local/www/firewall_shaper_queues.php:196
#: usr/local/www/firewall_shaper_vinterface.php:393
#: usr/local/www/firewall_shaper_wizards.php:104
@@ -13238,7 +13150,6 @@ msgid "By Queue"
msgstr "Kuyruğa Göre"
#: usr/local/www/firewall_shaper.php:414
-#: usr/local/www/firewall_shaper_layer7.php:410
#: usr/local/www/firewall_shaper_queues.php:197
#: usr/local/www/firewall_shaper_vinterface.php:54
#: usr/local/www/firewall_shaper_vinterface.php:394
@@ -13247,7 +13158,6 @@ msgid "Limiter"
msgstr "Limitleyici"
#: usr/local/www/firewall_shaper.php:416
-#: usr/local/www/firewall_shaper_layer7.php:412
#: usr/local/www/firewall_shaper_queues.php:199
#: usr/local/www/firewall_shaper_vinterface.php:396
#: usr/local/www/firewall_shaper_wizards.php:74
@@ -13262,43 +13172,10 @@ msgstr "Sihirbazlar"
msgid "Remove Shaper"
msgstr "Şekillendiriciyi Kaldır"
-#: usr/local/www/firewall_shaper_layer7.php:67
-msgid "You can add new layer7 protocol patterns by simply uploading the file"
-msgstr "Dosyayı yükleyerek yeni layer7 protokol örüntüleri ekleyebilirsiniz"
-
-#: usr/local/www/firewall_shaper_layer7.php:112
-msgid "Layer7 Rules Container not found!"
-msgstr "Layer7 Kural Barındırıcısı bulunamadı!"
-
-#: usr/local/www/firewall_shaper_layer7.php:162
-msgid "Found the following repeated protocol definitions"
-msgstr "Şu tekrarlanan protokol tanımları tespit edildi"
-
-#: usr/local/www/firewall_shaper_layer7.php:402
#: usr/local/www/firewall_shaper_queues.php:189
msgid "The traffic shaper configuration has been changed"
msgstr "Trafik şekillendirme yapılandırması değiştirildi"
-#: usr/local/www/firewall_shaper_layer7.php:433
-msgid "Create new l7 rules group"
-msgstr "Yeni Layer7 kural grubu oluştur"
-
-#: usr/local/www/firewall_shaper_layer7.php:446
-msgid "Rule(s)"
-msgstr "Kural(lar)"
-
-#: usr/local/www/firewall_shaper_layer7.php:458
-msgid "Add one or more rules"
-msgstr "Bir yada daha fazla kural ekle"
-
-#: usr/local/www/firewall_shaper_layer7.php:474
-msgid "Structure"
-msgstr "Yapı"
-
-#: usr/local/www/firewall_shaper_layer7.php:481
-msgid "Behaviour"
-msgstr "Davranış"
-
#: usr/local/www/firewall_shaper_queues.php:173
msgid "Firewall: Shaper: By Queues View"
msgstr "Güvenlik Duvarı: Şekillendirici: Kuyruk Görünümü"
@@ -28711,7 +28588,7 @@ msgstr "HATA: Geçersiz yapılandırma alındı."
#: usr/local/www/vpn_ipsec.php:231 usr/local/www/vpn_ipsec_keys.php:92
#: usr/local/www/vpn_ipsec_mobile.php:331
msgid "The IPsec tunnel configuration has been changed"
-msgstr "IPSec tünel yapılandırması değiştirildi"
+msgstr "IPsec tünel yapılandırması değiştirildi"
#: usr/local/www/vpn_ipsec.php:238 usr/local/www/vpn_ipsec_keys.php:100
#: usr/local/www/vpn_ipsec_mobile.php:346
@@ -34278,7 +34155,7 @@ msgstr "rc.reboot için temel XMLRPC paketleyici."
#~ "değiştirmelisiniz"
#~ msgid "Mobile IPsec only supports Tunnel mode."
-#~ msgstr "Mobil IPSec yalnızca tünel modu destekler."
+#~ msgstr "Mobil IPsec yalnızca tünel modu destekler."
#~ msgid "Phase 1 is using IPv4. You cannot use Tunnel IPv6 on Phase 2."
#~ msgstr ""
diff --git a/src/usr/local/share/pbi-keys/pfSense-BETA.ssl b/src/usr/local/share/pbi-keys/pfSense-BETA.ssl
deleted file mode 100644
index 69ced3a..0000000
--- a/src/usr/local/share/pbi-keys/pfSense-BETA.ssl
+++ /dev/null
@@ -1,14 +0,0 @@
------BEGIN PUBLIC KEY-----
-MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvl/Zi/Lj5p4cofA9pCIg
-ylSFUNZAIrJHhWE4x1jHr43Ez24RbbNQu2BfsaOGaCOnxBDk6xRNHkxWjUdFQIkc
-0R5lTLDiOnuJLB4nbA1FjVdygIeiikYHPnTQO2zaBAHX0O2k/ywNds+4HeKpf29S
-7NtqIeePMt8MlSqXJdyopZynAa+EF53q/0ude9fzvpITOtSogaJ78jlr3mLQmLeF
-+flXBfV6sTe7bvVseFng+SuY8iAIsQqq58QrSlPcA7O2qNBlscqfJNFrZ2OCU4nZ
-7sXKqPWtIyZqCgH8XKv0ALwaDUt/F+XoAfod8kADXqhkIafx5dnbJ1ro0hffxi8Z
-SLia6heHvxLb2Ia9S7tteC3yaSa/Assq7anKefRpEDpSJFWTI+imdjHjteNpKrYz
-8WDPl5Rn3cOYgU1n73w+O9Km2VtO7Szhi6gh+EJ6+NXOmoUA4LHhVZYtfR3wFQtu
-jWazGigk3g0kXRh/wA7YLiLHbsgNT6zAnIk34UVx9agugYEUUjpsCAKUOxUSZNx7
-H0ow1zRNaE3cyMQAuxXy4opTnls9hiS5TpN1dstxviPgNj8/udykzJyeGFRVo5Tu
-iCcmBGizyK8n+9M1O5SAPpInukK5uR2sYYJhO8B8SOQTkbsBO55nip6wDQQx2ewE
-Rsvesuw3X/Mq/5hJ2DT8StkCAwEAAQ==
------END PUBLIC KEY-----
diff --git a/src/etc/inc/dot.hushlogin b/src/usr/local/share/pfSense/keys/pkg/revoked/.empty
index e69de29..e69de29 100644
--- a/src/etc/inc/dot.hushlogin
+++ b/src/usr/local/share/pfSense/keys/pkg/revoked/.empty
diff --git a/src/usr/local/share/pfSense/keys/pkg/trusted/beta.pfsense.org.20151223 b/src/usr/local/share/pfSense/keys/pkg/trusted/beta.pfsense.org.20151223
new file mode 100644
index 0000000..6a7f38b
--- /dev/null
+++ b/src/usr/local/share/pfSense/keys/pkg/trusted/beta.pfsense.org.20151223
@@ -0,0 +1,2 @@
+function: sha256
+fingerprint: 39a1374f4a4fc9a45d16c31dde75b6ef8511b6abfeb314d44fcb847bc9ea9a31
diff --git a/src/usr/local/share/pfSense/post_upgrade_command b/src/usr/local/share/pfSense/post_upgrade_command
index 4a63a31..1a3e968 100755
--- a/src/usr/local/share/pfSense/post_upgrade_command
+++ b/src/usr/local/share/pfSense/post_upgrade_command
@@ -5,7 +5,7 @@
PFSENSETYPE=`cat /etc/platform`
if [ "${PFSENSETYPE}" = "pfSense" -o "${PFSENSETYPE}" = "nanobsd" ]; then
- touch /conf/needs_package_sync
+ touch /conf/needs_package_sync_after_reboot
fi
if [ "${PFSENSETYPE}" = "nanobsd" ]; then
diff --git a/src/usr/local/share/pfSense/pre_upgrade_command b/src/usr/local/share/pfSense/pre_upgrade_command
index 2ad365f..d51637e 100644
--- a/src/usr/local/share/pfSense/pre_upgrade_command
+++ b/src/usr/local/share/pfSense/pre_upgrade_command
@@ -12,6 +12,37 @@ echo $PRIOR_VERSION > /tmp/pre_upgrade_version
# De-activate sync on the root slice only. This will not match NanoBSD since it already has sync,noatime
/usr/bin/sed -i '' 's/^\(\/.*[[:space:]]*\/[[:space:]]*ufs[[:space:]]*\)rw,sync\([[:space:]]*[[:digit:]][[:space:]]*[[:digit:]]\)$/\1rw\2/' /etc/fstab
+# Cleanup PBIs
+if which pbi_info >/dev/null 2>&1; then
+ for pbi in $(pbi_info); do
+ echo ">>> Removing PBI ${pbi} and all symlinks"
+ pbi_prefix=$(pbi_info ${pbi} | awk '$1 == "Prefix:" { print $2 }')
+ if [ ! -d "${pbi_prefix}" ]; then
+ continue
+ fi
+
+ for subdir in bin sbin; do
+ if [ ! -d "${pbi_prefix}/${subdir}" ]; then
+ continue
+ fi
+
+ for pbiopt in ${pbi_prefix}/${subdir}/*.pbiopt; do
+ link_name=$(awk '$1 == "TARGET:" { print $2 }' ${pbiopt})
+
+ if [ -z "${link_name}" ]; then
+ continue
+ fi
+
+ if [ -L /usr/local/${link_name} ]; then
+ rm -f /usr/local/${link_name}
+ fi
+ done
+ done
+
+ pbi_delete ${pbi}
+ done
+fi
+
# Hack to workaround ticket #3749
if [ ${PRIOR_VERSION} -le 8 ] && grep -q 'sh /etc/rc.reboot' /etc/rc.firmware; then
PROC=$(ps axwww | grep '/etc/rc.firmware *pfSenseupgrade')
@@ -54,5 +85,8 @@ if grep -q 'mtree *-PU' /etc/rc.firmware; then
fi
fi
+# Make sure /boot files are not protected with schg
+chflags -R noschg /boot >/dev/null 2>&1
+
rm /boot/kernel/*
diff --git a/src/usr/local/share/protocols/100bao.pat b/src/usr/local/share/protocols/100bao.pat
deleted file mode 100644
index a03a891..0000000
--- a/src/usr/local/share/protocols/100bao.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# 100bao - a Chinese P2P protocol/program - http://www.100bao.com
-# Pattern attributes: ok veryfast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/100Bao
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Pattern written by www.routerclub.com's wsgtrsys.
-# The author of this pattern says it works, but this is unconfirmed.
-
-100bao
-^\x01\x01\x05\x0a
-
diff --git a/src/usr/local/share/protocols/EAOrigin.pat b/src/usr/local/share/protocols/EAOrigin.pat
deleted file mode 100644
index 391be72..0000000
--- a/src/usr/local/share/protocols/EAOrigin.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# Origin powered by EA
-# zip? - Main Downloads for Games/Patches/Updates
-# User-Agents - Browsing the EA store.
-
-User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/534.34 (KHTML, like Gecko) Origin/9.2.1.4399 Safari/534.34 EA Download Manager
-User-Agent: Mozilla/5.0 EA Download Manager Origin
-zip?
diff --git a/src/usr/local/share/protocols/LICENSE b/src/usr/local/share/protocols/LICENSE
deleted file mode 100644
index 49395f6..0000000
--- a/src/usr/local/share/protocols/LICENSE
+++ /dev/null
@@ -1,605 +0,0 @@
-You may distribute this software under either the GPLv2 or Creative
-Commons Attribution-ShareAlike 2.5. The text of each follows:
-
-***************************************************************************
-
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- Appendix: How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) 19yy <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) 19yy name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
-
-***************************************************************************
-
- Creative Commons Legal Code
- Attribution-ShareAlike 2.5
-
- CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
- LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
- ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
- INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
- REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
- DAMAGES RESULTING FROM ITS USE.
-
- License
-
- THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
- CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS
- PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE
- WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS
- PROHIBITED.
-
- BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND
- AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS
- YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF
- SUCH TERMS AND CONDITIONS.
-
- 1. Definitions
- a. "Collective Work" means a work, such as a periodical issue,
- anthology or encyclopedia, in which the Work in its entirety in
- unmodified form, along with a number of other contributions,
- constituting separate and independent works in themselves, are
- assembled into a collective whole. A work that constitutes a
- Collective Work will not be considered a Derivative Work (as
- defined below) for the purposes of this License.
- b. "Derivative Work" means a work based upon the Work or upon the
- Work and other pre-existing works, such as a translation, musical
- arrangement, dramatization, fictionalization, motion picture
- version, sound recording, art reproduction, abridgment,
- condensation, or any other form in which the Work may be recast,
- transformed, or adapted, except that a work that constitutes a
- Collective Work will not be considered a Derivative Work for the
- purpose of this License. For the avoidance of doubt, where the
- Work is a musical composition or sound recording, the
- synchronization of the Work in timed-relation with a moving image
- ("synching") will be considered a Derivative Work for the purpose
- of this License.
- c. "Licensor" means the individual or entity that offers the Work
- under the terms of this License.
- d. "Original Author" means the individual or entity who created the
- Work.
- e. "Work" means the copyrightable work of authorship offered under
- the terms of this License.
- f. "You" means an individual or entity exercising rights under this
- License who has not previously violated the terms of this License
- with respect to the Work, or who has received express permission
- from the Licensor to exercise rights under this License despite a
- previous violation.
- g. "License Elements" means the following high-level license
- attributes as selected by Licensor and indicated in the title of
- this License: Attribution, ShareAlike.
-
- 2. Fair Use Rights. Nothing in this license is intended to reduce,
- limit, or restrict any rights arising from fair use, first sale or
- other limitations on the exclusive rights of the copyright owner under
- copyright law or other applicable laws.
-
- 3. License Grant. Subject to the terms and conditions of this License,
- Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
- perpetual (for the duration of the applicable copyright) license to
- exercise the rights in the Work as stated below:
- a. to reproduce the Work, to incorporate the Work into one or more
- Collective Works, and to reproduce the Work as incorporated in the
- Collective Works;
- b. to create and reproduce Derivative Works;
- c. to distribute copies or phonorecords of, display publicly, perform
- publicly, and perform publicly by means of a digital audio
- transmission the Work including as incorporated in Collective
- Works;
- d. to distribute copies or phonorecords of, display publicly, perform
- publicly, and perform publicly by means of a digital audio
- transmission Derivative Works.
- e. For the avoidance of doubt, where the work is a musical
- composition:
- i. Performance Royalties Under Blanket Licenses. Licensor waives
- the exclusive right to collect, whether individually or via a
- performance rights society (e.g. ASCAP, BMI, SESAC),
- royalties for the public performance or public digital
- performance (e.g. webcast) of the Work.
- ii. Mechanical Rights and Statutory Royalties. Licensor waives
- the exclusive right to collect, whether individually or via a
- music rights society or designated agent (e.g. Harry Fox
- Agency), royalties for any phonorecord You create from the
- Work ("cover version") and distribute, subject to the
- compulsory license created by 17 USC Section 115 of the US
- Copyright Act (or the equivalent in other jurisdictions).
- f. Webcasting Rights and Statutory Royalties. For the avoidance of
- doubt, where the Work is a sound recording, Licensor waives the
- exclusive right to collect, whether individually or via a
- performance-rights society (e.g. SoundExchange), royalties for the
- public digital performance (e.g. webcast) of the Work, subject to
- the compulsory license created by 17 USC Section 114 of the US
- Copyright Act (or the equivalent in other jurisdictions).
-
- The above rights may be exercised in all media and formats whether now
- known or hereafter devised. The above rights include the right to make
- such modifications as are technically necessary to exercise the rights
- in other media and formats. All rights not expressly granted by
- Licensor are hereby reserved.
-
- 4. Restrictions.The license granted in Section 3 above is expressly
- made subject to and limited by the following restrictions:
- a. You may distribute, publicly display, publicly perform, or
- publicly digitally perform the Work only under the terms of this
- License, and You must include a copy of, or the Uniform Resource
- Identifier for, this License with every copy or phonorecord of the
- Work You distribute, publicly display, publicly perform, or
- publicly digitally perform. You may not offer or impose any terms
- on the Work that alter or restrict the terms of this License or
- the recipients' exercise of the rights granted hereunder. You may
- not sublicense the Work. You must keep intact all notices that
- refer to this License and to the disclaimer of warranties. You may
- not distribute, publicly display, publicly perform, or publicly
- digitally perform the Work with any technological measures that
- control access or use of the Work in a manner inconsistent with
- the terms of this License Agreement. The above applies to the Work
- as incorporated in a Collective Work, but this does not require
- the Collective Work apart from the Work itself to be made subject
- to the terms of this License. If You create a Collective Work,
- upon notice from any Licensor You must, to the extent practicable,
- remove from the Collective Work any credit as required by clause
- 4(c), as requested. If You create a Derivative Work, upon notice
- from any Licensor You must, to the extent practicable, remove from
- the Derivative Work any credit as required by clause 4(c), as
- requested.
- b. You may distribute, publicly display, publicly perform, or
- publicly digitally perform a Derivative Work only under the terms
- of this License, a later version of this License with the same
- License Elements as this License, or a Creative Commons iCommons
- license that contains the same License Elements as this License
- (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy
- of, or the Uniform Resource Identifier for, this License or other
- license specified in the previous sentence with every copy or
- phonorecord of each Derivative Work You distribute, publicly
- display, publicly perform, or publicly digitally perform. You may
- not offer or impose any terms on the Derivative Works that alter
- or restrict the terms of this License or the recipients' exercise
- of the rights granted hereunder, and You must keep intact all
- notices that refer to this License and to the disclaimer of
- warranties. You may not distribute, publicly display, publicly
- perform, or publicly digitally perform the Derivative Work with
- any technological measures that control access or use of the Work
- in a manner inconsistent with the terms of this License Agreement.
- The above applies to the Derivative Work as incorporated in a
- Collective Work, but this does not require the Collective Work
- apart from the Derivative Work itself to be made subject to the
- terms of this License.
- c. If you distribute, publicly display, publicly perform, or publicly
- digitally perform the Work or any Derivative Works or Collective
- Works, You must keep intact all copyright notices for the Work and
- provide, reasonable to the medium or means You are utilizing: (i)
- the name of the Original Author (or pseudonym, if applicable) if
- supplied, and/or (ii) if the Original Author and/or Licensor
- designate another party or parties (e.g. a sponsor institute,
- publishing entity, journal) for attribution in Licensor's
- copyright notice, terms of service or by other reasonable means,
- the name of such party or parties; the title of the Work if
- supplied; to the extent reasonably practicable, the Uniform
- Resource Identifier, if any, that Licensor specifies to be
- associated with the Work, unless such URI does not refer to the
- copyright notice or licensing information for the Work; and in the
- case of a Derivative Work, a credit identifying the use of the
- Work in the Derivative Work (e.g., "French translation of the Work
- by Original Author," or "Screenplay based on original Work by
- Original Author"). Such credit may be implemented in any
- reasonable manner; provided, however, that in the case of a
- Derivative Work or Collective Work, at a minimum such credit will
- appear where any other comparable authorship credit appears and in
- a manner at least as prominent as such other comparable authorship
- credit.
-
- 5. Representations, Warranties and Disclaimer
-
- UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS
- THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND
- CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
- INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
- FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
- LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF
- ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW
- THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY
- TO YOU.
-
- 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY
- APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY
- LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR
- EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK,
- EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-
- 7. Termination
- a. This License and the rights granted hereunder will terminate
- automatically upon any breach by You of the terms of this License.
- Individuals or entities who have received Derivative Works or
- Collective Works from You under this License, however, will not
- have their licenses terminated provided such individuals or
- entities remain in full compliance with those licenses. Sections
- 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
- b. Subject to the above terms and conditions, the license granted
- here is perpetual (for the duration of the applicable copyright in
- the Work). Notwithstanding the above, Licensor reserves the right
- to release the Work under different license terms or to stop
- distributing the Work at any time; provided, however that any such
- election will not serve to withdraw this License (or any other
- license that has been, or is required to be, granted under the
- terms of this License), and this License will continue in full
- force and effect unless terminated as stated above.
-
- 8. Miscellaneous
- a. Each time You distribute or publicly digitally perform the Work or
- a Collective Work, the Licensor offers to the recipient a license
- to the Work on the same terms and conditions as the license
- granted to You under this License.
- b. Each time You distribute or publicly digitally perform a
- Derivative Work, Licensor offers to the recipient a license to the
- original Work on the same terms and conditions as the license
- granted to You under this License.
- c. If any provision of this License is invalid or unenforceable under
- applicable law, it shall not affect the validity or enforceability
- of the remainder of the terms of this License, and without further
- action by the parties to this agreement, such provision shall be
- reformed to the minimum extent necessary to make such provision
- valid and enforceable.
- d. No term or provision of this License shall be deemed waived and no
- breach consented to unless such waiver or consent shall be in
- writing and signed by the party to be charged with such waiver or
- consent.
- e. This License constitutes the entire agreement between the parties
- with respect to the Work licensed here. There are no
- understandings, agreements or representations with respect to the
- Work not specified here. Licensor shall not be bound by any
- additional provisions that may appear in any communication from
- You. This License may not be modified without the mutual written
- agreement of the Licensor and You.
-
- Creative Commons is not a party to this License, and makes no warranty
- whatsoever in connection with the Work. Creative Commons will not be
- liable to You or any party on any legal theory for any damages
- whatsoever, including without limitation any general, special,
- incidental or consequential damages arising in connection to this
- license. Notwithstanding the foregoing two (2) sentences, if Creative
- Commons has expressly identified itself as the Licensor hereunder, it
- shall have all rights and obligations of Licensor.
-
- Except for the limited purpose of indicating to the public that the
- Work is licensed under the CCPL, neither party will use the trademark
- "Creative Commons" or any related trademark or logo of Creative
- Commons without the prior written consent of Creative Commons. Any
- permitted use will be in compliance with Creative Commons'
- then-current trademark usage guidelines, as may be published on its
- website or otherwise made available upon request from time to time.
-
- Creative Commons may be contacted at http://creativecommons.org/.
diff --git a/src/usr/local/share/protocols/aim.pat b/src/usr/local/share/protocols/aim.pat
deleted file mode 100644
index 5c43930..0000000
--- a/src/usr/local/share/protocols/aim.pat
+++ /dev/null
@@ -1,28 +0,0 @@
-# AIM - AOL instant messenger (OSCAR and TOC)
-# Pattern attributes: good slow notsofast
-# Protocol groups: chat proprietary
-# Wiki: http://www.protocolinfo.org/wiki/AIM
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 5190
-#
-# This may also match ICQ traffic.
-#
-# This pattern has been tested and is believed to work well.
-
-aim
-# See http://gridley.res.carleton.edu/~straitm/final (and various other places)
-# The first bit matches OSCAR signon and data commands, but not sure what
-# \x03\x0b matches, but it works apparently.
-# The next three bits match various parts of the TOC signon process.
-# The third one is the magic number "*", then 0x01 for "signon", then up to four
-# bytes ("up to" because l7-filter strips out nulls) which contain a sequence
-# number (2 bytes) the data length (2 more) and 3 nulls (which don't count),
-# then 0x01 for the version number (not sure if there ever has been another
-# version)
-# The fourth one is a command string, followed by some stuff, then the
-# beginning of the "roasted" password
-
-# This pattern is too slow!
-
-^(\*[\x01\x02].*\x03\x0b|\*\x01.?.?.?.?\x01)|flapon|toc_signon.*0x
diff --git a/src/usr/local/share/protocols/aimwebcontent.pat b/src/usr/local/share/protocols/aimwebcontent.pat
deleted file mode 100644
index bc9a22d..0000000
--- a/src/usr/local/share/protocols/aimwebcontent.pat
+++ /dev/null
@@ -1,10 +0,0 @@
-# AIM web content - ads/news content downloaded by AOL Instant Messenger
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: chat document_retrieval proprietary
-# Wiki: http://www.protocolinfo.org/wiki/AIM
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-
-aimwebcontent
-user-agent:aim/
diff --git a/src/usr/local/share/protocols/any.pat b/src/usr/local/share/protocols/any.pat
deleted file mode 100644
index 56d8134..0000000
--- a/src/usr/local/share/protocols/any.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unknown - Dummy pattern for old unmatched connections.
-
-unknown
-# This pattern is ignored by the kernel. It sees that the "protocol" is
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# "unknown" and always returns unmatched for connections that are still
-# being tested.
-.
diff --git a/src/usr/local/share/protocols/applejuice.pat b/src/usr/local/share/protocols/applejuice.pat
deleted file mode 100644
index eb552dc..0000000
--- a/src/usr/local/share/protocols/applejuice.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# Apple Juice - P2P filesharing - http://www.applejuicenet.de
-# Pattern attributes: great veryfast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/AppleJuice
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested with the Linux version (version
-# 0,29,142,229). It matches search reqests and file transfers.
-
-applejuice
-# this pattern extracted from ipp2p, by Eicke Friedrich.
-^ajprot\x0d\x0a
diff --git a/src/usr/local/share/protocols/ares.pat b/src/usr/local/share/protocols/ares.pat
deleted file mode 100644
index 32dc70d..0000000
--- a/src/usr/local/share/protocols/ares.pat
+++ /dev/null
@@ -1,63 +0,0 @@
-# Ares - P2P filesharing - http://aresgalaxy.sf.net
-# Pattern attributes: good veryfast fast undermatch
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/Ares
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This pattern catches only client-server connect messages. This is
-# sufficient for blocking, but not for shaping, since it doesn't catch
-# the actual file transfers (see below).
-
-# Original pattern by Brandon Enright <bmenrigh at the server known as ucsd.edu>
-
-# This pattern has been tested with Ares 1.8.8.2998.
-
-ares
-# regular expression madness: "[]Z]" means ']' or 'Z'.
-^\x03[]Z].?.?\x05$
-
-# It appears that the general packet format is:
-# - Two byte little endian integer giving the data length
-# - One byte packet type
-# - data
-#
-# Login packets (TCP) have the following format:
-# - \x03\x00 (the length appears to always be 3)
-# - \x5a - The login packet type.
-# The source code suggests that for supernodes \x5d is used instead.
-# - Three more bytes. I don't know the meaning of these, but for me they
-# are always \x06\x06\x05 (in Ares 1.8.8.2998). From the comments in IPP2P,
-# it seems that they are not always exactly that, but seem to always end in
-# \x05.
-#
-# Search packets have the following format:
-# - Two byte little endian integer giving the data length
-# A single two letter word make this \x0a
-# The biggest I could get it was \x4f
-# - Packet type = \x09
-# - One byte document type:
-# - "all" = 00
-# - "audio" = 01
-# - "software" = 03
-# - "video" = 05
-# - "document" = 06
-# - "image" = 07
-# - "other" = 08
-# - \x0f - I don't know what this means, but it is always this for me
-# - Two bytes of unknown meaning that change
-# - Some number search words:
-# - \x14 - I don't know what this means, but it is always this for me
-# - One byte length of the first search word
-# Between 2 and \x14 in my tests with Ares 1.8.8.2998
-# It ignores single letter words and truncates ones longer than \x14
-# - Two bytes of unknown meaning that change
-# - The search word (not null terminated)
-# This was all investigated by searching for strings in "all". Searches
-# can also be performed in "title" and "author". I'm not going to
-# bother to research these because I new realize that searches are done
-# on the same TCP connection as the login packets, so there is no need
-# to match them separately.
-#
-# File transfers appear to be encrypted or at least obfuscated. (The
-# files themselves, at least, are not transmitted in the clear.) I
-# haven't found any patterns.
diff --git a/src/usr/local/share/protocols/armagetron.pat b/src/usr/local/share/protocols/armagetron.pat
deleted file mode 100644
index a032410..0000000
--- a/src/usr/local/share/protocols/armagetron.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# Armagetron Advanced - open source Tron/snake based multiplayer game
-# Pattern attributes: good slow notsofast
-# Protocol groups: open_source game
-# Wiki: http://protocolinfo.org/wiki/Armagetron
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# Contributed to protocolinfo.org, possibly by joda.bot, who says "The
-# filter matches the initial transfer of configuration data. Very early
-# versions might not transfer the CYCLE_ Settings (before 0.2.5.x)."
-
-armagetron
-YCLC_E|CYEL
diff --git a/src/usr/local/share/protocols/audiogalaxy.pat b/src/usr/local/share/protocols/audiogalaxy.pat
deleted file mode 100644
index db1999a..0000000
--- a/src/usr/local/share/protocols/audiogalaxy.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# Audiogalaxy - (defunct) Peer to Peer filesharing
-# Pattern attributes: ok fast fast
-# Protocol groups: p2p obsolete
-# Wiki: http://protocolinfo.org/wiki/Audiogalaxy
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# http://www.movspclr.co.uk/info/agprotocol.html
-#
-# This pattern is untested.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/Audiogalaxy
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-
-audiogalaxy
-# (magic cookie that starts conversations)|(magic cookie that starts
-# 0.606W/0.608W client/server conversations and a string that should always
-# appear in login messages)
-^(\x45\x5f\xd0\xd5|\x45\x5f.*0.60(6|8)W)
diff --git a/src/usr/local/share/protocols/battlefield1942.pat b/src/usr/local/share/protocols/battlefield1942.pat
deleted file mode 100644
index ed7a7bf..0000000
--- a/src/usr/local/share/protocols/battlefield1942.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# Battlefield 1942 - An EA game
-# Pattern attributes: ok veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Battlefield_1942
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Contributed by Myles Uyema <mylesuyema AT gmail.com>
-#
-# This pattern has only been tested by one person.
-
-# tested on two original EA battlefield 1942 servers
-# matches the first two packets of joining a server
-battlefield1942
-^\x01\x11\x10\|\xf8\x02\x10\x40\x06
diff --git a/src/usr/local/share/protocols/battlefield2.pat b/src/usr/local/share/protocols/battlefield2.pat
deleted file mode 100644
index e2d8791..0000000
--- a/src/usr/local/share/protocols/battlefield2.pat
+++ /dev/null
@@ -1,26 +0,0 @@
-# Battlefield 2 - An EA game.
-# Pattern attributes: ok slow notsofast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Battlefield_2
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is unconfirmed except implicitly by a comment on protocolinfo.
-
-battlefield2
-# gameplay|account-login|server browsing/information
-# See http://protocolinfo.org/wiki/Battlefield_2
-# Can we put a ^ on the last branch? If so, nosofast --> veryfast
-
-# 193.85.217.35 on protocolinfo says:
-# The first part of the pattern, \x11\x20\x01\xa0\x98\x11, has to be
-# modified for different version of Battlefield 2. The gameplay part of
-# pattern for BF2 v1.4 is \x11\x20\x01\x30\xb9\x10\x11, and for BF2
-# v1.41 is \x11\x20\x01\x50\xb9\x10\x11
-#
-# Rather than put all of those in, I've just gone with "...?" in the
-# middle.
-
-^(\x11\x20\x01...?\x11|\xfe\xfd.?.?.?.?.?.?(\x14\x01\x06|\xff\xff\xff))|[]\x01].?battlefield2
-
-# Pattern prior to 193.85.217.35's comment on protocolinfo:
-#^(\x11\x20\x01\xa0\x98\x11|\xfe\xfd.?.?.?.?.?.?(\x14\x01\x06|\xff\xff\xff))|[]\x01].?battlefield2
diff --git a/src/usr/local/share/protocols/battlefield2142.pat b/src/usr/local/share/protocols/battlefield2142.pat
deleted file mode 100644
index 4c0e42b..0000000
--- a/src/usr/local/share/protocols/battlefield2142.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# Battlefield 2142 - An EA game.
-# Pattern attributes: ok fast fast
-# Protocol groups: proprietary game
-# Wiki: http://protocolinfo.org/wiki/Battlefield_2142
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# Submitted by Telsin. Not confirmed.
-
-battlefield2142
-# gameplay|account-login|server browsing/information
-# Can't put a ^ on the last branch: it fails to match if you do.
-# This branch seems to matter very rarely, though
-^(\x11\x20\x01\x90\x50\x64\x10|\xfe\xfd.?.?.?\x18|[\x01\\].?battlefield2)
-
diff --git a/src/usr/local/share/protocols/bgp.pat b/src/usr/local/share/protocols/bgp.pat
deleted file mode 100644
index 61e417f..0000000
--- a/src/usr/local/share/protocols/bgp.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# BGP - Border Gateway Protocol - RFC 1771
-# Pattern attributes: ok veryfast fast
-# Protocol groups: networking ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/BGP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is UNTESTED.
-
-bgp
-# "After a transport protocol connection is established, the first
-# message sent by each side is an OPEN message."
-# "If the Type of the message is OPEN, or if the Authentication Code used
-# in the OPEN message of the connection is zero, then the Marker must be
-# all ones."
-# Then the 2 byte length field, then the 1 byte type field (1 = OPEN).
-# Then the BGP version: 3 was RFC'd in 1991, 4 was RFC'd in 1995.
-# Could keep going, but that should be sufficient.
-^\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff..?\x01[\x03\x04]
-
diff --git a/src/usr/local/share/protocols/biff.pat b/src/usr/local/share/protocols/biff.pat
deleted file mode 100644
index 91e8bbf..0000000
--- a/src/usr/local/share/protocols/biff.pat
+++ /dev/null
@@ -1,16 +0,0 @@
-# Biff - new mail notification
-# Pattern attributes: good fast fast undermatch overmatch
-# Protocol groups: mail
-# Wiki: http://www.protocolinfo.org/wiki/Biff
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 512
-#
-# This pattern is completely untested.
-
-biff
-# This is a rare case where we will specify a $ (end of line), since
-# this is the entirety of the communication.
-# something that looks like a username, an @, a number.
-# won't catch usernames that have strange characters in them.
-^[a-z][a-z0-9]+@[1-9][0-9]+$
diff --git a/src/usr/local/share/protocols/bittorrent.pat b/src/usr/local/share/protocols/bittorrent.pat
deleted file mode 100644
index c66f867..0000000
--- a/src/usr/local/share/protocols/bittorrent.pat
+++ /dev/null
@@ -1,25 +0,0 @@
-# Bittorrent - P2P filesharing / publishing tool - http://www.bittorrent.com
-# Pattern attributes: good slow notsofast undermatch
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/Bittorrent
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-# It will, however, not work on bittorrent streams that are encrypted, since
-# it's impossible to match (well) encrypted data.
-
-bittorrent
-
-# Does not attempt to match the HTTP download of the tracker
-# 0x13 is the length of "bittorrent protocol"
-# Second two bits match UDP wierdness
-# Next bit matches something Azureus does
-# Ditto on the next bit. Could also match on "user-agent: azureus", but that's in the next
-# packet and perhaps this will match multiple clients.
-# bitcomet-specific strings contributed by liangjun.
-
-# This is not a valid GNU basic regular expression (but that's ok).
-^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=|get /announce\?info_hash=|get /client/bitcomet/|GET /data\?fid=)|d1:ad2:id20:|\x08'7P\)[RP]
-
-# This pattern is "fast", but won't catch as much
-#^(\x13bittorrent protocol|azver\x01$|get /scrape\?info_hash=)
diff --git a/src/usr/local/share/protocols/chikka.pat b/src/usr/local/share/protocols/chikka.pat
deleted file mode 100644
index a97ef28..0000000
--- a/src/usr/local/share/protocols/chikka.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# Chikka - SMS service which can be used without phones - http://chikka.com
-# Pattern attributes: good fast fast superset
-# Protocol groups: proprietary chat
-# Wiki: http://www.protocolinfo.org/wiki/Chikka
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# Tested with Chikka Javalite on 14 Jan 2007.
-# The login and chat use the same TCP connection.
-
-# "Kamusta" means "Hello" in Tagalog, apparently, so that will probably
-# stay the same. I've only seen v1.2, but I've given it some leeway for
-# past and future versions.
-
-# Chikka uses CIMD as part of the login process, see cimd.pat
-
-chikka
-^CTPv1\.[123] Kamusta.*\x0d\x0a$
diff --git a/src/usr/local/share/protocols/cimd.pat b/src/usr/local/share/protocols/cimd.pat
deleted file mode 100644
index f508350..0000000
--- a/src/usr/local/share/protocols/cimd.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# Computer Interface to Message Distribution, an SMSC protocol by Nokia
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: proprietary chat
-# Wiki: http://www.protocolinfo.org/wiki/CIMD
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# I don't know whether CIMD is ever found by itself in a TCP connection.
-# I have only seen it myself as part of the Chikka login process, in
-# which the second and third packets (at least) are CIMD. So I am not
-# using a '^' at the beginning.
-#
-# This pretty well explains the pattern:
-# http://en.wikipedia.org/w/index.php?title=CIMD&oldid=42707583
-# However, Chikka does NOT terminate the last field with a tab.
-#
-# Tested with Chikka Javalite on 14 Jan 2007.
-
-cimd
-\x02[0-4][0-9]:[0-9]+.*\x03$
diff --git a/src/usr/local/share/protocols/ciscovpn.pat b/src/usr/local/share/protocols/ciscovpn.pat
deleted file mode 100644
index d3dd7a6..0000000
--- a/src/usr/local/share/protocols/ciscovpn.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# Cisco VPN - VPN client software to a Cisco VPN server
-# Pattern attributes: ok veryfast fast
-# Protocol groups: remote_access proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Cisco_VPN
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern contributed by Myles Uyema <myles AT uyema.net>
-
-ciscovpn
-^\x01\xf4\x01\xf4
-
diff --git a/src/usr/local/share/protocols/citrix.pat b/src/usr/local/share/protocols/citrix.pat
deleted file mode 100644
index fa73ce1..0000000
--- a/src/usr/local/share/protocols/citrix.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# Citrix ICA - proprietary remote desktop application - http://citrix.com
-# Pattern attributes: marginal notsofast notsofast
-# Protocol groups: remote_access proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Citrix
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is UNTESTED.
-
-# This is based on decode_citrix in dsniff 2.4.
-
-citrix
-\x32\x26\x85\x92\x58
diff --git a/src/usr/local/share/protocols/code_red.pat b/src/usr/local/share/protocols/code_red.pat
deleted file mode 100644
index df0beee..0000000
--- a/src/usr/local/share/protocols/code_red.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# Code Red - a worm that attacks Microsoft IIS web servers
-# Pattern attributes: ok fast notsofast subset
-# Protocol groups: worm
-# Wiki: http://www.protocolinfo.org/wiki/CodeRed
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-code_red
-/default\.ida\?NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=a
diff --git a/src/usr/local/share/protocols/counterstrike-source.pat b/src/usr/local/share/protocols/counterstrike-source.pat
deleted file mode 100644
index 8ebd627..0000000
--- a/src/usr/local/share/protocols/counterstrike-source.pat
+++ /dev/null
@@ -1,42 +0,0 @@
-# Counterstrike (using the new "Source" engine) - network game
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Counter-Strike
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# By adam.randazzoATgmail.com
-
-counterstrike-source
-^\xff\xff\xff\xff.*cstrikeCounter-Strike
-
-# These games use Steam, which is developed by Valve Software.
-#
-# This was based off of the following captured data from ethereal:
-# --Source--
-# 0000 00 11 09 2a a8 79 00 13 10 2c 3f d7 08 00 45 20 ...*.y...,?...E
-# 0010 00 72 b9 f6 00 00 6b 11 b6 78 18 0e 04 cc c0 a8 .r....k..x......
-# 0020 01 6a 69 87 04 65 00 5e 01 ac ff ff ff ff 49 07 .ji..e.^......I.
-# 0030 54 4a 27 73 20 50 6c 61 63 65 20 6f 66 20 50 61 TJ's Place of Pa
-# 0040 69 6e 00 64 65 5f 70 69 72 61 6e 65 73 69 00 63 in.de_piranesi.c
-# 0050 73 74 72 69 6b 65 00 43 6f 75 6e 74 65 72 2d 53 strike.Counter-S
-# 0060 74 72 69 6b 65 3a 20 53 6f 75 72 63 65 00 dc 00 trike: Source...
-# 0070 08 10 06 64 77 00 00 31 2e 30 2e 30 2e 31 38 00 ...dw..1.0.0.18.
-# 0080
-#
-# --1.6--
-# 0000 00 11 09 2a a8 79 00 13 10 2c 3f d7 08 00 45 00 ...*.y...,?...E.
-# 0010 00 8e c4 1a 00 00 76 11 b3 85 08 09 02 fa c0 a8 ......v.........
-# 0020 01 14 69 91 04 37 00 7a c9 90 ff ff ff ff 6d 38 ..i..7.z......m8
-# 0030 2e 39 2e 32 2e 32 35 30 3a 32 37 30 32 35 00 49 .9.2.250:27025.I
-# 0040 50 20 2d 20 43 6c 61 6e 20 73 65 72 76 65 72 00 P - Clan server.
-# 0050 64 65 5f 64 75 73 74 32 00 63 73 74 72 69 6b 65 de_dust2.cstrike
-# 0060 00 43 6f 75 6e 74 65 72 2d 53 74 72 69 6b 65 00 .Counter-Strike.
-# 0070 0a 0c 2f 64 77 00 01 77 77 77 2e 63 6f 75 6e 74 ../dw..www.count
-# 0080 65 72 2d 73 74 72 69 6b 65 2e 6e 65 74 00 00 00 er-strike.net...
-# 0090 01 00 00 00 00 9e f7 0a 00 01 00 00 ............
-
-
-# Old pattern. (Adam Randazzo says "CS 1.6 and CS: Source are the
-# only two versions that are playable on the Internet since Valve
-# disabled the WON system in favor of steam.")
-# cs .*dl.www.counter-strike.net
diff --git a/src/usr/local/share/protocols/cvs.pat b/src/usr/local/share/protocols/cvs.pat
deleted file mode 100644
index fc084d3..0000000
--- a/src/usr/local/share/protocols/cvs.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# CVS - Concurrent Versions System
-# Pattern attributes: good veryfast fast
-# Protocol groups: version_control open_source
-# Wiki: http://www.protocolinfo.org/wiki/CVS
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-cvs
-
-# Matches pserver login. AUTH is for actually starting the protocol
-# VERIFICATION is for authenticating without starting the protocols
-# and GSSAPI is for using security services such as kerberos.
-# http://www.loria.fr/~molli/cvs/doc/cvsclient_3.html
-
-^BEGIN (AUTH|VERIFICATION|GSSAPI) REQUEST\x0a
diff --git a/src/usr/local/share/protocols/dayofdefeat-source.pat b/src/usr/local/share/protocols/dayofdefeat-source.pat
deleted file mode 100644
index 42b24bb..0000000
--- a/src/usr/local/share/protocols/dayofdefeat-source.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# Day of Defeat: Source - game (Half-Life 2 mod) - http://www.valvesoftware.com
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Day_of_Defeat:Source
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# By Clayton Macleod <cherry twist at gmail dot com>
-
-dayofdefeat-source
-^\xff\xff\xff\xff.*dodDay of Defeat
-
diff --git a/src/usr/local/share/protocols/dazhihui.pat b/src/usr/local/share/protocols/dazhihui.pat
deleted file mode 100644
index 032440c..0000000
--- a/src/usr/local/share/protocols/dazhihui.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# Dazhihui - stock analysis and trading; Chinese - http://www.gw.com.cn
-# Pattern attributes: fast fast ok
-# Protocol groups:
-# Wiki: http://www.protocolinfo.org/wiki/Dazhihui
-# Copyright (C) 2009 Matthew Strait; See ../LICENSE
-
-# Pattern contributed by liangjun without comment.
-
-dazhihui
-^(longaccoun|qsver2auth|\x35[57]\x30|\+\x10\*)
-
diff --git a/src/usr/local/share/protocols/dhcp.pat b/src/usr/local/share/protocols/dhcp.pat
deleted file mode 100644
index 426480d..0000000
--- a/src/usr/local/share/protocols/dhcp.pat
+++ /dev/null
@@ -1,36 +0,0 @@
-# DHCP - Dynamic Host Configuration Protocol - RFC 1541
-# Pattern attributes: good veryfast fast
-# Protocol groups: networking ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/DHCP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on ports 67 (server) and 68 (client)
-#
-# Also matches BOOTP (Bootstrap Protocol (RFC 951)) in the case that
-# the "vendor specific options" are used (these options were made standard
-# for DHCP).
-#
-# This pattern is lightly tested.
-
-dhcp
-^[\x01\x02][\x01- ]\x06.*c\x82sc
-
-# Let's break that down:
-#
-# (\x01|\x02) is for BOOTREQUEST or BOOTREPLY
-# Is there a demand for doing these separately? The Packeteer does.
-#
-# [\x01-\x20] is for any of the hardware address types listed at
-# (http://www.iana.org/assignments/arp-parameters) and hopefully faster
-# ethernets too (100, 1000 and 10000mb) as well (do they share the 10mb
-# number?).
-#
-# \x06 for "hardware address length = 6 bytes". Does anyone use other lengths
-# these days? If so, this pattern won't match it as it stands.
-#
-# .* covers the hops, xid, secs, flags, ciaddr, yiaddr, siaddr, giaddr,
-# chaddr, sname and file fields. While this can't really be "any number
-# of characters" long, it doesn't seem worth it to count.
-# Can we make this more specific by restricting the number of hops or seconds?
-#
-# 0x63825363 is the "magic cookie" which begins the DHCP options field.
diff --git a/src/usr/local/share/protocols/directconnect.pat b/src/usr/local/share/protocols/directconnect.pat
deleted file mode 100644
index 13be4a1..0000000
--- a/src/usr/local/share/protocols/directconnect.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# Direct Connect - P2P filesharing - http://www.neo-modus.com
-# Pattern attributes: good fast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Direct_Connect
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Direct Connect "hubs" listen on port 411
-# http://www.dcpp.net/wiki/
-# I've verified that this pattern can be used to limit direct connect
-# bandwidth using DC:PRO 0.2.3.149R11.
-
-directconnect
-# client-to-client handshake|client-to-hub login, hub speaking|client-to-hub login, client speaking
-^(\$mynick |\$lock |\$key )
diff --git a/src/usr/local/share/protocols/dns.pat b/src/usr/local/share/protocols/dns.pat
deleted file mode 100644
index c351831..0000000
--- a/src/usr/local/share/protocols/dns.pat
+++ /dev/null
@@ -1,63 +0,0 @@
-# DNS - Domain Name System - RFC 1035
-# Pattern attributes: great slow fast
-# Protocol groups: networking ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/DNS
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# Thanks to Sebastien Bechet <s.bechet AT av7.net> for TLD detection
-# improvements
-
-# While RFC 2181 says "Occasionally it is assumed that the Domain Name
-# System serves only the purpose of mapping Internet host names to data,
-# and mapping Internet addresses to host names. This is not correct, the
-# DNS is a general (if somewhat limited) hierarchical database, and can
-# store almost any kind of data, for almost any purpose.", we will assume
-# just that, because that represents the vast majority of DNS traffic.
-
-# The packet starts with a 2 byte random ID number and 2 bytes of flags that
-# aren't easy to match on.
-
-# The first thing that is matchable is QDCOUNT, the number of queries.
-# Despite the fact that you can apparently ask for up to 65535
-# things at a time, usually you only ask for one and I doubt you ever ask for
-# zero. Let's allow up to two, just in case (even though I can't find any
-# situation that generates more than one).
-
-# Next comes the ANCOUNT, NSCOUNT, and ARCOUNT fields, which could be null
-# or some smallish number, not matchable except by length (up to 6)
-
-# The next matchable thing is the query address. The first byte indicates the
-# length of the first part of the address, which is limited to 63 (0x3F == '?').
-# The next byte has to be a letter (for domain names) or number (for reverse lookups).
-# Then there can be an combination of
-# letters, digits, hyphens, and 0x01-0x3F length markers.
-# Then we check for the presence of a top-level-domain at some later point.
-# This is indicated by a 0x02-0x06 and at least two letters, followed by no
-# more than four more letters.
-# Note that this will miss a very few queries that are for a TLD alone.
-# i.e. "host museum" (195.7.77.17)
-#
-# http://www.icann.org/tlds http://www.iana.org/cctld/cctld-whois.htm
-
-# next is the QTYPE field, which has valid values 1-16 (although this
-# could probably be restricted further since many are rare) and \x1c for
-# IPv6 (and maybe more?). It should follow immediately after the TLD
-# (and some stripped-out nulls)
-
-# next is QCLASS, which has valid values 1-4 and 255, except 2 is never used.
-# I'm not sure if 3 and 4 are used, so I'll include them. 1=Internet 255=any
-
-# If we wanted to match queries and responses separately, there could be
-# more specifics after this for the responses.
-
-dns
-# here's a sane way of doing it
-^.?.?.?.?[\x01\x02].?.?.?.?.?.?[\x01-?][a-z0-9][\x01-?a-z]*[\x02-\x06][a-z][a-z][fglmoprstuvz]?[aeop]?(um)?[\x01-\x10\x1c][\x01\x03\x04\xFF]
-
-# This way assumes that TLDs are any alpha string 2-6 characters long.
-# If TLDs are added, this is a good fallback.
-#^.?.?.?.?[\x01\x02].?.?.?.?.?.?[\x01-?][a-z0-9][\x01-?a-z]*[\x02-\x06][a-z][a-z][a-z]?[a-z]?[a-z]?[a-z]?[\x01-\x10][\x01\x03\x04\xFF]
-
-# If you have more processing power than me, you can substitute this for
-# the [a-z][a-z][a-z]?[a-z]?[a-z]?[a-z]?
-#(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|arpa|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|fi|fj|fk|fm|fo|fr|ga|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)
diff --git a/src/usr/local/share/protocols/doom3.pat b/src/usr/local/share/protocols/doom3.pat
deleted file mode 100644
index 7d32d6f..0000000
--- a/src/usr/local/share/protocols/doom3.pat
+++ /dev/null
@@ -1,10 +0,0 @@
-# Doom 3 - computer game
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Doom
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Thanks to Clayton Macleod (cherrytwist at gmail.com).
-
-doom3
-^\xff\xffchallenge
diff --git a/src/usr/local/share/protocols/edonkey.pat b/src/usr/local/share/protocols/edonkey.pat
deleted file mode 100644
index bc2522e..0000000
--- a/src/usr/local/share/protocols/edonkey.pat
+++ /dev/null
@@ -1,37 +0,0 @@
-# eDonkey2000 - P2P filesharing - http://edonkey2000.com and others
-# Pattern attributes: good fast fast overmatch
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/EDonkey
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Tested recently (April/May 2006) with eMule 0.47a and eDonkey2000 1.4
-# and a long time ago with something else.
-#
-# In addition to matching what you might expect, this matches much of
-# what eMule does when you tell it to only connect to the KAD network.
-# I don't quite know what to make of this.
-
-# Thanks to Matt Skidmore <fox AT woozle.org>
-
-edonkey
-
-# http://gd.tuwien.ac.at/opsys/linux/sf/p/pdonkey/eDonkey-protocol-0.6
-#
-# In addition to \xe3, \xc5 and \xd4, I see a lot of \xe5.
-# As of April 2006, I also see some \xe4.
-#
-# God this is a mess. What an irritating protocol.
-# This will match about 2% of streams with random data in them!
-# (But fortunately much fewer than 2% of streams that are other protocols.
-# You can test this with the data in ../testing/)
-
-^[\xc5\xd4\xe3-\xe5].?.?.?.?([\x01\x02\x05\x14\x15\x16\x18\x19\x1a\x1b\x1c\x20\x21\x32\x33\x34\x35\x36\x38\x40\x41\x42\x43\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58[\x60\x81\x82\x90\x91\x93\x96\x97\x98\x99\x9a\x9b\x9c\x9e\xa0\xa1\xa2\xa3\xa4]|\x59................?[ -~]|\x96....$)
-
-# matches everything and too much
-# ^(\xe3|\xc5|\xd4)
-
-# ipp2p essentially uses "\xe3....\x47", which doesn't seem at all right to me.
-
-# bandwidtharbitrator uses
-# e0.*@.*6[a-z].*p$|e0.*@.*[a-z]6[a-z].*p0$|e.*@.*[0-9]6.*p$|emule|edonkey
-# no comments to explain what all the mush is, of course...
diff --git a/src/usr/local/share/protocols/exe.pat b/src/usr/local/share/protocols/exe.pat
deleted file mode 100644
index 0a16e2a..0000000
--- a/src/usr/local/share/protocols/exe.pat
+++ /dev/null
@@ -1,20 +0,0 @@
-# Executable - Microsoft PE file format.
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# Thanks to Brandon Enright [bmenrighATucsd.edu]
-
-# This pattern doesn't techincally match the PE file format but rather the
-# MZ stub program Microsoft uses for backwards compatibility with DOS.
-# That means this will correctly match DOS executables too.
-
-exe
-# There are two different stubs used depending on the compiler/packer.
-# Numerous NULL bytes have been stripped from this pattern.
-
-# This pattern may be more efficient:
-# \x4d\x5a\x90\x03\x04|\x4d\x5a\x50\x02\x04
-
-# This is easier to understand:
-\x4d\x5a(\x90\x03|\x50\x02)\x04
diff --git a/src/usr/local/share/protocols/fasttrack.pat b/src/usr/local/share/protocols/fasttrack.pat
deleted file mode 100644
index 6ed8ff1..0000000
--- a/src/usr/local/share/protocols/fasttrack.pat
+++ /dev/null
@@ -1,23 +0,0 @@
-# FastTrack - P2P filesharing (Kazaa, Morpheus, iMesh, Grokster, etc)
-# Pattern attributes: good slow notsofast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Fasttrack
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Tested with Kazaa Lite Resurrection 0.0.7.6F
-#
-# This appears to match the download connections well, but not the search
-# connections (I think they are encrypted :-( ).
-
-fasttrack
-# while this is a valid http request, this will be caught because
-# the http pattern matches the response (and therefore the next packet)
-# Even so, it's best to put this match earlier in the chain.
-# http://cvs.berlios.de/cgi-bin/viewcvs.cgi/gift-fasttrack/giFT-FastTrack/PROTOCOL?rev=HEAD&content-type=text/vnd.viewcvs-markup
-
-# This pattern is kinda slow, but not too bad.
-^get (/.download/[ -~]*|/.supernode[ -~]|/.status[ -~]|/.network[ -~]*|/.files|/.hash=[0-9a-f]*/[ -~]*) http/1.1|user-agent: kazaa|x-kazaa(-username|-network|-ip|-supernodeip|-xferid|-xferuid|tag)|^give [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]?[0-9]?[0-9]?
-
-# This isn't much faster:
-#^get (/.download/.*|/.supernode.|/.status.|/.network.*|/.files|/.hash=[0-9a-f]*/.*) http/1.1|user-agent: kazaa|x-kazaa(-username|-network|-ip|-supernodeip|-xferid|-xferuid|tag)|^give [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]?[0-9]?[0-9]?
-
diff --git a/src/usr/local/share/protocols/finger.pat b/src/usr/local/share/protocols/finger.pat
deleted file mode 100644
index f567f8c..0000000
--- a/src/usr/local/share/protocols/finger.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# Finger - User information server - RFC 1288
-# Pattern attributes: good slow slow undermatch overmatch
-# Protocol groups: ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/Finger
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 79
-#
-# This pattern is lightly tested.
-
-finger
-# The first matches the client request, which should look like a username.
-# The second matches the usual UNIX reply (but remember that they are
-# allowed to say whatever they want)
-^[a-z][a-z0-9\-_]+\x0d\x0a|login: [\x09-\x0d -~]* name: [\x09-\x0d -~]* Directory:
diff --git a/src/usr/local/share/protocols/flash.pat b/src/usr/local/share/protocols/flash.pat
deleted file mode 100644
index 23e5d74..0000000
--- a/src/usr/local/share/protocols/flash.pat
+++ /dev/null
@@ -1,18 +0,0 @@
-# Flash - Macromedia Flash.
-# Pattern attributes: good slow notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# Thanks to Brandon Enright {bmenrigh AT ucsd.edu} and chinalantian at
-# 126 dot com
-
-# Macromedia spec:
-# http://download.macromedia.com/pub/flash/flash_file_format_specification.pdf
-# See also:
-# http://www.digitalpreservation.gov/formats/fdd/fdd000130.shtml
-# http://osflash.org/flv
-
-flash
-# FWS = uncompressed, CWS = compressed, next byte is version number
-# FLV = video
-[FC]WS[\x01-\x09]|FLV\x01\x05\x09
diff --git a/src/usr/local/share/protocols/freenet.pat b/src/usr/local/share/protocols/freenet.pat
deleted file mode 100644
index c62ad57..0000000
--- a/src/usr/local/share/protocols/freenet.pat
+++ /dev/null
@@ -1,10 +0,0 @@
-# Freenet - Anonymous information retrieval - http://freenetproject.org
-# Pattern attributes: poor veryfast fast
-# Protocol groups: p2p document_retrieval open_source
-# Wiki: http://www.protocolinfo.org/wiki/Freenet
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-freenet
-# Freenet is intentionally hard to identify...
-# This is empirical, only tested on one computer, and unlikely to work anymore.
-^\x01[\x08\x09][\x03\x04]
diff --git a/src/usr/local/share/protocols/ftp.pat b/src/usr/local/share/protocols/ftp.pat
deleted file mode 100644
index 44d97c4..0000000
--- a/src/usr/local/share/protocols/ftp.pat
+++ /dev/null
@@ -1,46 +0,0 @@
-# FTP - File Transfer Protocol - RFC 959
-# Pattern attributes: great notsofast fast
-# Protocol groups: document_retrieval ietf_internet_standard
-# Wiki: http://protocolinfo.org/wiki/FTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 21. Note that the data stream is on a dynamically
-# assigned port, which means that you will need the FTP connection
-# tracking module in your kernel to usefully match FTP data transfers.
-#
-# This pattern is well tested.
-#
-# Handles the first two things a server should say:
-#
-# First, the server says it's ready by sending "220". Most servers say
-# something after 220, even though they don't have to, and it usually
-# includes the string "ftp" (l7-filter is case insensitive). This
-# includes proftpd, vsftpd, wuftpd, warftpd, pureftpd, Bulletproof FTP
-# Server, and whatever ftp.microsoft.com uses. Almost all servers use only
-# ASCII printable characters between the "220" and the "FTP", but non-English
-# ones might use others.
-#
-# The next thing the server sends is a 331. All the above servers also
-# send something including "password" after this code. By default, we
-# do not match on this because it takes another packet and is more work
-# for regexec.
-
-ftp
-# by default, we allow only ASCII
-^220[\x09-\x0d -~]*ftp
-
-# This covers UTF-8 as well
-#^220[\x09-\x0d -~\x80-\xfd]*ftp
-
-# This allows any characters and is about 4x faster than either of the above
-# (which are about the same as each other)
-#^220.*ftp
-
-# This is much slower
-#^220[\x09-\x0d -~]*ftp|331[\x09-\x0d -~]*password
-
-# This pattern is more precise, but takes longer to match. (3 packets vs. 1)
-#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a331
-
-# same as above, but slightly less precise and only takes 2 packets.
-#^220[\x09-\x0d -~]*\x0d\x0aUSER[\x09-\x0d -~]*\x0d\x0a
diff --git a/src/usr/local/share/protocols/gif.pat b/src/usr/local/share/protocols/gif.pat
deleted file mode 100644
index d54ed91..0000000
--- a/src/usr/local/share/protocols/gif.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# GIF - Popular Image format.
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-gif
-# drawn from /usr/share/magic
-GIF8(7|9)a
diff --git a/src/usr/local/share/protocols/gkrellm.pat b/src/usr/local/share/protocols/gkrellm.pat
deleted file mode 100644
index 73eb537..0000000
--- a/src/usr/local/share/protocols/gkrellm.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# Gkrellm - a system monitor - http://gkrellm.net
-# Pattern attributes: great veryfast fast
-# Protocol groups: monitoring open_source
-# Wiki: http://www.protocolinfo.org/wiki/Gkrellm
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-# Since this is not anything resembling a published protocol, it may change without
-# warning in new versions of gkrellm.
-
-gkrellm
-# tested with gkrellm 2.2.7
-^gkrellm [23].[0-9].[0-9]\x0a$
diff --git a/src/usr/local/share/protocols/gnucleuslan.pat b/src/usr/local/share/protocols/gnucleuslan.pat
deleted file mode 100644
index ae5895b..0000000
--- a/src/usr/local/share/protocols/gnucleuslan.pat
+++ /dev/null
@@ -1,10 +0,0 @@
-# GnucleusLAN - LAN-only P2P filesharing
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/GnucleusLAN
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-
-gnucleuslan
-gnuclear connect/[\x09-\x0d -~]*user-agent: gnucleus [\x09-\x0d -~]*lan:
diff --git a/src/usr/local/share/protocols/gnutella.pat b/src/usr/local/share/protocols/gnutella.pat
deleted file mode 100644
index 770ed43..0000000
--- a/src/usr/local/share/protocols/gnutella.pat
+++ /dev/null
@@ -1,34 +0,0 @@
-# Gnutella - P2P filesharing
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/Gnutella
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This should match both Gnutella and "Gnutella2" ("Mike's protocol")
-#
-# Various clients use this protocol including Mactella, Shareaza,
-# GTK-gnutella, Gnucleus, Gnotella, LimeWire, iMesh and BearShare.
-#
-# This is tested with gtk-gnutella and Shareaza.
-
-# http://www.gnutella2.com/tiki-index.php?page=UDP%20Transceiver
-# http://rfc-gnutella.sf.net/
-# http://www.gnutella2.com/tiki-index.php?page=Gnutella2%20Specification
-# http://en.wikipedia.org/wiki/Shareaza
-
-gnutella
-
-# The first part matches UDP messages - All start with "GND", then have
-# a flag byte which is either \x00, \x01 or \x02, then two sequence bytes
-# that can be anything, then a fragment number, which must start at 1.
-# The rest matches TCP first client message or first server message (in case
-# we can't see client messages). Some parts of this are empirical rather than
-# document based. Assumes version is between 0.0 and 2.9. (usually is
-# 0.4 or 0.6). I'm guessing at many of the user-agents.
-# The last bit is emprical and probably only matches Limewire.
-^(gnd[\x01\x02]?.?.?\x01|gnutella connect/[012]\.[0-9]\x0d\x0a|get /uri-res/n2r\?urn:sha1:|get /.*user-agent: (gtk-gnutella|bearshare|mactella|gnucleus|gnotella|limewire|imesh)|get /.*content-type: application/x-gnutella-packets|giv [0-9]*:[0-9a-f]*/|queue [0-9a-f]* [1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?:[1-9][0-9]?[0-9]?[0-9]?|gnutella.*content-type: application/x-gnutella|...................?lime)
-
-# Needlessly precise, at the expense of time
-#^(gnd[\x01\x02]?.?.?\x01|gnutella connect/[012]\.[0-9]\x0d\x0a|get /uri-res/n2r\?urn:sha1:|get /[\x09-\x0d -~]*user-agent: (gtk-gnutella|bearshare|mactella|gnucleus|gnotella|limewire|imesh)|get /[\x09-\x0d -~]*content-type: application/x-gnutella-packets|giv [0-9]*:[0-9a-f]*/|queue [0-9a-f]* [1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?\.[1-9][0-9]?[0-9]?:[1-9][0-9]?[0-9]?[0-9]?|gnutella[\x09-\x0d -~]*content-type: application/x-gnutella|..................lime)
-
-
diff --git a/src/usr/local/share/protocols/goboogy.pat b/src/usr/local/share/protocols/goboogy.pat
deleted file mode 100644
index d88d00b..0000000
--- a/src/usr/local/share/protocols/goboogy.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# GoBoogy - a Korean P2P protocol
-# Pattern attributes: marginal slow notsofast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/GoBoogy
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is untested and likely does not work in all cases!
-#
-# By Adam Przybyla, modified by Matthew Strait. Possibly lifted from
-# Josh Ballard (oofle.com).
-
-goboogy
-<peerplat>|^get /getfilebyhash\.cgi\?|^get /queue_register\.cgi\?|^get /getupdowninfo\.cgi\?
diff --git a/src/usr/local/share/protocols/gopher.pat b/src/usr/local/share/protocols/gopher.pat
deleted file mode 100644
index 773016f..0000000
--- a/src/usr/local/share/protocols/gopher.pat
+++ /dev/null
@@ -1,25 +0,0 @@
-# Gopher - A precursor to HTTP - RFC 1436
-# Pattern attributes: good slow notsofast undermatch
-# Protocol groups: document_retrieval obsolete ietf_rfc_documented
-# Wiki: http://www.protocolinfo.org/wiki/Gopher
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Gopher servers usually run on TCP port 70.
-#
-# This pattern is lightly tested using gopher.dna.affrc.go.jp .
-
-gopher
-# This matches the server's response, but naturally only if it is a
-# directory listing, not if it is sending a file, because then the data
-# is totally arbitrary.
-
-# Matches the client saying "list what you have", then the server
-# response: one of the file type characters, any printable characters, a
-# tab, any printable characters, a tab, something that looks like a
-# domain name, a tab, and then a number which could be the start of a
-# port number.
-
-# "0About internet Gopher\tStuff:About us\trawBits.micro.umn.edu\t70"
-# "\r7search by keywords on protein data using wais\twaissrc:/protein_all/protein\tgopher.dna.affrc.go.jp\t70"
-
-^[\x09-\x0d]*[1-9,+tgi][\x09-\x0d -~]*\x09[\x09-\x0d -~]*\x09[a-z0-9.]*\.[a-z][a-z].?.?\x09[1-9]
diff --git a/src/usr/local/share/protocols/gtalk.pat b/src/usr/local/share/protocols/gtalk.pat
deleted file mode 100644
index aa538ca..0000000
--- a/src/usr/local/share/protocols/gtalk.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# GTalk, a Jabber (XMPP) client
-# Pattern attributes: good veryfast fast subset
-# Protocol groups: chat ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/Jabber
-# Copyright (C) 2009 Matthew Strait; See ../LICENSE
-
-# See ../protocols/jabber.pat for more details
-
-gtalk
-^<stream:stream to="gmail\.com"
-
diff --git a/src/usr/local/share/protocols/guildwars.pat b/src/usr/local/share/protocols/guildwars.pat
deleted file mode 100644
index 65d2b92..0000000
--- a/src/usr/local/share/protocols/guildwars.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# Guild Wars - online game - http://guildwars.com
-# Pattern attributes: marginal veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Guild_Wars
-# Copyright (C) 2008 Matthew Strait; See ../LICENSE
-
-# Contributed on protocolinfo by Greatwolf with the comment, "Guild Wars
-# uses encrypted data on tcp/6112 and may be impossible to match by
-# content. An experimental filter has been written to match Guild Wars
-# packets. More testing is still required to determine the effectiveness
-# of this pattern."
-
-guildwars
-^[\x04\x05]\x0c.i\x01
diff --git a/src/usr/local/share/protocols/h323.pat b/src/usr/local/share/protocols/h323.pat
deleted file mode 100644
index 75b1a39..0000000
--- a/src/usr/local/share/protocols/h323.pat
+++ /dev/null
@@ -1,36 +0,0 @@
-# H.323 - Voice over IP.
-# Pattern attributes: ok veryfast fast
-# Protocol groups: voip itu-t_standard
-# Wiki: http://www.protocolinfo.org/wiki/H.323
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is written without knowledge of the principles of H.323.
-# It has only been tested with gnomemeeting and may not work for other
-# clients.
-#
-# Also, it has been reported that:
-# "the pattern ... match[es] only first H.323 stream (conntrack for H.323 was
-# enabled). Also the major chunk of traffic was of RTP which went untracked."
-#
-# Also, it may very well match other things that use TPKT and
-# Q.931.
-
-# Note that to take full advantage of this pattern, you will need to
-# have connection tracking of H.323 support in your kernel. This
-# support is not in the stock kernel. A patch can be found at
-# http://netfilter.org
-
-h323
-# TPKT format: http://www.ietf.org/rfc/rfc1006.txt
-# \x03 = TPKT version. It was 3 in May 1987 and gnomemeeting still uses 3.
-# ..? = null reserved byte and packet length field.
-# Q.931 format: http://www.freesoft.org/CIE/Topics/126.htm
-# \x08 = Q.931
-# . = length of call reference
-# The next byte was: \x18 = message sent from originating side.
-# But based on experimentation, it seems that just . is better.
-# .?.?.?.?.?.?.?.?.?.?.?.?.?.?.? = call reference (0-15 bytes (0 for nulls))
-# \x05 = setup message
-#
-# Yup, it doesn't actually include any H.323 protocol information.
-^\x03..?\x08...?.?.?.?.?.?.?.?.?.?.?.?.?.?.?\x05
diff --git a/src/usr/local/share/protocols/halflife2-deathmatch.pat b/src/usr/local/share/protocols/halflife2-deathmatch.pat
deleted file mode 100644
index 45d0bb0..0000000
--- a/src/usr/local/share/protocols/halflife2-deathmatch.pat
+++ /dev/null
@@ -1,10 +0,0 @@
-# Half-Life 2 Deathmatch - popular computer game
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Half-Life
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# By Clayton Macleod <cherrytwist TA gmail.com>
-
-halflife2-deathmatch
-^\xff\xff\xff\xff.*hl2mpDeathmatch
diff --git a/src/usr/local/share/protocols/hddtemp.pat b/src/usr/local/share/protocols/hddtemp.pat
deleted file mode 100644
index cdd908c..0000000
--- a/src/usr/local/share/protocols/hddtemp.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# hddtemp - Hard drive temperature reporting
-# Pattern attributes: great veryfast fast
-# Protocol groups: monitoring open_source
-# Wiki: http://www.protocolinfo.org/wiki/HDDtemp
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 7634
-#
-# You're a silly person if you use this pattern.
-#
-# This pattern has been tested and is believed to work well.
-
-hddtemp
-^\|/dev/[a-z][a-z][a-z]\|[0-9a-z]*\|[0-9][0-9]\|[cfk]\|
diff --git a/src/usr/local/share/protocols/hotline.pat b/src/usr/local/share/protocols/hotline.pat
deleted file mode 100644
index 20ec6de..0000000
--- a/src/usr/local/share/protocols/hotline.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# Hotline - An old P2P filesharing protocol
-# Pattern attributes: marginal fast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Hotline
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is untested!
-#
-# This is lifted from http://oofle.com/filesharing.php?app=hotline
-
-hotline
-^....................TRTPHOTL\x01\x02
diff --git a/src/usr/local/share/protocols/html.pat b/src/usr/local/share/protocols/html.pat
deleted file mode 100644
index d834a96..0000000
--- a/src/usr/local/share/protocols/html.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# (X)HTML - (Extensible) Hypertext Markup Language - http://w3.org
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-#
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# This pattern has been tested and is believe to work well.
-
-# this should match any (X)HTML document from any version that conforms
-# even vaugly to the standards.
-html
-<html.*><head>
diff --git a/src/usr/local/share/protocols/http-dap.pat b/src/usr/local/share/protocols/http-dap.pat
deleted file mode 100644
index 216d8d6..0000000
--- a/src/usr/local/share/protocols/http-dap.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# HTTP by Download Accelerator Plus - http://www.speedbit.com
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Uses HTTP to download.
-
-http-dap
-
-# DAP identifies itself in the User-Agent field of every HTTP request it
-# makes. This is pretty trivial to get around if speedbit.com ever
-# wanted to.
-
-# The latest version uses "User-Agent: DA 7.0". The additional version
-# allowance is an attempt at "future proofing".
-
-User-Agent: DA [678]\.[0-9]
-
diff --git a/src/usr/local/share/protocols/http-freshdownload.pat b/src/usr/local/share/protocols/http-freshdownload.pat
deleted file mode 100644
index a342e86..0000000
--- a/src/usr/local/share/protocols/http-freshdownload.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# HTTP by Fresh Download - http://www.freshdevices.com
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# Uses HTTP to download.
-
-http-freshdownload
-
-# Fresh Download identifies itself in the User-Agent field of every HTTP
-# request it makes.
-
-# The latest version uses "User-Agent: FreshDownload/4.40". The
-# additional version allowance is an attempt at "future proofing".
-
-User-Agent: FreshDownload/[456](\.[0-9][0-9]?)?
-
diff --git a/src/usr/local/share/protocols/http-itunes.pat b/src/usr/local/share/protocols/http-itunes.pat
deleted file mode 100644
index fd44ee4..0000000
--- a/src/usr/local/share/protocols/http-itunes.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# HTTP - iTunes (Apple's music program)
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: streaming_audio ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Port 80
-# iTunes program basically uses the HTTP protocol for its initial
-# communication.
-# Pattern contributed by Deepak Seshadri <dseshadri AT broadbandmaritime.com>
-
-http-itunes
-http/(0\.9|1\.0|1\.1).*(user-agent: itunes)
-
diff --git a/src/usr/local/share/protocols/http-rtsp.pat b/src/usr/local/share/protocols/http-rtsp.pat
deleted file mode 100644
index 73ef926..0000000
--- a/src/usr/local/share/protocols/http-rtsp.pat
+++ /dev/null
@@ -1,16 +0,0 @@
-# RTSP tunneled within HTTP
-# Pattern attributes: ok notsofast fast subset
-# Protocol groups: streaming_audio streaming_video ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/RTSP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Apple's documentation on what Quicktime does:
-# http://developer.apple.com/quicktime/icefloe/dispatch028.html
-# This is what the first part of the pattern is about
-#
-# The second part is based on the example in RFC 2326. For this part to
-# work, this pattern MUST be earlier in the iptables rules chain than
-# HTTP. Otherwise, the stream will be identified as HTTP.
-
-http-rtsp
-^(get[\x09-\x0d -~]* Accept: application/x-rtsp-tunnelled|http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9] [\x09-\x0d -~]*a=control:rtsp://)
diff --git a/src/usr/local/share/protocols/http.pat b/src/usr/local/share/protocols/http.pat
deleted file mode 100644
index 5122310..0000000
--- a/src/usr/local/share/protocols/http.pat
+++ /dev/null
@@ -1,28 +0,0 @@
-# HTTP - HyperText Transfer Protocol - RFC 2616
-# Pattern attributes: great slow notsofast superset
-# Protocol groups: document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 80
-#
-# This pattern has been tested and is believed to work well.
-#
-# this intentionally catches the response from the server rather than
-# the request so that other protocols which use http (like kazaa) can be
-# caught based on specific http requests regardless of the ordering of
-# filters... also matches posts
-
-# Sites that serve really long cookies may break this by pushing the
-# server response too far away from the beginning of the connection. To
-# fix this, increase the kernel's data buffer length.
-
-http
-# Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF (rfc 2616)
-# As specified in rfc 2616 a status code is preceeded and followed by a
-# space.
-http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9] [\x09-\x0d -~]*(connection:|content-type:|content-length:|date:)|post [\x09-\x0d -~]* http/[01]\.[019]
-# A slightly faster version that might be good enough:
-#http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9]|post [\x09-\x0d -~]* http/[01]\.[019]
-# old pattern(s):
-#(http[\x09-\x0d -~]*(200 ok|302 |304 )[\x09-\x0d -~]*(connection:|content-type:|content-length:))|^(post [\x09-\x0d -~]* http/)
diff --git a/src/usr/local/share/protocols/httpaudio.pat b/src/usr/local/share/protocols/httpaudio.pat
deleted file mode 100644
index c6cdd9a..0000000
--- a/src/usr/local/share/protocols/httpaudio.pat
+++ /dev/null
@@ -1,32 +0,0 @@
-# HTTP - Audio over HyperText Transfer Protocol (RFC 2616)
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: streaming_audio document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 80
-#
-# Contributed by Deepak Seshadri <dseshadri AT broadbandmaritime.com>
-#
-# This pattern has been tested and is believed to work well.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/HTTP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-#
-# If you use this, you should be aware that:
-#
-# - they match both simple downloads of audio/video and streaming content.
-#
-# - blocking based on content-type encourages server
-# writers/administrators to misreport content-type (which will just make
-# headaches for everyone, including us), so I would strongly recommend
-# shaping audio/video down to a speed that discourages use of streaming
-# players without actually blocking it.
-#
-# - obviously, since this is a subset of HTTP, you need to match it
-# earlier in your iptables rules than HTTP.
-
-httpaudio
-http/(0\.9|1\.0|1\.1)[\x09-\x0d ][1-5][0-9][0-9][\x09-\x0d -~]*(content-type: audio)
-
diff --git a/src/usr/local/share/protocols/httpcachehit.pat b/src/usr/local/share/protocols/httpcachehit.pat
deleted file mode 100644
index 41cb099..0000000
--- a/src/usr/local/share/protocols/httpcachehit.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# HTTP - Proxy Cache hit for HyperText Transfer Protocol (RFC 2616)
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 80
-#
-# Contributed by Francesco Del Degan <fdeldegan AT libero.it>
-#
-# This pattern has been tested and is believed to work well.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/HTTP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-
-httpcachehit
-http/(0\.9|1\.0|1\.1)[\x09-\x0d ][1-5][0-9][0-9][\x09-\x0d -~]*(x-cache: hit)
-
diff --git a/src/usr/local/share/protocols/httpcachemiss.pat b/src/usr/local/share/protocols/httpcachemiss.pat
deleted file mode 100644
index 09ac6cd..0000000
--- a/src/usr/local/share/protocols/httpcachemiss.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# HTTP - Proxy Cache miss for HyperText Transfer Protocol (RFC 2616)
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 80
-#
-# This pattern has been tested and is believed to work well.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/HTTP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-
-httpcachemiss
-http/(0\.9|1\.0|1\.1)[\x09-\x0d ][1-5][0-9][0-9][\x09-\x0d -~]*(x-cache: miss)
-
diff --git a/src/usr/local/share/protocols/httpvideo.pat b/src/usr/local/share/protocols/httpvideo.pat
deleted file mode 100644
index 4a75ce0..0000000
--- a/src/usr/local/share/protocols/httpvideo.pat
+++ /dev/null
@@ -1,32 +0,0 @@
-# HTTP - Video over HyperText Transfer Protocol (RFC 2616)
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: streaming_video document_retrieval ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 80
-#
-# Contributed by Deepak Seshadri <dseshadri AT broadbandmaritime.com>
-#
-# This pattern has been tested and is believed to work well.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/HTTP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-#
-# If you use this, you should be aware that:
-#
-# - they match both simple downloads of audio/video and streaming content.
-#
-# - blocking based on content-type encourages server
-# writers/administrators to misreport content-type (which will just make
-# headaches for everyone, including us), so I would strongly recommend
-# shaping audio/video down to a speed that discourages use of streaming
-# players without actually blocking it.
-#
-# - obviously, since this is a subset of HTTP, you need to match it
-# earlier in your iptables rules than HTTP.
-
-httpvideo
-http/(0\.9|1\.0|1\.1)[\x09-\x0d ][1-5][0-9][0-9][\x09-\x0d -~]*(content-type: video)
-
diff --git a/src/usr/local/share/protocols/ident.pat b/src/usr/local/share/protocols/ident.pat
deleted file mode 100644
index 3205e5e..0000000
--- a/src/usr/local/share/protocols/ident.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# Ident - Identification Protocol - RFC 1413
-# Pattern attributes: good fast fast
-# Protocol groups: networking ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/Ident
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 113
-#
-# This pattern is believed to work.
-
-ident
-# "number , numberCRLF" possibly without the CR and/or LF.
-# ^$ is appropriate because the first packet should never have anything
-# else in it.
-^[1-9][0-9]?[0-9]?[0-9]?[0-9]?[\x09-\x0d]*,[\x09-\x0d]*[1-9][0-9]?[0-9]?[0-9]?[0-9]?(\x0d\x0a|[\x0d\x0a])?$
diff --git a/src/usr/local/share/protocols/imap.pat b/src/usr/local/share/protocols/imap.pat
deleted file mode 100644
index 3f989c0..0000000
--- a/src/usr/local/share/protocols/imap.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# IMAP - Internet Message Access Protocol (A common e-mail protocol)
-# Pattern attributes: great fast fast
-# Protocol groups: mail ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/IMAP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This matches IMAP4 (RFC 3501) and probably IMAP2 (RFC 1176)
-#
-# This pattern has been tested and is believed to work well.
-#
-# This matches the IMAP welcome message or a noop command (which for
-# some unknown reason can happen at the start of a connection?)
-imap
-^(\* ok|a[0-9]+ noop)
diff --git a/src/usr/local/share/protocols/imesh.pat b/src/usr/local/share/protocols/imesh.pat
deleted file mode 100644
index 4cb7ac7..0000000
--- a/src/usr/local/share/protocols/imesh.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# iMesh - the native protocol of iMesh, a P2P application - http://imesh.com
-# Pattern attributes: ok fast notsofast
-# Protocol groups: p2p
-# Wiki: http://protocolinfo.org/wiki/iMesh
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# depending on the version of iMesh (the program), it can also use fasttrack,
-# gnutella and edonkey in addition to iMesh (the protocol).
-
-imesh
-# The first branch matches the login
-# The second branch matches the main non-download connection (searches, etc)
-# The third branch matches downloads of "premium" content
-# The fourth branch matches peer downloads.
-^(post[\x09-\x0d -~]*<PasswordHash>................................</PasswordHash><ClientVer>|\x34\x80?\x0d?\xfc\xff\x04|get[\x09-\x0d -~]*Host: imsh\.download-prod\.musicnet\.com|\x02[\x01\x02]\x83.*\x02[\x01\x02]\x83)
diff --git a/src/usr/local/share/protocols/ipp.pat b/src/usr/local/share/protocols/ipp.pat
deleted file mode 100644
index 15540d0..0000000
--- a/src/usr/local/share/protocols/ipp.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# IP printing - a new standard for UNIX printing - RFC 2911
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: printer ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/IPP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-
-ipp
-# It's unlikely that anything else has this string, but I think we could
-# do a bit better...
-ipp://
diff --git a/src/usr/local/share/protocols/irc.pat b/src/usr/local/share/protocols/irc.pat
deleted file mode 100644
index b922b3e..0000000
--- a/src/usr/local/share/protocols/irc.pat
+++ /dev/null
@@ -1,20 +0,0 @@
-# IRC - Internet Relay Chat - RFC 1459
-# Pattern attributes: great fast fast
-# Protocol groups: chat ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/IRC
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 6666 or 6667
-# Note that chat traffic runs on these ports, but IRC-DCC traffic (which
-# can use much more bandwidth) uses a dynamically assigned port, so you
-# must have the IRC connection tracking module in your kernel to classify
-# this.
-#
-# This pattern has been tested and is believed to work well.
-
-irc
-# First thing that happens is that the client sends NICK and USER, in
-# either order. This allows MIRC color codes (\x02-\x0d instead of
-# \x09-\x0d).
-^(nick[\x09-\x0d -~]*user[\x09-\x0d -~]*:|user[\x09-\x0d -~]*:[\x02-\x0d -~]*nick[\x09-\x0d -~]*\x0d\x0a)
-
diff --git a/src/usr/local/share/protocols/jabber.pat b/src/usr/local/share/protocols/jabber.pat
deleted file mode 100644
index 7c32890..0000000
--- a/src/usr/local/share/protocols/jabber.pat
+++ /dev/null
@@ -1,24 +0,0 @@
-# Jabber (XMPP) - open instant messenger protocol - RFC 3920 - http://jabber.org
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: chat ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/Jabber
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested with Gaim and Gabber. It is only tested
-# with non-SSL mode Jabber with no proxies.
-
-# Thanks to Jan Hudec for some improvements.
-
-# Jabber seems to take a long time to set up a connection. I'm
-# connecting with Gabber 0.8.8 to 12jabber.org and the first 8 packets
-# is this:
-# <stream:stream to='12jabber.com' xmlns='jabber:client'
-# xmlns:stream='http://etherx.jabber.org/streams'><?xml
-# version='1.0'?><stream:stream
-# xmlns:stream='http://etherx.jabber.org/streams' id='3f73e951'
-# xmlns='jabber:client' from='12jabber.com'>
-#
-# No mention of my username or password yet, you'll note.
-
-jabber
-<stream:stream[\x09-\x0d ][ -~]*[\x09-\x0d ]xmlns=['"]jabber
diff --git a/src/usr/local/share/protocols/jpeg.pat b/src/usr/local/share/protocols/jpeg.pat
deleted file mode 100644
index fd1a249..0000000
--- a/src/usr/local/share/protocols/jpeg.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# JPEG - Joint Picture Expert Group image format.
-# Pattern attributes: ok fast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-jpeg
-# drawn from /usr/share/magic
-\xff\xd8
diff --git a/src/usr/local/share/protocols/kugoo.pat b/src/usr/local/share/protocols/kugoo.pat
deleted file mode 100644
index c478317..0000000
--- a/src/usr/local/share/protocols/kugoo.pat
+++ /dev/null
@@ -1,21 +0,0 @@
-# KuGoo - a Chinese P2P program - http://www.kugoo.com
-# Pattern attributes: ok fast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/KuGoo
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-kugoo
-# liangjun says: "i find old pattern is not working for kugoo 2008. so i
-# write a new pattern of kugoo 2008 ,it's working with all of kugoo 2008
-# version!"
-^(\x64.....\x70....\x50\x37|\x65.+)
-
-# Pattern before 2008 11 08
-#
-# The author of this pattern says it works, but this is unconfirmed.
-# Written by www.routerclub.com wsgtrsys.
-#
-# LanTian submitted \x64.+\x74\x47\x50\x37 for "KuGoo2", but adding as
-# another branch makes the pattern REALLY slow. If it could have a ^, that'd
-# be ok (still veryfast/fast). Waiting to hear.
-#^(\x31..\x8e|\x64.+\x74\x47\x50\x37)
diff --git a/src/usr/local/share/protocols/live365.pat b/src/usr/local/share/protocols/live365.pat
deleted file mode 100644
index 144ac50..0000000
--- a/src/usr/local/share/protocols/live365.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# live365 - An Internet radio site - http://live365.com
-# Pattern attributes: marginal notsofast notsofast
-# Protocol groups: streaming_audio
-# Wiki: http://www.protocolinfo.org/wiki/Live365
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern was "contributed" (taken with permission) by the bandwidth
-# arbitrator project (www.bandwidtharbitrator.com).
-#
-# This pattern is unconfirmed.
-
-live365
-# FIXME: what's going on here?
-membername.*session.*player
-
diff --git a/src/usr/local/share/protocols/liveforspeed.pat b/src/usr/local/share/protocols/liveforspeed.pat
deleted file mode 100644
index ad32e9a..0000000
--- a/src/usr/local/share/protocols/liveforspeed.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# Live For Speed - A racing game.
-# Pattern attributes: poor fast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Live_For_Speed
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern was submitted to protocolinfo.org by 80.55.238.74 with no
-# explanation. It is unconfirmed.
-
-# Live For Speed S2 Alpha 0.5 X10
-liveforspeed
-^..\x05\x58\x0a\x1d\x03
-# The same guy came by the next day and deleted the \x03 without comment...
diff --git a/src/usr/local/share/protocols/lpd.pat b/src/usr/local/share/protocols/lpd.pat
deleted file mode 100644
index 4b78dfe..0000000
--- a/src/usr/local/share/protocols/lpd.pat
+++ /dev/null
@@ -1,18 +0,0 @@
-# LPD - Line Printer Daemon Protocol (old-style UNIX printing) - RFC 1179
-# Pattern attributes: ok fast fast
-# Protocol groups: printer ietf_rfc_documented
-# Wiki: http://www.protocolinfo.org/wiki/LPD
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is untested.
-
-lpd
-# print waiting jobs: ^\x01[!-~]+\x0a$
-# receive a print job: ^\x02[!-~]+\x0a.[\x01\x02\x03][\x01-\x0a -~]*\x0a$
-# Send queue state: ^[\x03\x04][!-~]+[\x09-\x0d]+[a-z][\x09-\x0d -~]*\x0a$
-# Remove jobs: ^\x05[!-~]+[\x09-\x0d]+([a-z][!-~]*[\x09-\x0d]+[1-9][0-9]?[0-9]?|root[\x09-\x0d]+[!-~]+).*\x0a$
-
-# This pattern looks like it might match random data once in a while, but
-# testing shows that this is not the case.
-
-^(\x01[!-~]+|\x02[!-~]+\x0a.[\x01\x02\x03][\x01-\x0a -~]*|[\x03\x04][!-~]+[\x09-\x0d]+[a-z][\x09-\x0d -~]*|\x05[!-~]+[\x09-\x0d]+([a-z][!-~]*[\x09-\x0d]+[1-9][0-9]?[0-9]?|root[\x09-\x0d]+[!-~]+).*)\x0a$
diff --git a/src/usr/local/share/protocols/mohaa.pat b/src/usr/local/share/protocols/mohaa.pat
deleted file mode 100644
index 00b6c07..0000000
--- a/src/usr/local/share/protocols/mohaa.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# Medal of Honor Allied Assault - an Electronic Arts game
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Medal_of_Honor_Allied_Assault
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is written and tested by Krzysztof Maciejewski.
-
-mohaa
-^\xff\xff\xff\xffgetstatus\x0a
-
diff --git a/src/usr/local/share/protocols/mp3.pat b/src/usr/local/share/protocols/mp3.pat
deleted file mode 100644
index 1b60a4c..0000000
--- a/src/usr/local/share/protocols/mp3.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# MP3 - Moving Picture Experts Group Audio Layer III
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# By LanTian (chinalantian at 126 d.t com)
-
-# Only matches the standard MP3 form, non-standard files might not be matched.
-
-mp3
-\x49\x44\x33\x03
diff --git a/src/usr/local/share/protocols/msn-filetransfer.pat b/src/usr/local/share/protocols/msn-filetransfer.pat
deleted file mode 100644
index 797edb4..0000000
--- a/src/usr/local/share/protocols/msn-filetransfer.pat
+++ /dev/null
@@ -1,30 +0,0 @@
-# MSN (Micosoft Network) Messenger file transfers (MSNFTP and MSNSLP)
-# Pattern attributes: good fast fast
-# Protocol groups: chat document_retrieval proprietary
-# Wiki: http://www.protocolinfo.org/wiki/MSN_Messenger
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# http://www.hypothetic.org/docs/msn/client/file_transfer.php
-
-# NOTE! This pattern does not catch the modern type of MSN filetransfers
-# because they use the same TCP connection as the chat itself. See
-# ../example_traffic/msn_chat_and_file_transfer.txt for a demonstration.
-
-# This pattern has been tested and seems to work well. It, does,
-# however, require more testing with various versions of the official
-# MSN client as well as with clones such as Trillian, Miranda, Gaim,
-# etc. If you are using a MSN clone and this pattern DOES work for you,
-# please, also let us know.
-
-# First part matches the older MSNFTP: A MSN filetransfer is a normal
-# MSN connection except that the protocol is MSNFTP. Some clients
-# (especially Trillian) send other protocol versions besides MSNFTP
-# which should be matched by the [ -~]*.
-
-# Second part matches newer MSNSLP:
-# http://msnpiki.msnfanatic.com/index.php/MSNC:MSNSLP
-# This part is untested.
-
-msn-filetransfer
-^(ver [ -~]*msnftp\x0d\x0aver msnftp\x0d\x0ausr|method msnmsgr:)
-
diff --git a/src/usr/local/share/protocols/msnmessenger.pat b/src/usr/local/share/protocols/msnmessenger.pat
deleted file mode 100644
index 11dfc10..0000000
--- a/src/usr/local/share/protocols/msnmessenger.pat
+++ /dev/null
@@ -1,28 +0,0 @@
-# MSN Messenger - Microsoft Network chat client
-# Pattern attributes: good slow notsofast
-# Protocol groups: chat proprietary
-# Wiki: http://www.protocolinfo.org/wiki/MSN_Messenger
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually uses TCP port 1863
-# http://www.hypothetic.org/docs/msn/index.php
-# http://msnpiki.msnfanatic.com/
-#
-# This pattern has been tested and is believed to work well.
-
-msnmessenger
-
-# First branch: login
-# ver: allow versions up to 99.
-# I've never seen a cvr other than cvr0. Maybe this will be trouble later?
-# Can't anchor at the beginning because sometimes this is encapsulated in
-# HTTP. But either way, the first packet ends like this.
-# Second/Third branches: accepting/sending a message
-# I will assume that these can also be encapsulated in HTTP, although I have
-# not checked. Example of each direction:
-# ANS 1 quadong@hotmail.com 1139803431.29427 17522047
-# USR 1 quadong@hotmail.com 530423708.968145.366138
-
-# Branches are written entirely separately for better performance.
-ver [0-9]+ msnp[1-9][0-9]? [\x09-\x0d -~]*cvr0\x0d\x0a$|usr 1 [!-~]+ [0-9. ]+\x0d\x0a$|ans 1 [!-~]+ [0-9. ]+\x0d\x0a$
-
diff --git a/src/usr/local/share/protocols/mute.pat b/src/usr/local/share/protocols/mute.pat
deleted file mode 100644
index 53f2e23..0000000
--- a/src/usr/local/share/protocols/mute.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# MUTE - P2P filesharing - http://mute-net.sourceforge.net
-# Pattern attributes: marginal fast fast
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/MUTE
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is lightly tested. I don't know for sure that it will
-# match the actual file transfers.
-
-mute
-^(Public|AES)Key: [0-9a-f]*\x0aEnd(Public|AES)Key\x0a$
diff --git a/src/usr/local/share/protocols/napster.pat b/src/usr/local/share/protocols/napster.pat
deleted file mode 100644
index d7ef032..0000000
--- a/src/usr/local/share/protocols/napster.pat
+++ /dev/null
@@ -1,24 +0,0 @@
-# Napster - P2P filesharing
-# Pattern attributes: good fast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Napster
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# All my tests show that this pattern is fast, but one user has reported that
-# it is slow. Your milage may vary.
-#
-# Should work for any Napster offspring, like OpenNAP.
-# (Yes, people still use this!)
-# Matches both searches and downloads.
-#
-# http://opennap.sourceforge.net/napster.txt
-#
-# This pattern has been tested and is believed to work well.
-
-napster
-# (client-server: length, assumed to be less than 256, login or new user login,
-# username, password, port, client ID, link-type |
-# client-client: 1, firewalled or not, username, filename)
-# Assumes that filenames are well-behaved ASCII strings. I have found
-# one case where this assumptions fails (filename had \x99 in it).
-^(.[\x02\x06][!-~]+ [!-~]+ [0-9][0-9]?[0-9]?[0-9]?[0-9]? "[\x09-\x0d -~]+" ([0-9]|10)|1(send|get)[!-~]+ "[\x09-\x0d -~]+")
diff --git a/src/usr/local/share/protocols/nbns.pat b/src/usr/local/share/protocols/nbns.pat
deleted file mode 100644
index ca114de..0000000
--- a/src/usr/local/share/protocols/nbns.pat
+++ /dev/null
@@ -1,20 +0,0 @@
-# NBNS - NetBIOS name service
-# Pattern attributes: good slow notsofast
-# Protocol groups: networking proprietary
-# Wiki: http://www.protocolinfo.org/wiki/NBNS
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-#
-# name query
-# \x01\x10 means name query
-#
-# registration NB
-# (\x10 or )\x10 means registration
-#
-# release NB (merged with registration)
-# 0\x10 means release
-
-nbns
-# This is not a valid basic GNU regular expression.
-\x01\x10\x01|\)\x10\x01\x01|0\x10\x01
diff --git a/src/usr/local/share/protocols/ncp.pat b/src/usr/local/share/protocols/ncp.pat
deleted file mode 100644
index 55792b2..0000000
--- a/src/usr/local/share/protocols/ncp.pat
+++ /dev/null
@@ -1,23 +0,0 @@
-# NCP - Novell Core Protocol
-# Pattern attributes: good fast fast
-# Protocol groups: networking proprietary
-# Wiki: http://www.protocolinfo.org/wiki/NCP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-
-# ncp request
-# dmdt means Request
-# *any length
-#
-# *any reply buffer size
-# "" means service request
-# | \x17\x17 means create a service connection
-# | uu means destroy service connection
-
-# ncp reply
-# tncp means reply
-# 33 means service reply
-
-ncp
-^(dmdt.*\x01.*(""|\x11\x11|uu)|tncp.*33)
diff --git a/src/usr/local/share/protocols/netbios.pat b/src/usr/local/share/protocols/netbios.pat
deleted file mode 100644
index a0314b1..0000000
--- a/src/usr/local/share/protocols/netbios.pat
+++ /dev/null
@@ -1,29 +0,0 @@
-# NetBIOS - Network Basic Input Output System
-# Pattern attributes: marginal notsofast notsofast
-# Protocol groups: networking ietf_internet_standard proprietary
-# Wiki: http://www.protocolinfo.org/wiki/NetBIOS
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# As mentioned in smb.pat:
-#
-# "This protocol is sometimes also referred to as the Common Internet File
-# System (CIFS), LanManager or NetBIOS protocol." -- "man samba"
-#
-# Actually, SMB is a higher level protocol than NetBIOS. However, the
-# NetBIOS header is only 4 bytes: not much to match on.
-#
-# http://www.ubiqx.org/cifs/SMB.html
-# See also RFCs 1001 and 1002.
-#
-# This pattern attempts to match the (Session layer) NetBIOS Session request.
-# If sucessful, you may be able to match NetBIOS several packets earlier
-# than if you just waited for the easier-to-match SMB header.
-#
-# This pattern is untested.
-
-netbios
-# session request byte, three bytes of flags and length. Then
-# there should be a big mess of letters between A and P which represent
-# the NetBIOS names of the involved computers (with a null between them).
-# (40ish here, damn this regexp implementation and its lack of {40,})
-\x81.?.?.[A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P][A-P]
diff --git a/src/usr/local/share/protocols/nimda.pat b/src/usr/local/share/protocols/nimda.pat
deleted file mode 100644
index 86c7ce1..0000000
--- a/src/usr/local/share/protocols/nimda.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# Nimda - a worm that attacks Microsoft IIS web servers, and MORE!
-# Pattern attributes: ok notsofast notsofast subset
-# Protocol groups: worm
-# Wiki: http://www.protocolinfo.org/wiki/Nimda
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-nimda
-GET (/scripts/root\.exe\?/c\+dir|/MSADC/root\.exe\?/c\+dir|/c/winnt/system32/cmd\.exe\?/c\+dir|/d/winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.%5c\.\./winnt/system32/cmd\.exe\?/c\+dir|/_vti_bin/\.\.%5c\.\./\.\.%5c\.\./\.\.%5c\.\./winnt/system32/cmd\.exe\?/c\+dir|/_mem_bin/\.\.%5c\.\./\.\.%5c\.\./\.\.%5c\.\./winnt/system32/cmd\.exe\?/c\+dir|/msadc/\.\.%5c\.\./\.\.%5c\.\./\.\.%5c/\.\.\xc1\x1c\.\./\.\.\xc1\x1c\.\./\.\.\xc1\x1c\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.\xc1\x1c\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.\xc0/\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.\xc0\xaf\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.\xc1\x9c\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.%35c\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.%35c\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.%5c\.\./winnt/system32/cmd\.exe\?/c\+dir|/scripts/\.\.%2f\.\./winnt/system32/cmd\.exe\?/c\+dir)
diff --git a/src/usr/local/share/protocols/nntp.pat b/src/usr/local/share/protocols/nntp.pat
deleted file mode 100644
index 7a30578..0000000
--- a/src/usr/local/share/protocols/nntp.pat
+++ /dev/null
@@ -1,21 +0,0 @@
-# NNTP - Network News Transfer Protocol - RFCs 977 and 2980
-# Pattern attributes: good fast fast
-# Protocol groups: ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/NNTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 119
-
-# This pattern is tested and is believed to work well (but could use
-# more testing).
-
-nntp
-# matches authorized login
-# OR
-# matches unauthorized login if the server says "news" after 200/201
-# (Half of the 2 servers I tested did :-), but they both required authorization
-# so it's quite possible that this pattern will miss some nntp traffic.)
-^(20[01][\x09-\x0d -~]*AUTHINFO USER|20[01][\x09-\x0d -~]*news)
-
-# same thing, slightly more accurate, but 100+ times slower
-#^20[01][\x09-\x0d -~]*\x0d\x0a[\x09-\x0d -~]*AUTHINFO USER|20[01][\x09-\x0d -~]*news
diff --git a/src/usr/local/share/protocols/ntp.pat b/src/usr/local/share/protocols/ntp.pat
deleted file mode 100644
index 760cfdb..0000000
--- a/src/usr/local/share/protocols/ntp.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# (S)NTP - (Simple) Network Time Protocol - RFCs 1305 and 2030
-# Pattern attributes: good fast fast overmatch
-# Protocol groups: time_synchronization ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/NTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is tested and is believed to work.
-
-# client|server
-# Requires the server's timestamp to be in the present or future (of 2005).
-# Tested with ntpdate on Linux.
-# Assumes version 2, 3 or 4.
-
-# Note that ntp packets are always 48 bytes, so you should match on that too.
-
-ntp
-^([\x13\x1b\x23\xd3\xdb\xe3]|[\x14\x1c$].......?.?.?.?.?.?.?.?.?[\xc6-\xff])
diff --git a/src/usr/local/share/protocols/ogg.pat b/src/usr/local/share/protocols/ogg.pat
deleted file mode 100644
index d9ba377..0000000
--- a/src/usr/local/share/protocols/ogg.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# Ogg - Ogg Vorbis music format (not any ogg file, just vorbis)
-# Pattern attributes: ok notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-ogg
-oggs.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?.?\x01vorbis
diff --git a/src/usr/local/share/protocols/openft.pat b/src/usr/local/share/protocols/openft.pat
deleted file mode 100644
index 09fa852..0000000
--- a/src/usr/local/share/protocols/openft.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# OpenFT - P2P filesharing (implemented in giFT library)
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/OpenFT
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# Ben Efros <ben AT xgendev.com> says:
-# "This pattern identifies openFT P2P transfers fine. openFT is part of giFT
-# and is a pretty large p2p network. I would describe this pattern as pretty
-# weak, but it works for the giFT-based clients I've used."
-
-openft
-x-openftalias: [-)(0-9a-z ~.]
diff --git a/src/usr/local/share/protocols/pcanywhere.pat b/src/usr/local/share/protocols/pcanywhere.pat
deleted file mode 100644
index 60b50a7..0000000
--- a/src/usr/local/share/protocols/pcanywhere.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# pcAnywhere - Symantec remote access program
-# Pattern attributes: marginal veryfast fast
-# Protocol groups: remote_access proprietary
-# Wiki: http://www.protocolinfo.org/wiki/PcAnywhere
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This is completely untested!
-# See http://www.unixwiz.net/tools/pcascan.txt
-
-pcanywhere
-# I think this only matches queries and not the bulk of the traffic!
-^(nq|st)$
diff --git a/src/usr/local/share/protocols/pdf.pat b/src/usr/local/share/protocols/pdf.pat
deleted file mode 100644
index 0c0e5f9..0000000
--- a/src/usr/local/share/protocols/pdf.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# PDF - Portable Document Format - Postscript-like format by Adobe
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-#
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# This pattern has been tested and is believe to work well.
-
-# Matches PDF versions 1.0 - 1.6 (not sure if 1.6 exists yet, but it probably
-# will.
-pdf
-%PDF-1\.[0123456]
diff --git a/src/usr/local/share/protocols/perl.pat b/src/usr/local/share/protocols/perl.pat
deleted file mode 100644
index 822986b..0000000
--- a/src/usr/local/share/protocols/perl.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# Perl - A scripting language by Larry Wall.
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-perl
-\#! ?/(usr/(local/)?)?bin/perl
diff --git a/src/usr/local/share/protocols/png.pat b/src/usr/local/share/protocols/png.pat
deleted file mode 100644
index 33aafda..0000000
--- a/src/usr/local/share/protocols/png.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# PNG - Portable Network Graphics, a popular image format
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# Contributed by Radovan Josth. Tested at least a bit.
-
-png
-# drawn from /usr/share/magic
-\x89PNG\x0d\x0a\x1a\x0a
-
-# this is probably sufficient, but by default let's use the longer version
-# \x89PNG
diff --git a/src/usr/local/share/protocols/poco.pat b/src/usr/local/share/protocols/poco.pat
deleted file mode 100644
index c7ce686..0000000
--- a/src/usr/local/share/protocols/poco.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# POCO and PP365 - Chinese P2P filesharing - http://pp365.com http://poco.cn
-# Pattern attributes: ok veryfast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Poco
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# The author of this pattern says it works, but this is unconfirmed.
-# Written by www.routerclub.com wsgtrsys.
-
-poco
-^\x80\x94\x0a\x01....\x1f\x9e
-
diff --git a/src/usr/local/share/protocols/pop3.pat b/src/usr/local/share/protocols/pop3.pat
deleted file mode 100644
index 47a8252..0000000
--- a/src/usr/local/share/protocols/pop3.pat
+++ /dev/null
@@ -1,50 +0,0 @@
-# POP3 - Post Office Protocol version 3 (popular e-mail protocol) - RFC 1939
-# Pattern attributes: great fast fast
-# Protocol groups: mail ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/POP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested somewhat.
-
-# this is a difficult protocol to match because of the relative lack of
-# distinguishing information. Read on.
-pop3
-
-# this the most conservative pattern. It should definitely work.
-#^(\+ok|-err)
-
-# this pattern assumes that the server says _something_ after +ok or -err
-# I think this is probably the way to go.
-^(\+ok |-err )
-
-# more that 90% of servers seem to say "pop" after "+ok", but not all.
-#^(\+ok .*pop)
-
-# Here's another tack. I think this is my second favorite.
-#^(\+ok [\x09-\x0d -~]*(ready|hello|pop|starting)|-err [\x09-\x0d -~]*(invalid|unknown|unimplemented|unrecognized|command))
-
-# this matches the server saying "you have N messages that are M bytes",
-# which the client probably asks for early in the session (not tested)
-#\+ok [0-9]+ [0-9]+
-
-# some sample servers:
-# RFC example: +OK POP3 server ready <1896.697170952@dbc.mtview.ca.us>
-# mail.dreamhost.com: +OK Hello there.
-# pop.carleton.edu: +OK POP3D(*) Server PMDFV6.2.2 at Fri, 12 Sep 2003 19:28:10 -0500 (CDT) (APOP disabled)
-# mail.earthlink.net: +OK NGPopper vEL_4_38 at earthlink.net ready <25509.1063412951@falcon>
-# *.email.umn.edu: +OK Cubic Circle's v1.22 1998/04/11 POP3 ready <7d1e0000da67623f@aquamarine.tc.umn.edu>
-# mail.yale.edu: +OK POP3 pantheon-po01 v2002.81 server ready
-# mail.gustavus.edu: +OK POP3 solen v2001.78 server ready
-# mail.reed.edu: +OK POP3 letra.reed.edu v2002.81 server ready
-# mail.bowdoin.edu: +OK mail.bowdoin.edu POP3 service (iPlanet Messaging Server 5.2 HotFix 1.15 (built Apr 28 2003))
-# pop.colby.edu: +OK Qpopper (version 4.0.5) at basalt starting.
-# mail.mac.com: +OK Netscape Messaging Multiplexor ready
-
-# various error strings:
-#-ERR Invalid command.
-#-ERR invalid command
-#-ERR unimplemented
-#-ERR Invalid command, try one of: USER name, PASS string, QUIT
-#-ERR Unknown AUTHORIZATION state command
-#-ERR Unrecognized command
-#-ERR Unknown command: "sadf'".
diff --git a/src/usr/local/share/protocols/postscript.pat b/src/usr/local/share/protocols/postscript.pat
deleted file mode 100644
index 456ac21..0000000
--- a/src/usr/local/share/protocols/postscript.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# Postscript - Printing Language
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-postscript
-%!ps
diff --git a/src/usr/local/share/protocols/pplive.pat b/src/usr/local/share/protocols/pplive.pat
deleted file mode 100644
index 42fef72..0000000
--- a/src/usr/local/share/protocols/pplive.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# PPLive - Chinese P2P streaming video - http://pplive.com
-# Pattern attributes: ok notsofast notsofast
-# Protocol groups: p2p streaming_video proprietary
-# Wiki: http://www.protocolinfo.org/wiki/PPLive
-# Copyright (C) 2008 Matthew Strait; See ../LICENSE
-
-# By liangjun, who says that it works. It may be easily improvable with
-# a bit more testing.
-
-pplive
-\x01...\xd3.+\x0c.$
diff --git a/src/usr/local/share/protocols/pressplay.pat b/src/usr/local/share/protocols/pressplay.pat
deleted file mode 100644
index cd814cc..0000000
--- a/src/usr/local/share/protocols/pressplay.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# pressplay - A legal music distribution site - http://pressplay.com
-# Pattern attributes: ok notsofast notsofast
-# Protocol groups: document_retrieval obsolete proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Pressplay
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern was "contributed" (taken with permission) by the bandwidth
-# arbitrator project (www.bandwidtharbitrator.com).
-#
-# This pattern is unconfirmed.
-
-pressplay
-# can we do better than this?
-user-agent: nsplayer
-
diff --git a/src/usr/local/share/protocols/qq.pat b/src/usr/local/share/protocols/qq.pat
deleted file mode 100644
index 08db802..0000000
--- a/src/usr/local/share/protocols/qq.pat
+++ /dev/null
@@ -1,26 +0,0 @@
-# Tencent QQ Protocol - Chinese instant messenger protocol - http://www.qq.com
-# Pattern attributes: good notsofast fast
-# Protocol groups: chat
-# Wiki: http://www.protocolinfo.org/wiki/QQ
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Over six million people use QQ in China, according to wsgtrsys.
-#
-# This pattern has been tested and is believed to work well.
-#
-# QQ uses three (two?) methods to connect to server(s?).
-# one is udp, and another is tcp
-# udp protocol: the first byte is 02 and last byte is 03
-# tcp protocol: the second byte is 02 and last byte is 03
-# tony on protocolinfo.org says that now the *third* byte is 02:
-# "but when I tested on my PC, I found that when qq2007/qq2008
-# use tcp protocol, the third byte instead of the second is always 02.
-#
-# So the QQ protocol changed again, or I have made a mistake, I wonder
-# that."
-# So now the pattern allows any of the first three bytes to be 02. Delete
-# one of the ".?" to restore to the old behaviour.
-# pattern written by www.routerclub.com wsgtrsys
-
-qq
-^.?.?\x02.+\x03$
diff --git a/src/usr/local/share/protocols/quake-halflife.pat b/src/usr/local/share/protocols/quake-halflife.pat
deleted file mode 100644
index bc05b8f..0000000
--- a/src/usr/local/share/protocols/quake-halflife.pat
+++ /dev/null
@@ -1,32 +0,0 @@
-# Half Life 1 engine games (HL 1, Quake 2/3/World, Counterstrike 1.6, etc.)
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Half-Life http://www.protocolinfo.org/wiki/Counter-Strike http://www.protocolinfo.org/wiki/Day_of_Defeat
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Contributed by Laurens Blankers <laurens AT blankersfamily.com>, who says:
-#
-# This pattern has been tested with QuakeWorld (2.30), Quake 2 (3.20),
-# Quake 3 (1.32), and Half-life (1.1.1.0). But may also work on other
-# games based on the Quake engine.
-#
-# Clayton Macleod <cherrytwist A gmail.com> says:
-# [This should match] Counter-Strike v1.6, [...] the slightly updated
-# Counter-Strike: Condition Zero, and the game Day Of Defeat, Team
-# Fortress Classic, Deathmatch Classic, Ricochet, Half-Life [1] Deathmatch,
-# and I imagine all the other 3rd party mods that also use this engine
-# will match that pattern.
-#
-# Gavin Pryke <gavinlee303 at googlemail.com> says:
-# Added "getstatus". Quake3 games were not being matched here until it was
-# added.
-
-quake-halflife
-# All quake (like) protocols start with 4x 0xFF. Then the client either
-# issues getinfo, getchallenge or getstatus.
-^\xff\xff\xff\xffget(info|challenge|status)
-
-# A previous quake pattern allowed the connection to start with only 2 bytes
-# of 0xFF. This doesn't seem to ever happen, but we should keep an eye out
-# for it.
-
diff --git a/src/usr/local/share/protocols/quake1.pat b/src/usr/local/share/protocols/quake1.pat
deleted file mode 100644
index 46bdebd..0000000
--- a/src/usr/local/share/protocols/quake1.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# Quake 1 - A popular computer game.
-# Pattern attributes: marginal veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Quake
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is untested and unconfirmed.
-
-# Info taken from http://www.gamers.org/dEngine/quake/QDP/qnp.html,
-# which says that it "is incomplete, inaccurate and only applies to
-# versions 0.91, 0.92, 1.00 and 1.01 of QUAKE"
-
-quake1
-# Connection request: 80 00 00 0c 01 51 55 41 4b 45 00 03
-# \x80 = control packet.
-# \x0c = packet length
-# \x01 = CCREQ_CONNECT
-# \x03 = protocol version (3 == 0.91, 0.92, 1.00, 1.01)
-^\x80\x0c\x01quake\x03
diff --git a/src/usr/local/share/protocols/quicktime.pat b/src/usr/local/share/protocols/quicktime.pat
deleted file mode 100644
index 5a6273d..0000000
--- a/src/usr/local/share/protocols/quicktime.pat
+++ /dev/null
@@ -1,21 +0,0 @@
-# Quicktime HTTP
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: streaming_video streaming_audio ietf_draft_standard
-# Wiki: http://protocolinfo.org/wiki/HTTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-# (Quick Time v6.5.1 downloading from www.apple.com/trailers)
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/HTTP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-#
-# Since this is a subset of HTTP, it should be put earlier in the packet
-# filtering chain than HTTP. Also, please don't use this to block Quicktime.
-# If you must do that, you should use a filtering HTTP proxy, which is probably
-# more accurate.
-
-quicktime
-user-agent: quicktime \(qtver=[0-9].[0-9].[0-9];os=[\x09-\x0d -~]+\)\x0d\x0a
-
diff --git a/src/usr/local/share/protocols/radmin.pat b/src/usr/local/share/protocols/radmin.pat
deleted file mode 100644
index d13aa65..0000000
--- a/src/usr/local/share/protocols/radmin.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# Famatech Remote Administrator - remote desktop for MS Windows
-# Pattern attributes: ok veryfast fast
-# Protocol groups: remote_access proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Radmin
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been verified with Radmin v1.1 and v3.0beta on Win2000/XP
-# It has only been tested between a single pair of computers.
-
-# The first packet of every TCP stream appears to be either one of:
-#
-# 01 00 00 00 01 00 00 00 08 08
-# 01 00 00 00 01 00 00 00 1b 1b
-
-radmin
-^\x01\x01(\x08\x08|\x1b\x1b)$
-
diff --git a/src/usr/local/share/protocols/rar.pat b/src/usr/local/share/protocols/rar.pat
deleted file mode 100644
index 1332af1..0000000
--- a/src/usr/local/share/protocols/rar.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# RAR - The WinRAR archive format
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-rar
-rar\x21\x1a\x07
diff --git a/src/usr/local/share/protocols/rdp.pat b/src/usr/local/share/protocols/rdp.pat
deleted file mode 100644
index 44b853f..0000000
--- a/src/usr/local/share/protocols/rdp.pat
+++ /dev/null
@@ -1,20 +0,0 @@
-# RDP - Remote Desktop Protocol (used in Windows Terminal Services)
-# Pattern attributes: ok notsofast notsofast
-# Protocol groups: remote_access proprietary
-# Wiki: http://www.protocolinfo.org/wiki/RDP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern was submitted by Michael Leong. It has been tested under the
-# following conditions: "WinXP Pro with all the patches, rdesktop server
-# running on port 7000 instead of 3389 --> WinXP Pro Remote Desktop Client."
-# Also tested is WinXP to Win 2000 Server.
-
-# At least one other person has reported it to work as well.
-
-rdp
-rdpdr.*cliprdr.*rdpsnd
-
-# Old pattern, submitted by Daniel Weatherford.
-# rdpdr.*cliprdp.*rdpsnd
-
-
diff --git a/src/usr/local/share/protocols/replaytv-ivs.pat b/src/usr/local/share/protocols/replaytv-ivs.pat
deleted file mode 100644
index aaf9255..0000000
--- a/src/usr/local/share/protocols/replaytv-ivs.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# ReplayTV Internet Video Sharing - Digital Video Recorder - http://replaytv.com
-# Pattern attributes: good fast fast
-# Protocol groups:
-# Wiki: http://www.protocolinfo.org/wiki/ReplayTV
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Pattern by jm 409 at hot mail dot com, who says that this one "worked best".
-
-replaytv-ivs
-^(get /ivs-IVSGetFileChunk|http/(0\.9|1\.0|1\.1) [1-5][0-9][0-9] [\x09-\x0d -~]*\x23\x23\x23\x23\x23REPLAY_CHUNK_START\x23\x23\x23\x23\x23)
-
diff --git a/src/usr/local/share/protocols/rlogin.pat b/src/usr/local/share/protocols/rlogin.pat
deleted file mode 100644
index 42c4f7e..0000000
--- a/src/usr/local/share/protocols/rlogin.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# rlogin - remote login - RFC 1282
-# Pattern attributes: ok fast fast
-# Protocol groups: remote_access ietf_rfc_documented
-# Wiki: http://www.protocolinfo.org/wiki/Rlogin
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 443
-#
-# This pattern is untested.
-
-rlogin
-# At least three characters (user name, user name, terminal type),
-# the first of which could be the first character of a user name, a
-# slash, then a terminal speed. (Assumes that usernames and terminal
-# types are alphanumeric only. I'm sure there are usernames like
-# "straitm-47" out there, but it's not common.) All terminal speeds
-# I know of end in two zeros and are between 3 and 6 digits long.
-# This pattern is uncomfortably general.
-^[a-z][a-z0-9][a-z0-9]+/[1-9][0-9]?[0-9]?[0-9]?00
diff --git a/src/usr/local/share/protocols/rpm.pat b/src/usr/local/share/protocols/rpm.pat
deleted file mode 100644
index 0302839..0000000
--- a/src/usr/local/share/protocols/rpm.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# RPM - Redhat Package Management packages
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-rpm
-\xed\xab\xee\xdb.?.?.?.?[1-7]
diff --git a/src/usr/local/share/protocols/rtf.pat b/src/usr/local/share/protocols/rtf.pat
deleted file mode 100644
index 676cb1a..0000000
--- a/src/usr/local/share/protocols/rtf.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# RTF - Rich Text Format - an open document format
-# Pattern attributes: good fast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-rtf
-\{\\rtf[12]
-
diff --git a/src/usr/local/share/protocols/rtmp.pat b/src/usr/local/share/protocols/rtmp.pat
deleted file mode 100644
index 2c7adad..0000000
--- a/src/usr/local/share/protocols/rtmp.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# Adobe Real Time Messaging Protocol(RTMP). By Jonathan A.P. Marpaung
-# Pattern attributes: works very fast
-# Protocol Groups: streaming_video streaming_audio
-# The RTMP Specification is availabe at
-# http://www.adobe.com/devnet/rtmp/pdf/rtmp_specification_1.0.pdf [^]
-#
-# First 12 bytes, starting at \x03 are the RTMP header. Next 25 bytes,
-# starting at \x02, are part of the RTMP body which is an AMF Object.
-# The first string "connect" is a command of the NetConnection class object.
-# The next string "app" is a Command Object which is followed by values
-# such as "video", .
-rtmp
-^\x03.+\x14.+\x02.+\x07.(connect)?.+(app)?
diff --git a/src/usr/local/share/protocols/rtp.pat b/src/usr/local/share/protocols/rtp.pat
deleted file mode 100644
index 61fcd8e..0000000
--- a/src/usr/local/share/protocols/rtp.pat
+++ /dev/null
@@ -1,33 +0,0 @@
-# RTP - Real-time Transport Protocol - RFC 3550
-# Pattern attributes: ok overmatch undermatch fast fast
-# Protocol groups: streaming_video ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/RTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# RTP headers are *very* short and compact. They have almost nothing in
-# them that can be matched by l7-filter. As RTP connections take place
-# between even numbered ports, you should probably check for that before
-# applying this pattern. If you want to match them along with their
-# associated SIP packets, you might try setting up some iptables rules
-# that watch for SIP packets and then also match any other UDP packets
-# that are going between the same two IP addresses.
-#
-# I think we can count on the first bit being 1 and the second bit being
-# 0 (meaning protocol version 2). The next two bits could go either way,
-# but in the example I've seen, they are zero, so I'll assume they are
-# usually zero. The next four bits are a count of "contributing source
-# identifiers". I'm not sure how big that could be, but in the example
-# I've seen, they're zero, so I'll assume they're usually zero. So that
-# gives us ^\x80. The next bit is a tossup. Next is the payload type, 7
-# bits. I've taken likely values from the WireShark code: 0-34, 96-127
-# (decimal). The rest of the header is random numbers (sequence number,
-# timestamp, synchronization source identifier), so that's no help at
-# all.
-
-rtp
-^\x80[\x01-"`-\x7f\x80-\xa2\xe0-\xff]?..........*\x80
-
-# Might also try this. It's a bit slower (one packet and not too much extra
-# regexec load) and a bit more accurate:
-#^\x80[\x01-"`-\x7f\x80-\xa2\xe0-\xff]?..........*\x80.*\x80
-
diff --git a/src/usr/local/share/protocols/rtsp.pat b/src/usr/local/share/protocols/rtsp.pat
deleted file mode 100644
index 1013ae3..0000000
--- a/src/usr/local/share/protocols/rtsp.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# RTSP - Real Time Streaming Protocol - http://www.rtsp.org - RFC 2326
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: streaming_video ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/RTSP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 554
-#
-# To take full advantage of this pattern, please see the RTSP connection
-# tracking patch to the Linux kernel referenced at the above site.
-#
-# This pattern has been tested and is believed to work well.
-
-rtsp
-rtsp/1.0 200 ok
diff --git a/src/usr/local/share/protocols/runesofmagic.pat b/src/usr/local/share/protocols/runesofmagic.pat
deleted file mode 100644
index 6fbfea4..0000000
--- a/src/usr/local/share/protocols/runesofmagic.pat
+++ /dev/null
@@ -1,63 +0,0 @@
-# Runes of Magic - game - http://www.runesofmagic.com
-# Pattern attributes: ok veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Runes_of_Magic
-# Copyright (C) 2008 Matthew Strait; See ../LICENSE
-
-runesofmagic
-^\x10\x03...........\x0a\x02.....\x0e
-# See below (this is also veryfast fast)
-#^\x10\x03...........?\x0a\x02.....?$
-
-# Greatwolf captured the following:
-#
-# Server:
-#
-# 10 00 00 00 03 78 76 7a 1e 8a dd b5 95 a3 3a de .....xvz ......:.
-# 0a 00 00 00 02 df 85 cc cc cc ........ ..
-#
-# Client reply:
-#
-# 0e 00 00 00 02 28 82 cc cc cc 8b c9 cc cc .....(.. ......
-#
-# Server:
-#
-# 2e 00 00 00 02 1e 7f f4 f4 f4 ef f4 f4 f4 b3 8c ........ ........
-# [...]
-#
-# And says: "Bytes 10 00 00 00 03, 0a 00 00 00 02 and 0e (client reply)
-# were consistently present.
-#
-# ^\x10\x03...........\x0a\x02.....\x0e
-#
-# Pattern was able to match during the closed beta period. It is still
-# matching okay after RoM started open beta but could definitely use
-# more testing from others to verify effectiveness."
-#
-# Matthew Strait says:
-#
-# * If the server consistently sends those four bytes in the first packet,
-# it is probably wasteful to wait for the next (client) packet before
-# matching.
-#
-# * If we switch the match strategy to just looking at the first packet, and
-# the first packet is always the same (or nearly the same) length, we can
-# anchor (i.e. use a '$') at the end of the packet.
-#
-# * When there's a string of bytes that I don't understand and that take
-# different values from connection to connection, I think it's good to allow
-# for the possibility that at least one might be \x00, and so I'd make one
-# of the "." into ".?", unless you *know* that \x00 is impossible somehow.
-#
-# * All of those \xcc bytes don't look random to me. Your comments suggest
-# that it isn't always exactly like that, but is there always pattern of
-# repeated bytes or something else that might be useful? It probably isn't
-# necessary to exploit this, since it looks like there's already enough to
-# go with, but it would be nice to understand.
-#
-# So perhaps it would be an improvement to use:
-#
-# ^\x10\x03...........?\x0a\x02.....?$
-#
-# but this depends on the assumptions I made above.
-
diff --git a/src/usr/local/share/protocols/shoutcast.pat b/src/usr/local/share/protocols/shoutcast.pat
deleted file mode 100644
index e78883c..0000000
--- a/src/usr/local/share/protocols/shoutcast.pat
+++ /dev/null
@@ -1,27 +0,0 @@
-# Shoutcast and Icecast - streaming audio
-# Pattern attributes: good slow notsofast
-# Protocol groups: streaming_audio
-# Wiki: http://www.protocolinfo.org/wiki/Icecast
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 80
-#
-# Original pattern contributed by Deepak Seshadri <dseshadri AT
-# broadbandmaritime.com> who says "The difference between [Shoutcast and
-# Icecast] is not clearly mentioned anywhere. According to this
-# document, my pattern would filter JUST shoutcast packets."
-#
-# Should now match both Shoutcast and Icecast. Tested with Winamp (in
-# 2005) and Totem using streams at dir.xiph.org (in Nov 2007).
-#
-# http://sander.vanzoest.com/talks/2002/audio_and_apache/
-# http://forums.radiotoolbox.com/viewtopic.php?t=74
-# http://www.icecast.org
-
-shoutcast
-# The first branch looks for an HTTP request that looks like it is asking for
-# a SHOUTcast stream. The second branch looks for the server's reply. However,
-# some (newer?) servers answer with "http/1.0 200 OK", not "ICY 200 OK", so
-# this will not work.
-# This pattern was discovered using Ethereal.
-^get /.*icy-metadata:1|icy [1-5][0-9][0-9] [\x09-\x0d -~]*(content-type:audio|icy-)
diff --git a/src/usr/local/share/protocols/sip.pat b/src/usr/local/share/protocols/sip.pat
deleted file mode 100644
index 2728009..0000000
--- a/src/usr/local/share/protocols/sip.pat
+++ /dev/null
@@ -1,20 +0,0 @@
-# SIP - Session Initiation Protocol - Internet telephony - RFC 3261, 3265, etc.
-# Pattern attributes: good fast fast
-# Protocol groups: voip ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/SIP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested with the Ubiquity SIP user agent and has been
-# confirmed by at least one other user.
-#
-# Thanks to Ankit Desai for this pattern. Updated by tehseen sagar.
-#
-# SIP typically uses port 5060.
-#
-# This pattern is based on SIP request format as per RFC 3261. I'm not
-# sure about the version part. The RFC doesn't say anything about it, so
-# I have allowed version ranging from 0.x to 2.x.
-
-#Request-Line = Method SP Request-URI SP SIP-Version CRLF
-sip
-^(invite|register|cancel|message|subscribe|notify) sip[\x09-\x0d -~]*sip/[0-2]\.[0-9]
diff --git a/src/usr/local/share/protocols/skypeout.pat b/src/usr/local/share/protocols/skypeout.pat
deleted file mode 100644
index 55e4e10..0000000
--- a/src/usr/local/share/protocols/skypeout.pat
+++ /dev/null
@@ -1,50 +0,0 @@
-# Skype to phone - UDP voice call (program to POTS phone) - http://skype.com
-# Pattern attributes: ok slow notsofast overmatch
-# Protocol groups: voip p2p proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Skype
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# Thanks to Myles Uyema, mylesuyema AT gmail.com
-
-# Taken using Ethereal traces of Windows Skype v1.2.037, same in v1.2.0.18_API
-#
-# Skype will attempt to use the same UDP port for all its connections as
-# configured in its options. However, this is a random port by default.
-# Skype has some preference for ports 80 and 443.
-#
-# Example sessions:
-#
-#SkypeOut <USA phone number>
-#c6 5c bf 41 8e 8d d6 d2 08 <-- this is sometimes as short as 1 byte and
-#c6 5c bf 41 8e 8d d6 d2 08 <-- sometimes as long as 9 (or more?)
-#00 6b 2c f5 87 f1 06
-#00 6b 2c f5 87 f1 06
-#00 6b 2c f5 36 ea 85
-#00 6b 2c f5 36 ea 85
-#00 6b 2c f5 57 27 d4
-#00 6b 2c f5 57 27 d4
-#00 6b 2c f5 43 5b 00
-#00 6b 2c f5 43 5b 00
-#
-#SkypeOut <USA phone number>
-#7e 4f e5 b8
-#7e 4f e5 b8
-#00 6b 88 61 80 52 93
-#00 6b 88 61 80 52 93
-#00 6b 88 61 1a 09 e9
-#00 6b 88 61 1a 09 e9
-#00 6b 88 61 47 43 c4
-#00 6b 88 61 47 43 c4
-
-skypeout
-
-# Scary. Our regular expressions suck. This is a prime candidate for
-# some sort of a scheme to support two different regular expressions
-# when there's a major difference between what the two libraries allow.
-# For the Henry Spencer library, there's not much that can be done
-# except requiring that we see the same byte twice.
-
-# This matches about %4 of random streams and 13% of printable random streams
-
-# This is slow, but not as bad as you might think.
-^(\x01.?.?.?.?.?.?.?.?\x01|\x02.?.?.?.?.?.?.?.?\x02|\x03.?.?.?.?.?.?.?.?\x03|\x04.?.?.?.?.?.?.?.?\x04|\x05.?.?.?.?.?.?.?.?\x05|\x06.?.?.?.?.?.?.?.?\x06|\x07.?.?.?.?.?.?.?.?\x07|\x08.?.?.?.?.?.?.?.?\x08|\x09.?.?.?.?.?.?.?.?\x09|\x0a.?.?.?.?.?.?.?.?\x0a|\x0b.?.?.?.?.?.?.?.?\x0b|\x0c.?.?.?.?.?.?.?.?\x0c|\x0d.?.?.?.?.?.?.?.?\x0d|\x0e.?.?.?.?.?.?.?.?\x0e|\x0f.?.?.?.?.?.?.?.?\x0f|\x10.?.?.?.?.?.?.?.?\x10|\x11.?.?.?.?.?.?.?.?\x11|\x12.?.?.?.?.?.?.?.?\x12|\x13.?.?.?.?.?.?.?.?\x13|\x14.?.?.?.?.?.?.?.?\x14|\x15.?.?.?.?.?.?.?.?\x15|\x16.?.?.?.?.?.?.?.?\x16|\x17.?.?.?.?.?.?.?.?\x17|\x18.?.?.?.?.?.?.?.?\x18|\x19.?.?.?.?.?.?.?.?\x19|\x1a.?.?.?.?.?.?.?.?\x1a|\x1b.?.?.?.?.?.?.?.?\x1b|\x1c.?.?.?.?.?.?.?.?\x1c|\x1d.?.?.?.?.?.?.?.?\x1d|\x1e.?.?.?.?.?.?.?.?\x1e|\x1f.?.?.?.?.?.?.?.?\x1f|\x20.?.?.?.?.?.?.?.?\x20|\x21.?.?.?.?.?.?.?.?\x21|\x22.?.?.?.?.?.?.?.?\x22|\x23.?.?.?.?.?.?.?.?\x23|\$.?.?.?.?.?.?.?.?\$|\x25.?.?.?.?.?.?.?.?\x25|\x26.?.?.?.?.?.?.?.?\x26|\x27.?.?.?.?.?.?.?.?\x27|\(.?.?.?.?.?.?.?.?\(|\).?.?.?.?.?.?.?.?\)|\*.?.?.?.?.?.?.?.?\*|\+.?.?.?.?.?.?.?.?\+|\x2c.?.?.?.?.?.?.?.?\x2c|\x2d.?.?.?.?.?.?.?.?\x2d|\..?.?.?.?.?.?.?.?\.|\x2f.?.?.?.?.?.?.?.?\x2f|\x30.?.?.?.?.?.?.?.?\x30|\x31.?.?.?.?.?.?.?.?\x31|\x32.?.?.?.?.?.?.?.?\x32|\x33.?.?.?.?.?.?.?.?\x33|\x34.?.?.?.?.?.?.?.?\x34|\x35.?.?.?.?.?.?.?.?\x35|\x36.?.?.?.?.?.?.?.?\x36|\x37.?.?.?.?.?.?.?.?\x37|\x38.?.?.?.?.?.?.?.?\x38|\x39.?.?.?.?.?.?.?.?\x39|\x3a.?.?.?.?.?.?.?.?\x3a|\x3b.?.?.?.?.?.?.?.?\x3b|\x3c.?.?.?.?.?.?.?.?\x3c|\x3d.?.?.?.?.?.?.?.?\x3d|\x3e.?.?.?.?.?.?.?.?\x3e|\?.?.?.?.?.?.?.?.?\?|\x40.?.?.?.?.?.?.?.?\x40|\x41.?.?.?.?.?.?.?.?\x41|\x42.?.?.?.?.?.?.?.?\x42|\x43.?.?.?.?.?.?.?.?\x43|\x44.?.?.?.?.?.?.?.?\x44|\x45.?.?.?.?.?.?.?.?\x45|\x46.?.?.?.?.?.?.?.?\x46|\x47.?.?.?.?.?.?.?.?\x47|\x48.?.?.?.?.?.?.?.?\x48|\x49.?.?.?.?.?.?.?.?\x49|\x4a.?.?.?.?.?.?.?.?\x4a|\x4b.?.?.?.?.?.?.?.?\x4b|\x4c.?.?.?.?.?.?.?.?\x4c|\x4d.?.?.?.?.?.?.?.?\x4d|\x4e.?.?.?.?.?.?.?.?\x4e|\x4f.?.?.?.?.?.?.?.?\x4f|\x50.?.?.?.?.?.?.?.?\x50|\x51.?.?.?.?.?.?.?.?\x51|\x52.?.?.?.?.?.?.?.?\x52|\x53.?.?.?.?.?.?.?.?\x53|\x54.?.?.?.?.?.?.?.?\x54|\x55.?.?.?.?.?.?.?.?\x55|\x56.?.?.?.?.?.?.?.?\x56|\x57.?.?.?.?.?.?.?.?\x57|\x58.?.?.?.?.?.?.?.?\x58|\x59.?.?.?.?.?.?.?.?\x59|\x5a.?.?.?.?.?.?.?.?\x5a|\[.?.?.?.?.?.?.?.?\[|\\.?.?.?.?.?.?.?.?\\|\].?.?.?.?.?.?.?.?\]|\^.?.?.?.?.?.?.?.?\^|\x5f.?.?.?.?.?.?.?.?\x5f|\x60.?.?.?.?.?.?.?.?\x60|\x61.?.?.?.?.?.?.?.?\x61|\x62.?.?.?.?.?.?.?.?\x62|\x63.?.?.?.?.?.?.?.?\x63|\x64.?.?.?.?.?.?.?.?\x64|\x65.?.?.?.?.?.?.?.?\x65|\x66.?.?.?.?.?.?.?.?\x66|\x67.?.?.?.?.?.?.?.?\x67|\x68.?.?.?.?.?.?.?.?\x68|\x69.?.?.?.?.?.?.?.?\x69|\x6a.?.?.?.?.?.?.?.?\x6a|\x6b.?.?.?.?.?.?.?.?\x6b|\x6c.?.?.?.?.?.?.?.?\x6c|\x6d.?.?.?.?.?.?.?.?\x6d|\x6e.?.?.?.?.?.?.?.?\x6e|\x6f.?.?.?.?.?.?.?.?\x6f|\x70.?.?.?.?.?.?.?.?\x70|\x71.?.?.?.?.?.?.?.?\x71|\x72.?.?.?.?.?.?.?.?\x72|\x73.?.?.?.?.?.?.?.?\x73|\x74.?.?.?.?.?.?.?.?\x74|\x75.?.?.?.?.?.?.?.?\x75|\x76.?.?.?.?.?.?.?.?\x76|\x77.?.?.?.?.?.?.?.?\x77|\x78.?.?.?.?.?.?.?.?\x78|\x79.?.?.?.?.?.?.?.?\x79|\x7a.?.?.?.?.?.?.?.?\x7a|\{.?.?.?.?.?.?.?.?\{|\|.?.?.?.?.?.?.?.?\||\}.?.?.?.?.?.?.?.?\}|\x7e.?.?.?.?.?.?.?.?\x7e|\x7f.?.?.?.?.?.?.?.?\x7f|\x80.?.?.?.?.?.?.?.?\x80|\x81.?.?.?.?.?.?.?.?\x81|\x82.?.?.?.?.?.?.?.?\x82|\x83.?.?.?.?.?.?.?.?\x83|\x84.?.?.?.?.?.?.?.?\x84|\x85.?.?.?.?.?.?.?.?\x85|\x86.?.?.?.?.?.?.?.?\x86|\x87.?.?.?.?.?.?.?.?\x87|\x88.?.?.?.?.?.?.?.?\x88|\x89.?.?.?.?.?.?.?.?\x89|\x8a.?.?.?.?.?.?.?.?\x8a|\x8b.?.?.?.?.?.?.?.?\x8b|\x8c.?.?.?.?.?.?.?.?\x8c|\x8d.?.?.?.?.?.?.?.?\x8d|\x8e.?.?.?.?.?.?.?.?\x8e|\x8f.?.?.?.?.?.?.?.?\x8f|\x90.?.?.?.?.?.?.?.?\x90|\x91.?.?.?.?.?.?.?.?\x91|\x92.?.?.?.?.?.?.?.?\x92|\x93.?.?.?.?.?.?.?.?\x93|\x94.?.?.?.?.?.?.?.?\x94|\x95.?.?.?.?.?.?.?.?\x95|\x96.?.?.?.?.?.?.?.?\x96|\x97.?.?.?.?.?.?.?.?\x97|\x98.?.?.?.?.?.?.?.?\x98|\x99.?.?.?.?.?.?.?.?\x99|\x9a.?.?.?.?.?.?.?.?\x9a|\x9b.?.?.?.?.?.?.?.?\x9b|\x9c.?.?.?.?.?.?.?.?\x9c|\x9d.?.?.?.?.?.?.?.?\x9d|\x9e.?.?.?.?.?.?.?.?\x9e|\x9f.?.?.?.?.?.?.?.?\x9f|\xa0.?.?.?.?.?.?.?.?\xa0|\xa1.?.?.?.?.?.?.?.?\xa1|\xa2.?.?.?.?.?.?.?.?\xa2|\xa3.?.?.?.?.?.?.?.?\xa3|\xa4.?.?.?.?.?.?.?.?\xa4|\xa5.?.?.?.?.?.?.?.?\xa5|\xa6.?.?.?.?.?.?.?.?\xa6|\xa7.?.?.?.?.?.?.?.?\xa7|\xa8.?.?.?.?.?.?.?.?\xa8|\xa9.?.?.?.?.?.?.?.?\xa9|\xaa.?.?.?.?.?.?.?.?\xaa|\xab.?.?.?.?.?.?.?.?\xab|\xac.?.?.?.?.?.?.?.?\xac|\xad.?.?.?.?.?.?.?.?\xad|\xae.?.?.?.?.?.?.?.?\xae|\xaf.?.?.?.?.?.?.?.?\xaf|\xb0.?.?.?.?.?.?.?.?\xb0|\xb1.?.?.?.?.?.?.?.?\xb1|\xb2.?.?.?.?.?.?.?.?\xb2|\xb3.?.?.?.?.?.?.?.?\xb3|\xb4.?.?.?.?.?.?.?.?\xb4|\xb5.?.?.?.?.?.?.?.?\xb5|\xb6.?.?.?.?.?.?.?.?\xb6|\xb7.?.?.?.?.?.?.?.?\xb7|\xb8.?.?.?.?.?.?.?.?\xb8|\xb9.?.?.?.?.?.?.?.?\xb9|\xba.?.?.?.?.?.?.?.?\xba|\xbb.?.?.?.?.?.?.?.?\xbb|\xbc.?.?.?.?.?.?.?.?\xbc|\xbd.?.?.?.?.?.?.?.?\xbd|\xbe.?.?.?.?.?.?.?.?\xbe|\xbf.?.?.?.?.?.?.?.?\xbf|\xc0.?.?.?.?.?.?.?.?\xc0|\xc1.?.?.?.?.?.?.?.?\xc1|\xc2.?.?.?.?.?.?.?.?\xc2|\xc3.?.?.?.?.?.?.?.?\xc3|\xc4.?.?.?.?.?.?.?.?\xc4|\xc5.?.?.?.?.?.?.?.?\xc5|\xc6.?.?.?.?.?.?.?.?\xc6|\xc7.?.?.?.?.?.?.?.?\xc7|\xc8.?.?.?.?.?.?.?.?\xc8|\xc9.?.?.?.?.?.?.?.?\xc9|\xca.?.?.?.?.?.?.?.?\xca|\xcb.?.?.?.?.?.?.?.?\xcb|\xcc.?.?.?.?.?.?.?.?\xcc|\xcd.?.?.?.?.?.?.?.?\xcd|\xce.?.?.?.?.?.?.?.?\xce|\xcf.?.?.?.?.?.?.?.?\xcf|\xd0.?.?.?.?.?.?.?.?\xd0|\xd1.?.?.?.?.?.?.?.?\xd1|\xd2.?.?.?.?.?.?.?.?\xd2|\xd3.?.?.?.?.?.?.?.?\xd3|\xd4.?.?.?.?.?.?.?.?\xd4|\xd5.?.?.?.?.?.?.?.?\xd5|\xd6.?.?.?.?.?.?.?.?\xd6|\xd7.?.?.?.?.?.?.?.?\xd7|\xd8.?.?.?.?.?.?.?.?\xd8|\xd9.?.?.?.?.?.?.?.?\xd9|\xda.?.?.?.?.?.?.?.?\xda|\xdb.?.?.?.?.?.?.?.?\xdb|\xdc.?.?.?.?.?.?.?.?\xdc|\xdd.?.?.?.?.?.?.?.?\xdd|\xde.?.?.?.?.?.?.?.?\xde|\xdf.?.?.?.?.?.?.?.?\xdf|\xe0.?.?.?.?.?.?.?.?\xe0|\xe1.?.?.?.?.?.?.?.?\xe1|\xe2.?.?.?.?.?.?.?.?\xe2|\xe3.?.?.?.?.?.?.?.?\xe3|\xe4.?.?.?.?.?.?.?.?\xe4|\xe5.?.?.?.?.?.?.?.?\xe5|\xe6.?.?.?.?.?.?.?.?\xe6|\xe7.?.?.?.?.?.?.?.?\xe7|\xe8.?.?.?.?.?.?.?.?\xe8|\xe9.?.?.?.?.?.?.?.?\xe9|\xea.?.?.?.?.?.?.?.?\xea|\xeb.?.?.?.?.?.?.?.?\xeb|\xec.?.?.?.?.?.?.?.?\xec|\xed.?.?.?.?.?.?.?.?\xed|\xee.?.?.?.?.?.?.?.?\xee|\xef.?.?.?.?.?.?.?.?\xef|\xf0.?.?.?.?.?.?.?.?\xf0|\xf1.?.?.?.?.?.?.?.?\xf1|\xf2.?.?.?.?.?.?.?.?\xf2|\xf3.?.?.?.?.?.?.?.?\xf3|\xf4.?.?.?.?.?.?.?.?\xf4|\xf5.?.?.?.?.?.?.?.?\xf5|\xf6.?.?.?.?.?.?.?.?\xf6|\xf7.?.?.?.?.?.?.?.?\xf7|\xf8.?.?.?.?.?.?.?.?\xf8|\xf9.?.?.?.?.?.?.?.?\xf9|\xfa.?.?.?.?.?.?.?.?\xfa|\xfb.?.?.?.?.?.?.?.?\xfb|\xfc.?.?.?.?.?.?.?.?\xfc|\xfd.?.?.?.?.?.?.?.?\xfd|\xfe.?.?.?.?.?.?.?.?\xfe|\xff.?.?.?.?.?.?.?.?\xff)
diff --git a/src/usr/local/share/protocols/skypetoskype.pat b/src/usr/local/share/protocols/skypetoskype.pat
deleted file mode 100644
index ed1103a..0000000
--- a/src/usr/local/share/protocols/skypetoskype.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# Skype to Skype - UDP voice call (program to program) - http://skype.com
-# Pattern attributes: ok veryfast fast overmatch
-# Protocol groups: voip p2p proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Skype
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This matches at least some of the general chatter that occurs when the
-# user isn't doing anything as well as actual calls.
-# Thanks to Myles Uyema, mylesuyema AT gmail.com
-
-skypetoskype
-# require at least 16 bytes (my limited tests always get at least 18)
-^..\x02.............
-
diff --git a/src/usr/local/share/protocols/smb.pat b/src/usr/local/share/protocols/smb.pat
deleted file mode 100644
index c1f8b0a..0000000
--- a/src/usr/local/share/protocols/smb.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# Samba/SMB - Server Message Block - Microsoft Windows filesharing
-# Pattern attributes: good fast notsofast
-# Protocol groups: document_retrieval networking proprietary
-# Wiki: http://www.protocolinfo.org/wiki/SMB
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# "This protocol is sometimes also referred to as the Common Internet File
-# System (CIFS), LanManager or NetBIOS protocol." -- "man samba"
-#
-# Actually, SMB is a higher level protocol than NetBIOS. However, the
-# NetBIOS header is only 4 bytes: not much to match on.
-#
-# http://www.ubiqx.org/cifs/SMB.html
-#
-# This pattern is lightly tested.
-
-smb
-# matches a NEGOTIATE PROTOCOL or TRANSACTION REQUEST command
-\xffsmb[\x72\x25]
diff --git a/src/usr/local/share/protocols/smtp.pat b/src/usr/local/share/protocols/smtp.pat
deleted file mode 100644
index 2f5d195..0000000
--- a/src/usr/local/share/protocols/smtp.pat
+++ /dev/null
@@ -1,40 +0,0 @@
-# SMTP - Simple Mail Transfer Protocol - RFC 2821 (See also RFC 1869)
-# Pattern attributes: great notsofast fast
-# Protocol groups: mail ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/SMTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 25
-#
-# This pattern has been tested and is believed to work well.
-
-# As usual, no text is required after "220", but all known servers have some
-# there. It (almost?) always has string "smtp" in it. The RFC examples
-# does not, so we match those too, just in case anyone has copied them
-# literally.
-#
-# Some examples:
-# 220 mail.stalker.com ESMTP CommuniGate Pro 4.1.3
-# 220 mail.vieodata.com ESMTP Merak 6.1.0; Mon, 15 Sep 2003 13:48:11 -0400
-# 220 mail.ut.caldera.com ESMTP
-# 220 persephone.pmail.gen.nz ESMTP server ready.
-# 220 smtp1.superb.net ESMTP
-# 220 mail.kerio.com Kerio MailServer 5.6.7 ESMTP ready
-# 220-mail.deerfield.com ESMTP VisNetic.MailServer.v6.0.9.0; Mon, 15 Sep 2003 13:4
-# 220 altn.com ESMTP MDaemon 6.8.5; Mon, 15 Sep 2003 12:46:42 -0500
-# 220 X1 NT-ESMTP Server ipsmin0165atl2.interland.net (IMail 6.06 73062-3)
-# 220 mail.icewarp.com ESMTP Merak 6.1.1; Mon, 15 Sep 2003 19:43:23 +0200
-# 220-mail.email-scan.com ESMTP
-# 220 smaug.dreamhost.com ESMTP
-# 220 kona.carleton.edu -- Server ESMTP (PMDF V6.2#30648)
-# 220 letra.reed.edu ESMTP Sendmail 8.12.9/8.12.9; Mon, 15 Sep 2003 10:35:57 -0700 (PDT)
-# 220-swan.mail.pas.earthlink.net ESMTP Exim 3.33 #1 Mon, 15 Sep 2003 10:32:15 -0700
-#
-# RFC examples:
-# 220 xyz.com Simple Mail Transfer Service Ready (RFC example)
-# 220 dbc.mtview.ca.us SMTP service ready
-
-smtp
-^220[\x09-\x0d -~]* (e?smtp|simple mail)
-userspace pattern=^220[\x09-\x0d -~]* (E?SMTP|[Ss]imple [Mm]ail)
-userspace flags=REG_NOSUB REG_EXTENDED
diff --git a/src/usr/local/share/protocols/snmp-mon.pat b/src/usr/local/share/protocols/snmp-mon.pat
deleted file mode 100644
index fe22662..0000000
--- a/src/usr/local/share/protocols/snmp-mon.pat
+++ /dev/null
@@ -1,32 +0,0 @@
-# SNMP Monitoring - Simple Network Management Protocol (RFC1157)
-# Pattern attributes: good veryfast fast subset
-# Protocol groups: networking ietf_internet_standard
-# Wiki: http://en.wikipedia.org/wiki/SNMP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on UDP ports 161
-#
-# These filters match SNMPv1 packets without fail, and are made
-# as specific as possible not to match any ASN.1 encoded protocols.
-# However these could still be matched by other protocols that
-# use ASN.1 encoding
-
-# Contributed by Goli SriSairam <goli_sai AT yahoo.com>
-
-# This pattern has been tested and is believe to work well.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/SNMP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-
-# SNMPv1 GET/GETNEXT/SET request and response
-# matches SNMP header
-# version \x02\x01
-# community \x04.+
-# PDU type [\xa0-\xa3] (GET/GETNEXT/SET/GETRESPONSE)
-# RequestId \x02[\x01-\x04].?.?.?.?
-# errorStatus \x02\x01.?
-# errorIndex \x02\x01.?
-# varbinds start \x30
-snmp-mon
-^\x02\x01\x04.+[\xa0-\xa3]\x02[\x01-\x04].?.?.?.?\x02\x01.?\x02\x01.?\x30
diff --git a/src/usr/local/share/protocols/snmp-trap.pat b/src/usr/local/share/protocols/snmp-trap.pat
deleted file mode 100644
index e8ba19a..0000000
--- a/src/usr/local/share/protocols/snmp-trap.pat
+++ /dev/null
@@ -1,33 +0,0 @@
-# SNMP Traps - Simple Network Management Protocol (RFC1157)
-# Pattern attributes: good veryfast fast subset
-# Protocol groups: networking ietf_internet_standard
-# Wiki: http://en.wikipedia.org/wiki/SNMP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on UDP ports 162
-#
-# These filters match SNMPv1 packets without fail, and are made
-# as specific as possible not to match any ASN.1 encoded protocols.
-# However these could still be matched by other protocols that
-# use ASN.1 encoding
-
-# Contributed by Goli SriSairam <goli_sai AT yahoo.com>
-
-# This pattern has been tested and is believe to work well.
-#
-# To get or provide more information about this protocol and/or pattern:
-# http://www.protocolinfo.org/wiki/SNMP
-# http://lists.sourceforge.net/lists/listinfo/l7-filter-developers
-
-# SNMPv1 Trap
-# matches SNMP trap header
-# version \x02\x01
-# community string \x04.+
-# PDU type \xa4 (TRAP)
-# enterprise \x06.+
-# agent address \x40\x04\.?.?.?.?
-# trap type \x02\x01.?
-# specific trap type \x02\x01.?
-# timestamp \x43
-snmp-trap
-^\x02\x01\x04.+\xa4\x06.+\x40\x04.?.?.?.?\x02\x01.?\x02\x01.?\x43
diff --git a/src/usr/local/share/protocols/snmp.pat b/src/usr/local/share/protocols/snmp.pat
deleted file mode 100644
index a7186b2..0000000
--- a/src/usr/local/share/protocols/snmp.pat
+++ /dev/null
@@ -1,19 +0,0 @@
-# SNMP - Simple Network Management Protocol - RFC 1157
-# Pattern attributes: good veryfast fast superset
-# Protocol groups: networking ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/SNMP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on UDP ports 161 (monitoring) and 162 (traps).
-#
-# These filters match SNMPv1 packets without fail, and are made as
-# specific as possible not to match any ASN.1 encoded protocols. However
-# these could still be matched by other protocols that use ASN.1 encoding
-
-# Contributed by Goli SriSairam <goli_sai AT yahoo.com>
-
-# This pattern has been tested and is believed to work well.
-
-# All SNMPv1 traffic. See snmp-mon.pat and snmp-trap.pat for details.
-snmp
-^\x02\x01\x04.+([\xa0-\xa3]\x02[\x01-\x04].?.?.?.?\x02\x01.?\x02\x01.?\x30|\xa4\x06.+\x40\x04.?.?.?.?\x02\x01.?\x02\x01.?\x43)
diff --git a/src/usr/local/share/protocols/socks.pat b/src/usr/local/share/protocols/socks.pat
deleted file mode 100644
index 54189fd..0000000
--- a/src/usr/local/share/protocols/socks.pat
+++ /dev/null
@@ -1,32 +0,0 @@
-# SOCKS Version 5 - Firewall traversal protocol - RFC 1928
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: networking ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/SOCKS
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 1080
-# Also useful: http://www.iana.org/assignments/socks-methods
-#
-# We have had two reports that this pattern works.
-
-# method request, no private methods \x05[\x01-\x08]*
-# method reply, assumes sucess \x05[\x01-\x08]?
-# method dependent sub-negotiation .*
-# request, ipv4 only \x05[\x01-\x03][\x01\x03].*
-# reply \x05[\x01-\x08]?[\x01\x03].*
-
-# username/password method
-# u/p request, assuming reasonable usernames and passwords
-# \x05[\x02-\x10][a-z][a-z0-9\-]*[\x05-\x20][!-~]*
-# server reply
-# \x05
-
-# GSSAPI method
-# client initial token \x01\x01\x02.*
-# server reply \x01\x01\x02.*
-
-# any other method .* (all methods boil down to this until we have information
-# about all the commonly used ones)
-
-socks
-\x05[\x01-\x08]*\x05[\x01-\x08]?.*\x05[\x01-\x03][\x01\x03].*\x05[\x01-\x08]?[\x01\x03]
diff --git a/src/usr/local/share/protocols/soribada.pat b/src/usr/local/share/protocols/soribada.pat
deleted file mode 100644
index e1c0c56..0000000
--- a/src/usr/local/share/protocols/soribada.pat
+++ /dev/null
@@ -1,51 +0,0 @@
-# Soribada - A Korean P2P filesharing program/protocol - http://www.soribada.com
-# Pattern attributes: good slow notsofast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Soribada
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# I am told that there are three versions of this protocol, the first no
-# longer being used. That would probably explain why incoming searches
-# have two different formats...
-
-# There are three parts to Soribada protocal:
-# 1: Ping/Pong to establish a relationship on the net (UDP with 2 useful bytes)
-# 2: Searching (in two formats) (UDP with two short easy to match starts)
-# 3: Download requests/transfers (TCP with an obvious first packet)
-
-# 1 -- Pings/Pongs:
-# Requester send 2 bytes and a 6 byte response is sent back.
-# \x10 for the first byte and \x14-\x16 for the second.
-# The response is the first byte (\x10) and the second byte incremented
-# by 1 (\x15-\x17).
-# No further communication happens between the hosts except for searches.
-# A regex match: ^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
-# First Packet ---^^^^^^^^^^^^^^^
-# Second Packet -----------------^^^^^^^^^^^^^^^^^^^^^^^
-
-# 2 -- Search requests:
-# All searches are totally stateless and are only responded to if the user
-# actually has the file.
-# Both format start with a \x01 byte, have 3 "random bytes" and then 3 bytes
-# corasponding to one of two formats.
-# Format 1 is \x51\x3a\+ and format 2 is \x51\x32\x3a
-# A regex match: ^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)
-
-# 3 -- Download requests:
-# All downloads start with "GETMP3\x0d\x0aFilename"
-# A regex match: ^GETMP3\x0d\x0aFilename
-
-soribada
-
-# This will match the second packet of two.
-# ^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
-
-# Again, matching this is the end of the comunication.
-# ^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)
-
-# This is the start of the transfer and an easy match
-#^GETMP3\x0d\x0aFilename
-
-# This will match everything including the udp packet portions
-^GETMP3\x0d\x0aFilename|^\x01.?.?.?(\x51\x3a\+|\x51\x32\x3a)|^\x10[\x14-\x16]\x10[\x15-\x17].?.?.?.?$
-
diff --git a/src/usr/local/share/protocols/soulseek.pat b/src/usr/local/share/protocols/soulseek.pat
deleted file mode 100644
index ebc06ab..0000000
--- a/src/usr/local/share/protocols/soulseek.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# Soulseek - P2P filesharing - http://slsknet.org
-# Pattern attributes: good fast fast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Soulseek
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# All my tests show that this pattern is fast, but one user has reported that
-# it is slow. Your milage may vary.
-
-# This has been tested and works for "pierce firewall" commands and file
-# transfers. It does *not* match all the various sorts of chatter that go on,
-# such as searches, pings and whatnot.
-
-soulseek
-# (Pierce firewall: in theory the token could be 4 bytes, but the last two
-# seem to always be zero.|download: Peer Init)
-^(\x05..?|.\x01.[ -~]+\x01F..?.?.?.?.?.?.?)$
diff --git a/src/usr/local/share/protocols/ssdp.pat b/src/usr/local/share/protocols/ssdp.pat
deleted file mode 100644
index d2de92d..0000000
--- a/src/usr/local/share/protocols/ssdp.pat
+++ /dev/null
@@ -1,21 +0,0 @@
-# SSDP - Simple Service Discovery Protocol - easy discovery of network devices
-# Pattern attributes: good slow notsofast
-# Protocol groups: networking ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/SSDP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This pattern was tested only by listening to a Linksys WRT54G. However,
-# I expect it works in general given the simplicity of the protocol.
-
-# SSDP packets should _always_ be sent to the multicast address
-# 239.255.255.250, making this pattern irrelevant. (Moreover, SSDP
-# packets should be resitricted to local networks that have plenty of
-# bandwidth.) However, Microsoft, as usual, has other ideas, so maybe
-# it could be useful. Can't hurt, anyway. :-)
-#
-# http://www.upnp.org/download/draft_cai_ssdp_v1_03.txt
-# http://msdn.microsoft.com/library/default.asp?url=/library/en-us/randz/protocol/ssdp.asp
-
-ssdp
-^notify[\x09-\x0d ]\*[\x09-\x0d ]http/1\.1[\x09-\x0d -~]*ssdp:(alive|byebye)|^m-search[\x09-\x0d ]\*[\x09-\x0d ]http/1\.1[\x09-\x0d -~]*ssdp:discover
-
diff --git a/src/usr/local/share/protocols/ssh.pat b/src/usr/local/share/protocols/ssh.pat
deleted file mode 100644
index 5e32f5c..0000000
--- a/src/usr/local/share/protocols/ssh.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# SSH - Secure SHell
-# Pattern attributes: great veryfast fast
-# Protocol groups: remote_access secure ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/SSH
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 22
-#
-# http://www.ietf.org/internet-drafts/draft-ietf-secsh-transport-22.txt
-#
-# This pattern has been tested and is believed to work well.
-
-ssh
-^ssh-[12]\.[0-9]
-
-# old pattern:
-# (diffie-hellman-group-exchange-sha1|diffie-hellman-group1-sha1.ssh-rsa|ssh-dssfaes128-cbc|3des-cbc|blowfish-cbc|cast128-cbc|arcfour|aes192-cbc|aes256-cbc|rijndael-cbc@lysator.liu.sefaes128-cbc|3des-cbc|blowfish-cbc|cast128-cbc|arcfour|aes192-cbc|aes256-cbc|rijndael-cbc@lysator.liu.seuhmac-md5|hmac-sha1|hmac-ripemd160)+
diff --git a/src/usr/local/share/protocols/ssl.pat b/src/usr/local/share/protocols/ssl.pat
deleted file mode 100644
index ae30ee4..0000000
--- a/src/usr/local/share/protocols/ssl.pat
+++ /dev/null
@@ -1,16 +0,0 @@
-# SSL and TLS - Secure Socket Layer / Transport Layer Security - RFC 2246
-# Pattern attributes: good notsofast fast superset
-# Protocol groups: secure ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/SSL
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 443
-#
-# This is a superset of validcertssl. For it to match, it must be first.
-#
-# This pattern has been tested and is believed to work well.
-
-ssl
-# Server Hello with certificate | Client Hello
-# This allows SSL 3.X, which includes TLS 1.0, known internally as SSL 3.1
-^(.?.?\x16\x03.*\x16\x03|.?.?\x01\x03\x01?.*\x0b)
diff --git a/src/usr/local/share/protocols/stun.pat b/src/usr/local/share/protocols/stun.pat
deleted file mode 100644
index 3bfc3ab..0000000
--- a/src/usr/local/share/protocols/stun.pat
+++ /dev/null
@@ -1,46 +0,0 @@
-# STUN - Simple Traversal of UDP Through NAT - RFC 3489
-# Pattern attributes: ok veryfast fast
-# Protocol groups: networking ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/STUN
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is untested as far as I know.
-
-# Wikipedia says: "The STUN server is contacted on UDP port 3478,
-# however the server will hint clients to perform tests on alternate IP
-# and port number too (STUN servers have two IP addresses). The RFC
-# states that this port and IP are arbitrary."
-
-stun
-# \x01 is a Binding Request. \x02 is a Shared Secret Request. Binding
-# Requests are, experimentally, exactly 20 Bytes with three NULL Bytes.
-# The first NULL is part of the two byte message type field. The other
-# two give the message length, zero. I'm guessing that Shared Secret
-# Requests are similar, but I have not checked. Please read the RFC and
-# do experiments to find out. All other message types are responses,
-# and so don't matter.
-#
-# The .? allows one of the Message Transaction ID Bytes to be \x00. If
-# two are \x00, it will fail. This will happen 0.37% of the time, since
-# the Message Transaction ID is supposed to be random. If this is
-# unacceptable to you, add another ? to reduce this to 0.020%, but be
-# aware of the increased possibility of false positives.
-^[\x01\x02]................?$
-
-# From my post to the mailing list:
-# http://sourceforge.net/mailarchive/message.php?msg_id=36787107
-#
-# This is a rather permissive pattern, but you can make it a little better
-# by combining it with another iptables rule that checks that the packet
-# data is exactly 20 Bytes. Of course, the second packet is longer, so
-# maybe that introduces more complications than benefits.
-#
-# If you're willing to wait until the second packet to make the
-# identification, you could use this:
-#
-# ^\x01................?\x01\x01
-#
-# or if the Message Length is always \x24 (I'm not sure it is from your
-# single example):
-#
-# ^\x01................?\x01\x01\x24
diff --git a/src/usr/local/share/protocols/subspace.pat b/src/usr/local/share/protocols/subspace.pat
deleted file mode 100644
index 0a1b174..0000000
--- a/src/usr/local/share/protocols/subspace.pat
+++ /dev/null
@@ -1,21 +0,0 @@
-# Subspace - 2D asteroids-style space game - http://sscentral.com
-# Pattern attributes: marginal veryfast fast
-# Protocol groups: game
-# Wiki: http://www.protocolinfo.org/wiki/Subspace
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# By Myles Uyema <mylesuyema AT gmail.com>
-#
-# This pattern matches the initial 2 packets of the client-server
-# 'handshake' when joining a Zone.
-#
-# The first packet is an 8 byte UDP payload sent from client
-# 0x00 0x01 0x?? 0x?? 0x?? 0x?? 0x11
-# The next packet is a 12 byte UDP response from server
-# 0x00 0x10 0x?? 0x?? 0x?? 0x?? 0x?? 0x?? 0x?? 0x?? 0x01 0x00
-#
-# l7-filter strips out the null bytes, leaving me with this pattern
-
-subspace
-^\x01....\x11\x10........\x01$
-
diff --git a/src/usr/local/share/protocols/subversion.pat b/src/usr/local/share/protocols/subversion.pat
deleted file mode 100644
index 8769a19..0000000
--- a/src/usr/local/share/protocols/subversion.pat
+++ /dev/null
@@ -1,13 +0,0 @@
-# Subversion - a version control system
-# Pattern attributes: ok veryfast fast
-# Protocol groups: version_control open_source
-# Wiki: http://www.protocolinfo.org/wiki/Subversion
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is UNTESTED. (But it seems straightforward enough...)
-#
-# Subversion uses TCP port 3690 by default.
-
-subversion
-# This is not a valid basic GNU regular expression.
-^\( success \( 1 2 \(
diff --git a/src/usr/local/share/protocols/swf.pat b/src/usr/local/share/protocols/swf.pat
deleted file mode 100644
index af03086..0000000
--- a/src/usr/local/share/protocols/swf.pat
+++ /dev/null
@@ -1,2 +0,0 @@
-swf
-swf\x21\x1a\x07
diff --git a/src/usr/local/share/protocols/tar.pat b/src/usr/local/share/protocols/tar.pat
deleted file mode 100644
index d3ea987..0000000
--- a/src/usr/local/share/protocols/tar.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# Tar - tape archive. Standard UNIX file archiver, not just for tapes.
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-tar
-# /usr/share/magic
-## POSIX tar archives
-#257 string ustar\0 POSIX tar archive
-#257 string ustar\040\040\0 GNU tar archive
-# this is pretty general. It's not a dictionary word, but still...
-ustar
diff --git a/src/usr/local/share/protocols/teamfortress2.pat b/src/usr/local/share/protocols/teamfortress2.pat
deleted file mode 100644
index 337af39..0000000
--- a/src/usr/local/share/protocols/teamfortress2.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# Team Fortress 2 - network game - http://www.valvesoftware.com
-# Pattern attributes: good veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Team_Fortress
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Credits: Clayton Macleod <cherry twist at gmail dot com>
-# Jan Engelhardt <jengelh at computergmbh dot de>
-
-teamfortress2
-^\xff\xff\xff\xff.....*tfTeam Fortress
diff --git a/src/usr/local/share/protocols/teamspeak.pat b/src/usr/local/share/protocols/teamspeak.pat
deleted file mode 100644
index 8b2155e..0000000
--- a/src/usr/local/share/protocols/teamspeak.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# TeamSpeak - VoIP application - http://goteamspeak.com
-# Pattern attributes: good veryfast fast
-# Protocol groups: voip proprietary
-# Wiki: http://www.protocolinfo.org/wiki/TeamSpeak
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested by Matthew Strait and verified by packet
-# traces by at least two other people. The meaning of f4b303 is not
-# known, but it seems to appear in all first packets. This pattern only
-# matches the actual UDP voice traffic, not the TeamSpeak web interface
-# or "TCP query".
-
-teamspeak
-^\xf4\xbe\x03.*teamspeak
-
diff --git a/src/usr/local/share/protocols/telnet.pat b/src/usr/local/share/protocols/telnet.pat
deleted file mode 100644
index cf10d0e..0000000
--- a/src/usr/local/share/protocols/telnet.pat
+++ /dev/null
@@ -1,16 +0,0 @@
-# Telnet - Insecure remote login - RFC 854
-# Pattern attributes: good veryfast fast
-# Protocol groups: remote_access obsolete ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/Telnet
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 23
-#
-# This pattern is lightly tested.
-
-telnet
-# Matches at least three IAC (Do|Will|Don't|Won't) commands in a row.
-# My telnet client sends 9 when I connect, so this should be fine.
-# This pattern could fail on a unchatty connection or it could be
-# matched by something non-telnet spewing a lot of stuff in the fb-ff range.
-^\xff[\xfb-\xfe].\xff[\xfb-\xfe].\xff[\xfb-\xfe]
diff --git a/src/usr/local/share/protocols/tesla.pat b/src/usr/local/share/protocols/tesla.pat
deleted file mode 100644
index 1f4ee86..0000000
--- a/src/usr/local/share/protocols/tesla.pat
+++ /dev/null
@@ -1,15 +0,0 @@
-# Tesla Advanced Communication - P2P filesharing (?)
-# Pattern attributes: marginal slow notsofast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Tesla
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern is untested!
-
-# This is lifted from http://oofle.com/filesharing.php?app=tesla
-# There is no explaination of what these numbers mean.
-# The above page says that the first string is found only in TCP packets
-# and the second only in UDP.
-
-tesla
-\x03\x9a\x89\x22\x31\x31\x31\.\x30\x30\x20\x42\x65\x74\x61\x20|\xe2\x3c\x69\x1e\x1c\xe9
diff --git a/src/usr/local/share/protocols/tftp.pat b/src/usr/local/share/protocols/tftp.pat
deleted file mode 100644
index 1782ff5..0000000
--- a/src/usr/local/share/protocols/tftp.pat
+++ /dev/null
@@ -1,21 +0,0 @@
-# TFTP - Trivial File Transfer Protocol - used for bootstrapping - RFC 1350
-# Pattern attributes: marginal fast fast
-# Protocol groups: document_retrieval ietf_internet_standard
-# Wiki: http://www.protocolinfo.org/wiki/TFTP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# usually runs on port 69
-#
-# This pattern is unconfirmed.
-
-tftp
-# The first packet from the initiating host should either be a Read Request
-# or a Write Request. In the other direction, it should be data packet with
-# block number one or an ACK with block number zero. We only attempt to match
-# the initiating host's packets, because the only identifying features of
-# the responses to them are two byte sequences (which isn't specific enough).
-# (\x01|\x02) = Read Request or Write Request
-# [ -~]* = the file name
-# the rest = netascii|octet|mail (case insensitivity done by the kernel)
-
-^(\x01|\x02)[ -~]*(netascii|octet|mail)
diff --git a/src/usr/local/share/protocols/thecircle.pat b/src/usr/local/share/protocols/thecircle.pat
deleted file mode 100644
index d5e2b80..0000000
--- a/src/usr/local/share/protocols/thecircle.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# The Circle - P2P application - http://thecircle.org.au
-# Pattern attributes: ok veryfast fast
-# Protocol groups: p2p open_source
-# Wiki: http://www.protocolinfo.org/wiki/The_Circle
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This is tested with The Circle 0.41c on Linux.
-# It likely misses some stuff. Notably, I wasn't able to test it on any
-# large downloads, because no one is sharing anything!
-
-thecircle
-^t\x03ni.?[\x01-\x06]?t[\x01-\x05]s[\x0a\x0b](glob|who are you$|query data)
diff --git a/src/usr/local/share/protocols/tonghuashun.pat b/src/usr/local/share/protocols/tonghuashun.pat
deleted file mode 100644
index 45f838b..0000000
--- a/src/usr/local/share/protocols/tonghuashun.pat
+++ /dev/null
@@ -1,11 +0,0 @@
-# Tonghuashun - stock analysis and trading; Chinese - http://www.10jqka.com.cn
-# Pattern attributes: ok fast fast
-# Protocol groups:
-# Wiki: http://www.protocolinfo.org/wiki/Tonghuashun
-# Copyright (C) 2009 Matthew Strait; See ../LICENSE
-
-# Pattern contributed by liangjun without comment.
-
-tonghuashun
-^(GET /docookie\.php\?uname=|\xfd\xfd\xfd\xfd\x30\x30\x30\x30\x30)
-
diff --git a/src/usr/local/share/protocols/tor.pat b/src/usr/local/share/protocols/tor.pat
deleted file mode 100644
index 7e4f707..0000000
--- a/src/usr/local/share/protocols/tor.pat
+++ /dev/null
@@ -1,17 +0,0 @@
-# Tor - The Onion Router - used for anonymization - http://tor.eff.org
-# Pattern attributes: good notsofast notsofast
-# Protocol groups: networking
-# Wiki: http://protocolinfo.org/wiki/Tor
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This pattern has been tested and is believed to work well.
-#
-# It matches on the second packet. I have no idea how the protocol
-# works, but this matches every stream I have made using Tor 0.1.0.16 as
-# a client on Linux.
-#
-# It does NOT attempt to match the HTTP request that fetches the list of
-# Tor servers.
-
-tor
-TOR1.*<identity>
diff --git a/src/usr/local/share/protocols/tsp.pat b/src/usr/local/share/protocols/tsp.pat
deleted file mode 100644
index 7751df9..0000000
--- a/src/usr/local/share/protocols/tsp.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# TSP - Berkely UNIX Time Synchronization Protocol
-# Pattern attributes: good veryfast fast overmatch
-# Protocol groups: time_synchronization open_source
-# Wiki: http://www.protocolinfo.org/wiki/TSP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# http://ftp.svbug.com/ftp/pub/manuals/pdf/smm.22.timed.pdf
-# http://docs.freebsd.org/44doc/smm/12.timed/paper.pdf
-#
-# This pattern is barely tested.
-
-tsp
-# type, version (1), sequence number, 8 type specific bytes, machine name
-^[\x01-\x13\x16-$]\x01.?.?.?.?.?.?.?.?.?.?[ -~]+
diff --git a/src/usr/local/share/protocols/unset.pat b/src/usr/local/share/protocols/unset.pat
deleted file mode 100644
index b9c1244..0000000
--- a/src/usr/local/share/protocols/unset.pat
+++ /dev/null
@@ -1,8 +0,0 @@
-# Unset - Dummy pattern for unmatched connections that are still being tested
-
-unset
-# This pattern is ignored by the kernel. It sees that the "protocol" is
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-# "testing" and always returns matched for connections that are still
-# being tested.
-.
diff --git a/src/usr/local/share/protocols/uucp.pat b/src/usr/local/share/protocols/uucp.pat
deleted file mode 100644
index f7ef22c..0000000
--- a/src/usr/local/share/protocols/uucp.pat
+++ /dev/null
@@ -1,12 +0,0 @@
-# UUCP - Unix to Unix Copy
-# Pattern attributes: ok veryfast fast
-# Protocol groups: document_retrieval obsolete
-# Wiki: http://www.protocolinfo.org/wiki/UUCP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This is completely untested! (I don't know how to use UUCP...)
-
-# See http://docs.freebsd.org/info/uucp/uucp.info.The_Initial_Handshake.html
-
-uucp
-^\x10here=
diff --git a/src/usr/local/share/protocols/validcertssl.pat b/src/usr/local/share/protocols/validcertssl.pat
deleted file mode 100644
index 7aa1812..0000000
--- a/src/usr/local/share/protocols/validcertssl.pat
+++ /dev/null
@@ -1,25 +0,0 @@
-# Valid certificate SSL
-# Pattern attributes: good slow notsofast subset
-# Protocol groups: secure ietf_proposed_standard
-# Wiki: http://www.protocolinfo.org/wiki/SSL
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-# This matches anything claiming to use a valid certificate from a well
-# known certificate authority.
-#
-# This is a subset of ssl, so it needs to come first to match.
-#
-# Note that opening a website that has a valid certificate will
-# open one connection that matches this and many ssl connections that
-# only match the ssl pattern. Thus, this pattern may not be very useful.
-#
-# This pattern is believed match only the above, but may not match all
-# of it.
-#
-# the certificate authority info is sent in quasi plain text, if it matches
-# a well known certificate authority then we will assume it is a
-# web/imaps/etc server. Other ssl may be good too, but it should fall under
-# a different rule
-
-validcertssl
-^(.?.?\x16\x03.*\x16\x03|.?.?\x01\x03\x01?.*\x0b).*(thawte|equifax secure|rsa data security, inc|verisign, inc|gte cybertrust root|entrust\.net limited)
diff --git a/src/usr/local/share/protocols/ventrilo.pat b/src/usr/local/share/protocols/ventrilo.pat
deleted file mode 100644
index 74e588c..0000000
--- a/src/usr/local/share/protocols/ventrilo.pat
+++ /dev/null
@@ -1,18 +0,0 @@
-# Ventrilo - VoIP - http://ventrilo.com
-# Pattern attributes: good fast fast
-# Protocol groups: voip proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Ventrilo
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# I have tested this with Ventrilo client 2.3.0 on Windows talking to
-# Ventrilo server 2.3.1 (the public version) on Linux. I've done this
-# both within a LAN and over the Internet. In one test, I tried
-# monkeying around with the server settings to see if I could break the
-# pattern, and I couldn't. However, you can't change the port number in
-# the public server.
-#
-# It has also been tested by one other person in an unknown configuration.
-
-ventrilo
-^..?v\$\xcf
-
diff --git a/src/usr/local/share/protocols/vnc.pat b/src/usr/local/share/protocols/vnc.pat
deleted file mode 100644
index 79d0ae8..0000000
--- a/src/usr/local/share/protocols/vnc.pat
+++ /dev/null
@@ -1,23 +0,0 @@
-# VNC - Virtual Network Computing. Also known as RFB - Remote Frame Buffer
-# Pattern attributes: great veryfast fast
-# Protocol groups: remote_access
-# Wiki: http://www.protocolinfo.org/wiki/VNC
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# http://www.realvnc.com/documentation.html
-#
-# This pattern has been verified with vnc v3.3.7 on WinXP and Linux
-#
-# Thanks to Trevor Paskett <tpaskett AT cymphonix.com> for this pattern.
-
-vnc
-# Assumes single digit major and minor version numbers
-# This message should be all alone in the first packet, so ^$ is appropriate
-^rfb 00[1-9]\.00[0-9]\x0a$
-
-# This is a more restrictive version which assumes the version numbers
-# are ones actually in existance at the time of this writing, i.e. 3.3,
-# 3.7 and 3.8 (with some clients wrongly reporting 3.5). It should be
-# slightly faster, but probably not worth the extra maintenance.
-# ^rfb 003\.00[3578]\x0a$
-
diff --git a/src/usr/local/share/protocols/whois.pat b/src/usr/local/share/protocols/whois.pat
deleted file mode 100644
index 6abf0e8..0000000
--- a/src/usr/local/share/protocols/whois.pat
+++ /dev/null
@@ -1,14 +0,0 @@
-# Whois - query/response system, usually used for domain name info - RFC 3912
-# Pattern attributes: good notsofast notsofast overmatch
-# Protocol groups: networking ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/Whois
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on TCP port 43
-#
-# This pattern has been tested and is believed to work well.
-
-whois
-# Matches the query. Assumes only that it is printable ASCII without wierd
-# whitespace.
-^[ !-~]+\x0d\x0a$
diff --git a/src/usr/local/share/protocols/worldofwarcraft.pat b/src/usr/local/share/protocols/worldofwarcraft.pat
deleted file mode 100644
index 4136d79..0000000
--- a/src/usr/local/share/protocols/worldofwarcraft.pat
+++ /dev/null
@@ -1,66 +0,0 @@
-# World of Warcraft - popular network game - http://blizzard.com/
-# Pattern attributes: ok veryfast fast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/World_of_Warcraft
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-
-worldofwarcraft
-^\x06\xec\x01
-
-# Quoth the author of this pattern, Weisskopf Beat <weisb AT bfh.ch>:
-
-# I have written a pattern for wow (tested with versions 1.8.3 and
-# 1.8.4, german edition). It does not match the login as i think this is
-# uncritical, but i have added the necessary info later on. So only the
-# actual in-game traffic is matched.
-#
-# I hope the pattern is specific enough, otherwise one may add some
-# bytes from the response.
-#
-# some captured info:
-#
-# login:
-#
-# 0000: 00 02 28 00 57 6F 57 00 01 08 03 C7 12 36 38 78 ..(.WoW......68x
-# 0010: 00 6E 69 57 00 45 44 65 64 3C 00 00 00 C0 A8 01 .niW.EDed<......
-# 0020: 22 0A 42 57 45 49 53 53 4B 4F 50 46 ".BWEISSKOPF
-#
-# 0000: 00 02 28 00 57 6F 57 00 01 08 03 C7 12 36 38 78 ..(.WoW......68x
-# 0010: 00 6E 69 57 00 45 44 65 64 3C 00 00 00 C0 A8 01 .niW.EDed<......
-# 0020: 22 0A 42 57 45 49 53 53 4B 4F 50 46 ".BWEISSKOPF
-#
-# server asking:
-#
-# #1
-# 0000: 00 06 EC 01 04 49 C5 33 .....I.3
-#
-# #2
-# 0000: 00 06 EC 01 C3 A8 6E 63 ......nc
-#
-# client response
-# #1
-# 0000: 00 A4 ED 01 00 00 C7 12 00 00 00 00 00 00 42 57 ..............BW
-# 0010: 45 49 53 53 4B 4F 50 46 00 EB 35 DC 89 5A CA 6D EISSKOPF..5..Z.m
-# 0020: 17 95 DE 5B 74 6E 1E 5D 23 73 C6 8F 27 9F 11 12 ...[tn.]#s..'...
-# 0030: BB 21 01 00 00 78 9C 75 CC 41 0A 83 50 0C 84 E1 .!...x.u.A..P...
-# 0040: E7 3D 7A 19 75 25 D4 4D AB EB 12 5E A2 0C 8D 51 .=z.u%.M...^...Q
-# 0050: D2 57 04 4F DF 2E 2D A4 B3 FD 86 3F A5 EF 1A C5 .W.O..-....?....
-# 0060: 71 90 F3 A3 7E E7 82 D5 C6 2E 55 CB 7E B9 FE 58 q...~.....U.~..X
-# 0070: 43 A5 A8 4C 10 E5 1E 86 85 B6 E8 04 63 D8 1C 06 C..L........c...
-# 0080: 5A A7 A9 84 D2 D9 6B 93 1C 5B 4F D9 D7 50 6E 04 Z.....k..[O..Pn.
-# 0090: 0E 61 20 15 8B 6B 83 13 CB FD 09 D5 7F 0C 13 3F .a ..k.........?
-# 00A0: DB 07 B4 EA 54 F8 ....T.
-#
-# #2
-# 0000: 00 A4 ED 01 00 00 C7 12 00 00 00 00 00 00 42 57 ..............BW
-# 0010: 45 49 53 53 4B 4F 50 46 00 38 4C B5 95 C3 AD 25 EISSKOPF.8L....%
-# 0020: CB 73 48 BD 82 FC 99 63 59 AC BF F3 D0 C6 8D AB .sH....cY.......
-# 0030: 3D 21 01 00 00 78 9C 75 CC 41 0A 83 50 0C 84 E1 =!...x.u.A..P...
-# 0040: E7 3D 7A 19 75 25 D4 4D AB EB 12 5E A2 0C 8D 51 .=z.u%.M...^...Q
-# 0050: D2 57 04 4F DF 2E 2D A4 B3 FD 86 3F A5 EF 1A C5 .W.O..-....?....
-# 0060: 71 90 F3 A3 7E E7 82 D5 C6 2E 55 CB 7E B9 FE 58 q...~.....U.~..X
-# 0070: 43 A5 A8 4C 10 E5 1E 86 85 B6 E8 04 63 D8 1C 06 C..L........c...
-# 0080: 5A A7 A9 84 D2 D9 6B 93 1C 5B 4F D9 D7 50 6E 04 Z.....k..[O..Pn.
-# 0090: 0E 61 20 15 8B 6B 83 13 CB FD 09 D5 7F 0C 13 3F .a ..k.........?
-# 00A0: DB 07 B4 EA 54 F8 ....T.
-
diff --git a/src/usr/local/share/protocols/x11.pat b/src/usr/local/share/protocols/x11.pat
deleted file mode 100644
index 2028ee7..0000000
--- a/src/usr/local/share/protocols/x11.pat
+++ /dev/null
@@ -1,23 +0,0 @@
-# X Windows Version 11 - Networked GUI system used in most Unices
-# Pattern attributes: good notsofast veryfast
-# Protocol groups: remote_access x_consortium_standard
-# Wiki: http://www.protocolinfo.org/wiki/X11
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# It is common for X to be tunneled through SSH. Then obviously this pattern
-# will not catch it.
-#
-# Specification: http://www.msu.edu/~huntharo/xwin/docs/xwindows/PROTO.pdf
-# Usually runs on port 6000 (6001 for the second server on a host, etc)
-#
-# This pattern has been tested.
-
-x11
-# 'l' = little-endian. 'B' = big endian
-# ".?" is for the unused byte that comes next. If it's a null, it won't appear.
-# \x0b = protocol-major-version 11.
-# For some reason, protocol-minor-version is 0, not 6, so can't match it.
-# This pattern is too general.
-^[lb].?\x0b
-userspace pattern=^[lB].?\x0b
-userspace flags=REG_NOSUB
diff --git a/src/usr/local/share/protocols/xboxlive.pat b/src/usr/local/share/protocols/xboxlive.pat
deleted file mode 100644
index d04d9a7..0000000
--- a/src/usr/local/share/protocols/xboxlive.pat
+++ /dev/null
@@ -1,41 +0,0 @@
-# XBox Live - Console gaming
-# Pattern attributes: marginal slow notsofast
-# Protocol groups: game proprietary
-# Wiki: http://www.protocolinfo.org/wiki/XBox_Live
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This may match all XBox traffic, or may only match Halo 2 traffic.
-# We don't know yet.
-#
-# Thanks to Myles Uyema <mylesuyema AT gmail DOT com>, who says:
-#
-# Analyzing packet traces using Ethereal, the Xbox typically connects
-# to remote users using UDP port 3074. The first frame is typically
-# a 156 byte UDP payload. I've only scrutinized the first 20 or so bytes.
-#
-# Each line below represents the first frame between my Xbox and a remote
-# player's IP address playing Halo2 on Xbox Live.
-#
-# 00 00 00 00 00 58 80 00 00 00 00 00 82 31 9e a8 05 0f c5 62 00 f3 96 08
-# 00 00 00 00 00 58 80 00 00 00 00 00 82 31 9e a8 0f 0f c5 62 00 f3 97 09
-# 00 00 00 00 00 58 80 00 00 00 00 00 82 31 9e a8 05 0f c5 62 00 f3 95 07
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 87 ea 59 aa 11 ff 89 00 f3 bc 07
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 87 ea 59 aa 11 ff 89 00 f3 be 09
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 87 ea 59 aa 11 ff 89 00 f3 bf 0a
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 87 ea 59 aa 11 ff 89 00 f3 bd 08
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 87 ea 59 aa 11 ff 89 00 f3 ba 05
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 87 ea 59 aa 11 ff 89 00 f3 bb 06
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 7f dd 14 f2 8e a3 a1 00 f3 ca 06
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 7f dd 14 f2 8e a3 a1 00 f3 cc 08
-# 00 00 00 00 00 58 80 00 00 00 00 00 81 7f dd 14 f2 8e a3 a1 00 f3 c9 05
-# 00 00 00 00 00 58 80 00 00 00 00 00 8b ca 5b c0 d8 9c f8 c3 00 f3 d4 0a
-# 00 00 00 00 00 58 80 00 00 00 00 00 8b ca 5b c0 d8 9c f3 c3 00 f3 d1 07
-# 00 00 00 00 00 58 80 00 00 00 00 00 8b ca 5b c0 d8 9c f8 c3 00 f3 d2 08
-# 00 00 00 00 00 58 80 00 00 00 00 00 8b ca 5b c0 d8 9c f8 c3 00 f3 cf 05
-# 00 00 00 00 06 58 4e 00 00 00 e6 d9 6e ab 65 0d 63 9f 02 00 00 02 80 dd
-# 00 00 00 00 06 58 4e 00 00 00 46 e2 95 74 cd f9 bc 3d 00 00 00 00 8b ca
-# 00 00 00 00 06 58 4e 00 00 00 cf ce 3b 5c f5 f2 49 9a 00 00 00 00 8b ca
-# 00 00 00 00 06 58 4e 00 00 00 a9 c0 ac c5 16 e5 c9 92 00 00 00 00 8b ca
-
-xboxlive
-^\x58\x80........\xf3|^\x06\x58\x4e
diff --git a/src/usr/local/share/protocols/xunlei.pat b/src/usr/local/share/protocols/xunlei.pat
deleted file mode 100644
index f7814c7..0000000
--- a/src/usr/local/share/protocols/xunlei.pat
+++ /dev/null
@@ -1,83 +0,0 @@
-# Xunlei - Chinese P2P filesharing - http://xunlei.com
-# Pattern attributes: good slow notsofast
-# Protocol groups: p2p
-# Wiki: http://www.protocolinfo.org/wiki/Xunlei
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# This has been tested by a number of people.
-#
-# Written by wsgtrsys of www.routerclub.com. Improved by VeNoMouS.
-# Improved more by wsgtrsys and platinum of bbs.chinaunix.net.
-#
-# Further additions of HTTP-like content by liangjunATdcuxD.Tcom, who
-# says: "i find old pattern is not working . so i write a new pattern of
-# xunlei,it's working with all of xunlei 5 version!" Matthew Strait notes
-# in response:
-#
-# I've looked around and I'm fairly sure that Internet Explorer 5.0
-# never identifies itself as "Mozilla/4.0 (compatible; MSIE 5.00;
-# Windows 98)" and that Internet Explorer 6.0 never identifies itself as
-# either "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; )" or
-# "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)".
-
-# The keep-alive part needs some examination too. These might validly
-# occur in an HTTP/1.0 connection, although I think in practical cases
-# they don't since there's general only one \x0d\x0a after it and/or the
-# next line starts with a letter (especially because it's the client
-# sending it). It wouldn't be crazy, though, if another protocol
-# (besides Xunlei) used keep-alive in a way that did match this. But
-# since I can't think of any examples, I'll assume it's ok for now.
-
-xunlei
-^([()]|get)(...?.?.?(reg|get|query)|.+User-Agent: (Mozilla/4\.0 \(compatible; (MSIE 6\.0; Windows NT 5\.1;? ?\)|MSIE 5\.00; Windows 98\))))|Keep-Alive\x0d\x0a\x0d\x0a[26]
-
-
-# This was the pattern until 2008 11 08. It is safer than the above against
-# overmatching ordinary HTTP connections
-#^[()]...?.?.?(reg|get|query)
-
-# More detail:
-# From http://sourceforge.net/tracker/index.php?func=detail&aid=1885209&group_id=80085&atid=558668
-#
-##############################################################################
-# Date: 2008-02-03
-# Sender: hydr0g3n
-#
-# Xunlei (Chinese P2P) traffic is not matched anymore by layer7 xunlei
-# pattern. It used to work in the past but not anymore. Maybe Xunlei was
-# updated and pattern should be adapted?
-#
-# Apparently ipp2p was edited by Chinese people to detect pplive and xunlei.
-# It is interesting and very recent:
-# http://www.chinaunix.net/jh/4/914377.html
-##############################################################################
-# Date: 2008-02-03
-# Sender: quadong
-#
-# Ok. Only some of the ipp2p function can be translated into an l7-filter
-# regular expression. The first part of search_xunlei can't be, since it
-# works by checking whether the length of the packet matches a byte in the
-# packet. The second part of search_xunlei becomes:
-#
-# \x20.?\x01?.?[\x01\x77]............?.?.?.?\x38
-#
-# Or possibly:
-#
-# ^\x20.?\x01?.?[\x01\x77]............?.?.?.?\x38
-#
-# I'm not sure whether IPP2P looks at every packet or only the first of each
-# connection.
-#
-# udp_search_xunlei says:
-# \x01\x01\x01\xfe\xff\xfe\xff|\x01\x11\xa0\xfe\xff\xfe\xff
-#
-# Again, putting a ^ at the beginning might work:
-#
-# ^(\x01\x01\x01\xfe\xff\xfe\xff|\x01\x11\xa0\xfe\xff\xfe\xff)
-#
-# So this *might* work:
-#
-# ^(\x20.?\x01?.?[\x01\x77]............?.?.?.?\x38|\x01\x01\x01\xfe\xff\xfe\xff|\x01\x11\xa0\xfe\xff\xfe\xff)
-#
-# but the ^ might be wrong and it will not match the HTTP part of Xunlei.
-##############################################################################
diff --git a/src/usr/local/share/protocols/yahoo.pat b/src/usr/local/share/protocols/yahoo.pat
deleted file mode 100644
index 17595b8..0000000
--- a/src/usr/local/share/protocols/yahoo.pat
+++ /dev/null
@@ -1,27 +0,0 @@
-# Yahoo messenger - an instant messenger protocol - http://yahoo.com
-# Pattern attributes: good fast fast
-# Protocol groups: chat proprietary
-# Wiki: http://www.protocolinfo.org/wiki/Yahoo_Messenger
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# Usually runs on port 5050
-#
-# This pattern has been tested and is believed to work well.
-
-yahoo
-# http://www.venkydude.com/articles/yahoo.htm says:
-# All Yahoo commands start with YMSG.
-# (Well... http://ethereal.com/faq.html#q5.32 suggests that YPNS and YHOO
-# are also possible, so let's allow those)
-# The next 7 bytes contain command (packet?) length and version information
-# which we won't currently try to match.
-# L means "YAHOO_SERVICE_VERIFY" according to Ethereal
-# W means "encryption challenge command" (YAHOO_SERVICE_AUTH)
-# T means "login command" (YAHOO_SERVICE_AUTHRESP)
-# (there are others, i.e. 0x01 "coming online", 0x02 "going offline",
-# 0x04 "changing status to available", 0x06 "user message", but W and T
-# should appear in the first few packets.)
-# 0xC080 is the standard argument separator, it should appear not long
-# after the "type of command" byte.
-
-^(ymsg|ypns|yhoo).?.?.?.?.?.?.?[lwt].*\xc0\x80
diff --git a/src/usr/local/share/protocols/zip.pat b/src/usr/local/share/protocols/zip.pat
deleted file mode 100644
index e001354..0000000
--- a/src/usr/local/share/protocols/zip.pat
+++ /dev/null
@@ -1,7 +0,0 @@
-# ZIP - (PK|Win)Zip archive format
-# Pattern attributes: good notsofast notsofast subset
-# Protocol groups: file
-
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-zip
-pk\x03\x04\x14
diff --git a/src/usr/local/share/protocols/zmaap.pat b/src/usr/local/share/protocols/zmaap.pat
deleted file mode 100644
index e741eca..0000000
--- a/src/usr/local/share/protocols/zmaap.pat
+++ /dev/null
@@ -1,18 +0,0 @@
-# ZMAAP - Zeroconf Multicast Address Allocation Protocol
-# Pattern attributes: ok veryfast fast
-# Protocol groups: networking ietf_draft_standard
-# Wiki: http://www.protocolinfo.org/wiki/ZMAAP
-# Copyright (C) 2008 Matthew Strait, Ethan Sommer; See ../LICENSE
-#
-# http://files.zeroconf.org/draft-ietf-zeroconf-zmaap-02.txt
-# (Note that this reference is an Internet-Draft, and therefore must
-# be considered a work in progress.)
-#
-# This pattern is untested!
-
-zmaap
-# - 4 byte magic number.
-# - 1 byte version. Allow 1 & 2, even though only version 1 currently exists.
-# - 1 byte message type,which is either 0 or 1
-# - 1 byte address family. L7-filter only works in IPv4, so this is 1.
-^\x1b\xd7\x3b\x48[\x01\x02]\x01?\x01
diff --git a/src/usr/local/www/bandwidth_by_ip.php b/src/usr/local/www/bandwidth_by_ip.php
index 39f9a01..92dc673 100755
--- a/src/usr/local/www/bandwidth_by_ip.php
+++ b/src/usr/local/www/bandwidth_by_ip.php
@@ -3,11 +3,6 @@
bandwidth_by_ip.php
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/bin/rate
- pfSense_MODULE: trafficgraph
-*/
-
require_once('guiconfig.inc');
require_once('interfaces.inc');
require_once('pfsense-utils.inc');
diff --git a/src/usr/local/www/bootstrap/css/pfSense-BETA.css b/src/usr/local/www/bootstrap/css/pfSense-BETA.css
new file mode 100644
index 0000000..33ee5ac
--- /dev/null
+++ b/src/usr/local/www/bootstrap/css/pfSense-BETA.css
@@ -0,0 +1,3 @@
+@import url("/bootstrap/css/pfSense.css");
+
+/*** Experimental Changes Go Here ***/ \ No newline at end of file
diff --git a/src/usr/local/www/bootstrap/css/pfSense-dark.css b/src/usr/local/www/bootstrap/css/pfSense-dark.css
new file mode 100644
index 0000000..57ce484
--- /dev/null
+++ b/src/usr/local/www/bootstrap/css/pfSense-dark.css
@@ -0,0 +1,350 @@
+@import url("/bootstrap/css/pfSense.css");
+
+body {
+ background-color: #212121;
+ color: #ffffff;
+}
+
+body.no-menu {
+ background-color: #616161;
+}
+
+a {
+ color: #009688;
+}
+
+a:hover {
+ color: #00796B;
+ text-decoration: none;
+}
+
+h1 a:link, h1 a:visited {
+ color: #fff;
+}
+
+h1 a:hover, h1 a:active {
+ color: #fff;
+ text-decoration: none !important;
+}
+
+/** Content structure */
+
+.contains-table table {
+ border: 1px solid #ddd;
+}
+
+.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
+ border-color: #303030;
+}
+
+.table-hover>tbody>tr:hover, .table-striped>tbody>tr:nth-of-type(odd):hover {
+ background-color: #757575;
+}
+
+table.sortable-theme-bootstrap {
+ color: #e0e0e0 !important;
+ background-color: #212121 !important;
+}
+
+.table>tbody+tbody {
+ border-top: 2px solid #616161;
+}
+
+.dropdown-menu {
+ background-color: #000;
+ opacity: .93;
+ border-radius: 10px;
+}
+
+.dropdown-menu>li>a {
+ color: #e0e0e0;
+}
+
+.dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover {
+ background-color: #303030;
+ color: #e0e0e0;
+}
+
+.page-header {
+ border: 0;
+}
+
+.breadcrumb {
+ background-color: #303030;
+ box-shadow: 1px 1px 3px #151515;
+ font-size: 22px;
+}
+
+.breadcrumb>li+li:before {
+ color: #9E9E9E;
+}
+
+ul.context-links li a {
+ color: #009688;
+}
+
+/* navigation */
+.navbar-inverse {
+ background-color: #000000;
+}
+
+.nav>li>a {
+ border-bottom: 5px solid #212121;
+ color: #009688;
+}
+
+.nav>li>a:focus, .nav>li>a:hover {
+ background-color: #212121;
+ box-shadow: 2px 2px 8px #080808;
+ border-bottom: 5px solid #009688;
+}
+
+.nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav li.open>a, .nav li.open>a:focus, .nav-pills>li.active>a:hover {
+ background-color: #212121;
+ box-shadow: 2px 2px 8px #151515;
+ border-bottom: 5px solid #009688;
+ color: #009688;
+}
+
+.navbar-inverse .navbar-nav >li>a {
+ border-bottom: 5px solid #000000;
+}
+
+.nav-tabs>li>a {
+ border-bottom: 5px solid #212121;
+}
+
+.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover, .nav-tabs>li>a:hover {
+ border-left: 1px solid #212121;
+ border-right: 1px solid #212121;
+ border-top: 1px solid #212121;
+ border-bottom: 5px solid #009688;
+ background-color: #212121;
+ color: #009688;
+}
+
+.nav-tabs {
+ border-bottom: 1px solid #009688;
+}
+/* end navigation */
+
+/* start common colors */
+.alert-warning {
+ border-top: 1px solid #FFECB3;
+}
+
+.alert-success {
+ border-top: 1px solid #DCEDC8;
+}
+
+.alert-info {
+ border-top: 1px solid #B2EBF2;
+}
+
+.bg-primary {
+ color: #000;
+ background-color: #009688;
+}
+
+.bg-success {
+ color: #000;
+ background-color: #80CBC4;
+}
+
+.btn-default {
+ color: #ffffff;
+ background-color: #757575;
+ border-color: #212121;
+}
+
+.btn-default.active, .btn-default.focus, .btn-default:active, .btn-default:focus, .btn-default:hover, .open>.dropdown-toggle.btn-default {
+ color: #ffffff;
+ background-color: #424242;
+ border-color: #212121;
+}
+
+.btn-primary {
+ color: #212121;
+ background-color: #607D8B;
+ border-color: #37474F;
+}
+
+.btn-success {
+ background-color: #009688;
+ border-color: #009688;
+}
+
+.btn-success.active, .btn-success.focus, .btn-success:active, .btn-success:focus, .btn-success:hover, .open>.dropdown-toggle.btn-success {
+ background-color: #00796B;
+ border-color: #00796B;
+}
+
+.btn-danger {
+ background-color: #D32F2F;
+ border-color: #D32F2F;
+}
+
+.btn-primary:hover {
+ color: #212121;
+ background-color: #455A64;
+ border-color: #37474F;
+}
+/* end common colors */
+
+caption {
+ color: #E0E0E0;
+ background-color: #303030;
+}
+
+.form-control {
+ background-color: #e0e0e0;
+}
+
+.form-group {
+ border-bottom: 1px solid #212121;
+}
+
+.panel-default>.panel-heading {
+ color: #fff;
+ background-color: #303030;
+ border-color: #212121;
+}
+
+.panel {
+ background-color: #424242;
+ border-color: #424242;
+ box-shadow: 0px 3px 7px rgba(0,0,0,.3);
+}
+
+.panel-footer {
+ background-color: #424242;
+}
+
+.help-block {
+ color: #eeeeee;
+}
+
+.checkbox label, .radio label {
+ color: #eeeeee;
+}
+
+.table-striped>thead {
+ background-color: #000;
+}
+
+.table-striped>tbody>tr:nth-of-type(odd) {
+ background-color: #303030;
+}
+
+.table .table {
+ background-color: #424242;
+}
+
+/* active table row */
+.table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active {
+ background-color: #80CBC4;
+ color: #212121;
+}
+
+/* active table row on hover */
+.table-hover>tbody>tr.active:hover>td, .table-hover>tbody>tr.active:hover>th, .table-hover>tbody>tr:hover>.active, .table-hover>tbody>tr>td.active:hover, .table-hover>tbody>tr>th.active:hover {
+ background-color: #80CBC4;
+ color: #212121;
+}
+
+.popover-title {
+ background-color: #424242;
+ border-bottom: 1px solid #212121;
+}
+
+.popover {
+ background-color: #616161;
+}
+
+.popover.right>.arrow:after {
+ border-right-color: #212121;
+}
+
+.modal-content {
+ background-color: #424242;
+}
+
+.modal-header, .modal-footer {
+ background-color: #303030;
+ border-color: #212121;
+
+}
+
+/** Page footer */
+.footer {
+ background-color: #000;
+}
+
+.footer a {
+ color: #fff;
+}
+
+/** Homepage / dashboard */
+.widget .panel-heading {
+ background-color: #757575;
+}
+
+#widgetSequence {
+ border-top: 1px solid #ddd;
+}
+
+a.list-group-item, .list-group-item {
+ background-color: #424242;
+ color: #e0e0e0;
+ border: 1px solid #212121;
+}
+
+a.list-group-item:focus, a.list-group-item:hover, .list-group-item:focus, .list-group-item:hover {
+ background-color: #303030;
+ color: #e0e0e0;
+}
+
+a.list-group-item .list-group-item-heading, .list-group-item .list-group-item-heading {
+ color: #EEEEEE;
+}
+
+.progress {
+ background-color: #e0e0e0;
+}
+
+.progress-bar {
+ background-color: #009688;
+}
+
+.icon-embed-btn
+{
+ color: white;
+}
+
+/* Used when you need an icon to act as a submit button **/
+.button-icon
+{
+ color: #337AB7;
+}
+
+button.close {
+ padding: 0 4px 1px 4px;
+ border: 1px solid #6D4C41;
+ border-radius: 5px;
+ box-shadow: 1px 1px 1px #6D4C41;
+}
+
+.modal-header button.close {
+ border: 1px solid #fff;
+ box-shadow: 1px 1px 1px #fff;
+ color: #fff;
+}
+
+input, select, textarea {
+ color: #212121;
+}
+
+/* tree css */
+ul.tree li A:link, ul.tree li A:hover, ul.tree li A:visited {
+ color : #ffffff;
+} \ No newline at end of file
diff --git a/src/usr/local/www/bootstrap/css/pfSense.css b/src/usr/local/www/bootstrap/css/pfSense.css
index 6915c10..fde1e66 100644
--- a/src/usr/local/www/bootstrap/css/pfSense.css
+++ b/src/usr/local/www/bootstrap/css/pfSense.css
@@ -1,243 +1,381 @@
@import url("/bootstrap/css/bootstrap.min.css");
@import url("/bootstrap/glyphicons/glyphicons-halflings.css");
-
-h1 a:link{
- color: #000000;
- text-decoration: none !important;
-}
-
-
-h1 a:visited { color: #000000; }
-h1 a:hover, h1 a:active { color: #000000; text-decoration: none !important; }
+@import url("/bootstrap/fonts/roboto.css");
html {
- position: relative;
- min-height: 100%;
+ position: relative;
+ min-height: 100%;
}
body {
- padding-top: 0px;
- margin-bottom: 80px;
-}
-
-.navbar-brand {
- padding-top: 0;
+ margin-bottom: 80px;
+ background-color: #F5F5F5;
+ font-family: 'Roboto', sans-serif;
}
body.no-menu #jumbotron {
- padding: 100px 0;
- background-image: linear-gradient(to bottom,#3c3c3c 0,#222 100%)
+ padding: 100px 0;
+ background-image: linear-gradient(to bottom,#3c3c3c 0,#222 100%)
}
body.no-menu {
- background: url("/logo-black.png") no-repeat center 30px;
- padding-top: 70px;
+ background: url("/logo-black.png") no-repeat center 30px;
+ padding-top: 70px;
}
body.no-menu #jumbotron {
- margin-top: 75px;
+ margin-top: 75px;
}
body#index .icons {
- float: right;
+ float: right;
+}
+
+a:hover {
+ text-decoration: none;
+}
+
+a.fa, i.fa {
+ font-size: 18px;
+}
+
+h1 a:link, h1 a:visited {
+ color: #000000;
+ text-decoration: none !important;
+}
+
+h1.page-header {
+ display: none;
+}
+
+h1 a:hover, h1 a:active {
+ color: #000000;
+ text-decoration: none !important;
+}
+
+.container.fixed {
+ padding-top: 60px;
+}
+
+.breadcrumb {
+ font-size: 22px;
+ background-color: #E0E0E0;
+ margin-bottom: 10px;
+ border-radius: 0;
+ box-shadow: 0px 1px 10px rgba(0,0,0,.4);
+}
+
+.breadcrumb>li+li:before {
+ color: #B71C1C;
+}
+
+ul.context-links li a {
+ color: #B71C1C;
}
.ui-sortable-handle {
- cursor: move;
+ cursor: move;
}
tr.disabled td,
tr.disabled th {
- opacity: .5;
+ opacity: .5;
}
.contains-table table {
- border: 1px solid #ddd;
-}
-
-.nav-pills {
- margin-bottom: 20px;
+ border: 1px solid #ddd;
}
/** Content structure */
.table-responsive {
- clear: both;
- margin-bottom: 0px;
+ clear: both;
+ margin-bottom: 0px;
+}
+
+.page-header {
+ padding-bottom: 4px;
+ margin-bottom: 10px;
+}
+
+ul.context-links li a {
+
}
+/* navigation */
.navbar {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
-.page-header {
- padding-bottom: 4px;
- margin-bottom: 10px;
+.navbar-inverse {
+ background-color: #212121;
}
-.breadcrumb {
- margin-bottom: 10px;
+.navbar-brand {
+ padding-top: 3px;
+}
+
+.nav>li>a {
+ padding: 14px 19px 10px 19px;
+ border-bottom: 5px solid #F5F5F5;
+ border-radius: 0;
+ color: #B71C1C;
+}
+
+.nav>li>a:focus, .nav>li>a:hover {
+ border-bottom: 5px solid #B71C1C;
+ background-color: #f5f5f5;
+}
+
+.nav-pills>li.active>a, .nav-pills>li.active>a:focus, .nav li.open>a, .nav li.open>a:focus, .nav-pills>li.active>a:hover {
+ border-bottom: 5px solid #B71C1C;
+ color: #B71C1C;
+ background-color: #F5F5F5;
+}
+
+.navbar-inverse .navbar-nav >li>a {
+ border-bottom: 5px solid #212121;
+ color: #BDBDBD;
+}
+
+.nav-tabs>li>a {
+ border-bottom: 5px solid #F5F5F5;
+ margin-bottom: 1px;
+}
+
+.nav-tabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover, .nav-tabs>li>a:hover {
+ border-left: 1px solid #F5F5F5;
+ border-right: 1px solid #F5F5F5;
+ border-top: 1px solid #F5F5F5;
+ background-color: #F5F5F5;
+ border-bottom: 5px solid #B71C1C;
+ margin-bottom: 0;
+ color: #B71C1C;
+ box-shadow: none;
+}
+
+.nav-tabs {
+ border-bottom: 1px solid #B71C1C;
+ margin-bottom: 15px;
+}
+
+.nav-pills {
+ margin-bottom: 20px;
+}
+
+.dropdown-menu>li>a {
+ padding: 5px 20px;
+}
+/* end navigation */
+
+.alert {
+ border-radius: 0;
+ box-shadow: 0px 1px 10px rgba(0,0,0,0.1);
+}
+
+.panel {
+ margin-bottom: 10px;
+ border-radius: 0;
+ box-shadow: 0px 3px 7px rgba(0,0,0,.1);
+}
+
+.panel-default>.panel-heading {
+ color: #fff;
+ background-color: #424242;
+ letter-spacing: 1px;
}
.panel-heading {
- padding: 5px 15px;
+ padding: 5px 15px;
+ border-radius: 0;
+}
+
+.panel-heading a:link, .panel-heading a:visited {
+ color: white;
+}
+
+.panel-title {
+ font-size: 20px;
+}
+
+.panel-body {
+ padding: 0px;
}
#login .panel-heading {
- padding: 10px 15px
+ padding: 10px 15px
}
.content {
- padding: 10px;
+ padding: 10px;
}
.form-horizontal {
- margin-bottom: 10px;
- overflow: hidden;
+ margin-bottom: 10px;
+ overflow: hidden;
}
.form-horizontal .checkbox {
- padding: 3px 16px;
+ padding: 3px 16px;
}
.form-control {
height: 24px;
- padding: 0 12px;
+ padding: 0 6px;
margin-bottom: 5px;
}
+.form-control option {
+ padding: inherit;
+}
+
#login .form-control {
- height: 34px;
+ height: 34px;
}
#login .form-group {
- border: none;
+ border: none;
}
.form-group {
margin: 0;
padding: 7px 5px 5px 5px;
- border-bottom: 1px solid #eee;
+ border-bottom: 1px solid #E0E0E0;
}
.form-group:last-child {
- border-bottom: none;
+ border-bottom: none;
}
.input-group-addon {
- padding: 0 12px;
+ padding: 0 12px;
}
-.panel-default>.panel-heading {
- color: #fff;
- background-color: #424242;
- letter-spacing: 1px;
+.table {
+ margin-bottom: 0;
}
-.panel {
- margin-bottom: 10px;
+.table>tbody>tr>td {
+ padding: 6px 4px 6px 10px;
}
-.panel-body {
- padding: 0px;
+/* active table row */
+.table>tbody>tr.active>td, .table>tbody>tr.active>th, .table>tbody>tr>td.active, .table>tbody>tr>th.active, .table>tfoot>tr.active>td, .table>tfoot>tr.active>th, .table>tfoot>tr>td.active, .table>tfoot>tr>th.active, .table>thead>tr.active>td, .table>thead>tr.active>th, .table>thead>tr>td.active, .table>thead>tr>th.active {
+ background-color: #BDBDBD;
}
-.table {
- margin-bottom: 0;
+/* active table row on hover */
+.table-hover>tbody>tr.active:hover>td, .table-hover>tbody>tr.active:hover>th, .table-hover>tbody>tr:hover>.active, .table-hover>tbody>tr>td.active:hover, .table-hover>tbody>tr>th.active:hover {
+ background-color: #BDBDBD;
}
-.table>tbody>tr>td {
- padding: 4px;
+.popover {
+ max-width: none;
}
.help-block {
- margin-bottom: 0;
+ margin-bottom: 0;
}
.action-buttons {
- text-align: right;
- margin-bottom: 20px;
+ text-align: right;
+ margin-top: 10px;
+ margin-bottom: 20px;
}
/** Form validation */
.input-errors ul {
- margin-top: 20px;
+ margin-top: 20px;
}
/** Page header with title and breadcrumb */
.header {
- position: relative;
+ position: relative;
+ margin: 10px 0 20px 0;
}
.header .page-header {
- margin-top: 0;
+ margin-top: 0;
}
.header .context-links {
- position: absolute;
- right: 0;
- top: 15px;
+ position: absolute;
+ right: 15px;
+ top: 15px;
}
.header .context-links li {
- float: left;
- display: inline;
- margin-left: 10px;
+ float: left;
+ display: inline;
+ margin-left: 10px;
}
/** Form tweaks */
form .btn + .btn {
- margin-left: 5px;
+ margin-left: 5px;
}
.input-group-inbetween {
- border-left: 0;
+ border-left: 0;
}
.user-duplication .controls {
- margin-top: 10px;
+ margin-top: 10px;
}
.checkbox.multi label {
- display: block;
+ display: block;
}
.checkbox.multi .btn {
- margin-top: 5px;
+ margin-top: 5px;
}
.col-sm-10 .form-control {
- width: calc(50% - 15px); /* substract 15px to match a .col-sm-5; which satisfies my OCD */
+ width: calc(50% - 15px);
}
@media (max-width: 991px) {
- .col-sm-10 .form-control {
- width: 100%;
- }
+ .col-sm-10 .form-control {
+ width: 100%;
+ }
}
/** Page footer */
.footer {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 60px;
- background-color: #f5f5f5;
- padding-top: 10px;
- text-align: center;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 60px;
+ background-color: #212121;
+ padding-top: 10px;
+ text-align: center;
+}
+
+footer a {
+ color: #ffffff;
}
+
/** Homepage / dashboard */
+[id^="widgets-col"] {
+ min-height: 300px;
+}
+
+.widget .panel-heading {
+ background-color: #757575;
+}
+
#widgetSequence {
- position: fixed;
- left: 0;
- bottom: 0;
- padding: 20px 0;
- width: 100%;
- z-index: 100;
- text-align: center;
- background: rgba(255, 255, 255, 0.6);
- border-top: 1px solid #ddd;
+ position: fixed;
+ left: 0;
+ bottom: 0;
+ padding: 20px 0;
+ width: 100%;
+ z-index: 100;
+ text-align: center;
+ background: rgba(255, 255, 255, 0.6);
+ border-top: 1px solid #ddd;
}
/** Styling for jQuery autocomplete widget */
@@ -284,5 +422,362 @@ form .btn + .btn {
/** Override the bootstrap progress bar margins */
.progress {
- margin-bottom: 0px;
-} \ No newline at end of file
+ margin-bottom: 0px;
+ height: 14px;
+}
+
+#wizard .progress {
+ margin-bottom: 10px;
+}
+
+.progress-bar {
+ background-color: #B71C1C;
+}
+
+.progress-bar.progress-bar-success {
+ background-color: #4CAF50;
+}
+
+.progress-bar.progress-bar-warning {
+ background-color: #FBC02D;
+}
+
+.progress-bar.progress-bar-danger {
+ background-color: #B71C1C;
+}
+
+.panel-body.collapse.in {
+ overflow-x: auto;
+}
+
+/** start common colors */
+.alert-warning {
+ color: #FF6F00;
+ background-color: #FFFDE7;
+ border-color: #FFECB3;
+ border-top: 5px solid #FFD600;
+}
+
+.alert-success {
+ color: #1B5E20;
+ background-color: #E8F5E9;
+ border-color: #DCEDC8;
+ border-top: 5px solid #1B5E20;
+}
+
+.alert-info {
+ color: #01579B;
+ background-color: #E1F5FE;
+ border-color: #B2EBF2;
+ border-top: 5px solid #01579B;
+}
+
+.bg-primary {
+ color: #000;
+ background-color: #009688;
+}
+
+.bg-info {
+ color: #01579B;
+ background-color: #E1F5FE;
+}
+
+.bg-danger {
+ color: #000;
+ background-color: #EF9A9A;
+}
+
+.bg-warning {
+ color: #000;
+ background-color: #FFF9C4;
+}
+
+.bg-success {
+ color: #1B5E20;
+ background-color: #E8F5E9;
+}
+
+.btn-success {
+ background-color: #43A047;
+}
+
+.btn-danger {
+ background-color: #B71C1C;
+}
+
+.btn-primary {
+ background-color: #1976D2;
+}
+
+.text-warning {
+ color: #F57F17;
+}
+
+.text-success {
+ color: #4CAF50;
+}
+
+.text-danger {
+ color: #B71C1C;
+}
+/** end common colors */
+
+.table-hover>tbody>tr.hover-success:hover {
+ color: #000;
+ background-color: #A5D6A7;
+}
+
+.table-hover>tbody>tr.hover-danger:hover {
+ color: #000;
+ background-color: #EF9A9A;
+}
+
+.table-hover>tbody>tr.hover-warning:hover {
+ color: #000;
+ background-color: #FFF9C4;
+}
+
+/** icons are often used with onclick actions, so we need the cursor to change to a pointer */
+.icon-pointer
+{
+ cursor: pointer;
+}
+
+.icon-embed-btn
+{
+ font-size: 15px;
+ vertical-align: middle;
+ color: white;
+ padding-right: 15px;
+ padding-bottom: 17px;
+ margin-top: -0.125em
+
+}
+
+/* Used when you need an icon to act as a submit button **/
+.button-icon
+{
+ color: #337AB7;
+ background: none;
+ border: 0px;
+}
+
+.btn
+{
+ padding-right: 4px;
+ padding-left: 4px;
+}
+
+.list-group {
+ margin-bottom: 0;
+}
+
+/* icons in the dashboard panel headings should pull-right **/
+.widget-heading-icon
+{
+ display: block;
+ float: right;
+}
+
+.widget-heading-icon .fa {
+ color: #fff;
+}
+
+.widget-heading-icon .fa:hover {
+ color: #e0e0e0;
+}
+
+/* ipsec widget placeholder */
+#ipsec-Overview, #ipsec-tunnel, #ipsec-mobile {
+ background-color:#EEEEEE;
+}
+
+/* All pfSense textareas benefit from using a fixed width font **/
+textarea
+{
+ font-family: monospace;
+ font-size: 12px;
+ -moz-tab-size: 4;
+ -o-tab-size: 4;
+}
+
+/*
+ * CSS for Standard tree layout
+ * Copyright (C) 2005 SilverStripe Limited
+ * Feel free to use this on your websites, but please leave this message in the fies
+ * http://www.silverstripe.com/blog
+ */
+
+ul.tree{
+ width: auto;
+ padding-left : 0px;
+ margin-left : 0px;
+}
+
+ul.tree img{
+ border : none;
+}
+
+ul.tree, ul.tree ul {
+ padding-left: 0;
+}
+
+ul.tree ul {
+ margin-left: 16px;
+
+}
+
+ul.tree li.closed ul {
+ display: none;
+}
+
+ul.tree li {
+ list-style: none;
+ background: url(../../tree/i-repeater.gif) 0 0 repeat-y;
+ display: block;
+ width: auto;
+}
+
+ul.tree li.last {
+ list-style: none;
+ background-image: none;
+}
+
+/* Span-A: I/L/I glpyhs */
+ul.tree span.a {
+ background: url(../../tree/t.gif) 0 50% no-repeat;
+ display: block;
+}
+
+ul.tree span.a.last {
+ background: url(../../tree/l.gif) 0 50% no-repeat;
+}
+
+/* Span-B: Plus/Minus icon */
+ul.tree span.b {
+
+}
+
+ul.tree span.a.children span.b {
+ background: url(../../tree/minus.gif) 0 50% no-repeat;
+ cursor: pointer;
+}
+
+ul.tree li.closed span.a.children span.b {
+ background: url(../../tree/plus.gif) 0 50% no-repeat;
+ cursor: pointer;
+}
+
+/* Span-C: Spacing and extending tree line below the icon */
+ul.tree span.c {
+ margin-left: 16px;
+}
+
+ul.tree span.a.children span.c {
+ background: url(../../tree/i-bottom.gif) 0 50% no-repeat;
+}
+
+ul.tree span.a.spanClosed span.c {
+ background-image: none;
+}
+
+/* Anchor tag: Page icon */
+ul.tree a {
+ white-space: nowrap;
+ overflow: hidden;
+ padding: 3px 0px 3px 18px;
+ line-height: 16px;
+ background: url(../../tree/page-file.png) 0 0 no-repeat;
+}
+
+ul.tree span.a.children a {
+ background-image: url(../../tree/page-openfoldericon.png);
+}
+
+ul.tree span.a.children.spanClosed a {
+ background-image: url(../../tree/page-foldericon.png);
+}
+
+/* Unformatted tree */
+ul.tree.unformatted li {
+ background-image: none;
+ padding-left: 16px;
+}
+
+ul.tree.unformatted li li {
+ background-image: none;
+ padding-left: 0px;
+}
+
+/* Divs, by default store vertically aligned data */
+
+ul.tree li div {
+ float: right;
+ clear: right;
+ height: 1em;
+ margin-top: -26px;
+}
+
+/* As inside DIVs should be treated normally */
+ul.tree div a {
+ padding: 0;
+ background-image: none;
+ min-height: auto;
+ height: auto;
+}
+
+ul.tree li .over{
+ background-color : pink;
+}
+
+/*
+ * End of CSS for Standard tree layout
+ */
+
+@media (max-width: 1199px) {
+ .nav>li>a {
+ padding: 14px 9px 10px 9px;
+ }
+ }
+
+ @media (max-width: 991px) {
+ /* change top navbar from horizontal to vertical */
+ .navbar-header {
+ float: none;
+ }
+ .navbar-toggle {
+ display: block;
+ }
+ .navbar-collapse {
+ border-top: 1px solid transparent;
+ box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
+ }
+ .navbar-collapse.collapse {
+ display: none!important;
+ }
+ .navbar-nav {
+ float: none!important;
+ margin: 7.5px -15px;
+ }
+ .navbar-nav>li {
+ float: none;
+ }
+ .navbar-nav>li>a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ }
+ .navbar-text {
+ float: none;
+ margin: 15px 0;
+ }
+ /* since 3.1.0 */
+ .navbar-collapse.collapse.in {
+ display: block!important;
+ }
+ .collapsing {
+ overflow: hidden!important;
+ }
+ .navbar-fixed-bottom .navbar-collapse, .navbar-fixed-top .navbar-collapse {
+ max-height: none !important;
+ }
+}
diff --git a/src/usr/local/www/bootstrap/fonts/LICENSE.txt b/src/usr/local/www/bootstrap/fonts/LICENSE.txt
new file mode 100755
index 0000000..d645695
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Black.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Black.ttf
new file mode 100755
index 0000000..fbde625
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Black.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-BlackItalic.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-BlackItalic.ttf
new file mode 100755
index 0000000..60f7782
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-BlackItalic.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Bold.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Bold.ttf
new file mode 100755
index 0000000..a355c27
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Bold.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-BoldItalic.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-BoldItalic.ttf
new file mode 100755
index 0000000..3c9a7a3
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-BoldItalic.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Italic.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Italic.ttf
new file mode 100755
index 0000000..ff6046d
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Italic.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Light.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Light.ttf
new file mode 100755
index 0000000..94c6bcc
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Light.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-LightItalic.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-LightItalic.ttf
new file mode 100755
index 0000000..04cc002
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-LightItalic.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Medium.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Medium.ttf
new file mode 100755
index 0000000..39c63d7
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Medium.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-MediumItalic.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-MediumItalic.ttf
new file mode 100755
index 0000000..dc743f0
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-MediumItalic.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Regular.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Regular.ttf
new file mode 100755
index 0000000..8c082c8
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Regular.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-Thin.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-Thin.ttf
new file mode 100755
index 0000000..d695550
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-Thin.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/Roboto-ThinItalic.ttf b/src/usr/local/www/bootstrap/fonts/Roboto-ThinItalic.ttf
new file mode 100755
index 0000000..07172ff
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/Roboto-ThinItalic.ttf
Binary files differ
diff --git a/src/usr/local/www/bootstrap/fonts/roboto.css b/src/usr/local/www/bootstrap/fonts/roboto.css
new file mode 100644
index 0000000..4e88d82
--- /dev/null
+++ b/src/usr/local/www/bootstrap/fonts/roboto.css
@@ -0,0 +1,83 @@
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 100;
+ src: local('Roboto Thin'), local('Roboto-Thin'), url(Roboto-Thin.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 300;
+ src: local('Roboto Light'), local('Roboto-Light'), url(Roboto-Light.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 400;
+ src: local('Roboto'), local('Roboto-Regular'), url(Roboto-Regular.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 500;
+ src: local('Roboto Medium'), local('Roboto-Medium'), url(Roboto-Medium.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 700;
+ src: local('Roboto Bold'), local('Roboto-Bold'), url(Roboto-Bold.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: normal;
+ font-weight: 900;
+ src: local('Roboto Black'), local('Roboto-Black'), url(Roboto-Black.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: italic;
+ font-weight: 100;
+ src: local('Roboto Thin Italic'), local('Roboto-ThinItalic'), url(Roboto-ThinItalic.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: italic;
+ font-weight: 300;
+ src: local('Roboto Light Italic'), local('Roboto-LightItalic'), url(Roboto-LightItalic.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: italic;
+ font-weight: 400;
+ src: local('Roboto Italic'), local('Roboto-Italic'), url(Roboto-Italic.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: italic;
+ font-weight: 500;
+ src: local('Roboto Medium Italic'), local('Roboto-MediumItalic'), url(Roboto-MediumItalic.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: italic;
+ font-weight: 700;
+ src: local('Roboto Bold Italic'), local('Roboto-BoldItalic'), url(Roboto-BoldItalic.ttf) format('truetype');
+}
+
+@font-face {
+ font-family: 'Roboto';
+ font-style: italic;
+ font-weight: 900;
+ src: local('Roboto Black Italic'), local('Roboto-BlackItalic'), url(Roboto-BlackItalic.ttf) format('truetype');
+} \ No newline at end of file
diff --git a/src/usr/local/www/classes/Form.class.php b/src/usr/local/www/classes/Form.class.php
index b489a72..16865c0 100644
--- a/src/usr/local/www/classes/Form.class.php
+++ b/src/usr/local/www/classes/Form.class.php
@@ -27,11 +27,6 @@
POSSIBILITY OF SUCH DAMAGE.
*/
-require_once('classes/Form/Element.class.php');
-require_once('classes/Form/Input.class.php');
-foreach (glob('classes/Form/*.class.php') as $file)
- require_once($file);
-
class Form extends Form_Element
{
const LABEL_WIDTH = 2;
@@ -40,8 +35,6 @@ class Form extends Form_Element
protected $_attributes = array(
'class' => array('form-horizontal' => true),
'method' => 'post',
- // Empty is interpreted by all browsers to submit to the current URI
- 'action' => '',
);
protected $_sections = array();
protected $_global = array();
@@ -59,6 +52,9 @@ class Form extends Form_Element
if (false !== $submit)
$this->addGlobal($submit);
+
+ if (!isset($this->_attributes['action']))
+ $this->_attributes['action'] = $_SERVER['REQUEST_URI'];
}
public function add(Form_Section $section)
diff --git a/src/usr/local/www/classes/Form/Button.class.php b/src/usr/local/www/classes/Form/Button.class.php
index 32876a7..0b2a9de 100644
--- a/src/usr/local/www/classes/Form/Button.class.php
+++ b/src/usr/local/www/classes/Form/Button.class.php
@@ -36,7 +36,7 @@ class Form_Button extends Form_Input
'type' => 'submit',
);
- public function __construct($name, $title, $link = null)
+ public function __construct($name, $title, $link = null, $icon = null)
{
// If we have a link; we're actually an <a class='btn'>
if (isset($link))
@@ -45,6 +45,16 @@ class Form_Button extends Form_Input
$this->_tagName = 'a';
$this->addClass('btn-default');
unset($this->_attributes['type']);
+ if(isset($icon)) {
+ $this->_attributes['icon'] = $icon;
+ }
+ }
+ else if(isset($icon))
+ {
+ $this->_tagSelfClosing = false;
+ $this->_tagName = 'button';
+ $this->_attributes['value'] = $title;
+ $this->_attributes['icon'] = $icon;
}
else
{
diff --git a/src/usr/local/www/classes/Form/Checkbox.class.php b/src/usr/local/www/classes/Form/Checkbox.class.php
index e0734de..d94c210 100644
--- a/src/usr/local/www/classes/Form/Checkbox.class.php
+++ b/src/usr/local/www/classes/Form/Checkbox.class.php
@@ -46,10 +46,16 @@ class Form_Checkbox extends Form_Input
$this->column->addClass('checkbox');
}
- public function displayAsRadio()
+ public function displayAsRadio($id = null)
{
$this->_attributes['type'] = 'radio';
+ if ($id != null) {
+ $this->_attributes['id'] = $id;
+ } else {
+ $this->_attributes['id'] = $this->_attributes['name'] . '_' . $this->_attributes['value'] . ':' .substr(uniqid(), 9);
+ }
+
return $this;
}
diff --git a/src/usr/local/www/classes/Form/Element.class.php b/src/usr/local/www/classes/Form/Element.class.php
index d3ad142..163c14b 100644
--- a/src/usr/local/www/classes/Form/Element.class.php
+++ b/src/usr/local/www/classes/Form/Element.class.php
@@ -61,7 +61,7 @@ class Form_Element
$this->_attributes[ $key ] = $value;
return $this;
}
-
+
public function __toString()
{
$attributes = '';
@@ -79,12 +79,27 @@ class Form_Element
if ($value === null)
continue;
+ if ($key == "icon")
+ continue;
+
$attributes .= ' '. $key;
if ($value !== true)
$attributes .= '="' . htmlspecialchars($value) . '"';
}
- return '<'. $this->_tagName . $attributes . ($this->_tagSelfClosing ? '/' : '') .'>';
+ if (isset($this->_attributes['icon'])) {
+ $rv = '<'. $this->_tagName . $attributes .'>' .
+ '<i class="fa ' . $this->_attributes['icon'] . ' icon-embed-btn' . '">' . ' </i>' .
+ htmlspecialchars($this->_attributes['value']);
+
+ if ($this->_tagName != 'a') {
+ $rv .= '</' . $this->_tagName . '>';
+ }
+
+ return $rv;
+ } else {
+ return '<'. $this->_tagName . $attributes . ($this->_tagSelfClosing ? '/' : '') .'>';
+ }
}
protected function _setParent(Form_Element $parent)
diff --git a/src/usr/local/www/classes/Form/Group.class.php b/src/usr/local/www/classes/Form/Group.class.php
index 4ddf70d..64d1db3 100644
--- a/src/usr/local/www/classes/Form/Group.class.php
+++ b/src/usr/local/www/classes/Form/Group.class.php
@@ -108,6 +108,8 @@ EOT;
public function __toString()
{
+ global $config;
+
$element = parent::__toString();
// Automatically determine width for inputs without explicit set
@@ -130,10 +132,19 @@ EOT;
foreach ($missingWidth as $input)
$input->setWidth($spaceLeft / count($missingWidth));
- $target = $this->_labelTarget->getId();
+ if (strtolower($this->_labelTarget->get_Type()) == 'hidden')
+ $hidden = true;
+
+ $form_controls = array('input', 'select', 'button', 'textarea', 'option', 'optgroup', 'fieldset', 'label');
+ if (in_array(strtolower($this->_labelTarget->gettagName()), $form_controls) && !$hidden)
+ $target = $this->_labelTarget->getId();
+
$inputs = implode('', $this->_inputs);
$help = $this->_getHelp();
+ if (!isset($config['system']['webgui']['webguileftcolumnhyper']))
+ $target = null;
+
$label = new Form_Element('label', false, ['for' => $target]);
$label->addClass('col-sm-'.Form::LABEL_WIDTH, 'control-label');
diff --git a/src/usr/local/www/classes/Form/Input.class.php b/src/usr/local/www/classes/Form/Input.class.php
index e1fe31f..608197d 100644
--- a/src/usr/local/www/classes/Form/Input.class.php
+++ b/src/usr/local/www/classes/Form/Input.class.php
@@ -30,7 +30,7 @@ class Form_Input extends Form_Element
{
public $column;
protected $_tagName = 'input';
- protected $_tagSelfClosing = true;
+ protected $_tagSelfClosing = false;
protected $_attributes = array(
'class' => array('form-control' => true),
'name' => null,
@@ -75,16 +75,47 @@ class Form_Input extends Form_Element
return $this->_title;
}
+ public function getValue()
+ {
+ return $this->_attributes['value'];
+ }
+
public function getName()
{
return $this->_attributes['name'];
}
+ public function setName($nm)
+ {
+ $this->_attributes['name'] = $nm;
+ $this->_attributes['id'] = $nm;
+ }
+
+ public function setValue($val)
+ {
+ $this->_attributes['value'] = $val;
+ }
+
+ public function setType($tp)
+ {
+ $this->_attributes['type'] = $tp;
+ }
+
public function getId()
{
return $this->_attributes['id'];
}
+ public function get_Type()
+ {
+ return $this->_attributes['type'];
+ }
+
+ public function gettagName()
+ {
+ return $this->_tagName;
+ }
+
public function setHelp($help, array $params = array())
{
$this->_help = $help;
@@ -112,6 +143,13 @@ class Form_Input extends Form_Element
return $this;
}
+ public function setCols($size)
+ {
+ $this->_attributes['cols'] = $size;
+
+ return $this;
+ }
+
public function setReadonly()
{
$this->_attributes['readonly'] = 'readonly';
@@ -145,7 +183,9 @@ class Form_Input extends Form_Element
public function setPlaceholder($text)
{
- $this->_attributes['placeholder'] = $text;
+ $placeholder_input_types = array('email', 'number', 'password', 'search', 'tel', 'text', 'url');
+ if (in_array(strtolower($this->_attributes['type']), $placeholder_input_types))
+ $this->_attributes['placeholder'] = $text;
return $this;
}
diff --git a/src/usr/local/www/classes/Form/Section.class.php b/src/usr/local/www/classes/Form/Section.class.php
index b1dfb22..631562c 100644
--- a/src/usr/local/www/classes/Form/Section.class.php
+++ b/src/usr/local/www/classes/Form/Section.class.php
@@ -26,6 +26,7 @@
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
+
class Form_Section extends Form_Element
{
protected $_tagName = 'div';
@@ -37,10 +38,15 @@ class Form_Section extends Form_Element
);
protected $_title;
protected $_groups = array();
+ protected $_collapsible;
- public function __construct($title)
+ public function __construct($title, $id = "", $collapsible = 0)
{
+ if (!empty($id)) {
+ $this->_attributes['id'] = $id;
+ }
$this->_title = $title;
+ $this->_collapsible = $collapsible;
}
public function add(Form_Group $group)
@@ -62,21 +68,58 @@ class Form_Section extends Form_Element
return $input;
}
+ // Shortcut, adds a group with a password and a confirm password field.
+ // The confirm password element is created by apprnding "_confirm" to the name supplied
+ // The value is overwritten with a default pattern (So the user cannot see it)
+ public function addPassword(Form_Input $input)
+ {
+ $group = new Form_Group($input->getTitle());
+ if($input->getValue() != "") {
+ $input->setValue(DMYPWD);
+ }
+
+ $input->setType("password");
+ $group->add($input);
+ $confirm = clone $input;
+ $confirm->setName($confirm->getName() . "_confirm");
+ $confirm->setHelp("Confirm");
+ $group->add($confirm);
+ $this->add($group);
+
+ return $input;
+ }
+
public function __toString()
{
$element = parent::__toString();
$title = htmlspecialchars(gettext($this->_title));
$body = implode('', $this->_groups);
+ $hdricon = "";
+ $bodyclass = '<div class="panel-body">';
+
+ if ($this->_collapsible & COLLAPSIBLE) {
+ $hdricon = '<span class="widget-heading-icon">' .
+ '<a data-toggle="collapse" href="#' . $this->_attributes['id'] . '_panel-body">' .
+ '<i class="fa fa-plus-circle"></i>' .
+ '</a>' .
+ '</span>';
+ $bodyclass = '<div id="' . $this->_attributes['id'] . '_panel-body" class="panel-body collapse ';
+ if (($this->_collapsible & SEC_CLOSED)) {
+ $bodyclass .= 'out">';
+ } else {
+ $bodyclass .= 'in">';
+ }
+ }
return <<<EOT
{$element}
<div class="panel-heading">
- <h2 class="panel-title">{$title}</h2>
+ <h2 class="panel-title">{$title}{$hdricon}</h2>
</div>
- <div class="panel-body">
+ {$bodyclass}
{$body}
</div>
</div>
EOT;
}
-} \ No newline at end of file
+}
diff --git a/src/usr/local/www/classes/Form/Select.class.php b/src/usr/local/www/classes/Form/Select.class.php
index c7d73c1..13c49f7 100644
--- a/src/usr/local/www/classes/Form/Select.class.php
+++ b/src/usr/local/www/classes/Form/Select.class.php
@@ -66,7 +66,14 @@ class Form_Select extends Form_Input
$selected = ($sval == $value);
}
- $options .= '<option value="'. htmlspecialchars($value) .'"'.($selected ? ' selected' : '').'>'. htmlspecialchars(gettext($name)) .'</option>';
+ if (!empty(trim($name)) || is_numeric($name)) {
+ $name_str = htmlspecialchars(gettext($name));
+ } else {
+ // Fixes HTML5 validation: Element option without attribute label must not be empty
+ $name_str = "&nbsp;";
+ }
+
+ $options .= '<option value="'. htmlspecialchars($value) .'"'.($selected ? ' selected' : '').'>'. $name_str .'</option>';
}
return <<<EOT
@@ -75,4 +82,4 @@ class Form_Select extends Form_Input
</select>
EOT;
}
-} \ No newline at end of file
+}
diff --git a/src/usr/local/www/classes/Form/Textarea.class.php b/src/usr/local/www/classes/Form/Textarea.class.php
index 8c1c157..1ca879e 100644
--- a/src/usr/local/www/classes/Form/Textarea.class.php
+++ b/src/usr/local/www/classes/Form/Textarea.class.php
@@ -32,7 +32,7 @@ class Form_Textarea extends Form_Input
protected $_value;
protected $_attributes = array(
'rows' => 5,
- 'class' => array('form-control' => true),
+ 'class' => array('form-control' => true)
);
public function __construct($name, $title, $value)
@@ -42,6 +42,20 @@ class Form_Textarea extends Form_Input
$this->_value = $value;
}
+ public function setRows($size)
+ {
+ $this->_attributes['rows'] = $size;
+
+ return $this;
+ }
+
+ public function setNoWrap()
+ {
+ $this->_attributes['wrap'] = 'none';
+
+ return $this;
+ }
+
protected function _getInput()
{
$element = parent::_getInput();
diff --git a/src/usr/local/www/classes/Modal.class.php b/src/usr/local/www/classes/Modal.class.php
index 4d5cf4f..44b22b1 100644
--- a/src/usr/local/www/classes/Modal.class.php
+++ b/src/usr/local/www/classes/Modal.class.php
@@ -1,7 +1,5 @@
<?php
-require_once('classes/Form.class.php');
-
class Modal extends Form_Section
{
protected $_attributes = array(
diff --git a/src/usr/local/www/classes/autoload.inc.php b/src/usr/local/www/classes/autoload.inc.php
new file mode 100644
index 0000000..f6ad1b8
--- /dev/null
+++ b/src/usr/local/www/classes/autoload.inc.php
@@ -0,0 +1,12 @@
+<?php
+function pfsense_www_class_autoloader($classname) {
+ // Convert classname to match filename conventions
+ $filename = str_replace('_', '/', $classname);
+
+ // Build the full path, load it if it exists
+ $filepath = "/usr/local/www/classes/$filename.class.php";
+ if (file_exists($filepath)) {
+ require_once($filepath);
+ }
+}
+spl_autoload_register('pfsense_www_class_autoloader'); \ No newline at end of file
diff --git a/src/usr/local/www/copyright-master.txt b/src/usr/local/www/copyright-master.txt
index 7178793..bf35096 100644
--- a/src/usr/local/www/copyright-master.txt
+++ b/src/usr/local/www/copyright-master.txt
@@ -1,6 +1,8 @@
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php
index 50e105f..2c9ffc1 100644
--- a/src/usr/local/www/crash_reporter.php
+++ b/src/usr/local/www/crash_reporter.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
crash_reporter.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,9 +52,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: header
-*/
##|+PRIV
##|*IDENT=page-diagnostics-crash-reporter
@@ -82,6 +77,7 @@ function upload_crash_report($files) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
+ curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
curl_setopt($ch, CURLOPT_URL, $g['crashreporterurl']);
@@ -154,25 +150,25 @@ exec("/usr/bin/grep -vi warning /tmp/PHP_errors.log", $php_errors);
echo "Could not locate any crash data.";
}
?>
- <div class="jumbotron">
<div class="panel panel-default">
- <div class="panel-heading"><h3><?=gettext("Unfortunately we have detected a programming bug.")?></h3></div>
+ <div class="panel-heading"><?=gettext("Unfortunately we have detected a programming bug.")?></div>
<div class="panel-body">
- <p>
- <?=gettext("Would you like to submit the programming debug logs to the pfSense developers for inspection?")?>
- <i><?=gettext("Please double check the contents to ensure you are comfortable sending this information before clicking Yes.")?></i>
- </p>
- <textarea readonly="readonly" style="width: 100%; height: 350px;">
- <?=$crash_reports?>
- </textarea>
- <form action="crash_reporter.php" method="post">
- <button class="btn btn-primary" name="Submit" type="submit" value="Yes"><?=gettext("Yes")?> - <?=gettext("Submit this to the developers for inspection")?></button>
- <button class="btn btn-default" name="Submit" type="submit" value="No"><?=gettext("No")?> - <?=gettext("Just delete the crash report and take me back to the Dashboard")?></button>
- </form>
- </div>
- </div>
+ <div class="content">
+ <p>
+ <?=gettext("Would you like to submit the programming debug logs to the pfSense developers for inspection?")?>
+ <i><?=gettext("Please double check the contents to ensure you are comfortable sending this information before clicking Yes.")?></i>
+ </p>
+ <textarea readonly style="width: 100%; height: 350px;">
+ <?=$crash_reports?>
+ </textarea>
+ <form action="crash_reporter.php" method="post">
+ <button class="btn btn-primary" name="Submit" type="submit" value="Yes"><?=gettext("Yes")?> - <?=gettext("Submit this to the developers for inspection")?></button>
+ <button class="btn btn-default" name="Submit" type="submit" value="No"><?=gettext("No")?> - <?=gettext("Just delete the crash report and take me back to the Dashboard")?></button>
+ </form>
+ </div>
+ </div>
<?php
}
?>
-<?php include("foot.inc")?> \ No newline at end of file
+<?php include("foot.inc")?>
diff --git a/src/usr/local/www/diag_arp.php b/src/usr/local/www/diag_arp.php
index 01d1ef0..d456be9 100644
--- a/src/usr/local/www/diag_arp.php
+++ b/src/usr/local/www/diag_arp.php
@@ -3,11 +3,13 @@
diag_arp.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,14 +56,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/cat /usr/sbin/arp
- pfSense_MODULE: arp
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-arptable
-##|*NAME=Diagnostics: ARP Table page
+##|*NAME=Diagnostics: ARP Table
##|*DESCR=Allow access to the 'Diagnostics: ARP Table' page.
##|*MATCH=diag_arp.php*
##|-PRIV
@@ -302,6 +299,7 @@ include("head.inc");
for ($i = 0; $i < ob_get_level(); $i++) {
ob_end_flush();
}
+
ob_implicit_flush(1);
// Resolve hostnames and replace Z_ with "". The intention
@@ -336,7 +334,7 @@ $data = msort($data, "dnsresolve");
$mac_man = load_mac_manufacturer_table();
?>
<div class="table-responsive">
- <table class="table table-striped table-hover">
+ <table class="sortable-theme-bootstrap table table-striped table-hover" data-sortable>
<thead>
<tr>
<th><?= gettext("Interface")?></th>
@@ -346,7 +344,9 @@ $mac_man = load_mac_manufacturer_table();
</tr>
</thead>
<tbody>
- <?php foreach ($data as $entry): ?>
+
+<?php
+ foreach ($data as $entry): ?>
<tr>
<td><?=$hwif[$entry['interface']]?></td>
<td><?=$entry['ip']?></td>
@@ -356,8 +356,9 @@ $mac_man = load_mac_manufacturer_table();
$mac = trim($entry['mac']);
$mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]);
- if (isset($mac_man[$mac_hi]))
+ if (isset($mac_man[$mac_hi])) {
print '<small>('. $mac_man[$mac_hi] .')</small>';
+ }
?>
</td>
<td><?=trim(str_replace("Z_ ", "", $entry['dnsresolve']))?></td>
@@ -367,16 +368,16 @@ $mac_man = load_mac_manufacturer_table();
</table>
</div>
-<script>
+<script type="text/javascript">
//<![CDATA[
// Clear the "loading" div once the page has loaded"
-events.push(function(){
+events.push(function() {
$('#loading').empty();
});
-//]]>
+//]]>
</script>
-<?php
+<?php
print_info_box(gettext("Local IPv6 peers use ") . '<a href="diag_ndp.php">' . gettext("NDP") . '</a>' . gettext(" instead of ARP"), 'info');
include("foot.inc")?>
diff --git a/src/usr/local/www/diag_authentication.php b/src/usr/local/www/diag_authentication.php
index 1b3c366..55b784e 100644
--- a/src/usr/local/www/diag_authentication.php
+++ b/src/usr/local/www/diag_authentication.php
@@ -3,11 +3,10 @@
diag_authentication.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2010 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,19 +53,14 @@
*
*/
-/*
- pfSense_MODULE: auth
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-authentication
-##|*NAME=Diagnostics: Authentication page
+##|*NAME=Diagnostics: Authentication
##|*DESCR=Allow access to the 'Diagnostics: Authentication' page.
##|*MATCH=diag_authentication.php*
##|-PRIV
require("guiconfig.inc");
-require_once("PEAR.inc");
require_once("radius.inc");
if ($_POST) {
@@ -89,35 +83,44 @@ if ($_POST) {
$groups = getUserGroups($_POST['username'], $authcfg, $attributes);
$savemsg .= "&nbsp;" . gettext("This user is a member of groups") . ": <br />";
$savemsg .= "<ul>";
- foreach ($groups as $group)
+ foreach ($groups as $group) {
$savemsg .= "<li>" . "{$group} " . "</li>";
+ }
$savemsg .= "</ul>";
} else {
$input_errors[] = gettext("Authentication failed.");
}
}
+} else {
+ if (isset($config['system']['webgui']['authmode'])) {
+ $pconfig['authmode'] = $config['system']['webgui']['authmode'];
+ } else {
+ $pconfig['authmode'] = "Local Database";
+ }
}
+
$pgtitle = array(gettext("Diagnostics"), gettext("Authentication"));
$shortcut_section = "authentication";
include("head.inc");
?>
<?php
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print('<div class="alert alert-success" role="alert">'. $savemsg.'</div>');
-
-require_once('classes/Form.class.php');
+}
$form = new Form('Test');
$section = new Form_Section('Authentication Test');
-foreach (auth_get_authserver_list() as $auth_server)
+foreach (auth_get_authserver_list() as $auth_server) {
$serverlist[$auth_server['name']] = $auth_server['name'];
+}
$section->addInput(new Form_Select(
'authmode',
diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php
index 9adc6a9..074ae28 100644
--- a/src/usr/local/www/diag_backup.php
+++ b/src/usr/local/www/diag_backup.php
@@ -1,11 +1,12 @@
<?php
-/* $Id$ */
/*
diag_backup.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +56,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/shutdown
- pfSense_MODULE: backup
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-backup/restore
-##|*NAME=Diagnostics: Backup/restore page
+##|*NAME=Diagnostics: Backup/restore
##|*DESCR=Allow access to the 'Diagnostics: Backup/restore' page.
##|*MATCH=diag_backup.php*
##|-PRIV
@@ -73,7 +69,6 @@ ini_set('max_input_time', '0');
/* omit no-cache headers because it confuses IE with file downloads */
$omit_nocacheheaders = true;
-$nocsrf = true;
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
@@ -178,8 +173,6 @@ function add_base_packages_menu_items() {
$modified_config = true;
}
}
- $static_output .= "done.\n";
- update_output_window($static_output);
}
}
}
@@ -232,12 +225,9 @@ if ($_POST) {
if ($mode) {
if ($mode == "download") {
if ($_POST['encrypt']) {
- if (!$_POST['encrypt_password'] || !$_POST['encrypt_passconf']) {
+ if (!$_POST['encrypt_password']) {
$input_errors[] = gettext("You must supply and confirm the password for encryption.");
}
- if ($_POST['encrypt_password'] != $_POST['encrypt_passconf']) {
- $input_errors[] = gettext("The supplied 'Password' and 'Confirm' field values must match.");
- }
}
if (!$input_errors) {
@@ -310,12 +300,9 @@ if ($_POST) {
if ($mode == "restore") {
if ($_POST['decrypt']) {
- if (!$_POST['decrypt_password'] || !$_POST['decrypt_passconf']) {
+ if (!$_POST['decrypt_password']) {
$input_errors[] = gettext("You must supply and confirm the password for decryption.");
}
- if ($_POST['decrypt_password'] != $_POST['decrypt_passconf']) {
- $input_errors[] = gettext("The supplied 'Password' and 'Confirm' field values must match.");
- }
}
if (!$input_errors) {
@@ -373,7 +360,7 @@ if ($_POST) {
/* this will be picked up by /index.php */
conf_mount_rw();
mark_subsystem_dirty("restore");
- touch("/conf/needs_package_sync");
+ touch("/conf/needs_package_sync_after_reboot");
/* remove cache, we will force a config reboot */
if (file_exists("{$g['tmp_path']}/config.cache")) {
unlink("{$g['tmp_path']}/config.cache");
@@ -606,19 +593,21 @@ function build_area_list($showall) {
}
}
-$pgtitle = array(gettext("Diagnostics"), gettext("Backup/restore"));
+$pgtitle = array(gettext("Diagnostics"), gettext("Backup/Restore"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
if (is_subsystem_dirty('restore')):
?>
<br/>
- <form action="reboot.php" method="post">
+ <form action="diag_reboot.php" method="post">
<input name="Submit" type="hidden" value="Yes" />
<?=print_info_box(gettext("The firewall configuration has been changed.") . "<br />" . gettext("The firewall is now rebooting."))?>
<br />
@@ -631,8 +620,6 @@ $tab_array[] = array(gettext("Config History"), false, "diag_confbak.php");
$tab_array[] = array(gettext("Backup/Restore"), true, "diag_backup.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form(false);
$form->setMultipartEncoding(); // Allow file uploads
@@ -668,18 +655,9 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Input(
'encrypt_password',
- null,
+ 'Password',
'password',
- null,
- ['placeholder' => 'Password']
-));
-
-$section->addInput(new Form_Input(
- 'encrypt_passconf',
- null,
- 'password',
- null,
- ['placeholder' => 'Confirm password']
+ null
));
$group = new Form_Group('');
@@ -721,25 +699,17 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Input(
'decrypt_password',
- null,
+ 'Password',
'password',
null,
['placeholder' => 'Password']
));
-$section->addInput(new Form_Input(
- 'decrypt_passconf',
- null,
- 'password',
- null,
- ['placeholder' => 'Confirm password']
-));
-
$group = new Form_Group('');
$group->add(new Form_Button(
'Submit',
- 'Restore configuration'
-))->setHelp('The firewall will reboot after restoring the configuration.')->removeClass('btn-primary')->addClass('btn-danger');
+ 'Restore Configuration'
+))->setHelp('The firewall will reboot after restoring the configuration.')->removeClass('btn-primary')->addClass('btn-danger restore');
$section->add($group);
@@ -752,8 +722,8 @@ if (($config['installedpackages']['package'] != "") || (is_subsystem_dirty("pack
$group = new Form_Group('');
$group->add(new Form_Button(
'Submit',
- 'Reinstall packages'
- ))->setHelp('Click this button to reinstall all system packages. This may take a while.')->removeClass('btn-primary')->addClass('btn-warning');
+ 'Reinstall Packages'
+ ))->setHelp('Click this button to reinstall all system packages. This may take a while.')->removeClass('btn-primary')->addClass('btn-success');
$section->add($group);
}
@@ -775,10 +745,10 @@ print($form);
?>
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// ------- Show/hide sections based on checkbox settings --------------------------------------
-
+
function hideSections(hide) {
hidePasswords();
}
@@ -789,12 +759,12 @@ events.push(function(){
decryptHide = !($('input[name="decrypt"]').is(':checked'));
hideInput('encrypt_password', encryptHide);
- hideInput('encrypt_passconf', encryptHide);
+ hideInput('encrypt_password_confirm', encryptHide);
hideInput('decrypt_password', decryptHide);
- hideInput('decrypt_passconf', decryptHide);
+ hideInput('decrypt_password_confirm', decryptHide);
}
- // ---------- Click checkbox handlers ---------------------------------------------------------
+ // ---------- Click handlers ------------------------------------------------------------------
$('input[name="encrypt"]').on('change', function() {
hidePasswords();
@@ -804,9 +774,17 @@ events.push(function(){
hidePasswords();
});
+ $('#conffile').change(function () {
+ if (document.getElementById("conffile").value) {
+ $('.restore').prop('disabled', false);
+ } else {
+ $('.restore').prop('disabled', true);
+ }
+ });
// ---------- On initial page load ------------------------------------------------------------
hideSections();
+ $('.restore').prop('disabled', true);
});
//]]>
</script>
diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php
index c74f28f..5b817bc 100644
--- a/src/usr/local/www/diag_confbak.php
+++ b/src/usr/local/www/diag_confbak.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
diag_confbak.php
- Copyright (C) 2005 Colin Smith
- Copyright (C) 2010 Jim Pingle
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- pfSense_MODULE: config
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Colin Smith
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-diagnostics-configurationhistory
-##|*NAME=Diagnostics: Configuration History page
+##|*NAME=Diagnostics: Configuration History
##|*DESCR=Allow access to the 'Diagnostics: Configuration History' page.
##|*MATCH=diag_confbak.php*
##|-PRIV
@@ -59,7 +80,7 @@ if (isset($_POST['backupcount'])) {
conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
-
+
if ($_GET['newver'] != "") {
if (config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0) {
$savemsg = sprintf(gettext('Successfully reverted to timestamp %1$s with description "%2$s".'), date(gettext("n/j/y H:i:s"), $_GET['newver']), htmlspecialchars($confvers[$_GET['newver']]['description']));
@@ -145,13 +166,13 @@ if ($diff) {
<tr>
<td valign="middle" bgcolor="<?=$color; ?>" style="white-space: pre-wrap;"><?=htmlentities($line)?></td>
</tr>
-<?php
+<?php
}
?>
</table>
</div>
</div>
-<?php
+<?php
}
$tab_array = array();
@@ -159,8 +180,6 @@ $tab_array[] = array(gettext("Config History"), true, "diag_confbak.php");
$tab_array[] = array(gettext("Backup/Restore"), false, "diag_backup.php");
display_top_tabs($tab_array);
-require('classes/Form.class.php');
-
$form = new Form(new Form_Button(
'Submit',
gettext("Save")
@@ -190,13 +209,13 @@ if (is_array($confvers)) {
print_info_box(gettext('To view the differences between an older configuration and a newer configuration, ' .
'select the older configuration using the left column of radio options and select the newer configuration in the right column, ' .
'then press the "Diff" button.'));
-}
-?>
-
+}
+?>
+
<form action="diag_confbak.php" method="get">
<div class="table-resposive">
<table class="table table-striped table-hover table-condensed">
-<?php
+<?php
if (is_array($confvers)):
?>
<thead>
@@ -225,7 +244,7 @@ if (is_array($confvers)):
<td><?=gettext("Current configuration")?></td>
</tr>
<?php
- // And now for hte table of prior backups
+ // And now for the table of prior backups
$c = 0;
foreach ($confvers as $version):
if ($version['time'] != 0) {
@@ -243,9 +262,9 @@ if (is_array($confvers)):
if ($c < (count($confvers) - 1)) {
?>
<input type="radio" name="newtime" value="<?=$version['time']?>" />
-<?php
+<?php
}
- $c++;
+ $c++;
?>
</td>
<td><?= $date ?></td>
@@ -253,26 +272,19 @@ if (is_array($confvers)):
<td><?= format_bytes($version['filesize']) ?></td>
<td><?= htmlspecialchars($version['description']) ?></td>
<td>
- <a href="diag_confbak.php?newver=<?=$version['time']?>" class="btn btn-xs btn-success"
- onclick="return confirm('<?=gettext("Are you sure you want to replace the current configuration with this backup?")?>')">
- <?=gettext("Revert")?>
- </a>
- <a href="diag_confbak.php?rmver=<?=$version['time']?>" class="btn btn-xs btn-danger">
- <?=gettext("Delete")?>
- </a>
- <a href="diag_confbak.php?getcfg=<?=$version['time']?>" class="btn btn-xs btn-default">
- <?=gettext("Download")?>
- </a>
+ <a class="fa fa-undo" title="<?=gettext('Revert config')?>" href="diag_confbak.php?newver=<?=$version['time']?>" onclick="return confirm('<?=gettext("Are you sure you want to replace the current configuration with this backup?")?>')"></a>
+ <a class="fa fa-download" title="<?=gettext('Download config')?>" href="diag_confbak.php?getcfg=<?=$version['time']?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete config')?>" href="diag_confbak.php?rmver=<?=$version['time']?>"></a>
</td>
</tr>
-<?php
+<?php
endforeach;
?>
<tr>
<td colspan="2"><input type="submit" name="diff" class="btn btn-info btn-xs" value="<?=gettext("Diff"); ?>" /></td>
<td colspan="5"></td>
</tr>
-<?php
+<?php
else:
print_info_box(gettext("No backups found."), 'danger');
endif;
diff --git a/src/usr/local/www/diag_defaults.php b/src/usr/local/www/diag_defaults.php
index 79786ad..e13c17a 100755
--- a/src/usr/local/www/diag_defaults.php
+++ b/src/usr/local/www/diag_defaults.php
@@ -1,14 +1,15 @@
<?php
-/* $Id$ */
/*
diag_defaults.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,13 +56,9 @@
*
*/
-/*
- pfSense_MODULE: config
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-factorydefaults
-##|*NAME=Diagnostics: Factory defaults page
+##|*NAME=Diagnostics: Factory defaults
##|*DESCR=Allow access to the 'Diagnostics: Factory defaults' page.
##|*MATCH=diag_defaults.php*
##|-PRIV
@@ -86,22 +83,31 @@ include("head.inc");
?>
</pre>
<?php else:?>
-<form action="diag_defaults.php" method="post">
- <p><strong><?=gettext("If you click") . " &quot;" . gettext("Yes") . "&quot;, " . gettext("the firewall will:")?></strong></p>
- <ul>
- <li><?=gettext("Reset to factory defaults")?></li>
- <li><?=gettext("LAN IP address will be reset to 192.168.1.1")?></li>
- <li><?=gettext("System will be configured as a DHCP server on the default LAN interface")?></li>
- <li><?=gettext("Reboot after changes are installed")?></li>
- <li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server")?></li>
- <li><?=gettext("webConfigurator admin username will be reset to 'admin'")?></li>
- <li><?=gettext("webConfigurator admin password will be reset to")?> '<?=$g['factory_shipped_password']?>'</li>
- </ul>
- <p><strong><?=gettext("Are you sure you want to proceed?")?></strong></p>
- <p>
- <input name="Submit" type="submit" class="btn btn-sm btn-success" value=" <?=gettext("Yes")?> " />
- <input name="Submit" type="submit" class="btn btn-sm btn-default" value=" <?=gettext("No")?> " />
- </p>
-</form>
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h2 class="panel-title">Are you sure you want to reset the system to the factory defaults?</h2>
+ </div>
+ <div class="panel-body">
+ <div class="content">
+ <form action="diag_defaults.php" method="post">
+ <p><strong><?=gettext("If you click") . " &quot;" . gettext("Yes") . "&quot;, " . gettext("the firewall will:")?></strong></p>
+ <ul>
+ <li><?=gettext("Reset to factory defaults")?></li>
+ <li><?=gettext("LAN IP address will be reset to 192.168.1.1")?></li>
+ <li><?=gettext("System will be configured as a DHCP server on the default LAN interface")?></li>
+ <li><?=gettext("Reboot after changes are installed")?></li>
+ <li><?=gettext("WAN interface will be set to obtain an address automatically from a DHCP server")?></li>
+ <li><?=gettext("webConfigurator admin username will be reset to 'admin'")?></li>
+ <li><?=gettext("webConfigurator admin password will be reset to")?> '<?=$g['factory_shipped_password']?>'</li>
+ </ul>
+ <p><strong><?=gettext("Are you sure you want to proceed?")?></strong></p>
+ <p>
+ <input name="Submit" type="submit" class="btn btn-sm btn-success" value=" <?=gettext("Yes")?> " />
+ <input name="Submit" type="submit" class="btn btn-sm btn-default" value=" <?=gettext("No")?> " />
+ </p>
+ </form>
+ </div>
+ </div>
+</div>
<?php endif?>
-<?php include("foot.inc")?> \ No newline at end of file
+<?php include("foot.inc")?>
diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php
index 140bf4b..d413def 100755
--- a/src/usr/local/www/diag_dns.php
+++ b/src/usr/local/www/diag_dns.php
@@ -2,12 +2,11 @@
/*
diag_dns.php
*/
- /* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2009 Jim Pingle (jpingle@gmail.com)
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -53,9 +52,13 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: dns
-*/
+
+##|+PRIV
+##|*IDENT=page-diagnostics-dns
+##|*NAME=Diagnostics: DNS Lookup
+##|*DESCR=Allow access to the 'Diagnostics: DNS Lookup' page.
+##|*MATCH=diag_dns.php*
+##|-PRIV
$pgtitle = array(gettext("Diagnostics"), gettext("DNS Lookup"));
require("guiconfig.inc");
@@ -93,8 +96,9 @@ if (isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) {
$isfirst = true;
foreach ($resolved as $re) {
if ($re != "") {
- if (!$isfirst)
+ if (!$isfirst) {
$addresses .= " ";
+ }
$addresses .= rtrim($re) . "/32";
$isfirst = false;
}
@@ -205,15 +209,15 @@ function display_host_results ($address, $hostname, $dns_speeds) {
include("head.inc");
/* Display any error messages resulting from user input */
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-else if (!$resolved && $type)
+} else if (!$resolved && $type) {
print('<div class="alert alert-warning" role="alert">' . gettext("Host") .' "'. $host .'" '. gettext("could not be resolved") . '</div>');
+}
-if ($createdalias)
+if ($createdalias) {
print('<div class="alert alert-success" role="alert">'.gettext("Alias was created/updated successfully").'</div>');
-
-require_once('classes/Form.class.php');
+}
$form = new Form('Lookup');
$section = new Form_Section('DNS Lookup');
@@ -286,10 +290,10 @@ if (!$input_errors && $type) {
<div class="panel-heading"><h2 class="panel-title">More information</h2></div>
<div class="panel-body">
<ul class="list-group">
- <li class="list-group-item"><a href="/diag_ping.php?host=<?=htmlspecialchars($host)?>&amp;interface=wan&amp;count=3"><?=gettext("Ping")?></a></li>
+ <li class="list-group-item"><a href="/diag_ping.php?host=<?=htmlspecialchars($host)?>&amp;count=3"><?=gettext("Ping")?></a></li>
<li class="list-group-item"><a href="/diag_traceroute.php?host=<?=htmlspecialchars($host)?>&amp;ttl=18"><?=gettext("Traceroute")?></a></li>
</ul>
- <p><?=gettext("NOTE: The following links are to external services, so their reliability cannot be guaranteed.");?></p>
+ <h5><?=gettext("NOTE: The following links are to external services, so their reliability cannot be guaranteed.");?></h5>
<ul class="list-group">
<li class="list-group-item"><a target="_blank" href="http://private.dnsstuff.com/tools/whois.ch?ip=<?php echo $ipaddr; ?>"><?=gettext("IP WHOIS @ DNS Stuff");?></a></li>
<li class="list-group-item"><a target="_blank" href="http://private.dnsstuff.com/tools/ipall.ch?ip=<?php echo $ipaddr; ?>"><?=gettext("IP Info @ DNS Stuff");?></a></li>
@@ -298,4 +302,4 @@ if (!$input_errors && $type) {
</div>
<?php
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php
index be9ea58..13777d4 100755
--- a/src/usr/local/www/diag_dump_states.php
+++ b/src/usr/local/www/diag_dump_states.php
@@ -3,11 +3,11 @@
diag_dump_states.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2005 Colin Smith
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -53,14 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/pfctl
- pfSense_MODULE: filter
-*/
##|+PRIV
##|*IDENT=page-diagnostics-showstates
-##|*NAME=Diagnostics: Show States page
+##|*NAME=Diagnostics: Show States
##|*DESCR=Allow access to the 'Diagnostics: Show States' page.
##|*MATCH=diag_dump_states.php*
##|-PRIV
@@ -98,9 +94,10 @@ $pgtitle = array(gettext("Diagnostics"), gettext("Show States"));
include("head.inc");
?>
-<script>
-events.push(function(){
- $('a[data-entry]').on('click', function(){
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $('a[data-entry]').on('click', function() {
var el = $(this);
var data = $(this).data('entry').split('|');
@@ -113,27 +110,27 @@ events.push(function(){
srcip: data[0],
dstip: data[1]
},
- success: function(){
+ success: function() {
el.parents('tr').remove();
},
});
});
});
+//]]>
</script>
<?php
$tab_array = array();
$tab_array[] = array(gettext("States"), true, "diag_dump_states.php");
-if (isset($config['system']['lb_use_sticky']))
+if (isset($config['system']['lb_use_sticky'])) {
$tab_array[] = array(gettext("Source Tracking"), false, "diag_dump_states_sources.php");
+}
$tab_array[] = array(gettext("Reset States"), false, "diag_resetstate.php");
display_top_tabs($tab_array);
// Start of tab content
$current_statecount=`pfctl -si | grep "current entries" | awk '{ print $3 }'`;
-require_once('classes/Form.class.php');
-
$form = new Form(false);
$section = new Form_Section('State filter');
@@ -165,7 +162,7 @@ if (isset($_POST['filter']) && (is_ipaddr($_POST['filter']) || is_subnet($_POST[
$form->add($section);
print $form;
?>
-<table class="table table-striped">
+<table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Int")?></th>
@@ -182,8 +179,9 @@ print $form;
$grepline = (isset($_POST['filter'])) ? "| /usr/bin/egrep " . escapeshellarg(htmlspecialchars($_POST['filter'])) : "";
$fd = popen("/sbin/pfctl -s state {$grepline}", "r");
while ($line = chop(fgets($fd))) {
- if ($row >= 10000)
+ if ($row >= 10000) {
break;
+ }
$line_split = preg_split("/\s+/", $line);
@@ -209,20 +207,22 @@ print $form;
<td><?= $state ?></td>
<td>
- <a class="btn icon icon-remove" data-entry="<?=$srcip?>|<?=$dstip?>"
+ <a class="btn fa fa-times" data-entry="<?=$srcip?>|<?=$dstip?>"
title="<?=sprintf(gettext('Remove all state entries from %s to %s'), $srcip, $dstip);?>"></a>
</td>
</tr>
-<?php $row++; } ?>
+<?php $row++; }
+?>
</tbody>
</table>
<?php
if ($row == 0) {
- if (isset($_POST['filter']) && !empty($_POST['filter']))
+ if (isset($_POST['filter']) && !empty($_POST['filter'])) {
$errmsg = gettext('No states were found that match the current filter');
- else
+ } else {
$errmsg = gettext('No states were found');
+ }
print('<p class="alert alert-warning">' . $errmsg . '</p>');
}
diff --git a/src/usr/local/www/diag_dump_states_sources.php b/src/usr/local/www/diag_dump_states_sources.php
index 360ec58..5621f9a 100644
--- a/src/usr/local/www/diag_dump_states_sources.php
+++ b/src/usr/local/www/diag_dump_states_sources.php
@@ -3,11 +3,11 @@
diag_dump_states_sources.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2005 Colin Smith
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,16 +54,11 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/pfctl
- pfSense_MODULE: filter
-*/
-
##|+PRIV
-##|*IDENT=page-diagnostics-showstates
-##|*NAME=Diagnostics: Show States page
-##|*DESCR=Allow access to the 'Diagnostics: Show States' page.
-##|*MATCH=diag_dump_states.php*
+##|*IDENT=page-diagnostics-sourcetracking
+##|*NAME=Diagnostics: Show Source Tracking
+##|*DESCR=Allow access to the 'Diagnostics: Show Source Tracking' page.
+##|*MATCH=diag_dump_states_sources.php*
##|-PRIV
require_once("guiconfig.inc");
@@ -100,9 +95,10 @@ display_top_tabs($tab_array);
?>
-<script>
-events.push(function(){
- $('a[data-entry]').on('click', function(){
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $('a[data-entry]').on('click', function() {
var el = $(this);
var data = $(this).data('entry').split('|');
@@ -115,18 +111,17 @@ events.push(function(){
srcip: data[0],
dstip: data[1]
},
- success: function(){
+ success: function() {
el.parents('tr').remove();
},
});
});
});
+//]]>
</script>
<?php
-require_once('classes/Form.class.php');
-
$form = new Form;
$section = new Form_Section('Filters');
@@ -198,4 +193,4 @@ if ($row == 0) {
print('<p class="alert alert-warning">' . gettext('No source tracking entries were found.') . '</p>');
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_gmirror.php b/src/usr/local/www/diag_gmirror.php
index 17fbed8..3dffd29 100644
--- a/src/usr/local/www/diag_gmirror.php
+++ b/src/usr/local/www/diag_gmirror.php
@@ -3,11 +3,10 @@
diag_gmirror.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2014 Jim Pingle
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,12 +53,6 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/gmirror /sbin/geom /usr/bin/grep /usr/bin/egrep /usr/bin/cut /usr/bin/head
- pfSense_BUILDER_BINARIES: /sbin/mount /usr/bin/awk /usr/bin/sed
- pfSense_MODULE: gmirror
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-gmirror
##|*NAME=Diagnostics: GEOM Mirrors
@@ -402,4 +395,4 @@ endif; ?>
</form>
<?php
-require("foot.inc"); \ No newline at end of file
+require("foot.inc");
diff --git a/src/usr/local/www/halt.php b/src/usr/local/www/diag_halt.php
index ca134c5..ba8a601 100755
--- a/src/usr/local/www/halt.php
+++ b/src/usr/local/www/diag_halt.php
@@ -1,15 +1,15 @@
<?php
-/* $Id$ */
/*
- halt.php
+ diag_halt.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of m0n0wall as reboot.php (http://m0n0.ch/wall)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -55,15 +55,12 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: header
-*/
##|+PRIV
##|*IDENT=page-diagnostics-haltsystem
-##|*NAME=Diagnostics: Halt system page
+##|*NAME=Diagnostics: Halt system
##|*DESCR=Allow access to the 'Diagnostics: Halt system' page.
-##|*MATCH=halt.php*
+##|*MATCH=diag_halt.php*
##|-PRIV
// Set DEBUG to true to prevent the system_halt() function from being called
@@ -91,8 +88,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
<?php
if (DEBUG) {
print("Not actually halting (DEBUG is set true)<br>");
- }
- else {
+ } else {
print('<pre>');
system_halt();
print('</pre>');
@@ -107,7 +103,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
<div class="panel-body">
<div class="content">
<p>Click "Halt" to halt the system immediately, or "No" to go to the system dashboard. (There will be a brief delay before the dashboard appears.)</p>
- <form action="halt.php" method="post">
+ <form action="diag_halt.php" method="post">
<input type="submit" class="btn btn-danger pull-center" name="save" value="Halt">
<a href="/" class="btn btn-default">No</a>
</form>
diff --git a/src/usr/local/www/diag_ipsec_xml.php b/src/usr/local/www/diag_ipsec_xml.php
deleted file mode 100644
index e495685..0000000
--- a/src/usr/local/www/diag_ipsec_xml.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_ipsec_xml.php
-*/
-/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2010 Seth Mos
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
- *
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
- *
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- *
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-##|+PRIV
-##|*IDENT=page-ipsecxml
-##|*NAME=Diag IPsec XML page
-##|*DESCR=Allow access to the 'Diag IPsec XML' page.
-##|*MATCH=diag_ipsec_xml.php
-##|-PRIV
-
-global $g;
-
-require("guiconfig.inc");
-require("ipsec.inc");
-
-if (!is_array($config['ipsec']['phase2'])) {
- $config['ipsec']['phase2'] = array();
-}
-
-$ipsec_status = array();
-
-$a_phase2 = &$config['ipsec']['phase2'];
-
-$status = ipsec_smp_dump_status();
-
-if (is_array($status['query']) && $status['query']['ikesalist'] && $status['query']['ikesalist']['ikesa']) {
- foreach ($a_phase2 as $ph2ent) {
- ipsec_lookup_phase1($ph2ent, $ph1ent);
- $tunnel = array();
- if (!isset($ph2ent['disabled']) && !isset($ph1ent['disabled'])) {
- if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ph1ent['ikeid'])) {
- $tunnel['state'] = "up";
- } elseif (!isset($config['ipsec']['enable'])) {
- $tunnel['state'] = "disabled";
- } else {
- $tunnel['state'] = "down";
- }
-
- $tunnel['src'] = ipsec_get_phase1_src($ph1ent);
- $tunnel['endpoint'] = $ph1ent['remote-gateway'];
- $tunnel['local'] = ipsec_idinfo_to_text($ph2ent['localid']);
- $tunnel['remote'] = ipsec_idinfo_to_text($ph2ent['remoteid']);
- $tunnel['name'] = "{$ph2ent['descr']}";
- $ipsec_status['tunnel'][] = $tunnel;
- }
- }
-}
-
-$listtags = array("tunnel");
-$xml = dump_xml_config($ipsec_status, "ipsec");
-
-echo $xml;
-?>
diff --git a/src/usr/local/www/diag_limiter_info.php b/src/usr/local/www/diag_limiter_info.php
index 8c7cd1f..4eebab3 100644
--- a/src/usr/local/www/diag_limiter_info.php
+++ b/src/usr/local/www/diag_limiter_info.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
diag_limiter_info.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2010 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,11 +53,6 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/top
- pfSense_MODULE: system
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-limiter-info
##|*NAME=Diagnostics: Limiter Info
@@ -69,7 +62,7 @@
require("guiconfig.inc");
-$pgtitle = gettext("Diagnostics: Limiter Info");
+$pgtitle = array(gettext("Diagnostics"), gettext("Limiter Info"));
$shortcut_section = "trafficshaper-limiters";
if ($_REQUEST['getactivity']) {
@@ -89,11 +82,13 @@ if ($_REQUEST['getactivity']) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function getlimiteractivity() {
$.ajax(
'/diag_limiter_info.php',
@@ -108,10 +103,11 @@ if ($input_errors)
});
}
- events.push(function(){
+ events.push(function() {
setInterval('getlimiteractivity()', 2500);
getlimiteractivity();
});
+//]]>
</script>
<div class="panel panel-default">
@@ -121,4 +117,4 @@ if ($input_errors)
</div>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_logs.php b/src/usr/local/www/diag_logs.php
deleted file mode 100755
index ebd0c61..0000000
--- a/src/usr/local/www/diag_logs.php
+++ /dev/null
@@ -1,175 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs.php
-*/
-/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-2009 Scott Ullrich
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
- *
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
- *
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- *
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- pfSense_MODULE: system
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-logs-system
-##|*NAME=Diagnostics: Logs: System page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: System' page.
-##|*MATCH=diag_logs.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-// The logs to display are specified in a GET argument. Default to 'system' logs
-if (!$_GET['logfile'])
- $logfile = 'system';
-else
- $logfile = $_GET['logfile'];
-
-$system_logfile = "{$g['varlog_path']}/{$logfile}.log";
-
-$nentries = $config['syslog']['nentries'];
-if (!$nentries) {
- $nentries = 50;
-}
-
-if ($_POST['clear']) {
- clear_log_file($system_logfile);
-}
-
-if ($_GET['filtertext']) {
- $filtertext = htmlspecialchars($_GET['filtertext']);
-}
-
-if ($_POST['filtertext']) {
- $filtertext = htmlspecialchars($_POST['filtertext']);
-}
-
-if ($filtertext) {
- $filtertextmeta="?filtertext=$filtertext";
-}
-
-$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("General"));
-include("head.inc");
-
-$tab_array = array();
-$tab_array[] = array(gettext("System"), ($logfile == 'system'), "diag_logs.php");
-$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), ($logfile == 'dhcpd'), "diag_logs.php?logfile=dhcpd");
-$tab_array[] = array(gettext("Portal Auth"), ($logfile == 'portalauth'), "diag_logs.php?logfile=portalauth");
-$tab_array[] = array(gettext("IPsec"), ($logfile == 'ipsec'), "diag_logs.php?logfile=ipsec");
-$tab_array[] = array(gettext("PPP"), ($logfile == 'ppp'), "diag_logs.php?logfile=ppp");
-$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), ($logfile == 'relayd'), "diag_logs.php?logfile=relayd");
-$tab_array[] = array(gettext("OpenVPN"), ($logfile == 'openvpn'), "diag_logs.php?logfile=openvpn");
-$tab_array[] = array(gettext("NTP"), ($logfile == 'ntpd'), "diag_logs.php?logfile=ntpd");
-$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
-display_top_tabs($tab_array);
-
-$tab_array = array();
-if (in_array($logfile, array('system', 'gateways', 'routing', 'resolver', 'wireless'))) {
- $tab_array[] = array(gettext("General"), ($logfile == 'system'), "/diag_logs.php");
- $tab_array[] = array(gettext("Gateways"), ($logfile == 'gateways'), "/diag_logs.php?logfile=gateways");
- $tab_array[] = array(gettext("Routing"), ($logfile == 'routing'), "/diag_logs.php?logfile=routing");
- $tab_array[] = array(gettext("Resolver"), ($logfile == 'resolver'), "/diag_logs.php?logfile=resolver");
- $tab_array[] = array(gettext("Wireless"), ($logfile == 'wireless'), "/diag_logs.php?logfile=wireless");
- display_top_tabs($tab_array, false, 'nav nav-tabs');
-}
-
-require_once('classes/Form.class.php');
-
-$form = new Form(false);
-
-$section = new Form_Section('Log file filter');
-
-$section->addInput(new Form_Input(
- 'filtertext',
- 'Filter',
- 'text',
- $filtertext,
- ['placeholder' => 'Filter text']
-));
-
-$form->addGlobal(new Form_Button(
- 'filtersubmit',
- 'Filter'
-))->removeClass('btn-primary')->addClass('btn-default')->addClass('btn-sm');
-
-$form->addGlobal(new Form_Button(
- 'clear',
- 'Clear log'
-))->removeClass('btn-primary')->addClass('btn-danger')->addClass('btn-sm');
-
-$form->add($section);
-print $form;
-
-if ($logfile == 'dhcpd')
- print_info_box('Warning: Clearing the log file will restart the DHCP daemon.');
-
-?>
-<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=$logfile?><?=gettext(" log entries")?></h2></div>
- <pre>
-<?php
- if (($logfile == 'resolver') || ($logfile == 'system'))
- $inverse = array("ppp");
- else
- $inverse = null;
-
- if ($filtertext)
- dump_clog_no_table($system_logfile, $nentries, true, array("$filtertext"), $inverse);
- else
- dump_clog_no_table($system_logfile, $nentries, true, array(), $inverse);
-?>
- </pre>
-</div>
-
-<?php include("foot.inc"); ?> \ No newline at end of file
diff --git a/src/usr/local/www/diag_logs_filter.php b/src/usr/local/www/diag_logs_filter.php
deleted file mode 100644
index 5f31998..0000000
--- a/src/usr/local/www/diag_logs_filter.php
+++ /dev/null
@@ -1,592 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_filter.php
-*/
-
-/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-2009 Scott Ullrich
- * Copyright (c) 2003-2009 Manuel Kasper <mk@neon1.net>
- * Jim Pingle jim@pingle.org
- * originally based on m0n0wall (http://m0n0.ch/wall)
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
- *
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
- *
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- *
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- pfSense_MODULE: filter
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-logs-firewall
-##|*NAME=Diagnostics: Logs: Firewall page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: Firewall' page.
-##|*MATCH=diag_logs_filter.php*
-##|-PRIV
-
-require("guiconfig.inc");
-require_once("filter_log.inc");
-
-# --- AJAX RESOLVE ---
-if (isset($_POST['resolve'])) {
- $ip = strtolower($_POST['resolve']);
- $res = (is_ipaddr($ip) ? gethostbyaddr($ip) : '');
-
- if ($res && $res != $ip) {
- $response = array('resolve_ip' => $ip, 'resolve_text' => $res);
- } else {
- $response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve"));
- }
-
- echo json_encode(str_replace("\\", "\\\\", $response)); // single escape chars can break JSON decode
- exit;
-}
-
-function getGETPOSTsettingvalue($settingname, $default) {
- $settingvalue = $default;
- if ($_GET[$settingname]) {
- $settingvalue = $_GET[$settingname];
- }
- if ($_POST[$settingname]) {
- $settingvalue = $_POST[$settingname];
- }
- return $settingvalue;
-}
-
-$rulenum = getGETPOSTsettingvalue('getrulenum', null);
-if ($rulenum) {
- list($rulenum, $tracker, $type) = explode(',', $rulenum);
- $rule = find_rule_by_number($rulenum, $tracker, $type);
- echo gettext("The rule that triggered this action is") . ":\n\n{$rule}";
- exit;
-}
-
-$filtersubmit = getGETPOSTsettingvalue('filtersubmit', null);
-
-if ($filtersubmit) {
- $interfacefilter = getGETPOSTsettingvalue('interface', null);
- $filtertext = getGETPOSTsettingvalue('filtertext', "");
- $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
-}
-
-$filterlogentries_submit = getGETPOSTsettingvalue('filterlogentries_submit', null);
-
-if ($filterlogentries_submit) {
- $filterfieldsarray = array();
-
- $actpass = getGETPOSTsettingvalue('actpass', null);
- $actblock = getGETPOSTsettingvalue('actblock', null);
-
- $filterfieldsarray['act'] = str_replace(" ", " ", trim($actpass . " " . $actblock));
- $filterfieldsarray['act'] = $filterfieldsarray['act'] != "" ? $filterfieldsarray['act'] : 'All';
- $filterfieldsarray['time'] = getGETPOSTsettingvalue('filterlogentries_time', null);
- $filterfieldsarray['interface'] = getGETPOSTsettingvalue('filterlogentries_interfaces', null);
- $filterfieldsarray['srcip'] = getGETPOSTsettingvalue('filterlogentries_sourceipaddress', null);
- $filterfieldsarray['srcport'] = getGETPOSTsettingvalue('filterlogentries_sourceport', null);
- $filterfieldsarray['dstip'] = getGETPOSTsettingvalue('filterlogentries_destinationipaddress', null);
- $filterfieldsarray['dstport'] = getGETPOSTsettingvalue('filterlogentries_destinationport', null);
- $filterfieldsarray['proto'] = getGETPOSTsettingvalue('filterlogentries_protocol', null);
- $filterfieldsarray['tcpflags'] = getGETPOSTsettingvalue('filterlogentries_protocolflags', null);
- $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
-}
-
-$filter_logfile = "{$g['varlog_path']}/filter.log";
-
-$nentries = $config['syslog']['nentries'];
-
-# Override Display Quantity
-if ($filterlogentries_qty) {
- $nentries = $filterlogentries_qty;
-}
-
-if (!$nentries || !is_numeric($nentries)) {
- $nentries = 50;
-}
-
-if ($_POST['clear']) {
- clear_log_file($filter_logfile);
-}
-
-$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall"));
-$shortcut_section = "firewall";
-include("head.inc");
-
-function build_if_list() {
- $iflist = get_configured_interface_with_descr(false, true);
- //$iflist = get_interface_list();
- // Allow extending of the firewall edit interfaces
- pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
- foreach ($iflist as $if => $ifdesc)
- $interfaces[$if] = $ifdesc;
-
- if ($config['l2tp']['mode'] == "server")
- $interfaces['l2tp'] = "L2TP VPN";
-
- if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
- $interfaces['pppoe'] = "PPPoE Server";
-
- /* add ipsec interfaces */
- if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
- $interfaces["enc0"] = "IPsec";
-
- /* add openvpn/tun interfaces */
- if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
- $interfaces["openvpn"] = "OpenVPN";
-
- return($interfaces);
-}
-
-$tab_array = array();
-$tab_array[] = array(gettext("System"), false, "diag_logs.php");
-$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
-$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
-$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
-display_top_tabs($tab_array);
-
-$tab_array = array();
-$tab_array[] = array(gettext("Normal View"), true, "/diag_logs_filter.php");
-$tab_array[] = array(gettext("Dynamic View"), false, "/diag_logs_filter_dynamic.php");
-$tab_array[] = array(gettext("Summary View"), false, "/diag_logs_filter_summary.php");
-display_top_tabs($tab_array, false, 'nav nav-tabs');
-
-$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act']));
-if ($filterfieldsarray['interface'] == "All")
- $interface = "";
-
-require_once('classes/Form.class.php');
-
-if (!isset($config['syslog']['rawfilter'])) { // Advanced log filter form
- $form = new Form(new Form_Button(
- 'filterlogentries_submit',
- 'Filter'
- ));
-
- $section = new Form_Section('Advanced Log Filter');
-
- $group = new Form_Group('');
-
- $group->add(new Form_Input(
- 'filterlogentries_sourceipaddress',
- null,
- 'text',
- $filterfieldsarray['srcip']
- ))->setHelp('Source IP Address');
-
- $group->add(new Form_Input(
- 'filterlogentries_destinationipaddress',
- null,
- 'text',
- $filterfieldsarray['dstip']
- ))->setHelp('Destination IP Address');
-
- $section->add($group);
- $group = new Form_Group('');
-
- $group->add(new Form_Checkbox(
- 'actpass',
- 'Pass',
- 'Pass',
- in_arrayi('Pass', $Include_Act)
- ));
-
- $group->add(new Form_Input(
- 'filterlogentries_time',
- null,
- 'text',
- $filterfieldsarray['time']
- ))->setHelp('Time');
-
- $group->add(new Form_Input(
- 'filterlogentries_sourceport',
- null,
- 'text',
- $filterfieldsarray['srcport']
- ))->setHelp('Source Port');
-
- $group->add(new Form_Input(
- 'filterlogentries_protocol',
- null,
- 'text',
- $filterfieldsarray['proto']
- ))->setHelp('Protocol');
-
- $group->add(new Form_Input(
- 'filterlogentries_qty',
- null,
- 'text',
- $filterlogentries_qty
- ))->setHelp('Quantity');
-
- $section->add($group);
-
- $group = new Form_Group('');
-
- $group->add(new Form_Checkbox(
- 'actblock',
- 'Block',
- 'Block',
- in_arrayi('Block', $Include_Act)
- ));
-
- $group->add(new Form_Input(
- 'filterlogentries_interfaces',
- null,
- 'text',
- $filterfieldsarray['interface']
- ))->setHelp('Interface');
-
- $group->add(new Form_Input(
- 'filterlogentries_destinationport',
- null,
- 'text',
- $filterfieldsarray['dstport']
- ))->setHelp('Destination Port');
-
- $group->add(new Form_Input(
- 'filterlogentries_protocolflags',
- null,
- 'text',
- $filterfieldsarray['tcpflags']
- ))->setHelp('Protocol Flags');
-}
-else { // Simple log filter form
- $form = new Form(new Form_Button(
- 'filtersubmit',
- 'Filter'
- ));
- $section = new Form_Section('Log Filter');
-
- $section->addInput(new Form_Select(
- 'filterdescriptions',
- 'Where to show rule descriptions',
- $interfacefilter,
- build_if_list()
- ));
-
- $group = new Form_Group('');
-
- $group->add(new Form_Input(
- 'filtertext',
- null,
- 'text',
- $filtertext
- ))->setHelp('Filter Expression');
-
- $group->add(new Form_Input(
- 'filterlogentries_qty',
- null,
- 'text',
- $filterlogentries_qty
- ))->setHelp('Quantity');
-}
-
-$group->setHelp('<a target="_blank" href="http://www.php.net/manual/en/book.pcre.php">' . 'Regular expression reference</a> Precede with exclamation (!) to exclude match.');
-$section->add($group);
-$form->add($section);
-print($form);
-
-// Now the forms are complete we can draw the log table and its controls
-if (!isset($config['syslog']['rawfilter'])) {
- $iflist = get_configured_interface_with_descr(false, true);
-
- if ($iflist[$interfacefilter])
- $interfacefilter = $iflist[$interfacefilter];
-
- if ($filterlogentries_submit)
- $filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filterfieldsarray);
- else
- $filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext, $interfacefilter);
-?>
-
-<div class="panel panel-default">
- <div class="panel-heading">
- <h2 class="panel-title">
-<?php
- if ((!$filtertext) && (!$filterfieldsarray))
- printf(gettext("Last %s firewall log entries."), count($filterlog));
- else
- print(count($filterlog). ' ' . gettext('matched log entries.') . ' ');
-
- printf(gettext(" (Maximum %s)"), $nentries);
-?>
- </h2>
- </div>
- <div class="panel-body">
- <div class="table-responsive">
- <table class="table table striped table-hover table-compact">
- <tr>
- <th><?=gettext("Act")?></th>
- <th><?=gettext("Time")?></th>
- <th><?=gettext("IF")?></th>
-<?php
- if ($config['syslog']['filterdescriptions'] === "1") {
-?>
- <th>
- <?=gettext("Rule")?>
- </th>
-<?php
- }
-?>
- <th><?=gettext("Source")?></th>
- <th><?=gettext("Destination")?></th>
- <th><?=gettext("Proto")?></th>
- </tr>
-<?php
- if ($config['syslog']['filterdescriptions'])
- buffer_rules_load();
-
- foreach ($filterlog as $filterent) {
-?>
- <tr>
- <td>
- <a data-toggle="tooltip" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" class="btn btn-xs btn-info" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);">
- <?=gettext('Block')?></a>
-<?php
- if ($filterent['count'])
- echo $filterent['count'];
-?>
- </td>
- <td>
- <?=htmlspecialchars($filterent['time'])?>
- </td>
- <td>
-<?php
- if ($filterent['direction'] == "out")
- print('&#x25ba;' . ' ');
-?>
- <?=htmlspecialchars($filterent['interface'])?>
- </td>
-<?php
- if ($config['syslog']['filterdescriptions'] === "1") {
-?>
- <td>
- <?=find_rule_by_number_buffer($filterent['rulenum'], $filterent['tracker'], $filterent['act'])?>
- </td>
-<?php
- }
-
- $int = strtolower($filterent['interface']);
- $proto = strtolower($filterent['proto']);
-
- if ($filterent['version'] == '6') {
- $ipproto = "inet6";
- $filterent['srcip'] = "[{$filterent['srcip']}]";
- $filterent['dstip'] = "[{$filterent['dstip']}]";
- } else {
- $ipproto = "inet";
- }
-
- $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
- $src_htmlclass = str_replace(array('.', ':'), '-', $filterent['srcip']);
- $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
- $dst_htmlclass = str_replace(array('.', ':'), '-', $filterent['dstip']);
-?>
- <td>
- <i class="icon icon-map-marker" onclick="javascript:resolve_with_ajax('<?="{$filterent['srcip']}"; ?>');" title="<?=gettext("Click to resolve")?>" alt="Reverse Resolve with DNS"/>
- </i>
-
- <i class="icon icon-download" href="easyrule.php?<?="action=block&amp;int={$int}&amp;src={$filterent['srcip']}&amp;ipproto={$ipproto}"; ?>" alt="Easy Rule: Add to Block List" title="<?=gettext("Easy Rule: Add to Block List")?>" onclick="return confirm('<?=gettext("Do you really want to add this BLOCK rule?")?>')">
- </i>
-
- <?=$srcstr . '<span class="RESOLVE-' . $src_htmlclass . '"></span>'?>
- </td>
- <td>
- <i class="icon icon-map-marker" onclick="javascript:resolve_with_ajax('<?="{$filterent['dstip']}"; ?>');" title="<?=gettext("Click to resolve")?>" class="ICON-<?= $dst_htmlclass; ?>" alt="Reverse Resolve with DNS"/>
- </i>
-
- <i class="icon icon-upload" href="easyrule.php?<?="action=pass&amp;int={$int}&amp;proto={$proto}&amp;src={$filterent['srcip']}&amp;dst={$filterent['dstip']}&amp;dstport={$filterent['dstport']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Pass this traffic")?>" onclick="return confirm('<?=gettext("Do you really want to add this PASS rule?")?>')">
- </i>
- <?=$dststr . '<span class="RESOLVE-' . $dst_htmlclass . '"></span>'?>
- </td>
-<?php
- if ($filterent['proto'] == "TCP")
- $filterent['proto'] .= ":{$filterent['tcpflags']}";
-?>
- <td><?=htmlspecialchars($filterent['proto'])?></td>
- </tr>
-<?php
- if (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2") {
-?>
- <tr>
- <td colspan="2" />
- <td colspan="4"><?=find_rule_by_number_buffer($filterent['rulenum'],$filterent['tracker'],$filterent['act'])?></td>
- </tr>
-<?php
- }
- } // e-o-foreach
- buffer_rules_clear();
-}
-else
-{
-?>
- <tr>
- <td colspan="2">
- <?php printf(gettext("Last %s firewall log entries"),$nentries)?>
- </td>
- </tr>
-<?php
- if ($filtertext)
- dump_clog($filter_logfile, $nentries, true, array("$filtertext"));
- else
- dump_clog($filter_logfile, $nentries);
-}
-?>
- </table>
- </div>
- </div>
-</div>
-
-<p>
- <form id="clearform" name="clearform" action="diag_logs_filter.php" method="post" style="margin-top: 14px;">
- <input id="submit" name="clear" type="submit" class="btn btn-danger" value="<?=gettext("Clear log")?>" />
- </form>
-</p>
-
-<?php
-
-print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' .
- gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR' . '<br />' .
- '<i class="icon icon-download"></i> = Add to block list., <i class="icon icon-upload"></i> = Pass traffic, <i class="icon icon-map-marker"></i> = Resolve');
-
-?>
-
-<!-- AJAXY STUFF -->
-<script type="text/javascript">
-//<![CDATA[
- function outputrule(req) {
- alert(req.content);
- }
-//]]>
-</script>
-
-<?php include("foot.inc");
-?>
-<script type="text/javascript">
-//<![CDATA[
-
-function resolve_with_ajax(ip_to_resolve) {
- var url = "/diag_logs_filter.php";
-
- jQuery.ajax(
- url,
- {
- method: 'post',
- dataType: 'json',
- data: {
- resolve: ip_to_resolve,
- },
- complete: resolve_ip_callback
- });
-
-}
-
-function resolve_ip_callback(transport) {
- var response = jQuery.parseJSON(transport.responseText);
- var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-'));
- var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>';
-
- jQuery('span.RESOLVE-' + resolve_class).html(resolve_text);
- jQuery('img.ICON-' + resolve_class).removeAttr('title');
- jQuery('img.ICON-' + resolve_class).removeAttr('alt');
- jQuery('img.ICON-' + resolve_class).attr('src', '/themes/<?= $g['theme']; ?>/images/icons/icon_log_d.gif');
- jQuery('img.ICON-' + resolve_class).prop('onclick', null);
- // jQuery cautions that "removeAttr('onclick')" fails in some versions of IE
-}
-
-// From http://stackoverflow.com/questions/5499078/fastest-method-to-escape-html-tags-as-html-entities
-function htmlspecialchars(str) {
- return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
-}
-
-if (typeof getURL == 'undefined') {
- getURL = function(url, callback) {
- if (!url)
- throw 'No URL for getURL';
- try {
- if (typeof callback.operationComplete == 'function')
- callback = callback.operationComplete;
- } catch (e) {}
- if (typeof callback != 'function')
- throw 'No callback function for getURL';
- var http_request = null;
- if (typeof XMLHttpRequest != 'undefined') {
- http_request = new XMLHttpRequest();
- }
- else if (typeof ActiveXObject != 'undefined') {
- try {
- http_request = new ActiveXObject('Msxml2.XMLHTTP');
- } catch (e) {
- try {
- http_request = new ActiveXObject('Microsoft.XMLHTTP');
- } catch (e) {}
- }
- }
- if (!http_request)
- throw 'Both getURL and XMLHttpRequest are undefined';
- http_request.onreadystatechange = function() {
- if (http_request.readyState == 4) {
- callback( { success : true,
- content : http_request.responseText,
- contentType : http_request.getResponseHeader("Content-Type") } );
- }
- };
- http_request.open('GET', url, true);
- http_request.send(null);
- };
-}
-
-//]]>
-</script>
diff --git a/src/usr/local/www/diag_logs_filter_dynamic.php b/src/usr/local/www/diag_logs_filter_dynamic.php
deleted file mode 100755
index 478d229..0000000
--- a/src/usr/local/www/diag_logs_filter_dynamic.php
+++ /dev/null
@@ -1,243 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_logs_filter_dynamic.php
-*/
-/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
- *
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
- *
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- *
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-
-/*
- pfSense_MODULE: filter
-*/
-
-##|+PRIV
-##|*IDENT=page-hidden-nolongerincluded
-##|*NAME=Hidden: No longer included page
-##|*DESCR=Allow access to the 'Hidden: No longer included' page.
-##|*MATCH=diag_logs_filter_dynamic.php*
-##|-PRIV
-
-require("guiconfig.inc");
-require_once("filter_log.inc");
-
-$filter_logfile = "{$g['varlog_path']}/filter.log";
-
-/* Hardcode this. AJAX doesn't do so well with large numbers */
-$nentries = 50;
-
-/* AJAX related routines */
-handle_ajax($nentries, $nentries + 20);
-
-if ($_POST['clear']) {
- clear_log_file($filter_logfile);
-}
-
-$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100);
-
-$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall (Dynamic View)"));
-$shortcut_section = "firewall";
-include("head.inc");
-
-?>
-
-<script type="text/javascript">
-//<![CDATA[
- lastsawtime = '<?=time(); ?>;';
- var lines = Array();
- var timer;
- var updateDelay = 25500;
- var isBusy = false;
- var isPaused = false;
- var nentries = <?=$nentries; ?>;
-<?php
- if (isset($config['syslog']['reverse'])) {
- echo "var isReverse = true;\n";
- } else {
- echo "var isReverse = false;\n";
- }
-?>
- /* Called by the AJAX updater */
- function format_log_line(row) {
- if (row[8] == '6') {
- srcIP = '[' + row[3] + ']';
- dstIP = '[' + row[5] + ']';
- } else {
- srcIP = row[3];
- dstIP = row[5];
- }
-
- if (row[4] == '') {
- srcPort = '';
- } else {
- srcPort = ':' + row[4];
- }
- if (row[6] == '') {
- dstPort = '';
- } else {
- dstPort = ':' + row[6];
- }
-
- var line =
- '<td>' + row[1] + '</td>' +
- '<td>' + row[2] + '</td>' +
- '<td>' + srcIP + srcPort + '</td>' +
- '<td>' + dstIP + dstPort + '</td>' +
- '<td>' + row[7] + '</td>' +
- '<td>' + row[0] + '</td>';
-
- return line;
- }
-//]]>
-</script>
-<script src="/javascript/filter_log.js" type="text/javascript"></script>
-
-<?php
-$tab_array = array();
-$tab_array[] = array(gettext("System"), false, "diag_logs.php");
-$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
-$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
-$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
-display_top_tabs($tab_array);
-
-$tab_array = array();
-$tab_array[] = array(gettext("Normal View"), false, "/diag_logs_filter.php");
-$tab_array[] = array(gettext("Dynamic View"), true, "/diag_logs_filter_dynamic.php");
-$tab_array[] = array(gettext("Summary View"), false, "/diag_logs_filter_summary.php");
-display_top_tabs($tab_array, false, 'nav nav-tabs');
-?>
-
-<div class="panel panel-default">
- <div class="panel-heading">
- <h2 class="panel-title">
- <?=gettext('Last ') . $nentries . gettext(' records. ') . gettext('Pause ')?><input type="checkbox" onclick="javascript:toggle_pause();" />
- </h2>
- </div>
- <div class="panel-body">
- <div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
- <thead>
- <tr>
- <th><?=gettext("Time")?></th>
- <th><?=gettext("IF")?></th>
- <th><?=gettext("Source")?></th>
- <th><?=gettext("Destination")?></th>
- <th><?=gettext("Proto")?></th>
- <th></th> <!-- For the "Block" buttons-->
- </tr>
- </thead>
- <tbody id="filter-log-entries">
-<?php
- $rowIndex = 0;
- $tcpcnt = 0;
-
- foreach ($filterlog as $filterent) {
- $evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd";
- $rowIndex++;
- if ($filterent['version'] == '6') {
- $srcIP = "[" . htmlspecialchars($filterent['srcip']) . "]";
- $dstIP = "[" . htmlspecialchars($filterent['dstip']) . "]";
- } else {
- $srcIP = htmlspecialchars($filterent['srcip']);
- $dstIP = htmlspecialchars($filterent['dstip']);
- }
-
- if ($filterent['srcport'])
- $srcPort = ":" . htmlspecialchars($filterent['srcport']);
- else
- $srcPort = "";
-
- if ($filterent['dstport'])
- $dstPort = ":" . htmlspecialchars($filterent['dstport']);
- else
- $dstPort = "";
-?>
- <tr>
- <td><?=htmlspecialchars($filterent['time'])?></td>
- <td><?=htmlspecialchars($filterent['interface'])?></td>
- <td><?=$srcIP . $srcPort?></td>
- <td><?=$dstIP . $dstPort?></td>
-<?php
- if ($filterent['proto'] == "TCP") {
- $filterent['proto'] .= ":{$filterent['tcpflags']}";
- $tcpcnt++;
- }
-?>
- <td><?=htmlspecialchars($filterent['proto'])?></td>
- <td>
- <a href="#" class="btn btn-danger btn-xs" alt="<?=$filterent['act'];?>" title="<?=$filterent['act'];?> onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['act']}"; ?>', outputrule);">
- <?=gettext('Block')?>
- </a>
- </td>
- </tr>
-<?php
- } // e-o-foreach()
-?>
- </tbody>
- </table>
- </div>
- </div>
-</div>
-<?php
-
-if ($tcpcnt > 0)
- print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' .
- gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR');
-?>
-
-<?php include("foot.inc"); \ No newline at end of file
diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php
index 09532f1..f2847d0 100644
--- a/src/usr/local/www/diag_nanobsd.php
+++ b/src/usr/local/www/diag_nanobsd.php
@@ -3,11 +3,10 @@
diag_nanobsd.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2009 Scott Ullrich <sullrich@gmail.com>
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,12 +53,6 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/mount /sbin/glabel /usr/bin/grep /usr/bin/cut /usr/bin/head /bin/cp
- pfSense_BUILDER_BINARIES: /usr/sbin/boot0cfg /bin/mkdir /sbin/fsck_ufs /sbin/mount /bin/dd /sbin/tunefs
- pfSense_MODULE: nanobsd
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-nanobsd
##|*NAME=Diagnostics: NanoBSD
@@ -74,9 +67,9 @@ ini_set('max_input_time', '9999');
require_once("guiconfig.inc");
require_once("config.inc");
-// Setting DEBUG to true causes the dangerous stuff on this page to be simulated rather than exectued.
+// Setting DEBUG to true causes the dangerous stuff on this page to be simulated rather than executed.
// MUST be set to false for production of course
-define(DEBUG, true);
+define(DEBUG, false);
$pgtitle = array(gettext("Diagnostics"), gettext("NanoBSD"));
include("head.inc");
@@ -91,10 +84,11 @@ $NANOBSD_SIZE = nanobsd_get_size();
$class='alert-warning';
if ($_POST['bootslice']) {
- if (!DEBUG)
+ if (!DEBUG) {
nanobsd_switch_boot_slice();
- else
+ } else {
sleep(4);
+ }
$savemsg = gettext("The boot slice has been set to") . " " . nanobsd_get_active_slice();
$class='alert-success';
@@ -127,30 +121,29 @@ if ($_POST['changero']) {
if ($_POST['setrw']) {
if (!DEBUG) {
conf_mount_rw();
- if (isset($_POST['nanobsd_force_rw']))
+ if (isset($_POST['nanobsd_force_rw'])) {
$config['system']['nanobsd_force_rw'] = true;
- else
+ } else {
unset($config['system']['nanobsd_force_rw']);
+ }
write_config("Changed Permanent Read/Write Setting");
conf_mount_ro();
- }
- else {
- $savemsg = 'Saved r/w permanantly';
+ } else {
+ $savemsg = 'Saved r/w permanently';
$class = 'alert-success';
}
}
print_info_box("The options on this page are intended for use by advanced users only.");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, $class);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(false);
-$section = new Form_Section('NanoBSD Option');
+$section = new Form_Section('NanoBSD Options');
$section->addInput(new Form_StaticText(
'Image Size',
@@ -168,18 +161,22 @@ $section->addInput(new Form_StaticText(
if (is_writable("/")) {
$refcount = refcount_read(1000);
/* refcount_read returns -1 when shared memory section does not exist */
- if ($refcount == 1 || $refcount == -1) {
+ /* refcount can be zero here when the user has set nanobsd_force_rw */
+ /* refcount 1 is normal, so only display the count for abnormal values */
+ if ($refcount == 1 || $refcount == 0 || $refcount == -1) {
$refdisplay = "";
} else {
$refdisplay = " (Reference count " . $refcount . ")";
}
$lbl = gettext("Read/Write") . $refdisplay;
- if (!isset($config['system']['nanobsd_force_rw']))
+ if (!isset($config['system']['nanobsd_force_rw'])) {
$btnlbl = gettext("Switch to Read-Only");
+ }
} else {
$lbl = gettext("Read-Only");
- if (!isset($config['system']['nanobsd_force_rw']))
+ if (!isset($config['system']['nanobsd_force_rw'])) {
$btnlbl = gettext("Switch to Read/Write");
+ }
}
$robtn = new Form_Button('changero', $btnlbl);
@@ -253,4 +250,4 @@ if (file_exists("/conf/upgrade_log.txt") && $_POST['viewupgradelog']) {
</div>
<?php
}
-require("foot.inc"); \ No newline at end of file
+require("foot.inc");
diff --git a/src/usr/local/www/diag_ndp.php b/src/usr/local/www/diag_ndp.php
index cb6c889..b542552 100644
--- a/src/usr/local/www/diag_ndp.php
+++ b/src/usr/local/www/diag_ndp.php
@@ -3,13 +3,14 @@
diag_ndp.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (C) 2004-2010 Scott Ullrich <sullrich@gmail.com>
- * Copyright (C) 2011 Seth Mos <seth.mos@dds.nl>
- * Part of the pfSense project (https://www.pfsense.org)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2011 Seth Mos <seth.mos@dds.nl>
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +18,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,14 +57,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/cat /usr/sbin/arp
- pfSense_MODULE: arp
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-ndptable
-##|*NAME=Diagnostics: NDP Table page
+##|*NAME=Diagnostics: NDP Table
##|*DESCR=Allow access to the 'Diagnostics: NDP Table' page.
##|*MATCH=diag_ndp.php*
##|-PRIV
@@ -134,8 +130,8 @@ include("head.inc");
?>
<div class="table-responsive">
- <table class="table table-striped table-hover">
- <thead>
+ <table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
+ <thead>
<tr>
<th><?= gettext("IPv6 address"); ?></th>
<th><?= gettext("MAC address"); ?></th>
@@ -164,10 +160,11 @@ include("head.inc");
</td>
<td>
<?php
- if (isset($hwif[$entry['interface']]))
+ if (isset($hwif[$entry['interface']])) {
echo $hwif[$entry['interface']];
- else
+ } else {
echo $entry['interface'];
+ }
?>
</td>
</tr>
@@ -176,4 +173,4 @@ include("head.inc");
</table>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php
index 39d230d..5258f9b 100644
--- a/src/usr/local/www/diag_packet_capture.php
+++ b/src/usr/local/www/diag_packet_capture.php
@@ -3,10 +3,10 @@
diag_packet_capture.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -14,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -35,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -53,14 +53,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/ps /usr/bin/grep /usr/sbin/tcpdump
- pfSense_MODULE: routing
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-packetcapture
-##|*NAME=Diagnostics: Packet Capture page
+##|*NAME=Diagnostics: Packet Capture
##|*DESCR=Allow access to the 'Diagnostics: Packet Capture' page.
##|*MATCH=diag_packet_capture.php*
##|-PRIV
@@ -123,6 +118,7 @@ if ($_POST['downloadbtn'] == gettext("Download Capture")) {
$pgtitle = array(gettext("Diagnostics"), gettext("Packet Capture"));
require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
+require_once("ipsec.inc");
$fp = "/root/";
$fn = "packetcapture.cap";
@@ -136,9 +132,10 @@ $protos = array('icmp', 'icmp6', 'tcp', 'udp', 'arp', 'carp', 'esp',
$input_errors = array();
$interfaces = get_configured_interface_with_descr();
-if (isset($config['ipsec']['enable'])) {
- $interfaces['ipsec'] = "IPsec";
+if (ipsec_enabled()) {
+ $interfaces['enc0'] = "IPsec";
}
+
foreach (array('server', 'client') as $mode) {
if (is_array($config['openvpn']["openvpn-{$mode}"])) {
foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) {
@@ -285,14 +282,13 @@ $protocollist = array(
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(false); // No button yet. We add those later depending on the required action
-$section = new Form_Section('General Logging Options');
+$section = new Form_Section('Packet Capture Options');
$section->addInput(new Form_Select(
'interface',
@@ -365,8 +361,7 @@ $section->addInput(new Form_Select(
'detail',
'Level of detail',
$detail,
- array('' => 'Any',
- 'normal' => 'Normal',
+ array('normal' => 'Normal',
'medium' => 'Medium',
'high' => 'High',
'full' => 'Full',
@@ -377,7 +372,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Checkbox(
'dnsquery',
'Reverse DNS Lookup',
- null,
+ 'Do reverse DNS lookup',
$_POST['dnsquery']
))->setHelp('This check box will cause the packet capture to perform a reverse DNS lookup associated with all IP addresses.' . '<br />' .
'This option can cause delays for large packet captures.');
@@ -394,8 +389,7 @@ if (($action == gettext("Stop") or $action == "") and $processisrunning != true)
'startbtn',
'Start'
))->removeClass('btn-primary')->addClass('btn-success');
-}
-else {
+} else {
$form->addGlobal(new Form_Button(
'stopbtn',
'Stop'
@@ -424,14 +418,17 @@ print($form);
if ($do_tcpdump) :
$matches = array();
- if (in_array($fam, $fams))
+ if (in_array($fam, $fams)) {
$matches[] = $fam;
+ }
- if (in_array($proto, $protos))
+ if (in_array($proto, $protos)) {
$matches[] = fixup_not($proto);
+ }
- if ($port != "")
+ if ($port != "") {
$matches[] = "port ".fixup_not($port);
+ }
if ($host != "") {
$hostmatch = "";
@@ -440,15 +437,17 @@ if ($do_tcpdump) :
foreach ($hosts as $h) {
$h = fixup_host($h, $hostcount++);
- if (!empty($h))
+ if (!empty($h)) {
$hostmatch .= " " . $h;
+ }
}
- if (!empty($hostmatch))
+ if (!empty($hostmatch)) {
$matches[] = "({$hostmatch})";
+ }
}
- if ($count != "0" ) {
+ if ($count != "0") {
$searchcount = "-c " . $count;
} else {
$searchcount = "";
@@ -471,7 +470,7 @@ if ($do_tcpdump) :
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Packets Captured')?></h2></div>
<div class="panel-body">
-
+ <div class="form-group">
<?php
$detail_args = "";
switch ($detail) {
@@ -490,16 +489,17 @@ if ($do_tcpdump) :
break;
}
- print('<pre>');
+ print('<textarea class="form-control" rows="20" style="font-size: 13px; font-family: consolas,monaco,roboto mono,liberation mono,courier;">');
system("/usr/sbin/tcpdump {$disabledns} {$detail_args} -r {$fp}{$fn}");
- print('</pre>');
+ print('</textarea>');
conf_mount_ro();
?>
+ </div>
</div>
</div>
<?php
}
endif;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_patterns.php b/src/usr/local/www/diag_patterns.php
deleted file mode 100644
index 87b6516..0000000
--- a/src/usr/local/www/diag_patterns.php
+++ /dev/null
@@ -1,123 +0,0 @@
-<?php
-/* $Id$ */
-/*
- diag_patterns.php
-*/
-/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Exec+ v1.02-000 - Copyright 2001-2003, All rights reserved
- * Created by André Ribeiro and Hélder Pereira
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
- *
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
- *
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- *
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- pfSense_MODULE: shaper
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-patters
-##|*NAME=Diagnostics: Patterns page
-##|*DESCR=Allow access to the 'Diagnostics: Patterns' page.
-##|*MATCH=patterns.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-// Defining this here ensures that both instances (button name and POST check) are identical
-$buttonlabel = gettext("Upload Pattern file");
-
-//Move the upload file to /usr/local/share/protocols (is_uploaded_file must use tmp_name as argument)
-if (($_POST['submit'] == $buttonlabel) && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
- if (fileExtension($_FILES['ulfile']['name'])) {
- if (!is_array($config['l7shaper']['custom_pat']))
- $config['l7shaper']['custom_pat'] = array();
-
- $config['l7shaper']['custom_pat'][$_FILES['ulfile']['name']] = base64_encode(file_get_contents($_FILES['ulfile']['tmp_name']));
- write_config(sprintf(gettext("Added custom l7 pattern %s"), $_FILES['ulfile']['name']));
- move_uploaded_file($_FILES['ulfile']['tmp_name'], "/usr/local/share/protocols/" . $_FILES['ulfile']['name']);
- $ulmsg = gettext("Uploaded file to") . " /usr/local/share/protocols/" . htmlentities($_FILES['ulfile']['name']);
- $class = 'alert-success';
- }
- else {
- $ulmsg = gettext("Error: You must upload a file with .pat extension.");
- $class = 'alert-danger';
- }
-}
-
-//Check if file has correct extension (.pat)
-function fileExtension($nameFile) {
- $format = substr($nameFile, -4);
- return ($format == ".pat");
-}
-
-$pgtitle = array(gettext("Diagnostics"), gettext("Add layer7 pattern"));
-include("head.inc");
-
-if ($ulmsg)
- print_info_box($ulmsg, $class);
-
-require_once('classes/Form.class.php');
-
-$form = new Form($buttonlabel);
-
-$form->setMultipartEncoding();
-
-$section = new Form_Section('Upload Layer7 pattern file');
-
-$filepicker = new Form_Input(
- 'ulfile',
- 'File to upload',
- 'file'
-);
-
-$section->addInput($filepicker)->setHelp('Choose the file you wish to upload (*.pat)');
-
-$form->add($section);
-print($form);
-
-include("foot.inc"); \ No newline at end of file
diff --git a/src/usr/local/www/diag_pf_info.php b/src/usr/local/www/diag_pf_info.php
index 8ede5c5..27a78ae 100644
--- a/src/usr/local/www/diag_pf_info.php
+++ b/src/usr/local/www/diag_pf_info.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
diag_pf_info.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2010 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,11 +53,6 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/top
- pfSense_MODULE: system
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-pf-info
##|*NAME=Diagnostics: pfInfo
@@ -69,7 +62,7 @@
require("guiconfig.inc");
-$pgtitle = gettext("Diagnostics: pfInfo");
+$pgtitle = array(gettext("Diagnostics"), gettext("pfInfo"));
if (stristr($_POST['Submit'], gettext("No"))) {
header("Location: index.php");
@@ -90,10 +83,10 @@ if ($_REQUEST['getactivity']) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require_once('classes/Form.class.php');
$form = new Form(false);
$form->addGlobal(new Form_Input(
'getactivity',
@@ -114,10 +107,12 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function getpfinfo() {
- if (!$('#refresh').is(':checked'))
+ if (!$('#refresh').is(':checked')) {
return;
+ }
$.ajax(
'/diag_pf_info.php',
@@ -130,10 +125,11 @@ print $form;
});
}
- events.push(function(){
+ events.push(function() {
setInterval('getpfinfo()', 2500);
getpfinfo();
});
+//]]>
</script>
<div class="panel panel-default">
@@ -143,4 +139,4 @@ print $form;
</div>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_system_pftop.php b/src/usr/local/www/diag_pftop.php
index fbd9df6..2225a16 100644
--- a/src/usr/local/www/diag_system_pftop.php
+++ b/src/usr/local/www/diag_pftop.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
- diag_system_pftop.php
+ diag_pftop.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2008, 2009 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,20 +53,16 @@
*
*/
-/*
- pfSense_MODULE: filter
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-system-pftop
##|*NAME=Diagnostics: pfTop
##|*DESCR=Allows access to the 'Diagnostics: pfTop' page
-##|*MATCH=diag_system_pftop.php*
+##|*MATCH=diag_pftop.php*
##|-PRIV
require("guiconfig.inc");
-$pgtitle = gettext("Diagnostics: pfTop");
+$pgtitle = array(gettext("Diagnostics"), gettext("pfTop"));
$sorttypes = array('age', 'bytes', 'dest', 'dport', 'exp', 'none', 'peak', 'pkt', 'rate', 'size', 'sport', 'src');
$viewtypes = array('default', 'label', 'long', 'queue', 'rules', 'size', 'speed', 'state', 'time');
@@ -117,10 +111,10 @@ if ($_REQUEST['sorttype'] && in_array($_REQUEST['sorttype'], $sorttypes) &&
$numstate = "100";
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require_once('classes/Form.class.php');
$form = new Form(false);
$form->addGlobal(new Form_Input(
'getactivity',
@@ -174,10 +168,11 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function getpftopactivity() {
$.ajax(
- '/diag_system_pftop.php',
+ '/diag_pftop.php',
{
method: 'post',
data: $(document.forms[0]).serialize(),
@@ -189,10 +184,11 @@ print $form;
);
}
- events.push(function(){
+ events.push(function() {
setInterval('getpftopactivity()', 2500);
getpftopactivity();
});
+//]]>
</script>
<?php
?>
@@ -203,14 +199,17 @@ print $form;
</div>
</div>
-<script>
-events.push(function(){
- $('#viewtype').on('change', function(){
- if (['queue', 'label', 'rules'].indexOf($(this).val()) > -1)
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $('#viewtype').on('change', function() {
+ if (['queue', 'label', 'rules'].indexOf($(this).val()) > -1) {
$("#sorttype, #sorttypediv, #statesdiv, #states").parents('.form-group').hide();
- else
+ } else {
$("#sorttype, #sorttypediv, #statesdiv, #states").parents('.form-group').show();
+ }
});
});
+//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_ping.php b/src/usr/local/www/diag_ping.php
index 5a5275a..d95fc54 100644
--- a/src/usr/local/www/diag_ping.php
+++ b/src/usr/local/www/diag_ping.php
@@ -5,7 +5,9 @@
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2003-2005 Bob Zoller (bob@kludgebox.com) and Manuel Kasper <mk@neon1.net>
- * part of m0n0wall (http://m0n0.ch/wall)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -37,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +57,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ping /sbin/ping6
- pfSense_MODULE: routing
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-ping
-##|*NAME=Diagnostics: Ping page
+##|*NAME=Diagnostics: Ping
##|*DESCR=Allow access to the 'Diagnostics: Ping' page.
##|*MATCH=diag_ping.php*
##|-PRIV
@@ -73,6 +70,9 @@ require_once("guiconfig.inc");
define('MAX_COUNT', 10);
define('DEFAULT_COUNT', 3);
+$do_ping = false;
+$host = '';
+$count = DEFAULT_COUNT;
function create_sourceaddresslist() {
$sourceips = get_possible_traffic_source_addresses(true);
@@ -109,26 +109,24 @@ if ($_POST || $_REQUEST['host']) {
}
if (!$input_errors) {
- $do_ping = true;
- $sourceip = $_REQUEST['sourceip'];
- $count = $_POST['count'];
+ if ($_POST) {
+ $do_ping = true;
+ }
+ if (isset($_REQUEST['sourceip'])) {
+ $sourceip = $_REQUEST['sourceip'];
+ }
+ $count = $_REQUEST['count'];
if (preg_match('/[^0-9]/', $count)) {
$count = DEFAULT_COUNT;
}
}
}
-if (!isset($do_ping)) {
- $do_ping = false;
- $host = '';
- $count = DEFAULT_COUNT;
-}
-
if ($do_ping) {
?>
<script type="text/javascript">
//<![CDATA[
- window.onload=function(){
+ window.onload=function() {
document.getElementById("pingCaptured").wrap='off';
}
//]]>
@@ -139,33 +137,35 @@ if ($do_ping) {
if ($ipproto == "ipv6") {
$command .= "6";
$ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ipv6($sourceip);
- if (is_linklocal($ifaddr))
+ if (is_linklocal($ifaddr)) {
$ifscope = get_ll_scope($ifaddr);
+ }
} else {
$ifaddr = is_ipaddr($sourceip) ? $sourceip : get_interface_ip($sourceip);
}
if ($ifaddr && (is_ipaddr($host) || is_hostname($host))) {
$srcip = "-S" . escapeshellarg($ifaddr);
- if (is_linklocal($host) && !strstr($host, "%") && !empty($ifscope))
+ if (is_linklocal($host) && !strstr($host, "%") && !empty($ifscope)) {
$host .= "%{$ifscope}";
+ }
}
$cmd = "{$command} {$srcip} -c" . escapeshellarg($count) . " " . escapeshellarg($host);
//echo "Ping command: {$cmd}\n";
$result = shell_exec($cmd);
- if (empty($result))
+ if (empty($result)) {
$input_errors[] = "Host \"" . $host . "\" did not respond or could not be resolved.";
+ }
}
include('head.inc');
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form('Ping');
@@ -189,7 +189,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'sourceip',
'Source address',
- $pconfig['source'],
+ $sourceip,
create_sourceaddresslist()
))->setHelp('Select source address for the ping');
@@ -198,7 +198,7 @@ $section->addInput(new Form_Select(
'Maximum number of pings',
$count,
array_combine(range(1, MAX_COUNT), range(1, MAX_COUNT))
-))->setHelp('Select the maximum number pings');
+))->setHelp('Select the maximum number of pings');
$form->add($section);
print $form;
diff --git a/src/usr/local/www/reboot.php b/src/usr/local/www/diag_reboot.php
index 62e08bb..b53fc9b 100755
--- a/src/usr/local/www/reboot.php
+++ b/src/usr/local/www/diag_reboot.php
@@ -1,11 +1,12 @@
<?php
-/* $Id$ */
/*
- reboot.php
+ diag_reboot.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -57,9 +58,9 @@
##|+PRIV
##|*IDENT=page-diagnostics-rebootsystem
-##|*NAME=Diagnostics: Reboot System page
+##|*NAME=Diagnostics: Reboot System
##|*DESCR=Allow access to the 'Diagnostics: Reboot System' page.
-##|*MATCH=reboot.php*
+##|*MATCH=diag_reboot.php*
##|-PRIV
// Set DEBUG to true to prevent the system_reboot() function from being called
@@ -69,26 +70,63 @@ require("guiconfig.inc");
require("functions.inc");
require("captiveportal.inc");
-$pgtitle = array(gettext("Diagnostics"),gettext("Reboot System"));
+$guitimeout = 90; // Seconds to wait before reloading the page after reboot
+$guiretry = 20; // Seconds to try again if $guitimeout was not long enough
+
+$pgtitle = array(gettext("Diagnostics"), gettext("Reboot System"));
include("head.inc");
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+ if (DEBUG) {
+ print_info_box("Not actually rebooting (DEBUG is set true)", success);
+ } else {
+ print('<div><pre>');
+ system_reboot();
+ print('</pre></div>');
+ }
+
?>
- <meta http-equiv="refresh" content="70;url=/">
- <div class="alert alert-success" role="alert">
- <?=gettext("The system is rebooting now. This may take one minute or so.")?>
- </div>
-<?php
- if(DEBUG) {
- print("Not actually rebooting (DEBUG is set true)");
+<div id="countdown" class="text-center"></div>
+
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+
+ var timeoutmsg = '<h4>Rebooting<br />Page will automatically reload in ';
+ var time = 0;
+
+ function checkonline() {
+ $.ajax({
+ url : "/index.php", // or other resource
+ type : "HEAD"
+ })
+ .done(function() {
+ window.location="/index.php";
+ });
}
- else {
- print('<pre>');
- system_reboot();
- print('</pre>');
+
+ function startCountdown() {
+ setInterval(function() {
+ if (time > 0) {
+ $('#countdown').html(timeoutmsg + time + ' seconds.</h4>');
+ time--;
+ } else {
+ time = "<?=$guiretry?>";
+ timeoutmsg = '<h4>Not yet ready<br />Retrying in another ';
+ checkonline();
+ }
+ }, 1000);
}
+
+ time = "<?=$guitimeout?>";
+ startCountdown();
+
+});
+//]]>
+</script>
+<?php
} else {
?>
@@ -98,7 +136,7 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
<div class="panel-body">
<div class="content">
<p>Click "Reboot" to reboot the system immediately, or "No" to go to the system dashboard without rebooting. (There will be a brief delay before the dashboard appears.)</p>
- <form action="reboot.php" method="post">
+ <form action="diag_reboot.php" method="post">
<input type="submit" class="btn btn-danger pull-center" name="Submit" value="Reboot">
<a href="/" class="btn btn-default">No</a>
</form>
@@ -110,4 +148,6 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
+
+
diff --git a/src/usr/local/www/diag_resetstate.php b/src/usr/local/www/diag_resetstate.php
index 8630b59..e492550 100644
--- a/src/usr/local/www/diag_resetstate.php
+++ b/src/usr/local/www/diag_resetstate.php
@@ -1,14 +1,15 @@
<?php
-/* $Id$ */
/*
diag_resetstate.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-2009 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +56,10 @@
*
*/
-/*
- pfSense_MODULE: filter
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-resetstate
-##|*NAME=Diagnostics: Reset state page
-##|*DESCR=Allow access to the 'Diagnostics: Reset state' page.
+##|*NAME=Diagnostics: Reset states
+##|*DESCR=Allow access to the 'Diagnostics: Reset states' page.
##|*MATCH=diag_resetstate.php*
##|-PRIV
@@ -92,11 +89,13 @@ if ($_POST) {
$pgtitle = array(gettext("Diagnostics"), gettext("Reset state"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'alert-success');
+}
$statetablehelp = 'Resetting the state tables will remove all entries from the corresponding tables. This means that all open connections ' .
'will be broken and will have to be re-established. This may be necessary after making substantial changes to the ' .
@@ -116,14 +115,13 @@ $sourcetablehelp = 'Resetting the source tracking table will remove all source/d
$tab_array = array();
$tab_array[] = array(gettext("States"), false, "diag_dump_states.php");
-if (isset($config['system']['lb_use_sticky']))
+if (isset($config['system']['lb_use_sticky'])) {
$tab_array[] = array(gettext("Source Tracking"), false, "diag_dump_states_sources.php");
+}
$tab_array[] = array(gettext("Reset States"), true, "diag_resetstate.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$resetbtn = new Form_Button(
'Submit',
'Reset'
@@ -155,4 +153,4 @@ $form->add($section);
print $form;
?>
-<?php include("foot.inc"); ?> \ No newline at end of file
+<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/diag_routes.php b/src/usr/local/www/diag_routes.php
index 711e6b7..36048e1 100644
--- a/src/usr/local/www/diag_routes.php
+++ b/src/usr/local/www/diag_routes.php
@@ -1,15 +1,13 @@
<?php
-
-/* $Id$ */
/*
diag_routes.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2006 Fernando Lamos
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,13 +53,9 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/netstat
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-diagnostics-routingtables
-##|*NAME=Diagnostics: Routing tables page
+##|*NAME=Diagnostics: Routing tables
##|*DESCR=Allow access to the 'Diagnostics: Routing tables' page.
##|*MATCH=diag_routes.php*
##|-PRIV
@@ -105,8 +99,6 @@ $shortcut_section = "routing";
include('head.inc');
-require_once('classes/Form.class.php');
-
$form = new Form('Update');
$form->addGlobal(new Form_Input(
'isAjax',
@@ -114,7 +106,7 @@ $form->addGlobal(new Form_Input(
'hidden',
1
));
-$section = new Form_Section('Traceroute');
+$section = new Form_Section('Routing Table Display Options');
$section->addInput(new Form_Checkbox(
'resolve',
@@ -142,7 +134,8 @@ $section->addInput(new Form_Input(
$form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function update_routes(section) {
$.ajax(
'/diag_routes.php',
@@ -163,27 +156,37 @@ function update_routes_callback(html) {
var thead = '<tr>';
for (var i = 0; i < responseTextArr.length; i++) {
- if (responseTextArr[i] == "")
+
+ if (responseTextArr[i] == "") {
continue;
- var tmp = '<tr>';
+ }
+
+ if (i == 0) {
+ var tmp = '';
+ } else {
+ var tmp = '<tr>';
+ }
+
var j = 0;
var entry = responseTextArr[i].split(" ");
for (var k = 0; k < entry.length; k++) {
- if (entry[k] == "")
+ if (entry[k] == "") {
continue;
- if (i == 0)
+ }
+ if (i == 0) {
tmp += '<th>' + entry[k] + '<\/th>';
- else
+ } else {
tmp += '<td>' + entry[k] + '<\/td>';
+ }
j++;
}
- tmp += '<td><\/td>';
-
- if (i == 0)
+ if (i == 0) {
thead += tmp;
- else
+ } else {
+ tmp += '<td><\/td>'
tbody += tmp;
+ }
}
$('#' + section + ' > thead').html(thead);
@@ -195,24 +198,27 @@ function update_all_routes() {
update_routes("IPv6");
}
-events.push(function(){
+events.push(function() {
setInterval('update_all_routes()', 5000);
update_all_routes();
- $(document.forms[0]).on('submit', function(e){
+ $(document.forms[0]).on('submit', function(e) {
update_all_routes();
e.preventDefault();
});
});
+//]]>
</script>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">IPv4 Routes</h2></div>
<div class="panel panel-body">
- <table class="table table-striped table-compact" id="IPv4">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" id="IPv4">
<thead>
- <!-- filled by xhr -->
+ <tr>
+ <th><!-- filled by xhr --></th>
+ </tr>
</thead>
<tbody>
<tr>
@@ -226,9 +232,11 @@ events.push(function(){
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">IPv6 Routes</h2></div>
<div class="panel panel-body">
- <table class="table table-striped table-compact" id="IPv6">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" id="IPv6">
<thead>
- <!-- filled by xhr -->
+ <tr>
+ <th><!-- filled by xhr --></th>
+ </tr>
</thead>
<tbody>
<tr>
@@ -239,4 +247,4 @@ events.push(function(){
</div>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_smart.php b/src/usr/local/www/diag_smart.php
index 3defed1..ad878dc 100644
--- a/src/usr/local/www/diag_smart.php
+++ b/src/usr/local/www/diag_smart.php
@@ -3,12 +3,11 @@
diag_smart.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2010 - Jim Pingle
- * Copyright (c) 2006, Eric Friesen
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2006 Eric Friesen
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -55,6 +54,13 @@
*
*/
+##|+PRIV
+##|*IDENT=page-diagnostics-smart
+##|*NAME=Diagnostics: S.M.A.R.T. Monitor Tools
+##|*DESCR=Allow access to the 'Diagnostics: S.M.A.R.T. Monitor Tools' page.
+##|*MATCH=diag_smart.php*
+##|-PRIV
+
require("guiconfig.inc");
$pgtitle = array(gettext("Diagnostics"), gettext("S.M.A.R.T. Monitor Tools"));
@@ -66,19 +72,17 @@ $valid_test_types = array("offline", "short", "long", "conveyance");
$valid_info_types = array("i", "H", "c", "A", "a");
$valid_log_types = array("error", "selftest");
-$closehead = false;
include("head.inc");
// Highlights the words "PASSED", "FAILED", and "WARNING".
-function add_colors($string)
-{
+function add_colors($string) {
// To add words keep arrays matched by numbers
$patterns[0] = '/PASSED/';
$patterns[1] = '/FAILED/';
$patterns[2] = '/Warning/';
- $replacements[0] = '<b><font color="#00ff00">' . gettext("PASSED") . '</font></b>';
- $replacements[1] = '<b><font color="#ff0000">' . gettext("FAILED") . '</font></b>';
- $replacements[2] = '<font color="#ff0000">' . gettext("Warning") . '</font>';
+ $replacements[0] = '<span class="text-success">' . gettext("PASSED") . '</span>';
+ $replacements[1] = '<span class="text-alert">' . gettext("FAILED") . '</span>';
+ $replacements[2] = '<span class="text-warning">' . gettext("Warning") . '</span>';
ksort($patterns);
ksort($replacements);
return preg_replace($patterns, $replacements, $string);
@@ -111,8 +115,6 @@ if (!file_exists('/dev/' . $targetdev)) {
return;
}
-require_once('classes/Form.class.php');
-
$tab_array = array();
$tab_array[0] = array(gettext("Information/Tests"), ($action != 'config'), $_SERVER['PHP_SELF'] . "?action=default");
$tab_array[1] = array(gettext("Config"), ($action == 'config'), $_SERVER['PHP_SELF'] . "?action=config");
@@ -226,9 +228,7 @@ switch ($action) {
smartmonctl("stop");
smartmonctl("start");
$style = 'warning';
- }
- else if (isset($_POST['save']))
- {
+ } else if (isset($_POST['save'])) {
$config['system']['smartmonemail'] = $_POST['smartmonemail'];
write_config();
@@ -238,8 +238,7 @@ switch ($action) {
if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message($retval);
$style = 'success';
- }
- else {
+ } else {
$savemsg = $retval;
$style='danger';
}
@@ -254,8 +253,9 @@ switch ($action) {
}
// Was the config changed? if so, print the message
- if ($savemsg)
+ if ($savemsg) {
print_info_box($savemsg, $style);
+ }
// Get users email from the xml file
$pconfig['smartmonemail'] = $config['system']['smartmonemail'];
@@ -287,13 +287,15 @@ switch ($action) {
// Default page, prints the forms to view info, test, etc...
default: {
-// Information
+// Information
$devs = get_smart_drive_list();
- $form = new Form(new Form_Button(
+ $form = new Form(false);
+
+ $btnview = new Form_Button(
'submit',
'View'
- ));
+ );
$section = new Form_Section('Information');
@@ -355,14 +357,21 @@ switch ($action) {
array_combine($devs, $devs)
));
+ $section->addInput(new Form_StaticText(
+ '',
+ $btnview
+ ));
+
$form->add($section);
print($form);
// Tests
- $form = new Form(new Form_Button(
+ $form = new Form(false);
+
+ $btntest = new Form_Button(
'submit',
'Test'
- ));
+ );
$section = new Form_Section('Perform self-tests');
@@ -417,14 +426,21 @@ switch ($action) {
array_combine($devs, $devs)
));
+ $section->addInput(new Form_StaticText(
+ '',
+ $btntest
+ ));
+
$form->add($section);
print($form);
// Logs
- $form = new Form(new Form_Button(
+ $form = new Form(false);
+
+ $btnview = new Form_Button(
'submit',
'View'
- ));
+ );
$section = new Form_Section('View logs');
@@ -462,6 +478,11 @@ switch ($action) {
array_combine($devs, $devs)
));
+ $section->addInput(new Form_StaticText(
+ '',
+ $btnview
+ ));
+
$form->add($section);
print($form);
@@ -473,7 +494,7 @@ switch ($action) {
$btnabort->removeClass('btn-primary')->addClass('btn-danger');
- $form = new Form($btnabort);
+ $form = new Form(false);
$section = new Form_Section('Abort');
@@ -491,6 +512,11 @@ switch ($action) {
array_combine($devs, $devs)
));
+ $section->addInput(new Form_StaticText(
+ '',
+ $btnabort
+ ));
+
$form->add($section);
print($form);
@@ -498,4 +524,4 @@ switch ($action) {
}
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_sockets.php b/src/usr/local/www/diag_sockets.php
index 5701640..578934f 100644
--- a/src/usr/local/www/diag_sockets.php
+++ b/src/usr/local/www/diag_sockets.php
@@ -1,66 +1,61 @@
<?php
-
-/* $Id$ */
/*
diag_sockets.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
*
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
*
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
*
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
*
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * ====================================================================
+ * ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/sockstat
-*/
##|+PRIV
##|*IDENT=page-diagnostics-sockets
-##|*NAME=Diagnostics: Sockets page
+##|*NAME=Diagnostics: Sockets
##|*DESCR=Allow access to the 'Diagnostics: Sockets' page.
##|*MATCH=diag_sockets.php*
##|-PRIV
@@ -71,23 +66,14 @@ $pgtitle = array(gettext("Diagnostics"), gettext("Sockets"));
include('head.inc');
-?>
-
-<?php include("fbegin.inc");
-
$showAll = isset($_GET['showAll']);
$showAllText = $showAll ? "Show only listening sockets" : "Show all socket connections";
$showAllOption = $showAll ? "" : "?showAll";
?>
-
-<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title">System socket information for both IPv4 and IPv6</h2></div>
- <div class="panel-body">
-
-(Click <a href="#about">here </a>for explanation of the information listed for each socket) <br /><br />
-<input class="btn btn-info btn-xs" type="button" value="<?=$showAllText?>" onclick="window.location.href='diag_sockets.php<?=$showAllOption?>'"/>
-
+<input class="btn btn-info btn-sm" type="button" value="<?=$showAllText?>" onclick="window.location.href='diag_sockets.php<?=$showAllOption?>'"/>
+<br />
+<br />
<?php
if (isset($_GET['showAll'])) {
@@ -97,75 +83,74 @@ $showAllOption = $showAll ? "" : "?showAll";
$internet4 = shell_exec('sockstat -4l');
$internet6 = shell_exec('sockstat -6l');
}
+
+
foreach (array(&$internet4, &$internet6) as $tabindex => $table) {
$elements = ($tabindex == 0 ? 7 : 7);
$name = ($tabindex == 0 ? 'IPv4' : 'IPv6');
?>
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=$name?> <?=gettext("system socket information")?></h2></div>
+ <div class="panel-body">
<div class="table table-responsive">
- <table class="table table-hover table-striped table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
- <tr>
- <th>
- <?=$name?>
- </th>
- </tr>
- </thead>
- <tbody>
-
<?php
foreach (explode("\n", $table) as $i => $line) {
- if ($i == 0)
- $class = 'info';
- else
- $class = '';
-
- if (trim($line) == "")
+ if (trim($line) == "") {
continue;
+ }
- print("<tr>\n");
$j = 0;
+ print("<tr>\n");
foreach (explode(' ', $line) as $entry) {
- if ($entry == '' || $entry == "ADDRESS") continue;
- if ($i == 0)
+ if ($entry == '' || $entry == "ADDRESS") {
+ continue;
+ }
+
+ if ($i == 0) {
print("<th class=\"$class\">$entry</th>\n");
- else
+ } else {
print("<td class=\"$class\">$entry</td>\n");
+ }
$j++;
}
print("</tr>\n");
+ if ($i == 0) {
+ print("</thead>\n");
+ print("<tbody>\n");
+ }
}
?>
</tbody>
</table>
</div>
+ </div>
+</div>
<?php
}
?>
- </div>
- <a name="about"></a>
- <div class="alert alert-success" role="alert">
- <div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title">Socket information - explanation</h2></div>
- <div class="panel-body">
- This page shows the output for the commands: "sockstat -4lL" and "sockstat -6lL".<br />
- Or in case of showing all sockets the output for: "sockstat -4" and "sockstat -6".<br />
- <br />
- The information listed for each socket is:
- <br /><br />
- <dl class="dl-horizontal responsive">
- <dt>USER</dt> <dd>The user who owns the socket.</dd>
- <dt>COMMAND</dt> <dd>The command which holds the socket.</dd>
- <dt>PID</dt> <dd>The process ID of the command which holds the socket.</dd>
- <dt>FD</dt> <dd>The file descriptor number of the socket.</dd>
- <dt>PROTO</dt> <dd>The transport protocol associated with the socket for Internet sockets, or the type of socket (stream or data-gram) for UNIX sockets.</dd>
- <dt>ADDRESS</dt> <dd>(UNIX sockets only) For bound sockets, this is the file-name of the socket. For other sockets, it is the name, PID and file descriptor number of the peer, or ``(none)'' if the socket is neither bound nor connected.</dd>
- <dt>LOCAL ADDRESS</dt> <dd>(Internet sockets only) The address the local end of the socket is bound to (see getsockname(2)).</dd>
- <dt>FOREIGN ADDRESS</dt><dd>(Internet sockets only) The address the foreign end of the socket is bound to (see getpeername(2)).</dd>
- </dl>
- </div>
- </div>
- </div>
+
+<div>
+<div id="infoblock">
+<?php
+print_info_box(gettext('Socket information - explanation.') . '<br /><br />' .
+gettext('This page shows the output for the commands: "sockstat -4lL" and "sockstat -6lL".' . '<br />' .
+ 'Or in case of showing all sockets the output for: "sockstat -4" and "sockstat -6".' . '<br />' . '<br />' .
+'The information listed for each socket is:' . '<br /><br />' .
+' <dl class="dl-horizontal responsive">' .
+ '<dt>USER</dt> <dd>The user who owns the socket.</dd>' .
+ '<dt>COMMAND</dt> <dd>The command which holds the socket.</dd>' .
+ '<dt>PID</dt> <dd>The process ID of the command which holds the socket.</dd>' .
+ '<dt>FD</dt> <dd>The file descriptor number of the socket.</dd>' .
+ '<dt>PROTO</dt> <dd>The transport protocol associated with the socket for Internet sockets, or the type of socket (stream or data-gram) for UNIX sockets.</dd>' .
+ '<dt>ADDRESS</dt> <dd>(UNIX sockets only) For bound sockets, this is the file-name of the socket. For other sockets, it is the name, PID and file descriptor number of the peer, or "(none)" if the socket is neither bound nor connected.</dd>' .
+ '<dt>LOCAL ADDRESS</dt> <dd>(Internet sockets only) The address the local end of the socket is bound to (see getsockname(2)).</dd>' .
+ '<dt>FOREIGN ADDRESS</dt><dd>(Internet sockets only) The address the foreign end of the socket is bound to (see getpeername(2)).</dd>' .
+ '</dl>'), info);
+?>
+</div>
</div>
<?php
diff --git a/src/usr/local/www/diag_states_summary.php b/src/usr/local/www/diag_states_summary.php
index 502c53c..06745a0 100644
--- a/src/usr/local/www/diag_states_summary.php
+++ b/src/usr/local/www/diag_states_summary.php
@@ -3,12 +3,11 @@
diag_states_summary.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2005-2009 Scott Ullrich
- * Copyright (c) 2005 Colin Smith
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Colin Smith
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +54,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/pfctl
- pfSense_MODULE: filter
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-statessummary
-##|*NAME=Diagnostics: States Summary page
+##|*NAME=Diagnostics: States Summary
##|*DESCR=Allow access to the 'Diagnostics: States Summary' page.
##|*MATCH=diag_states_summary.php*
##|-PRIV
@@ -168,10 +162,10 @@ function build_port_info($portarr, $proto) {
return implode($ports, ', ');
}
-function print_summary_table($label, $iparr, $sort = TRUE)
-{
- if ($sort)
+function print_summary_table($label, $iparr, $sort = TRUE) {
+ if ($sort) {
uksort($iparr, "sort_by_ip");
+ }
?>
<div class="panel panel-default">
@@ -197,8 +191,9 @@ function print_summary_table($label, $iparr, $sort = TRUE)
$rowSpan = '';
$i = 0;
- if ($protocolCount > 1)
+ if ($protocolCount > 1) {
$rowSpan = ' rowspan="' . $protocolCount . '"';
+ }
?>
<tr>
<td<?= $rowSpan ?>><?php echo $ip; ?></td>
@@ -232,4 +227,4 @@ print_summary_table(gettext("By Destination IP"), $dstipinfo);
print_summary_table(gettext("Total per IP"), $allipinfo);
print_summary_table(gettext("By IP Pair"), $pairipinfo, FALSE);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_system_activity.php b/src/usr/local/www/diag_system_activity.php
index 22f19f1..2442b5f 100644
--- a/src/usr/local/www/diag_system_activity.php
+++ b/src/usr/local/www/diag_system_activity.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
diag_system_activity.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2008, 2009 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,11 +53,6 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/top
- pfSense_MODULE: system
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-system-activity
##|*NAME=Diagnostics: System Activity
@@ -79,11 +72,13 @@ if ($_REQUEST['getactivity']) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function getcpuactivity() {
$.ajax(
'/diag_system_activity.php',
@@ -100,10 +95,11 @@ function getcpuactivity() {
);
}
-events.push(function(){
+events.push(function() {
setInterval('getcpuactivity()', 2500);
getcpuactivity();
});
+//]]>
</script>
<div class="panel panel-default">
@@ -113,4 +109,4 @@ events.push(function(){
</div>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_tables.php b/src/usr/local/www/diag_tables.php
index 2dfd348..36b41f7 100644
--- a/src/usr/local/www/diag_tables.php
+++ b/src/usr/local/www/diag_tables.php
@@ -3,13 +3,11 @@
diag_tables.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2010 Jim Pingle
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Portions borrowed from diag_dump_states.php
- * Copyright (c) 2010 Scott Ullrich
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/pfctl
- pfSense_MODULE: filter
-*/
##|+PRIV
##|*IDENT=page-diagnostics-tables
-##|*NAME=Diagnostics: PF Table IP addresses
+##|*NAME=Diagnostics: pf Table IP addresses
##|*DESCR=Allow access to the 'Diagnostics: Tables' page.
##|*MATCH=diag_tables.php*
##|-PRIV
@@ -107,15 +101,18 @@ if (($tablename == "bogons") || ($tablename == "bogonsv6")) {
$loading = true;
while ($loading == true) {
$isrunning = `/bin/ps awwwux | /usr/bin/grep -v grep | /usr/bin/grep bogons`;
- if ($isrunning == "")
+ if ($isrunning == "") {
$loading = false;
+ }
$maxtimetowait++;
- if ($maxtimetowait > 89)
+ if ($maxtimetowait > 89) {
$loading = false;
+ }
sleep(1);
}
- if ($maxtimetowait < 90)
+ if ($maxtimetowait < 90) {
$savemsg = gettext("The bogons database has been updated.");
+ }
}
}
@@ -124,10 +121,10 @@ exec("/sbin/pfctl -sT", $tables);
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
-require_once('classes/Form.class.php');
$form = new Form('Show');
$section = new Form_Section('Table to display');
@@ -143,9 +140,10 @@ $form->add($section);
print $form;
?>
-<script>
-events.push(function(){
- $('a[data-entry]').on('click', function(){
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $('a[data-entry]').on('click', function() {
var el = $(this);
$.ajax(
@@ -156,12 +154,13 @@ events.push(function(){
type: '<?=htmlspecialchars($tablename)?>',
delete: $(this).data('entry')
},
- success: function(){
+ success: function() {
el.parents('tr').remove();
},
});
});
});
+//]]>
</script>
<div class="table-responsive">
@@ -169,6 +168,7 @@ events.push(function(){
<thead>
<tr>
<th><?=gettext("IP Address")?></th>
+ <th></th>
</tr>
</thead>
<tbody>
diff --git a/src/usr/local/www/diag_testport.php b/src/usr/local/www/diag_testport.php
index 0faa3e2..63e55c9 100644
--- a/src/usr/local/www/diag_testport.php
+++ b/src/usr/local/www/diag_testport.php
@@ -3,11 +3,13 @@
diag_testport.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2013 Jim P (jimp@pfsense.org)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,11 +56,6 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/nc
- pfSense_MODULE: routing
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-testport
##|*NAME=Diagnostics: Test Port
@@ -122,7 +119,7 @@ if ($_POST || $_REQUEST['host']) {
?>
<script type="text/javascript">
//<![CDATA[
- window.onload=function(){
+ window.onload=function() {
document.getElementById("testportCaptured").wrap='off';
}
//]]>
@@ -132,10 +129,12 @@ if ($_POST || $_REQUEST['host']) {
$ncoutput = "";
$nc_base_cmd = '/usr/bin/nc';
$nc_args = "-w " . escapeshellarg($timeout);
- if (!$showtext)
+ if (!$showtext) {
$nc_args .= ' -z ';
- if (!empty($srcport))
+ }
+ if (!empty($srcport)) {
$nc_args .= ' -p ' . escapeshellarg($srcport) . ' ';
+ }
/* Attempt to determine the interface address, if possible. Else try both. */
if (is_ipaddrv4($host)) {
@@ -150,12 +149,13 @@ if ($_POST || $_REQUEST['host']) {
}
$nc_args .= ' -4';
} elseif (is_ipaddrv6($host)) {
- if ($sourceip == "any")
+ if ($sourceip == "any") {
$ifaddr = '';
- else if (is_linklocal($sourceip))
+ } else if (is_linklocal($sourceip)) {
$ifaddr = $sourceip;
- else
+ } else {
$ifaddr = get_interface_ipv6($sourceip);
+ }
$nc_args .= ' -6';
} else {
switch ($ipprotocol) {
@@ -195,8 +195,9 @@ if ($_POST || $_REQUEST['host']) {
if (!empty($ifaddr)) {
$nc_args .= ' -s ' . escapeshellarg($ifaddr) . ' ';
$scope = get_ll_scope($ifaddr);
- if (!empty($scope) && !strstr($host, "%"))
+ if (!empty($scope) && !strstr($host, "%")) {
$host .= "%{$scope}";
+ }
}
$nc_cmd = "{$nc_base_cmd} {$nc_args} " . escapeshellarg($host) . ' ' . escapeshellarg($port) . ' 2>&1';
@@ -218,9 +219,9 @@ if ($_POST || $_REQUEST['host']) {
include("head.inc");
// Handle the display of all messages here where the user can readily see them
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-else {
+} else {
// New page
if (empty($result) && $retval != 0 && !$showtext) {
print('<div class="alert alert-warning" role="alert">This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port.' .
@@ -229,22 +230,23 @@ else {
// Good host & port
if ($retval == 0 && $do_testport == 1) {
- if (!$showtext)
+ if (!$showtext) {
print('<div class="alert alert-success" role="alert">'.gettext("Port test to host: " . $host . " Port: " . $port . " successful").'</div>');
- else
+ } else {
print('<div class="alert alert-success" role="alert">'.gettext("Port test to host: " . $host . " Port: " . $port . " successful") . '. Any text received from the host will be shown below the form.</div>');
+ }
}
// netcat exit value != 0
- if ($retval != 0 && !empty($result))
- if ($showtext)
+ if ($retval != 0 && !empty($result)) {
+ if ($showtext) {
print('<div class="alert alert-danger" role="alert">'.gettext('No output received, or connection failed. Try with "Show Remote Text" unchecked first.').'</div>');
- else
+ } else {
print('<div class="alert alert-danger" role="alert">'.gettext('Connection failed.').'</div>');
+ }
+ }
}
-require_once('classes/Form.class.php');
-
$form = new Form('Test');
$section = new Form_Section('Test Port');
@@ -288,7 +290,7 @@ $section->addInput(new Form_Select(
))->setHelp('Select source address for the trace');
$section->addInput(new Form_Select(
- 'ipproto',
+ 'ipprotocol',
'IP Protocol',
$ipprotocol,
array('ipv4' => 'IPv4', 'ipv6' => 'IPv6')
@@ -309,4 +311,4 @@ if ($ncoutput && !empty($result) && $showtext && $retval == 0): ?>
</div>
<?php endif;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_traceroute.php b/src/usr/local/www/diag_traceroute.php
index 4c5b3c1..ee76c0c 100644
--- a/src/usr/local/www/diag_traceroute.php
+++ b/src/usr/local/www/diag_traceroute.php
@@ -3,12 +3,14 @@
diag_traceroute.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2005 Paul Taylor (paultaylor@winndixie.com) and Manuel Kasper <mk@neon1.net>
- * part of m0n0wall (http://m0n0.ch/wall)
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +18,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +57,9 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/traceroute
- pfSense_MODULE: routing
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-traceroute
-##|*NAME=Diagnostics: Traceroute page
+##|*NAME=Diagnostics: Traceroute
##|*DESCR=Allow access to the 'Diagnostics: Traceroute' page.
##|*MATCH=diag_traceroute.php*
##|-PRIV
@@ -76,6 +73,9 @@ include("head.inc");
define('MAX_TTL', 64);
define('DEFAULT_TTL', 18);
+$do_traceroute = false;
+$host = '';
+$ttl = DEFAULT_TTL;
$pconfig['ttl'] = DEFAULT_TTL;
$pconfig['ipproto'] = 'IPv4';
$pconfig['sourceip'] = 'Any';
@@ -85,8 +85,9 @@ function create_sourceaddresslist() {
$sourceips = get_possible_traffic_source_addresses(true);
- foreach ($sourceips as $sipvalue => $sipname)
- $list[$sipname[value]] = $sipname[name];
+ foreach ($sourceips as $sipvalue => $sipname) {
+ $list[$sipvalue] = $sipname;
+ }
return($list);
}
@@ -112,30 +113,27 @@ if ($_POST || $_REQUEST['host']) {
$input_errors[] = gettext("When using IPv6, the target host must be an IPv6 address or hostname.");
}
- if (!$input_errors)
+ if (!$input_errors) {
$host = $_REQUEST['host'];
+ }
$sourceip = $_REQUEST['sourceip'];
- $do_traceroute = true;
$ttl = $_REQUEST['ttl'];
$resolve = $_REQUEST['resolve'];
$useicmp = $_REQUEST['useicmp'];
+ if ($_POST) {
+ $do_traceroute = true;
+ }
+
} else {
$resolve = false;
$useicmp = false;
}
-if (!isset($do_traceroute)) {
- $do_traceroute = false;
- $host = '';
- $ttl = DEFAULT_TTL;
-}
-
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form('Traceroute');
@@ -152,14 +150,14 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Select(
'ipproto',
'IP Protocol',
- $pconfig['protocol'],
+ $pconfig['ipproto'],
array('ipv4' => 'IPv4', 'ipv6' => 'IPv6')
))->setHelp('Select the protocol to use');
$section->addInput(new Form_Select(
'sourceip',
'Source Address',
- $pconfig['source'],
+ $pconfig['sourceip'],
create_sourceaddresslist()
))->setHelp('Select source address for the trace');
@@ -211,10 +209,11 @@ if (!$input_errors && $do_traceroute) {
<div class="panel-heading"><h2 class="panel-title">Results</h2></div>
<div class="panel-body">
<?php
- if ($result = shell_exec($cmd))
+ if ($result = shell_exec($cmd)) {
print(nl2br($result));
- else
+ } else {
print('Error: ' . $host . ' ' . gettext("could not be traced/resolved"));
+ }
?>
</div>
</div>
diff --git a/src/usr/local/www/easyrule.php b/src/usr/local/www/easyrule.php
index 9f58af0..0c28335 100644
--- a/src/usr/local/www/easyrule.php
+++ b/src/usr/local/www/easyrule.php
@@ -3,12 +3,11 @@
easyrule.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2009-2010 Jim Pingle (jpingle@gmail.com)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Originally Sponsored By Anathematic @ pfSense Forums
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,13 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: filter
-*/
##|+PRIV
##|*IDENT=page-firewall-easyrule
-##|*NAME=Firewall: Easy Rule add/status page
+##|*NAME=Firewall: Easy Rule add/status
##|*DESCR=Allow access to the 'Firewall: Easy Rule' add/status page.
##|*MATCH=easyrule.php*
##|-PRIV
@@ -92,14 +88,18 @@ if (stristr($retval, "error") == true) {
}
include("head.inc"); ?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
-<?php include("fbegin.inc"); ?>
+
+include("fbegin.inc");
+?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
-<?php if ($input_errors) print_input_errors($input_errors); ?>
+<?php
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
-<?php if ($message) { ?>
+if ($message) { ?>
<br />
<?=gettext("Message"); ?>: <?php echo $message; ?>
<br />
@@ -107,9 +107,9 @@ include("head.inc"); ?>
<?=gettext("This is the Easy Rule status page, mainly used to display errors when adding rules. " .
"If you are seeing this, there apparently was not an error, and you navigated to the " .
"page directly without telling it what to do"); ?>.<br /><br />
-<?=gettext("This page is meant to be called from the block/pass buttons on the Firewall Logs page"); ?>, <a href="diag_logs_filter.php"><?=gettext("Status"); ?> &gt; <?=gettext("System Logs, " .
+<?=gettext("This page is meant to be called from the block/pass buttons on the Firewall Logs page"); ?>, <a href="status_logs_filter.php"><?=gettext("Status"); ?> &gt; <?=gettext("System Logs, " .
"Firewall Tab"); ?></a>.
<br />
<?php } ?>
</td></tr></table>
-<?php include("fend.inc"); ?>
+<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/edit.php b/src/usr/local/www/edit.php
index 816daf2..ada73d1 100644
--- a/src/usr/local/www/edit.php
+++ b/src/usr/local/www/edit.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -36,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -53,13 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: shell
-*/
##|+PRIV
##|*IDENT=page-diagnostics-edit
-##|*NAME=Diagnostics: Edit FIle
+##|*NAME=Diagnostics: Edit File
##|*DESCR=Allow access to the 'Diagnostics: Edit File' page.
##|*MATCH=edit.php*
##|*MATCH=browser.php*
@@ -139,7 +135,7 @@ require("head.inc");
<div style="background:#eeeeee;" id="fileOutput">
<script type="text/javascript">
//<![CDATA[
- window.onload=function(){
+ window.onload=function() {
document.getElementById("fileContent").wrap='off';
}
//]]>
@@ -150,7 +146,8 @@ require("head.inc");
</div>
</div>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function loadFile() {
jQuery("#fileStatus").html("");
jQuery("#fileStatusBox").show(500);
@@ -173,8 +170,7 @@ require("head.inc");
var fileContent = window.atob(values.join("|"));
jQuery("#fileContent").val(fileContent);
- }
- else {
+ } else {
jQuery("#fileStatus").html(values[0]);
jQuery("#fileContent").val("");
}
@@ -296,12 +292,10 @@ var Base64 = {
if (c < 128) {
utftext += String.fromCharCode(c);
- }
- else if((c > 127) && (c < 2048)) {
+ } else if ((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
- }
- else {
+ } else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
@@ -318,20 +312,18 @@ var Base64 = {
var i = 0;
var c = c1 = c2 = 0;
- while ( i < utftext.length ) {
+ while (i < utftext.length) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
- }
- else if((c > 191) && (c < 224)) {
+ } else if ((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
- }
- else {
+ } else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
@@ -351,8 +343,9 @@ var Base64 = {
loadFile();
});
<?php endif; ?>
+//]]>
</script>
<?php include("foot.inc");
-outputJavaScriptFileInline("filebrowser/browser.js"); \ No newline at end of file
+outputJavaScriptFileInline("filebrowser/browser.js");
diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php
index de5decb..44a2136 100644
--- a/src/usr/local/www/exec.php
+++ b/src/usr/local/www/exec.php
@@ -1,14 +1,17 @@
<?php
-/* $Id$ */
/*
exec.php
*/
/* ====================================================================
- * Exec+ v1.02-000 - Copyright 2001-2003, All rights reserved
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Exec+ v1.02-000 - Copyright 2001-2003, All rights reserved
* Created by technologEase (http://www.technologEase.com)
* (modified for m0n0wall by Manuel Kasper <mk@neon1.net>)\
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -39,7 +42,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,13 +59,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: shell
-*/
##|+PRIV
##|*IDENT=page-diagnostics-command
-##|*NAME=Diagnostics: Command page
+##|*NAME=Diagnostics: Command
##|*DESCR=Allow access to the 'Diagnostics: Command' page.
##|*MATCH=exec.php*
##|-PRIV
@@ -71,7 +71,7 @@ $allowautocomplete = true;
require("guiconfig.inc");
-if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) {
+if (($_POST['submit'] == "DOWNLOAD") && file_exists($_POST['dlPath'])) {
session_cache_limiter('public');
$fd = fopen($_POST['dlPath'], "rb");
header("Content-Type: application/octet-stream");
@@ -88,7 +88,7 @@ if (($_POST['submit'] == "Download") && file_exists($_POST['dlPath'])) {
fpassthru($fd);
exit;
-} else if (($_POST['submit'] == "Upload") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
+} else if (($_POST['submit'] == "UPLOAD") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tmp/" . $_FILES['ulfile']['name']);
$ulmsg = "Uploaded file to /tmp/" . htmlentities($_FILES['ulfile']['name']);
unset($_POST['txtCommand']);
@@ -122,11 +122,11 @@ $ScriptName = $REQUEST['SCRIPT_NAME'];
$arrDT = localtime();
$intYear = $arrDT[5] + 1900;
-$closehead = false;
$pgtitle = array(gettext("Diagnostics"), gettext("Execute command"));
include("head.inc");
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
// Create recall buffer array (of encoded strings).
<?php
@@ -217,23 +217,27 @@ if (isBlank($_POST['txtRecallBuffer'])) {
</script>
<?php
-if (isBlank($_POST['txtCommand']) && isBlank($_POST['txtPHPCommand']) && isBlank($ulmsg))
+if (isBlank($_POST['txtCommand']) && isBlank($_POST['txtPHPCommand']) && isBlank($ulmsg)) {
print('<div class="alert alert-warning" role="alert">'.gettext("The capabilities offered here can be dangerous. No support is available. Use them at your own risk!").'</div>');
+}
if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-success responsive">
<div class="panel-heading"><h2 class="panel-title">Shell Output - <?=htmlspecialchars($_POST['txtCommand'])?></h2></div>
<div class="panel-body">
- <pre>
+ <div class="content">
+ <pre>
<?php
putenv("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin");
putenv("SCRIPT_FILENAME=" . strtok($_POST['txtCommand'], " "));
$output = array();
exec($_POST['txtCommand'] . ' 2>&1', $output);
- foreach($output as $line)
+ foreach ($output as $line) {
print(htmlspecialchars($line) . "\r\n");
-?></pre>
-
+ }
+?>
+ </pre>
+ </div>
</div>
</div>
<? endif ?>
@@ -242,56 +246,91 @@ if (!isBlank($_POST['txtCommand'])):?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Execute Shell Command')?></h2></div>
<div class="panel-body">
- <input id="txtCommand" name="txtCommand" placeholder="Command" type="text" class="col-sm-4" value="<?=htmlspecialchars($_POST['txtCommand'])?>" />
- <br /><br />
- <input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>" />
- <input type="button" class="btn btn-default btn-sm" name="btnRecallPrev" value="<" onclick="btnRecall_onClick( this.form, -1 );" />
- <input type="submit" class="btn btn-default btn-sm" value="<?=gettext("Execute"); ?>" />
- <input type="button" class="btn btn-default btn-sm" name="btnRecallNext" value=">" onclick="btnRecall_onClick( this.form, 1 );" />
- <input type="button" class="btn btn-default btn-sm" value="<?=gettext("Clear"); ?>" onclick="return Reset_onClick( this.form );" />
+ <div class="content">
+ <input id="txtCommand" name="txtCommand" placeholder="Command" type="text" class="col-sm-4" value="<?=htmlspecialchars($_POST['txtCommand'])?>" />
+ <br /><br />
+ <input type="hidden" name="txtRecallBuffer" value="<?=htmlspecialchars($_POST['txtRecallBuffer']) ?>" />
+ <input type="button" class="btn btn-default btn-sm" name="btnRecallPrev" value="<" onclick="btnRecall_onClick( this.form, -1 );" />
+ <button type="submit" class="btn btn-default btn-sm" value="EXEC"><?=gettext("Execute"); ?></button>
+ <input type="button" class="btn btn-default btn-sm" name="btnRecallNext" value=">" onclick="btnRecall_onClick( this.form, 1 );" />
+ <input type="button" class="btn btn-default btn-sm" value="<?=gettext("Clear"); ?>" onclick="return Reset_onClick( this.form );" />
+ </div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Download file')?></h2></div>
<div class="panel-body">
- <input name="dlPath" type="text" id="dlPath" placeholder="File to download" class="col-sm-4" value="<?php echo htmlspecialchars($_GET['dlPath']) ?>"/>
- <br /><br />
- <input name="submit" type="submit" class="btn btn-default btn-sm" id="download" value="<?=gettext("Download"); ?>" />
+ <div class="content">
+ <input name="dlPath" type="text" id="dlPath" placeholder="File to download" class="col-sm-4" value="<?php echo htmlspecialchars($_GET['dlPath']) ?>"/>
+ <br /><br />
+ <button name="submit" type="submit" class="btn btn-default btn-sm" id="download" value="DOWNLOAD"><?=gettext("Download")?></button>
+ </div>
</div>
</div>
<?php
- if ($ulmsg)
+ if ($ulmsg) {
print('<div class="alert alert-success" role="alert">' . $ulmsg .'</div>');
+ }
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('Upload a file')?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('Upload file')?></h2></div>
<div class="panel-body">
- <input name="ulfile" type="file" class="btn btn-default btn-sm btn-file" id="ulfile" />
- <br />
- <input name="submit" type="submit" class="btn btn-default btn-sm pull-left" id="upload" value="<?=gettext("Upload"); ?>" />
-
+ <div class="content">
+ <input name="ulfile" type="file" class="btn btn-default btn-sm btn-file" id="ulfile" />
+ <br />
+ <button name="submit" type="submit" class="btn btn-default btn-sm" id="upload" value="UPLOAD"><?=gettext("Upload")?></button>
+ </div>
</div>
</div>
<?php
+ // Experimental version. Writes the user's php code to a file and executes it via a new instance of PHP
+ // This is intended to prevent bad code from breaking the GUI
if (!isBlank($_POST['txtPHPCommand'])) {
puts("<div class=\"panel panel-success responsive\"><div class=\"panel-heading\">PHP response</div>");
puts("<pre>");
- require_once("config.inc");
- require_once("functions.inc");
- echo eval($_POST['txtPHPCommand']);
+ $tmpname = tempnam("/tmp", "");
+ $phpfile = fopen($tmpname, "w");
+ fwrite($phpfile, "<?php\n");
+ fwrite($phpfile, "require_once(\"/etc/inc/config.inc\");\n");
+ fwrite($phpfile, "require_once(\"/etc/inc/functions.inc\");\n\n");
+ fwrite($phpfile, $_POST['txtPHPCommand'] . "\n");
+ fwrite($phpfile, "?>\n");
+ fclose($phpfile);
+
+ exec("/usr/local/bin/php " . $tmpname, $output);
+
+ for ($i=0; $i < count($output); $i++) {
+ print($output[$i] . "\n");
+ }
+
+ unlink($tmpname);
+
+// echo eval($_POST['txtPHPCommand']);
puts("&nbsp;</pre>");
puts("</div>");
+?>
+<script type="text/javascript">
+//<![CDATA[
+ events.push(function() {
+ // Scroll to the bottom of the page to more easily see the results of a PHP exec command
+ $("html, body").animate({ scrollTop: $(document).height() }, 1000);
+ });
+//]]>
+</script>
+<?php
}
?>
<div class="panel panel-default responsive">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Execute PHP Commands')?></h2></div>
<div class="panel-body">
- <textarea id="txtPHPCommand" placeholder="Command" name="txtPHPCommand" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand'])?></textarea>
- <br />
- <input type="submit" class="btn btn-default btn-sm" value="<?=gettext("Execute")?>" />
- <?=gettext("Example"); ?>: <code>print("Hello World!");</code>
+ <div class="content">
+ <textarea id="txtPHPCommand" placeholder="Command" name="txtPHPCommand" rows="9" cols="80"><?=htmlspecialchars($_POST['txtPHPCommand'])?></textarea>
+ <br />
+ <input type="submit" class="btn btn-default btn-sm" value="<?=gettext("Execute")?>" />
+ <?=gettext("Example"); ?>: <code>print("Hello World!");</code>
+ </div>
</div>
</div>
</form>
@@ -299,5 +338,6 @@ if (!isBlank($_POST['txtCommand'])):?>
<?php
include("foot.inc");
-if($_POST)
+if ($_POST) {
conf_mount_ro();
+}
diff --git a/src/usr/local/www/fbegin.inc b/src/usr/local/www/fbegin.inc
index 20a0066..652132d 100644
--- a/src/usr/local/www/fbegin.inc
+++ b/src/usr/local/www/fbegin.inc
@@ -1,2 +1,2 @@
<!-- temporary until migration to bootstrap has completed -->
-<div style="background-color: gray;"> \ No newline at end of file
+<div style="background-color: gray;">
diff --git a/src/usr/local/www/filebrowser/browser.js b/src/usr/local/www/filebrowser/browser.js
index 2769db3..54e07ee 100644
--- a/src/usr/local/www/filebrowser/browser.js
+++ b/src/usr/local/www/filebrowser/browser.js
@@ -1,7 +1,3 @@
-/*
- pfSense_MODULE: shell
-*/
-
jQuery(document).ready(
function() {
jQuery("#fbOpen").click(
diff --git a/src/usr/local/www/filebrowser/browser.php b/src/usr/local/www/filebrowser/browser.php
index 8ab05db..fcbed78 100644
--- a/src/usr/local/www/filebrowser/browser.php
+++ b/src/usr/local/www/filebrowser/browser.php
@@ -3,7 +3,6 @@
require_once("guiconfig.inc");
/*
- pfSense_MODULE: shell
Copyright (C) 2013-2015 Electric Sheep Fencing, LP
*/
diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php
index 89fe0e7..2733a7a 100644
--- a/src/usr/local/www/firewall_aliases.php
+++ b/src/usr/local/www/firewall_aliases.php
@@ -1,14 +1,15 @@
<?php
-/* $Id$ */
/*
firewall_aliases.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: aliases
-*/
##|+PRIV
##|*IDENT=page-firewall-aliases
-##|*NAME=Firewall: Aliases page
+##|*NAME=Firewall: Aliases
##|*DESCR=Allow access to the 'Firewall: Aliases' page.
##|*MATCH=firewall_aliases.php*
##|-PRIV
@@ -183,25 +181,40 @@ function find_alias_reference($section, $field, $origname, &$is_alias_referenced
}
}
-$pgtitle = array(gettext("Firewall"), gettext("Aliases"));
+$tab_array = array();
+$tab_array[] = array(gettext("IP"), ($tab == "ip" ? true : ($tab == "host" ? true : ($tab == "network" ? true : false))), "/firewall_aliases.php?tab=ip");
+$tab_array[] = array(gettext("Ports"), ($tab == "port"? true : false), "/firewall_aliases.php?tab=port");
+$tab_array[] = array(gettext("URLs"), ($tab == "url"? true : false), "/firewall_aliases.php?tab=url");
+$tab_array[] = array(gettext("All"), ($tab == "all"? true : false), "/firewall_aliases.php?tab=all");
+
+foreach ($tab_array as $dtab) {
+ if ($dtab[1] == true) {
+ $bctab = $dtab[0];
+ break;
+ }
+}
+
+$pgtitle = array(gettext("Firewall"), gettext("Aliases"), $bctab);
$shortcut_section = "aliases";
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('aliases'))
+if (is_subsystem_dirty('aliases')) {
print_info_box_np(gettext("The alias list has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
-$tab_array = array();
-$tab_array[] = array(gettext("IP"), ($tab == "ip" ? true : ($tab == "host" ? true : ($tab == "network" ? true : false))), "/firewall_aliases.php?tab=ip");
-$tab_array[] = array(gettext("Ports"), ($tab == "port"? true : false), "/firewall_aliases.php?tab=port");
-$tab_array[] = array(gettext("URLs"), ($tab == "url"? true : false), "/firewall_aliases.php?tab=url");
-$tab_array[] = array(gettext("All"), ($tab == "all"? true : false), "/firewall_aliases.php?tab=all");
display_top_tabs($tab_array);
?>
+
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title">Firewall Aliases <?=$bctab?></h2></div>
+ <div class="panel-body">
+
<div class="table-responsive">
<table class="table table-striped table-hover">
<thead>
@@ -209,6 +222,7 @@ display_top_tabs($tab_array);
<th><?=gettext("Name")?></th>
<th><?=gettext("Values")?></th>
<th><?=gettext("Description")?></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
@@ -223,25 +237,28 @@ display_top_tabs($tab_array);
case "ip":
case "host":
case "network":
- if (preg_match("/(host|network)/", $alias["type"]))
+ if (preg_match("/(host|network)/", $alias["type"])) {
$show_alias= true;
+ }
break;
case "url":
- if (preg_match("/(url)/i", $alias["type"]))
+ if (preg_match("/(url)/i", $alias["type"])) {
$show_alias= true;
+ }
break;
case "port":
- if ($alias["type"] == "port")
+ if ($alias["type"] == "port") {
$show_alias= true;
+ }
break;
}
if ($show_alias):
?>
<tr>
- <td>
+ <td ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($alias['name'])?>
</td>
- <td>
+ <td ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
<?php
if ($alias["url"]) {
echo $alias["url"] . "<br />";
@@ -263,34 +280,44 @@ display_top_tabs($tab_array);
}
?>
</td>
- <td>
+ <td ondblclick="document.location='firewall_aliases_edit.php?id=<?=$i;?>';">
<?=htmlspecialchars($alias['descr'])?>&nbsp;
</td>
<td>
- <a href="firewall_aliases_edit.php?id=<?=$i?>" class="btn btn-xs btn-primary">edit</a>
- <a href="?act=del&amp;tab=<?=$tab?>&amp;id=<?=$i?>" class="btn btn-xs btn-danger">delete</a>
- </td>
- </tr>
+ <a class="fa fa-pencil" title="<?=gettext("Edit alias"); ?>" href="firewall_aliases_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete alias")?>" href="?act=del&amp;tab=<?=$tab?>&amp;id=<?=$i?>"></a>
+ </td>
+ </tr>
<?php endif?>
<?php endforeach?>
</tbody>
</table>
</div>
+ </div><!-- panel body -->
+</div><!-- panel default -->
+
<nav class="action-buttons">
- <a href="firewall_aliases_edit.php?tab=<?=$tab?>" role="button" class="btn btn-success">
- <?=gettext("add new alias");?>
+ <a href="firewall_aliases_edit.php?tab=<?=$tab?>" role="button" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add");?>
</a>
- <a href="firewall_aliases_import.php" role="button" class="btn btn-default">
- <?=gettext("bulk import");?>
+ <a href="firewall_aliases_import.php" role="button" class="btn btn-default btn-sm">
+ <i class="fa fa-download icon-embed-btn"></i>
+ <?=gettext("Import");?>
</a>
</nav>
-<?php
-
-print_info_box(gettext('Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number ' .
- 'of changes that have to be made if a host, network or port changes.' . '<br />' .
- 'You can enter the name of an alias instead of the host, network or port where indicated. The alias will be resolved according to the list above.' . '<br />' .
- 'If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.'));
+<!-- Information section. Icon ID must be "showinfo" and the information <div> ID must be "infoblock".
+ That way jQuery (in pfenseHelpers.js) will automatically take care of the display. -->
+<div>
+ <div id="infoblock">
+ <?=print_info_box(gettext('Aliases act as placeholders for real hosts, networks or ports. They can be used to minimize the number ' .
+ 'of changes that have to be made if a host, network or port changes. <br />' .
+ 'You can enter the name of an alias instead of the host, network or port where indicated. The alias will be resolved according to the list above.' . '<br />' .
+ 'If an alias cannot be resolved (e.g. because you deleted it), the corresponding element (e.g. filter/NAT/shaper rule) will be considered invalid and skipped.'), info)?>
+ </div>
+</div>
-include("foot.inc"); \ No newline at end of file
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_aliases_edit.php b/src/usr/local/www/firewall_aliases_edit.php
index 147b37c..6a23610 100755
--- a/src/usr/local/www/firewall_aliases_edit.php
+++ b/src/usr/local/www/firewall_aliases_edit.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_aliases_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2009 Ermal Luçi
- * Copyright (c) 2010 Jim Pingle
- * originally part of m0n0wall (http://m0n0.ch/wall)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -40,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -57,14 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm /bin/mkdir /usr/bin/fetch
- pfSense_MODULE: aliases
-*/
##|+PRIV
##|*IDENT=page-firewall-alias-edit
-##|*NAME=Firewall: Alias: Edit page
+##|*NAME=Firewall: Alias: Edit
##|*DESCR=Allow access to the 'Firewall: Alias: Edit' page.
##|*MATCH=firewall_aliases_edit.php*
##|-PRIV
@@ -118,7 +112,7 @@ function alias_same_type($name, $type) {
foreach ($config['aliases']['alias'] as $alias) {
if ($name == $alias['name']) {
if (in_array($type, array("host", "network")) &&
- in_array($alias['type'], array("host", "network"))) {
+ in_array($alias['type'], array("host", "network"))) {
return true;
}
@@ -428,7 +422,7 @@ if ($_POST) {
if (!alias_same_type($input_address, $_POST['type'])) {
// But alias type network can include alias type urltable. Feature#1603.
if (!($_POST['type'] == 'network' &&
- preg_match("/urltable/i", alias_get_type($input_address)))) {
+ preg_match("/urltable/i", alias_get_type($input_address)))) {
$wrongaliases .= " " . $input_address;
}
}
@@ -438,7 +432,7 @@ if ($_POST) {
}
} else if ($_POST['type'] == "host" || $_POST['type'] == "network") {
if (is_subnet($input_address) ||
- (!is_ipaddr($input_address) && !is_hostname($input_address))) {
+ (!is_ipaddr($input_address) && !is_hostname($input_address))) {
$input_errors[] = sprintf(gettext('%1$s is not a valid %2$s address, FQDN or alias.'), $input_address, $_POST['type']);
}
}
@@ -608,18 +602,19 @@ $types = array(
);
if (empty($tab)) {
- if (preg_match("/url/i", $pconfig['type']))
+ if (preg_match("/url/i", $pconfig['type'])) {
$tab = 'url';
- else if ($pconfig['type'] == 'host')
+ } else if ($pconfig['type'] == 'host') {
$tab = 'ip';
- else
+ } else {
$tab = $pconfig['type'];
+ }
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require('classes/Form.class.php');
$form = new Form;
$form->addGlobal(new Form_Input(
@@ -630,21 +625,13 @@ $form->addGlobal(new Form_Input(
));
$form->addGlobal(new Form_Input(
- 'tab',
- null,
- 'hidden',
- $tab
-));
-
-$form->addGlobal(new Form_Input(
'origname',
null,
'hidden',
$pconfig['name']
));
-if (isset($id) && $a_aliases[$id])
-{
+if (isset($id) && $a_aliases[$id]) {
$form->addGlobal(new Form_Input(
'id',
null,
@@ -740,13 +727,20 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+addressarray = <?= json_encode(array_exclude($pconfig['name'], get_alias_list($pconfig['type']))) ?>;
+
+events.push(function() {
+
+ var disable_subnets;
function typechange() {
var tab = $('#type').find('option:selected').val();
- $("[id^='address_subnet']").prop("disabled", (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports'));
+
+ disable_subnets = (tab == 'host') || (tab == 'port') || (tab == 'url') || (tab == 'url_ports');
+
+ $("[id^='address_subnet']").prop("disabled", disable_subnets);
// Set the help text to match the tab
var helparray = <?php echo json_encode($help); ?>;
@@ -763,8 +757,11 @@ events.push(function(){
var labelstr = <?php echo json_encode($label_str); ?>;
$('.repeatable:first').find('label').text(labelstr[tab]);
+ // Hide and disable rows other than the first
+ hideRowsAfter(1, (tab == 'urltable') || (tab == 'urltable_ports'));
+
// The add button and delete buttons must not show on URL Table IP or URL table ports
- if((tab == 'urltable') || (tab == 'urltable_ports')) {
+ if ((tab == 'urltable') || (tab == 'urltable_ports')) {
hideClass('addbtn', true);
$('[id^=deleterow]').hide();
} else {
@@ -773,14 +770,46 @@ events.push(function(){
}
}
+ // Hide and disable all rows >= that specified
+ function hideRowsAfter(row, hide) {
+ var idx = 0;
+
+ $('.repeatable').each(function(el) {
+ if (idx >= row) {
+ hideRow(idx, hide);
+ }
+
+ idx++;
+ });
+ }
+
+ function hideRow(row, hide) {
+ if (hide) {
+ $('#deleterow' + row).parent('div').parent().addClass('hidden');
+ } else {
+ $('#deleterow' + row).parent('div').parent().removeClass('hidden');
+ }
+
+ // We need to disable the elements so they are not submitted in the POST
+ $('#address' + row).prop("disabled", hide);
+ $('#address_subnet' + row).prop("disabled", hide || disable_subnets);
+ $('#detail' + row).prop("disabled", hide);
+ $('#deleterow' + row).prop("disabled", hide);
+ }
+
// On load . .
typechange();
- // Autocomplete
- var addressarray = <?= json_encode(array_exclude($pconfig['name'], get_alias_list($pconfig['type']))) ?>;
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
- $('[id^=address]').autocomplete({
- source: addressarray
+ // Autocomplete
+ $('[id^=address]').each(function() {
+ if (this.id.substring(0, 8) != "address_") {
+ $(this).autocomplete({
+ source: addressarray
+ });
+ }
});
// on click . .
diff --git a/src/usr/local/www/firewall_aliases_import.php b/src/usr/local/www/firewall_aliases_import.php
index 57378d8..7260412 100755
--- a/src/usr/local/www/firewall_aliases_import.php
+++ b/src/usr/local/www/firewall_aliases_import.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_aliases_import.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,13 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: filter
-*/
##|+PRIV
##|*IDENT=page-firewall-alias-import
-##|*NAME=Firewall: Alias: Import page
+##|*NAME=Firewall: Alias: Import
##|*DESCR=Allow access to the 'Firewall: Alias: Import' page.
##|*MATCH=firewall_aliases_import.php*
##|-PRIV
@@ -193,10 +188,10 @@ if ($_POST['aliasimport'] != "") {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Alias details');
@@ -231,4 +226,4 @@ $section->addInput(new Form_Textarea(
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_nat.php b/src/usr/local/www/firewall_nat.php
index 2545072..b867ee2 100644
--- a/src/usr/local/www/firewall_nat.php
+++ b/src/usr/local/www/firewall_nat.php
@@ -1,13 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_nat.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * originally part of m0n0wall (http://m0n0.ch/wall)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -39,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-portforward
-##|*NAME=Firewall: NAT: Port Forward page
+##|*NAME=Firewall: NAT: Port Forward
##|*DESCR=Allow access to the 'Firewall: NAT: Port Forward' page.
##|*MATCH=firewall_nat.php*
##|-PRIV
@@ -80,18 +76,20 @@ if (!is_array($config['nat']['rule'])) {
$a_nat = &$config['nat']['rule'];
/* update rule order, POST[rule] is an array of ordered IDs */
-if($_POST['order-store']) {
+if (array_key_exists('order-store', $_POST)) {
if (is_array($_POST['rule']) && !empty($_POST['rule'])) {
$a_nat_new = array();
// if a rule is not in POST[rule], it has been deleted by the user
- foreach ($_POST['rule'] as $id)
+ foreach ($_POST['rule'] as $id) {
$a_nat_new[] = $a_nat[$id];
+ }
$a_nat = $a_nat_new;
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('filter');
+ }
header("Location: firewall_nat.php");
exit;
@@ -168,16 +166,17 @@ if (isset($_POST['del_x'])) {
}
}
-$closehead = false;
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Port Forward"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('natconf'))
+if (is_subsystem_dirty('natconf')) {
print_info_box_np(gettext('The NAT configuration has been changed.') . '<br />' .
gettext('You must apply the changes in order for them to take effect.') . '<br />');
+}
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), true, "firewall_nat.php");
@@ -223,8 +222,9 @@ foreach ($a_nat as $natent):
);
/* if user does not have access to edit an interface skip on to the next record */
- if (!have_natpfruleint_access($natent['interface']))
+ if (!have_natpfruleint_access($natent['interface'])) {
continue;
+ }
?>
<tr id="fr<?=$nnats;?>" onClick="fr_toggle(<?=$nnats;?>)" ondblclick="document.location='firewall_nat_edit.php?id=<?=$i;?>';">
@@ -235,11 +235,11 @@ foreach ($a_nat as $natent):
<?php
if ($natent['associated-rule-id'] == "pass"):
?>
- <i class="icon-play" title="<?=gettext("All traffic matching this NAT entry is passed")?>"></i>
+ <i class="fa fa-play" title="<?=gettext("All traffic matching this NAT entry is passed")?>"></i>
<?php
elseif (!empty($natent['associated-rule-id'])):
?>
- <i class="icon-random" title="<?=gettext("Firewall rule ID ")?><?=htmlspecialchars($nnatid)?> . <?=gettext('is managed by this rule')?>"></i>
+ <i class="fa fa-random" title="<?=gettext("Firewall rule ID ")?><?=htmlspecialchars($natent['associated-rule-id'])?> . <?=gettext('is managed by this rule')?>"></i>
<?php
endif;
?>
@@ -247,10 +247,11 @@ foreach ($a_nat as $natent):
<td>
<?=$textss?>
<?php
- if (!$natent['interface'])
+ if (!$natent['interface']) {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan"));
- else
+ } else {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface']));
+ }
?>
<?=$textse?>
</td>
@@ -273,7 +274,7 @@ foreach ($a_nat as $natent):
<?php
if (isset($alias['src'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
?>
@@ -290,7 +291,7 @@ foreach ($a_nat as $natent):
<?php
if (isset($alias['srcport'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
?>
@@ -308,7 +309,7 @@ foreach ($a_nat as $natent):
<?php
if (isset($alias['dst'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
?>
@@ -325,7 +326,7 @@ foreach ($a_nat as $natent):
<?php
if (isset($alias['dstport'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
?>
@@ -352,9 +353,9 @@ foreach ($a_nat as $natent):
<?=htmlspecialchars($natent['descr'])?>
</td>
<td>
- <a class="btn btn-xs btn-info" title="<?=gettext("Edit rule"); ?>" href="firewall_nat_edit.php?id=<?=$i?>"><?=gettext("Edit"); ?></a>
- <a class="btn btn-xs btn-danger" title="<?=gettext("Delete rule")?>" href="firewall_nat.php?act=del&amp;id=<?=$i?>"><?=gettext("Del")?></a>
- <a class="btn btn-xs btn-success" title="<?=gettext("Add a new NAT based on this one")?>" href="firewall_nat_edit.php?dup=<?=$i?>"><?=gettext("Clone")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit rule"); ?>" href="firewall_nat_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-clone" title="<?=gettext("Add a new NAT based on this one")?>" href="firewall_nat_edit.php?dup=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete rule")?>" href="firewall_nat.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -367,41 +368,31 @@ endforeach;
</div>
</div>
- <div class="pull-right">
- <a href="firewall_nat_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add new rule')?>"><?=gettext('Add new rule')?></a>
- <input name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected rules"); ?>" />
- <input type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" value="<?=gettext("Save changes")?>" disabled="disabled" />
- </div>
+ <nav class="action-buttons">
+ <a href="firewall_nat_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add rule to the top of the list')?>">
+ <i class="fa fa-level-up icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+ <a href="firewall_nat_edit.php" class="btn btn-sm btn-success" title="<?=gettext('Add rule to the end of the list')?>">
+ <i class="fa fa-level-down icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+ <button name="del_x" type="submit" class="btn btn-danger btn-sm" title="<?=gettext('Delete selected rules')?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete"); ?>
+ </button>
+ <button type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" disabled title="<?=gettext('Save rule order')?>">
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
+ </nav>
</form>
-<script>
-function fr_toggle(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var checkbox = document.getElementById(prefix + 'c' + id);
- checkbox.checked = !checkbox.checked;
- fr_bgcolor(id, prefix);
-}
-
-function fr_bgcolor(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var row = document.getElementById(prefix + id);
- var checkbox = document.getElementById(prefix + 'c' + id);
- var cells = row.getElementsByTagName('td');
- var cellcnt = cells.length;
-
- for (i = 0; i < cellcnt-1; i++) {
- cells[i].style.backgroundColor = checkbox.checked ? "#DDF4FF" : "#FFFFFF";
- }
-}
-</script>
-
-<script>
+<script type="text/javascript">
+//<![CDATA[
events.push(function() {
- // Make rules draggable/sortable
+
+ // Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
update: function(event, ui) {
@@ -414,6 +405,7 @@ events.push(function() {
$('[id^=frc]').prop('checked', true);
});
});
+//]]>
</script>
<?php
@@ -423,12 +415,12 @@ if (count($a_nat) > 0) {
<div>
<dl class="dl-horizontal responsive">
<dt><?=gettext('Legend')?></dt> <dd></dd>
- <dt><i class="icon icon-play"></i></dt> <dd><?=gettext('Pass')?></dd>
- <dt><i class="icon icon-random"></i></dt> <dd><?=gettext('Linked rule')?></dd>
+ <dt><i class="fa fa-play"></i></dt> <dd><?=gettext('Pass')?></dd>
+ <dt><i class="fa fa-random"></i></dt> <dd><?=gettext('Linked rule')?></dd>
</dl>
</div>
<?php
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_nat_1to1.php b/src/usr/local/www/firewall_nat_1to1.php
index e59af92..a9dded2 100644
--- a/src/usr/local/www/firewall_nat_1to1.php
+++ b/src/usr/local/www/firewall_nat_1to1.php
@@ -1,12 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_nat_1to1.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * part of m0n0wall (http://m0n0.ch/wall)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -38,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-1-1
-##|*NAME=Firewall: NAT: 1:1 page
+##|*NAME=Firewall: NAT: 1:1
##|*DESCR=Allow access to the 'Firewall: NAT: 1:1' page.
##|*MATCH=firewall_nat_1to1.php*
##|-PRIV
@@ -78,18 +75,20 @@ if (!is_array($config['nat']['onetoone'])) {
$a_1to1 = &$config['nat']['onetoone'];
/* update rule order, POST[rule] is an array of ordered IDs */
-if($_POST['order-store']) {
+if ($_POST['order-store']) {
if (is_array($_POST['rule']) && !empty($_POST['rule'])) {
$a_1to1_new = array();
// if a rule is not in POST[rule], it has been deleted by the user
- foreach ($_POST['rule'] as $id)
+ foreach ($_POST['rule'] as $id) {
$a_1to1_new[] = $a_1to1[$id];
+ }
$a_1to1 = $a_1to1_new;
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('natconf');
+ }
header("Location: firewall_nat_1to1.php");
exit;
@@ -156,12 +155,14 @@ if (isset($_POST['del_x'])) {
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("1:1"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('natconf'))
+if (is_subsystem_dirty('natconf')) {
print_info_box_np(gettext('The NAT configuration has been changed.') . '<br />' .
gettext('You must apply the changes in order for them to take effect.') . '<br />');
+}
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
@@ -207,7 +208,7 @@ display_top_tabs($tab_array);
<td>
<a href="?act=toggle&amp;id=<?=$i?>">
- <i class="<?= ($iconfn == "pass") ? "icon-ok":"icon-remove"?>" title="<?=gettext("click to toggle enabled/disabled status")?>"></i>
+ <i class="<?= ($iconfn == "pass") ? "fa-check":"fa-times"?>" title="<?=gettext("click to toggle enabled/disabled status")?>"></i>
</a>
</td>
<td>
@@ -245,9 +246,9 @@ display_top_tabs($tab_array);
</td>
<td>
- <a class="btn btn-xs btn-info" title="<?=gettext("Edit rule")?>" href="firewall_nat_1to1.php?id=<?=$i?>"><?=gettext("Edit")?></a>
- <a class="btn btn-xs btn-danger" title="<?=gettext("Delete rule")?>" href="firewall_nat_1to1.php?act=del&amp;id=<?=$i?>"><?=gettext("Del")?></a>
- <a class="btn btn-xs btn-success" title="<?=gettext("Add a new rule based on this one")?>" href="firewall_nat_1to1_edit.php?dup=<?=$i?>"><?=gettext("Clone")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit rule")?>" href="firewall_nat_1to1_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-clone" title="<?=gettext("Add a new rule based on this one")?>" href="firewall_nat_1to1_edit.php?dup=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete rule")?>" href="firewall_nat_1to1.php?act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Are you sure you want to delete this rule?")?>')"></a>
</td>
</tr>
@@ -261,52 +262,36 @@ display_top_tabs($tab_array);
</div>
<nav class="action-buttons">
- <a href="firewall_nat_1to1_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add new mapping')?>"><?=gettext('Add new mapping')?></a>
- <input name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected rule"); ?>" />
- <input type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" value="store changes" disabled="disabled" />
+ <a href="firewall_nat_1to1_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add new mapping')?>">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+ <button name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected rule"); ?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete"); ?>
+ </button>
+ <button type="submit" id="order-store" name="order-store" class="btn btn-primary btn-sm" value="Save changes" disabled>
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
</nav>
</form>
-<div>
-<?php
-
-print_info_box(gettext('Depending on the way your WAN connection is setup, you may also need a ') . '<a href="firewall_virtual_ip.php">' .
+<div id="infoblock">
+<?=print_info_box(gettext('Depending on the way your WAN connection is setup, you may also need a ') . '<a href="firewall_virtual_ip.php">' .
gettext("Virtual IP.") . '</a>' . '<br />' .
gettext('If you add a 1:1 NAT entry for any of the interface IPs on this system, ' .
'it will make this system inaccessible on that IP address. i.e. if ' .
'you use your WAN IP address, any services on this system (IPsec, OpenVPN server, etc.) ' .
- 'using the WAN IP address will no longer function.'));
-?>
-</div>
-
-<script>
-function fr_toggle(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var checkbox = document.getElementById(prefix + 'c' + id);
- checkbox.checked = !checkbox.checked;
- fr_bgcolor(id, prefix);
-}
-
-function fr_bgcolor(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var row = document.getElementById(prefix + id);
- var checkbox = document.getElementById(prefix + 'c' + id);
- var cells = row.getElementsByTagName('td');
- var cellcnt = cells.length;
+ 'using the WAN IP address will no longer function.'), info)?>
- for (i = 0; i < cellcnt-1; i++) {
- cells[i].style.backgroundColor = checkbox.checked ? "#DDF4FF" : "#FFFFFF";
- }
-}
-</script>
+</div>
-<script>
+<script type="text/javascript">
+//<![CDATA[
events.push(function() {
- // Make rules draggable/sortable
+
+ // Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
update: function(event, ui) {
@@ -319,5 +304,6 @@ events.push(function() {
$('[id^=frc]').prop('checked', true);
});
});
+//]]>
</script>
-<?php include("foot.inc"); ?> \ No newline at end of file
+<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/firewall_nat_1to1_edit.php b/src/usr/local/www/firewall_nat_1to1_edit.php
index 9f26c60..20c7bb6 100644
--- a/src/usr/local/www/firewall_nat_1to1_edit.php
+++ b/src/usr/local/www/firewall_nat_1to1_edit.php
@@ -1,12 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_nat_1to1_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * part of m0n0wall (http://m0n0.ch/wall)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -38,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-1-1-edit
-##|*NAME=Firewall: NAT: 1:1: Edit page
+##|*NAME=Firewall: NAT: 1:1: Edit
##|*DESCR=Allow access to the 'Firewall: NAT: 1:1: Edit' page.
##|*MATCH=firewall_nat_1to1_edit.php*
##|-PRIV
@@ -69,6 +66,7 @@
require("guiconfig.inc");
require_once("interfaces.inc");
require_once("filter.inc");
+require_once("ipsec.inc");
require("shaper.inc");
$referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firewall_nat_1to1.php');
@@ -142,8 +140,9 @@ if ($_POST) {
$temp = str_replace(">", "", $value);
$newpost = htmlentities($temp);
- if ($newpost != $temp)
+ if ($newpost != $temp) {
$input_errors[] = sprintf(gettext("Invalid characters detected (%s). Please remove invalid characters and save again."), $temp);
+ }
}
/* input validation */
@@ -282,11 +281,13 @@ function build_srctype_list() {
$sel = is_specialnet($pconfig['src']);
- if (have_ruleint_access("pppoe"))
+ if (have_ruleint_access("pppoe")) {
$list['pppoe'] = 'PPPoE clients';
+ }
- if (have_ruleint_access("l2tp"))
+ if (have_ruleint_access("l2tp")) {
$list['l2tp'] = 'L2TP clients';
+ }
foreach ($ifdisp as $ifent => $ifdesc) {
if (have_ruleint_access($ifent)) {
@@ -304,8 +305,9 @@ function srctype_selected() {
$sel = is_specialnet($pconfig['src']);
if (!$sel) {
- if (($pconfig['srcmask'] == 32) || (!isset($pconfig['srcmask'])))
+ if (($pconfig['srcmask'] == 32) || (!isset($pconfig['srcmask']))) {
return('single');
+ }
return('network');
}
@@ -319,11 +321,13 @@ function build_dsttype_list() {
$sel = is_specialnet($pconfig['dst']);
$list = array('any' => 'Any', 'single' => 'Single host or alias', 'network' => 'Network', '(self)' => 'This Firewall (self)');
- if (have_ruleint_access("pppoe"))
+ if (have_ruleint_access("pppoe")) {
$list['pppoe'] = 'PPPoE clients';
+ }
- if (have_ruleint_access("l2tp"))
+ if (have_ruleint_access("l2tp")) {
$list['l2tp'] = 'L2TP clients';
+ }
foreach ($ifdisp as $if => $ifdesc) {
if (have_ruleint_access($if)) {
@@ -334,8 +338,9 @@ function build_dsttype_list() {
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $sn) {
- if (isset($sn['noexpand']))
+ if (isset($sn['noexpand'])) {
continue;
+ }
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network") {
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
@@ -361,12 +366,14 @@ function dsttype_selected() {
$sel = is_specialnet($pconfig['dst']);
- if (empty($pconfig['dst'] || $pconfig['dst'] == "any"))
+ if (empty($pconfig['dst'] || $pconfig['dst'] == "any")) {
return('any');
+ }
if (!$sel) {
- if ($pconfig['dstmask'] == 32)
+ if ($pconfig['dstmask'] == 32) {
return('single');
+ }
return('network');
}
@@ -374,10 +381,9 @@ function dsttype_selected() {
return($pconfig['dst']);
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
@@ -395,25 +401,31 @@ $section->addInput(new Form_Checkbox(
$iflist = get_configured_interface_with_descr(false, true);
-foreach ($iflist as $if => $ifdesc)
- if (have_ruleint_access($if))
+foreach ($iflist as $if => $ifdesc) {
+ if (have_ruleint_access($if)) {
$interfaces[$if] = $ifdesc;
+ }
+}
-if ($config['l2tp']['mode'] == "server")
- if (have_ruleint_access("l2tp"))
+if ($config['l2tp']['mode'] == "server") {
+ if (have_ruleint_access("l2tp")) {
$interfaces['l2tp'] = "L2TP VPN";
+ }
+}
-if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
+if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
+}
/* add ipsec interfaces */
-if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
- if (have_ruleint_access("enc0"))
- $interfaces["enc0"] = "IPsec";
+if (ipsec_enabled() && have_ruleint_access("enc0")) {
+ $interfaces["enc0"] = "IPsec";
+}
/* add openvpn/tun interfaces */
-if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
+if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
+}
$section->addInput(new Form_Select(
'interface',
@@ -462,7 +474,7 @@ $group->add(new Form_Checkbox(
'dstnot',
null,
'Not',
- $pconfig['srcnot']
+ $pconfig['dstnot']
))->setHelp('Invert the sense of the match.');
$group->add(new Form_Select(
@@ -507,7 +519,7 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Disables the specified input element
function disableInput(id, disable) {
diff --git a/src/usr/local/www/firewall_nat_edit.php b/src/usr/local/www/firewall_nat_edit.php
index 9a32ebb..13172a1 100644
--- a/src/usr/local/www/firewall_nat_edit.php
+++ b/src/usr/local/www/firewall_nat_edit.php
@@ -1,12 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_nat_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * part of m0n0wall (http://m0n0.ch/wall)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -38,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,19 +55,17 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-portforward-edit
-##|*NAME=Firewall: NAT: Port Forward: Edit page
+##|*NAME=Firewall: NAT: Port Forward: Edit
##|*DESCR=Allow access to the 'Firewall: NAT: Port Forward: Edit' page.
##|*MATCH=firewall_nat_edit.php*
##|-PRIV
require("guiconfig.inc");
require_once("itemid.inc");
+require_once("ipsec.inc");
require_once("filter.inc");
require("shaper.inc");
@@ -157,8 +155,9 @@ unset($input_errors);
foreach ($_POST as $key => $value) {
$temp = $value;
$newpost = htmlentities($temp);
- if ($newpost != $temp)
+ if ($newpost != $temp) {
$input_errors[] = sprintf(gettext("Invalid characters detected %s. Please remove invalid characters and save again."), $temp);
+ }
}
if ($_POST) {
@@ -309,7 +308,7 @@ if ($_POST) {
/* if user enters an alias and selects "network" then disallow. */
if (($_POST['srctype'] == "network" && is_alias($_POST['src'])) ||
- ($_POST['dsttype'] == "network" && is_alias($_POST['dst']))) {
+ ($_POST['dsttype'] == "network" && is_alias($_POST['dst']))) {
$input_errors[] = gettext("You must specify single host or alias for alias entries.");
}
@@ -372,7 +371,7 @@ if ($_POST) {
}
if (!((($_POST['dstbeginport'] < $begp) && ($_POST['dstendport'] < $begp)) ||
- (($_POST['dstbeginport'] > $endp) && ($_POST['dstendport'] > $endp)))) {
+ (($_POST['dstbeginport'] > $endp) && ($_POST['dstendport'] > $endp)))) {
$input_errors[] = gettext("The destination port range overlaps with an existing entry.");
break;
}
@@ -445,8 +444,8 @@ if ($_POST) {
}
// If creating a new rule, where we want to add the filter rule, associated or not
else if (isset($_POST['filter-rule-association']) &&
- ($_POST['filter-rule-association'] == 'add-associated' ||
- $_POST['filter-rule-association'] == 'add-unassociated')) {
+ ($_POST['filter-rule-association'] == 'add-associated' ||
+ $_POST['filter-rule-association'] == 'add-unassociated')) {
$need_filter_rule = true;
}
@@ -530,17 +529,19 @@ if ($_POST) {
}
function build_srctype_list() {
- global $pconfig, $ifdisp;
+ global $pconfig, $ifdisp, $config;
$list = array('any' => 'Any', 'single' => 'Single host or alias', 'network' => 'Network');
$sel = is_specialnet($pconfig['src']);
- if (have_ruleint_access("pppoe"))
+ if (have_ruleint_access("pppoe")) {
$list['pppoe'] = 'PPPoE clients';
+ }
- if (have_ruleint_access("l2tp"))
+ if (have_ruleint_access("l2tp")) {
$list['l2tp'] = 'L2TP clients';
+ }
foreach ($ifdisp as $ifent => $ifdesc) {
if (have_ruleint_access($ifent)) {
@@ -552,17 +553,39 @@ function build_srctype_list() {
return($list);
}
+function srctype_selected() {
+ global $pconfig, $config;
+
+ $selected = "";
+
+ $sel = is_specialnet($pconfig['src']);
+ if (!$sel) {
+ if ($pconfig['srcmask'] == 32) {
+ $selected = 'single';
+ } else {
+ $selected = 'network';
+ }
+ } else {
+ $selected = $pconfig['src'];
+ }
+
+
+ return($selected);
+}
+
function build_dsttype_list() {
global $pconfig, $config, $ifdisp;
$sel = is_specialnet($pconfig['dst']);
$list = array('any' => 'Any', 'single' => 'Single host or alias', 'network' => 'Network', '(self)' => 'This Firewall (self)');
- if (have_ruleint_access("pppoe"))
+ if (have_ruleint_access("pppoe")) {
$list['pppoe'] = 'PPPoE clients';
+ }
- if (have_ruleint_access("l2tp"))
+ if (have_ruleint_access("l2tp")) {
$list['l2tp'] = 'L2TP clients';
+ }
foreach ($ifdisp as $if => $ifdesc) {
if (have_ruleint_access($if)) {
@@ -573,10 +596,10 @@ function build_dsttype_list() {
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $sn) {
- if (isset($sn['noexpand']))
- continue;
-
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network") {
+ if (isset($sn['noexpand'])) {
+ continue;
+ }
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
$end = ip2long32(gen_subnet_max($sn['subnet'], $sn['subnet_bits']));
$len = $end - $start;
@@ -588,6 +611,8 @@ function build_dsttype_list() {
}
$list[$sn['subnet']] = $sn['subnet'] . ' (' . $sn['descr'] . ')';
+ } else {
+ $list[$sn['subnet']] = $sn['subnet'] . ' (' . $sn['descr'] . ')';
}
}
}
@@ -596,43 +621,34 @@ function build_dsttype_list() {
}
function dsttype_selected() {
- global $pconfig;
-
- $sel = is_specialnet($pconfig['dst']);
-
- if (!$sel) {
- if ($pconfig['dstmask'] == 32)
- return('single');
-
- return('network');
- }
-
- return($pconfig['dst']);
-}
-
-function srctype_selected() {
- global $pconfig;
+ global $pconfig, $config;
- $sel = is_specialnet($pconfig['src']);
-
- if (!$sel) {
- if ($pconfig['srcmask'] == 32)
- return('single');
+ $selected = "";
- return('network');
+ if (is_array($config['virtualip']['vip'])) {
+ $selected = $pconfig['dst'];
+ } else {
+ $sel = is_specialnet($pconfig['dst']);
+ if (!$sel) {
+ if ($pconfig['dstmask'] == 32) {
+ $selected = 'single';
+ } else {
+ $selected = 'network';
+ }
+ } else {
+ $selected = $pconfig['dst'];
+ }
}
- return($pconfig['src']);
+ return($selected);
}
-$closehead = false;
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Port Forward"), gettext("Edit"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
@@ -657,25 +673,31 @@ $section->addInput(new Form_Checkbox(
$iflist = get_configured_interface_with_descr(false, true);
-foreach ($iflist as $if => $ifdesc)
- if (have_ruleint_access($if))
+foreach ($iflist as $if => $ifdesc) {
+ if (have_ruleint_access($if)) {
$interfaces[$if] = $ifdesc;
+ }
+}
-if ($config['l2tp']['mode'] == "server")
- if (have_ruleint_access("l2tp"))
+if ($config['l2tp']['mode'] == "server") {
+ if (have_ruleint_access("l2tp")) {
$interfaces['l2tp'] = "L2TP VPN";
+ }
+}
-if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
+if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
+}
/* add ipsec interfaces */
-if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
- if (have_ruleint_access("enc0"))
- $interfaces["enc0"] = "IPsec";
+if (ipsec_enabled() && have_ruleint_access("enc0")) {
+ $interfaces["enc0"] = "IPsec";
+}
/* add openvpn/tun interfaces */
-if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
+if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
+}
$section->addInput(new Form_Select(
'interface',
@@ -693,7 +715,27 @@ $section->addInput(new Form_Select(
array_combine(explode(" ", strtolower($protocols)), explode(" ", $protocols))
))->setHelp('Choose which protocol this rule should match. In most cases "TCP" is specified.');
+$btnsrcadv = new Form_Button(
+ 'srcadv',
+ 'Advanced'
+);
+
+$btnsrcadv->removeClass('btn-primary')->addClass('btn-default');
+
+$section->addInput(new Form_StaticText(
+ 'Source',
+ $btnsrcadv
+));
+
$group = new Form_Group('Source');
+$group->addClass('srcadv');
+
+$group->add(new Form_Checkbox(
+ 'srcnot',
+ 'Source not',
+ 'Invert match.',
+ $pconfig['srcnot']
+))->setWidth(2);
$group->add(new Form_Select(
'srctype',
@@ -712,8 +754,9 @@ $section->add($group);
$portlist = array("" => 'Other', 'any' => 'Any');
-foreach ($wkports as $wkport => $wkportdesc)
+foreach ($wkports as $wkport => $wkportdesc) {
$portlist[$wkport] = $wkportdesc;
+}
$group = new Form_Group('Source port range');
$group->addClass('srcportrange');
@@ -756,6 +799,13 @@ $section->add($group);
$group = new Form_Group('Destination');
+$group->add(new Form_Checkbox(
+ 'dstnot',
+ 'Destination not',
+ 'Invert match.',
+ $pconfig['dstnot']
+))->setWidth(2);
+
$group->add(new Form_Select(
'dsttype',
null,
@@ -809,14 +859,6 @@ $group->setHelp('Specify the port or port range for the destination of the packe
$section->add($group);
-$section->addInput(new Form_Checkbox(
- 'dstnot',
- null,
- 'Not (Invert the sense of the match)',
- $pconfig['dstnot'],
- 'yes'
-));
-
$section->addInput(new Form_IpAddress(
'localip',
'Redirect target IP',
@@ -859,7 +901,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Checkbox(
'nosync',
'No XMLRPC Sync',
- null,
+ 'Do not automatically sync to other CARP members',
$pconfig['nosync']
))->setHelp('This prevents the rule on Master from automatically syncing to other CARP members. ' .
'This does NOT prevent the rule from being overwritten on Slave.');
@@ -895,8 +937,9 @@ if (isset($id) && $a_nat[$id] && (!isset($_GET['dup']) || !is_numericint($_GET['
}
}
- if (isset($pconfig['associated-rule-id']))
+ if (isset($pconfig['associated-rule-id'])) {
$rulelist['new'] = 'Create new associated filter rule';
+ }
$section->addInput(new Form_Select(
'associated-rule-id',
@@ -929,14 +972,14 @@ if ($has_created_time || $has_updated_time) {
if ($has_created_time) {
$section->addInput(new Form_StaticText(
'Created',
- date(gettext("n/j/y H:i:s"), $a_nat[$id]['created']['time']) . gettext("by") . $a_nat[$id]['created']['username']
+ date(gettext("n/j/y H:i:s"), $a_nat[$id]['created']['time']) . gettext(" by ") . $a_nat[$id]['created']['username']
));
}
if ($has_updated_time) {
$section->addInput(new Form_StaticText(
'Updated',
- date(gettext("n/j/y H:i:s"), $a_nat[$id]['updated']['time']) . gettext("by") . $a_nat[$id]['updated']['username']
+ date(gettext("n/j/y H:i:s"), $a_nat[$id]['updated']['time']) . gettext(" by ") . $a_nat[$id]['updated']['username']
));
}
@@ -964,7 +1007,7 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
var portsenabled = 1;
var dstenabled = 1;
var showsource = 0;
@@ -1017,8 +1060,8 @@ events.push(function(){
} else {
disableInput('srcbeginport', false);
disableInput('srcendport', false);
- disableInput('localbeginport_cust', false);
- if ( dstenabled ) {
+// disableInput('localbeginport_cust', false);
+ if (dstenabled) {
disableInput('dstbeginport', false);
disableInput('dstendport', false);
}
@@ -1026,7 +1069,7 @@ events.push(function(){
}
function nordr_change() {
- if ( $('#nordr').prop('checked') ) {
+ if ($('#nordr').prop('checked')) {
hideInput('localip', true);
hideClass('lclportrange', true);
hideInput('associated-rule-id', true);
@@ -1160,12 +1203,18 @@ events.push(function(){
$('#dstendport').prop("selectedIndex", $('#dstbeginport').find(":selected").index());
}
- function dst_change( iface, old_iface, old_dst ) {
- if ( ( old_dst == "" ) || ( old_iface.concat("ip") == old_dst ) ) {
+ function dst_change(iface, old_iface, old_dst) {
+ if ((old_dst == "") || (old_iface.concat("ip") == old_dst)) {
$('#dsttype').val(iface + "ip");
}
}
+ function hideSource(hide) {
+ hideClass('srcadv', hide);
+ hideClass('srcportrange', hide || !portsenabled);
+ hideInput('srcadv', !hide);
+ }
+
// ---------- "onclick" functions ---------------------------------------------------------------------------------
$('#srcbeginport').on('change', function() {
src_rep_change();
@@ -1213,20 +1262,25 @@ events.push(function(){
typesel_change();
});
+ $("#srcadv").click(function() {
+ hideSource(false);
+ });
// ---------- On initial page load --------------------------------------------------------------------------------
+ $("#srcadv").prop('type', 'button');
ext_change();
dst_change($('#interface').val(),'<?=htmlspecialchars($pconfig['interface'])?>','<?=htmlspecialchars($pconfig['dst'])?>');
iface_old = $('#interface').val();
typesel_change();
proto_change();
nordr_change();
+ hideSource(true);
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
var customarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
- $('#localip, #ser, #dst').autocomplete({
+ $('#localip, #src, #dst').autocomplete({
source: addressarray
});
diff --git a/src/usr/local/www/firewall_nat_npt.php b/src/usr/local/www/firewall_nat_npt.php
index aedb2dc..3c3f441 100644
--- a/src/usr/local/www/firewall_nat_npt.php
+++ b/src/usr/local/www/firewall_nat_npt.php
@@ -1,15 +1,16 @@
<?php
-/* $Id$ */
/*
firewall_nat_npt.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) Copyright (C) 2011 Seth Mos <seth.mos@dds.nl>
- * part of m0n0wall (http://m0n0.ch/wall)
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +18,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +56,11 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-npt
-##|*NAME=Firewall: NAT: NPT page
-##|*DESCR=Allow access to the 'Firewall: NAT: NPT' page.
+##|*NAME=Firewall: NAT: NPt
+##|*DESCR=Allow access to the 'Firewall: NAT: NPt' page.
##|*MATCH=firewall_nat_npt.php*
##|-PRIV
@@ -71,8 +69,9 @@ require_once("functions.inc");
require_once("filter.inc");
require_once("shaper.inc");
-if (!is_array($config['nat']['npt']))
+if (!is_array($config['nat']['npt'])) {
$config['nat']['npt'] = array();
+}
$a_npt = &$config['nat']['npt'];
@@ -105,11 +104,13 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("NPt"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('natconf'))
+if (is_subsystem_dirty('natconf')) {
print_info_box_np(gettext("The NAT configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
@@ -141,10 +142,11 @@ foreach ($a_npt as $natent):
<td>
<input type="hidden" name="rule[]" value="<?=$i?>" />
<?php
- if (!$natent['interface'])
+ if (!$natent['interface']) {
print(htmlspecialchars(convert_friendly_interface_to_friendly_descr("wan")));
- else
+ } else {
print(htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])));
+ }
?>
</td>
<?php
@@ -173,15 +175,22 @@ endforeach;
?>
</tbody>
</table>
-</div>
+</form>
<nav class="action-buttons">
- <a href="firewall_nat_npt_edit.php" class="btn btn-sm btn-success"><?=gettext("Add rule")?></a>
- <input type="submit" id="order-store" class="btn btn-primary btn-sm" value="store changes" disabled="disabled" />
+ <a href="firewall_nat_npt_edit.php" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+ <button type="submit" id="order-store" class="btn btn-primary btn-sm" value="store changes" disabled>
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
</nav>
-</form>
-<script>
+</div>
+<script type="text/javascript">
+//<![CDATA[
events.push(function() {
// Make rules draggable/sortable
$('table tbody.user-entries').sortable({
@@ -191,6 +200,7 @@ events.push(function() {
}
});
});
+//]]>
</script>
<?php
diff --git a/src/usr/local/www/firewall_nat_npt_edit.php b/src/usr/local/www/firewall_nat_npt_edit.php
index d4f59f4..6adbbcf 100644
--- a/src/usr/local/www/firewall_nat_npt_edit.php
+++ b/src/usr/local/www/firewall_nat_npt_edit.php
@@ -1,15 +1,13 @@
<?php
-/* $Id$ */
/*
firewall_nat_npt_edit.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2011 Seth Mos <seth.mos@dds.nl>
- * part of pfSense (https://www.pfsense.org)
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +36,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,17 +53,16 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-npt-edit
-##|*NAME=Firewall: NAT: NPt: Edit page
+##|*NAME=Firewall: NAT: NPt: Edit
##|*DESCR=Allow access to the 'Firewall: NAT: NPt: Edit' page.
##|*MATCH=firewall_nat_npt_edit.php*
##|-PRIV
+require_once("ipsec.inc");
+
function natnptcmp($a, $b) {
return ipcmp($a['external'], $b['external']);
}
@@ -92,8 +89,9 @@ foreach ($ifdisp as $kif => $kdescr) {
$specialsrcdst[] = "{$kif}ip";
}
-if (!is_array($config['nat']['npt']))
+if (!is_array($config['nat']['npt'])) {
$config['nat']['npt'] = array();
+}
$a_npt = &$config['nat']['npt'];
@@ -180,27 +178,32 @@ function build_if_list() {
global $ifdisp;
foreach ($ifdisp as $if => $ifdesc) {
- if (have_ruleint_access($if))
+ if (have_ruleint_access($if)) {
$interfaces[$if] = $ifdesc;
+ }
}
- if ($config['l2tp']['mode'] == "server")
- if (have_ruleint_access("l2tp"))
+ if ($config['l2tp']['mode'] == "server") {
+ if (have_ruleint_access("l2tp")) {
$interfaces['l2tp'] = "L2TP VPN";
+ }
+ }
- if ($config['pppoe']['mode'] == "server")
- if (have_ruleint_access("pppoe"))
+ if ($config['pppoe']['mode'] == "server") {
+ if (have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
+ }
+ }
/* add ipsec interfaces */
- if (isset($config['ipsec']['enable']) || isset($config['ipsec']['mobileclients']['enable'])) {
- if (have_ruleint_access("enc0"))
- $interfaces["enc0"] = "IPsec";
+ if (ipsec_enabled() && have_ruleint_access("enc0")) {
+ $interfaces["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
- if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
+ if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
+ }
return($interfaces);
}
@@ -208,10 +211,9 @@ function build_if_list() {
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("NPt"), gettext("Edit"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
diff --git a/src/usr/local/www/firewall_nat_out.php b/src/usr/local/www/firewall_nat_out.php
index 2c8f22c..5b51d2d 100644
--- a/src/usr/local/www/firewall_nat_out.php
+++ b/src/usr/local/www/firewall_nat_out.php
@@ -1,13 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_nat_out.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of pfSense (https://www.pfsense.org)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -39,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-outbound
-##|*NAME=Firewall: NAT: Outbound page
+##|*NAME=Firewall: NAT: Outbound
##|*DESCR=Allow access to the 'Firewall: NAT: Outbound' page.
##|*MATCH=firewall_nat_out.php*
##|-PRIV
@@ -88,7 +84,7 @@ $a_out = &$config['nat']['outbound']['rule'];
// update rule order, POST[rule] is an array of ordered IDs
// All rule are 'checked' before posting
if (isset($_POST['order-store'])) {
- if(is_array($_POST['rule']) && !empty($_POST['rule'])) {
+ if (is_array($_POST['rule']) && !empty($_POST['rule'])) {
$a_out_new = array();
@@ -99,8 +95,9 @@ if (isset($_POST['order-store'])) {
$a_out = $a_out_new;
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('natconf');
+ }
header("Location: firewall_nat_out.php");
exit;
@@ -108,8 +105,9 @@ if (isset($_POST['order-store'])) {
}
}
-if (!isset($config['nat']['outbound']['mode']))
+if (!isset($config['nat']['outbound']['mode'])) {
$config['nat']['outbound']['mode'] = "automatic";
+}
$mode = $config['nat']['outbound']['mode'];
@@ -129,7 +127,7 @@ if ($_POST['apply']) {
}
}
-if (isset($_POST['save']) && $_POST['save'] == "Save") {
+if ($_POST['save']) {
/* mutually exclusive settings - if user wants advanced NAT, we don't generate automatic rules */
if ($_POST['mode'] == "advanced" && ($mode == "automatic" || $mode == "hybrid")) {
/*
@@ -140,9 +138,11 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
if (empty($FilterIflist)) {
filter_generate_optcfg_array();
}
+
if (empty($GatewaysList)) {
filter_generate_gateways();
}
+
$tonathosts = filter_nat_rules_automatic_tonathosts(true);
$automatic_rules = filter_nat_rules_outbound_automatic("");
@@ -158,10 +158,10 @@ if (isset($_POST['save']) && $_POST['save'] == "Save") {
$found = false;
foreach ($a_out as $rule) {
if ($rule['interface'] == $natent['interface'] &&
- $rule['source']['network'] == $natent['source']['network'] &&
- $rule['dstport'] == $natent['dstport'] &&
- $rule['target'] == $natent['target'] &&
- $rule['descr'] == $natent['descr']) {
+ $rule['source']['network'] == $natent['source']['network'] &&
+ $rule['dstport'] == $natent['dstport'] &&
+ $rule['target'] == $natent['target'] &&
+ $rule['descr'] == $natent['descr']) {
$found = true;
break;
}
@@ -239,11 +239,13 @@ if (isset($_POST['del_x'])) {
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Outbound"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('natconf'))
+if (is_subsystem_dirty('natconf')) {
print_info_box_np(gettext("The NAT configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("Port Forward"), false, "firewall_nat.php");
@@ -252,8 +254,6 @@ $tab_array[] = array(gettext("Outbound"), true, "firewall_nat_out.php");
$tab_array[] = array(gettext("NPt"), false, "firewall_nat_npt.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('General Logging Options');
@@ -302,7 +302,7 @@ print($form);
<div class="panel panel-default">
<div class="panel-heading"><?=gettext('Mappings')?></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-hover table-striped table-condensed">
<thead>
<tr>
<th><!-- checkbox --></th>
@@ -326,8 +326,9 @@ print($form);
foreach ($a_out as $natent):
$iconfn = "pass";
$textss = $textse = "";
- if ($mode == "disabled" || $mode == "automatic" || isset($natent['disabled']))
+ if ($mode == "disabled" || $mode == "automatic" || isset($natent['disabled'])) {
$iconfn .= "_d";
+ }
$alias = rule_columns_with_alias(
@@ -345,18 +346,18 @@ print($form);
<td>
<?php
- if ($mode == "disabled" || $mode == "automatic"):
+ if ($mode == "disabled" || $mode == "automatic"):
?>
- <i class="<?= ($iconfn == "pass") ? "icon-ok":"icon-remove"?>" title="<?=gettext("Click to toggle enabled/disabled status")?>"></i>
+ <i class="fa <?= ($iconfn == "pass") ? "fa-check":"fa-times"?>" title="<?=gettext("This rule is being ignored")?>"></i>
<?php
- else:
+ else:
?>
<a href="?act=toggle&amp;id=<?=$i?>">
- <i class="<?= ($iconfn == "pass") ? "icon-ok":"icon-remove"?>" title="<?=gettext("Click to toggle enabled/disabled status")?>"></i>
+ <i class="fa <?= ($iconfn == "pass") ? "fa-check":"fa-hidden"?>" title="<?=gettext("Click to toggle enabled/disabled status")?>"></i>
</a>
<?php
- endif;
+ endif;
?>
</td>
@@ -379,7 +380,7 @@ print($form);
<?php
if (isset($alias['src'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
?>
@@ -402,7 +403,7 @@ print($form);
<?php
if (isset($alias['srcport'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
}
@@ -414,8 +415,9 @@ print($form);
if (isset($natent['destination']['any'])) {
echo "*";
} else {
- if (isset($natent['destination']['not']))
+ if (isset($natent['destination']['not'])) {
echo "!&nbsp;";
+ }
if (isset($alias['dst'])):
@@ -428,7 +430,7 @@ print($form);
<?php
if (isset($alias['dst'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
}
@@ -452,7 +454,7 @@ print($form);
<?php
if (isset($alias['dstport'])):
?>
- <i class='icon icon-pencil'></i></a>
+ <i class='fa fa-pencil'></i></a>
<?php
endif;
}
@@ -462,32 +464,35 @@ print($form);
<td>
<?php
- if (isset($natent['nonat']))
+ if (isset($natent['nonat'])) {
echo '<I>NO NAT</I>';
- elseif (!$natent['target'])
+ } elseif (!$natent['target']) {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])) . " address";
- elseif ($natent['target'] == "other-subnet")
+ } elseif ($natent['target'] == "other-subnet") {
echo $natent['targetip'] . '/' . $natent['targetip_subnet'];
- else
+ } else {
echo $natent['target'];
+ }
?>
</td>
<td>
<?php
- if (!$natent['natport'])
+ if (!$natent['natport']) {
echo "*";
- else
+ } else {
echo $natent['natport'];
+ }
?>
</td>
<td>
<?php
- if (isset($natent['staticnatport']))
+ if (isset($natent['staticnatport'])) {
echo gettext("YES");
- else
+ } else {
echo gettext("NO");
+ }
?>
</td>
@@ -497,33 +502,48 @@ print($form);
<!-- Action icons -->
<td>
- <a class="btn btn-xs btn-info" title="<?=gettext("Edit mapping")?>" href="firewall_nat_out_edit.php?id=<?=$i?>"><?=gettext("Edit")?></a>
- <a class="btn btn-xs btn-danger" title="<?=gettext("Delete mapping")?>" href="firewall_nat_out.php?act=del&amp;id=<?=$i?>"><?=gettext("Del")?></a>
- <a class="btn btn-xs btn-success" title="<?=gettext("Add a new mapping based on this one")?>" href="firewall_nat_out_edit.php?dup=<?=$i?>"><?=gettext("Clone")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit mapping")?>" href="firewall_nat_out_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-clone" title="<?=gettext("Add a new mapping based on this one")?>" href="firewall_nat_out_edit.php?dup=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete mapping")?>" href="firewall_nat_out.php?act=del&amp;id=<?=$i?>"></a>
</td>
+ </tr>
<?php
$i++;
endforeach;
?>
- </tr>
</tbody>
</table>
</div>
</div>
<nav class="action-buttons">
- <a href="firewall_nat_out_edit.php" class="btn btn-sm btn-success" title="<?=gettext('Add new mapping')?>"><?=gettext('Add new mapping')?></a>&nbsp;
- <input name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected map"); ?>" />
- <input type="submit" id="order-store" class="btn btn-primary btn-sm" value="Save changes" disabled="disabled" name="order-store" />
+ <a href="firewall_nat_out_edit.php?after=-1" class="btn btn-sm btn-success" title="<?=gettext('Add new mapping to the top of the list')?>">
+ <i class="fa fa-level-up icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+ <a href="firewall_nat_out_edit.php" class="btn btn-sm btn-success" title="<?=gettext('Add new mapping to the end of the list')?>">
+ <i class="fa fa-level-down icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+ <button name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected map"); ?>" title="<?=gettext('Delete selected maps')?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete"); ?>
+ </button>
+ <button type="submit" id="order-store" class="btn btn-primary btn-sm" value="Save changes" disabled name="order-store" title="<?=gettext('Save map order')?>">
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
</nav>
<?php
if ($mode == "automatic" || $mode == "hybrid"):
- if (empty($FilterIflist))
+ if (empty($FilterIflist)) {
filter_generate_optcfg_array();
+ }
- if (empty($GatewaysList))
+ if (empty($GatewaysList)) {
filter_generate_gateways();
+ }
$automatic_rules = filter_nat_rules_outbound_automatic(implode(" ", filter_nat_rules_automatic_tonathosts()));
unset($FilterIflist, $GatewaysList);
@@ -531,7 +551,7 @@ if ($mode == "automatic" || $mode == "hybrid"):
<div class="panel panel-default">
<div class="panel-heading"><?=gettext("Automatic rules:")?></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-hover table-striped table-condensed">
<thead>
<tr>
<th><!-- status --></th>
@@ -553,7 +573,7 @@ if ($mode == "automatic" || $mode == "hybrid"):
?>
<tr>
<td>
- <i class="icon-ok" title="<?=gettext("automatic outbound nat")?>"></i>
+ <i class="fa fa-check" title="<?=gettext("automatic outbound nat")?>"></i>
</td>
<td>
<?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])); ?>
@@ -565,10 +585,11 @@ if ($mode == "automatic" || $mode == "hybrid"):
<?php
echo ($natent['protocol']) ? $natent['protocol'] . '/' : "" ;
- if (!$natent['sourceport'])
+ if (!$natent['sourceport']) {
echo "*";
- else
+ } else {
echo $natent['sourceport'];
+ }
?>
</td>
<td>
@@ -576,8 +597,9 @@ if ($mode == "automatic" || $mode == "hybrid"):
if (isset($natent['destination']['any'])) {
echo "*";
} else {
- if (isset($natent['destination']['not']))
+ if (isset($natent['destination']['not'])) {
echo "!&nbsp;";
+ }
echo $natent['destination']['address'];
}
@@ -586,38 +608,42 @@ if ($mode == "automatic" || $mode == "hybrid"):
<td>
<?php
echo ($natent['protocol']) ? $natent['protocol'] . '/' : "" ;
- if (!$natent['dstport'])
+ if (!$natent['dstport']) {
echo "*";
- else
+ } else {
echo $natent['dstport'];
+ }
?>
</td>
<td>
<?php
- if (isset($natent['nonat']))
+ if (isset($natent['nonat'])) {
echo 'NO NAT';
- elseif (!$natent['target'])
+ } elseif (!$natent['target']) {
echo htmlspecialchars(convert_friendly_interface_to_friendly_descr($natent['interface'])) . " address";
- elseif ($natent['target'] == "other-subnet")
+ } elseif ($natent['target'] == "other-subnet") {
echo $natent['targetip'] . '/' . $natent['targetip_subnet'];
- else
+ } else {
echo $natent['target'];
+ }
?>
</td>
<td>
<?php
- if (!$natent['natport'])
+ if (!$natent['natport']) {
echo "*";
- else
+ } else {
echo $natent['natport'];
+ }
?>
</td>
<td>
<?php
- if (isset($natent['staticnatport']))
+ if (isset($natent['staticnatport'])) {
echo gettext("YES");
- else
+ } else {
echo gettext("NO");
+ }
?>
</td>
<td>
@@ -634,7 +660,7 @@ endif;
</div>
</form>
-<div>
+<div id="infoblock">
<?php
print_info_box(gettext('If automatic outbound NAT is selected, a mapping is automatically generated for each interface\'s subnet (except WAN-type connections) and the rules ' .
'on the "Mappings" section of this page are ignored.' . '<br />' .
@@ -643,39 +669,16 @@ endif;
'If hybrid outbound NAT is selected, mappings you specify on this page will be used, followed by the automatically generated ones.' . '<br />' .
'If disable outbound NAT is selected, no rules will be used.' . '<br />' .
'If a target address other than an interface\'s IP address is used, then depending on the way the WAN connection is setup, a ') .
- '<a href="firewall_virtual_ip.php">' . gettext("Virtual IP") . '</a>' . gettext(" may also be required.")
- );
+ '<a href="firewall_virtual_ip.php">' . gettext("Virtual IP") . '</a>' . gettext(" may also be required."),
+ info);
?>
</div>
-<script>
-function fr_toggle(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var checkbox = document.getElementById(prefix + 'c' + id);
- checkbox.checked = !checkbox.checked;
- fr_bgcolor(id, prefix);
-}
-
-function fr_bgcolor(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var row = document.getElementById(prefix + id);
- var checkbox = document.getElementById(prefix + 'c' + id);
- var cells = row.getElementsByTagName('td');
- var cellcnt = cells.length;
-
- for (i = 0; i < cellcnt-1; i++) {
- cells[i].style.backgroundColor = checkbox.checked ? "#DDF4FF" : "#FFFFFF";
- }
-}
-</script>
-
-<script>
+<script type="text/javascript">
+//<![CDATA[
events.push(function() {
- // Make rules draggable/sortable
+
+ // Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
update: function(event, ui) {
@@ -688,6 +691,7 @@ events.push(function() {
$('[id^=frc]').prop('checked', true);
});
});
+//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/firewall_nat_out_edit.php b/src/usr/local/www/firewall_nat_out_edit.php
index afb0648..0836d4e 100644
--- a/src/usr/local/www/firewall_nat_out_edit.php
+++ b/src/usr/local/www/firewall_nat_out_edit.php
@@ -1,16 +1,15 @@
<?php
-/* $Id$ */
/*
firewall_nat_out_edit.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of pfSense (https://www.pfsense.org)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -18,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -39,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,23 +55,22 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: nat
-*/
##|+PRIV
##|*IDENT=page-firewall-nat-outbound-edit
-##|*NAME=Firewall: NAT: Outbound: Edit page
+##|*NAME=Firewall: NAT: Outbound: Edit
##|*DESCR=Allow access to the 'Firewall: NAT: Outbound: Edit' page.
##|*MATCH=firewall_nat_out_edit.php*
##|-PRIV
require("guiconfig.inc");
+require_once("ipsec.inc");
require_once("filter.inc");
require("shaper.inc");
-if (!is_array($config['nat']['outbound']))
+if (!is_array($config['nat']['outbound'])) {
$config['nat']['outbound'] = array();
+}
if (!is_array($config['nat']['outbound']['rule'])) {
$config['nat']['outbound']['rule'] = array();
@@ -122,7 +120,7 @@ if (isset($id) && $a_out[$id]) {
address_to_pconfig($a_out[$id]['destination'], $pconfig['destination'],
$pconfig['destination_subnet'], $pconfig['destination_not'],
$none, $none);
-
+
$pconfig['dstport'] = $a_out[$id]['dstport'];
$pconfig['natport'] = $a_out[$id]['natport'];
$pconfig['target'] = $a_out[$id]['target'];
@@ -130,11 +128,11 @@ if (isset($id) && $a_out[$id]) {
$pconfig['targetip_subnet'] = $a_out[$id]['targetip_subnet'];
$pconfig['poolopts'] = $a_out[$id]['poolopts'];
$pconfig['interface'] = $a_out[$id]['interface'];
-
+
if (!$pconfig['interface']) {
$pconfig['interface'] = "wan";
}
-
+
$pconfig['descr'] = $a_out[$id]['descr'];
$pconfig['nonat'] = $a_out[$id]['nonat'];
$pconfig['disabled'] = isset($a_out[$id]['disabled']);
@@ -156,7 +154,7 @@ if ($_POST) {
$_POST['destination'] = "any";
$_POST['destination_subnet'] = 24;
}
-
+
if ($_POST['source_type'] == "any") {
$_POST['source'] = "any";
$_POST['source_subnet'] = 24;
@@ -222,21 +220,21 @@ if ($_POST) {
$input_errors[] = gettext("A valid source must be specified.");
}
}
-
+
if ($_POST['source_subnet'] && !is_numericint($_POST['source_subnet'])) {
$input_errors[] = gettext("A valid source bit count must be specified.");
}
-
+
if ($_POST['destination_type'] != "any") {
if ($_POST['destination'] && !is_ipaddroralias($_POST['destination'])) {
$input_errors[] = gettext("A valid destination must be specified.");
}
}
-
+
if ($_POST['destination_subnet'] && !is_numericint($_POST['destination_subnet'])) {
$input_errors[] = gettext("A valid destination bit count must be specified.");
}
-
+
if ($_POST['destination_type'] == "any") {
if ($_POST['destination_not']) {
$input_errors[] = gettext("Negating destination address of \"any\" is invalid.");
@@ -251,7 +249,7 @@ if ($_POST) {
if (!is_ipaddr($_POST['targetip'])) {
$input_errors[] = gettext("A valid target IP must be specified when using the 'Other Subnet' type.");
}
-
+
if (!is_numericint($_POST['targetip_subnet'])) {
$input_errors[] = gettext("A valid target bit count must be specified when using the 'Other Subnet' type.");
}
@@ -393,7 +391,6 @@ if ($_POST) {
}
$pgtitle = array(gettext("Firewall"), gettext("NAT"), gettext("Outbound"), gettext("Edit"));
-$closehead = false;
include("head.inc");
function build_target_list() {
@@ -404,8 +401,9 @@ function build_target_list() {
if (is_array($config['virtualip']['vip'])) {
foreach ($config['virtualip']['vip'] as $sn) {
- if (isset($sn['noexpand']))
+ if (isset($sn['noexpand'])) {
continue;
+ }
if ($sn['mode'] == "proxyarp" && $sn['type'] == "network") {
$start = ip2long32(gen_subnet($sn['subnet'], $sn['subnet_bits']));
@@ -425,8 +423,9 @@ function build_target_list() {
}
foreach ($a_aliases as $alias) {
- if ($alias['type'] != "host")
+ if ($alias['type'] != "host") {
continue;
+ }
$list[$alias['name']] = 'Host Alias: ' . $alias['name'] . ' (' . $alias['descr'] . ')';
}
@@ -436,10 +435,9 @@ function build_target_list() {
return($list);
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
@@ -464,25 +462,31 @@ $section->addInput(new Form_Checkbox(
$iflist = get_configured_interface_with_descr(false, true);
-foreach ($iflist as $if => $ifdesc)
- if (have_ruleint_access($if))
+foreach ($iflist as $if => $ifdesc) {
+ if (have_ruleint_access($if)) {
$interfaces[$if] = $ifdesc;
+ }
+}
-if ($config['l2tp']['mode'] == "server")
- if (have_ruleint_access("l2tp"))
+if ($config['l2tp']['mode'] == "server") {
+ if (have_ruleint_access("l2tp")) {
$interfaces['l2tp'] = "L2TP VPN";
+ }
+}
-if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
+if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
$interfaces['pppoe'] = "PPPoE Server";
+}
/* add ipsec interfaces */
-if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']))
- if (have_ruleint_access("enc0"))
- $interfaces["enc0"] = "IPsec";
+if (ipsec_enabled() && have_ruleint_access("enc0")) {
+ $interfaces["enc0"] = "IPsec";
+}
/* add openvpn/tun interfaces */
-if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
+if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
$interfaces["openvpn"] = "OpenVPN";
+}
$section->addInput(new Form_Select(
'interface',
@@ -505,7 +509,7 @@ $group = new Form_Group('Source');
$group->add(new Form_Select(
'source_type',
null,
- $pconfig['source_type'],
+ (($pconfig['source'] == "any") || ($pconfig['source'] == "(self)")) ? $pconfig['source'] : "network",
array('any' => 'Any', '(self)' => 'This Firewall (self)', 'network' => 'Network')
))->setHelp('Type')->setWidth('3');
@@ -666,14 +670,14 @@ if ($has_created_time || $has_updated_time) {
if ($has_created_time) {
$section->addInput(new Form_StaticText(
'Created',
- date(gettext("n/j/y H:i:s"), $a_out[$id]['created']['time']) . gettext("by") . $a_out[$id]['created']['username']
+ date(gettext("n/j/y H:i:s"), $a_out[$id]['created']['time']) . gettext(" by ") . $a_out[$id]['created']['username']
));
}
if ($has_updated_time) {
$section->addInput(new Form_StaticText(
'Updated',
- date(gettext("n/j/y H:i:s"), $a_out[$id]['updated']['time']) . gettext("by") . $a_out[$id]['updated']['username']
+ date(gettext("n/j/y H:i:s"), $a_out[$id]['updated']['time']) . gettext(" by ") . $a_out[$id]['updated']['username']
));
}
@@ -686,7 +690,7 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
var portsenabled = 1;
function staticportchange() {
@@ -702,8 +706,7 @@ events.push(function(){
if ($('#source_type').find(":selected").val() == "network") {
disableInput('source', false);
disableInput('source_subnet', false);
- }
- else {
+ } else {
$('#source').val("");
disableInput('source', true);
$('#source_subnet').val("24");
@@ -715,8 +718,7 @@ events.push(function(){
if ($('#destination_type').find(":selected").val() == "network") {
disableInput('destination', false);
disableInput('destination_subnet', false);
- }
- else {
+ } else {
$('#destination').val("");
disableInput('destination', true);
$('#destination_subnet').val("24");
@@ -729,7 +731,7 @@ events.push(function(){
}
function proto_change() {
- if (($('#protocol').find(":selected").index() > 0) && ($('#protocol').find(":selected").index() <= 3)) {
+ if (($('#protocol').find(":selected").index() >= 0) && ($('#protocol').find(":selected").index() <= 3)) {
hideGroupInput('sourceport', false);
hideGroupInput('dstport', false);
hideClass('natportgrp', false);
diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php
index cf264c6..5cc9ea4 100644
--- a/src/usr/local/www/firewall_rules.php
+++ b/src/usr/local/www/firewall_rules.php
@@ -1,13 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_rules.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of pfSense (https://www.pfsense.org)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -39,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: filter
-*/
##|+PRIV
##|*IDENT=page-firewall-rules
-##|*NAME=Firewall: Rules page
+##|*NAME=Firewall: Rules
##|*DESCR=Allow access to the 'Firewall: Rules' page.
##|*MATCH=firewall_rules.php*
##|-PRIV
@@ -70,6 +66,7 @@
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
+require_once("ipsec.inc");
require_once("shaper.inc");
$pgtitle = array(gettext("Firewall"), gettext("Rules"));
@@ -99,6 +96,7 @@ filter_rules_sort();
$a_filter = &$config['filter']['rule'];
$if = $_GET['if'];
+
if ($_POST['if']) {
$if = $_POST['if'];
}
@@ -135,10 +133,8 @@ if (is_array($config['pppoes']['pppoe'])) {
}
/* add ipsec interfaces */
-if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
- if (have_ruleint_access("enc0")) {
- $iflist["enc0"] = "IPsec";
- }
+if (ipsec_enabled() && have_ruleint_access("enc0")) {
+ $iflist["enc0"] = "IPsec";
}
/* add openvpn/tun interfaces */
@@ -167,11 +163,11 @@ if ($_POST) {
clear_subsystem_dirty('filter');
- $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background.<br />You can also %s monitor %s the reload progress"), "<a href='status_filter_reload.php'>", "</a>");
+ $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background.<br />You can also %s monitor %s the reload progress"),
+ "<a href='status_filter_reload.php'>", "</a>");
}
}
-
if ($_GET['act'] == "del") {
if ($a_filter[$_GET['id']]) {
if (!empty($a_filter[$_GET['id']]['associated-rule-id'])) {
@@ -203,7 +199,7 @@ if (isset($_POST['del_x'])) {
$deleted = true;
}
- if($deleted) {
+ if ($deleted) {
if (write_config()) {
mark_subsystem_dirty('filter');
}
@@ -226,14 +222,15 @@ if (isset($_POST['del_x'])) {
header("Location: firewall_rules.php?if=" . htmlspecialchars($if));
exit;
}
-} else if($_POST['order-store']) {
+} else if ($_POST['order-store']) {
/* update rule order, POST[rule] is an array of ordered IDs */
if (is_array($_POST['rule']) && !empty($_POST['rule'])) {
$a_filter_new = array();
// if a rule is not in POST[rule], it has been deleted by the user
- foreach ($_POST['rule'] as $id)
+ foreach ($_POST['rule'] as $id) {
$a_filter_new[] = $a_filter[$id];
+ }
$a_filter = $a_filter_new;
if (write_config()) {
@@ -245,19 +242,32 @@ if (isset($_POST['del_x'])) {
}
}
+$tab_array = array(array(gettext("Floating"), ("FloatingRules" == $if), "firewall_rules.php?if=FloatingRules"));
+
+foreach ($iflist as $ifent => $ifname) {
+ $tab_array[] = array($ifname, ($ifent == $if), "firewall_rules.php?if={$ifent}");
+}
+
+foreach ($tab_array as $dtab) {
+ if ($dtab[1]) {
+ $bctab = $dtab[0];
+ break;
+ }
+}
+
+$pgtitle = array(gettext("Firewall"), gettext("Rules"), $bctab);
+$shortcut_section = "firewall";
+
include("head.inc");
$nrules = 0;
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('filter'))
+if (is_subsystem_dirty('filter')) {
print_info_box_np(gettext("The firewall rule configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."), "apply", "", true);
-
-$tab_array = array(array(gettext("Floating"), ("FloatingRules" == $if), "firewall_rules.php?if=FloatingRules"));
-
-foreach ($iflist as $ifent => $ifname)
- $tab_array[] = array($ifname, ($ifent == $if), "firewall_rules.php?if={$ifent}");
+}
display_top_tabs($tab_array);
@@ -266,34 +276,34 @@ display_top_tabs($tab_array);
<div class="panel panel-default">
<div class="panel-heading"><?=gettext("Rules (Drag to change order)")?></div>
<div id="mainarea" class="table-responsive panel-body">
- <table class="table table-striped table-hover table-condensed">
+ <table name="ruletable" class="table table-hover table-striped table-condensed">
<thead>
<tr>
<th><!-- checkbox --></th>
<th><!-- status icons --></th>
- <th><?=gettext("Proto");?></th>
- <th><?=gettext("Source");?></th>
- <th><?=gettext("Port");?></th>
- <th><?=gettext("Destination");?></th>
- <th><?=gettext("Port");?></th>
- <th><?=gettext("Gateway");?></th>
- <th><?=gettext("Queue");?></th>
- <th><?=gettext("Schedule");?></th>
- <th><?=gettext("Description");?></th>
- <th><!-- buttons --></th>
+ <th><?=gettext("Proto")?></th>
+ <th><?=gettext("Source")?></th>
+ <th><?=gettext("Port")?></th>
+ <th><?=gettext("Destination")?></th>
+ <th><?=gettext("Port")?></th>
+ <th><?=gettext("Gateway")?></th>
+ <th><?=gettext("Queue")?></th>
+ <th><?=gettext("Schedule")?></th>
+ <th><?=gettext("Description")?></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
<?php
// Show the anti-lockout rule if it's enabled, and we are on LAN with an if count > 1, or WAN with an if count of 1.
if (!isset($config['system']['webgui']['noantilockout']) &&
- (((count($config['interfaces']) > 1) && ($if == 'lan')) ||
- ((count($config['interfaces']) == 1) && ($if == 'wan')))):
+ (((count($config['interfaces']) > 1) && ($if == 'lan')) ||
+ ((count($config['interfaces']) == 1) && ($if == 'wan')))):
$alports = implode('<br />', filter_get_antilockout_ports(true));
?>
- <tr id="antilockout">
+ <tr id="antilockout" class="hover-success">
<td></td>
- <td title="<?=gettext("traffic is passed")?>"><i class="icon icon-ok"></i></td>
+ <td title="<?=gettext("traffic is passed")?>"><i class="fa fa-check text-success"></i></td>
<td>*</td>
<td>*</td>
<td>*</td>
@@ -302,16 +312,16 @@ display_top_tabs($tab_array);
<td>*</td>
<td>*</td>
<td></td>
- <td><?=gettext("Anti-Lockout Rule");?></td>
+ <td class="bg-info"><?=gettext("Anti-Lockout Rule");?></td>
<td>
- <a href="system_advanced_admin.php" class="btn btn-xs btn-primary">edit</a>
+ <a href="system_advanced_admin.php" title="<?=gettext("Settings");?>"><i class="fa fa-cog"></i></a>
</td>
</tr>
<?php endif;?>
<?php if (isset($config['interfaces'][$if]['blockpriv'])): ?>
- <tr id="frrfc1918">
+ <tr id="frrfc1918" class="hover-danger">
<td></td>
- <td title="<?=gettext("traffic is blocked")?>"><i class="icon icon-remove"></i></td>
+ <td title="<?=gettext("traffic is blocked")?>"><i class="fa fa-times text-danger"></i></td>
<td>*</td>
<td><?=gettext("RFC 1918 networks");?></td>
<td>*</td>
@@ -320,16 +330,16 @@ display_top_tabs($tab_array);
<td>*</td>
<td>*</td>
<td></td>
- <td><?=gettext("Block private networks");?></td>
+ <td class="bg-info"><?=gettext("Block private networks");?></td>
<td>
- <a href="interfaces.php?if=<?=htmlspecialchars($if)?>" class="btn btn-xs btn-primary" title="<?=gettext("edit rule");?>">edit</a>
+ <a href="interfaces.php?if=<?=htmlspecialchars($if)?>" title="<?=gettext("Settings");?>"><i class="fa fa-cog"></i></a>
</td>
</tr>
<?php endif;?>
<?php if (isset($config['interfaces'][$if]['blockbogons'])): ?>
- <tr id="frrfc1918">
+ <tr id="frrfc1918" class="hover-danger">
<td></td>
- <td title="<?=gettext("traffic is blocked")?>"><i class="icon icon-remove"></i></td>
+ <td title="<?=gettext("traffic is blocked")?>"><i class="fa fa-times text-danger"></i></td>
<td>*</td>
<td><?=gettext("Reserved/not assigned by IANA");?></td>
<td>*</td>
@@ -337,10 +347,10 @@ display_top_tabs($tab_array);
<td>*</td>
<td>*</td>
<td>*</td>
- <td>*</td>
- <td><?=gettext("Block bogon networks");?></td>
+ <td></td>
+ <td class="bg-info"><?=gettext("Block bogon networks");?></td>
<td>
- <a href="interfaces.php?if=<?=htmlspecialchars($if)?>" class="btn btn-xs btn-primary">edit</a>
+ <a href="interfaces.php?if=<?=htmlspecialchars($if)?>" title="<?=gettext("Settings");?>"><i class="fa fa-cog"></i></a>
</td>
</tr>
<?php endif;?>
@@ -352,39 +362,46 @@ $nrules = 0;
for ($i = 0; isset($a_filter[$i]); $i++):
$filterent = $a_filter[$i];
- if ($filterent['interface'] != $if && !isset($filterent['floating']))
- continue;
-
- if (isset($filterent['floating']) && "FloatingRules" != $if)
- continue;
+ if (($filterent['interface'] != $if && !isset($filterent['floating'])) || (isset($filterent['floating']) && "FloatingRules" != $if)) {
+ $display = 'style="display: none;"';
+ } else {
+ $display = "";
+ }
?>
- <tr id="fr<?=$nrules;?>" onClick="fr_toggle(<?=$nrules;?>)" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';" <?=(isset($filterent['disabled']) ? ' class="disabled"' : '')?>>
+ <tr id="fr<?=$nrules;?>" <?=$display?> onClick="fr_toggle(<?=$nrules;?>)" ondblclick="document.location='firewall_rules_edit.php?id=<?=$i;?>';" <?=(isset($filterent['disabled']) ? ' class="disabled"' : '')?>>
<td >
<input type="checkbox" id="frc<?=$nrules;?>" onClick="fr_toggle(<?=$nrules;?>)" name="rule[]" value="<?=$i;?>"/>
</td>
- <td title="<?=gettext("traffic is ").$filterent['type']."ed"?>">
-
<?php
- if ($filterent['type'] == "block")
- $iconfn = "remove";
- else if ($filterent['type'] == "reject")
- $iconfn = "fire";
- else if ($filterent['type'] == "match")
+ if ($filterent['type'] == "block") {
+ $iconfn = "times text-danger";
+ $title_text = gettext("traffic is blocked");
+ } else if ($filterent['type'] == "reject") {
+ $iconfn = "hand-stop-o text-warning";
+ $title_text = gettext("traffic is rejected");
+ } else if ($filterent['type'] == "match") {
$iconfn = "filter";
- else
- $iconfn = "ok";
+ $title_text = gettext("traffic is matched");
+ } else {
+ $iconfn = "check text-success";
+ $title_text = gettext("traffic is passed");
+ }
?>
- <i class="icon icon-<?=$iconfn?>"></i>
+ <td title="<?=$title_text?>">
+
+ <i class="fa fa-<?=$iconfn?>"></i>
<?php
$isadvset = firewall_check_for_advanced_options($filterent);
- if ($isadvset)
- print '<i class="icon icon-cog" title="'. gettext("advanced setting") .': '. $isadvset .'"></i>';
+ if ($isadvset) {
+ print '<i class="fa fa-cog" title="'. gettext("advanced setting") .': '. $isadvset .'"></i>';
+ }
- if (isset($filterent['log']))
- print '<i class="icon icon-tasks" title="'. gettext("traffic is logged") .'"></i>';
+ if (isset($filterent['log'])) {
+ print '<i class="fa fa-tasks" title="'. gettext("traffic is logged") .'"></i>';
+ }
?>
- </td>
+ </td>
<?php
$alias = rule_columns_with_alias(
$filterent['source']['address'],
@@ -403,8 +420,8 @@ for ($i = 0; isset($a_filter[$i]); $i++):
$dayArray = array (gettext('Mon'), gettext('Tues'), gettext('Wed'), gettext('Thur'), gettext('Fri'), gettext('Sat'), gettext('Sun'));
$monthArray = array (gettext('January'), gettext('February'), gettext('March'), gettext('April'), gettext('May'), gettext('June'), gettext('July'), gettext('August'), gettext('September'), gettext('October'), gettext('November'), gettext('December'));
if ($config['schedules']['schedule'] != "" && is_array($config['schedules']['schedule'])) {
- foreach ($a_schedules as $schedule)
- {
+ $idx = 0;
+ foreach ($a_schedules as $schedule) {
if ($schedule['name'] == $filterent['sched']) {
$schedstatus = filter_get_time_based_rule_status($schedule);
@@ -433,8 +450,7 @@ for ($i = 0; isset($a_filter[$i]); $i++):
$month = $tempmontharray[$arraycounter];
$day = $tempdayarray[$arraycounter];
- if (!$firstDayFound)
- {
+ if (!$firstDayFound) {
$firstDay = $day;
$firstmonth = $month;
$firstDayFound = true;
@@ -444,21 +460,21 @@ for ($i = 0; isset($a_filter[$i]); $i++):
$nextDay = $tempdayarray[$arraycounter+1];
$currentDay++;
if (($currentDay != $nextDay) || ($tempmontharray[$arraycounter] != $tempmontharray[$arraycounter+1])) {
- if ($firstPrint)
+ if ($firstPrint) {
$dayFriendly .= ", ";
+ }
$currentDay--;
- if ($currentDay != $firstDay)
+ if ($currentDay != $firstDay) {
$dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ;
- else
+ } else {
$dayFriendly .= $monthArray[$month-1] . " " . $day;
+ }
$firstDayFound = false;
$firstPrint = true;
}
$arraycounter++;
}
- }
- else
- {
+ } else {
$tempdayFriendly = $timerange['position'];
$firstDayFound = false;
$tempFriendlyDayArray = explode(",", $tempdayFriendly);
@@ -468,8 +484,7 @@ for ($i = 0; isset($a_filter[$i]); $i++):
$counter = 0;
foreach ($tempFriendlyDayArray as $day) {
if ($day != "") {
- if (!$firstDayFound)
- {
+ if (!$firstDayFound) {
$firstDay = $tempFriendlyDayArray[$counter];
$firstDayFound = true;
}
@@ -478,13 +493,15 @@ for ($i = 0; isset($a_filter[$i]); $i++):
$nextDay = $tempFriendlyDayArray[$counter+1];
$currentDay++;
if ($currentDay != $nextDay) {
- if ($firstprint)
+ if ($firstprint) {
$dayFriendly .= ", ";
+ }
$currentDay--;
- if ($currentDay != $firstDay)
+ if ($currentDay != $firstDay) {
$dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
- else
+ } else {
$dayFriendly .= $dayArray[$firstDay-1];
+ }
$firstDayFound = false;
$firstprint = true;
}
@@ -499,10 +516,12 @@ for ($i = 0; isset($a_filter[$i]); $i++):
}
#FIXME
$sched_caption_escaped = str_replace("'", "\'", $schedule['descr']);
- $schedule_span_begin = "<span style=\"cursor: help;\" onmouseover=\"domTT_activate(this, event, 'content', '<h1>{$sched_caption_escaped}</h1><p>{$sched_content}</p>', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\" onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\"><u>";
- $schedule_span_end = "</u></span>";
+ $schedule_span_begin = '<a href="/firewall_schedule_edit.php?id=' . $idx . '" data-toggle="popover" data-trigger="hover focus" title="' . $schedule['name'] . '" data-content="' .
+ $sched_caption_escaped . '" data-html="true">';
+ $schedule_span_end = "";
}
}
+ $idx++;
}
$printicon = false;
$alttext = "";
@@ -510,19 +529,23 @@ for ($i = 0; isset($a_filter[$i]); $i++):
if (!isset($filterent['disabled'])) {
if ($schedstatus) {
if ($iconfn == "block" || $iconfn == "reject") {
- $image = "icon_block";
+ $image = "times-circle";
+ $dispcolor = "text-danger";
$alttext = gettext("Traffic matching this rule is currently being denied");
} else {
- $image = "icon_pass";
+ $image = "play-circle";
+ $dispcolor = "text-success";
$alttext = gettext("Traffic matching this rule is currently being allowed");
}
$printicon = true;
} else if ($filterent['sched']) {
- if ($iconfn == "block" || $iconfn == "reject")
- $image = "icon_block_d";
- else
- $image = "icon_block";
+ if ($iconfn == "block" || $iconfn == "reject") {
+ $image = "times-circle";
+ } else {
+ $image = "times-circle";
+ }
$alttext = gettext("This rule is not currently active because its period has expired");
+ $dispcolor = "text-danger";
$printicon = true;
}
}
@@ -600,22 +623,33 @@ for ($i = 0; isset($a_filter[$i]); $i++):
} else if (isset($filterent['defaultqueue'])) {
$desc = $filterent['defaultqueue'];
echo "<a href=\"firewall_shaper_queues.php?queue={$filterent['defaultqueue']}&amp;action=show\">{$desc}</a>";
- } else
+ } else {
echo gettext("none");
+ }
?>
</td>
<td>
- <?php if ($printicon) { ?><img src="./themes/<?= $g['theme'];?>/images/icons/<?=$image;?>.gif" title="<?=$alttext;?>" border="0" alt="icon" /><?php } ?>
+ <?php if ($printicon) { ?>
+ <i class="fa fa-<?=$image?> <?=$dispcolor?>" title="<?=$alttext;?>" alt="icon"></i>
+ <?php } ?>
<?=$schedule_span_begin;?><?=htmlspecialchars($filterent['sched']);?>&nbsp;<?=$schedule_span_end;?>
</td>
- <td>
+ <td class="bg-info">
<?=htmlspecialchars($filterent['descr']);?>
</td>
- <td>
- <a href="firewall_rules_edit.php?id=<?=$i;?>" class="btn btn-xs btn-primary">edit</a>
- <a href="firewall_rules_edit.php?dup=<?=$i;?>" class="btn btn-xs btn-default">copy</a>
- <a href="?act=toggle&amp;if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>" class="btn btn-xs btn-warning"><?=(isset($filterent['disabled']) ? 'enable' : 'disable')?></a>
- <a href="?act=del&amp;if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>" class="btn btn-xs btn-danger">delete</a>
+ <td class="action-icons">
+ <!-- <?=(isset($filterent['disabled']) ? 'enable' : 'disable')?> -->
+ <a href="firewall_rules_edit.php?id=<?=$i;?>" class="fa fa-pencil" title="<?=gettext('Edit')?>"></a>
+ <a href="firewall_rules_edit.php?dup=<?=$i;?>" class="fa fa-clone" title="<?=gettext('Copy')?>"></a>
+<?php if (isset($filterent['disabled'])) {
+?>
+ <a href="?act=toggle&amp;if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>" class="fa fa-check-square-o" title="<?=gettext('Enable')?>"></a>
+<?php } else {
+?>
+ <a href="?act=toggle&amp;if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>" class="fa fa-ban" title="<?=gettext('Disable')?>"></a>
+<?php }
+?>
+ <a href="?act=del&amp;if=<?=htmlspecialchars($if);?>&amp;id=<?=$i;?>" class="fa fa-trash" title="<?=gettext('Delete')?>"></a>
</td>
</tr>
<?php
@@ -642,69 +676,60 @@ for ($i = 0; isset($a_filter[$i]); $i++):
<?php endif;?>
<nav class="action-buttons">
- <input type="submit" id="order-store" name="order-store" class="btn btn-sm btn-primary" value="store changes" disabled="disabled" />
- <input name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected rules"); ?>" />
- <a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>" role="button" class="btn btn-sm btn-success">
- <?=gettext("add new");?>
+ <a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>&amp;after=-1" role="button" class="btn btn-sm btn-success" title="<?=gettext('Add rule to the top of the list')?>">
+ <i class="fa fa-level-up icon-embed-btn"></i>
+ <?=gettext("Add");?>
</a>
+ <a href="firewall_rules_edit.php?if=<?=htmlspecialchars($if);?>" role="button" class="btn btn-sm btn-success" title="<?=gettext('Add rule to the end of the list')?>">
+ <i class="fa fa-level-down icon-embed-btn"></i>
+ <?=gettext("Add");?>
+ </a>
+ <button name="del_x" type="submit" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected rules"); ?>" title="<?=gettext('Delete selected rules')?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete"); ?>
+ </button>
+ <button type="submit" id="order-store" name="order-store" class="btn btn-sm btn-primary" value="store changes" disabled title="<?=gettext('Save rule order')?>">
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
</nav>
</form>
-<!-- Legend -->
-<div>
- <dl class="dl-horizontal responsive">
- <dt><?=gettext('Legend')?></dt> <dd></dd>
- <dt><i class="icon icon-ok"></i></dt> <dd><?=gettext("pass");?></dd>
- <dt><i class="icon icon-filter"></i></dt> <dd><?=gettext("match");?></dd>
- <dt><i class="icon icon-remove"></i></dt> <dd><?=gettext("block");?></dd>
- <dt><i class="icon icon-fire"></i></dt> <dd><?=gettext("reject");?></dd>
- <dt><i class="icon icon-tasks"></i></dt> <dd> <?=gettext("log");?></dd>
- <dt><i class="icon icon-cog"></i></dt> <dd> <?=gettext("advanced filter");?></dd>
- </dl>
-</div>
-
-<?php
-if ("FloatingRules" != $if)
- print_info_box(gettext("Rules are evaluated on a first-match basis (i.e. " .
- "the action of the first rule to match a packet will be executed). ") . '<br />' .
- gettext("This means that if you use block rules, you'll have to pay attention " .
- "to the rule order. Everything that isn't explicitly passed is blocked " .
- "by default. "));
-else
- print_info_box(gettext("Floating rules are evaluated on a first-match basis (i.e. " .
- "the action of the first rule to match a packet will be executed) only " .
- "if the 'quick' option is checked on a rule. Otherwise they will only apply if no " .
- "other rules match. Pay close attention to the rule order and options " .
- "chosen. If no rule here matches, the per-interface or default rules are used. "));
-?>
-
-<script>
-function fr_toggle(id, prefix) {
- if (!prefix)
- prefix = 'fr';
-
- var checkbox = document.getElementById(prefix + 'c' + id);
- checkbox.checked = !checkbox.checked;
- fr_bgcolor(id, prefix);
-}
-
-function fr_bgcolor(id, prefix) {
- if (!prefix)
- prefix = 'fr';
+<div id="infoblock">
+ <div class="alert alert-info clearfix" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button><div class="pull-left">
+ <dl class="dl-horizontal responsive">
+ <!-- Legend -->
+ <dt><?=gettext('Legend')?></dt> <dd></dd>
+ <dt><i class="fa fa-check text-success"></i></dt> <dd><?=gettext("Pass");?></dd>
+ <dt><i class="fa fa-filter"></i></dt> <dd><?=gettext("Match");?></dd>
+ <dt><i class="fa fa-times text-danger"></i></dt> <dd><?=gettext("Block");?></dd>
+ <dt><i class="fa fa-hand-stop-o text-warning"></i></dt> <dd><?=gettext("Reject");?></dd>
+ <dt><i class="fa fa-tasks"></i></dt> <dd> <?=gettext("Log");?></dd>
+ <dt><i class="fa fa-cog"></i></dt> <dd> <?=gettext("Advanced filter");?></dd>
+ </dl>
- var row = document.getElementById(prefix + id);
- var checkbox = document.getElementById(prefix + 'c' + id);
- var cells = row.getElementsByTagName('td');
- var cellcnt = cells.length;
-
- for (i = 0; i < cellcnt-1; i++) {
- cells[i].style.backgroundColor = checkbox.checked ? "#DDF4FF" : "#FFFFFF";
+<?php
+ if ("FloatingRules" != $if) {
+ print(gettext("Rules are evaluated on a first-match basis (i.e. " .
+ "the action of the first rule to match a packet will be executed). ") . '<br />' .
+ gettext("This means that if you use block rules, you'll have to pay attention " .
+ "to the rule order. Everything that isn't explicitly passed is blocked " .
+ "by default. "));
+ } else {
+ print(gettext("Floating rules are evaluated on a first-match basis (i.e. " .
+ "the action of the first rule to match a packet will be executed) only " .
+ "if the 'quick' option is checked on a rule. Otherwise they will only match if no " .
+ "other rules match. Pay close attention to the rule order and options " .
+ "chosen. If no rule here matches, the per-interface or default rules are used. "));
}
-}
-</script>
+?>
+ </div>
+</div>
-<script>
+<script type="text/javascript">
+//<![CDATA[
events.push(function() {
+
// Make rules sortable
$('table tbody.user-entries').sortable({
cursor: 'grabbing',
@@ -716,16 +741,9 @@ events.push(function() {
// Check all of the rule checkboxes so that their values are posted
$('#order-store').click(function () {
$('[id^=frc]').prop('checked', true);
- alert();
});
-
- // Replace direct delete with quicker front-end action
-/*FIXME: event ordering
- $('.btn-danger').on('click', function(e){
- $(this).parents('tr').remove();
-
- $('#order-store').removeAttr('disabled');
- });
-*/});
+});
+//]]>
</script>
+
<?php include("foot.inc");?>
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php
index c5861ef..4c64853 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -1,13 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_rules_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of pfSense (https://www.pfsense.org)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -39,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,18 +55,16 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: filter
-*/
##|+PRIV
##|*IDENT=page-firewall-rules-edit
-##|*NAME=Firewall: Rules: Edit page
+##|*NAME=Firewall: Rules: Edit
##|*DESCR=Allow access to the 'Firewall: Rules: Edit' page.
##|*MATCH=firewall_rules_edit.php*
##|-PRIV
require("guiconfig.inc");
+require_once("ipsec.inc");
require_once("filter.inc");
require("shaper.inc");
@@ -86,18 +83,19 @@ function is_aoadv_used($rule_config) {
// Note that the user could set "tag" or "tagged" to the string "0", which is valid but empty().
// And if the user enters "0" in other fields, we want to present an error message, and keep the Advanced Options section open.
if ((isset($rule_config['allowopts'])) ||
- (isset($rule_config['disablereplyto'])) ||
- ($rule_config['tag'] != "") ||
- ($rule_config['tagged'] != "") ||
- ($rule_config['max'] != "") ||
- ($rule_config['max-src-nodes'] != "") ||
- ($rule_config['max-src-conn'] != "") ||
- ($rule_config['max-src-states'] != "") ||
- ($rule_config['max-src-conn-rate'] != "") ||
- ($rule_config['max-src-conn-rates'] != "") ||
- ($rule_config['statetimeout'] != "")) {
+ (isset($rule_config['disablereplyto'])) ||
+ ($rule_config['tag'] != "") ||
+ ($rule_config['tagged'] != "") ||
+ ($rule_config['max'] != "") ||
+ ($rule_config['max-src-nodes'] != "") ||
+ ($rule_config['max-src-conn'] != "") ||
+ ($rule_config['max-src-states'] != "") ||
+ ($rule_config['max-src-conn-rate'] != "") ||
+ ($rule_config['max-src-conn-rates'] != "") ||
+ ($rule_config['statetimeout'] != "")) {
return true;
}
+
return false;
}
@@ -277,7 +275,6 @@ if (isset($id) && $a_filter[$id]) {
$pconfig['ackqueue'] = (($a_filter[$id]['ackqueue'] == "none") ? '' : $a_filter[$id]['ackqueue']);
$pconfig['dnpipe'] = (($a_filter[$id]['dnpipe'] == "none") ? '' : $a_filter[$id]['dnpipe']);
$pconfig['pdnpipe'] = (($a_filter[$id]['pdnpipe'] == "none") ? '' : $a_filter[$id]['pdnpipe']);
- $pconfig['l7container'] = (($a_filter[$id]['l7container'] == "none") ? '' : $a_filter[$id]['l7container']);
//schedule support
$pconfig['sched'] = (($a_filter[$id]['sched'] == "none") ? '' : $a_filter[$id]['sched']);
@@ -309,8 +306,6 @@ read_altq_config(); /* XXX: */
$qlist =& get_unique_queue_list();
read_dummynet_config(); /* XXX: */
$dnqlist =& get_unique_dnqueue_list();
-read_layer7_config();
-$l7clist =& get_l7_unique_list();
$a_gatewaygroups = return_gateway_groups_array();
if ($_POST) {
@@ -450,12 +445,12 @@ if ($_POST) {
}
if (isset($a_filter[$id]['associated-rule-id']) === false &&
- (!(is_specialnet($_POST['srctype']) || ($_POST['srctype'] == "single")))) {
+ (!(is_specialnet($_POST['srctype']) || ($_POST['srctype'] == "single")))) {
$reqdfields[] = "srcmask";
$reqdfieldsn[] = "Source bit count";
}
if (isset($a_filter[$id]['associated-rule-id']) === false &&
- (!(is_specialnet($_POST['dsttype']) || ($_POST['dsttype'] == "single")))) {
+ (!(is_specialnet($_POST['dsttype']) || ($_POST['dsttype'] == "single")))) {
$reqdfields[] = "dstmask";
$reqdfieldsn[] = gettext("Destination bit count");
}
@@ -493,7 +488,7 @@ if ($_POST) {
$input_errors[] = 'The same port alias must be used in Source port range from: and to: fields';
}
if ((is_alias($_POST['srcbeginport_cust']) && (!is_alias($_POST['srcendport_cust']) && $_POST['srcendport_cust'] != '')) ||
- ((!is_alias($_POST['srcbeginport_cust']) && $_POST['srcbeginport_cust'] != '') && is_alias($_POST['srcendport_cust']))) {
+ ((!is_alias($_POST['srcbeginport_cust']) && $_POST['srcbeginport_cust'] != '') && is_alias($_POST['srcendport_cust']))) {
$input_errors[] = 'You cannot specify numbers and port aliases at the same time in Source port range from: and to: field';
}
}
@@ -507,7 +502,7 @@ if ($_POST) {
$input_errors[] = 'The same port alias must be used in Destination port range from: and to: fields';
}
if ((is_alias($_POST['dstbeginport_cust']) && (!is_alias($_POST['dstendport_cust']) && $_POST['dstendport_cust'] != '')) ||
- ((!is_alias($_POST['dstbeginport_cust']) && $_POST['dstbeginport_cust'] != '') && is_alias($_POST['dstendport_cust']))) {
+ ((!is_alias($_POST['dstbeginport_cust']) && $_POST['dstbeginport_cust'] != '') && is_alias($_POST['dstendport_cust']))) {
$input_errors[] = 'You cannot specify numbers and port aliases at the same time in Destination port range from: and to: field';
}
}
@@ -614,14 +609,6 @@ if ($_POST) {
if (!empty($_POST['ruleid']) && !ctype_digit($_POST['ruleid'])) {
$input_errors[] = gettext('ID must be an integer');
}
- if ($_POST['l7container'] && $_POST['l7container'] != "") {
- if (!($_POST['proto'] == "tcp" || $_POST['proto'] == "udp" || $_POST['proto'] == "tcp/udp")) {
- $input_errors[] = gettext("You can only select a layer7 container for TCP and/or UDP protocols");
- }
- if ($_POST['type'] <> "pass") {
- $input_errors[] = gettext("You can only select a layer7 container for Pass type rules.");
- }
- }
if (!in_array($_POST['proto'], array("tcp", "tcp/udp"))) {
if (!empty($_POST['max-src-conn'])) {
@@ -656,7 +643,7 @@ if ($_POST) {
}
}
- if (($_POST['statetype'] == "none") && (empty($_POST['l7container']))) {
+ if ($_POST['statetype'] == "none") {
if (!empty($_POST['max'])) {
$input_errors[] = gettext("You cannot specify the maximum state entries (advanced option) if statetype is none and no L7 container is selected.");
}
@@ -702,7 +689,7 @@ if ($_POST) {
}
if ((($_POST['max-src-conn-rate'] <> "" and $_POST['max-src-conn-rates'] == "")) ||
- (($_POST['max-src-conn-rate'] == "" and $_POST['max-src-conn-rates'] <> ""))) {
+ (($_POST['max-src-conn-rate'] == "" and $_POST['max-src-conn-rates'] <> ""))) {
$input_errors[] = gettext("Both maximum new connections per host and the interval (per second(s)) must be specified");
}
@@ -879,10 +866,6 @@ if ($_POST) {
}
}
- if ($_POST['l7container'] != "") {
- $filterent['l7container'] = $_POST['l7container'];
- }
-
if ($_POST['sched'] != "") {
$filterent['sched'] = $_POST['sched'];
}
@@ -964,14 +947,14 @@ function build_flag_table() {
$tcpflags1 .= "<td> <input type='checkbox' name='tcpflags1_{$tcpflag}' value='on' ";
if (array_search($tcpflag, $setflags) !== false) {
- $tcpflags1 .= "checked=\"checked\"";
+ $tcpflags1 .= "checked";
}
$tcpflags1 .= " /></td>\n";
$tcpflags2 .= "<td> <input type='checkbox' name='tcpflags2_{$tcpflag}' value='on' ";
if (array_search($tcpflag, $outofflags) !== false) {
- $tcpflags2 .= "checked=\"checked\"";
+ $tcpflags2 .= "checked";
}
$tcpflags2 .= " /></td>\n";
@@ -983,29 +966,67 @@ function build_flag_table() {
$flagtable .= "</table>";
$flagtable .= '<input type="checkbox" name="tcpflags_any" id="tcpflags_any" value="on"';
- $flagtable .= $pconfig['tcpflags_any'] ? 'checked="checked"':'' . '/>';
+ $flagtable .= $pconfig['tcpflags_any'] ? 'checked':'' . '/>';
$flagtable .= '<strong>' . gettext(" Any flags.") . '</strong>';
return($flagtable);
}
+function build_if_list() {
+ global $config;
+
+ $iflist = array();
+
+ // add group interfaces
+ if (is_array($config['ifgroups']['ifgroupentry'])) {
+ foreach ($config['ifgroups']['ifgroupentry'] as $ifgen) {
+ if (have_ruleint_access($ifgen['ifname'])) {
+ $iflist[$ifgen['ifname']] = $ifgen['ifname'];
+ }
+ }
+ }
+
+ foreach (get_configured_interface_with_descr() as $ifent => $ifdesc) {
+ if (have_ruleint_access($ifent)) {
+ $iflist[$ifent] = $ifdesc;
+ }
+ }
+
+ if ($config['l2tp']['mode'] == "server" && have_ruleint_access("l2tp")) {
+ $iflist['l2tp'] = 'L2TP VPN';
+ }
+
+ if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
+ $iflist['pppoe'] = "PPPoE Server";
+ }
+
+ // add ipsec interfaces
+ if (ipsec_enabled() && have_ruleint_access("enc0")) {
+ $iflist["enc0"] = "IPsec";
+ }
+
+ // add openvpn/tun interfaces
+ if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
+ $iflist["openvpn"] = "OpenVPN";
+ }
+
+ return($iflist);
+}
+
$pgtitle = array(gettext("Firewall"), gettext("Rules"), gettext("Edit"));
$shortcut_section = "firewall";
-$closehead = false;
-
$page_filename = "firewall_rules_edit.php";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Edit Firewall rule');
-if (isset($id))
-{
+if (isset($id)) {
$form->addGlobal(new Form_Input(
'id',
'ID',
@@ -1014,8 +1035,7 @@ if (isset($id))
));
}
-if (isset($a_filter[$id]))
-{
+if (isset($a_filter[$id])) {
$form->addGlobal(new Form_Input(
'tracker',
'Tracker',
@@ -1047,8 +1067,9 @@ $values = array(
'reject' => 'Reject',
);
-if ($if == "FloatingRules" || isset($pconfig['floating']))
+if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$values['match'] = 'Match';
+}
$section->addInput(new Form_Select(
'type',
@@ -1069,10 +1090,9 @@ $section->addInput(new Form_Checkbox(
))->setHelp('Set this option to disable this rule without removing it from the '.
'list.');
-if ($if == "FloatingRules" || isset($pconfig['floating']))
-{
+if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$section->addInput(new Form_Checkbox(
- 'floating',
+ 'quick',
'Quick',
'Apply the action immediately on match.',
$pconfig['quick']
@@ -1082,13 +1102,12 @@ if ($if == "FloatingRules" || isset($pconfig['floating']))
$edit_disabled = isset($pconfig['associated-rule-id']);
-if ($edit_disabled)
-{
+if ($edit_disabled) {
$extra = '';
- foreach ($config['nat']['rule'] as $index => $nat_rule)
- {
- if ($nat_rule['associated-rule-id'] === $pconfig['associated-rule-id'])
+ foreach ($config['nat']['rule'] as $index => $nat_rule) {
+ if ($nat_rule['associated-rule-id'] === $pconfig['associated-rule-id']) {
$extra = '<br/><a href="firewall_nat_edit.php?id='. $index .'">'. gettext('View the NAT rule') .'</a>';
+ }
}
$section->addInput(new Form_StaticText(
@@ -1107,8 +1126,7 @@ if ($edit_disabled)
$pconfig['associated-rule-id']
));
- if (!empty($pconfig['interface']))
- {
+ if (!empty($pconfig['interface'])) {
$form->addGlobal(new Form_Input(
'interface',
null,
@@ -1118,48 +1136,24 @@ if ($edit_disabled)
}
}
-$interfaces = array();
-
-// add group interfaces
-if (is_array($config['ifgroups']['ifgroupentry']))
- foreach ($config['ifgroups']['ifgroupentry'] as $ifgen)
- if (have_ruleint_access($ifgen['ifname']))
- $interfaces[$ifgen['ifname']] = $ifgen['ifname'];
-
-foreach (get_configured_interface_with_descr() as $ifent => $ifdesc)
-{
- if (have_ruleint_access($ifent))
- $interfaces[$ifent] = $ifdesc;
+if ($if == "FloatingRules" || isset($pconfig['floating'])) {
+ $section->addInput($input = new Form_Select(
+ 'interface',
+ 'Interface',
+ explode(",", $pconfig['interface']),
+ build_if_list(),
+ true
+ ))->setHelp('Choose the interface(s) for this rule.');
+} else {
+ $section->addInput($input = new Form_Select(
+ 'interface',
+ 'Interface',
+ $pconfig['interface'],
+ build_if_list()
+ ))->setHelp('Choose the interface from which packets must come to match this rule.');
}
-if ($config['l2tp']['mode'] == "server" && have_ruleint_access("l2tp"))
- $interfaces['l2tp'] = 'L2TP VPN';
-
-if (is_pppoe_server_enabled() && have_ruleint_access("pppoe"))
- $interfaces['pppoe'] = "PPPoE Server";
-
-// add ipsec interfaces
-if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable']) && have_ruleint_access("enc0"))
- $interfaces["enc0"] = "IPsec";
-
-// add openvpn/tun interfaces
-if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"])
- $interfaces["openvpn"] = "OpenVPN";
-
-$section->addInput($input = new Form_Select(
- 'interface',
- 'Interface',
- $pconfig['interface'],
- $interfaces,
- ($if == "FloatingRules" || isset($pconfig['floating']))
-))->setHelp('Choose on which interface packets must come in to match this '.
- 'rule.');
-
-if ($if == "FloatingRules" || isset($pconfig['floating']))
- $input->setHelp('Choose the interface(s) for this rule.');
-
-if ($if == "FloatingRules" || isset($pconfig['floating']))
-{
+if ($if == "FloatingRules" || isset($pconfig['floating'])) {
$section->addInput(new Form_Select(
'direction',
'Direction',
@@ -1181,7 +1175,7 @@ if ($if == "FloatingRules" || isset($pconfig['floating']))
$section->addInput(new Form_Select(
'ipprotocol',
- 'TCP/IP Version',
+ 'Address Family',
$pconfig['ipprotocol'],
array(
'inet' => 'IPv4',
@@ -1267,17 +1261,20 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) {
$ruleValues['(self)'] = "This firewall (self)";
}
- if (isset($a_filter[$id]['floating']) || $if == "FloatingRules")
+ if (isset($a_filter[$id]['floating']) || $if == "FloatingRules") {
$ruleValues['(self)'] = 'This Firewall (self)';
- if (have_ruleint_access("pppoe"))
+ }
+ if (have_ruleint_access("pppoe")) {
$ruleValues['pppoe'] = 'PPPoE clients';
- if (have_ruleint_access("l2tp"))
+ }
+ if (have_ruleint_access("l2tp")) {
$ruleValues['l2tp'] = 'L2TP clients';
+ }
- foreach ($ifdisp as $ifent => $ifdesc)
- {
- if (!have_ruleint_access($ifent))
+ foreach ($ifdisp as $ifent => $ifdesc) {
+ if (!have_ruleint_access($ifent)) {
continue;
+ }
$ruleValues[$ifent] = $ifdesc.' net';
$ruleValues[$ifent.'ip'] = $ifdesc.' address';
@@ -1307,8 +1304,9 @@ foreach (['src' => 'Source', 'dst' => 'Destination'] as $type => $name) {
$portValues = ['' => '(other)', 'any' => 'any'];
- foreach ($wkports as $port => $portName)
+ foreach ($wkports as $port => $portName) {
$portValues[$port] = $portName.' ('. $port .')';
+ }
$group = new Form_Group($name .' port range');
@@ -1366,7 +1364,7 @@ $section->addInput(new Form_Checkbox(
$pconfig['log']
))->setHelp('Hint: the firewall has limited local log space. Don\'t turn on logging '.
'for everything. If you want to do a lot of logging, consider using a remote '.
- 'syslog server (see the <a href="diag_logs_settings.php">Diagnostics: System logs: '.
+ 'syslog server (see the <a href="status_logs_settings.php">Status: System logs: '.
'Settings</a> page).');
$section->addInput(new Form_Input(
@@ -1376,17 +1374,21 @@ $section->addInput(new Form_Input(
$pconfig['descr']
))->setHelp('You may enter a description here for your reference.');
+$adv_open = is_aoadv_used($pconfig);
+
$btnadvanced = new Form_Button(
'toggle-advanced',
'Advanced options'
);
-$btnadvanced->removeClass('btn-primary')->addClass('btn-info');
+$btnadvanced->removeClass('btn-primary')->addClass('btn-default');
-$section->addInput(new Form_StaticText(
- null,
- $btnadvanced
-));
+if (!$adv_open) {
+ $section->addInput(new Form_StaticText(
+ null,
+ $btnadvanced
+ ));
+}
$form->add($section);
@@ -1470,7 +1472,7 @@ $section->addInput(new Form_Input(
'Max. src. conn. Rate',
'number',
$pconfig['max-src-conn-rate']
-))->setHelp('Maximum state entries per host');
+))->setHelp('Maximum new connections per host (TCP only)');
$section->addInput(new Form_Input(
'max-src-conn-rates',
@@ -1478,7 +1480,7 @@ $section->addInput(new Form_Input(
'number',
$pconfig['max-src-conn-rates'],
['min' => 1, 'max' => 255]
-))->setHelp('Maximum new connections per host / per second(s) (TCP only)');
+))->setHelp('/ per how many second(s) (TCP only)');
$section->addInput(new Form_Input(
'statetimeout',
@@ -1503,7 +1505,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Select(
'statetype',
'State type',
- $pconfig['statetype'],
+ (isset($pconfig['statetype'])) ? "keep state":$pconfig['statetype'],
array(
'keep state' => 'Keep',
'sloppy state' => 'Sloppy',
@@ -1520,7 +1522,8 @@ $section->addInput(new Form_Checkbox(
$pconfig['nosync']
))->setHelp('This does NOT prevent the rule from being overwritten on Slave.');
-$vlanprio = array("none", "be", "bk", "ee", "ca", "vi", "vo", "ic", "nc");
+$vlanprio = array("" => "none", "be" => "BE", "bk" => "BK", "ee" => "EE", "ca" => "CA", "vi" => "VI", "vo" => "VO", "ic" => "IC", "nc" => "NC");
+
$section->addInput(new Form_Select(
'vlanprio',
'VLAN Prio',
@@ -1535,39 +1538,42 @@ $section->addInput(new Form_Select(
$vlanprio
))->setHelp('Choose 802.1p priority to apply');
-$schedules = array('none'); //leave none to leave rule enabled all the time
-foreach ((array)$config['schedules']['schedule'] as $schedule)
-{
- if ($schedule['name'] != "")
+$schedules = array();
+foreach ((array)$config['schedules']['schedule'] as $schedule) {
+ if ($schedule['name'] != "") {
$schedules[] = $schedule['name'];
+ }
}
$section->addInput(new Form_Select(
'sched',
'Schedule',
$pconfig['sched'],
- $schedules
+ ['' => 'none'] + array_combine($schedules, $schedules)
))->setHelp('Leave as \'none\' to leave the rule enabled all the time');
$gateways = array("" => 'default');
-foreach (return_gateways_array() as $gwname => $gw)
-{
- if (($pconfig['ipprotocol'] == "inet46"))
+foreach (return_gateways_array() as $gwname => $gw) {
+ if (($pconfig['ipprotocol'] == "inet46")) {
continue;
- if (($pconfig['ipprotocol'] == "inet6") && !(($gw['ipprotocol'] == "inet6") || (is_ipaddrv6($gw['gateway']))))
+ }
+ if (($pconfig['ipprotocol'] == "inet6") && !(($gw['ipprotocol'] == "inet6") || (is_ipaddrv6($gw['gateway'])))) {
continue;
- if (($pconfig['ipprotocol'] == "inet") && !(($gw['ipprotocol'] == "inet") || (is_ipaddrv4($gw['gateway']))))
+ }
+ if (($pconfig['ipprotocol'] == "inet") && !(($gw['ipprotocol'] == "inet") || (is_ipaddrv4($gw['gateway'])))) {
continue;
- if ($gw == "")
+ }
+ if ($gw == "") {
continue;
+ }
$gateways[ $gwname ] = $gw['name'] . (empty($gw['gateway'])? '' : ' - '. $gateway_addr_str);
}
-foreach ((array)$a_gatewaygroups as $gwg_name => $gwg_data)
-{
- if ((empty($pconfig['ipprotocol'])) || ($pconfig['ipprotocol'] == $gwg_data['ipprotocol']))
+foreach ((array)$a_gatewaygroups as $gwg_name => $gwg_data) {
+ if ((empty($pconfig['ipprotocol'])) || ($pconfig['ipprotocol'] == $gwg_data['ipprotocol'])) {
$gateways[ $gwg_name ] = $gwg_name;
+ }
}
$section->addInput(new Form_Select(
@@ -1583,36 +1589,38 @@ $group = new Form_Group('In / Out pipe');
$group->add(new Form_Select(
'dnpipe',
'DNpipe',
- $pconfig['dnpipe'],
- array('' => 'none') + array_keys($dnqlist)
+ (isset($pconfig['dnpipe'])) ? $pconfig['dnpipe']:"",
+ array('' => 'none') + array_combine(array_keys($dnqlist), array_keys($dnqlist))
));
$group->add(new Form_Select(
'pdnpipe',
'PDNpipe',
- $pconfig['pdnpipe'],
- array('' => 'none') + array_keys($dnqlist)
+ (isset($pconfig['pdnpipe'])) ? $pconfig['pdnpipe']:"",
+ array('' => 'none') + array_combine(array_keys($dnqlist), array_keys($dnqlist))
));
$section->add($group)->setHelp('Choose the Out queue/Virtual interface only if '.
'you have also selected In. The Out selection is applied to traffic leaving '.
- 'the interface where the rule is created, In is applied to traffic coming '.
+ 'the interface where the rule is created, the In selection is applied to traffic coming '.
'into the chosen interface.<br />If you are creating a floating rule, if the '.
- 'direction is In then the same rules apply, if the direction is out the '.
- 'selections are reverted Out is for incoming and In is for outgoing.'
+ 'direction is In then the same rules apply, if the direction is Out the '.
+ 'selections are reversed, Out is for incoming and In is for outgoing.'
);
$group = new Form_Group('Ackqueue / Queue');
$list = array('' => 'none');
-if(!is_array($qlist))
+if (!is_array($qlist)) {
$qlist = array();
+}
foreach ($qlist as $q => $qkey) {
- if (isset($ifdisp[$q]))
+ if (isset($ifdisp[$q])) {
$list[$q] = $ifdisp[$q];
- else
+ } else {
$list[$q] = $q;
+ }
}
$group->add(new Form_Select(
@@ -1633,33 +1641,22 @@ $section->add($group)->setHelp('Choose the Acknowledge Queue only if you have '.
'selected Queue.'
);
-$section->addInput(new Form_Select(
- 'l7container',
- 'Layer7',
- $pconfig['l7container'],
- array_keys($l7clist)
-))->setHelp('Choose a Layer7 container to apply application protocol inspection '.
- 'rules. These are valid for TCP and UDP protocols only.');
-
$has_created_time = (isset($a_filter[$id]['created']) && is_array($a_filter[$id]['created']));
$has_updated_time = (isset($a_filter[$id]['updated']) && is_array($a_filter[$id]['updated']));
-if ($has_created_time || $has_updated_time)
-{
+if ($has_created_time || $has_updated_time) {
$form->add($section);
$section = new Form_Section('Rule Information');
- if ($has_created_time)
- {
+ if ($has_created_time) {
$section->addInput(new Form_StaticText(
'Created',
date('n/j/y H:i:s', $a_filter[$id]['created']['time']) . gettext(' by ') .'<b>'. $a_filter[$id]['created']['username'] .'</b>'
));
}
- if ($has_updated_time)
- {
+ if ($has_updated_time) {
$section->addInput(new Form_StaticText(
'Updated',
date('n/j/y H:i:s', $a_filter[$id]['updated']['time']) . gettext(' by ') .'<b>'. $a_filter[$id]['updated']['username'] .'</b>'
@@ -1671,9 +1668,9 @@ $form->add($section);
echo $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
var portsenabled = 1;
var editenabled = 1;
@@ -1684,8 +1681,9 @@ events.push(function(){
if (($('#srcbeginport').find(":selected").index() == 0) && portsenabled && editenabled) {
disableInput('srcbeginport_cust', false);
} else {
- if (editenabled)
+ if (editenabled) {
$('#srcbeginport_cust').val("");
+ }
disableInput('srcbeginport_cust', true);
}
@@ -1693,8 +1691,9 @@ events.push(function(){
if (($('#srcendport').find(":selected").index() == 0) && portsenabled && editenabled) {
disableInput('srcendport_cust', false);
} else {
- if (editenabled)
+ if (editenabled) {
$('#srcendport_cust').val("");
+ }
disableInput('srcendport_cust', true);
}
@@ -1702,8 +1701,9 @@ events.push(function(){
if (($('#dstbeginport').find(":selected").index() == 0) && portsenabled && editenabled) {
disableInput('dstbeginport_cust', false);
} else {
- if (editenabled)
+ if (editenabled) {
$('#dstbeginport_cust').val("");
+ }
disableInput('dstbeginport_cust', true);
}
@@ -1711,8 +1711,9 @@ events.push(function(){
if (($('#dstendport').find(":selected").index() == 0) && portsenabled && editenabled) {
disableInput('dstendport_cust', false);
} else {
- if (editenabled)
+ if (editenabled) {
$('#dstendport_cust').val("");
+ }
disableInput('dstendport_cust', true);
}
@@ -1844,11 +1845,13 @@ events.push(function(){
typesel_change();
- hideClass('advanced-options', true);
+ hideClass('advanced-options', ! "<?=$adv_open?>");
hideClass('srcportrange', true);
<?php if ((!empty($pconfig['srcbeginport']) && $pconfig['srcbeginport'] != "any") || (!empty($pconfig['srcendport']) && $pconfig['srcendport'] != "any")): ?>
+ srcportsvisible = true;
show_source_port_range();
+ hideInput('btnsrcadv', true);
<?php endif; ?>
// Make it a regular button, not a submit
@@ -1896,19 +1899,20 @@ events.push(function(){
proto_change();
});
-
$('#toggle-advanced').click(function() {
optionsvisible = 1;
hideClass('advanced-options', false);
- if ($('#tcpflags_any').prop('checked'))
+ if ($('#tcpflags_any').prop('checked')) {
$('.table-flags').addClass('hidden');
+ }
});
$('#tcpflags_any').click(function () {
- if (this.checked)
+ if (this.checked) {
$('.table-flags').addClass('hidden');
- else
+ } else {
$('.table-flags').removeClass('hidden');
+ }
});
// Change help text based on the selector value
@@ -1917,18 +1921,19 @@ events.push(function(){
}
function setOptText(target, val) {
- var dispstr = '<font color="green">';
+ var dispstr = '<span class="text-success">';
- if (val == 'keep state')
- dispstr += 'Keep: works with all IP protocols</font>';
- else if (val == 'sloppy state')
+ if (val == 'keep state') {
+ dispstr += 'Keep: works with all IP protocols';
+ } else if (val == 'sloppy state') {
dispstr += 'Sloppy: works with all IP protocols';
- else if (val == 'synproxy state')
+ } else if (val == 'synproxy state') {
dispstr += 'Synproxy: proxies incoming TCP connections to help protect servers from spoofed TCP SYN floods. This option includes the functionality of keep state and modulate state combined';
- else if (val == 'none')
+ } else if (val == 'none') {
dispstr += 'None: Do not use state mechanisms to keep track. This is only useful if you\'re doing advanced queueing in certain situations';
+ }
- dispstr += '</font>';
+ dispstr += '</span>';
setHelpText(target, dispstr);
}
diff --git a/src/usr/local/www/firewall_schedule.php b/src/usr/local/www/firewall_schedule.php
index d52884f..c057b0a 100644
--- a/src/usr/local/www/firewall_schedule.php
+++ b/src/usr/local/www/firewall_schedule.php
@@ -4,9 +4,9 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of pfSense (https://www.pfsense.org)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -38,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,17 +55,15 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: schedules
-*/
+
##|+PRIV
##|*IDENT=page-firewall-schedules
-##|*NAME=Firewall: Schedules page
+##|*NAME=Firewall: Schedules
##|*DESCR=Allow access to the 'Firewall: Schedules' page.
##|*MATCH=firewall_schedule.php*
##|-PRIV
-define('CLOCK', '&#x1f550;');
+define('CLOCK', '<i class="fa fa-clock-o icon-black"></i>');
$dayArray = array (gettext('Mon'), gettext('Tues'), gettext('Wed'), gettext('Thur'), gettext('Fri'), gettext('Sat'), gettext('Sun'));
$monthArray = array (gettext('January'), gettext('February'), gettext('March'), gettext('April'), gettext('May'), gettext('June'), gettext('July'), gettext('August'), gettext('September'), gettext('October'), gettext('November'), gettext('December'));
@@ -113,8 +111,9 @@ if ($_GET['act'] == "del") {
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
?>
<div class="panel panel-default">
@@ -183,23 +182,24 @@ foreach ($a_schedules as $schedule):
$currentDay++;
if (($currentDay != $nextDay) || ($tempmontharray[$arraycounter] != $tempmontharray[$arraycounter+1])) {
- if ($firstPrint)
+ if ($firstPrint) {
$dayFriendly .= "<br />";
+ }
$currentDay--;
- if ($currentDay != $firstDay)
+ if ($currentDay != $firstDay) {
$dayFriendly .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ;
- else
+ } else {
$dayFriendly .= $monthArray[$month-1] . " " . $day;
+ }
$firstDayFound = false;
$firstPrint = true;
}
$arraycounter++;
}
- }
- else {
+ } else {
$tempdayFriendly = $timerange['position'];
$firstDayFound = false;
$tempFriendlyDayArray = explode(",", $tempdayFriendly);
@@ -210,8 +210,7 @@ foreach ($a_schedules as $schedule):
foreach ($tempFriendlyDayArray as $day) {
if ($day != "") {
- if (!$firstDayFound)
- {
+ if (!$firstDayFound) {
$firstDay = $tempFriendlyDayArray[$counter];
$firstDayFound = true;
}
@@ -222,15 +221,17 @@ foreach ($a_schedules as $schedule):
$currentDay++;
if ($currentDay != $nextDay) {
- if ($firstprint)
+ if ($firstprint) {
$dayFriendly .= "<br />";
+ }
$currentDay--;
- if ($currentDay != $firstDay)
+ if ($currentDay != $firstDay) {
$dayFriendly .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
- else
+ } else {
$dayFriendly .= $dayArray[$firstDay-1];
+ }
$firstDayFound = false;
$firstprint = true;
@@ -255,8 +256,8 @@ foreach ($a_schedules as $schedule):
</td>
<td>
- <a href="firewall_schedule_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext("Edit")?></a>
- <a href="firewall_schedule.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit schedule"); ?>" href="firewall_schedule_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete schedule")?>" href="firewall_schedule.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
@@ -269,14 +270,19 @@ endforeach;
</div>
</div>
-<?=($i > 0) ? gettext(CLOCK . ' Indicates that the schedule is currently active.'):''?>
+<?=($i > 0) ? CLOCK . gettext(' Indicates that the schedule is currently active.'):''?>
<nav class="action-buttons">
- <a href="firewall_schedule_edit.php" class="btn btn-sm btn-success"><?=gettext("Add new schedule")?></a>
+ <a href="firewall_schedule_edit.php" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
-<?php
+<div id="infoblock">
+ <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'), info)?>
+</div>
-print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'));
+<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_schedule_edit.php b/src/usr/local/www/firewall_schedule_edit.php
index 7be4f09..c40f4fc 100644
--- a/src/usr/local/www/firewall_schedule_edit.php
+++ b/src/usr/local/www/firewall_schedule_edit.php
@@ -4,9 +4,9 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
- * Originally part of pfSense (https://www.pfsense.org)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -38,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: schedules
-*/
##|+PRIV
##|*IDENT=page-firewall-schedules-edit
-##|*NAME=Firewall: Schedules: Edit page
+##|*NAME=Firewall: Schedules: Edit
##|*DESCR=Allow access to the 'Firewall: Schedules: Edit' page.
##|*MATCH=firewall_schedule_edit.php*
##|-PRIV
@@ -73,8 +70,9 @@ function schedulecmp($a, $b) {
function schedule_sort() {
global $g, $config;
- if (!is_array($config['schedules']['schedule']))
+ if (!is_array($config['schedules']['schedule'])) {
return;
+ }
usort($config['schedules']['schedule'], "schedulecmp");
}
@@ -91,16 +89,19 @@ $referer = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '/firew
$dayArray = array (gettext('Mon'), gettext('Tues'), gettext('Wed'), gettext('Thur'), gettext('Fri'), gettext('Sat'), gettext('Sun'));
$monthArray = array (gettext('January'), gettext('February'), gettext('March'), gettext('April'), gettext('May'), gettext('June'), gettext('July'), gettext('August'), gettext('September'), gettext('October'), gettext('November'), gettext('December'));
-if (!is_array($config['schedules']['schedule']))
+if (!is_array($config['schedules']['schedule'])) {
$config['schedules']['schedule'] = array();
+}
$a_schedules = &$config['schedules']['schedule'];
-if (is_numericint($_GET['id']))
+if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
+}
-if (isset($_POST['id']) && is_numericint($_POST['id']))
+if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
+}
if (isset($id) && $a_schedules[$id]) {
$pconfig['name'] = $a_schedules[$id]['name'];
@@ -112,27 +113,32 @@ if (isset($id) && $a_schedules[$id]) {
if ($_POST) {
- if (strtolower($_POST['name']) == "lan")
+ if (strtolower($_POST['name']) == "lan") {
$input_errors[] = gettext("Schedule may not be named LAN.");
+ }
- if (strtolower($_POST['name']) == "wan")
+ if (strtolower($_POST['name']) == "wan") {
$input_errors[] = gettext("Schedule may not be named WAN.");
+ }
- if (strtolower($_POST['name']) == "")
+ if (strtolower($_POST['name']) == "") {
$input_errors[] = gettext("Schedule name cannot be blank.");
+ }
$x = is_validaliasname($_POST['name']);
if (!isset($x)) {
$input_errors[] = gettext("Reserved word used for schedule name.");
} else {
- if (is_validaliasname($_POST['name']) == false)
+ if (is_validaliasname($_POST['name']) == false) {
$input_errors[] = gettext("The schedule name may only consist of the characters a-z, A-Z, 0-9");
+ }
}
/* check for name conflicts */
foreach ($a_schedules as $schedule) {
- if (isset($id) && ($a_schedules[$id]) && ($a_schedules[$id] === $schedule))
+ if (isset($id) && ($a_schedules[$id]) && ($a_schedules[$id] === $schedule)) {
continue;
+ }
if ($schedule['name'] == $_POST['name']) {
$input_errors[] = gettext("A Schedule with this name already exists.");
@@ -169,21 +175,16 @@ if ($_POST) {
$timedescrstr = htmlentities($_POST['timedescr' . $x], ENT_QUOTES, 'UTF-8');
$dashpos = strpos($timestr, '-');
- if ($dashpos === false)
- {
+ if ($dashpos === false) {
$timeparts['position'] = $timestr;
- }
- else
- {
+ } else {
$tempindarray = array();
$monthstr = "";
$daystr = "";
$tempindarray = explode(",", $timestr);
- foreach ($tempindarray as $currentselection)
- {
+ foreach ($tempindarray as $currentselection) {
if ($currentselection) {
- if ($firstprint)
- {
+ if ($firstprint) {
$monthstr .= ",";
$daystr .= ",";
}
@@ -206,39 +207,41 @@ if ($_POST) {
}
}
- if (!$timerangeFound)
+ if (!$timerangeFound) {
$input_errors[] = gettext("The schedule must have at least one time range configured.");
+ }
if (!$input_errors) {
- if (!empty($pconfig['schedlabel']))
+ if (!empty($pconfig['schedlabel'])) {
$schedule['schedlabel'] = $pconfig['schedlabel'];
- else
+ } else {
$schedule['schedlabel'] = uniqid();
+ }
if (isset($id) && $a_schedules[$id]) {
$a_schedules[$id] = $schedule;
- }
- else {
+ } else {
$a_schedules[] = $schedule;
}
schedule_sort();
- if (write_config())
+ if (write_config()) {
filter_configure();
+ }
header("Location: firewall_schedule.php");
exit;
}
//we received input errors, copy data to prevent retype
- else
- {
- if (!$_POST['schedule0'])
+ else {
+ if (!$_POST['schedule0']) {
$getSchedule = false;
- else
+ } else {
$getSchedule = true;
+ }
$pconfig['name'] = $schedule['name'];
$pconfig['descr'] = $schedule['descr'];
@@ -260,8 +263,9 @@ function build_date_table() {
for ($k = 0; $k < 12; $k++) {
$firstdayofmonth = date("w", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter)));
- if ($firstdayofmonth == 0)
+ if ($firstdayofmonth == 0) {
$firstdayofmonth = 7;
+ }
$daycounter = 1;
//number of day in month
@@ -273,10 +277,11 @@ function build_date_table() {
$mostr = '<div id="' . date("F_y", mktime(0, 0, 0, date($monthcounter), 1, date($yearcounter))) ;
$mostr .= '" style="position:relative; display:';
- if ($firstmonth)
+ if ($firstmonth) {
$mostr .= "block";
- else
+ } else {
$mostr .= "none";
+ }
$mostr .= '" class="col-md-6">';
@@ -301,8 +306,7 @@ function build_date_table() {
while ($daycounter<=$numberofdays) {
$weekcounter = date("W", mktime(0, 0, 0, date($monthcounter), date($daycounter), date($yearcounter)));
$weekcounter = ltrim($weekcounter, "0");
- if ($positioncounter == 1)
- {
+ if ($positioncounter == 1) {
$mostr .= "<tr>";
}
@@ -313,22 +317,18 @@ function build_date_table() {
$daycounter++;
$firstdayprinted = TRUE;
$mostr .= "</td>";
- }
- elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays) {
+ } elseif ($firstdayprinted == TRUE && $daycounter <= $numberofdays) {
$mostr .= '<td class="text-center" style="cursor: pointer;" id="w' . $weekcounter . 'p' . $positioncounter . '" onclick="daytoggle(\'w' . $weekcounter . 'p' . $positioncounter . '-m' . $monthcounter . 'd' . $daycounter . '\');">' . $daycounter . "\r\n";
$daycounter++;
$mostr .= "</td>";
- }
- else
- {
+ } else {
$mostr .= '<td class="text-center"></td>';
}
if ($positioncounter == 7 || $daycounter > $numberofdays) {
$positioncounter = 1;
$mostr .= "</tr>";
- }
- else {
+ } else {
$positioncounter++;
}
@@ -338,13 +338,10 @@ function build_date_table() {
$mostr .= gettext('Click individual date to select that date only. Click the appropriate weekday Header to select all occurrences of that weekday. ');
$mostr .= '</div>';
- if ($monthcounter == 12)
- {
+ if ($monthcounter == 12) {
$monthcounter = 1;
$yearcounter++;
- }
- else
- {
+ } else {
$monthcounter++;
}
@@ -368,9 +365,7 @@ function build_month_list() {
if ($monthcounter == 12) {
$monthcounter = 1;
$yearcounter++;
- }
- else
- {
+ } else {
$monthcounter++;
}
}
@@ -378,10 +373,9 @@ function build_month_list() {
return($list);
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -397,8 +391,9 @@ $input = new Form_Input(
$input->setHelp((is_schedule_inuse($pconfig['name']) != true) ? 'The name of the alias may only consist of the characters a-z, A-Z and 0-9':
'This schedule is in use so the name may not be modified!');
-if (is_schedule_inuse($pconfig['name']) == true)
+if (is_schedule_inuse($pconfig['name']) == true) {
$input->setReadonly();
+}
$section->addInput($input);
@@ -531,16 +526,14 @@ if ($getSchedule) {
$weeknumber = date("W", mktime(0, 0, 0, date($month), date($day), date("Y")));
$weeknumber = ltrim($weeknumber, "0");
- if ($firstPrint)
- {
+ if ($firstPrint) {
$tempID .= ",";
}
$tempID .= "w" . $weeknumber . "p" . $daypos . "-m" . $month . "d" . $day;
$firstPrint = true;
- if (!$firstDayFound)
- {
+ if (!$firstDayFound) {
$firstDay = $day;
$firstmonth = $month;
$firstDayFound = true;
@@ -550,15 +543,17 @@ if ($getSchedule) {
$nextDay = $tempdayarray[$arraycounter+1];
$currentDay++;
if (($currentDay != $nextDay) || ($tempmontharray[$arraycounter] != $tempmontharray[$arraycounter+1])) {
- if ($firstprint2)
+ if ($firstprint2) {
$tempFriendlyTime .= ", ";
+ }
$currentDay--;
- if ($currentDay != $firstDay)
+ if ($currentDay != $firstDay) {
$tempFriendlyTime .= $monthArray[$firstmonth-1] . " " . $firstDay . " - " . $currentDay ;
- else
+ } else {
$tempFriendlyTime .= $monthArray[$month-1] . " " . $day;
+ }
$firstDayFound = false;
$firstprint2 = true;
@@ -566,9 +561,7 @@ if ($getSchedule) {
$arraycounter++;
}
- }
- else
- {
+ } else {
$dayFriendly = $timerange['position'];
$tempID = $dayFriendly;
}
@@ -588,8 +581,7 @@ if ($getSchedule) {
if (!$timerange['month']) {
foreach ($tempFriendlyDayArray as $day) {
if ($day != "") {
- if (!$firstDayFound)
- {
+ if (!$firstDayFound) {
$firstDay = $tempFriendlyDayArray[$i];
$firstDayFound = true;
}
@@ -600,15 +592,17 @@ if ($getSchedule) {
$currentDay++;
if ($currentDay != $nextDay) {
- if ($firstprint)
+ if ($firstprint) {
$tempFriendlyTime .= ", ";
+ }
$currentDay--;
- if ($currentDay != $firstDay)
+ if ($currentDay != $firstDay) {
$tempFriendlyTime .= $dayArray[$firstDay-1] . " - " . $dayArray[$currentDay-1];
- else
+ } else {
$tempFriendlyTime .= $dayArray[$firstDay-1];
+ }
$firstDayFound = false;
$firstprint = true;
@@ -681,7 +675,7 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
//Update the calendar when a new month is selected
$('#monthsel').on('change', function() {
@@ -723,8 +717,9 @@ var schCounter = 0;
function rgb2hex(rgb) {
var parts = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
- if (parts == null)
+ if (parts == null) {
return;
+ }
function hex(x) {
return ("0" + parseInt(x).toString(16)).slice(-2);
@@ -733,7 +728,7 @@ function rgb2hex(rgb) {
return ("#" + hex(parts[1]) + hex(parts[2]) + hex(parts[3])).toUpperCase();
}
-function repeatExistingDays(){
+function repeatExistingDays() {
var tempstr, tempstrdaypos, week, daypos, dayposdone = "";
var dayarray = daysSelected.split(",");
@@ -751,17 +746,18 @@ function repeatExistingDays(){
tempstr = 'w' + week + 'p' + daypos;
daycell = eval('document.getElementById(tempstr)');
if (daydone == "-1") {
- if (rgb2hex(daycell.style.backgroundColor) == "#F08080") // lightcoral
+ if (rgb2hex(daycell.style.backgroundColor) == "#F08080") { // lightcoral
daytogglerepeating(week,daypos,true);
- else
+ } else {
daytogglerepeating(week,daypos,false);
+ }
dayposdone += daypos + ",";
}
}
}
-function daytogglerepeating(week,daypos,bExists){
+function daytogglerepeating(week, daypos, bExists) {
var tempstr, daycell, dayoriginal = "";
for (j=1; j<=53; j++) {
@@ -775,9 +771,7 @@ function daytogglerepeating(week,daypos,bExists){
if (daycell != null) {
if (bExists) {
daycell.style.backgroundColor = "#FFFFFF"; // white
- }
- else
- {
+ } else {
daycell.style.backgroundColor = "#F08080"; // lightcoral
}
@@ -805,9 +799,7 @@ function daytoggle(id) {
idmod = id;
runrepeat = true;
var daypos = id.substr(tempstrdaypos+1);
- }
- else
- {
+ } else {
idmod = id.substring(0, iddashpos);
var daypos = id.substring(tempstrdaypos+1, iddashpos);
}
@@ -822,28 +814,19 @@ function daytoggle(id) {
daycell.style.backgroundColor = "#FFFFFF"; // white
str = id + ",";
daysSelected = daysSelected.replace(str, "");
- }
- else if (rgb2hex(daycell.style.backgroundColor) == "#F08080") // lightcoral
- {
+ } else if (rgb2hex(daycell.style.backgroundColor) == "#F08080") { // lightcoral
daytogglerepeating(week,daypos,true);
- }
- else //color is white cell
- {
- if (!runrepeat)
- {
+ } else { //color is white cell
+ if (!runrepeat) {
daycell.style.backgroundColor = "#FF0000"; // red
- }
- else
- {
+ } else {
daycell.style.backgroundColor = "#F08080"; // lightcoral
daytogglerepeating(week,daypos,false);
}
daysSelected += id + ",";
}
bFoundValid = true;
- }
- else
- {
+ } else {
//we found an invalid cell when column was clicked, move up to the next week
week++;
tempstr = "w" + week + "p" + daypos;
@@ -860,21 +843,19 @@ function update_month() {
option = document.forms[0].monthsel.options[i].text;
document.popupMonthLayer = eval('document.getElementById (option)');
- if (selected == option)
+ if (selected == option) {
document.popupMonthLayer.style.display="block";
- else
+ } else {
document.popupMonthLayer.style.display="none";
+ }
}
}
function checkForRanges() {
- if (daysSelected != "")
- {
+ if (daysSelected != "") {
alert("You have not saved the specified time range. Please click 'Add Time' button to save the time range.");
return false;
- }
- else
- {
+ } else {
return true;
}
}
@@ -890,14 +871,11 @@ function processEntries() {
stoptimemin = parseInt(document.getElementById("stoptimemin").value);
//do time checks
- if (starttimehour > stoptimehour)
- {
+ if (starttimehour > stoptimehour) {
errors = "Error: Start Hour cannot be greater than Stop Hour.";
passedValidiation = false;
- }
- else if (starttimehour == stoptimehour)
- {
+ } else if (starttimehour == stoptimehour) {
if (starttimemin > stoptimemin) {
errors = "Error: Start Minute cannot be greater than Stop Minute.";
passedValidiation = false;
@@ -906,10 +884,10 @@ function processEntries() {
if (passedValidiation) {
addTimeRange();
- }
- else {
- if (errors != "")
+ } else {
+ if (errors != "") {
alert(errors);
+ }
}
}
@@ -933,8 +911,7 @@ function addTimeRange() {
for (u = 0; u < 99; u++) {
findCurrentCounter = document.getElementById("schedule" + u);
- if (!findCurrentCounter)
- {
+ if (!findCurrentCounter) {
schCounter = u;
break;
}
@@ -943,18 +920,15 @@ function addTimeRange() {
if (daysSelected != "") {
//get days selected
- for (i = 0; i < tempdayarray.length; i++)
- {
+ for (i = 0; i < tempdayarray.length; i++) {
tempstr = tempdayarray[i];
- if (tempstr != "")
- {
+ if (tempstr != "") {
tempstrdaypos = tempstr.search("p");
week = tempstr.substring(1, tempstrdaypos);
week = parseInt(week);
dashpos = tempstr.search("-");
- if (dashpos != "-1")
- {
+ if (dashpos != "-1") {
var nonrepeatingfound = true;
daypos = tempstr.substring(tempstrdaypos+1, dashpos);
daypos = parseInt(daypos);
@@ -967,9 +941,7 @@ function addTimeRange() {
monthstr += month + ",";
daystr += day + ",";
nrtempID += tempstr + ",";
- }
- else
- {
+ } else {
var repeatingfound = true;
daypos = tempstr.substr(tempstrdaypos+1);
daypos = parseInt(daypos);
@@ -990,8 +962,7 @@ function addTimeRange() {
for (k = 0; k < tempFriendlyMonthArray.length; k++) {
tempstr = tempFriendlyMonthArray[k];
if (tempstr != "") {
- if (!firstDayFound)
- {
+ if (!firstDayFound) {
firstDay = tempFriendlyDayArray[k];
firstDay = parseInt(firstDay);
firstMonth = tempFriendlyMonthArray[k];
@@ -1008,15 +979,17 @@ function addTimeRange() {
currentDay++;
if ((currentDay != nextDay) || (tempFriendlyMonthArray[k] != tempFriendlyMonthArray[k+1])) {
- if (firstprint)
+ if (firstprint) {
nrtempFriendlyTime += ", ";
+ }
currentDay--;
- if (currentDay != firstDay)
+ if (currentDay != firstDay) {
nrtempFriendlyTime += month_array[firstMonth-1] + " " + firstDay + "-" + currentDay;
- else
+ } else {
nrtempFriendlyTime += month_array[firstMonth-1] + " " + currentDay;
+ }
firstDayFound = false;
firstprint = true;
@@ -1035,8 +1008,7 @@ function addTimeRange() {
for (k = 0; k < tempFriendlyDayArray.length; k++) {
tempstr = tempFriendlyDayArray[k];
if (tempstr != "") {
- if (!firstDayFound)
- {
+ if (!firstDayFound) {
firstDay = tempFriendlyDayArray[k];
firstDay = parseInt(firstDay);
firstDayFound = true;
@@ -1050,15 +1022,17 @@ function addTimeRange() {
currentDay++;
if (currentDay != nextDay) {
- if (firstprint)
+ if (firstprint) {
rtempFriendlyTime += ", ";
+ }
currentDay--;
- if (currentDay != firstDay)
+ if (currentDay != firstDay) {
rtempFriendlyTime += day_array[firstDay-1] + " - " + day_array[currentDay-1];
- else
+ } else {
rtempFriendlyTime += day_array[firstDay-1];
+ }
firstDayFound = false;
firstprint = true;
@@ -1074,15 +1048,14 @@ function addTimeRange() {
//clear tempID
rtempID = "";
- for (t = 0; t < tempsortArray.length; t++)
- {
+ for (t = 0; t < tempsortArray.length; t++) {
if (tempsortArray[t] != "") {
if (!isFirstdone) {
rtempID += tempsortArray[t];
isFirstdone = true;
- }
- else
+ } else {
rtempID += "," + tempsortArray[t];
+ }
}
}
@@ -1118,9 +1091,7 @@ function addTimeRange() {
insertElements(rtempFriendlyTime, starttimehour, starttimemin, stoptimehour, stoptimemin, tempdescr, rtempTime, rtempID);
}
- }
- else
- {
+ } else {
//no days were selected, alert user
alert ("You must select at least 1 day before adding time");
}
@@ -1131,8 +1102,7 @@ function clearCalendar() {
//clear days selected
daysSelected = "";
//loop through all 52 weeks
- for (j = 1; j <= 53; j++)
- {
+ for (j = 1; j <= 53; j++) {
//loop through all 7 days
for (k = 1; k < 8; k++) {
tempstr = 'w' + j + 'p' + k;
@@ -1166,7 +1136,7 @@ function insertElements(tempFriendlyTime, starttimehour, starttimemin, stoptimeh
rows_displayed = counter;
}
- // Template for the schedule deifinition. '@' will be replaced with the row number using .replace()
+ // Template for the schedule definition. '@' will be replaced with the row number using .replace()
rowhtml =
'<div class="form-group schedulegrp' + counter + '">' +
'<label for="tempFriendlyTime" class="col-sm-2 control-label"></label>' +
@@ -1222,4 +1192,4 @@ function delete_row(row) {
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php
index e83bd39..a4e35f7 100644
--- a/src/usr/local/www/firewall_shaper.php
+++ b/src/usr/local/www/firewall_shaper.php
@@ -1,15 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_shaper.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2008 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,20 +52,14 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall
- pfSense_MODULE: shaper
-*/
##|+PRIV
##|*IDENT=page-firewall-trafficshaper
-##|*NAME=Firewall: Traffic Shaper page
+##|*NAME=Firewall: Traffic Shaper
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper' page.
##|*MATCH=firewall_shaper.php*
##|-PRIV
-require_once('classes/Form.class.php');
-
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
@@ -81,7 +72,7 @@ if ($_GET['reset'] != "") {
exit;
}
-$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"));
+$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Interfaces"));
$shortcut_section = "trafficshaper";
$shaperIFlist = get_configured_interface_with_descr();
@@ -127,7 +118,6 @@ if ($interface) {
$dontshow = false;
$newqueue = false;
-$output_form = "";
$dfltmsg = false;
if ($_GET) {
@@ -209,44 +199,50 @@ if ($_GET) {
$q = new altq_root_queue();
} else {
$input_errors[] = gettext("Could not create new queue/discipline!");
- }
+ }
- if ($q) {
- $q->SetInterface($interface);
- $sform = $q->build_form();
- $newjavascript = $q->build_javascript();
- unset($q);
- $newqueue = true;
- }
- break;
+ if ($q) {
+ $q->SetInterface($interface);
+ $sform = $q->build_form();
+ $sform->addGlobal(new Form_Input(
+ 'parentqueue',
+ null,
+ 'hidden',
+ $qname
+ ));
+
+ $newjavascript = $q->build_javascript();
+ unset($q);
+ $newqueue = true;
+ }
+ break;
case "show":
if ($queue) {
$sform = $queue->build_form();
- //$output_form .= $queue->build_form();
- }
- else
+ } else {
$input_errors[] = gettext("Queue not found!");
+ }
break;
case "enable":
if ($queue) {
- $queue->SetEnabled("on");
- $output_form .= $queue->build_form();
- if (write_config()) {
- mark_subsystem_dirty('shaper');
- }
+ $queue->SetEnabled("on");
+ $sform = $queue->build_form();
+ if (write_config()) {
+ mark_subsystem_dirty('shaper');
+ }
} else {
- $input_errors[] = gettext("Queue not found!");
+ $input_errors[] = gettext("Queue not found!");
}
break;
case "disable":
if ($queue) {
$queue->SetEnabled("");
- $output_form .= $queue->build_form();
+ $sform = $queue->build_form();
if (write_config()) {
mark_subsystem_dirty('shaper');
}
} else {
- $input_errors[] = gettext("Queue not found!");
+ $input_errors[] = gettext("Queue not found!");
}
break;
default:
@@ -298,8 +294,7 @@ if ($_POST) {
}
read_altq_config();
- $output_form .= $altq->build_form();
-
+ $sform = $altq->build_form();
} else if ($parentqueue) { /* Add a new queue */
$qtmp =& $altq->find_queue($interface, $parentqueue);
if ($qtmp) {
@@ -332,7 +327,7 @@ if ($_POST) {
}
}
read_altq_config();
- $output_form .= $tmp->build_form();
+ $sform = $tmp->build_form();
} else {
$input_errors[] = gettext("Could not add new queue.");
}
@@ -357,10 +352,10 @@ if ($_POST) {
clear_subsystem_dirty('shaper');
if ($queue) {
- $output_form .= $queue->build_form();
+ $sform = $queue->build_form();
$dontshow = false;
} else {
- $output_form .= $default_shaper_message;
+ $sform = $default_shaper_message;
$dontshow = true;
}
} else if ($queue) {
@@ -374,7 +369,7 @@ if ($_POST) {
$dontshow = false;
}
read_altq_config();
- $output_form .= $queue->build_form();
+ $sform = $queue->build_form();
} else {
$dfltmsg = true;
$dontshow = true;
@@ -405,7 +400,6 @@ if ($queue) {
}
//$pgtitle = "Firewall: Shaper: By Interface View";
-$closehead = false;
include("head.inc");
$tree = '<ul class="tree" >';
@@ -418,30 +412,32 @@ if (is_array($altq_list_queues)) {
$tree .= "</ul>";
-if ($queue)
+if ($queue) {
print($queue->build_javascript());
+}
print($newjavascript);
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('shaper'))
+if (is_subsystem_dirty('shaper')) {
print_info_box_np(gettext("The traffic shaper configuration has been changed. You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("By Interface"), true, "firewall_shaper.php");
$tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
-$tab_array[] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
$tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
-<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
<div class="table-responsive">
@@ -455,7 +451,7 @@ print($tree);
if (count($altq_list_queues) > 0) {
?>
- <a href="firewall_shaper.php?action=resetall" class="btn btn-sm btn-danger"/>
+ <a href="firewall_shaper.php?action=resetall" class="btn btn-sm btn-danger">
<?=gettext('Remove Shaper')?>
</a>
<?php
@@ -465,37 +461,38 @@ if (count($altq_list_queues) > 0) {
<td>
<?php
-if ($dfltmsg)
- print_info_box($default_shaper_msg);
-else {
+if (!$dfltmsg) {
// Add global buttons
if (!$dontshow || $newqueue) {
if ($can_add || $addnewaltq) {
- if ($queue)
+ if ($queue) {
$url = 'firewall_shaper.php?interface='. $interface . '&queue=' . $queue->GetQname() . '&action=add';
- else
+ } else {
$url = 'firewall_shaper.php?interface='. $interface . '&action=add';
+ }
$sform->addGlobal(new Form_Button(
'add',
'Add new Queue',
$url
))->removeClass('btn-default')->addClass('btn-success');
+
}
- if ($queue)
+ if ($queue) {
$url = 'firewall_shaper.php?interface='. $interface . '&queue=' . $queue->GetQname() . '&action=delete';
- else
+ } else {
$url = 'firewall_shaper.php?interface='. $interface . '&action=delete';
+ }
$sform->addGlobal(new Form_Button(
'delete',
$queue ? 'Delete this queue':'Disable shaper on interface',
$url
))->removeClass('btn-default')->addClass('btn-danger');
+
}
- // Print the form
print($sform);
}
?>
@@ -506,4 +503,13 @@ else {
</div>
<?php
-include("foot.inc"); \ No newline at end of file
+if ($dfltmsg) {
+?>
+<div>
+ <div id="infoblock">
+ <?=print_info_box($default_shaper_msg, info)?>
+ </div>
+</div>
+<?php
+}
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_shaper_layer7.php b/src/usr/local/www/firewall_shaper_layer7.php
deleted file mode 100644
index 0ee2287..0000000
--- a/src/usr/local/www/firewall_shaper_layer7.php
+++ /dev/null
@@ -1,614 +0,0 @@
-<?php
-/* $Id$ */
-/*
- firewall_shaper_layer7.php
-*/
-/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2008 Helder Pereira, André Ribeiro
- *
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
- *
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
- *
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
- *
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
- *
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
- *
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * ====================================================================
- *
- */
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall
- pfSense_MODULE: shaper
-*/
-
-##|+PRIV
-##|*IDENT=page-firewall-trafficshaper-layer7
-##|*NAME=Firewall: Traffic Shaper: Layer7 page
-##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Layer7' page.
-##|*MATCH=firewall_shaper_layer7.php*
-##|-PRIV
-
-require("guiconfig.inc");
-require_once('classes/Form.class.php');
-require_once("functions.inc");
-require_once("filter.inc");
-require_once("shaper.inc");
-
-$dfltmsg = false;
-
-// Variables protocols (dynamic) and structures (static)
-$avail_protos =& generate_protocols_array();
-$avail_structures = array("action", "queue", "limiter");
-
-// Available behaviours
-$avail_behaviours_action = array("block");
-read_altq_config();
-$avail_behaviours_altq = get_altq_name_list();
-read_dummynet_config();
-$avail_behaviours_limiter = get_dummynet_name_list();
-$show_proto_form = false;
-
-//More variables
-$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Layer7"));
-$shortcut_section = "trafficshaper";
-
-$default_layer7shaper_msg = '<br />' .
- gettext('You can add new layer7 protocol patterns by simply uploading the file') .
- ' <a href="diag_patterns.php">' . gettext('here') . '</a>';
-
-read_layer7_config();
-
-$sform = new Form(false);
-
-if ($_GET['reset'] != "") {
- // kill all ipfw-classifyd processes
- mwexec("killall -9 ipfw-classifyd");
- exit;
-}
-
-if ($_GET) {
- if ($_GET['container']) {
- $name = htmlspecialchars(trim($_GET['container']));
- }
- if ($_GET['action']) {
- $action = htmlspecialchars($_GET['action']);
- }
-}
-
-if ($_POST) {
- if ($_POST['container']) {
- $name = htmlspecialchars(trim($_POST['container']));
- }
-}
-
-if ($name) {
- //Get the object from the 7rules list
- $container = $layer7_rules_list[$name];
-}
-
-if ($_GET) {
- switch ($action) {
- case "add":
- $show_proto_form = true;
- $container = new layer7();
- $sform = $container->build_form(); //constructs the graphical interface on the right side
- unset($container);
- break;
- case "show":
- $show_proto_form = true;
- if ($container) {
- $sform = $container->build_form();
- }
- else {
- $show_proto_form = false;
- $input_errors[] = gettext("Layer7 Rules Container not found!");
- }
- break;
- default:
- echo log_error("Get default");
- $show_proto_form = false;
- $dfltmsg = true;
- break;
- }
-}
-
-//add a new l7rules container
-if ($_POST) {
- $show_proto_form = true;
- unset($input_errors);
-
- if ($_POST['Submit']) {
-
- if (isset($layer7_rules_list[$name])) {
- $l7r = $layer7_rules_list[$name];
- $_POST['divert_port'] = $l7r->GetRPort();
- } else {
- $l7r =& new layer7();
- $_POST['divert_port'] = $l7r->gen_divert_port();
- }
- for ($i = 0; $_POST['protocol'][$i] <> ""; $i++) {
- $_POST['l7rules'][$i]['protocol'] = $_POST['protocol'][$i];
- $_POST['l7rules'][$i]['structure'] = $_POST['structure'][$i];
- $_POST['l7rules'][$i]['behaviour'] = $_POST['behaviour'][$i];
- }
- $l7r->validate_input($_POST, $input_errors);
- $l7r->ReadConfig($_POST['container'], $_POST);
- //Before writing the results, we need to test for repeated protocols
- $non_dupes = array();
- $dupes = array();
- for ($j = 0; $j < $i; $j++) {
- if (!$non_dupes[$_POST['protocol'][$j]]) {
- $non_dupes[$_POST['protocol'][$j]] = true;
- } else {
- $dupes[] = $_POST['protocol'][$j];
- }
- }
-
- unset($non_dupes);
- if (sizeof($dupes) == 0 && !$input_errors) {
- $l7r->wconfig();
- if (write_config()) {
- mark_subsystem_dirty('shaper');
- }
-
- read_layer7_config();
- } else {
- if (sizeof($dupes) > 0) {
- $dupe_error = gettext("Found the following repeated protocol definitions") . ": ";
- foreach ($dupes as $dupe) {
- $dupe_error .= "$dupe ";
- }
- $input_errors[] .= $dupe_error;
- }
- }
-
- unset($dupes);
- unset($dupe_error);
- //Even if there are repeated protocols, we won't lose any previous values
- //The user will be able to solve the situation
- $sform = $l7r->build_form();
- //Necessary to correctly build the proto form
- $container = $layer7_rules_list[$name];
- if ($input_errors) {
- $container =& $l7r;
- }
- } else if ($_POST['apply']) {
- write_config();
-
- $retval = 0;
- $retval = filter_configure();
- $savemsg = get_std_save_message($retval);
-
- if (stristr($retval, "error") <> true) {
- $savemsg = get_std_save_message($retval);
- } else {
- $savemsg = $retval;
- }
-
- clear_subsystem_dirty('shaper');
-
- if ($container) {
- $sform = $container->build_form();
- } else {
- $show_proto_form = false;
- $dfltmsg = true;
- }
- } else if ($_POST['delete']) {
- $container->delete_l7c();
- if (write_config()) {
- mark_subsystem_dirty('shaper');
- }
- unset($container);
-
- header("Location: firewall_shaper_layer7.php");
- exit;
- } else {
- $show_proto_form = false;
- }
-}
-
-if (!$_GET && !$_POST) {
- $show_proto_form = false;
- $dfltmsg = true;
-}
-
-// Builds the left tree
-$tree = "<ul class=\"tree\" >";
-if (is_array($layer7_rules_list)) {
- foreach ($layer7_rules_list as $tmpl7) {
- $tree .= $tmpl7->build_tree();
- }
-}
-
-$tree .= "</ul>";
-
-include("head.inc");
-?>
-
-<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
-<script type="text/javascript" src="./tree/tree.js"></script>
-
-<script type="text/javascript">
-//<![CDATA[
-var initial_count = new Array();
-var rows_limit = 0; // Set to 0 to disable limitation
-
-/* Build the behaviours arrays in javascript */
-var js_behaviours_action = ['block']; //static
-
-var js_behaviours_altq = new Array();
-js_behaviours_altq = array_altq(js_behaviours_altq);
-
-var js_behaviours_limiter = new Array();
-js_behaviours_limiter = array_limiter(js_behaviours_limiter);
-
-function array_altq(a_behav) {
- var index;
- <?php if (!empty($avail_behaviours_altq)) {
- foreach ($avail_behaviours_altq as $key => $queue) { ?>
- name = "<?= $queue; ?>";
- index = <?= $key; ?>;
- a_behav[index] = name;
- <?php }
- } ?>
- return a_behav;
-}
-
-function array_limiter(a_behav) {
- var index;
- <?php
- if (!empty($avail_behaviours_limiter)) {
- foreach ($avail_behaviours_limiter as $key => $limiter) { ?>
- name = "<?= $limiter; ?>";
- index = <?= $key; ?>;
- a_behav[index] = name;
- <?php
- }
- } ?>
- return a_behav;
-}
-
-/* Fill the variables with available protocols, structures and behaviours */
-function fillProtocol() {
- var protocol = '<select class="form-control" name="protocol[]">';
- var name;
-
- <?php foreach ($avail_protos as $key => $proto) { ?>
- name = "<?= $proto; ?>";
- protocol += "<option value=" + name + ">" + name + "<\/option>";
- <?php } ?>
- protocol += "<\/select>";
-
- return protocol;
-}
-
-function fillStructure() {
- var structure = '<select class="form-control" name="structure[]" onchange="changeBehaviourValues(this.parentNode.parentNode);">';
- var name;
- <?php foreach ($avail_structures as $key => $struct) { ?>
- name = "<?= $struct; ?>";
- if (name == "queue") {
- if (js_behaviours_altq != "") { structure += "<option value=" + name + ">" + name + "<\/option>";}
- }
- else {
- if (name == "limiter") {
- if (js_behaviours_limiter != "") { structure += "<option value=" + name + ">" + name + "<\/option>";}
- }
- else structure += "<option value=" + name + ">" + name + "<\/option>"; //action
- }
- <?php } ?>
- structure += "<\/select>";
-
- return structure;
-}
-
-//Used by default to fill the values when inserting a new row.
-function fillBehaviour() {
- var behaviour = '<select class="form-control" name="behaviour[]">';
- var name;
- <?php foreach ($avail_behaviours_action as $key => $behav) { ?>
- name = "<?= $behav; ?>";
- behaviour += "<option value=" + name + ">" + name + "<\/option>";
- <?php } ?>
- behaviour += "<\/select>";
-
- return behaviour;
-}
-
-/* Change the values on behaviours select when changing the structure row */
-function changeBehaviourValues(row) {
-
- var selectedRow = row.rowIndex - 1; // The header is counted as the first row
- var structureSelected = document.getElementsByName("structure[]")[selectedRow].value;
-
- //Select the behaviours values to array a_behav
- var a_behav = new Array();
-
- if (structureSelected == "action") {
- a_behav = js_behaviours_action; //static
- } else {
- if (structureSelected == "queue") {
- a_behav = js_behaviours_altq;
- } else {
- a_behav = js_behaviours_limiter;
- }
- }
-
-
- //Build the html statement with the array values previously selected
- var new_behav;
- var name;
- for (i = 0; i < a_behav.length; i++) {
- new_behav += "<option value=" + a_behav[i] + ">" + a_behav[i] + "<\/option>";
- }
-
- document.getElementsByName("behaviour[]")[selectedRow].innerHTML = new_behav;
-}
-
-/* Add row to the table */
-function addRow(table_id) {
- var tbl = document.getElementById(table_id);
-
- // counting rows in table
- var rows_count = tbl.rows.length;
- if (initial_count[table_id] == undefined) {
- // if it is first adding in this table setting initial rows count
- initial_count[table_id] = rows_count;
- }
- // determining real count of added fields
- var tFielsNum = rows_count - initial_count[table_id];
- if (rows_limit != 0 && tFielsNum >= rows_limit) return false;
-
- var remove = '<a class="btn btn-default" onclick="removeRow(\''+table_id+'\',this.parentNode.parentNode)">Remove<\/a>';
-
- try {
- var newRow = tbl.insertRow(rows_count);
- var newCell = newRow.insertCell(0);
- newCell.innerHTML = fillProtocol();
- var newCell = newRow.insertCell(1);
- newCell.innerHTML = fillStructure();
- var newCell = newRow.insertCell(2);
- newCell.innerHTML = fillBehaviour();
- var newCell = newRow.insertCell(3);
- newCell.innerHTML = remove;
- }
- catch (ex) {
- //if exception occurs
- alert(ex);
- }
-}
-
-/* Remove row from the table */
-function removeRow(tbl, row) {
- var table = document.getElementById(tbl);
- try {
- table.deleteRow(row.rowIndex);
- } catch (ex) {
- alert(ex);
- }
-}
-//]]>
-</script>
-
-<?php
-// This function creates a table of rule selectors which are then inserted into the form
-// using a StaticText class. While not pretty this maintains compatibility with all of
-// the above javascript
-
-function build_l7table() {
- global $container, $avail_protos, $avail_structures, $avail_behaviours_altq, $avail_behaviours_limiter,
- $avail_behaviours_action;
-
- $tbl = '<table id="newtbl" class="table table-hover table-condensed">'; // No stripes for this table
- $tbl .= '<thead><tr><th>Protocol</th><th>Structure</th><th>Behavior</th></tr></thead>';
- $tbl .= '<tbody>';
-
- if ($container) {
- foreach ($container->rsets as $l7rule) {
-
- $tbl .= '<tr><td>';
- $tbl .= '<select name="protocol[]" class="form-control">';
-
- foreach ($avail_protos as $proto):
- $tbl .= '<option value="' . $proto . '"';
-
- if ($proto == $l7rule->GetRProtocol())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $proto . '</option>';
-
- endforeach;
-
- $tbl .= '</select></td><td>';
- $tbl .= '<select name="structure[]" class="form-control" onchange="changeBehaviourValues(this.parentNode.parentNode);">';
-
- foreach ($avail_structures as $struct) {
- if ($struct == "queue") {
- if (!empty($avail_behaviours_altq)) {
- $tbl .= '<option value="' . $struct . '"';
- if ($struct == $l7rule->GetRStructure())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $struct . '</option>';
- }
- }
- else {
- if ($struct == "limiter") {
- if (!empty($avail_behaviours_limiter)) {
- $tbl .= '<option value="' . $struct . '"';
- if ($struct == $l7rule->GetRStructure())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $struct . '</option>';
- }
- }
- else {
- if ($struct == "action") {
- $tbl .= '<option value="' . $struct . '"';
- if ($struct == $l7rule->GetRStructure())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $struct . '</option>';
- }
- }
- }
- }
-
- $tbl .= '</select></td><td>';
-
- $tbl .= '<select name="behaviour[]" class="form-control">';
-
- if ($l7rule->GetRStructure() == "action"):
- foreach ($avail_behaviours_action as $behaviour):
- $tbl .= '<option value="' . $behaviour . '"';
- if ($behaviour == $l7rule->GetRBehaviour())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $behaviour . '</option>';
-
- endforeach;
-
- $tbl .= '</select>';
-
- endif;
-
- if ($l7rule->GetRStructure() == "queue"):
- foreach ($avail_behaviours_altq as $behaviour):
-
- $tbl .= '<option value="' . $behaviour . '"';
- if ($behaviour == $l7rule->GetRBehaviour())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $behaviour . '</option>';
-
- endforeach;
-
- $tbl .= '</select>';
-
- endif;
-
- if ($l7rule->GetRStructure() == "limiter"):
- foreach ($avail_behaviours_limiter as $behaviour):
- $tbl .= '<option value="' . $behaviour . '"';
- if ($behaviour == $l7rule->GetRBehaviour())
- $tbl .= ' selected="selected"';
-
- $tbl .= '>' . $behaviour . '</option>';
-
- endforeach;
-
- $tbl .= '</select>';
-
- endif;
-
- $tbl .= '</td><td>';
- $tbl .= '<a type="button" class="btn btn-default" onclick="removeRow(\'newtbl\',this.parentNode.parentNode); return false;" href="#">';
- $tbl .= gettext('Remove') . '</a>';
- $tbl .= '</td></tr>';
-
-
- } //end foreach
- } //end if
-
- $tbl .= '</tbody></table>';
-
- $tbl .= '<a id="addrow" type="button" onclick="javascript:addRow(\'newtbl\'); return false;" href="#" class="btn btn-sm btn-success">' . gettext('Add row') .
- '</a>';
-
- return($tbl);
-}
-
-if ($input_errors)
- print_input_errors($input_errors);
-
-if ($savemsg)
- print_info_box($savemsg, 'success');
-
-if (is_subsystem_dirty('shaper'))
- print_info_box_np(gettext("The traffic shaper configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
-
-$tab_array = array();
-$tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php");
-$tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
-$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
-$tab_array[] = array(gettext("Layer7"), true, "firewall_shaper_layer7.php");
-$tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
-display_top_tabs($tab_array);
-
-// Create a StaticText control and populate it with the rules table
-if (!$dfltmsg) {
- $section = new Form_Section('Add one (or more) rules');
-
- $section->addInput(new Form_StaticText(
- 'Rule(s)',
- build_l7table()
- ));
-
- $sform->add($section);
-}
-?>
-
- <div class="panel panel-default">
- <div class="panel-heading" align="center"><h2 class="panel-title">Layer 7</h2></div>
- <div class="panel-body">
- <div class="form-group">
- <div class="col-sm-2 ">
- <?=$tree?>
- <br />
- <a href="firewall_shaper_layer7.php?action=add" class="btn btn-sm btn-success">
- <?=gettext("Create new L7<br />rule group")?>
- </a>
- </div>
- <div class="col-sm-10">
-<?php
-if ($dfltmsg)
- print_info_box($output_form = $dn_default_shaper_msg . $default_layer7shaper_msg);
-else
- print($sform);
-?>
- </div>
- </div>
- </div>
- </div>
-
-
-<?php
-include("foot.inc"); \ No newline at end of file
diff --git a/src/usr/local/www/firewall_shaper_queues.php b/src/usr/local/www/firewall_shaper_queues.php
index 190ca28..7cd5b1f 100644
--- a/src/usr/local/www/firewall_shaper_queues.php
+++ b/src/usr/local/www/firewall_shaper_queues.php
@@ -1,15 +1,12 @@
<?php
-/* $Id$ */
-/* NEW
+/*
firewall_shaper_queues.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2008 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall
- pfSense_MODULE: shaper
-*/
##|+PRIV
##|*IDENT=page-firewall-trafficshaper-queues
-##|*NAME=Firewall: Traffic Shaper: Queues page
+##|*NAME=Firewall: Traffic Shaper: Queues
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Queues' page.
##|*MATCH=firewall_shaper_queues.php*
##|-PRIV
@@ -132,12 +125,12 @@ if ($_GET) {
*/
foreach ($altq_list_queues as $altq) {
$qtmp =& $altq->find_queue("", $qname);
-
+
if ($qtmp) {
$copycfg = array();
$qtmp->copy_queue($interface, $copycfg);
$aq =& $altq_list_queues[$interface];
-
+
if ($qname == $qtmp->GetInterface()) {
$config['shaper']['queue'][] = $copycfg;
} else if ($aq) {
@@ -163,8 +156,9 @@ if ($_GET) {
$config['shaper']['queue'][] = $newroot;
}
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('shaper');
+ }
break;
}
@@ -180,17 +174,19 @@ if ($_GET) {
if ($altq) {
$qtmp =& $altq->find_queue("", $qname);
- if ($qtmp)
+ if ($qtmp) {
$output .= $qtmp->build_shortform();
- else
+ } else {
$output .= build_iface_without_this_queue($if, $qname);
-
+ }
} else {
- if (!is_altq_capable($ifdesc['if']))
+ if (!is_altq_capable($ifdesc['if'])) {
continue;
+ }
- if (!isset($ifdesc['enable']) && $if != "lan" && $if != "wan")
+ if (!isset($ifdesc['enable']) && $if != "lan" && $if != "wan") {
continue;
+ }
$output .= build_iface_without_this_queue($if, $qname);
}
@@ -220,31 +216,31 @@ if ($_POST['apply']) {
clear_subsystem_dirty('shaper');
}
-$pgtitle = gettext("Firewall: Shaper: By Queues View");
+$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Queues"));
$shortcut_section = "trafficshaper";
-$closehead = false;
include("head.inc");
?>
-<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
<?php
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
-if (is_subsystem_dirty('shaper'))
+if (is_subsystem_dirty('shaper')) {
print_info_box_np(gettext("The traffic shaper configuration has been changed. You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[] = array(gettext("By Queue"), true, "firewall_shaper_queues.php");
$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
-$tab_array[] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
$tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
diff --git a/src/usr/local/www/firewall_shaper_vinterface.php b/src/usr/local/www/firewall_shaper_vinterface.php
index f0b9f7b..506a525 100644
--- a/src/usr/local/www/firewall_shaper_vinterface.php
+++ b/src/usr/local/www/firewall_shaper_vinterface.php
@@ -1,15 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_shaper_vinterface.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2008 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,19 +52,14 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall
- pfSense_MODULE: shaper
-*/
##|+PRIV
##|*IDENT=page-firewall-trafficshaper-limiter
-##|*NAME=Firewall: Traffic Shaper: Limiter page
+##|*NAME=Firewall: Traffic Shaper: Limiter
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Limiter' page.
##|*MATCH=firewall_shaper_vinterface.php*
##|-PRIV
-require_once('classes/Form.class.php');
require("guiconfig.inc");
require_once("functions.inc");
require_once("filter.inc");
@@ -148,7 +140,7 @@ if ($_GET) {
header("Location: firewall_shaper_vinterface.php");
exit;
}
- $output_form .= $queue->build_form();
+ $sform= $queue->build_form();
} else {
$input_errors[] = sprintf(gettext("No queue with name %s was found!"), $qname);
$output_form .= $dn_default_shaper_msg;
@@ -180,13 +172,15 @@ if ($_GET) {
$retval = filter_configure();
$savemsg = get_std_save_message($retval);
- if (stristr($retval, "error") != true)
+ if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message($retval);
- else
+ } else {
$savemsg = $retval;
+ }
- } else
+ } else {
$savemsg = gettext("Unable to write config.xml (Access Denied?)");
+ }
$dfltmsg = true;
@@ -200,8 +194,9 @@ if ($_GET) {
} else if ($addnewpipe) {
$q = new dnpipe_class();
$q->SetQname($pipe);
- } else
+ } else {
$input_errors[] = gettext("Could not create new queue/discipline!");
+ }
if ($q) {
$sform = $q->build_form();
@@ -211,30 +206,35 @@ if ($_GET) {
}
break;
case "show":
- if ($queue)
+ if ($queue) {
$sform = $queue->build_form();
- else
+ } else {
$input_errors[] = gettext("Queue not found!");
+ }
break;
case "enable":
if ($queue) {
$queue->SetEnabled("on");
$sform = $queue->build_form();
$queue->wconfig();
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('shaper');
- } else
+ }
+ } else {
$input_errors[] = gettext("Queue not found!");
+ }
break;
case "disable":
if ($queue) {
$queue->SetEnabled("");
$sform = $queue->build_form();
$queue->wconfig();
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('shaper');
- } else
+ }
+ } else {
$input_errors[] = gettext("Queue not found!");
+ }
break;
default:
$dfltmsg = true;
@@ -290,8 +290,9 @@ if ($_POST) {
}
read_dummynet_config();
$sform = $tmp->build_form();
- } else
+ } else {
$input_errors[] = gettext("Could not add new queue.");
+ }
} else if ($_POST['apply']) {
write_config();
@@ -299,10 +300,11 @@ if ($_POST) {
$retval = filter_configure();
$savemsg = get_std_save_message($retval);
- if (stristr($retval, "error") != true)
+ if (stristr($retval, "error") != true) {
$savemsg = get_std_save_message($retval);
- else
+ } else {
$savemsg = $retval;
+ }
/* XXX: TODO Make dummynet pretty graphs */
// enable_rrd_graphing();
@@ -312,8 +314,7 @@ if ($_POST) {
if ($queue) {
$sform = $queue->build_form();
$dontshow = false;
- }
- else {
+ } else {
$output_form .= $dn_default_shaper_message;
$dontshow = true;
}
@@ -323,8 +324,9 @@ if ($_POST) {
if (!$input_errors) {
$queue->update_dn_data($_POST);
$queue->wconfig();
- if (write_config())
+ if (write_config()) {
mark_subsystem_dirty('shaper');
+ }
$dontshow = false;
}
read_dummynet_config();
@@ -341,14 +343,16 @@ if (!$_POST && !$_GET) {
}
if ($queue) {
- if ($queue->GetEnabled())
+ if ($queue->GetEnabled()) {
$can_enable = true;
- else
+ } else {
$can_enable = false;
+ }
if ($queue->CanHaveChildren()) {
$can_add = true;
- } else
+ } else {
$can_add = false;
+ }
}
$tree = "<ul class=\"tree\" >";
@@ -361,10 +365,8 @@ $tree .= "</ul>";
$output = "<table summary=\"output form\">";
$output .= $output_form;
-$closehead = false;
include("head.inc");
?>
-<link rel="stylesheet" type="text/css" media="all" href="./tree/tree.css" />
<script type="text/javascript" src="./tree/tree.js"></script>
<script type="text/javascript">
@@ -387,20 +389,22 @@ if ($queue) {
echo $newjavascript;
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('shaper'))
+if (is_subsystem_dirty('shaper')) {
print_info_box_np(gettext("The traffic shaper configuration has been changed. You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
$tab_array[] = array(gettext("Limiter"), true, "firewall_shaper_vinterface.php");
-$tab_array[] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
$tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
?>
@@ -411,23 +415,24 @@ display_top_tabs($tab_array);
<tr class="tabcont">
<td class="col-md-1">
<?=$tree?>
- <a href="firewall_shaper_vinterface.php?pipe=new&amp;action=add" class="btn btn-sm btn-success"/>
+ <a href="firewall_shaper_vinterface.php?pipe=new&amp;action=add" class="btn btn-sm btn-success">
<?=gettext('New Limiter')?>
</a>
</td>
<td>
<?php
-if ($dfltmsg)
+if ($dfltmsg) {
print_info_box($dn_default_shaper_msg);
-else {
+} else {
// Add global buttons
if (!$dontshow || $newqueue) {
if ($can_add || $addnewaltq) {
- if ($queue)
+ if ($queue) {
$url = 'href="firewall_shaper_vinterface.php?pipe=' . $pipe . '&queue=' . $queue->GetQname() . '&action=add';
- else
+ } else {
$url = 'firewall_shaper.php?pipe='. $pipe . '&action=add';
+ }
$sform->addGlobal(new Form_Button(
'add',
@@ -436,10 +441,11 @@ else {
))->removeClass('btn-default')->addClass('btn-success');
}
- if ($queue)
+ if ($queue) {
$url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&queue=' . $queue->GetQname() . '&action=delete';
- else
+ } else {
$url = 'firewall_shaper_vinterface.php?pipe='. $pipe . '&action=delete';
+ }
$sform->addGlobal(new Form_Button(
'delete',
@@ -449,7 +455,10 @@ else {
}
// Print the form
- print($sform);
+ if($sform) {
+ $sform->setAction("firewall_shaper_vinterface.php");
+ print($sform);
+ }
}
?>
@@ -459,33 +468,33 @@ else {
</table>
</div>
-<script>
-//<![CDATA[
-events.push(function(){
-
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+
// Disables the specified input element
function disableInput(id, disable) {
- $('#' + id).prop("disabled", disable);
- }
+ $('#' + id).prop("disabled", disable);
+ }
function change_masks() {
- disableInput('maskbits', ($('#scheduler').val() == 'none'));
- disableInput('maskbitsv6', ($('#scheduler').val() == 'none'));
+ disableInput('maskbits', ($('#mask').val() == 'none'));
+ disableInput('maskbitsv6', ($('#mask').val() == 'none'));
}
-
+
// ---------- On initial page load ------------------------------------------------------------
-
+
change_masks();
-
+
// ---------- Click checkbox handlers ---------------------------------------------------------
- $('#scheduler').on('change', function() {
+ $('#mask').on('change', function() {
change_masks();
- });
+ });
});
-//]]>
+//]]>
</script>
-
-
+
+
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_shaper_wizards.php b/src/usr/local/www/firewall_shaper_wizards.php
index 7ea8e55..fec62a2 100644
--- a/src/usr/local/www/firewall_shaper_wizards.php
+++ b/src/usr/local/www/firewall_shaper_wizards.php
@@ -1,15 +1,12 @@
<?php
-/* $Id$ */
/*
firewall_shaper_wizards.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2008 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall
- pfSense_MODULE: shaper
-*/
##|+PRIV
##|*IDENT=page-firewall-trafficshaper-wizard
-##|*NAME=Firewall: Traffic Shaper: Wizard page
+##|*NAME=Firewall: Traffic Shaper: Wizard
##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Wizard' page.
##|*MATCH=firewall_shaper_wizards.php*
##|-PRIV
@@ -107,25 +100,26 @@ $wizards = array(
gettext("Dedicated Links") => "traffic_shaper_wizard_dedicated.xml",
);
-$closehead = false;
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php");
$tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php");
$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php");
-$tab_array[] = array(gettext("Layer7"), false, "firewall_shaper_layer7.php");
$tab_array[] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php");
display_top_tabs($tab_array);
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('shaper'))
+if (is_subsystem_dirty('shaper')) {
print_info_box_np(gettext("The traffic shaper configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
?>
<div class="panel panel-default">
@@ -148,4 +142,4 @@ endforeach;
</div>
</div>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_virtual_ip.php b/src/usr/local/www/firewall_virtual_ip.php
index fdd1eda..59ac887 100644
--- a/src/usr/local/www/firewall_virtual_ip.php
+++ b/src/usr/local/www/firewall_virtual_ip.php
@@ -1,13 +1,13 @@
<?php
-/* $Id$ */
/*
firewall_virtual_ip.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 22003-2005 Manuel Kasper <mk@neon1.net>
- * part of pfSense (https://www.pfsense.org/)
+ * Copyright (c) 2005 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -39,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,14 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-firewall-virtualipaddresses
-##|*NAME=Firewall: Virtual IP Addresses page
+##|*NAME=Firewall: Virtual IP Addresses
##|*DESCR=Allow access to the 'Firewall: Virtual IP Addresses' page.
##|*MATCH=firewall_virtual_ip.php*
##|-PRIV
@@ -275,14 +271,15 @@ $types = array('proxyarp' => 'Proxy ARP',
$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Addresses"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-else if ($savemsg)
+} else if ($savemsg) {
print_info_box($savemsg, 'success');
-else if (is_subsystem_dirty('vip'))
+} else if (is_subsystem_dirty('vip')) {
print_info_box_np(gettext("The VIP configuration has been changed.")."<br />".gettext("You must apply the changes in order for them to take effect."));
+}
-/* active tabs
+/* active tabs
$tab_array = array();
$tab_array[] = array(gettext("Virtual IPs"), true, "firewall_virtual_ip.php");
$tab_array[] = array(gettext("CARP Settings"), false, "system_hasync.php");
@@ -307,8 +304,9 @@ display_top_tabs($tab_array);
$interfaces = get_configured_interface_with_descr(false, true);
$carplist = get_configured_carp_interface_list();
-foreach ($carplist as $cif => $carpip)
+foreach ($carplist as $cif => $carpip) {
$interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")";
+}
$interfaces['lo0'] = "Localhost";
@@ -320,15 +318,19 @@ foreach ($a_vip as $vipent):
<tr>
<td>
<?php
- if (($vipent['type'] == "single") || ($vipent['type'] == "network"))
- if ($vipent['subnet_bits'])
+ if (($vipent['type'] == "single") || ($vipent['type'] == "network")) {
+ if ($vipent['subnet_bits']) {
print("{$vipent['subnet']}/{$vipent['subnet_bits']}");
+ }
+ }
- if ($vipent['type'] == "range")
- print("{$vipent['range']['from']}-{$vipent['range']['to']}");
+ if ($vipent['type'] == "range") {
+ print("{$vipent['range']['from']}-{$vipent['range']['to']}");
+ }
- if ($vipent['mode'] == "carp")
- print(" (vhid: {$vipent['vhid']})");
+ if ($vipent['mode'] == "carp") {
+ print(" (vhid: {$vipent['vhid']})");
+ }
?>
</td>
<td>
@@ -341,8 +343,8 @@ foreach ($a_vip as $vipent):
<?=htmlspecialchars($vipent['descr'])?>
</td>
<td>
- <a href="firewall_virtual_ip_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="firewall_virtual_ip.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit virtual ip"); ?>" href="firewall_virtual_ip_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete virtual ip")?>" href="firewall_virtual_ip.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -356,12 +358,16 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="firewall_virtual_ip_edit.php" class="btn btn-sm btn-success"><?=gettext('Add Virtual IP')?></a>
+ <a href="firewall_virtual_ip_edit.php" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
-<?php
-
-print_info_box(gettext('The virtual IP addresses defined on this page may be used in ') . '<a href="firewall_nat.php">' . gettext('NAT') . '</a>' . gettext(' mappings.') . '<br />' .
- gettext('You can check the status of your CARP Virtual IPs and interfaces ') . '<a href="carp_status.php">' . gettext('here') . '</a>');
+<div id="infoblock">
+ <?=print_info_box(gettext('The virtual IP addresses defined on this page may be used in ') . '<a href="firewall_nat.php">' . gettext('NAT') . '</a>' . gettext(' mappings.') . '<br />' .
+ gettext('You can check the status of your CARP Virtual IPs and interfaces ') . '<a href="status_carp.php">' . gettext('here') . '</a>', info)?>
+</div>
-include("foot.inc"); \ No newline at end of file
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php
index 7ccf55e..a4a91f1 100644
--- a/src/usr/local/www/firewall_virtual_ip_edit.php
+++ b/src/usr/local/www/firewall_virtual_ip_edit.php
@@ -1,14 +1,13 @@
<?php
-/* $Id$ */
/*
-
firewall_virtual_ip_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004 Scott Ullrich
* Copyright (c) 2005 Bill Marquette <bill.marquette@gmail.com>
- * Originally part of pfSense (https://www.pfsense.org)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -57,14 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-firewall-virtualipaddress-edit
-##|*NAME=Firewall: Virtual IP Address: Edit page
+##|*NAME=Firewall: Virtual IP Address: Edit
##|*DESCR=Allow access to the 'Firewall: Virtual IP Address: Edit' page.
##|*MATCH=firewall_virtual_ip_edit.php*
##|-PRIV
@@ -117,7 +112,7 @@ if (isset($id) && $a_vip[$id]) {
$pconfig['descr'] = $a_vip[$id]['descr'];
$pconfig['type'] = $a_vip[$id]['type'];
$pconfig['interface'] = $a_vip[$id]['interface'];
- $pconfig['uniqid'] = $a_vip[$id]['interface'];
+ $pconfig['uniqid'] = $a_vip[$id]['uniqid'];
} else {
$lastvhid = find_last_used_vhid();
$lastvhid++;
@@ -146,20 +141,20 @@ if ($_POST) {
if (isset($id) && isset($a_vip[$id])) {
$ignore_if = $a_vip[$id]['interface'];
$ignore_mode = $a_vip[$id]['mode'];
- if (isset($a_vip[$id]['vhid'])) {
- $ignore_vhid = $a_vip[$id]['vhid'];
+ if (isset($a_vip[$id]['uniqid'])) {
+ $ignore_uniqid = $a_vip[$id]['uniqid'];
}
} else {
$ignore_if = $_POST['interface'];
$ignore_mode = $_POST['mode'];
}
- if (!isset($ignore_vhid)) {
- $ignore_vhid = $_POST['vhid'];
+ if (!isset($ignore_uniqid)) {
+ $ignore_uniqid = $_POST['uniqid'];
}
if ($ignore_mode == 'carp') {
- $ignore_if .= "_vip{$ignore_vhid}";
+ $ignore_if = "_vip{$ignore_uniqid}";
} else {
$ignore_if .= "_virtualip{$id}";
}
@@ -203,19 +198,26 @@ if ($_POST) {
case 'carp':
/* verify against reusage of vhids */
$idtracker = 0;
- foreach($config['virtualip']['vip'] as $vip) {
- if($vip['vhid'] == $_POST['vhid'] && $vip['interface'] == $_POST['interface'] && $idtracker != $id)
- $input_errors[] = sprintf(gettext("VHID %s is already in use on interface %s. Pick a unique number on this interface."),$_POST['vhid'], convert_friendly_interface_to_friendly_descr($_POST['interface']));
+ foreach ($config['virtualip']['vip'] as $vip) {
+ if ($vip['vhid'] == $_POST['vhid'] && $vip['interface'] == $_POST['interface'] && $idtracker != $id) {
+ $input_errors[] = sprintf(gettext("VHID %s is already in use on interface %s. Pick a unique number on this interface."), $_POST['vhid'], convert_friendly_interface_to_friendly_descr($_POST['interface']));
+ }
$idtracker++;
}
- if (empty($_POST['password']))
+ if (empty($_POST['password'])) {
$input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members.");
+ }
- if ($_POST['interface'] == 'lo0')
+ if ($_POST['password'] != $_POST['password_confirm']) {
+ $input_errors[] = gettext("Password and confirm password must match");
+ }
+
+ if ($_POST['interface'] == 'lo0') {
$input_errors[] = gettext("For this type of vip localhost is not allowed.");
- else if (strpos($_POST['interface'], '_vip'))
+ } else if (strpos($_POST['interface'], '_vip')) {
$input_errors[] = gettext("A CARP parent interface can only be used with IP Alias type Virtual IPs.");
+ }
break;
case 'ipalias':
@@ -231,9 +233,9 @@ if ($_POST) {
}
if (isset($parent_ip) && !ip_in_subnet($_POST['subnet'], "{$subnet}/{$parent_sn}") &&
- !ip_in_interface_alias_subnet(link_carp_interface_to_parent($_POST['interface']), $_POST['subnet'])) {
+ !ip_in_interface_alias_subnet(link_carp_interface_to_parent($_POST['interface']), $_POST['subnet'])) {
$cannot_find = $_POST['subnet'] . "/" . $_POST['subnet_bits'] ;
- $input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."),$cannot_find);
+ $input_errors[] = sprintf(gettext("Sorry, we could not locate an interface with a matching subnet for %s. Please add an IP alias in this subnet on this interface."), $cannot_find);
}
unset($parent_ip, $parent_sn, $subnet);
@@ -241,10 +243,11 @@ if ($_POST) {
break;
default:
- if ($_POST['interface'] == 'lo0')
+ if ($_POST['interface'] == 'lo0') {
$input_errors[] = gettext("For this type of vip localhost is not allowed.");
- else if (strpos($_POST['interface'], '_vip'))
+ } else if (strpos($_POST['interface'], '_vip')) {
$input_errors[] = gettext("A CARP parent interface can only be used with IP Alias type Virtual IPs.");
+ }
break;
}
@@ -272,7 +275,12 @@ if ($_POST) {
$vipent['uniqid'] = $_POST['uniqid'];
$vipent['advskew'] = $_POST['advskew'];
$vipent['advbase'] = $_POST['advbase'];
- $vipent['password'] = $_POST['password'];
+
+ if ($_POST['password'] != DMYPWD) {
+ $vipent['password'] = $_POST['password'];
+ } else {
+ $vipent['password'] = $a_vip[$id]['password'];
+ }
}
/* Common fields */
@@ -328,7 +336,7 @@ if ($_POST) {
$ipaliashelp = gettext('The mask must be the network\'s subnet mask. It does not specify a CIDR range.');
$proxyarphelp = gettext('Enter a CIDR block of proxy ARP addresses.');
-$pgtitle = array(gettext("Firewall"),gettext("Virtual IP Address"),gettext("Edit"));
+$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Address"), gettext("Edit"));
include("head.inc");
function build_if_list() {
@@ -337,18 +345,18 @@ function build_if_list() {
$interfaces = get_configured_interface_with_descr(false, true);
$carplist = get_configured_carp_interface_list();
- foreach ($carplist as $cif => $carpip)
+ foreach ($carplist as $cif => $carpip) {
$interfaces[$cif] = $carpip . ' (' . get_vip_descr($carpip) . ')';
+ }
$interfaces['lo0'] = 'Localhost';
return($interfaces);
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require('classes/Form.class.php');
+}
$form = new Form();
@@ -420,7 +428,7 @@ $section->addInput(new Form_Checkbox(
isset($pconfig['noexpand'])
));
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'password',
'Virtual IP Password',
'password',
@@ -479,21 +487,24 @@ $section->addInput(new Form_Input(
$form->add($section);
print($form);
-
-print_info_box(gettext("Proxy ARP and Other type Virtual IPs cannot be bound to by anything running on the firewall, such as IPsec, OpenVPN, etc. Use a CARP or IP Alias type address for these types.") . '<br />' .
- sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'));
?>
-<script>
+<div id="infoblock">
+ <?=print_info_box(gettext("Proxy ARP and Other type Virtual IPs cannot be bound to by anything running on the firewall, such as IPsec, OpenVPN, etc. Use a CARP or IP Alias type address for these types.") . '<br />' .
+ sprintf(gettext("For more information on CARP and the above values, visit the OpenBSD %s"), '<a href="http://www.openbsd.org/faq/pf/carp.html">CARP FAQ</a>.'), info)?>
+</div>
+
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Hides the <div> in which the specified checkbox lives so that the checkbox, its label and help text are hidden
function hideCheckbox(id, hide) {
- if(hide)
+ if (hide) {
$('#' + id).parent().parent().parent('div').addClass('hidden');
- else
+ } else {
$('#' + id).parent().parent().parent('div').removeClass('hidden');
+ }
}
// Disables the specified input element
@@ -511,29 +522,28 @@ events.push(function(){
disableInput('subnet_bits', true);
disableInput('type', true);
disableInput('password', true);
+ disableInput('password_confirm', true);
hideCheckbox('noexpand', true);
- if(mode == 'ipalias') {
+ if (mode == 'ipalias') {
$('#address_note').html("<?=$ipaliashelp?>");
$('#type').val('single');
disableInput('subnet_bits', false);
- }
- else if(mode == 'carp') {
+ } else if (mode == 'carp') {
$('#address_note').html("<?=$ipaliashelp?>");
disableInput('vhid', false);
disableInput('advbase', false);
disableInput('advskew', false);
disableInput('password', false);
+ disableInput('password_confirm', false);
disableInput('subnet_bits', false);
$('#type').val('single');
- }
- else if(mode == 'proxyarp') {
+ } else if (mode == 'proxyarp') {
$('#address_note').html("<?=$proxyarphelp?>");
disableInput('type', false);
disableInput('subnet_bits', ($('#type').val() == 'single'));
- }
- else {
+ } else {
$('#address_note').html('');
disableInput('type', false);
disableInput('subnet_bits', ($('#type').val() == 'single'));
@@ -554,7 +564,7 @@ events.push(function(){
});
// ---------- On initial page load ------------------------------------------------------------
-
+
check_mode();
});
//]]>
diff --git a/src/usr/local/www/font-awesome/HELP-US-OUT.txt b/src/usr/local/www/font-awesome/HELP-US-OUT.txt
new file mode 100644
index 0000000..cfd9d9f
--- /dev/null
+++ b/src/usr/local/www/font-awesome/HELP-US-OUT.txt
@@ -0,0 +1,7 @@
+I hope you love Font Awesome. If you've found it useful, please do me a favor and check out my latest project,
+Fonticons (https://fonticons.com). It makes it easy to put the perfect icons on your website. Choose from our awesome,
+comprehensive icon sets or copy and paste your own.
+
+Please. Check it out.
+
+-Dave Gandy
diff --git a/src/usr/local/www/font-awesome/css/font-awesome.css b/src/usr/local/www/font-awesome/css/font-awesome.css
new file mode 100644
index 0000000..b2a5fe2
--- /dev/null
+++ b/src/usr/local/www/font-awesome/css/font-awesome.css
@@ -0,0 +1,2086 @@
+/*!
+ * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+/* FONT PATH
+ * -------------------------- */
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('../fonts/fontawesome-webfont.eot?v=4.5.0');
+ src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');
+ font-weight: normal;
+ font-style: normal;
+}
+.fa {
+ display: inline-block;
+ font: normal normal normal 14px/1 FontAwesome;
+ font-size: inherit;
+ text-rendering: auto;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+/* makes the font 33% larger relative to the icon container */
+.fa-lg {
+ font-size: 1.33333333em;
+ line-height: 0.75em;
+ vertical-align: -15%;
+}
+.fa-2x {
+ font-size: 2em;
+}
+.fa-3x {
+ font-size: 3em;
+}
+.fa-4x {
+ font-size: 4em;
+}
+.fa-5x {
+ font-size: 5em;
+}
+.fa-fw {
+ width: 1.28571429em;
+ text-align: center;
+}
+.fa-ul {
+ padding-left: 0;
+ margin-left: 2.14285714em;
+ list-style-type: none;
+}
+.fa-ul > li {
+ position: relative;
+}
+.fa-li {
+ position: absolute;
+ left: -2.14285714em;
+ width: 2.14285714em;
+ top: 0.14285714em;
+ text-align: center;
+}
+.fa-li.fa-lg {
+ left: -1.85714286em;
+}
+.fa-border {
+ padding: .2em .25em .15em;
+ border: solid 0.08em #eeeeee;
+ border-radius: .1em;
+}
+.fa-pull-left {
+ float: left;
+}
+.fa-pull-right {
+ float: right;
+}
+.fa.fa-pull-left {
+ margin-right: .3em;
+}
+.fa.fa-pull-right {
+ margin-left: .3em;
+}
+/* Deprecated as of 4.4.0 */
+.pull-right {
+ float: right;
+}
+.pull-left {
+ float: left;
+}
+.fa.pull-left {
+ margin-right: .3em;
+}
+.fa.pull-right {
+ margin-left: .3em;
+}
+.fa-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+.fa-pulse {
+ -webkit-animation: fa-spin 1s infinite steps(8);
+ animation: fa-spin 1s infinite steps(8);
+}
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+.fa-rotate-90 {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
+ -webkit-transform: rotate(90deg);
+ -ms-transform: rotate(90deg);
+ transform: rotate(90deg);
+}
+.fa-rotate-180 {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
+ -webkit-transform: rotate(180deg);
+ -ms-transform: rotate(180deg);
+ transform: rotate(180deg);
+}
+.fa-rotate-270 {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
+ -webkit-transform: rotate(270deg);
+ -ms-transform: rotate(270deg);
+ transform: rotate(270deg);
+}
+.fa-flip-horizontal {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
+ -webkit-transform: scale(-1, 1);
+ -ms-transform: scale(-1, 1);
+ transform: scale(-1, 1);
+}
+.fa-flip-vertical {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
+ -webkit-transform: scale(1, -1);
+ -ms-transform: scale(1, -1);
+ transform: scale(1, -1);
+}
+:root .fa-rotate-90,
+:root .fa-rotate-180,
+:root .fa-rotate-270,
+:root .fa-flip-horizontal,
+:root .fa-flip-vertical {
+ filter: none;
+}
+.fa-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.fa-stack-1x,
+.fa-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.fa-stack-1x {
+ line-height: inherit;
+}
+.fa-stack-2x {
+ font-size: 2em;
+}
+.fa-inverse {
+ color: #ffffff;
+}
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+.fa-glass:before {
+ content: "\f000";
+}
+.fa-music:before {
+ content: "\f001";
+}
+.fa-search:before {
+ content: "\f002";
+}
+.fa-envelope-o:before {
+ content: "\f003";
+}
+.fa-heart:before {
+ content: "\f004";
+}
+.fa-star:before {
+ content: "\f005";
+}
+.fa-star-o:before {
+ content: "\f006";
+}
+.fa-user:before {
+ content: "\f007";
+}
+.fa-film:before {
+ content: "\f008";
+}
+.fa-th-large:before {
+ content: "\f009";
+}
+.fa-th:before {
+ content: "\f00a";
+}
+.fa-th-list:before {
+ content: "\f00b";
+}
+.fa-check:before {
+ content: "\f00c";
+}
+.fa-remove:before,
+.fa-close:before,
+.fa-times:before {
+ content: "\f00d";
+}
+.fa-search-plus:before {
+ content: "\f00e";
+}
+.fa-search-minus:before {
+ content: "\f010";
+}
+.fa-power-off:before {
+ content: "\f011";
+}
+.fa-signal:before {
+ content: "\f012";
+}
+.fa-gear:before,
+.fa-cog:before {
+ content: "\f013";
+}
+.fa-trash-o:before {
+ content: "\f014";
+}
+.fa-home:before {
+ content: "\f015";
+}
+.fa-file-o:before {
+ content: "\f016";
+}
+.fa-clock-o:before {
+ content: "\f017";
+}
+.fa-road:before {
+ content: "\f018";
+}
+.fa-download:before {
+ content: "\f019";
+}
+.fa-arrow-circle-o-down:before {
+ content: "\f01a";
+}
+.fa-arrow-circle-o-up:before {
+ content: "\f01b";
+}
+.fa-inbox:before {
+ content: "\f01c";
+}
+.fa-play-circle-o:before {
+ content: "\f01d";
+}
+.fa-rotate-right:before,
+.fa-repeat:before {
+ content: "\f01e";
+}
+.fa-refresh:before {
+ content: "\f021";
+}
+.fa-list-alt:before {
+ content: "\f022";
+}
+.fa-lock:before {
+ content: "\f023";
+}
+.fa-flag:before {
+ content: "\f024";
+}
+.fa-headphones:before {
+ content: "\f025";
+}
+.fa-volume-off:before {
+ content: "\f026";
+}
+.fa-volume-down:before {
+ content: "\f027";
+}
+.fa-volume-up:before {
+ content: "\f028";
+}
+.fa-qrcode:before {
+ content: "\f029";
+}
+.fa-barcode:before {
+ content: "\f02a";
+}
+.fa-tag:before {
+ content: "\f02b";
+}
+.fa-tags:before {
+ content: "\f02c";
+}
+.fa-book:before {
+ content: "\f02d";
+}
+.fa-bookmark:before {
+ content: "\f02e";
+}
+.fa-print:before {
+ content: "\f02f";
+}
+.fa-camera:before {
+ content: "\f030";
+}
+.fa-font:before {
+ content: "\f031";
+}
+.fa-bold:before {
+ content: "\f032";
+}
+.fa-italic:before {
+ content: "\f033";
+}
+.fa-text-height:before {
+ content: "\f034";
+}
+.fa-text-width:before {
+ content: "\f035";
+}
+.fa-align-left:before {
+ content: "\f036";
+}
+.fa-align-center:before {
+ content: "\f037";
+}
+.fa-align-right:before {
+ content: "\f038";
+}
+.fa-align-justify:before {
+ content: "\f039";
+}
+.fa-list:before {
+ content: "\f03a";
+}
+.fa-dedent:before,
+.fa-outdent:before {
+ content: "\f03b";
+}
+.fa-indent:before {
+ content: "\f03c";
+}
+.fa-video-camera:before {
+ content: "\f03d";
+}
+.fa-photo:before,
+.fa-image:before,
+.fa-picture-o:before {
+ content: "\f03e";
+}
+.fa-pencil:before {
+ content: "\f040";
+}
+.fa-map-marker:before {
+ content: "\f041";
+}
+.fa-adjust:before {
+ content: "\f042";
+}
+.fa-tint:before {
+ content: "\f043";
+}
+.fa-edit:before,
+.fa-pencil-square-o:before {
+ content: "\f044";
+}
+.fa-share-square-o:before {
+ content: "\f045";
+}
+.fa-check-square-o:before {
+ content: "\f046";
+}
+.fa-arrows:before {
+ content: "\f047";
+}
+.fa-step-backward:before {
+ content: "\f048";
+}
+.fa-fast-backward:before {
+ content: "\f049";
+}
+.fa-backward:before {
+ content: "\f04a";
+}
+.fa-play:before {
+ content: "\f04b";
+}
+.fa-pause:before {
+ content: "\f04c";
+}
+.fa-stop:before {
+ content: "\f04d";
+}
+.fa-forward:before {
+ content: "\f04e";
+}
+.fa-fast-forward:before {
+ content: "\f050";
+}
+.fa-step-forward:before {
+ content: "\f051";
+}
+.fa-eject:before {
+ content: "\f052";
+}
+.fa-chevron-left:before {
+ content: "\f053";
+}
+.fa-chevron-right:before {
+ content: "\f054";
+}
+.fa-plus-circle:before {
+ content: "\f055";
+}
+.fa-minus-circle:before {
+ content: "\f056";
+}
+.fa-times-circle:before {
+ content: "\f057";
+}
+.fa-check-circle:before {
+ content: "\f058";
+}
+.fa-question-circle:before {
+ content: "\f059";
+}
+.fa-info-circle:before {
+ content: "\f05a";
+}
+.fa-crosshairs:before {
+ content: "\f05b";
+}
+.fa-times-circle-o:before {
+ content: "\f05c";
+}
+.fa-check-circle-o:before {
+ content: "\f05d";
+}
+.fa-ban:before {
+ content: "\f05e";
+}
+.fa-arrow-left:before {
+ content: "\f060";
+}
+.fa-arrow-right:before {
+ content: "\f061";
+}
+.fa-arrow-up:before {
+ content: "\f062";
+}
+.fa-arrow-down:before {
+ content: "\f063";
+}
+.fa-mail-forward:before,
+.fa-share:before {
+ content: "\f064";
+}
+.fa-expand:before {
+ content: "\f065";
+}
+.fa-compress:before {
+ content: "\f066";
+}
+.fa-plus:before {
+ content: "\f067";
+}
+.fa-minus:before {
+ content: "\f068";
+}
+.fa-asterisk:before {
+ content: "\f069";
+}
+.fa-exclamation-circle:before {
+ content: "\f06a";
+}
+.fa-gift:before {
+ content: "\f06b";
+}
+.fa-leaf:before {
+ content: "\f06c";
+}
+.fa-fire:before {
+ content: "\f06d";
+}
+.fa-eye:before {
+ content: "\f06e";
+}
+.fa-eye-slash:before {
+ content: "\f070";
+}
+.fa-warning:before,
+.fa-exclamation-triangle:before {
+ content: "\f071";
+}
+.fa-plane:before {
+ content: "\f072";
+}
+.fa-calendar:before {
+ content: "\f073";
+}
+.fa-random:before {
+ content: "\f074";
+}
+.fa-comment:before {
+ content: "\f075";
+}
+.fa-magnet:before {
+ content: "\f076";
+}
+.fa-chevron-up:before {
+ content: "\f077";
+}
+.fa-chevron-down:before {
+ content: "\f078";
+}
+.fa-retweet:before {
+ content: "\f079";
+}
+.fa-shopping-cart:before {
+ content: "\f07a";
+}
+.fa-folder:before {
+ content: "\f07b";
+}
+.fa-folder-open:before {
+ content: "\f07c";
+}
+.fa-arrows-v:before {
+ content: "\f07d";
+}
+.fa-arrows-h:before {
+ content: "\f07e";
+}
+.fa-bar-chart-o:before,
+.fa-bar-chart:before {
+ content: "\f080";
+}
+.fa-twitter-square:before {
+ content: "\f081";
+}
+.fa-facebook-square:before {
+ content: "\f082";
+}
+.fa-camera-retro:before {
+ content: "\f083";
+}
+.fa-key:before {
+ content: "\f084";
+}
+.fa-gears:before,
+.fa-cogs:before {
+ content: "\f085";
+}
+.fa-comments:before {
+ content: "\f086";
+}
+.fa-thumbs-o-up:before {
+ content: "\f087";
+}
+.fa-thumbs-o-down:before {
+ content: "\f088";
+}
+.fa-star-half:before {
+ content: "\f089";
+}
+.fa-heart-o:before {
+ content: "\f08a";
+}
+.fa-sign-out:before {
+ content: "\f08b";
+}
+.fa-linkedin-square:before {
+ content: "\f08c";
+}
+.fa-thumb-tack:before {
+ content: "\f08d";
+}
+.fa-external-link:before {
+ content: "\f08e";
+}
+.fa-sign-in:before {
+ content: "\f090";
+}
+.fa-trophy:before {
+ content: "\f091";
+}
+.fa-github-square:before {
+ content: "\f092";
+}
+.fa-upload:before {
+ content: "\f093";
+}
+.fa-lemon-o:before {
+ content: "\f094";
+}
+.fa-phone:before {
+ content: "\f095";
+}
+.fa-square-o:before {
+ content: "\f096";
+}
+.fa-bookmark-o:before {
+ content: "\f097";
+}
+.fa-phone-square:before {
+ content: "\f098";
+}
+.fa-twitter:before {
+ content: "\f099";
+}
+.fa-facebook-f:before,
+.fa-facebook:before {
+ content: "\f09a";
+}
+.fa-github:before {
+ content: "\f09b";
+}
+.fa-unlock:before {
+ content: "\f09c";
+}
+.fa-credit-card:before {
+ content: "\f09d";
+}
+.fa-feed:before,
+.fa-rss:before {
+ content: "\f09e";
+}
+.fa-hdd-o:before {
+ content: "\f0a0";
+}
+.fa-bullhorn:before {
+ content: "\f0a1";
+}
+.fa-bell:before {
+ content: "\f0f3";
+}
+.fa-certificate:before {
+ content: "\f0a3";
+}
+.fa-hand-o-right:before {
+ content: "\f0a4";
+}
+.fa-hand-o-left:before {
+ content: "\f0a5";
+}
+.fa-hand-o-up:before {
+ content: "\f0a6";
+}
+.fa-hand-o-down:before {
+ content: "\f0a7";
+}
+.fa-arrow-circle-left:before {
+ content: "\f0a8";
+}
+.fa-arrow-circle-right:before {
+ content: "\f0a9";
+}
+.fa-arrow-circle-up:before {
+ content: "\f0aa";
+}
+.fa-arrow-circle-down:before {
+ content: "\f0ab";
+}
+.fa-globe:before {
+ content: "\f0ac";
+}
+.fa-wrench:before {
+ content: "\f0ad";
+}
+.fa-tasks:before {
+ content: "\f0ae";
+}
+.fa-filter:before {
+ content: "\f0b0";
+}
+.fa-briefcase:before {
+ content: "\f0b1";
+}
+.fa-arrows-alt:before {
+ content: "\f0b2";
+}
+.fa-group:before,
+.fa-users:before {
+ content: "\f0c0";
+}
+.fa-chain:before,
+.fa-link:before {
+ content: "\f0c1";
+}
+.fa-cloud:before {
+ content: "\f0c2";
+}
+.fa-flask:before {
+ content: "\f0c3";
+}
+.fa-cut:before,
+.fa-scissors:before {
+ content: "\f0c4";
+}
+.fa-copy:before,
+.fa-files-o:before {
+ content: "\f0c5";
+}
+.fa-paperclip:before {
+ content: "\f0c6";
+}
+.fa-save:before,
+.fa-floppy-o:before {
+ content: "\f0c7";
+}
+.fa-square:before {
+ content: "\f0c8";
+}
+.fa-navicon:before,
+.fa-reorder:before,
+.fa-bars:before {
+ content: "\f0c9";
+}
+.fa-list-ul:before {
+ content: "\f0ca";
+}
+.fa-list-ol:before {
+ content: "\f0cb";
+}
+.fa-strikethrough:before {
+ content: "\f0cc";
+}
+.fa-underline:before {
+ content: "\f0cd";
+}
+.fa-table:before {
+ content: "\f0ce";
+}
+.fa-magic:before {
+ content: "\f0d0";
+}
+.fa-truck:before {
+ content: "\f0d1";
+}
+.fa-pinterest:before {
+ content: "\f0d2";
+}
+.fa-pinterest-square:before {
+ content: "\f0d3";
+}
+.fa-google-plus-square:before {
+ content: "\f0d4";
+}
+.fa-google-plus:before {
+ content: "\f0d5";
+}
+.fa-money:before {
+ content: "\f0d6";
+}
+.fa-caret-down:before {
+ content: "\f0d7";
+}
+.fa-caret-up:before {
+ content: "\f0d8";
+}
+.fa-caret-left:before {
+ content: "\f0d9";
+}
+.fa-caret-right:before {
+ content: "\f0da";
+}
+.fa-columns:before {
+ content: "\f0db";
+}
+.fa-unsorted:before,
+.fa-sort:before {
+ content: "\f0dc";
+}
+.fa-sort-down:before,
+.fa-sort-desc:before {
+ content: "\f0dd";
+}
+.fa-sort-up:before,
+.fa-sort-asc:before {
+ content: "\f0de";
+}
+.fa-envelope:before {
+ content: "\f0e0";
+}
+.fa-linkedin:before {
+ content: "\f0e1";
+}
+.fa-rotate-left:before,
+.fa-undo:before {
+ content: "\f0e2";
+}
+.fa-legal:before,
+.fa-gavel:before {
+ content: "\f0e3";
+}
+.fa-dashboard:before,
+.fa-tachometer:before {
+ content: "\f0e4";
+}
+.fa-comment-o:before {
+ content: "\f0e5";
+}
+.fa-comments-o:before {
+ content: "\f0e6";
+}
+.fa-flash:before,
+.fa-bolt:before {
+ content: "\f0e7";
+}
+.fa-sitemap:before {
+ content: "\f0e8";
+}
+.fa-umbrella:before {
+ content: "\f0e9";
+}
+.fa-paste:before,
+.fa-clipboard:before {
+ content: "\f0ea";
+}
+.fa-lightbulb-o:before {
+ content: "\f0eb";
+}
+.fa-exchange:before {
+ content: "\f0ec";
+}
+.fa-cloud-download:before {
+ content: "\f0ed";
+}
+.fa-cloud-upload:before {
+ content: "\f0ee";
+}
+.fa-user-md:before {
+ content: "\f0f0";
+}
+.fa-stethoscope:before {
+ content: "\f0f1";
+}
+.fa-suitcase:before {
+ content: "\f0f2";
+}
+.fa-bell-o:before {
+ content: "\f0a2";
+}
+.fa-coffee:before {
+ content: "\f0f4";
+}
+.fa-cutlery:before {
+ content: "\f0f5";
+}
+.fa-file-text-o:before {
+ content: "\f0f6";
+}
+.fa-building-o:before {
+ content: "\f0f7";
+}
+.fa-hospital-o:before {
+ content: "\f0f8";
+}
+.fa-ambulance:before {
+ content: "\f0f9";
+}
+.fa-medkit:before {
+ content: "\f0fa";
+}
+.fa-fighter-jet:before {
+ content: "\f0fb";
+}
+.fa-beer:before {
+ content: "\f0fc";
+}
+.fa-h-square:before {
+ content: "\f0fd";
+}
+.fa-plus-square:before {
+ content: "\f0fe";
+}
+.fa-angle-double-left:before {
+ content: "\f100";
+}
+.fa-angle-double-right:before {
+ content: "\f101";
+}
+.fa-angle-double-up:before {
+ content: "\f102";
+}
+.fa-angle-double-down:before {
+ content: "\f103";
+}
+.fa-angle-left:before {
+ content: "\f104";
+}
+.fa-angle-right:before {
+ content: "\f105";
+}
+.fa-angle-up:before {
+ content: "\f106";
+}
+.fa-angle-down:before {
+ content: "\f107";
+}
+.fa-desktop:before {
+ content: "\f108";
+}
+.fa-laptop:before {
+ content: "\f109";
+}
+.fa-tablet:before {
+ content: "\f10a";
+}
+.fa-mobile-phone:before,
+.fa-mobile:before {
+ content: "\f10b";
+}
+.fa-circle-o:before {
+ content: "\f10c";
+}
+.fa-quote-left:before {
+ content: "\f10d";
+}
+.fa-quote-right:before {
+ content: "\f10e";
+}
+.fa-spinner:before {
+ content: "\f110";
+}
+.fa-circle:before {
+ content: "\f111";
+}
+.fa-mail-reply:before,
+.fa-reply:before {
+ content: "\f112";
+}
+.fa-github-alt:before {
+ content: "\f113";
+}
+.fa-folder-o:before {
+ content: "\f114";
+}
+.fa-folder-open-o:before {
+ content: "\f115";
+}
+.fa-smile-o:before {
+ content: "\f118";
+}
+.fa-frown-o:before {
+ content: "\f119";
+}
+.fa-meh-o:before {
+ content: "\f11a";
+}
+.fa-gamepad:before {
+ content: "\f11b";
+}
+.fa-keyboard-o:before {
+ content: "\f11c";
+}
+.fa-flag-o:before {
+ content: "\f11d";
+}
+.fa-flag-checkered:before {
+ content: "\f11e";
+}
+.fa-terminal:before {
+ content: "\f120";
+}
+.fa-code:before {
+ content: "\f121";
+}
+.fa-mail-reply-all:before,
+.fa-reply-all:before {
+ content: "\f122";
+}
+.fa-star-half-empty:before,
+.fa-star-half-full:before,
+.fa-star-half-o:before {
+ content: "\f123";
+}
+.fa-location-arrow:before {
+ content: "\f124";
+}
+.fa-crop:before {
+ content: "\f125";
+}
+.fa-code-fork:before {
+ content: "\f126";
+}
+.fa-unlink:before,
+.fa-chain-broken:before {
+ content: "\f127";
+}
+.fa-question:before {
+ content: "\f128";
+}
+.fa-info:before {
+ content: "\f129";
+}
+.fa-exclamation:before {
+ content: "\f12a";
+}
+.fa-superscript:before {
+ content: "\f12b";
+}
+.fa-subscript:before {
+ content: "\f12c";
+}
+.fa-eraser:before {
+ content: "\f12d";
+}
+.fa-puzzle-piece:before {
+ content: "\f12e";
+}
+.fa-microphone:before {
+ content: "\f130";
+}
+.fa-microphone-slash:before {
+ content: "\f131";
+}
+.fa-shield:before {
+ content: "\f132";
+}
+.fa-calendar-o:before {
+ content: "\f133";
+}
+.fa-fire-extinguisher:before {
+ content: "\f134";
+}
+.fa-rocket:before {
+ content: "\f135";
+}
+.fa-maxcdn:before {
+ content: "\f136";
+}
+.fa-chevron-circle-left:before {
+ content: "\f137";
+}
+.fa-chevron-circle-right:before {
+ content: "\f138";
+}
+.fa-chevron-circle-up:before {
+ content: "\f139";
+}
+.fa-chevron-circle-down:before {
+ content: "\f13a";
+}
+.fa-html5:before {
+ content: "\f13b";
+}
+.fa-css3:before {
+ content: "\f13c";
+}
+.fa-anchor:before {
+ content: "\f13d";
+}
+.fa-unlock-alt:before {
+ content: "\f13e";
+}
+.fa-bullseye:before {
+ content: "\f140";
+}
+.fa-ellipsis-h:before {
+ content: "\f141";
+}
+.fa-ellipsis-v:before {
+ content: "\f142";
+}
+.fa-rss-square:before {
+ content: "\f143";
+}
+.fa-play-circle:before {
+ content: "\f144";
+}
+.fa-ticket:before {
+ content: "\f145";
+}
+.fa-minus-square:before {
+ content: "\f146";
+}
+.fa-minus-square-o:before {
+ content: "\f147";
+}
+.fa-level-up:before {
+ content: "\f148";
+}
+.fa-level-down:before {
+ content: "\f149";
+}
+.fa-check-square:before {
+ content: "\f14a";
+}
+.fa-pencil-square:before {
+ content: "\f14b";
+}
+.fa-external-link-square:before {
+ content: "\f14c";
+}
+.fa-share-square:before {
+ content: "\f14d";
+}
+.fa-compass:before {
+ content: "\f14e";
+}
+.fa-toggle-down:before,
+.fa-caret-square-o-down:before {
+ content: "\f150";
+}
+.fa-toggle-up:before,
+.fa-caret-square-o-up:before {
+ content: "\f151";
+}
+.fa-toggle-right:before,
+.fa-caret-square-o-right:before {
+ content: "\f152";
+}
+.fa-euro:before,
+.fa-eur:before {
+ content: "\f153";
+}
+.fa-gbp:before {
+ content: "\f154";
+}
+.fa-dollar:before,
+.fa-usd:before {
+ content: "\f155";
+}
+.fa-rupee:before,
+.fa-inr:before {
+ content: "\f156";
+}
+.fa-cny:before,
+.fa-rmb:before,
+.fa-yen:before,
+.fa-jpy:before {
+ content: "\f157";
+}
+.fa-ruble:before,
+.fa-rouble:before,
+.fa-rub:before {
+ content: "\f158";
+}
+.fa-won:before,
+.fa-krw:before {
+ content: "\f159";
+}
+.fa-bitcoin:before,
+.fa-btc:before {
+ content: "\f15a";
+}
+.fa-file:before {
+ content: "\f15b";
+}
+.fa-file-text:before {
+ content: "\f15c";
+}
+.fa-sort-alpha-asc:before {
+ content: "\f15d";
+}
+.fa-sort-alpha-desc:before {
+ content: "\f15e";
+}
+.fa-sort-amount-asc:before {
+ content: "\f160";
+}
+.fa-sort-amount-desc:before {
+ content: "\f161";
+}
+.fa-sort-numeric-asc:before {
+ content: "\f162";
+}
+.fa-sort-numeric-desc:before {
+ content: "\f163";
+}
+.fa-thumbs-up:before {
+ content: "\f164";
+}
+.fa-thumbs-down:before {
+ content: "\f165";
+}
+.fa-youtube-square:before {
+ content: "\f166";
+}
+.fa-youtube:before {
+ content: "\f167";
+}
+.fa-xing:before {
+ content: "\f168";
+}
+.fa-xing-square:before {
+ content: "\f169";
+}
+.fa-youtube-play:before {
+ content: "\f16a";
+}
+.fa-dropbox:before {
+ content: "\f16b";
+}
+.fa-stack-overflow:before {
+ content: "\f16c";
+}
+.fa-instagram:before {
+ content: "\f16d";
+}
+.fa-flickr:before {
+ content: "\f16e";
+}
+.fa-adn:before {
+ content: "\f170";
+}
+.fa-bitbucket:before {
+ content: "\f171";
+}
+.fa-bitbucket-square:before {
+ content: "\f172";
+}
+.fa-tumblr:before {
+ content: "\f173";
+}
+.fa-tumblr-square:before {
+ content: "\f174";
+}
+.fa-long-arrow-down:before {
+ content: "\f175";
+}
+.fa-long-arrow-up:before {
+ content: "\f176";
+}
+.fa-long-arrow-left:before {
+ content: "\f177";
+}
+.fa-long-arrow-right:before {
+ content: "\f178";
+}
+.fa-apple:before {
+ content: "\f179";
+}
+.fa-windows:before {
+ content: "\f17a";
+}
+.fa-android:before {
+ content: "\f17b";
+}
+.fa-linux:before {
+ content: "\f17c";
+}
+.fa-dribbble:before {
+ content: "\f17d";
+}
+.fa-skype:before {
+ content: "\f17e";
+}
+.fa-foursquare:before {
+ content: "\f180";
+}
+.fa-trello:before {
+ content: "\f181";
+}
+.fa-female:before {
+ content: "\f182";
+}
+.fa-male:before {
+ content: "\f183";
+}
+.fa-gittip:before,
+.fa-gratipay:before {
+ content: "\f184";
+}
+.fa-sun-o:before {
+ content: "\f185";
+}
+.fa-moon-o:before {
+ content: "\f186";
+}
+.fa-archive:before {
+ content: "\f187";
+}
+.fa-bug:before {
+ content: "\f188";
+}
+.fa-vk:before {
+ content: "\f189";
+}
+.fa-weibo:before {
+ content: "\f18a";
+}
+.fa-renren:before {
+ content: "\f18b";
+}
+.fa-pagelines:before {
+ content: "\f18c";
+}
+.fa-stack-exchange:before {
+ content: "\f18d";
+}
+.fa-arrow-circle-o-right:before {
+ content: "\f18e";
+}
+.fa-arrow-circle-o-left:before {
+ content: "\f190";
+}
+.fa-toggle-left:before,
+.fa-caret-square-o-left:before {
+ content: "\f191";
+}
+.fa-dot-circle-o:before {
+ content: "\f192";
+}
+.fa-wheelchair:before {
+ content: "\f193";
+}
+.fa-vimeo-square:before {
+ content: "\f194";
+}
+.fa-turkish-lira:before,
+.fa-try:before {
+ content: "\f195";
+}
+.fa-plus-square-o:before {
+ content: "\f196";
+}
+.fa-space-shuttle:before {
+ content: "\f197";
+}
+.fa-slack:before {
+ content: "\f198";
+}
+.fa-envelope-square:before {
+ content: "\f199";
+}
+.fa-wordpress:before {
+ content: "\f19a";
+}
+.fa-openid:before {
+ content: "\f19b";
+}
+.fa-institution:before,
+.fa-bank:before,
+.fa-university:before {
+ content: "\f19c";
+}
+.fa-mortar-board:before,
+.fa-graduation-cap:before {
+ content: "\f19d";
+}
+.fa-yahoo:before {
+ content: "\f19e";
+}
+.fa-google:before {
+ content: "\f1a0";
+}
+.fa-reddit:before {
+ content: "\f1a1";
+}
+.fa-reddit-square:before {
+ content: "\f1a2";
+}
+.fa-stumbleupon-circle:before {
+ content: "\f1a3";
+}
+.fa-stumbleupon:before {
+ content: "\f1a4";
+}
+.fa-delicious:before {
+ content: "\f1a5";
+}
+.fa-digg:before {
+ content: "\f1a6";
+}
+.fa-pied-piper:before {
+ content: "\f1a7";
+}
+.fa-pied-piper-alt:before {
+ content: "\f1a8";
+}
+.fa-drupal:before {
+ content: "\f1a9";
+}
+.fa-joomla:before {
+ content: "\f1aa";
+}
+.fa-language:before {
+ content: "\f1ab";
+}
+.fa-fax:before {
+ content: "\f1ac";
+}
+.fa-building:before {
+ content: "\f1ad";
+}
+.fa-child:before {
+ content: "\f1ae";
+}
+.fa-paw:before {
+ content: "\f1b0";
+}
+.fa-spoon:before {
+ content: "\f1b1";
+}
+.fa-cube:before {
+ content: "\f1b2";
+}
+.fa-cubes:before {
+ content: "\f1b3";
+}
+.fa-behance:before {
+ content: "\f1b4";
+}
+.fa-behance-square:before {
+ content: "\f1b5";
+}
+.fa-steam:before {
+ content: "\f1b6";
+}
+.fa-steam-square:before {
+ content: "\f1b7";
+}
+.fa-recycle:before {
+ content: "\f1b8";
+}
+.fa-automobile:before,
+.fa-car:before {
+ content: "\f1b9";
+}
+.fa-cab:before,
+.fa-taxi:before {
+ content: "\f1ba";
+}
+.fa-tree:before {
+ content: "\f1bb";
+}
+.fa-spotify:before {
+ content: "\f1bc";
+}
+.fa-deviantart:before {
+ content: "\f1bd";
+}
+.fa-soundcloud:before {
+ content: "\f1be";
+}
+.fa-database:before {
+ content: "\f1c0";
+}
+.fa-file-pdf-o:before {
+ content: "\f1c1";
+}
+.fa-file-word-o:before {
+ content: "\f1c2";
+}
+.fa-file-excel-o:before {
+ content: "\f1c3";
+}
+.fa-file-powerpoint-o:before {
+ content: "\f1c4";
+}
+.fa-file-photo-o:before,
+.fa-file-picture-o:before,
+.fa-file-image-o:before {
+ content: "\f1c5";
+}
+.fa-file-zip-o:before,
+.fa-file-archive-o:before {
+ content: "\f1c6";
+}
+.fa-file-sound-o:before,
+.fa-file-audio-o:before {
+ content: "\f1c7";
+}
+.fa-file-movie-o:before,
+.fa-file-video-o:before {
+ content: "\f1c8";
+}
+.fa-file-code-o:before {
+ content: "\f1c9";
+}
+.fa-vine:before {
+ content: "\f1ca";
+}
+.fa-codepen:before {
+ content: "\f1cb";
+}
+.fa-jsfiddle:before {
+ content: "\f1cc";
+}
+.fa-life-bouy:before,
+.fa-life-buoy:before,
+.fa-life-saver:before,
+.fa-support:before,
+.fa-life-ring:before {
+ content: "\f1cd";
+}
+.fa-circle-o-notch:before {
+ content: "\f1ce";
+}
+.fa-ra:before,
+.fa-rebel:before {
+ content: "\f1d0";
+}
+.fa-ge:before,
+.fa-empire:before {
+ content: "\f1d1";
+}
+.fa-git-square:before {
+ content: "\f1d2";
+}
+.fa-git:before {
+ content: "\f1d3";
+}
+.fa-y-combinator-square:before,
+.fa-yc-square:before,
+.fa-hacker-news:before {
+ content: "\f1d4";
+}
+.fa-tencent-weibo:before {
+ content: "\f1d5";
+}
+.fa-qq:before {
+ content: "\f1d6";
+}
+.fa-wechat:before,
+.fa-weixin:before {
+ content: "\f1d7";
+}
+.fa-send:before,
+.fa-paper-plane:before {
+ content: "\f1d8";
+}
+.fa-send-o:before,
+.fa-paper-plane-o:before {
+ content: "\f1d9";
+}
+.fa-history:before {
+ content: "\f1da";
+}
+.fa-circle-thin:before {
+ content: "\f1db";
+}
+.fa-header:before {
+ content: "\f1dc";
+}
+.fa-paragraph:before {
+ content: "\f1dd";
+}
+.fa-sliders:before {
+ content: "\f1de";
+}
+.fa-share-alt:before {
+ content: "\f1e0";
+}
+.fa-share-alt-square:before {
+ content: "\f1e1";
+}
+.fa-bomb:before {
+ content: "\f1e2";
+}
+.fa-soccer-ball-o:before,
+.fa-futbol-o:before {
+ content: "\f1e3";
+}
+.fa-tty:before {
+ content: "\f1e4";
+}
+.fa-binoculars:before {
+ content: "\f1e5";
+}
+.fa-plug:before {
+ content: "\f1e6";
+}
+.fa-slideshare:before {
+ content: "\f1e7";
+}
+.fa-twitch:before {
+ content: "\f1e8";
+}
+.fa-yelp:before {
+ content: "\f1e9";
+}
+.fa-newspaper-o:before {
+ content: "\f1ea";
+}
+.fa-wifi:before {
+ content: "\f1eb";
+}
+.fa-calculator:before {
+ content: "\f1ec";
+}
+.fa-paypal:before {
+ content: "\f1ed";
+}
+.fa-google-wallet:before {
+ content: "\f1ee";
+}
+.fa-cc-visa:before {
+ content: "\f1f0";
+}
+.fa-cc-mastercard:before {
+ content: "\f1f1";
+}
+.fa-cc-discover:before {
+ content: "\f1f2";
+}
+.fa-cc-amex:before {
+ content: "\f1f3";
+}
+.fa-cc-paypal:before {
+ content: "\f1f4";
+}
+.fa-cc-stripe:before {
+ content: "\f1f5";
+}
+.fa-bell-slash:before {
+ content: "\f1f6";
+}
+.fa-bell-slash-o:before {
+ content: "\f1f7";
+}
+.fa-trash:before {
+ content: "\f1f8";
+}
+.fa-copyright:before {
+ content: "\f1f9";
+}
+.fa-at:before {
+ content: "\f1fa";
+}
+.fa-eyedropper:before {
+ content: "\f1fb";
+}
+.fa-paint-brush:before {
+ content: "\f1fc";
+}
+.fa-birthday-cake:before {
+ content: "\f1fd";
+}
+.fa-area-chart:before {
+ content: "\f1fe";
+}
+.fa-pie-chart:before {
+ content: "\f200";
+}
+.fa-line-chart:before {
+ content: "\f201";
+}
+.fa-lastfm:before {
+ content: "\f202";
+}
+.fa-lastfm-square:before {
+ content: "\f203";
+}
+.fa-toggle-off:before {
+ content: "\f204";
+}
+.fa-toggle-on:before {
+ content: "\f205";
+}
+.fa-bicycle:before {
+ content: "\f206";
+}
+.fa-bus:before {
+ content: "\f207";
+}
+.fa-ioxhost:before {
+ content: "\f208";
+}
+.fa-angellist:before {
+ content: "\f209";
+}
+.fa-cc:before {
+ content: "\f20a";
+}
+.fa-shekel:before,
+.fa-sheqel:before,
+.fa-ils:before {
+ content: "\f20b";
+}
+.fa-meanpath:before {
+ content: "\f20c";
+}
+.fa-buysellads:before {
+ content: "\f20d";
+}
+.fa-connectdevelop:before {
+ content: "\f20e";
+}
+.fa-dashcube:before {
+ content: "\f210";
+}
+.fa-forumbee:before {
+ content: "\f211";
+}
+.fa-leanpub:before {
+ content: "\f212";
+}
+.fa-sellsy:before {
+ content: "\f213";
+}
+.fa-shirtsinbulk:before {
+ content: "\f214";
+}
+.fa-simplybuilt:before {
+ content: "\f215";
+}
+.fa-skyatlas:before {
+ content: "\f216";
+}
+.fa-cart-plus:before {
+ content: "\f217";
+}
+.fa-cart-arrow-down:before {
+ content: "\f218";
+}
+.fa-diamond:before {
+ content: "\f219";
+}
+.fa-ship:before {
+ content: "\f21a";
+}
+.fa-user-secret:before {
+ content: "\f21b";
+}
+.fa-motorcycle:before {
+ content: "\f21c";
+}
+.fa-street-view:before {
+ content: "\f21d";
+}
+.fa-heartbeat:before {
+ content: "\f21e";
+}
+.fa-venus:before {
+ content: "\f221";
+}
+.fa-mars:before {
+ content: "\f222";
+}
+.fa-mercury:before {
+ content: "\f223";
+}
+.fa-intersex:before,
+.fa-transgender:before {
+ content: "\f224";
+}
+.fa-transgender-alt:before {
+ content: "\f225";
+}
+.fa-venus-double:before {
+ content: "\f226";
+}
+.fa-mars-double:before {
+ content: "\f227";
+}
+.fa-venus-mars:before {
+ content: "\f228";
+}
+.fa-mars-stroke:before {
+ content: "\f229";
+}
+.fa-mars-stroke-v:before {
+ content: "\f22a";
+}
+.fa-mars-stroke-h:before {
+ content: "\f22b";
+}
+.fa-neuter:before {
+ content: "\f22c";
+}
+.fa-genderless:before {
+ content: "\f22d";
+}
+.fa-facebook-official:before {
+ content: "\f230";
+}
+.fa-pinterest-p:before {
+ content: "\f231";
+}
+.fa-whatsapp:before {
+ content: "\f232";
+}
+.fa-server:before {
+ content: "\f233";
+}
+.fa-user-plus:before {
+ content: "\f234";
+}
+.fa-user-times:before {
+ content: "\f235";
+}
+.fa-hotel:before,
+.fa-bed:before {
+ content: "\f236";
+}
+.fa-viacoin:before {
+ content: "\f237";
+}
+.fa-train:before {
+ content: "\f238";
+}
+.fa-subway:before {
+ content: "\f239";
+}
+.fa-medium:before {
+ content: "\f23a";
+}
+.fa-yc:before,
+.fa-y-combinator:before {
+ content: "\f23b";
+}
+.fa-optin-monster:before {
+ content: "\f23c";
+}
+.fa-opencart:before {
+ content: "\f23d";
+}
+.fa-expeditedssl:before {
+ content: "\f23e";
+}
+.fa-battery-4:before,
+.fa-battery-full:before {
+ content: "\f240";
+}
+.fa-battery-3:before,
+.fa-battery-three-quarters:before {
+ content: "\f241";
+}
+.fa-battery-2:before,
+.fa-battery-half:before {
+ content: "\f242";
+}
+.fa-battery-1:before,
+.fa-battery-quarter:before {
+ content: "\f243";
+}
+.fa-battery-0:before,
+.fa-battery-empty:before {
+ content: "\f244";
+}
+.fa-mouse-pointer:before {
+ content: "\f245";
+}
+.fa-i-cursor:before {
+ content: "\f246";
+}
+.fa-object-group:before {
+ content: "\f247";
+}
+.fa-object-ungroup:before {
+ content: "\f248";
+}
+.fa-sticky-note:before {
+ content: "\f249";
+}
+.fa-sticky-note-o:before {
+ content: "\f24a";
+}
+.fa-cc-jcb:before {
+ content: "\f24b";
+}
+.fa-cc-diners-club:before {
+ content: "\f24c";
+}
+.fa-clone:before {
+ content: "\f24d";
+}
+.fa-balance-scale:before {
+ content: "\f24e";
+}
+.fa-hourglass-o:before {
+ content: "\f250";
+}
+.fa-hourglass-1:before,
+.fa-hourglass-start:before {
+ content: "\f251";
+}
+.fa-hourglass-2:before,
+.fa-hourglass-half:before {
+ content: "\f252";
+}
+.fa-hourglass-3:before,
+.fa-hourglass-end:before {
+ content: "\f253";
+}
+.fa-hourglass:before {
+ content: "\f254";
+}
+.fa-hand-grab-o:before,
+.fa-hand-rock-o:before {
+ content: "\f255";
+}
+.fa-hand-stop-o:before,
+.fa-hand-paper-o:before {
+ content: "\f256";
+}
+.fa-hand-scissors-o:before {
+ content: "\f257";
+}
+.fa-hand-lizard-o:before {
+ content: "\f258";
+}
+.fa-hand-spock-o:before {
+ content: "\f259";
+}
+.fa-hand-pointer-o:before {
+ content: "\f25a";
+}
+.fa-hand-peace-o:before {
+ content: "\f25b";
+}
+.fa-trademark:before {
+ content: "\f25c";
+}
+.fa-registered:before {
+ content: "\f25d";
+}
+.fa-creative-commons:before {
+ content: "\f25e";
+}
+.fa-gg:before {
+ content: "\f260";
+}
+.fa-gg-circle:before {
+ content: "\f261";
+}
+.fa-tripadvisor:before {
+ content: "\f262";
+}
+.fa-odnoklassniki:before {
+ content: "\f263";
+}
+.fa-odnoklassniki-square:before {
+ content: "\f264";
+}
+.fa-get-pocket:before {
+ content: "\f265";
+}
+.fa-wikipedia-w:before {
+ content: "\f266";
+}
+.fa-safari:before {
+ content: "\f267";
+}
+.fa-chrome:before {
+ content: "\f268";
+}
+.fa-firefox:before {
+ content: "\f269";
+}
+.fa-opera:before {
+ content: "\f26a";
+}
+.fa-internet-explorer:before {
+ content: "\f26b";
+}
+.fa-tv:before,
+.fa-television:before {
+ content: "\f26c";
+}
+.fa-contao:before {
+ content: "\f26d";
+}
+.fa-500px:before {
+ content: "\f26e";
+}
+.fa-amazon:before {
+ content: "\f270";
+}
+.fa-calendar-plus-o:before {
+ content: "\f271";
+}
+.fa-calendar-minus-o:before {
+ content: "\f272";
+}
+.fa-calendar-times-o:before {
+ content: "\f273";
+}
+.fa-calendar-check-o:before {
+ content: "\f274";
+}
+.fa-industry:before {
+ content: "\f275";
+}
+.fa-map-pin:before {
+ content: "\f276";
+}
+.fa-map-signs:before {
+ content: "\f277";
+}
+.fa-map-o:before {
+ content: "\f278";
+}
+.fa-map:before {
+ content: "\f279";
+}
+.fa-commenting:before {
+ content: "\f27a";
+}
+.fa-commenting-o:before {
+ content: "\f27b";
+}
+.fa-houzz:before {
+ content: "\f27c";
+}
+.fa-vimeo:before {
+ content: "\f27d";
+}
+.fa-black-tie:before {
+ content: "\f27e";
+}
+.fa-fonticons:before {
+ content: "\f280";
+}
+.fa-reddit-alien:before {
+ content: "\f281";
+}
+.fa-edge:before {
+ content: "\f282";
+}
+.fa-credit-card-alt:before {
+ content: "\f283";
+}
+.fa-codiepie:before {
+ content: "\f284";
+}
+.fa-modx:before {
+ content: "\f285";
+}
+.fa-fort-awesome:before {
+ content: "\f286";
+}
+.fa-usb:before {
+ content: "\f287";
+}
+.fa-product-hunt:before {
+ content: "\f288";
+}
+.fa-mixcloud:before {
+ content: "\f289";
+}
+.fa-scribd:before {
+ content: "\f28a";
+}
+.fa-pause-circle:before {
+ content: "\f28b";
+}
+.fa-pause-circle-o:before {
+ content: "\f28c";
+}
+.fa-stop-circle:before {
+ content: "\f28d";
+}
+.fa-stop-circle-o:before {
+ content: "\f28e";
+}
+.fa-shopping-bag:before {
+ content: "\f290";
+}
+.fa-shopping-basket:before {
+ content: "\f291";
+}
+.fa-hashtag:before {
+ content: "\f292";
+}
+.fa-bluetooth:before {
+ content: "\f293";
+}
+.fa-bluetooth-b:before {
+ content: "\f294";
+}
+.fa-percent:before {
+ content: "\f295";
+}
diff --git a/src/usr/local/www/font-awesome/css/font-awesome.min.css b/src/usr/local/www/font-awesome/css/font-awesome.min.css
new file mode 100644
index 0000000..d0603cb
--- /dev/null
+++ b/src/usr/local/www/font-awesome/css/font-awesome.min.css
@@ -0,0 +1,4 @@
+/*!
+ * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.5.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.5.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.5.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.5.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.5.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.5.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}
diff --git a/src/usr/local/www/font-awesome/fonts/FontAwesome.otf b/src/usr/local/www/font-awesome/fonts/FontAwesome.otf
new file mode 100644
index 0000000..3ed7f8b
--- /dev/null
+++ b/src/usr/local/www/font-awesome/fonts/FontAwesome.otf
Binary files differ
diff --git a/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.eot b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.eot
new file mode 100644
index 0000000..9b6afae
--- /dev/null
+++ b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.eot
Binary files differ
diff --git a/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.svg b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.svg
new file mode 100644
index 0000000..d05688e
--- /dev/null
+++ b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.svg
@@ -0,0 +1,655 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
+<svg xmlns="http://www.w3.org/2000/svg">
+<metadata></metadata>
+<defs>
+<font id="fontawesomeregular" horiz-adv-x="1536" >
+<font-face units-per-em="1792" ascent="1536" descent="-256" />
+<missing-glyph horiz-adv-x="448" />
+<glyph unicode=" " horiz-adv-x="448" />
+<glyph unicode="&#x09;" horiz-adv-x="448" />
+<glyph unicode="&#xa0;" horiz-adv-x="448" />
+<glyph unicode="&#xa8;" horiz-adv-x="1792" />
+<glyph unicode="&#xa9;" horiz-adv-x="1792" />
+<glyph unicode="&#xae;" horiz-adv-x="1792" />
+<glyph unicode="&#xb4;" horiz-adv-x="1792" />
+<glyph unicode="&#xc6;" horiz-adv-x="1792" />
+<glyph unicode="&#xd8;" horiz-adv-x="1792" />
+<glyph unicode="&#x2000;" horiz-adv-x="768" />
+<glyph unicode="&#x2001;" horiz-adv-x="1537" />
+<glyph unicode="&#x2002;" horiz-adv-x="768" />
+<glyph unicode="&#x2003;" horiz-adv-x="1537" />
+<glyph unicode="&#x2004;" horiz-adv-x="512" />
+<glyph unicode="&#x2005;" horiz-adv-x="384" />
+<glyph unicode="&#x2006;" horiz-adv-x="256" />
+<glyph unicode="&#x2007;" horiz-adv-x="256" />
+<glyph unicode="&#x2008;" horiz-adv-x="192" />
+<glyph unicode="&#x2009;" horiz-adv-x="307" />
+<glyph unicode="&#x200a;" horiz-adv-x="85" />
+<glyph unicode="&#x202f;" horiz-adv-x="307" />
+<glyph unicode="&#x205f;" horiz-adv-x="384" />
+<glyph unicode="&#x2122;" horiz-adv-x="1792" />
+<glyph unicode="&#x221e;" horiz-adv-x="1792" />
+<glyph unicode="&#x2260;" horiz-adv-x="1792" />
+<glyph unicode="&#x25fc;" horiz-adv-x="500" d="M0 0z" />
+<glyph unicode="&#xf000;" horiz-adv-x="1792" d="M1699 1350q0 -35 -43 -78l-632 -632v-768h320q26 0 45 -19t19 -45t-19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45t45 19h320v768l-632 632q-43 43 -43 78q0 23 18 36.5t38 17.5t43 4h1408q23 0 43 -4t38 -17.5t18 -36.5z" />
+<glyph unicode="&#xf001;" d="M1536 1312v-1120q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v537l-768 -237v-709q0 -50 -34 -89t-86 -60.5t-103.5 -32t-96.5 -10.5t-96.5 10.5t-103.5 32t-86 60.5t-34 89 t34 89t86 60.5t103.5 32t96.5 10.5q105 0 192 -39v967q0 31 19 56.5t49 35.5l832 256q12 4 28 4q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf002;" horiz-adv-x="1664" d="M1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -52 -38 -90t-90 -38q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5 t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf003;" horiz-adv-x="1792" d="M1664 32v768q-32 -36 -69 -66q-268 -206 -426 -338q-51 -43 -83 -67t-86.5 -48.5t-102.5 -24.5h-1h-1q-48 0 -102.5 24.5t-86.5 48.5t-83 67q-158 132 -426 338q-37 30 -69 66v-768q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1664 1083v11v13.5t-0.5 13 t-3 12.5t-5.5 9t-9 7.5t-14 2.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5q0 -168 147 -284q193 -152 401 -317q6 -5 35 -29.5t46 -37.5t44.5 -31.5t50.5 -27.5t43 -9h1h1q20 0 43 9t50.5 27.5t44.5 31.5t46 37.5t35 29.5q208 165 401 317q54 43 100.5 115.5t46.5 131.5z M1792 1120v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf004;" horiz-adv-x="1792" d="M896 -128q-26 0 -44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124t127 -344q0 -221 -229 -450l-623 -600 q-18 -18 -44 -18z" />
+<glyph unicode="&#xf005;" horiz-adv-x="1664" d="M1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -21 -10.5 -35.5t-30.5 -14.5q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455 l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf006;" horiz-adv-x="1664" d="M1137 532l306 297l-422 62l-189 382l-189 -382l-422 -62l306 -297l-73 -421l378 199l377 -199zM1664 889q0 -22 -26 -48l-363 -354l86 -500q1 -7 1 -20q0 -50 -41 -50q-19 0 -40 12l-449 236l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500 l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41t49 -41l225 -455l502 -73q56 -9 56 -46z" />
+<glyph unicode="&#xf007;" horiz-adv-x="1408" d="M1408 131q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q9 0 42 -21.5t74.5 -48t108 -48t133.5 -21.5t133.5 21.5t108 48t74.5 48t42 21.5q61 0 111.5 -20t85.5 -53.5t62 -81 t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf008;" horiz-adv-x="1920" d="M384 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 320v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM384 704v128q0 26 -19 45t-45 19h-128 q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 -64v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM384 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45 t45 -19h128q26 0 45 19t19 45zM1792 -64v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1408 704v512q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-512q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1792 320v128 q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 704v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1792 1088v128q0 26 -19 45t-45 19h-128q-26 0 -45 -19 t-19 -45v-128q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1920 1248v-1344q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1344q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf009;" horiz-adv-x="1664" d="M768 512v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM768 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 512v-384q0 -52 -38 -90t-90 -38 h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90zM1664 1280v-384q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf00a;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 288v-192q0 -40 -28 -68t-68 -28h-320 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1152 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00b;" horiz-adv-x="1792" d="M512 288v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM512 800v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 288v-192q0 -40 -28 -68t-68 -28h-960 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68zM512 1312v-192q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h320q40 0 68 -28t28 -68zM1792 800v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28 h960q40 0 68 -28t28 -68zM1792 1312v-192q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h960q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf00c;" horiz-adv-x="1792" d="M1671 970q0 -40 -28 -68l-724 -724l-136 -136q-28 -28 -68 -28t-68 28l-136 136l-362 362q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -295l656 657q28 28 68 28t68 -28l136 -136q28 -28 28 -68z" />
+<glyph unicode="&#xf00d;" horiz-adv-x="1408" d="M1298 214q0 -40 -28 -68l-136 -136q-28 -28 -68 -28t-68 28l-294 294l-294 -294q-28 -28 -68 -28t-68 28l-136 136q-28 28 -28 68t28 68l294 294l-294 294q-28 28 -28 68t28 68l136 136q28 28 68 28t68 -28l294 -294l294 294q28 28 68 28t68 -28l136 -136q28 -28 28 -68 t-28 -68l-294 -294l294 -294q28 -28 28 -68z" />
+<glyph unicode="&#xf00e;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-224q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v224h-224q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h224v224q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5v-224h224 q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5 t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z" />
+<glyph unicode="&#xf010;" horiz-adv-x="1664" d="M1024 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-576q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h576q13 0 22.5 -9.5t9.5 -22.5zM1152 704q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5z M1664 -128q0 -53 -37.5 -90.5t-90.5 -37.5q-54 0 -90 38l-343 342q-179 -124 -399 -124q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5t273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -220 -124 -399l343 -343q37 -37 37 -90z " />
+<glyph unicode="&#xf011;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61t-298 61t-245 164t-164 245t-61 298q0 182 80.5 343t226.5 270q43 32 95.5 25t83.5 -50q32 -42 24.5 -94.5t-49.5 -84.5q-98 -74 -151.5 -181t-53.5 -228q0 -104 40.5 -198.5t109.5 -163.5t163.5 -109.5 t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5q0 121 -53.5 228t-151.5 181q-42 32 -49.5 84.5t24.5 94.5q31 43 84 50t95 -25q146 -109 226.5 -270t80.5 -343zM896 1408v-640q0 -52 -38 -90t-90 -38t-90 38t-38 90v640q0 52 38 90t90 38t90 -38t38 -90z" />
+<glyph unicode="&#xf012;" horiz-adv-x="1792" d="M256 96v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 224v-320q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 480v-576q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1408 864v-960q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1376v-1472q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1472q0 14 9 23t23 9h192q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf013;" d="M1024 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1536 749v-222q0 -12 -8 -23t-20 -13l-185 -28q-19 -54 -39 -91q35 -50 107 -138q10 -12 10 -25t-9 -23q-27 -37 -99 -108t-94 -71q-12 0 -26 9l-138 108q-44 -23 -91 -38 q-16 -136 -29 -186q-7 -28 -36 -28h-222q-14 0 -24.5 8.5t-11.5 21.5l-28 184q-49 16 -90 37l-141 -107q-10 -9 -25 -9q-14 0 -25 11q-126 114 -165 168q-7 10 -7 23q0 12 8 23q15 21 51 66.5t54 70.5q-27 50 -41 99l-183 27q-13 2 -21 12.5t-8 23.5v222q0 12 8 23t19 13 l186 28q14 46 39 92q-40 57 -107 138q-10 12 -10 24q0 10 9 23q26 36 98.5 107.5t94.5 71.5q13 0 26 -10l138 -107q44 23 91 38q16 136 29 186q7 28 36 28h222q14 0 24.5 -8.5t11.5 -21.5l28 -184q49 -16 90 -37l142 107q9 9 24 9q13 0 25 -10q129 -119 165 -170q7 -8 7 -22 q0 -12 -8 -23q-15 -21 -51 -66.5t-54 -70.5q26 -50 41 -98l183 -28q13 -2 21 -12.5t8 -23.5z" />
+<glyph unicode="&#xf014;" horiz-adv-x="1408" d="M512 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM768 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1024 800v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1152 76v948h-896v-948q0 -22 7 -40.5t14.5 -27t10.5 -8.5h832q3 0 10.5 8.5t14.5 27t7 40.5zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832 q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf015;" horiz-adv-x="1664" d="M1408 544v-480q0 -26 -19 -45t-45 -19h-384v384h-256v-384h-384q-26 0 -45 19t-19 45v480q0 1 0.5 3t0.5 3l575 474l575 -474q1 -2 1 -6zM1631 613l-62 -74q-8 -9 -21 -11h-3q-13 0 -21 7l-692 577l-692 -577q-12 -8 -24 -7q-13 2 -21 11l-62 74q-8 10 -7 23.5t11 21.5 l719 599q32 26 76 26t76 -26l244 -204v195q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-408l219 -182q10 -8 11 -21.5t-7 -23.5z" />
+<glyph unicode="&#xf016;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z " />
+<glyph unicode="&#xf017;" d="M896 992v-448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf018;" horiz-adv-x="1920" d="M1111 540v4l-24 320q-1 13 -11 22.5t-23 9.5h-186q-13 0 -23 -9.5t-11 -22.5l-24 -320v-4q-1 -12 8 -20t21 -8h244q12 0 21 8t8 20zM1870 73q0 -73 -46 -73h-704q13 0 22 9.5t8 22.5l-20 256q-1 13 -11 22.5t-23 9.5h-272q-13 0 -23 -9.5t-11 -22.5l-20 -256 q-1 -13 8 -22.5t22 -9.5h-704q-46 0 -46 73q0 54 26 116l417 1044q8 19 26 33t38 14h339q-13 0 -23 -9.5t-11 -22.5l-15 -192q-1 -14 8 -23t22 -9h166q13 0 22 9t8 23l-15 192q-1 13 -11 22.5t-23 9.5h339q20 0 38 -14t26 -33l417 -1044q26 -62 26 -116z" />
+<glyph unicode="&#xf019;" horiz-adv-x="1664" d="M1280 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 416v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h465l135 -136 q58 -56 136 -56t136 56l136 136h464q40 0 68 -28t28 -68zM1339 985q17 -41 -14 -70l-448 -448q-18 -19 -45 -19t-45 19l-448 448q-31 29 -14 70q17 39 59 39h256v448q0 26 19 45t45 19h256q26 0 45 -19t19 -45v-448h256q42 0 59 -39z" />
+<glyph unicode="&#xf01a;" d="M1120 608q0 -12 -10 -24l-319 -319q-11 -9 -23 -9t-23 9l-320 320q-15 16 -7 35q8 20 30 20h192v352q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-352h192q14 0 23 -9t9 -23zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273 t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01b;" d="M1118 660q-8 -20 -30 -20h-192v-352q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v352h-192q-14 0 -23 9t-9 23q0 12 10 24l319 319q11 9 23 9t23 -9l320 -320q15 -16 7 -35zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198 t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01c;" d="M1023 576h316q-1 3 -2.5 8t-2.5 8l-212 496h-708l-212 -496q-1 -2 -2.5 -8t-2.5 -8h316l95 -192h320zM1536 546v-482q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v482q0 62 25 123l238 552q10 25 36.5 42t52.5 17h832q26 0 52.5 -17t36.5 -42l238 -552 q25 -61 25 -123z" />
+<glyph unicode="&#xf01d;" d="M1184 640q0 -37 -32 -55l-544 -320q-15 -9 -32 -9q-16 0 -32 8q-32 19 -32 56v640q0 37 32 56q33 18 64 -1l544 -320q32 -18 32 -55zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf01e;" d="M1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l138 138q-148 137 -349 137q-104 0 -198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5q119 0 225 52t179 147q7 10 23 12q14 0 25 -9 l137 -138q9 -8 9.5 -20.5t-7.5 -22.5q-109 -132 -264 -204.5t-327 -72.5q-156 0 -298 61t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q147 0 284.5 -55.5t244.5 -156.5l130 129q29 31 70 14q39 -17 39 -59z" />
+<glyph unicode="&#xf021;" d="M1511 480q0 -5 -1 -7q-64 -268 -268 -434.5t-478 -166.5q-146 0 -282.5 55t-243.5 157l-129 -129q-19 -19 -45 -19t-45 19t-19 45v448q0 26 19 45t45 19h448q26 0 45 -19t19 -45t-19 -45l-137 -137q71 -66 161 -102t187 -36q134 0 250 65t186 179q11 17 53 117 q8 23 30 23h192q13 0 22.5 -9.5t9.5 -22.5zM1536 1280v-448q0 -26 -19 -45t-45 -19h-448q-26 0 -45 19t-19 45t19 45l138 138q-148 137 -349 137q-134 0 -250 -65t-186 -179q-11 -17 -53 -117q-8 -23 -30 -23h-199q-13 0 -22.5 9.5t-9.5 22.5v7q65 268 270 434.5t480 166.5 q146 0 284 -55.5t245 -156.5l130 129q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf022;" horiz-adv-x="1792" d="M384 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M384 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1536 352v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5z M1536 608v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5t9.5 -22.5zM1536 864v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h960q13 0 22.5 -9.5 t9.5 -22.5zM1664 160v832q0 13 -9.5 22.5t-22.5 9.5h-1472q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1472q13 0 22.5 9.5t9.5 22.5zM1792 1248v-1088q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1472q66 0 113 -47 t47 -113z" />
+<glyph unicode="&#xf023;" horiz-adv-x="1152" d="M320 768h512v192q0 106 -75 181t-181 75t-181 -75t-75 -181v-192zM1152 672v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v192q0 184 132 316t316 132t316 -132t132 -316v-192h32q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf024;" horiz-adv-x="1792" d="M320 1280q0 -72 -64 -110v-1266q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v1266q-64 38 -64 110q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -25 -12.5 -38.5t-39.5 -27.5q-215 -116 -369 -116q-61 0 -123.5 22t-108.5 48 t-115.5 48t-142.5 22q-192 0 -464 -146q-17 -9 -33 -9q-26 0 -45 19t-19 45v742q0 32 31 55q21 14 79 43q236 120 421 120q107 0 200 -29t219 -88q38 -19 88 -19q54 0 117.5 21t110 47t88 47t54.5 21q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf025;" horiz-adv-x="1664" d="M1664 650q0 -166 -60 -314l-20 -49l-185 -33q-22 -83 -90.5 -136.5t-156.5 -53.5v-32q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-32q71 0 130 -35.5t93 -95.5l68 12q29 95 29 193q0 148 -88 279t-236.5 209t-315.5 78 t-315.5 -78t-236.5 -209t-88 -279q0 -98 29 -193l68 -12q34 60 93 95.5t130 35.5v32q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v32q-88 0 -156.5 53.5t-90.5 136.5l-185 33l-20 49q-60 148 -60 314q0 151 67 291t179 242.5 t266 163.5t320 61t320 -61t266 -163.5t179 -242.5t67 -291z" />
+<glyph unicode="&#xf026;" horiz-adv-x="768" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf027;" horiz-adv-x="1152" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142z" />
+<glyph unicode="&#xf028;" horiz-adv-x="1664" d="M768 1184v-1088q0 -26 -19 -45t-45 -19t-45 19l-333 333h-262q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h262l333 333q19 19 45 19t45 -19t19 -45zM1152 640q0 -76 -42.5 -141.5t-112.5 -93.5q-10 -5 -25 -5q-26 0 -45 18.5t-19 45.5q0 21 12 35.5t29 25t34 23t29 35.5 t12 57t-12 57t-29 35.5t-34 23t-29 25t-12 35.5q0 27 19 45.5t45 18.5q15 0 25 -5q70 -27 112.5 -93t42.5 -142zM1408 640q0 -153 -85 -282.5t-225 -188.5q-13 -5 -25 -5q-27 0 -46 19t-19 45q0 39 39 59q56 29 76 44q74 54 115.5 135.5t41.5 173.5t-41.5 173.5 t-115.5 135.5q-20 15 -76 44q-39 20 -39 59q0 26 19 45t45 19q13 0 26 -5q140 -59 225 -188.5t85 -282.5zM1664 640q0 -230 -127 -422.5t-338 -283.5q-13 -5 -26 -5q-26 0 -45 19t-19 45q0 36 39 59q7 4 22.5 10.5t22.5 10.5q46 25 82 51q123 91 192 227t69 289t-69 289 t-192 227q-36 26 -82 51q-7 4 -22.5 10.5t-22.5 10.5q-39 23 -39 59q0 26 19 45t45 19q13 0 26 -5q211 -91 338 -283.5t127 -422.5z" />
+<glyph unicode="&#xf029;" horiz-adv-x="1408" d="M384 384v-128h-128v128h128zM384 1152v-128h-128v128h128zM1152 1152v-128h-128v128h128zM128 129h384v383h-384v-383zM128 896h384v384h-384v-384zM896 896h384v384h-384v-384zM640 640v-640h-640v640h640zM1152 128v-128h-128v128h128zM1408 128v-128h-128v128h128z M1408 640v-384h-384v128h-128v-384h-128v640h384v-128h128v128h128zM640 1408v-640h-640v640h640zM1408 1408v-640h-640v640h640z" />
+<glyph unicode="&#xf02a;" horiz-adv-x="1792" d="M63 0h-63v1408h63v-1408zM126 1h-32v1407h32v-1407zM220 1h-31v1407h31v-1407zM377 1h-31v1407h31v-1407zM534 1h-62v1407h62v-1407zM660 1h-31v1407h31v-1407zM723 1h-31v1407h31v-1407zM786 1h-31v1407h31v-1407zM943 1h-63v1407h63v-1407zM1100 1h-63v1407h63v-1407z M1226 1h-63v1407h63v-1407zM1352 1h-63v1407h63v-1407zM1446 1h-63v1407h63v-1407zM1635 1h-94v1407h94v-1407zM1698 1h-32v1407h32v-1407zM1792 0h-63v1408h63v-1408z" />
+<glyph unicode="&#xf02b;" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02c;" horiz-adv-x="1920" d="M448 1088q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1515 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-53 0 -90 37l-715 716q-38 37 -64.5 101t-26.5 117v416q0 52 38 90t90 38h416q53 0 117 -26.5t102 -64.5 l715 -714q37 -39 37 -91zM1899 512q0 -53 -37 -90l-491 -492q-39 -37 -91 -37q-36 0 -59 14t-53 45l470 470q37 37 37 90q0 52 -37 91l-715 714q-38 38 -102 64.5t-117 26.5h224q53 0 117 -26.5t102 -64.5l715 -714q37 -39 37 -91z" />
+<glyph unicode="&#xf02d;" horiz-adv-x="1664" d="M1639 1058q40 -57 18 -129l-275 -906q-19 -64 -76.5 -107.5t-122.5 -43.5h-923q-77 0 -148.5 53.5t-99.5 131.5q-24 67 -2 127q0 4 3 27t4 37q1 8 -3 21.5t-3 19.5q2 11 8 21t16.5 23.5t16.5 23.5q23 38 45 91.5t30 91.5q3 10 0.5 30t-0.5 28q3 11 17 28t17 23 q21 36 42 92t25 90q1 9 -2.5 32t0.5 28q4 13 22 30.5t22 22.5q19 26 42.5 84.5t27.5 96.5q1 8 -3 25.5t-2 26.5q2 8 9 18t18 23t17 21q8 12 16.5 30.5t15 35t16 36t19.5 32t26.5 23.5t36 11.5t47.5 -5.5l-1 -3q38 9 51 9h761q74 0 114 -56t18 -130l-274 -906 q-36 -119 -71.5 -153.5t-128.5 -34.5h-869q-27 0 -38 -15q-11 -16 -1 -43q24 -70 144 -70h923q29 0 56 15.5t35 41.5l300 987q7 22 5 57q38 -15 59 -43zM575 1056q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5 t-16.5 -22.5zM492 800q-4 -13 2 -22.5t20 -9.5h608q13 0 25.5 9.5t16.5 22.5l21 64q4 13 -2 22.5t-20 9.5h-608q-13 0 -25.5 -9.5t-16.5 -22.5z" />
+<glyph unicode="&#xf02e;" horiz-adv-x="1280" d="M1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf02f;" horiz-adv-x="1664" d="M384 0h896v256h-896v-256zM384 640h896v384h-160q-40 0 -68 28t-28 68v160h-640v-640zM1536 576q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 576v-416q0 -13 -9.5 -22.5t-22.5 -9.5h-224v-160q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68 v160h-224q-13 0 -22.5 9.5t-9.5 22.5v416q0 79 56.5 135.5t135.5 56.5h64v544q0 40 28 68t68 28h672q40 0 88 -20t76 -48l152 -152q28 -28 48 -76t20 -88v-256h64q79 0 135.5 -56.5t56.5 -135.5z" />
+<glyph unicode="&#xf030;" horiz-adv-x="1920" d="M960 864q119 0 203.5 -84.5t84.5 -203.5t-84.5 -203.5t-203.5 -84.5t-203.5 84.5t-84.5 203.5t84.5 203.5t203.5 84.5zM1664 1280q106 0 181 -75t75 -181v-896q0 -106 -75 -181t-181 -75h-1408q-106 0 -181 75t-75 181v896q0 106 75 181t181 75h224l51 136 q19 49 69.5 84.5t103.5 35.5h512q53 0 103.5 -35.5t69.5 -84.5l51 -136h224zM960 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf031;" horiz-adv-x="1664" d="M725 977l-170 -450q33 0 136.5 -2t160.5 -2q19 0 57 2q-87 253 -184 452zM0 -128l2 79q23 7 56 12.5t57 10.5t49.5 14.5t44.5 29t31 50.5l237 616l280 724h75h53q8 -14 11 -21l205 -480q33 -78 106 -257.5t114 -274.5q15 -34 58 -144.5t72 -168.5q20 -45 35 -57 q19 -15 88 -29.5t84 -20.5q6 -38 6 -57q0 -4 -0.5 -13t-0.5 -13q-63 0 -190 8t-191 8q-76 0 -215 -7t-178 -8q0 43 4 78l131 28q1 0 12.5 2.5t15.5 3.5t14.5 4.5t15 6.5t11 8t9 11t2.5 14q0 16 -31 96.5t-72 177.5t-42 100l-450 2q-26 -58 -76.5 -195.5t-50.5 -162.5 q0 -22 14 -37.5t43.5 -24.5t48.5 -13.5t57 -8.5t41 -4q1 -19 1 -58q0 -9 -2 -27q-58 0 -174.5 10t-174.5 10q-8 0 -26.5 -4t-21.5 -4q-80 -14 -188 -14z" />
+<glyph unicode="&#xf032;" horiz-adv-x="1408" d="M555 15q74 -32 140 -32q376 0 376 335q0 114 -41 180q-27 44 -61.5 74t-67.5 46.5t-80.5 25t-84 10.5t-94.5 2q-73 0 -101 -10q0 -53 -0.5 -159t-0.5 -158q0 -8 -1 -67.5t-0.5 -96.5t4.5 -83.5t12 -66.5zM541 761q42 -7 109 -7q82 0 143 13t110 44.5t74.5 89.5t25.5 142 q0 70 -29 122.5t-79 82t-108 43.5t-124 14q-50 0 -130 -13q0 -50 4 -151t4 -152q0 -27 -0.5 -80t-0.5 -79q0 -46 1 -69zM0 -128l2 94q15 4 85 16t106 27q7 12 12.5 27t8.5 33.5t5.5 32.5t3 37.5t0.5 34v35.5v30q0 982 -22 1025q-4 8 -22 14.5t-44.5 11t-49.5 7t-48.5 4.5 t-30.5 3l-4 83q98 2 340 11.5t373 9.5q23 0 68.5 -0.5t67.5 -0.5q70 0 136.5 -13t128.5 -42t108 -71t74 -104.5t28 -137.5q0 -52 -16.5 -95.5t-39 -72t-64.5 -57.5t-73 -45t-84 -40q154 -35 256.5 -134t102.5 -248q0 -100 -35 -179.5t-93.5 -130.5t-138 -85.5t-163.5 -48.5 t-176 -14q-44 0 -132 3t-132 3q-106 0 -307 -11t-231 -12z" />
+<glyph unicode="&#xf033;" horiz-adv-x="1024" d="M0 -126l17 85q6 2 81.5 21.5t111.5 37.5q28 35 41 101q1 7 62 289t114 543.5t52 296.5v25q-24 13 -54.5 18.5t-69.5 8t-58 5.5l19 103q33 -2 120 -6.5t149.5 -7t120.5 -2.5q48 0 98.5 2.5t121 7t98.5 6.5q-5 -39 -19 -89q-30 -10 -101.5 -28.5t-108.5 -33.5 q-8 -19 -14 -42.5t-9 -40t-7.5 -45.5t-6.5 -42q-27 -148 -87.5 -419.5t-77.5 -355.5q-2 -9 -13 -58t-20 -90t-16 -83.5t-6 -57.5l1 -18q17 -4 185 -31q-3 -44 -16 -99q-11 0 -32.5 -1.5t-32.5 -1.5q-29 0 -87 10t-86 10q-138 2 -206 2q-51 0 -143 -9t-121 -11z" />
+<glyph unicode="&#xf034;" horiz-adv-x="1792" d="M1744 128q33 0 42 -18.5t-11 -44.5l-126 -162q-20 -26 -49 -26t-49 26l-126 162q-20 26 -11 44.5t42 18.5h80v1024h-80q-33 0 -42 18.5t11 44.5l126 162q20 26 49 26t49 -26l126 -162q20 -26 11 -44.5t-42 -18.5h-80v-1024h80zM81 1407l54 -27q12 -5 211 -5q44 0 132 2 t132 2q36 0 107.5 -0.5t107.5 -0.5h293q6 0 21 -0.5t20.5 0t16 3t17.5 9t15 17.5l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 48t-14.5 73.5t-7.5 35.5q-6 8 -12 12.5t-15.5 6t-13 2.5t-18 0.5t-16.5 -0.5 q-17 0 -66.5 0.5t-74.5 0.5t-64 -2t-71 -6q-9 -81 -8 -136q0 -94 2 -388t2 -455q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q19 42 19 383q0 101 -3 303t-3 303v117q0 2 0.5 15.5t0.5 25t-1 25.5t-3 24t-5 14q-11 12 -162 12q-33 0 -93 -12t-80 -26q-19 -13 -34 -72.5t-31.5 -111t-42.5 -53.5q-42 26 -56 44v383z" />
+<glyph unicode="&#xf035;" d="M81 1407l54 -27q12 -5 211 -5q44 0 132 2t132 2q70 0 246.5 1t304.5 0.5t247 -4.5q33 -1 56 31l42 1q4 0 14 -0.5t14 -0.5q2 -112 2 -336q0 -80 -5 -109q-39 -14 -68 -18q-25 44 -54 128q-3 9 -11 47.5t-15 73.5t-7 36q-10 13 -27 19q-5 2 -66 2q-30 0 -93 1t-103 1 t-94 -2t-96 -7q-9 -81 -8 -136l1 -152v52q0 -55 1 -154t1.5 -180t0.5 -153q0 -16 -2.5 -71.5t0 -91.5t12.5 -69q40 -21 124 -42.5t120 -37.5q5 -40 5 -50q0 -14 -3 -29l-34 -1q-76 -2 -218 8t-207 10q-50 0 -151 -9t-152 -9q-3 51 -3 52v9q17 27 61.5 43t98.5 29t78 27 q7 16 11.5 74t6 145.5t1.5 155t-0.5 153.5t-0.5 89q0 7 -2.5 21.5t-2.5 22.5q0 7 0.5 44t1 73t0 76.5t-3 67.5t-6.5 32q-11 12 -162 12q-41 0 -163 -13.5t-138 -24.5q-19 -12 -34 -71.5t-31.5 -111.5t-42.5 -54q-42 26 -56 44v383zM1310 125q12 0 42 -19.5t57.5 -41.5 t59.5 -49t36 -30q26 -21 26 -49t-26 -49q-4 -3 -36 -30t-59.5 -49t-57.5 -41.5t-42 -19.5q-13 0 -20.5 10.5t-10 28.5t-2.5 33.5t1.5 33t1.5 19.5h-1024q0 -2 1.5 -19.5t1.5 -33t-2.5 -33.5t-10 -28.5t-20.5 -10.5q-12 0 -42 19.5t-57.5 41.5t-59.5 49t-36 30q-26 21 -26 49 t26 49q4 3 36 30t59.5 49t57.5 41.5t42 19.5q13 0 20.5 -10.5t10 -28.5t2.5 -33.5t-1.5 -33t-1.5 -19.5h1024q0 2 -1.5 19.5t-1.5 33t2.5 33.5t10 28.5t20.5 10.5z" />
+<glyph unicode="&#xf036;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf037;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1408 576v-128q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h896q26 0 45 -19t19 -45zM1664 960v-128q0 -26 -19 -45t-45 -19 h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1280 1344v-128q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h640q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf038;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1280q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1536q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1536q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1152q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf039;" horiz-adv-x="1792" d="M1792 192v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 576v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 960v-128q0 -26 -19 -45 t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-128q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf03a;" horiz-adv-x="1792" d="M256 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM256 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5 t9.5 -22.5zM256 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344 q13 0 22.5 -9.5t9.5 -22.5zM256 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v192 q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03b;" horiz-adv-x="1792" d="M384 992v-576q0 -13 -9.5 -22.5t-22.5 -9.5q-14 0 -23 9l-288 288q-9 9 -9 23t9 23l288 288q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03c;" horiz-adv-x="1792" d="M352 704q0 -14 -9 -23l-288 -288q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v576q0 13 9.5 22.5t22.5 9.5q14 0 23 -9l288 -288q9 -9 9 -23zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5 t9.5 -22.5zM1792 608v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088q13 0 22.5 -9.5t9.5 -22.5zM1792 992v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1088q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1088 q13 0 22.5 -9.5t9.5 -22.5zM1792 1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1728q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1728q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf03d;" horiz-adv-x="1792" d="M1792 1184v-1088q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-403 403v-166q0 -119 -84.5 -203.5t-203.5 -84.5h-704q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h704q119 0 203.5 -84.5t84.5 -203.5v-165l403 402q18 19 45 19q12 0 25 -5 q39 -17 39 -59z" />
+<glyph unicode="&#xf03e;" horiz-adv-x="1920" d="M640 960q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1664 576v-448h-1408v192l320 320l160 -160l512 512zM1760 1280h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-1216q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5v1216 q0 13 -9.5 22.5t-22.5 9.5zM1920 1248v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf040;" d="M363 0l91 91l-235 235l-91 -91v-107h128v-128h107zM886 928q0 22 -22 22q-10 0 -17 -7l-542 -542q-7 -7 -7 -17q0 -22 22 -22q10 0 17 7l542 542q7 7 7 17zM832 1120l416 -416l-832 -832h-416v416zM1515 1024q0 -53 -37 -90l-166 -166l-416 416l166 165q36 38 90 38 q53 0 91 -38l235 -234q37 -39 37 -91z" />
+<glyph unicode="&#xf041;" horiz-adv-x="1024" d="M768 896q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1024 896q0 -109 -33 -179l-364 -774q-16 -33 -47.5 -52t-67.5 -19t-67.5 19t-46.5 52l-365 774q-33 70 -33 179q0 212 150 362t362 150t362 -150t150 -362z" />
+<glyph unicode="&#xf042;" d="M768 96v1088q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf043;" horiz-adv-x="1024" d="M512 384q0 36 -20 69q-1 1 -15.5 22.5t-25.5 38t-25 44t-21 50.5q-4 16 -21 16t-21 -16q-7 -23 -21 -50.5t-25 -44t-25.5 -38t-15.5 -22.5q-20 -33 -20 -69q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 512q0 -212 -150 -362t-362 -150t-362 150t-150 362 q0 145 81 275q6 9 62.5 90.5t101 151t99.5 178t83 201.5q9 30 34 47t51 17t51.5 -17t33.5 -47q28 -93 83 -201.5t99.5 -178t101 -151t62.5 -90.5q81 -127 81 -275z" />
+<glyph unicode="&#xf044;" horiz-adv-x="1792" d="M888 352l116 116l-152 152l-116 -116v-56h96v-96h56zM1328 1072q-16 16 -33 -1l-350 -350q-17 -17 -1 -33t33 1l350 350q17 17 1 33zM1408 478v-190q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-14 -14 -32 -8q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v126q0 13 9 22l64 64q15 15 35 7t20 -29zM1312 1216l288 -288l-672 -672h-288v288zM1756 1084l-92 -92 l-288 288l92 92q28 28 68 28t68 -28l152 -152q28 -28 28 -68t-28 -68z" />
+<glyph unicode="&#xf045;" horiz-adv-x="1664" d="M1408 547v-259q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h255v0q13 0 22.5 -9.5t9.5 -22.5q0 -27 -26 -32q-77 -26 -133 -60q-10 -4 -16 -4h-112q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832 q66 0 113 47t47 113v214q0 19 18 29q28 13 54 37q16 16 35 8q21 -9 21 -29zM1645 1043l-384 -384q-18 -19 -45 -19q-12 0 -25 5q-39 17 -39 59v192h-160q-323 0 -438 -131q-119 -137 -74 -473q3 -23 -20 -34q-8 -2 -12 -2q-16 0 -26 13q-10 14 -21 31t-39.5 68.5t-49.5 99.5 t-38.5 114t-17.5 122q0 49 3.5 91t14 90t28 88t47 81.5t68.5 74t94.5 61.5t124.5 48.5t159.5 30.5t196.5 11h160v192q0 42 39 59q13 5 25 5q26 0 45 -19l384 -384q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf046;" horiz-adv-x="1664" d="M1408 606v-318q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q63 0 117 -25q15 -7 18 -23q3 -17 -9 -29l-49 -49q-10 -10 -23 -10q-3 0 -9 2q-23 6 -45 6h-832q-66 0 -113 -47t-47 -113v-832 q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v254q0 13 9 22l64 64q10 10 23 10q6 0 12 -3q20 -8 20 -29zM1639 1095l-814 -814q-24 -24 -57 -24t-57 24l-430 430q-24 24 -24 57t24 57l110 110q24 24 57 24t57 -24l263 -263l647 647q24 24 57 24t57 -24l110 -110 q24 -24 24 -57t-24 -57z" />
+<glyph unicode="&#xf047;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-384v-384h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v384h-384v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45 t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h384v384h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45t-19 -45t-45 -19h-128v-384h384v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf048;" horiz-adv-x="1024" d="M979 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19z" />
+<glyph unicode="&#xf049;" horiz-adv-x="1792" d="M1747 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-9 9 -13 19v-678q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-678q4 11 13 19l710 710 q19 19 32 13t13 -32v-710q4 11 13 19z" />
+<glyph unicode="&#xf04a;" horiz-adv-x="1664" d="M1619 1395q19 19 32 13t13 -32v-1472q0 -26 -13 -32t-32 13l-710 710q-8 9 -13 19v-710q0 -26 -13 -32t-32 13l-710 710q-19 19 -19 45t19 45l710 710q19 19 32 13t13 -32v-710q5 11 13 19z" />
+<glyph unicode="&#xf04b;" horiz-adv-x="1408" d="M1384 609l-1328 -738q-23 -13 -39.5 -3t-16.5 36v1472q0 26 16.5 36t39.5 -3l1328 -738q23 -13 23 -31t-23 -31z" />
+<glyph unicode="&#xf04c;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45zM640 1344v-1408q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04d;" d="M1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf04e;" horiz-adv-x="1664" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q19 -19 19 -45t-19 -45l-710 -710q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf050;" horiz-adv-x="1792" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v710q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19l-710 -710 q-19 -19 -32 -13t-13 32v710q-5 -10 -13 -19z" />
+<glyph unicode="&#xf051;" horiz-adv-x="1024" d="M45 -115q-19 -19 -32 -13t-13 32v1472q0 26 13 32t32 -13l710 -710q8 -8 13 -19v678q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-1408q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v678q-5 -10 -13 -19z" />
+<glyph unicode="&#xf052;" horiz-adv-x="1538" d="M14 557l710 710q19 19 45 19t45 -19l710 -710q19 -19 13 -32t-32 -13h-1472q-26 0 -32 13t13 32zM1473 0h-1408q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1408q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19z" />
+<glyph unicode="&#xf053;" horiz-adv-x="1280" d="M1171 1235l-531 -531l531 -531q19 -19 19 -45t-19 -45l-166 -166q-19 -19 -45 -19t-45 19l-742 742q-19 19 -19 45t19 45l742 742q19 19 45 19t45 -19l166 -166q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf054;" horiz-adv-x="1280" d="M1107 659l-742 -742q-19 -19 -45 -19t-45 19l-166 166q-19 19 -19 45t19 45l531 531l-531 531q-19 19 -19 45t19 45l166 166q19 19 45 19t45 -19l742 -742q19 -19 19 -45t-19 -45z" />
+<glyph unicode="&#xf055;" d="M1216 576v128q0 26 -19 45t-45 19h-256v256q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-256h-256q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h256v-256q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v256h256q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5 t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf056;" d="M1216 576v128q0 26 -19 45t-45 19h-768q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h768q26 0 45 19t19 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="&#xf057;" d="M1149 414q0 26 -19 45l-181 181l181 181q19 19 19 45q0 27 -19 46l-90 90q-19 19 -46 19q-26 0 -45 -19l-181 -181l-181 181q-19 19 -45 19q-27 0 -46 -19l-90 -90q-19 -19 -19 -46q0 -26 19 -45l181 -181l-181 -181q-19 -19 -19 -45q0 -27 19 -46l90 -90q19 -19 46 -19 q26 0 45 19l181 181l181 -181q19 -19 45 -19q27 0 46 19l90 90q19 19 19 46zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf058;" d="M1284 802q0 28 -18 46l-91 90q-19 19 -45 19t-45 -19l-408 -407l-226 226q-19 19 -45 19t-45 -19l-91 -90q-18 -18 -18 -46q0 -27 18 -45l362 -362q19 -19 45 -19q27 0 46 19l543 543q18 18 18 45zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf059;" d="M896 160v192q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h192q14 0 23 9t9 23zM1152 832q0 88 -55.5 163t-138.5 116t-170 41q-243 0 -371 -213q-15 -24 8 -42l132 -100q7 -6 19 -6q16 0 25 12q53 68 86 92q34 24 86 24q48 0 85.5 -26t37.5 -59 q0 -38 -20 -61t-68 -45q-63 -28 -115.5 -86.5t-52.5 -125.5v-36q0 -14 9 -23t23 -9h192q14 0 23 9t9 23q0 19 21.5 49.5t54.5 49.5q32 18 49 28.5t46 35t44.5 48t28 60.5t12.5 81zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05a;" d="M1024 160v160q0 14 -9 23t-23 9h-96v512q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h96v-320h-96q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23t23 -9h448q14 0 23 9t9 23zM896 1056v160q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-160q0 -14 9 -23 t23 -9h192q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05b;" d="M1197 512h-109q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h109q-32 108 -112.5 188.5t-188.5 112.5v-109q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v109q-108 -32 -188.5 -112.5t-112.5 -188.5h109q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-109 q32 -108 112.5 -188.5t188.5 -112.5v109q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-109q108 32 188.5 112.5t112.5 188.5zM1536 704v-128q0 -26 -19 -45t-45 -19h-143q-37 -161 -154.5 -278.5t-278.5 -154.5v-143q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v143 q-161 37 -278.5 154.5t-154.5 278.5h-143q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h143q37 161 154.5 278.5t278.5 154.5v143q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-143q161 -37 278.5 -154.5t154.5 -278.5h143q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf05c;" d="M1097 457l-146 -146q-10 -10 -23 -10t-23 10l-137 137l-137 -137q-10 -10 -23 -10t-23 10l-146 146q-10 10 -10 23t10 23l137 137l-137 137q-10 10 -10 23t10 23l146 146q10 10 23 10t23 -10l137 -137l137 137q10 10 23 10t23 -10l146 -146q10 -10 10 -23t-10 -23 l-137 -137l137 -137q10 -10 10 -23t-10 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5 t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05d;" d="M1171 723l-422 -422q-19 -19 -45 -19t-45 19l-294 294q-19 19 -19 45t19 45l102 102q19 19 45 19t45 -19l147 -147l275 275q19 19 45 19t45 -19l102 -102q19 -19 19 -45t-19 -45zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198 t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf05e;" d="M1312 643q0 161 -87 295l-754 -753q137 -89 297 -89q111 0 211.5 43.5t173.5 116.5t116 174.5t43 212.5zM313 344l755 754q-135 91 -300 91q-148 0 -273 -73t-198 -199t-73 -274q0 -162 89 -299zM1536 643q0 -157 -61 -300t-163.5 -246t-245 -164t-298.5 -61t-298.5 61 t-245 164t-163.5 246t-61 300t61 299.5t163.5 245.5t245 164t298.5 61t298.5 -61t245 -164t163.5 -245.5t61 -299.5z" />
+<glyph unicode="&#xf060;" d="M1536 640v-128q0 -53 -32.5 -90.5t-84.5 -37.5h-704l293 -294q38 -36 38 -90t-38 -90l-75 -76q-37 -37 -90 -37q-52 0 -91 37l-651 652q-37 37 -37 90q0 52 37 91l651 650q38 38 91 38q52 0 90 -38l75 -74q38 -38 38 -91t-38 -91l-293 -293h704q52 0 84.5 -37.5 t32.5 -90.5z" />
+<glyph unicode="&#xf061;" d="M1472 576q0 -54 -37 -91l-651 -651q-39 -37 -91 -37q-51 0 -90 37l-75 75q-38 38 -38 91t38 91l293 293h-704q-52 0 -84.5 37.5t-32.5 90.5v128q0 53 32.5 90.5t84.5 37.5h704l-293 294q-38 36 -38 90t38 90l75 75q38 38 90 38q53 0 91 -38l651 -651q37 -35 37 -90z" />
+<glyph unicode="&#xf062;" horiz-adv-x="1664" d="M1611 565q0 -51 -37 -90l-75 -75q-38 -38 -91 -38q-54 0 -90 38l-294 293v-704q0 -52 -37.5 -84.5t-90.5 -32.5h-128q-53 0 -90.5 32.5t-37.5 84.5v704l-294 -293q-36 -38 -90 -38t-90 38l-75 75q-38 38 -38 90q0 53 38 91l651 651q35 37 90 37q54 0 91 -37l651 -651 q37 -39 37 -91z" />
+<glyph unicode="&#xf063;" horiz-adv-x="1664" d="M1611 704q0 -53 -37 -90l-651 -652q-39 -37 -91 -37q-53 0 -90 37l-651 652q-38 36 -38 90q0 53 38 91l74 75q39 37 91 37q53 0 90 -37l294 -294v704q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-704l294 294q37 37 90 37q52 0 91 -37l75 -75q37 -39 37 -91z" />
+<glyph unicode="&#xf064;" horiz-adv-x="1792" d="M1792 896q0 -26 -19 -45l-512 -512q-19 -19 -45 -19t-45 19t-19 45v256h-224q-98 0 -175.5 -6t-154 -21.5t-133 -42.5t-105.5 -69.5t-80 -101t-48.5 -138.5t-17.5 -181q0 -55 5 -123q0 -6 2.5 -23.5t2.5 -26.5q0 -15 -8.5 -25t-23.5 -10q-16 0 -28 17q-7 9 -13 22 t-13.5 30t-10.5 24q-127 285 -127 451q0 199 53 333q162 403 875 403h224v256q0 26 19 45t45 19t45 -19l512 -512q19 -19 19 -45z" />
+<glyph unicode="&#xf065;" d="M755 480q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23zM1536 1344v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332 q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf066;" d="M768 576v-448q0 -26 -19 -45t-45 -19t-45 19l-144 144l-332 -332q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l332 332l-144 144q-19 19 -19 45t19 45t45 19h448q26 0 45 -19t19 -45zM1523 1248q0 -13 -10 -23l-332 -332l144 -144q19 -19 19 -45t-19 -45 t-45 -19h-448q-26 0 -45 19t-19 45v448q0 26 19 45t45 19t45 -19l144 -144l332 332q10 10 23 10t23 -10l114 -114q10 -10 10 -23z" />
+<glyph unicode="&#xf067;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-416v-416q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v416h-416q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h416v416q0 40 28 68t68 28h192q40 0 68 -28t28 -68v-416h416q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf068;" horiz-adv-x="1408" d="M1408 800v-192q0 -40 -28 -68t-68 -28h-1216q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h1216q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf069;" horiz-adv-x="1664" d="M1482 486q46 -26 59.5 -77.5t-12.5 -97.5l-64 -110q-26 -46 -77.5 -59.5t-97.5 12.5l-266 153v-307q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v307l-266 -153q-46 -26 -97.5 -12.5t-77.5 59.5l-64 110q-26 46 -12.5 97.5t59.5 77.5l266 154l-266 154 q-46 26 -59.5 77.5t12.5 97.5l64 110q26 46 77.5 59.5t97.5 -12.5l266 -153v307q0 52 38 90t90 38h128q52 0 90 -38t38 -90v-307l266 153q46 26 97.5 12.5t77.5 -59.5l64 -110q26 -46 12.5 -97.5t-59.5 -77.5l-266 -154z" />
+<glyph unicode="&#xf06a;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM896 161v190q0 14 -9 23.5t-22 9.5h-192q-13 0 -23 -10t-10 -23v-190q0 -13 10 -23t23 -10h192 q13 0 22 9.5t9 23.5zM894 505l18 621q0 12 -10 18q-10 8 -24 8h-220q-14 0 -24 -8q-10 -6 -10 -18l17 -621q0 -10 10 -17.5t24 -7.5h185q14 0 23.5 7.5t10.5 17.5z" />
+<glyph unicode="&#xf06b;" d="M928 180v56v468v192h-320v-192v-468v-56q0 -25 18 -38.5t46 -13.5h192q28 0 46 13.5t18 38.5zM472 1024h195l-126 161q-26 31 -69 31q-40 0 -68 -28t-28 -68t28 -68t68 -28zM1160 1120q0 40 -28 68t-68 28q-43 0 -69 -31l-125 -161h194q40 0 68 28t28 68zM1536 864v-320 q0 -14 -9 -23t-23 -9h-96v-416q0 -40 -28 -68t-68 -28h-1088q-40 0 -68 28t-28 68v416h-96q-14 0 -23 9t-9 23v320q0 14 9 23t23 9h440q-93 0 -158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5q107 0 168 -77l128 -165l128 165q61 77 168 77q93 0 158.5 -65.5t65.5 -158.5 t-65.5 -158.5t-158.5 -65.5h440q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf06c;" horiz-adv-x="1792" d="M1280 832q0 26 -19 45t-45 19q-172 0 -318 -49.5t-259.5 -134t-235.5 -219.5q-19 -21 -19 -45q0 -26 19 -45t45 -19q24 0 45 19q27 24 74 71t67 66q137 124 268.5 176t313.5 52q26 0 45 19t19 45zM1792 1030q0 -95 -20 -193q-46 -224 -184.5 -383t-357.5 -268 q-214 -108 -438 -108q-148 0 -286 47q-15 5 -88 42t-96 37q-16 0 -39.5 -32t-45 -70t-52.5 -70t-60 -32q-30 0 -51 11t-31 24t-27 42q-2 4 -6 11t-5.5 10t-3 9.5t-1.5 13.5q0 35 31 73.5t68 65.5t68 56t31 48q0 4 -14 38t-16 44q-9 51 -9 104q0 115 43.5 220t119 184.5 t170.5 139t204 95.5q55 18 145 25.5t179.5 9t178.5 6t163.5 24t113.5 56.5l29.5 29.5t29.5 28t27 20t36.5 16t43.5 4.5q39 0 70.5 -46t47.5 -112t24 -124t8 -96z" />
+<glyph unicode="&#xf06d;" horiz-adv-x="1408" d="M1408 -160v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-1344q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h1344q13 0 22.5 -9.5t9.5 -22.5zM1152 896q0 -78 -24.5 -144t-64 -112.5t-87.5 -88t-96 -77.5t-87.5 -72t-64 -81.5t-24.5 -96.5q0 -96 67 -224l-4 1l1 -1 q-90 41 -160 83t-138.5 100t-113.5 122.5t-72.5 150.5t-27.5 184q0 78 24.5 144t64 112.5t87.5 88t96 77.5t87.5 72t64 81.5t24.5 96.5q0 94 -66 224l3 -1l-1 1q90 -41 160 -83t138.5 -100t113.5 -122.5t72.5 -150.5t27.5 -184z" />
+<glyph unicode="&#xf06e;" horiz-adv-x="1792" d="M1664 576q-152 236 -381 353q61 -104 61 -225q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 121 61 225q-229 -117 -381 -353q133 -205 333.5 -326.5t434.5 -121.5t434.5 121.5t333.5 326.5zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5 t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1792 576q0 -34 -20 -69q-140 -230 -376.5 -368.5t-499.5 -138.5t-499.5 139t-376.5 368q-20 35 -20 69t20 69q140 229 376.5 368t499.5 139t499.5 -139t376.5 -368q20 -35 20 -69z" />
+<glyph unicode="&#xf070;" horiz-adv-x="1792" d="M555 201l78 141q-87 63 -136 159t-49 203q0 121 61 225q-229 -117 -381 -353q167 -258 427 -375zM944 960q0 20 -14 34t-34 14q-125 0 -214.5 -89.5t-89.5 -214.5q0 -20 14 -34t34 -14t34 14t14 34q0 86 61 147t147 61q20 0 34 14t14 34zM1307 1151q0 -7 -1 -9 q-105 -188 -315 -566t-316 -567l-49 -89q-10 -16 -28 -16q-12 0 -134 70q-16 10 -16 28q0 12 44 87q-143 65 -263.5 173t-208.5 245q-20 31 -20 69t20 69q153 235 380 371t496 136q89 0 180 -17l54 97q10 16 28 16q5 0 18 -6t31 -15.5t33 -18.5t31.5 -18.5t19.5 -11.5 q16 -10 16 -27zM1344 704q0 -139 -79 -253.5t-209 -164.5l280 502q8 -45 8 -84zM1792 576q0 -35 -20 -69q-39 -64 -109 -145q-150 -172 -347.5 -267t-419.5 -95l74 132q212 18 392.5 137t301.5 307q-115 179 -282 294l63 112q95 -64 182.5 -153t144.5 -184q20 -34 20 -69z " />
+<glyph unicode="&#xf071;" horiz-adv-x="1792" d="M1024 161v190q0 14 -9.5 23.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -23.5v-190q0 -14 9.5 -23.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 23.5zM1022 535l18 459q0 12 -10 19q-13 11 -24 11h-220q-11 0 -24 -11q-10 -7 -10 -21l17 -457q0 -10 10 -16.5t24 -6.5h185 q14 0 23.5 6.5t10.5 16.5zM1008 1469l768 -1408q35 -63 -2 -126q-17 -29 -46.5 -46t-63.5 -17h-1536q-34 0 -63.5 17t-46.5 46q-37 63 -2 126l768 1408q17 31 47 49t65 18t65 -18t47 -49z" />
+<glyph unicode="&#xf072;" horiz-adv-x="1408" d="M1376 1376q44 -52 12 -148t-108 -172l-161 -161l160 -696q5 -19 -12 -33l-128 -96q-7 -6 -19 -6q-4 0 -7 1q-15 3 -21 16l-279 508l-259 -259l53 -194q5 -17 -8 -31l-96 -96q-9 -9 -23 -9h-2q-15 2 -24 13l-189 252l-252 189q-11 7 -13 23q-1 13 9 25l96 97q9 9 23 9 q6 0 8 -1l194 -53l259 259l-508 279q-14 8 -17 24q-2 16 9 27l128 128q14 13 30 8l665 -159l160 160q76 76 172 108t148 -12z" />
+<glyph unicode="&#xf073;" horiz-adv-x="1664" d="M128 -128h288v288h-288v-288zM480 -128h320v288h-320v-288zM128 224h288v320h-288v-320zM480 224h320v320h-320v-320zM128 608h288v288h-288v-288zM864 -128h320v288h-320v-288zM480 608h320v288h-320v-288zM1248 -128h288v288h-288v-288zM864 224h320v320h-320v-320z M512 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1248 224h288v320h-288v-320zM864 608h320v288h-320v-288zM1248 608h288v288h-288v-288zM1280 1088v288q0 13 -9.5 22.5t-22.5 9.5h-64 q-13 0 -22.5 -9.5t-9.5 -22.5v-288q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47 h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf074;" horiz-adv-x="1792" d="M666 1055q-60 -92 -137 -273q-22 45 -37 72.5t-40.5 63.5t-51 56.5t-63 35t-81.5 14.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q250 0 410 -225zM1792 256q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192q-32 0 -85 -0.5t-81 -1t-73 1 t-71 5t-64 10.5t-63 18.5t-58 28.5t-59 40t-55 53.5t-56 69.5q59 93 136 273q22 -45 37 -72.5t40.5 -63.5t51 -56.5t63 -35t81.5 -14.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1792 1152q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5 v192h-256q-48 0 -87 -15t-69 -45t-51 -61.5t-45 -77.5q-32 -62 -78 -171q-29 -66 -49.5 -111t-54 -105t-64 -100t-74 -83t-90 -68.5t-106.5 -42t-128 -16.5h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224q48 0 87 15t69 45t51 61.5t45 77.5q32 62 78 171q29 66 49.5 111 t54 105t64 100t74 83t90 68.5t106.5 42t128 16.5h256v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf075;" horiz-adv-x="1792" d="M1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22q-17 -2 -30.5 9t-17.5 29v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281 q0 130 71 248.5t191 204.5t286 136.5t348 50.5q244 0 450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf076;" d="M1536 704v-128q0 -201 -98.5 -362t-274 -251.5t-395.5 -90.5t-395.5 90.5t-274 251.5t-98.5 362v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-128q0 -52 23.5 -90t53.5 -57t71 -30t64 -13t44 -2t44 2t64 13t71 30t53.5 57t23.5 90v128q0 26 19 45t45 19h384 q26 0 45 -19t19 -45zM512 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45zM1536 1344v-384q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h384q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf077;" horiz-adv-x="1792" d="M1683 205l-166 -165q-19 -19 -45 -19t-45 19l-531 531l-531 -531q-19 -19 -45 -19t-45 19l-166 165q-19 19 -19 45.5t19 45.5l742 741q19 19 45 19t45 -19l742 -741q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf078;" horiz-adv-x="1792" d="M1683 728l-742 -741q-19 -19 -45 -19t-45 19l-742 741q-19 19 -19 45.5t19 45.5l166 165q19 19 45 19t45 -19l531 -531l531 531q19 19 45 19t45 -19l166 -165q19 -19 19 -45.5t-19 -45.5z" />
+<glyph unicode="&#xf079;" horiz-adv-x="1920" d="M1280 32q0 -13 -9.5 -22.5t-22.5 -9.5h-960q-8 0 -13.5 2t-9 7t-5.5 8t-3 11.5t-1 11.5v13v11v160v416h-192q-26 0 -45 19t-19 45q0 24 15 41l320 384q19 22 49 22t49 -22l320 -384q15 -17 15 -41q0 -26 -19 -45t-45 -19h-192v-384h576q16 0 25 -11l160 -192q7 -11 7 -21 zM1920 448q0 -24 -15 -41l-320 -384q-20 -23 -49 -23t-49 23l-320 384q-15 17 -15 41q0 26 19 45t45 19h192v384h-576q-16 0 -25 12l-160 192q-7 9 -7 20q0 13 9.5 22.5t22.5 9.5h960q8 0 13.5 -2t9 -7t5.5 -8t3 -11.5t1 -11.5v-13v-11v-160v-416h192q26 0 45 -19t19 -45z " />
+<glyph unicode="&#xf07a;" horiz-adv-x="1664" d="M640 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1536 0q0 -52 -38 -90t-90 -38t-90 38t-38 90t38 90t90 38t90 -38t38 -90zM1664 1088v-512q0 -24 -16.5 -42.5t-40.5 -21.5l-1044 -122q13 -60 13 -70q0 -16 -24 -64h920q26 0 45 -19t19 -45 t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 11 8 31.5t16 36t21.5 40t15.5 29.5l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t19.5 -15.5t13 -24.5t8 -26t5.5 -29.5t4.5 -26h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf07b;" horiz-adv-x="1664" d="M1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07c;" horiz-adv-x="1920" d="M1879 584q0 -31 -31 -66l-336 -396q-43 -51 -120.5 -86.5t-143.5 -35.5h-1088q-34 0 -60.5 13t-26.5 43q0 31 31 66l336 396q43 51 120.5 86.5t143.5 35.5h1088q34 0 60.5 -13t26.5 -43zM1536 928v-160h-832q-94 0 -197 -47.5t-164 -119.5l-337 -396l-5 -6q0 4 -0.5 12.5 t-0.5 12.5v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf07d;" horiz-adv-x="768" d="M704 1216q0 -26 -19 -45t-45 -19h-128v-1024h128q26 0 45 -19t19 -45t-19 -45l-256 -256q-19 -19 -45 -19t-45 19l-256 256q-19 19 -19 45t19 45t45 19h128v1024h-128q-26 0 -45 19t-19 45t19 45l256 256q19 19 45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf07e;" horiz-adv-x="1792" d="M1792 640q0 -26 -19 -45l-256 -256q-19 -19 -45 -19t-45 19t-19 45v128h-1024v-128q0 -26 -19 -45t-45 -19t-45 19l-256 256q-19 19 -19 45t19 45l256 256q19 19 45 19t45 -19t19 -45v-128h1024v128q0 26 19 45t45 19t45 -19l256 -256q19 -19 19 -45z" />
+<glyph unicode="&#xf080;" horiz-adv-x="2048" d="M640 640v-512h-256v512h256zM1024 1152v-1024h-256v1024h256zM2048 0v-128h-2048v1536h128v-1408h1920zM1408 896v-768h-256v768h256zM1792 1280v-1152h-256v1152h256z" />
+<glyph unicode="&#xf081;" d="M1280 926q-56 -25 -121 -34q68 40 93 117q-65 -38 -134 -51q-61 66 -153 66q-87 0 -148.5 -61.5t-61.5 -148.5q0 -29 5 -48q-129 7 -242 65t-192 155q-29 -50 -29 -106q0 -114 91 -175q-47 1 -100 26v-2q0 -75 50 -133.5t123 -72.5q-29 -8 -51 -8q-13 0 -39 4 q21 -63 74.5 -104t121.5 -42q-116 -90 -261 -90q-26 0 -50 3q148 -94 322 -94q112 0 210 35.5t168 95t120.5 137t75 162t24.5 168.5q0 18 -1 27q63 45 105 109zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5 t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf082;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-188v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-532q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960z" />
+<glyph unicode="&#xf083;" horiz-adv-x="1792" d="M928 704q0 14 -9 23t-23 9q-66 0 -113 -47t-47 -113q0 -14 9 -23t23 -9t23 9t9 23q0 40 28 68t68 28q14 0 23 9t9 23zM1152 574q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM128 0h1536v128h-1536v-128zM1280 574q0 159 -112.5 271.5 t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM256 1216h384v128h-384v-128zM128 1024h1536v118v138h-828l-64 -128h-644v-128zM1792 1280v-1280q0 -53 -37.5 -90.5t-90.5 -37.5h-1536q-53 0 -90.5 37.5t-37.5 90.5v1280 q0 53 37.5 90.5t90.5 37.5h1536q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf084;" horiz-adv-x="1792" d="M832 1024q0 80 -56 136t-136 56t-136 -56t-56 -136q0 -42 19 -83q-41 19 -83 19q-80 0 -136 -56t-56 -136t56 -136t136 -56t136 56t56 136q0 42 -19 83q41 -19 83 -19q80 0 136 56t56 136zM1683 320q0 -17 -49 -66t-66 -49q-9 0 -28.5 16t-36.5 33t-38.5 40t-24.5 26 l-96 -96l220 -220q28 -28 28 -68q0 -42 -39 -81t-81 -39q-40 0 -68 28l-671 671q-176 -131 -365 -131q-163 0 -265.5 102.5t-102.5 265.5q0 160 95 313t248 248t313 95q163 0 265.5 -102.5t102.5 -265.5q0 -189 -131 -365l355 -355l96 96q-3 3 -26 24.5t-40 38.5t-33 36.5 t-16 28.5q0 17 49 66t66 49q13 0 23 -10q6 -6 46 -44.5t82 -79.5t86.5 -86t73 -78t28.5 -41z" />
+<glyph unicode="&#xf085;" horiz-adv-x="1920" d="M896 640q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM1664 128q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1152q0 52 -38 90t-90 38t-90 -38t-38 -90q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1280 731v-185q0 -10 -7 -19.5t-16 -10.5l-155 -24q-11 -35 -32 -76q34 -48 90 -115q7 -10 7 -20q0 -12 -7 -19q-23 -30 -82.5 -89.5t-78.5 -59.5q-11 0 -21 7l-115 90q-37 -19 -77 -31q-11 -108 -23 -155q-7 -24 -30 -24h-186q-11 0 -20 7.5t-10 17.5 l-23 153q-34 10 -75 31l-118 -89q-7 -7 -20 -7q-11 0 -21 8q-144 133 -144 160q0 9 7 19q10 14 41 53t47 61q-23 44 -35 82l-152 24q-10 1 -17 9.5t-7 19.5v185q0 10 7 19.5t16 10.5l155 24q11 35 32 76q-34 48 -90 115q-7 11 -7 20q0 12 7 20q22 30 82 89t79 59q11 0 21 -7 l115 -90q34 18 77 32q11 108 23 154q7 24 30 24h186q11 0 20 -7.5t10 -17.5l23 -153q34 -10 75 -31l118 89q8 7 20 7q11 0 21 -8q144 -133 144 -160q0 -9 -7 -19q-12 -16 -42 -54t-45 -60q23 -48 34 -82l152 -23q10 -2 17 -10.5t7 -19.5zM1920 198v-140q0 -16 -149 -31 q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20 t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31zM1920 1222v-140q0 -16 -149 -31q-12 -27 -30 -52q51 -113 51 -138q0 -4 -4 -7q-122 -71 -124 -71q-8 0 -46 47t-52 68 q-20 -2 -30 -2t-30 2q-14 -21 -52 -68t-46 -47q-2 0 -124 71q-4 3 -4 7q0 25 51 138q-18 25 -30 52q-149 15 -149 31v140q0 16 149 31q13 29 30 52q-51 113 -51 138q0 4 4 7q4 2 35 20t59 34t30 16q8 0 46 -46.5t52 -67.5q20 2 30 2t30 -2q51 71 92 112l6 2q4 0 124 -70 q4 -3 4 -7q0 -25 -51 -138q17 -23 30 -52q149 -15 149 -31z" />
+<glyph unicode="&#xf086;" horiz-adv-x="1792" d="M1408 768q0 -139 -94 -257t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224 q0 139 94 257t256.5 186.5t353.5 68.5t353.5 -68.5t256.5 -186.5t94 -257zM1792 512q0 -120 -71 -224.5t-195 -176.5q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7 q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230z" />
+<glyph unicode="&#xf087;" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 768q0 51 -39 89.5t-89 38.5h-352q0 58 48 159.5t48 160.5q0 98 -32 145t-128 47q-26 -26 -38 -85t-30.5 -125.5t-59.5 -109.5q-22 -23 -77 -91q-4 -5 -23 -30t-31.5 -41t-34.5 -42.5 t-40 -44t-38.5 -35.5t-40 -27t-35.5 -9h-32v-640h32q13 0 31.5 -3t33 -6.5t38 -11t35 -11.5t35.5 -12.5t29 -10.5q211 -73 342 -73h121q192 0 192 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5q32 1 53.5 47t21.5 81zM1536 769 q0 -89 -49 -163q9 -33 9 -69q0 -77 -38 -144q3 -21 3 -43q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5h-36h-93q-96 0 -189.5 22.5t-216.5 65.5q-116 40 -138 40h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h274q36 24 137 155q58 75 107 128 q24 25 35.5 85.5t30.5 126.5t62 108q39 37 90 37q84 0 151 -32.5t102 -101.5t35 -186q0 -93 -48 -192h176q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf088;" d="M256 1088q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 512q0 35 -21.5 81t-53.5 47q15 17 25 47.5t10 55.5q0 69 -53 119q18 32 18 69t-17.5 73.5t-47.5 52.5q5 30 5 56q0 85 -49 126t-136 41h-128q-131 0 -342 -73q-5 -2 -29 -10.5 t-35.5 -12.5t-35 -11.5t-38 -11t-33 -6.5t-31.5 -3h-32v-640h32q16 0 35.5 -9t40 -27t38.5 -35.5t40 -44t34.5 -42.5t31.5 -41t23 -30q55 -68 77 -91q41 -43 59.5 -109.5t30.5 -125.5t38 -85q96 0 128 47t32 145q0 59 -48 160.5t-48 159.5h352q50 0 89 38.5t39 89.5z M1536 511q0 -103 -76 -179t-180 -76h-176q48 -99 48 -192q0 -118 -35 -186q-35 -69 -102 -101.5t-151 -32.5q-51 0 -90 37q-34 33 -54 82t-25.5 90.5t-17.5 84.5t-31 64q-48 50 -107 127q-101 131 -137 155h-274q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5 h288q22 0 138 40q128 44 223 66t200 22h112q140 0 226.5 -79t85.5 -216v-5q60 -77 60 -178q0 -22 -3 -43q38 -67 38 -144q0 -36 -9 -69q49 -74 49 -163z" />
+<glyph unicode="&#xf089;" horiz-adv-x="896" d="M832 1504v-1339l-449 -236q-22 -12 -40 -12q-21 0 -31.5 14.5t-10.5 35.5q0 6 2 20l86 500l-364 354q-25 27 -25 48q0 37 56 46l502 73l225 455q19 41 49 41z" />
+<glyph unicode="&#xf08a;" horiz-adv-x="1792" d="M1664 940q0 81 -21.5 143t-55 98.5t-81.5 59.5t-94 31t-98 8t-112 -25.5t-110.5 -64t-86.5 -72t-60 -61.5q-18 -22 -49 -22t-49 22q-24 28 -60 61.5t-86.5 72t-110.5 64t-112 25.5t-98 -8t-94 -31t-81.5 -59.5t-55 -98.5t-21.5 -143q0 -168 187 -355l581 -560l580 559 q188 188 188 356zM1792 940q0 -221 -229 -450l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-10 8 -27.5 26t-55.5 65.5t-68 97.5t-53.5 121t-23.5 138q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5 q224 0 351 -124t127 -344z" />
+<glyph unicode="&#xf08b;" horiz-adv-x="1664" d="M640 96q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-119 0 -203.5 84.5t-84.5 203.5v704q0 119 84.5 203.5t203.5 84.5h320q13 0 22.5 -9.5t9.5 -22.5q0 -4 1 -20t0.5 -26.5t-3 -23.5t-10 -19.5t-20.5 -6.5h-320q-66 0 -113 -47t-47 -113v-704 q0 -66 47 -113t113 -47h288h11h13t11.5 -1t11.5 -3t8 -5.5t7 -9t2 -13.5zM1568 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45z" />
+<glyph unicode="&#xf08c;" d="M237 122h231v694h-231v-694zM483 1030q-1 52 -36 86t-93 34t-94.5 -34t-36.5 -86q0 -51 35.5 -85.5t92.5 -34.5h1q59 0 95 34.5t36 85.5zM1068 122h231v398q0 154 -73 233t-193 79q-136 0 -209 -117h2v101h-231q3 -66 0 -694h231v388q0 38 7 56q15 35 45 59.5t74 24.5 q116 0 116 -157v-371zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf08d;" horiz-adv-x="1152" d="M480 672v448q0 14 -9 23t-23 9t-23 -9t-9 -23v-448q0 -14 9 -23t23 -9t23 9t9 23zM1152 320q0 -26 -19 -45t-45 -19h-429l-51 -483q-2 -12 -10.5 -20.5t-20.5 -8.5h-1q-27 0 -32 27l-76 485h-404q-26 0 -45 19t-19 45q0 123 78.5 221.5t177.5 98.5v512q-52 0 -90 38 t-38 90t38 90t90 38h640q52 0 90 -38t38 -90t-38 -90t-90 -38v-512q99 0 177.5 -98.5t78.5 -221.5z" />
+<glyph unicode="&#xf08e;" horiz-adv-x="1792" d="M1408 608v-320q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v320 q0 14 9 23t23 9h64q14 0 23 -9t9 -23zM1792 1472v-512q0 -26 -19 -45t-45 -19t-45 19l-176 176l-652 -652q-10 -10 -23 -10t-23 10l-114 114q-10 10 -10 23t10 23l652 652l-176 176q-19 19 -19 45t19 45t45 19h512q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf090;" d="M1184 640q0 -26 -19 -45l-544 -544q-19 -19 -45 -19t-45 19t-19 45v288h-448q-26 0 -45 19t-19 45v384q0 26 19 45t45 19h448v288q0 26 19 45t45 19t45 -19l544 -544q19 -19 19 -45zM1536 992v-704q0 -119 -84.5 -203.5t-203.5 -84.5h-320q-13 0 -22.5 9.5t-9.5 22.5 q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q66 0 113 47t47 113v704q0 66 -47 113t-113 47h-288h-11h-13t-11.5 1t-11.5 3t-8 5.5t-7 9t-2 13.5q0 4 -1 20t-0.5 26.5t3 23.5t10 19.5t20.5 6.5h320q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf091;" horiz-adv-x="1664" d="M458 653q-74 162 -74 371h-256v-96q0 -78 94.5 -162t235.5 -113zM1536 928v96h-256q0 -209 -74 -371q141 29 235.5 113t94.5 162zM1664 1056v-128q0 -71 -41.5 -143t-112 -130t-173 -97.5t-215.5 -44.5q-42 -54 -95 -95q-38 -34 -52.5 -72.5t-14.5 -89.5q0 -54 30.5 -91 t97.5 -37q75 0 133.5 -45.5t58.5 -114.5v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 69 58.5 114.5t133.5 45.5q67 0 97.5 37t30.5 91q0 51 -14.5 89.5t-52.5 72.5q-53 41 -95 95q-113 5 -215.5 44.5t-173 97.5t-112 130t-41.5 143v128q0 40 28 68t68 28h288v96 q0 66 47 113t113 47h576q66 0 113 -47t47 -113v-96h288q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf092;" d="M394 184q-8 -9 -20 3q-13 11 -4 19q8 9 20 -3q12 -11 4 -19zM352 245q9 -12 0 -19q-8 -6 -17 7t0 18q9 7 17 -6zM291 305q-5 -7 -13 -2q-10 5 -7 12q3 5 13 2q10 -5 7 -12zM322 271q-6 -7 -16 3q-9 11 -2 16q6 6 16 -3q9 -11 2 -16zM451 159q-4 -12 -19 -6q-17 4 -13 15 t19 7q16 -5 13 -16zM514 154q0 -11 -16 -11q-17 -2 -17 11q0 11 16 11q17 2 17 -11zM572 164q2 -10 -14 -14t-18 8t14 15q16 2 18 -9zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-224q-16 0 -24.5 1t-19.5 5t-16 14.5t-5 27.5v239q0 97 -52 142q57 6 102.5 18t94 39 t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103 q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -103t0.5 -68q0 -22 -11 -33.5t-22 -13t-33 -1.5 h-224q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf093;" horiz-adv-x="1664" d="M1280 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 288v-320q0 -40 -28 -68t-68 -28h-1472q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h427q21 -56 70.5 -92 t110.5 -36h256q61 0 110.5 36t70.5 92h427q40 0 68 -28t28 -68zM1339 936q-17 -40 -59 -40h-256v-448q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v448h-256q-42 0 -59 40q-17 39 14 69l448 448q18 19 45 19t45 -19l448 -448q31 -30 14 -69z" />
+<glyph unicode="&#xf094;" d="M1407 710q0 44 -7 113.5t-18 96.5q-12 30 -17 44t-9 36.5t-4 48.5q0 23 5 68.5t5 67.5q0 37 -10 55q-4 1 -13 1q-19 0 -58 -4.5t-59 -4.5q-60 0 -176 24t-175 24q-43 0 -94.5 -11.5t-85 -23.5t-89.5 -34q-137 -54 -202 -103q-96 -73 -159.5 -189.5t-88 -236t-24.5 -248.5 q0 -40 12.5 -120t12.5 -121q0 -23 -11 -66.5t-11 -65.5t12 -36.5t34 -14.5q24 0 72.5 11t73.5 11q57 0 169.5 -15.5t169.5 -15.5q181 0 284 36q129 45 235.5 152.5t166 245.5t59.5 275zM1535 712q0 -165 -70 -327.5t-196 -288t-281 -180.5q-124 -44 -326 -44 q-57 0 -170 14.5t-169 14.5q-24 0 -72.5 -14.5t-73.5 -14.5q-73 0 -123.5 55.5t-50.5 128.5q0 24 11 68t11 67q0 40 -12.5 120.5t-12.5 121.5q0 111 18 217.5t54.5 209.5t100.5 194t150 156q78 59 232 120q194 78 316 78q60 0 175.5 -24t173.5 -24q19 0 57 5t58 5 q81 0 118 -50.5t37 -134.5q0 -23 -5 -68t-5 -68q0 -10 1 -18.5t3 -17t4 -13.5t6.5 -16t6.5 -17q16 -40 25 -118.5t9 -136.5z" />
+<glyph unicode="&#xf095;" horiz-adv-x="1408" d="M1408 296q0 -27 -10 -70.5t-21 -68.5q-21 -50 -122 -106q-94 -51 -186 -51q-27 0 -52.5 3.5t-57.5 12.5t-47.5 14.5t-55.5 20.5t-49 18q-98 35 -175 83q-128 79 -264.5 215.5t-215.5 264.5q-48 77 -83 175q-3 9 -18 49t-20.5 55.5t-14.5 47.5t-12.5 57.5t-3.5 52.5 q0 92 51 186q56 101 106 122q25 11 68.5 21t70.5 10q14 0 21 -3q18 -6 53 -76q11 -19 30 -54t35 -63.5t31 -53.5q3 -4 17.5 -25t21.5 -35.5t7 -28.5q0 -20 -28.5 -50t-62 -55t-62 -53t-28.5 -46q0 -9 5 -22.5t8.5 -20.5t14 -24t11.5 -19q76 -137 174 -235t235 -174 q2 -1 19 -11.5t24 -14t20.5 -8.5t22.5 -5q18 0 46 28.5t53 62t55 62t50 28.5q14 0 28.5 -7t35.5 -21.5t25 -17.5q25 -15 53.5 -31t63.5 -35t54 -30q70 -35 76 -53q3 -7 3 -21z" />
+<glyph unicode="&#xf096;" horiz-adv-x="1408" d="M1120 1280h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113v832q0 66 -47 113t-113 47zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832 q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf097;" horiz-adv-x="1280" d="M1152 1280h-1024v-1242l423 406l89 85l89 -85l423 -406v1242zM1164 1408q23 0 44 -9q33 -13 52.5 -41t19.5 -62v-1289q0 -34 -19.5 -62t-52.5 -41q-19 -8 -44 -8q-48 0 -83 32l-441 424l-441 -424q-36 -33 -83 -33q-23 0 -44 9q-33 13 -52.5 41t-19.5 62v1289 q0 34 19.5 62t52.5 41q21 9 44 9h1048z" />
+<glyph unicode="&#xf098;" d="M1280 343q0 11 -2 16q-3 8 -38.5 29.5t-88.5 49.5l-53 29q-5 3 -19 13t-25 15t-21 5q-18 0 -47 -32.5t-57 -65.5t-44 -33q-7 0 -16.5 3.5t-15.5 6.5t-17 9.5t-14 8.5q-99 55 -170.5 126.5t-126.5 170.5q-2 3 -8.5 14t-9.5 17t-6.5 15.5t-3.5 16.5q0 13 20.5 33.5t45 38.5 t45 39.5t20.5 36.5q0 10 -5 21t-15 25t-13 19q-3 6 -15 28.5t-25 45.5t-26.5 47.5t-25 40.5t-16.5 18t-16 2q-48 0 -101 -22q-46 -21 -80 -94.5t-34 -130.5q0 -16 2.5 -34t5 -30.5t9 -33t10 -29.5t12.5 -33t11 -30q60 -164 216.5 -320.5t320.5 -216.5q6 -2 30 -11t33 -12.5 t29.5 -10t33 -9t30.5 -5t34 -2.5q57 0 130.5 34t94.5 80q22 53 22 101zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf099;" horiz-adv-x="1664" d="M1620 1128q-67 -98 -162 -167q1 -14 1 -42q0 -130 -38 -259.5t-115.5 -248.5t-184.5 -210.5t-258 -146t-323 -54.5q-271 0 -496 145q35 -4 78 -4q225 0 401 138q-105 2 -188 64.5t-114 159.5q33 -5 61 -5q43 0 85 11q-112 23 -185.5 111.5t-73.5 205.5v4q68 -38 146 -41 q-66 44 -105 115t-39 154q0 88 44 163q121 -149 294.5 -238.5t371.5 -99.5q-8 38 -8 74q0 134 94.5 228.5t228.5 94.5q140 0 236 -102q109 21 205 78q-37 -115 -142 -178q93 10 186 50z" />
+<glyph unicode="&#xf09a;" horiz-adv-x="1024" d="M959 1524v-264h-157q-86 0 -116 -36t-30 -108v-189h293l-39 -296h-254v-759h-306v759h-255v296h255v218q0 186 104 288.5t277 102.5q147 0 228 -12z" />
+<glyph unicode="&#xf09b;" d="M1536 640q0 -251 -146.5 -451.5t-378.5 -277.5q-27 -5 -39.5 7t-12.5 30v211q0 97 -52 142q57 6 102.5 18t94 39t81 66.5t53 105t20.5 150.5q0 121 -79 206q37 91 -8 204q-28 9 -81 -11t-92 -44l-38 -24q-93 26 -192 26t-192 -26q-16 11 -42.5 27t-83.5 38.5t-86 13.5 q-44 -113 -7 -204q-79 -85 -79 -206q0 -85 20.5 -150t52.5 -105t80.5 -67t94 -39t102.5 -18q-40 -36 -49 -103q-21 -10 -45 -15t-57 -5t-65.5 21.5t-55.5 62.5q-19 32 -48.5 52t-49.5 24l-20 3q-21 0 -29 -4.5t-5 -11.5t9 -14t13 -12l7 -5q22 -10 43.5 -38t31.5 -51l10 -23 q13 -38 44 -61.5t67 -30t69.5 -7t55.5 3.5l23 4q0 -38 0.5 -89t0.5 -54q0 -18 -13 -30t-40 -7q-232 77 -378.5 277.5t-146.5 451.5q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf09c;" horiz-adv-x="1664" d="M1664 960v-256q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-192h96q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h672v192q0 185 131.5 316.5t316.5 131.5 t316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf09d;" horiz-adv-x="1920" d="M1760 1408q66 0 113 -47t47 -113v-1216q0 -66 -47 -113t-113 -47h-1600q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1600zM160 1280q-13 0 -22.5 -9.5t-9.5 -22.5v-224h1664v224q0 13 -9.5 22.5t-22.5 9.5h-1600zM1760 0q13 0 22.5 9.5t9.5 22.5v608h-1664v-608 q0 -13 9.5 -22.5t22.5 -9.5h1600zM256 128v128h256v-128h-256zM640 128v128h384v-128h-384z" />
+<glyph unicode="&#xf09e;" horiz-adv-x="1408" d="M384 192q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM896 69q2 -28 -17 -48q-18 -21 -47 -21h-135q-25 0 -43 16.5t-20 41.5q-22 229 -184.5 391.5t-391.5 184.5q-25 2 -41.5 20t-16.5 43v135q0 29 21 47q17 17 43 17h5q160 -13 306 -80.5 t259 -181.5q114 -113 181.5 -259t80.5 -306zM1408 67q2 -27 -18 -47q-18 -20 -46 -20h-143q-26 0 -44.5 17.5t-19.5 42.5q-12 215 -101 408.5t-231.5 336t-336 231.5t-408.5 102q-25 1 -42.5 19.5t-17.5 43.5v143q0 28 20 46q18 18 44 18h3q262 -13 501.5 -120t425.5 -294 q187 -186 294 -425.5t120 -501.5z" />
+<glyph unicode="&#xf0a0;" d="M1040 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1296 320q0 -33 -23.5 -56.5t-56.5 -23.5t-56.5 23.5t-23.5 56.5t23.5 56.5t56.5 23.5t56.5 -23.5t23.5 -56.5zM1408 160v320q0 13 -9.5 22.5t-22.5 9.5 h-1216q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h1216q13 0 22.5 9.5t9.5 22.5zM178 640h1180l-157 482q-4 13 -16 21.5t-26 8.5h-782q-14 0 -26 -8.5t-16 -21.5zM1536 480v-320q0 -66 -47 -113t-113 -47h-1216q-66 0 -113 47t-47 113v320q0 25 16 75 l197 606q17 53 63 86t101 33h782q55 0 101 -33t63 -86l197 -606q16 -50 16 -75z" />
+<glyph unicode="&#xf0a1;" horiz-adv-x="1792" d="M1664 896q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5v-384q0 -52 -38 -90t-90 -38q-417 347 -812 380q-58 -19 -91 -66t-31 -100.5t40 -92.5q-20 -33 -23 -65.5t6 -58t33.5 -55t48 -50t61.5 -50.5q-29 -58 -111.5 -83t-168.5 -11.5t-132 55.5q-7 23 -29.5 87.5 t-32 94.5t-23 89t-15 101t3.5 98.5t22 110.5h-122q-66 0 -113 47t-47 113v192q0 66 47 113t113 47h480q435 0 896 384q52 0 90 -38t38 -90v-384zM1536 292v954q-394 -302 -768 -343v-270q377 -42 768 -341z" />
+<glyph unicode="&#xf0a2;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM246 128h1300q-266 300 -266 832q0 51 -24 105t-69 103t-121.5 80.5t-169.5 31.5t-169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -532 -266 -832z M1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5 t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0a3;" d="M1376 640l138 -135q30 -28 20 -70q-12 -41 -52 -51l-188 -48l53 -186q12 -41 -19 -70q-29 -31 -70 -19l-186 53l-48 -188q-10 -40 -51 -52q-12 -2 -19 -2q-31 0 -51 22l-135 138l-135 -138q-28 -30 -70 -20q-41 11 -51 52l-48 188l-186 -53q-41 -12 -70 19q-31 29 -19 70 l53 186l-188 48q-40 10 -52 51q-10 42 20 70l138 135l-138 135q-30 28 -20 70q12 41 52 51l188 48l-53 186q-12 41 19 70q29 31 70 19l186 -53l48 188q10 41 51 51q41 12 70 -19l135 -139l135 139q29 30 70 19q41 -10 51 -51l48 -188l186 53q41 12 70 -19q31 -29 19 -70 l-53 -186l188 -48q40 -10 52 -51q10 -42 -20 -70z" />
+<glyph unicode="&#xf0a4;" horiz-adv-x="1792" d="M256 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1664 768q0 51 -39 89.5t-89 38.5h-576q0 20 15 48.5t33 55t33 68t15 84.5q0 67 -44.5 97.5t-115.5 30.5q-24 0 -90 -139q-24 -44 -37 -65q-40 -64 -112 -145q-71 -81 -101 -106 q-69 -57 -140 -57h-32v-640h32q72 0 167 -32t193.5 -64t179.5 -32q189 0 189 167q0 26 -5 56q30 16 47.5 52.5t17.5 73.5t-18 69q53 50 53 119q0 25 -10 55.5t-25 47.5h331q52 0 90 38t38 90zM1792 769q0 -105 -75.5 -181t-180.5 -76h-169q-4 -62 -37 -119q3 -21 3 -43 q0 -101 -60 -178q1 -139 -85 -219.5t-227 -80.5q-133 0 -322 69q-164 59 -223 59h-288q-53 0 -90.5 37.5t-37.5 90.5v640q0 53 37.5 90.5t90.5 37.5h288q10 0 21.5 4.5t23.5 14t22.5 18t24 22.5t20.5 21.5t19 21.5t14 17q65 74 100 129q13 21 33 62t37 72t40.5 63t55 49.5 t69.5 17.5q125 0 206.5 -67t81.5 -189q0 -68 -22 -128h374q104 0 180 -76t76 -179z" />
+<glyph unicode="&#xf0a5;" horiz-adv-x="1792" d="M1376 128h32v640h-32q-35 0 -67.5 12t-62.5 37t-50 46t-49 54q-2 3 -3.5 4.5t-4 4.5t-4.5 5q-72 81 -112 145q-14 22 -38 68q-1 3 -10.5 22.5t-18.5 36t-20 35.5t-21.5 30.5t-18.5 11.5q-71 0 -115.5 -30.5t-44.5 -97.5q0 -43 15 -84.5t33 -68t33 -55t15 -48.5h-576 q-50 0 -89 -38.5t-39 -89.5q0 -52 38 -90t90 -38h331q-15 -17 -25 -47.5t-10 -55.5q0 -69 53 -119q-18 -32 -18 -69t17.5 -73.5t47.5 -52.5q-4 -24 -4 -56q0 -85 48.5 -126t135.5 -41q84 0 183 32t194 64t167 32zM1664 192q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45 t45 -19t45 19t19 45zM1792 768v-640q0 -53 -37.5 -90.5t-90.5 -37.5h-288q-59 0 -223 -59q-190 -69 -317 -69q-142 0 -230 77.5t-87 217.5l1 5q-61 76 -61 178q0 22 3 43q-33 57 -37 119h-169q-105 0 -180.5 76t-75.5 181q0 103 76 179t180 76h374q-22 60 -22 128 q0 122 81.5 189t206.5 67q38 0 69.5 -17.5t55 -49.5t40.5 -63t37 -72t33 -62q35 -55 100 -129q2 -3 14 -17t19 -21.5t20.5 -21.5t24 -22.5t22.5 -18t23.5 -14t21.5 -4.5h288q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf0a6;" d="M1280 -64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 700q0 189 -167 189q-26 0 -56 -5q-16 30 -52.5 47.5t-73.5 17.5t-69 -18q-50 53 -119 53q-25 0 -55.5 -10t-47.5 -25v331q0 52 -38 90t-90 38q-51 0 -89.5 -39t-38.5 -89v-576 q-20 0 -48.5 15t-55 33t-68 33t-84.5 15q-67 0 -97.5 -44.5t-30.5 -115.5q0 -24 139 -90q44 -24 65 -37q64 -40 145 -112q81 -71 106 -101q57 -69 57 -140v-32h640v32q0 72 32 167t64 193.5t32 179.5zM1536 705q0 -133 -69 -322q-59 -164 -59 -223v-288q0 -53 -37.5 -90.5 t-90.5 -37.5h-640q-53 0 -90.5 37.5t-37.5 90.5v288q0 10 -4.5 21.5t-14 23.5t-18 22.5t-22.5 24t-21.5 20.5t-21.5 19t-17 14q-74 65 -129 100q-21 13 -62 33t-72 37t-63 40.5t-49.5 55t-17.5 69.5q0 125 67 206.5t189 81.5q68 0 128 -22v374q0 104 76 180t179 76 q105 0 181 -75.5t76 -180.5v-169q62 -4 119 -37q21 3 43 3q101 0 178 -60q139 1 219.5 -85t80.5 -227z" />
+<glyph unicode="&#xf0a7;" d="M1408 576q0 84 -32 183t-64 194t-32 167v32h-640v-32q0 -35 -12 -67.5t-37 -62.5t-46 -50t-54 -49q-9 -8 -14 -12q-81 -72 -145 -112q-22 -14 -68 -38q-3 -1 -22.5 -10.5t-36 -18.5t-35.5 -20t-30.5 -21.5t-11.5 -18.5q0 -71 30.5 -115.5t97.5 -44.5q43 0 84.5 15t68 33 t55 33t48.5 15v-576q0 -50 38.5 -89t89.5 -39q52 0 90 38t38 90v331q46 -35 103 -35q69 0 119 53q32 -18 69 -18t73.5 17.5t52.5 47.5q24 -4 56 -4q85 0 126 48.5t41 135.5zM1280 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1536 580 q0 -142 -77.5 -230t-217.5 -87l-5 1q-76 -61 -178 -61q-22 0 -43 3q-54 -30 -119 -37v-169q0 -105 -76 -180.5t-181 -75.5q-103 0 -179 76t-76 180v374q-54 -22 -128 -22q-121 0 -188.5 81.5t-67.5 206.5q0 38 17.5 69.5t49.5 55t63 40.5t72 37t62 33q55 35 129 100 q3 2 17 14t21.5 19t21.5 20.5t22.5 24t18 22.5t14 23.5t4.5 21.5v288q0 53 37.5 90.5t90.5 37.5h640q53 0 90.5 -37.5t37.5 -90.5v-288q0 -59 59 -223q69 -190 69 -317z" />
+<glyph unicode="&#xf0a8;" d="M1280 576v128q0 26 -19 45t-45 19h-502l189 189q19 19 19 45t-19 45l-91 91q-18 18 -45 18t-45 -18l-362 -362l-91 -91q-18 -18 -18 -45t18 -45l91 -91l362 -362q18 -18 45 -18t45 18l91 91q18 18 18 45t-18 45l-189 189h502q26 0 45 19t19 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0a9;" d="M1285 640q0 27 -18 45l-91 91l-362 362q-18 18 -45 18t-45 -18l-91 -91q-18 -18 -18 -45t18 -45l189 -189h-502q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h502l-189 -189q-19 -19 -19 -45t19 -45l91 -91q18 -18 45 -18t45 18l362 362l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0aa;" d="M1284 641q0 27 -18 45l-362 362l-91 91q-18 18 -45 18t-45 -18l-91 -91l-362 -362q-18 -18 -18 -45t18 -45l91 -91q18 -18 45 -18t45 18l189 189v-502q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v502l189 -189q19 -19 45 -19t45 19l91 91q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ab;" d="M1284 639q0 27 -18 45l-91 91q-18 18 -45 18t-45 -18l-189 -189v502q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-502l-189 189q-19 19 -45 19t-45 -19l-91 -91q-18 -18 -18 -45t18 -45l362 -362l91 -91q18 -18 45 -18t45 18l91 91l362 362q18 18 18 45zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0ac;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1042 887q-2 -1 -9.5 -9.5t-13.5 -9.5q2 0 4.5 5t5 11t3.5 7q6 7 22 15q14 6 52 12q34 8 51 -11 q-2 2 9.5 13t14.5 12q3 2 15 4.5t15 7.5l2 22q-12 -1 -17.5 7t-6.5 21q0 -2 -6 -8q0 7 -4.5 8t-11.5 -1t-9 -1q-10 3 -15 7.5t-8 16.5t-4 15q-2 5 -9.5 10.5t-9.5 10.5q-1 2 -2.5 5.5t-3 6.5t-4 5.5t-5.5 2.5t-7 -5t-7.5 -10t-4.5 -5q-3 2 -6 1.5t-4.5 -1t-4.5 -3t-5 -3.5 q-3 -2 -8.5 -3t-8.5 -2q15 5 -1 11q-10 4 -16 3q9 4 7.5 12t-8.5 14h5q-1 4 -8.5 8.5t-17.5 8.5t-13 6q-8 5 -34 9.5t-33 0.5q-5 -6 -4.5 -10.5t4 -14t3.5 -12.5q1 -6 -5.5 -13t-6.5 -12q0 -7 14 -15.5t10 -21.5q-3 -8 -16 -16t-16 -12q-5 -8 -1.5 -18.5t10.5 -16.5 q2 -2 1.5 -4t-3.5 -4.5t-5.5 -4t-6.5 -3.5l-3 -2q-11 -5 -20.5 6t-13.5 26q-7 25 -16 30q-23 8 -29 -1q-5 13 -41 26q-25 9 -58 4q6 1 0 15q-7 15 -19 12q3 6 4 17.5t1 13.5q3 13 12 23q1 1 7 8.5t9.5 13.5t0.5 6q35 -4 50 11q5 5 11.5 17t10.5 17q9 6 14 5.5t14.5 -5.5 t14.5 -5q14 -1 15.5 11t-7.5 20q12 -1 3 17q-5 7 -8 9q-12 4 -27 -5q-8 -4 2 -8q-1 1 -9.5 -10.5t-16.5 -17.5t-16 5q-1 1 -5.5 13.5t-9.5 13.5q-8 0 -16 -15q3 8 -11 15t-24 8q19 12 -8 27q-7 4 -20.5 5t-19.5 -4q-5 -7 -5.5 -11.5t5 -8t10.5 -5.5t11.5 -4t8.5 -3 q14 -10 8 -14q-2 -1 -8.5 -3.5t-11.5 -4.5t-6 -4q-3 -4 0 -14t-2 -14q-5 5 -9 17.5t-7 16.5q7 -9 -25 -6l-10 1q-4 0 -16 -2t-20.5 -1t-13.5 8q-4 8 0 20q1 4 4 2q-4 3 -11 9.5t-10 8.5q-46 -15 -94 -41q6 -1 12 1q5 2 13 6.5t10 5.5q34 14 42 7l5 5q14 -16 20 -25 q-7 4 -30 1q-20 -6 -22 -12q7 -12 5 -18q-4 3 -11.5 10t-14.5 11t-15 5q-16 0 -22 -1q-146 -80 -235 -222q7 -7 12 -8q4 -1 5 -9t2.5 -11t11.5 3q9 -8 3 -19q1 1 44 -27q19 -17 21 -21q3 -11 -10 -18q-1 2 -9 9t-9 4q-3 -5 0.5 -18.5t10.5 -12.5q-7 0 -9.5 -16t-2.5 -35.5 t-1 -23.5l2 -1q-3 -12 5.5 -34.5t21.5 -19.5q-13 -3 20 -43q6 -8 8 -9q3 -2 12 -7.5t15 -10t10 -10.5q4 -5 10 -22.5t14 -23.5q-2 -6 9.5 -20t10.5 -23q-1 0 -2.5 -1t-2.5 -1q3 -7 15.5 -14t15.5 -13q1 -3 2 -10t3 -11t8 -2q2 20 -24 62q-15 25 -17 29q-3 5 -5.5 15.5 t-4.5 14.5q2 0 6 -1.5t8.5 -3.5t7.5 -4t2 -3q-3 -7 2 -17.5t12 -18.5t17 -19t12 -13q6 -6 14 -19.5t0 -13.5q9 0 20 -10t17 -20q5 -8 8 -26t5 -24q2 -7 8.5 -13.5t12.5 -9.5l16 -8t13 -7q5 -2 18.5 -10.5t21.5 -11.5q10 -4 16 -4t14.5 2.5t13.5 3.5q15 2 29 -15t21 -21 q36 -19 55 -11q-2 -1 0.5 -7.5t8 -15.5t9 -14.5t5.5 -8.5q5 -6 18 -15t18 -15q6 4 7 9q-3 -8 7 -20t18 -10q14 3 14 32q-31 -15 -49 18q0 1 -2.5 5.5t-4 8.5t-2.5 8.5t0 7.5t5 3q9 0 10 3.5t-2 12.5t-4 13q-1 8 -11 20t-12 15q-5 -9 -16 -8t-16 9q0 -1 -1.5 -5.5t-1.5 -6.5 q-13 0 -15 1q1 3 2.5 17.5t3.5 22.5q1 4 5.5 12t7.5 14.5t4 12.5t-4.5 9.5t-17.5 2.5q-19 -1 -26 -20q-1 -3 -3 -10.5t-5 -11.5t-9 -7q-7 -3 -24 -2t-24 5q-13 8 -22.5 29t-9.5 37q0 10 2.5 26.5t3 25t-5.5 24.5q3 2 9 9.5t10 10.5q2 1 4.5 1.5t4.5 0t4 1.5t3 6q-1 1 -4 3 q-3 3 -4 3q7 -3 28.5 1.5t27.5 -1.5q15 -11 22 2q0 1 -2.5 9.5t-0.5 13.5q5 -27 29 -9q3 -3 15.5 -5t17.5 -5q3 -2 7 -5.5t5.5 -4.5t5 0.5t8.5 6.5q10 -14 12 -24q11 -40 19 -44q7 -3 11 -2t4.5 9.5t0 14t-1.5 12.5l-1 8v18l-1 8q-15 3 -18.5 12t1.5 18.5t15 18.5q1 1 8 3.5 t15.5 6.5t12.5 8q21 19 15 35q7 0 11 9q-1 0 -5 3t-7.5 5t-4.5 2q9 5 2 16q5 3 7.5 11t7.5 10q9 -12 21 -2q7 8 1 16q5 7 20.5 10.5t18.5 9.5q7 -2 8 2t1 12t3 12q4 5 15 9t13 5l17 11q3 4 0 4q18 -2 31 11q10 11 -6 20q3 6 -3 9.5t-15 5.5q3 1 11.5 0.5t10.5 1.5 q15 10 -7 16q-17 5 -43 -12zM879 10q206 36 351 189q-3 3 -12.5 4.5t-12.5 3.5q-18 7 -24 8q1 7 -2.5 13t-8 9t-12.5 8t-11 7q-2 2 -7 6t-7 5.5t-7.5 4.5t-8.5 2t-10 -1l-3 -1q-3 -1 -5.5 -2.5t-5.5 -3t-4 -3t0 -2.5q-21 17 -36 22q-5 1 -11 5.5t-10.5 7t-10 1.5t-11.5 -7 q-5 -5 -6 -15t-2 -13q-7 5 0 17.5t2 18.5q-3 6 -10.5 4.5t-12 -4.5t-11.5 -8.5t-9 -6.5t-8.5 -5.5t-8.5 -7.5q-3 -4 -6 -12t-5 -11q-2 4 -11.5 6.5t-9.5 5.5q2 -10 4 -35t5 -38q7 -31 -12 -48q-27 -25 -29 -40q-4 -22 12 -26q0 -7 -8 -20.5t-7 -21.5q0 -6 2 -16z" />
+<glyph unicode="&#xf0ad;" horiz-adv-x="1664" d="M384 64q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1028 484l-682 -682q-37 -37 -90 -37q-52 0 -91 37l-106 108q-38 36 -38 90q0 53 38 91l681 681q39 -98 114.5 -173.5t173.5 -114.5zM1662 919q0 -39 -23 -106q-47 -134 -164.5 -217.5 t-258.5 -83.5q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q58 0 121.5 -16.5t107.5 -46.5q16 -11 16 -28t-16 -28l-293 -169v-224l193 -107q5 3 79 48.5t135.5 81t70.5 35.5q15 0 23.5 -10t8.5 -25z" />
+<glyph unicode="&#xf0ae;" horiz-adv-x="1792" d="M1024 128h640v128h-640v-128zM640 640h1024v128h-1024v-128zM1280 1152h384v128h-384v-128zM1792 320v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 832v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19 t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45zM1792 1344v-256q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1664q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0b0;" horiz-adv-x="1408" d="M1403 1241q17 -41 -14 -70l-493 -493v-742q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-256 256q-19 19 -19 45v486l-493 493q-31 29 -14 70q17 39 59 39h1280q42 0 59 -39z" />
+<glyph unicode="&#xf0b1;" horiz-adv-x="1792" d="M640 1280h512v128h-512v-128zM1792 640v-480q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v480h672v-160q0 -26 19 -45t45 -19h320q26 0 45 19t19 45v160h672zM1024 640v-128h-256v128h256zM1792 1120v-384h-1792v384q0 66 47 113t113 47h352v160q0 40 28 68 t68 28h576q40 0 68 -28t28 -68v-160h352q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0b2;" d="M1283 995l-355 -355l355 -355l144 144q29 31 70 14q39 -17 39 -59v-448q0 -26 -19 -45t-45 -19h-448q-42 0 -59 40q-17 39 14 69l144 144l-355 355l-355 -355l144 -144q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l144 -144 l355 355l-355 355l-144 -144q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v448q0 26 19 45t45 19h448q42 0 59 -40q17 -39 -14 -69l-144 -144l355 -355l355 355l-144 144q-31 30 -14 69q17 40 59 40h448q26 0 45 -19t19 -45v-448q0 -42 -39 -59q-13 -5 -25 -5q-26 0 -45 19z " />
+<glyph unicode="&#xf0c0;" horiz-adv-x="1920" d="M593 640q-162 -5 -265 -128h-134q-82 0 -138 40.5t-56 118.5q0 353 124 353q6 0 43.5 -21t97.5 -42.5t119 -21.5q67 0 133 23q-5 -37 -5 -66q0 -139 81 -256zM1664 3q0 -120 -73 -189.5t-194 -69.5h-874q-121 0 -194 69.5t-73 189.5q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q10 0 43 -21.5t73 -48t107 -48t135 -21.5t135 21.5t107 48t73 48t43 21.5q61 0 111.5 -20t85.5 -53.5t62 -81t43 -97.5t26.5 -108.5t14 -109t3.5 -103.5zM640 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75 t75 -181zM1344 896q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5zM1920 671q0 -78 -56 -118.5t-138 -40.5h-134q-103 123 -265 128q81 117 81 256q0 29 -5 66q66 -23 133 -23q59 0 119 21.5t97.5 42.5 t43.5 21q124 0 124 -353zM1792 1280q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181z" />
+<glyph unicode="&#xf0c1;" horiz-adv-x="1664" d="M1456 320q0 40 -28 68l-208 208q-28 28 -68 28q-42 0 -72 -32q3 -3 19 -18.5t21.5 -21.5t15 -19t13 -25.5t3.5 -27.5q0 -40 -28 -68t-68 -28q-15 0 -27.5 3.5t-25.5 13t-19 15t-21.5 21.5t-18.5 19q-33 -31 -33 -73q0 -40 28 -68l206 -207q27 -27 68 -27q40 0 68 26 l147 146q28 28 28 67zM753 1025q0 40 -28 68l-206 207q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l208 -208q27 -27 68 -27q42 0 72 31q-3 3 -19 18.5t-21.5 21.5t-15 19t-13 25.5t-3.5 27.5q0 40 28 68t68 28q15 0 27.5 -3.5t25.5 -13t19 -15 t21.5 -21.5t18.5 -19q33 31 33 73zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-206 207q-83 83 -83 203q0 123 88 209l-88 88q-86 -88 -208 -88q-120 0 -204 84l-208 208q-84 84 -84 204t85 203l147 146q83 83 203 83q121 0 204 -85l206 -207 q83 -83 83 -203q0 -123 -88 -209l88 -88q86 88 208 88q120 0 204 -84l208 -208q84 -84 84 -204z" />
+<glyph unicode="&#xf0c2;" horiz-adv-x="1920" d="M1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088q-185 0 -316.5 131.5t-131.5 316.5q0 132 71 241.5t187 163.5q-2 28 -2 43q0 212 150 362t362 150q158 0 286.5 -88t187.5 -230q70 62 166 62q106 0 181 -75t75 -181q0 -75 -41 -138q129 -30 213 -134.5t84 -239.5z " />
+<glyph unicode="&#xf0c3;" horiz-adv-x="1664" d="M1527 88q56 -89 21.5 -152.5t-140.5 -63.5h-1152q-106 0 -140.5 63.5t21.5 152.5l503 793v399h-64q-26 0 -45 19t-19 45t19 45t45 19h512q26 0 45 -19t19 -45t-19 -45t-45 -19h-64v-399zM748 813l-272 -429h712l-272 429l-20 31v37v399h-128v-399v-37z" />
+<glyph unicode="&#xf0c4;" horiz-adv-x="1792" d="M960 640q26 0 45 -19t19 -45t-19 -45t-45 -19t-45 19t-19 45t19 45t45 19zM1260 576l507 -398q28 -20 25 -56q-5 -35 -35 -51l-128 -64q-13 -7 -29 -7q-17 0 -31 8l-690 387l-110 -66q-8 -4 -12 -5q14 -49 10 -97q-7 -77 -56 -147.5t-132 -123.5q-132 -84 -277 -84 q-136 0 -222 78q-90 84 -79 207q7 76 56 147t131 124q132 84 278 84q83 0 151 -31q9 13 22 22l122 73l-122 73q-13 9 -22 22q-68 -31 -151 -31q-146 0 -278 84q-82 53 -131 124t-56 147q-5 59 15.5 113t63.5 93q85 79 222 79q145 0 277 -84q83 -52 132 -123t56 -148 q4 -48 -10 -97q4 -1 12 -5l110 -66l690 387q14 8 31 8q16 0 29 -7l128 -64q30 -16 35 -51q3 -36 -25 -56zM579 836q46 42 21 108t-106 117q-92 59 -192 59q-74 0 -113 -36q-46 -42 -21 -108t106 -117q92 -59 192 -59q74 0 113 36zM494 91q81 51 106 117t-21 108 q-39 36 -113 36q-100 0 -192 -59q-81 -51 -106 -117t21 -108q39 -36 113 -36q100 0 192 59zM672 704l96 -58v11q0 36 33 56l14 8l-79 47l-26 -26q-3 -3 -10 -11t-12 -12q-2 -2 -4 -3.5t-3 -2.5zM896 480l96 -32l736 576l-128 64l-768 -431v-113l-160 -96l9 -8q2 -2 7 -6 q4 -4 11 -12t11 -12l26 -26zM1600 64l128 64l-520 408l-177 -138q-2 -3 -13 -7z" />
+<glyph unicode="&#xf0c5;" horiz-adv-x="1792" d="M1696 1152q40 0 68 -28t28 -68v-1216q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v288h-544q-40 0 -68 28t-28 68v672q0 40 20 88t48 76l408 408q28 28 76 48t88 20h416q40 0 68 -28t28 -68v-328q68 40 128 40h416zM1152 939l-299 -299h299v299zM512 1323l-299 -299 h299v299zM708 676l316 316v416h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h512v256q0 40 20 88t48 76zM1664 -128v1152h-384v-416q0 -40 -28 -68t-68 -28h-416v-640h896z" />
+<glyph unicode="&#xf0c6;" horiz-adv-x="1408" d="M1404 151q0 -117 -79 -196t-196 -79q-135 0 -235 100l-777 776q-113 115 -113 271q0 159 110 270t269 111q158 0 273 -113l605 -606q10 -10 10 -22q0 -16 -30.5 -46.5t-46.5 -30.5q-13 0 -23 10l-606 607q-79 77 -181 77q-106 0 -179 -75t-73 -181q0 -105 76 -181 l776 -777q63 -63 145 -63q64 0 106 42t42 106q0 82 -63 145l-581 581q-26 24 -60 24q-29 0 -48 -19t-19 -48q0 -32 25 -59l410 -410q10 -10 10 -22q0 -16 -31 -47t-47 -31q-12 0 -22 10l-410 410q-63 61 -63 149q0 82 57 139t139 57q88 0 149 -63l581 -581q100 -98 100 -235 z" />
+<glyph unicode="&#xf0c7;" d="M384 0h768v384h-768v-384zM1280 0h128v896q0 14 -10 38.5t-20 34.5l-281 281q-10 10 -34 20t-39 10v-416q0 -40 -28 -68t-68 -28h-576q-40 0 -68 28t-28 68v416h-128v-1280h128v416q0 40 28 68t68 28h832q40 0 68 -28t28 -68v-416zM896 928v320q0 13 -9.5 22.5t-22.5 9.5 h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5zM1536 896v-928q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h928q40 0 88 -20t76 -48l280 -280q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0c8;" d="M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0c9;" d="M1536 192v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 704v-128q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1536 1216v-128q0 -26 -19 -45 t-45 -19h-1408q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0ca;" horiz-adv-x="1792" d="M384 128q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM384 640q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 224v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5 t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1152q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z M1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cb;" horiz-adv-x="1792" d="M381 -84q0 -80 -54.5 -126t-135.5 -46q-106 0 -172 66l57 88q49 -45 106 -45q29 0 50.5 14.5t21.5 42.5q0 64 -105 56l-26 56q8 10 32.5 43.5t42.5 54t37 38.5v1q-16 0 -48.5 -1t-48.5 -1v-53h-106v152h333v-88l-95 -115q51 -12 81 -49t30 -88zM383 543v-159h-362 q-6 36 -6 54q0 51 23.5 93t56.5 68t66 47.5t56.5 43.5t23.5 45q0 25 -14.5 38.5t-39.5 13.5q-46 0 -81 -58l-85 59q24 51 71.5 79.5t105.5 28.5q73 0 123 -41.5t50 -112.5q0 -50 -34 -91.5t-75 -64.5t-75.5 -50.5t-35.5 -52.5h127v60h105zM1792 224v-192q0 -13 -9.5 -22.5 t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM384 1123v-99h-335v99h107q0 41 0.5 122t0.5 121v12h-2q-8 -17 -50 -54l-71 76l136 127h106v-404h108zM1792 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5 t-9.5 22.5v192q0 14 9 23t23 9h1216q13 0 22.5 -9.5t9.5 -22.5zM1792 1248v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1216q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1216q13 0 22.5 -9.5t9.5 -22.5z" />
+<glyph unicode="&#xf0cc;" horiz-adv-x="1792" d="M1760 640q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1728q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h1728zM483 704q-28 35 -51 80q-48 97 -48 188q0 181 134 309q133 127 393 127q50 0 167 -19q66 -12 177 -48q10 -38 21 -118q14 -123 14 -183q0 -18 -5 -45l-12 -3l-84 6 l-14 2q-50 149 -103 205q-88 91 -210 91q-114 0 -182 -59q-67 -58 -67 -146q0 -73 66 -140t279 -129q69 -20 173 -66q58 -28 95 -52h-743zM990 448h411q7 -39 7 -92q0 -111 -41 -212q-23 -55 -71 -104q-37 -35 -109 -81q-80 -48 -153 -66q-80 -21 -203 -21q-114 0 -195 23 l-140 40q-57 16 -72 28q-8 8 -8 22v13q0 108 -2 156q-1 30 0 68l2 37v44l102 2q15 -34 30 -71t22.5 -56t12.5 -27q35 -57 80 -94q43 -36 105 -57q59 -22 132 -22q64 0 139 27q77 26 122 86q47 61 47 129q0 84 -81 157q-34 29 -137 71z" />
+<glyph unicode="&#xf0cd;" d="M48 1313q-37 2 -45 4l-3 88q13 1 40 1q60 0 112 -4q132 -7 166 -7q86 0 168 3q116 4 146 5q56 0 86 2l-1 -14l2 -64v-9q-60 -9 -124 -9q-60 0 -79 -25q-13 -14 -13 -132q0 -13 0.5 -32.5t0.5 -25.5l1 -229l14 -280q6 -124 51 -202q35 -59 96 -92q88 -47 177 -47 q104 0 191 28q56 18 99 51q48 36 65 64q36 56 53 114q21 73 21 229q0 79 -3.5 128t-11 122.5t-13.5 159.5l-4 59q-5 67 -24 88q-34 35 -77 34l-100 -2l-14 3l2 86h84l205 -10q76 -3 196 10l18 -2q6 -38 6 -51q0 -7 -4 -31q-45 -12 -84 -13q-73 -11 -79 -17q-15 -15 -15 -41 q0 -7 1.5 -27t1.5 -31q8 -19 22 -396q6 -195 -15 -304q-15 -76 -41 -122q-38 -65 -112 -123q-75 -57 -182 -89q-109 -33 -255 -33q-167 0 -284 46q-119 47 -179 122q-61 76 -83 195q-16 80 -16 237v333q0 188 -17 213q-25 36 -147 39zM1536 -96v64q0 14 -9 23t-23 9h-1472 q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h1472q14 0 23 9t9 23z" />
+<glyph unicode="&#xf0ce;" horiz-adv-x="1664" d="M512 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 160v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23 v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM512 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 160v192 q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1024 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 544v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192 q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1536 928v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM1664 1248v-1088q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1344q66 0 113 -47t47 -113 z" />
+<glyph unicode="&#xf0d0;" horiz-adv-x="1664" d="M1190 955l293 293l-107 107l-293 -293zM1637 1248q0 -27 -18 -45l-1286 -1286q-18 -18 -45 -18t-45 18l-198 198q-18 18 -18 45t18 45l1286 1286q18 18 45 18t45 -18l198 -198q18 -18 18 -45zM286 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM636 1276 l196 -60l-196 -60l-60 -196l-60 196l-196 60l196 60l60 196zM1566 798l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98zM926 1438l98 -30l-98 -30l-30 -98l-30 98l-98 30l98 30l30 98z" />
+<glyph unicode="&#xf0d1;" horiz-adv-x="1792" d="M640 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM256 640h384v256h-158q-13 0 -22 -9l-195 -195q-9 -9 -9 -22v-30zM1536 128q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1792 1216v-1024q0 -15 -4 -26.5t-13.5 -18.5 t-16.5 -11.5t-23.5 -6t-22.5 -2t-25.5 0t-22.5 0.5q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-64q-3 0 -22.5 -0.5t-25.5 0t-22.5 2t-23.5 6t-16.5 11.5t-13.5 18.5t-4 26.5q0 26 19 45t45 19v320q0 8 -0.5 35t0 38 t2.5 34.5t6.5 37t14 30.5t22.5 30l198 198q19 19 50.5 32t58.5 13h160v192q0 26 19 45t45 19h1024q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d2;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103q-111 0 -218 32q59 93 78 164q9 34 54 211q20 -39 73 -67.5t114 -28.5q121 0 216 68.5t147 188.5t52 270q0 114 -59.5 214t-172.5 163t-255 63q-105 0 -196 -29t-154.5 -77t-109 -110.5t-67 -129.5t-21.5 -134 q0 -104 40 -183t117 -111q30 -12 38 20q2 7 8 31t8 30q6 23 -11 43q-51 61 -51 151q0 151 104.5 259.5t273.5 108.5q151 0 235.5 -82t84.5 -213q0 -170 -68.5 -289t-175.5 -119q-61 0 -98 43.5t-23 104.5q8 35 26.5 93.5t30 103t11.5 75.5q0 50 -27 83t-77 33 q-62 0 -105 -57t-43 -142q0 -73 25 -122l-99 -418q-17 -70 -13 -177q-206 91 -333 281t-127 423q0 209 103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf0d3;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-725q85 122 108 210q9 34 53 209q21 -39 73.5 -67t112.5 -28q181 0 295.5 147.5t114.5 373.5q0 84 -35 162.5t-96.5 139t-152.5 97t-197 36.5q-104 0 -194.5 -28.5t-153 -76.5 t-107.5 -109.5t-66.5 -128t-21.5 -132.5q0 -102 39.5 -180t116.5 -110q13 -5 23.5 0t14.5 19q10 44 15 61q6 23 -11 42q-50 62 -50 150q0 150 103.5 256.5t270.5 106.5q149 0 232.5 -81t83.5 -210q0 -168 -67.5 -286t-173.5 -118q-60 0 -97 43.5t-23 103.5q8 34 26.5 92.5 t29.5 102t11 74.5q0 49 -26.5 81.5t-75.5 32.5q-61 0 -103.5 -56.5t-42.5 -139.5q0 -72 24 -121l-98 -414q-24 -100 -7 -254h-183q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960z" />
+<glyph unicode="&#xf0d4;" d="M917 631q0 26 -6 64h-362v-132h217q-3 -24 -16.5 -50t-37.5 -53t-66.5 -44.5t-96.5 -17.5q-99 0 -169 71t-70 171t70 171t169 71q92 0 153 -59l104 101q-108 100 -257 100q-160 0 -272 -112.5t-112 -271.5t112 -271.5t272 -112.5q165 0 266.5 105t101.5 270zM1262 585 h109v110h-109v110h-110v-110h-110v-110h110v-110h110v110zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0d5;" horiz-adv-x="2304" d="M1437 623q0 -208 -87 -370.5t-248 -254t-369 -91.5q-149 0 -285 58t-234 156t-156 234t-58 285t58 285t156 234t234 156t285 58q286 0 491 -192l-199 -191q-117 113 -292 113q-123 0 -227.5 -62t-165.5 -168.5t-61 -232.5t61 -232.5t165.5 -168.5t227.5 -62 q83 0 152.5 23t114.5 57.5t78.5 78.5t49 83t21.5 74h-416v252h692q12 -63 12 -122zM2304 745v-210h-209v-209h-210v209h-209v210h209v209h210v-209h209z" />
+<glyph unicode="&#xf0d6;" horiz-adv-x="1920" d="M768 384h384v96h-128v448h-114l-148 -137l77 -80q42 37 55 57h2v-288h-128v-96zM1280 640q0 -70 -21 -142t-59.5 -134t-101.5 -101t-138 -39t-138 39t-101.5 101t-59.5 134t-21 142t21 142t59.5 134t101.5 101t138 39t138 -39t101.5 -101t59.5 -134t21 -142zM1792 384 v512q-106 0 -181 75t-75 181h-1152q0 -106 -75 -181t-181 -75v-512q106 0 181 -75t75 -181h1152q0 106 75 181t181 75zM1920 1216v-1152q0 -26 -19 -45t-45 -19h-1792q-26 0 -45 19t-19 45v1152q0 26 19 45t45 19h1792q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d7;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0d8;" horiz-adv-x="1024" d="M1024 320q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0d9;" horiz-adv-x="640" d="M640 1088v-896q0 -26 -19 -45t-45 -19t-45 19l-448 448q-19 19 -19 45t19 45l448 448q19 19 45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0da;" horiz-adv-x="640" d="M576 640q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19t-19 45v896q0 26 19 45t45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0db;" horiz-adv-x="1664" d="M160 0h608v1152h-640v-1120q0 -13 9.5 -22.5t22.5 -9.5zM1536 32v1120h-640v-1152h608q13 0 22.5 9.5t9.5 22.5zM1664 1248v-1216q0 -66 -47 -113t-113 -47h-1344q-66 0 -113 47t-47 113v1216q0 66 47 113t113 47h1344q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf0dc;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45zM1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0dd;" horiz-adv-x="1024" d="M1024 448q0 -26 -19 -45l-448 -448q-19 -19 -45 -19t-45 19l-448 448q-19 19 -19 45t19 45t45 19h896q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0de;" horiz-adv-x="1024" d="M1024 832q0 -26 -19 -45t-45 -19h-896q-26 0 -45 19t-19 45t19 45l448 448q19 19 45 19t45 -19l448 -448q19 -19 19 -45z" />
+<glyph unicode="&#xf0e0;" horiz-adv-x="1792" d="M1792 826v-794q0 -66 -47 -113t-113 -47h-1472q-66 0 -113 47t-47 113v794q44 -49 101 -87q362 -246 497 -345q57 -42 92.5 -65.5t94.5 -48t110 -24.5h1h1q51 0 110 24.5t94.5 48t92.5 65.5q170 123 498 345q57 39 100 87zM1792 1120q0 -79 -49 -151t-122 -123 q-376 -261 -468 -325q-10 -7 -42.5 -30.5t-54 -38t-52 -32.5t-57.5 -27t-50 -9h-1h-1q-23 0 -50 9t-57.5 27t-52 32.5t-54 38t-42.5 30.5q-91 64 -262 182.5t-205 142.5q-62 42 -117 115.5t-55 136.5q0 78 41.5 130t118.5 52h1472q65 0 112.5 -47t47.5 -113z" />
+<glyph unicode="&#xf0e1;" d="M349 911v-991h-330v991h330zM370 1217q1 -73 -50.5 -122t-135.5 -49h-2q-82 0 -132 49t-50 122q0 74 51.5 122.5t134.5 48.5t133 -48.5t51 -122.5zM1536 488v-568h-329v530q0 105 -40.5 164.5t-126.5 59.5q-63 0 -105.5 -34.5t-63.5 -85.5q-11 -30 -11 -81v-553h-329 q2 399 2 647t-1 296l-1 48h329v-144h-2q20 32 41 56t56.5 52t87 43.5t114.5 15.5q171 0 275 -113.5t104 -332.5z" />
+<glyph unicode="&#xf0e2;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298z" />
+<glyph unicode="&#xf0e3;" horiz-adv-x="1792" d="M1771 0q0 -53 -37 -90l-107 -108q-39 -37 -91 -37q-53 0 -90 37l-363 364q-38 36 -38 90q0 53 43 96l-256 256l-126 -126q-14 -14 -34 -14t-34 14q2 -2 12.5 -12t12.5 -13t10 -11.5t10 -13.5t6 -13.5t5.5 -16.5t1.5 -18q0 -38 -28 -68q-3 -3 -16.5 -18t-19 -20.5 t-18.5 -16.5t-22 -15.5t-22 -9t-26 -4.5q-40 0 -68 28l-408 408q-28 28 -28 68q0 13 4.5 26t9 22t15.5 22t16.5 18.5t20.5 19t18 16.5q30 28 68 28q10 0 18 -1.5t16.5 -5.5t13.5 -6t13.5 -10t11.5 -10t13 -12.5t12 -12.5q-14 14 -14 34t14 34l348 348q14 14 34 14t34 -14 q-2 2 -12.5 12t-12.5 13t-10 11.5t-10 13.5t-6 13.5t-5.5 16.5t-1.5 18q0 38 28 68q3 3 16.5 18t19 20.5t18.5 16.5t22 15.5t22 9t26 4.5q40 0 68 -28l408 -408q28 -28 28 -68q0 -13 -4.5 -26t-9 -22t-15.5 -22t-16.5 -18.5t-20.5 -19t-18 -16.5q-30 -28 -68 -28 q-10 0 -18 1.5t-16.5 5.5t-13.5 6t-13.5 10t-11.5 10t-13 12.5t-12 12.5q14 -14 14 -34t-14 -34l-126 -126l256 -256q43 43 96 43q52 0 91 -37l363 -363q37 -39 37 -91z" />
+<glyph unicode="&#xf0e4;" horiz-adv-x="1792" d="M384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM576 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1004 351l101 382q6 26 -7.5 48.5t-38.5 29.5 t-48 -6.5t-30 -39.5l-101 -382q-60 -5 -107 -43.5t-63 -98.5q-20 -77 20 -146t117 -89t146 20t89 117q16 60 -6 117t-72 91zM1664 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 1024q0 53 -37.5 90.5 t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1472 832q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 384q0 -261 -141 -483q-19 -29 -54 -29h-1402q-35 0 -54 29 q-141 221 -141 483q0 182 71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf0e5;" horiz-adv-x="1792" d="M896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640 q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 174 120 321.5 t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf0e6;" horiz-adv-x="1792" d="M704 1152q-153 0 -286 -52t-211.5 -141t-78.5 -191q0 -82 53 -158t149 -132l97 -56l-35 -84q34 20 62 39l44 31l53 -10q78 -14 153 -14q153 0 286 52t211.5 141t78.5 191t-78.5 191t-211.5 141t-286 52zM704 1280q191 0 353.5 -68.5t256.5 -186.5t94 -257t-94 -257 t-256.5 -186.5t-353.5 -68.5q-86 0 -176 16q-124 -88 -278 -128q-36 -9 -86 -16h-3q-11 0 -20.5 8t-11.5 21q-1 3 -1 6.5t0.5 6.5t2 6l2.5 5t3.5 5.5t4 5t4.5 5t4 4.5q5 6 23 25t26 29.5t22.5 29t25 38.5t20.5 44q-124 72 -195 177t-71 224q0 139 94 257t256.5 186.5 t353.5 68.5zM1526 111q10 -24 20.5 -44t25 -38.5t22.5 -29t26 -29.5t23 -25q1 -1 4 -4.5t4.5 -5t4 -5t3.5 -5.5l2.5 -5t2 -6t0.5 -6.5t-1 -6.5q-3 -14 -13 -22t-22 -7q-50 7 -86 16q-154 40 -278 128q-90 -16 -176 -16q-271 0 -472 132q58 -4 88 -4q161 0 309 45t264 129 q125 92 192 212t67 254q0 77 -23 152q129 -71 204 -178t75 -230q0 -120 -71 -224.5t-195 -176.5z" />
+<glyph unicode="&#xf0e7;" horiz-adv-x="896" d="M885 970q18 -20 7 -44l-540 -1157q-13 -25 -42 -25q-4 0 -14 2q-17 5 -25.5 19t-4.5 30l197 808l-406 -101q-4 -1 -12 -1q-18 0 -31 11q-18 15 -13 39l201 825q4 14 16 23t28 9h328q19 0 32 -12.5t13 -29.5q0 -8 -5 -18l-171 -463l396 98q8 2 12 2q19 0 34 -15z" />
+<glyph unicode="&#xf0e8;" horiz-adv-x="1792" d="M1792 288v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192h-512v-192h96q40 0 68 -28t28 -68v-320 q0 -40 -28 -68t-68 -28h-320q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h96v192q0 52 38 90t90 38h512v192h-96q-40 0 -68 28t-28 68v320q0 40 28 68t68 28h320q40 0 68 -28t28 -68v-320q0 -40 -28 -68t-68 -28h-96v-192h512q52 0 90 -38t38 -90v-192h96q40 0 68 -28t28 -68 z" />
+<glyph unicode="&#xf0e9;" horiz-adv-x="1664" d="M896 708v-580q0 -104 -76 -180t-180 -76t-180 76t-76 180q0 26 19 45t45 19t45 -19t19 -45q0 -50 39 -89t89 -39t89 39t39 89v580q33 11 64 11t64 -11zM1664 681q0 -13 -9.5 -22.5t-22.5 -9.5q-11 0 -23 10q-49 46 -93 69t-102 23q-68 0 -128 -37t-103 -97 q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -28 -17q-18 0 -29 17q-4 6 -14.5 24t-17.5 28q-43 60 -102.5 97t-127.5 37t-127.5 -37t-102.5 -97q-7 -10 -17.5 -28t-14.5 -24q-11 -17 -29 -17q-17 0 -28 17q-4 6 -14.5 24t-17.5 28q-43 60 -103 97t-128 37q-58 0 -102 -23t-93 -69 q-12 -10 -23 -10q-13 0 -22.5 9.5t-9.5 22.5q0 5 1 7q45 183 172.5 319.5t298 204.5t360.5 68q140 0 274.5 -40t246.5 -113.5t194.5 -187t115.5 -251.5q1 -2 1 -7zM896 1408v-98q-42 2 -64 2t-64 -2v98q0 26 19 45t45 19t45 -19t19 -45z" />
+<glyph unicode="&#xf0ea;" horiz-adv-x="1792" d="M768 -128h896v640h-416q-40 0 -68 28t-28 68v416h-384v-1152zM1024 1312v64q0 13 -9.5 22.5t-22.5 9.5h-704q-13 0 -22.5 -9.5t-9.5 -22.5v-64q0 -13 9.5 -22.5t22.5 -9.5h704q13 0 22.5 9.5t9.5 22.5zM1280 640h299l-299 299v-299zM1792 512v-672q0 -40 -28 -68t-68 -28 h-960q-40 0 -68 28t-28 68v160h-544q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1088q40 0 68 -28t28 -68v-328q21 -13 36 -28l408 -408q28 -28 48 -76t20 -88z" />
+<glyph unicode="&#xf0eb;" horiz-adv-x="1024" d="M736 960q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5q0 46 -54 71t-106 25q-13 0 -22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5q50 0 99.5 -16t87 -54t37.5 -90zM896 960q0 72 -34.5 134t-90 101.5t-123 62t-136.5 22.5t-136.5 -22.5t-123 -62t-90 -101.5t-34.5 -134 q0 -101 68 -180q10 -11 30.5 -33t30.5 -33q128 -153 141 -298h228q13 145 141 298q10 11 30.5 33t30.5 33q68 79 68 180zM1024 960q0 -155 -103 -268q-45 -49 -74.5 -87t-59.5 -95.5t-34 -107.5q47 -28 47 -82q0 -37 -25 -64q25 -27 25 -64q0 -52 -45 -81q13 -23 13 -47 q0 -46 -31.5 -71t-77.5 -25q-20 -44 -60 -70t-87 -26t-87 26t-60 70q-46 0 -77.5 25t-31.5 71q0 24 13 47q-45 29 -45 81q0 37 25 64q-25 27 -25 64q0 54 47 82q-4 50 -34 107.5t-59.5 95.5t-74.5 87q-103 113 -103 268q0 99 44.5 184.5t117 142t164 89t186.5 32.5 t186.5 -32.5t164 -89t117 -142t44.5 -184.5z" />
+<glyph unicode="&#xf0ec;" horiz-adv-x="1792" d="M1792 352v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-1376v-192q0 -13 -9.5 -22.5t-22.5 -9.5q-12 0 -24 10l-319 320q-9 9 -9 22q0 14 9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h1376q13 0 22.5 -9.5t9.5 -22.5zM1792 896q0 -14 -9 -23l-320 -320q-9 -9 -23 -9 q-13 0 -22.5 9.5t-9.5 22.5v192h-1376q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h1376v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23z" />
+<glyph unicode="&#xf0ed;" horiz-adv-x="1920" d="M1280 608q0 14 -9 23t-23 9h-224v352q0 13 -9.5 22.5t-22.5 9.5h-192q-13 0 -22.5 -9.5t-9.5 -22.5v-352h-224q-13 0 -22.5 -9.5t-9.5 -22.5q0 -14 9 -23l352 -352q9 -9 23 -9t23 9l351 351q10 12 10 24zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0ee;" horiz-adv-x="1920" d="M1280 672q0 14 -9 23l-352 352q-9 9 -23 9t-23 -9l-351 -351q-10 -12 -10 -24q0 -14 9 -23t23 -9h224v-352q0 -13 9.5 -22.5t22.5 -9.5h192q13 0 22.5 9.5t9.5 22.5v352h224q13 0 22.5 9.5t9.5 22.5zM1920 384q0 -159 -112.5 -271.5t-271.5 -112.5h-1088 q-185 0 -316.5 131.5t-131.5 316.5q0 130 70 240t188 165q-2 30 -2 43q0 212 150 362t362 150q156 0 285.5 -87t188.5 -231q71 62 166 62q106 0 181 -75t75 -181q0 -76 -41 -138q130 -31 213.5 -135.5t83.5 -238.5z" />
+<glyph unicode="&#xf0f0;" horiz-adv-x="1408" d="M384 192q0 -26 -19 -45t-45 -19t-45 19t-19 45t19 45t45 19t45 -19t19 -45zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 68 5.5 131t24 138t47.5 132.5t81 103t120 60.5q-22 -52 -22 -120v-203q-58 -20 -93 -70t-35 -111q0 -80 56 -136t136 -56 t136 56t56 136q0 61 -35.5 111t-92.5 70v203q0 62 25 93q132 -104 295 -104t295 104q25 -31 25 -93v-64q-106 0 -181 -75t-75 -181v-89q-32 -29 -32 -71q0 -40 28 -68t68 -28t68 28t28 68q0 42 -32 71v89q0 52 38 90t90 38t90 -38t38 -90v-89q-32 -29 -32 -71q0 -40 28 -68 t68 -28t68 28t28 68q0 42 -32 71v89q0 68 -34.5 127.5t-93.5 93.5q0 10 0.5 42.5t0 48t-2.5 41.5t-7 47t-13 40q68 -15 120 -60.5t81 -103t47.5 -132.5t24 -138t5.5 -131zM1088 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f1;" horiz-adv-x="1408" d="M1280 832q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 832q0 -62 -35.5 -111t-92.5 -70v-395q0 -159 -131.5 -271.5t-316.5 -112.5t-316.5 112.5t-131.5 271.5v132q-164 20 -274 128t-110 252v512q0 26 19 45t45 19q6 0 16 -2q17 30 47 48 t65 18q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5q-33 0 -64 18v-402q0 -106 94 -181t226 -75t226 75t94 181v402q-31 -18 -64 -18q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q35 0 65 -18t47 -48q10 2 16 2q26 0 45 -19t19 -45v-512q0 -144 -110 -252 t-274 -128v-132q0 -106 94 -181t226 -75t226 75t94 181v395q-57 21 -92.5 70t-35.5 111q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf0f2;" horiz-adv-x="1792" d="M640 1152h512v128h-512v-128zM288 1152v-1280h-64q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h64zM1408 1152v-1280h-1024v1280h128v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h128zM1792 928v-832q0 -92 -66 -158t-158 -66h-64v1280h64q92 0 158 -66 t66 -158z" />
+<glyph unicode="&#xf0f3;" horiz-adv-x="1792" d="M912 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM1728 128q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-181 75t-75 181h-448q-52 0 -90 38t-38 90q50 42 91 88t85 119.5t74.5 158.5 t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q190 -28 307 -158.5t117 -282.5q0 -139 19.5 -260t50 -206t74.5 -158.5t85 -119.5t91 -88z" />
+<glyph unicode="&#xf0f4;" horiz-adv-x="1920" d="M1664 896q0 80 -56 136t-136 56h-64v-384h64q80 0 136 56t56 136zM0 128h1792q0 -106 -75 -181t-181 -75h-1280q-106 0 -181 75t-75 181zM1856 896q0 -159 -112.5 -271.5t-271.5 -112.5h-64v-32q0 -92 -66 -158t-158 -66h-704q-92 0 -158 66t-66 158v736q0 26 19 45 t45 19h1152q159 0 271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf0f5;" horiz-adv-x="1408" d="M640 1472v-640q0 -61 -35.5 -111t-92.5 -70v-779q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v779q-57 20 -92.5 70t-35.5 111v640q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45v-416q0 -26 19 -45 t45 -19t45 19t19 45v416q0 26 19 45t45 19t45 -19t19 -45zM1408 1472v-1600q0 -52 -38 -90t-90 -38h-128q-52 0 -90 38t-38 90v512h-224q-13 0 -22.5 9.5t-9.5 22.5v800q0 132 94 226t226 94h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f6;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M384 736q0 14 9 23t23 9h704q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64zM1120 512q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704zM1120 256q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-704 q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h704z" />
+<glyph unicode="&#xf0f7;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 992v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 1248v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1536h-1152v-1536h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM1408 1472v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f8;" horiz-adv-x="1408" d="M384 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM384 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M1152 224v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM896 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M640 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 480v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5zM1152 736v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-64q-13 0 -22.5 9.5t-9.5 22.5v64q0 13 9.5 22.5t22.5 9.5h64q13 0 22.5 -9.5t9.5 -22.5z M896 -128h384v1152h-256v-32q0 -40 -28 -68t-68 -28h-448q-40 0 -68 28t-28 68v32h-256v-1152h384v224q0 13 9.5 22.5t22.5 9.5h320q13 0 22.5 -9.5t9.5 -22.5v-224zM896 1056v320q0 13 -9.5 22.5t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-96h-128v96q0 13 -9.5 22.5 t-22.5 9.5h-64q-13 0 -22.5 -9.5t-9.5 -22.5v-320q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5v96h128v-96q0 -13 9.5 -22.5t22.5 -9.5h64q13 0 22.5 9.5t9.5 22.5zM1408 1088v-1280q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1280q0 26 19 45t45 19h320 v288q0 40 28 68t68 28h448q40 0 68 -28t28 -68v-288h320q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0f9;" horiz-adv-x="1920" d="M640 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM256 640h384v256h-158q-14 -2 -22 -9l-195 -195q-7 -12 -9 -22v-30zM1536 128q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5zM1664 800v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM1920 1344v-1152 q0 -26 -19 -45t-45 -19h-192q0 -106 -75 -181t-181 -75t-181 75t-75 181h-384q0 -106 -75 -181t-181 -75t-181 75t-75 181h-128q-26 0 -45 19t-19 45t19 45t45 19v416q0 26 13 58t32 51l198 198q19 19 51 32t58 13h160v320q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf0fa;" horiz-adv-x="1792" d="M1280 416v192q0 14 -9 23t-23 9h-224v224q0 14 -9 23t-23 9h-192q-14 0 -23 -9t-9 -23v-224h-224q-14 0 -23 -9t-9 -23v-192q0 -14 9 -23t23 -9h224v-224q0 -14 9 -23t23 -9h192q14 0 23 9t9 23v224h224q14 0 23 9t9 23zM640 1152h512v128h-512v-128zM256 1152v-1280h-32 q-92 0 -158 66t-66 158v832q0 92 66 158t158 66h32zM1440 1152v-1280h-1088v1280h160v160q0 40 28 68t68 28h576q40 0 68 -28t28 -68v-160h160zM1792 928v-832q0 -92 -66 -158t-158 -66h-32v1280h32q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf0fb;" horiz-adv-x="1920" d="M1920 576q-1 -32 -288 -96l-352 -32l-224 -64h-64l-293 -352h69q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-96h-160h-64v32h64v416h-160l-192 -224h-96l-32 32v192h32v32h128v8l-192 24v128l192 24v8h-128v32h-32v192l32 32h96l192 -224h160v416h-64v32h64h160h96 q26 0 45 -4.5t19 -11.5t-19 -11.5t-45 -4.5h-69l293 -352h64l224 -64l352 -32q261 -58 287 -93z" />
+<glyph unicode="&#xf0fc;" horiz-adv-x="1664" d="M640 640v384h-256v-256q0 -53 37.5 -90.5t90.5 -37.5h128zM1664 192v-192h-1152v192l128 192h-128q-159 0 -271.5 112.5t-112.5 271.5v320l-64 64l32 128h480l32 128h960l32 -192l-64 -32v-800z" />
+<glyph unicode="&#xf0fd;" d="M1280 192v896q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-512v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-896q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h512v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf0fe;" d="M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf100;" horiz-adv-x="1024" d="M627 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23zM1011 160q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23z" />
+<glyph unicode="&#xf101;" horiz-adv-x="1024" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM979 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23 l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf102;" horiz-adv-x="1152" d="M1075 224q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23zM1075 608q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393 q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf103;" horiz-adv-x="1152" d="M1075 672q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23zM1075 1056q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23 t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf104;" horiz-adv-x="640" d="M627 992q0 -13 -10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf105;" horiz-adv-x="640" d="M595 576q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf106;" horiz-adv-x="1152" d="M1075 352q0 -13 -10 -23l-50 -50q-10 -10 -23 -10t-23 10l-393 393l-393 -393q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l466 -466q10 -10 10 -23z" />
+<glyph unicode="&#xf107;" horiz-adv-x="1152" d="M1075 800q0 -13 -10 -23l-466 -466q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l393 -393l393 393q10 10 23 10t23 -10l50 -50q10 -10 10 -23z" />
+<glyph unicode="&#xf108;" horiz-adv-x="1920" d="M1792 544v832q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-832q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1376v-1088q0 -66 -47 -113t-113 -47h-544q0 -37 16 -77.5t32 -71t16 -43.5q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19 t-19 45q0 14 16 44t32 70t16 78h-544q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf109;" horiz-adv-x="1920" d="M416 256q-66 0 -113 47t-47 113v704q0 66 47 113t113 47h1088q66 0 113 -47t47 -113v-704q0 -66 -47 -113t-113 -47h-1088zM384 1120v-704q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5v704q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5z M1760 192h160v-96q0 -40 -47 -68t-113 -28h-1600q-66 0 -113 28t-47 68v96h160h1600zM1040 96q16 0 16 16t-16 16h-160q-16 0 -16 -16t16 -16h160z" />
+<glyph unicode="&#xf10a;" horiz-adv-x="1152" d="M640 128q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1024 288v960q0 13 -9.5 22.5t-22.5 9.5h-832q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h832q13 0 22.5 9.5t9.5 22.5zM1152 1248v-1088q0 -66 -47 -113t-113 -47h-832 q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h832q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf10b;" horiz-adv-x="768" d="M464 128q0 33 -23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5t56.5 23.5t23.5 56.5zM672 288v704q0 13 -9.5 22.5t-22.5 9.5h-512q-13 0 -22.5 -9.5t-9.5 -22.5v-704q0 -13 9.5 -22.5t22.5 -9.5h512q13 0 22.5 9.5t9.5 22.5zM480 1136 q0 16 -16 16h-160q-16 0 -16 -16t16 -16h160q16 0 16 16zM768 1152v-1024q0 -52 -38 -90t-90 -38h-512q-52 0 -90 38t-38 90v1024q0 52 38 90t90 38h512q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf10c;" d="M768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103 t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf10d;" horiz-adv-x="1664" d="M768 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z M1664 576v-384q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v704q0 104 40.5 198.5t109.5 163.5t163.5 109.5t198.5 40.5h64q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-64q-106 0 -181 -75t-75 -181v-32q0 -40 28 -68t68 -28h224q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf10e;" horiz-adv-x="1664" d="M768 1216v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136zM1664 1216 v-704q0 -104 -40.5 -198.5t-109.5 -163.5t-163.5 -109.5t-198.5 -40.5h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64q106 0 181 75t75 181v32q0 40 -28 68t-68 28h-224q-80 0 -136 56t-56 136v384q0 80 56 136t136 56h384q80 0 136 -56t56 -136z" />
+<glyph unicode="&#xf110;" horiz-adv-x="1792" d="M526 142q0 -53 -37.5 -90.5t-90.5 -37.5q-52 0 -90 38t-38 90q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM320 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1522 142q0 -52 -38 -90t-90 -38q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM558 1138q0 -66 -47 -113t-113 -47t-113 47t-47 113t47 113t113 47t113 -47t47 -113z M1728 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1088 1344q0 -80 -56 -136t-136 -56t-136 56t-56 136t56 136t136 56t136 -56t56 -136zM1618 1138q0 -93 -66 -158.5t-158 -65.5q-93 0 -158.5 65.5t-65.5 158.5 q0 92 65.5 158t158.5 66q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf111;" d="M1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf112;" horiz-adv-x="1792" d="M1792 416q0 -166 -127 -451q-3 -7 -10.5 -24t-13.5 -30t-13 -22q-12 -17 -28 -17q-15 0 -23.5 10t-8.5 25q0 9 2.5 26.5t2.5 23.5q5 68 5 123q0 101 -17.5 181t-48.5 138.5t-80 101t-105.5 69.5t-133 42.5t-154 21.5t-175.5 6h-224v-256q0 -26 -19 -45t-45 -19t-45 19 l-512 512q-19 19 -19 45t19 45l512 512q19 19 45 19t45 -19t19 -45v-256h224q713 0 875 -403q53 -134 53 -333z" />
+<glyph unicode="&#xf113;" horiz-adv-x="1664" d="M640 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1280 320q0 -40 -12.5 -82t-43 -76t-72.5 -34t-72.5 34t-43 76t-12.5 82t12.5 82t43 76t72.5 34t72.5 -34t43 -76t12.5 -82zM1440 320 q0 120 -69 204t-187 84q-41 0 -195 -21q-71 -11 -157 -11t-157 11q-152 21 -195 21q-118 0 -187 -84t-69 -204q0 -88 32 -153.5t81 -103t122 -60t140 -29.5t149 -7h168q82 0 149 7t140 29.5t122 60t81 103t32 153.5zM1664 496q0 -207 -61 -331q-38 -77 -105.5 -133t-141 -86 t-170 -47.5t-171.5 -22t-167 -4.5q-78 0 -142 3t-147.5 12.5t-152.5 30t-137 51.5t-121 81t-86 115q-62 123 -62 331q0 237 136 396q-27 82 -27 170q0 116 51 218q108 0 190 -39.5t189 -123.5q147 35 309 35q148 0 280 -32q105 82 187 121t189 39q51 -102 51 -218 q0 -87 -27 -168q136 -160 136 -398z" />
+<glyph unicode="&#xf114;" horiz-adv-x="1664" d="M1536 224v704q0 40 -28 68t-68 28h-704q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68v-960q0 -40 28 -68t68 -28h1216q40 0 68 28t28 68zM1664 928v-704q0 -92 -66 -158t-158 -66h-1216q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320 q92 0 158 -66t66 -158v-32h672q92 0 158 -66t66 -158z" />
+<glyph unicode="&#xf115;" horiz-adv-x="1920" d="M1781 605q0 35 -53 35h-1088q-40 0 -85.5 -21.5t-71.5 -52.5l-294 -363q-18 -24 -18 -40q0 -35 53 -35h1088q40 0 86 22t71 53l294 363q18 22 18 39zM640 768h768v160q0 40 -28 68t-68 28h-576q-40 0 -68 28t-28 68v64q0 40 -28 68t-68 28h-320q-40 0 -68 -28t-28 -68 v-853l256 315q44 53 116 87.5t140 34.5zM1909 605q0 -62 -46 -120l-295 -363q-43 -53 -116 -87.5t-140 -34.5h-1088q-92 0 -158 66t-66 158v960q0 92 66 158t158 66h320q92 0 158 -66t66 -158v-32h544q92 0 158 -66t66 -158v-160h192q54 0 99 -24.5t67 -70.5q15 -32 15 -68z " />
+<glyph unicode="&#xf116;" horiz-adv-x="1792" />
+<glyph unicode="&#xf117;" horiz-adv-x="1792" />
+<glyph unicode="&#xf118;" d="M1134 461q-37 -121 -138 -195t-228 -74t-228 74t-138 195q-8 25 4 48.5t38 31.5q25 8 48.5 -4t31.5 -38q25 -80 92.5 -129.5t151.5 -49.5t151.5 49.5t92.5 129.5q8 26 32 38t49 4t37 -31.5t4 -48.5zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5 t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf119;" d="M1134 307q8 -25 -4 -48.5t-37 -31.5t-49 4t-32 38q-25 80 -92.5 129.5t-151.5 49.5t-151.5 -49.5t-92.5 -129.5q-8 -26 -31.5 -38t-48.5 -4q-26 8 -38 31.5t-4 48.5q37 121 138 195t228 74t228 -74t138 -195zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204 t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11a;" d="M1152 448q0 -26 -19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h640q26 0 45 -19t19 -45zM640 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1152 896q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf11b;" horiz-adv-x="1920" d="M832 448v128q0 14 -9 23t-23 9h-192v192q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-192h-192q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h192v-192q0 -14 9 -23t23 -9h128q14 0 23 9t9 23v192h192q14 0 23 9t9 23zM1408 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1920 512q0 -212 -150 -362t-362 -150q-192 0 -338 128h-220q-146 -128 -338 -128q-212 0 -362 150 t-150 362t150 362t362 150h896q212 0 362 -150t150 -362z" />
+<glyph unicode="&#xf11c;" horiz-adv-x="1920" d="M384 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM512 624v-96q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h224q16 0 16 -16zM384 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 368v-96q0 -16 -16 -16 h-864q-16 0 -16 16v96q0 16 16 16h864q16 0 16 -16zM768 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM640 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1024 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16 h96q16 0 16 -16zM896 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1280 624v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 368v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1152 880v-96 q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1408 880v-96q0 -16 -16 -16h-96q-16 0 -16 16v96q0 16 16 16h96q16 0 16 -16zM1664 880v-352q0 -16 -16 -16h-224q-16 0 -16 16v96q0 16 16 16h112v240q0 16 16 16h96q16 0 16 -16zM1792 128v896h-1664v-896 h1664zM1920 1024v-896q0 -53 -37.5 -90.5t-90.5 -37.5h-1664q-53 0 -90.5 37.5t-37.5 90.5v896q0 53 37.5 90.5t90.5 37.5h1664q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf11d;" horiz-adv-x="1792" d="M1664 491v616q-169 -91 -306 -91q-82 0 -145 32q-100 49 -184 76.5t-178 27.5q-173 0 -403 -127v-599q245 113 433 113q55 0 103.5 -7.5t98 -26t77 -31t82.5 -39.5l28 -14q44 -22 101 -22q120 0 293 92zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9 h-64q-14 0 -23 9t-9 23v1266q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102 q-15 -9 -33 -9q-16 0 -32 8q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf11e;" horiz-adv-x="1792" d="M832 536v192q-181 -16 -384 -117v-185q205 96 384 110zM832 954v197q-172 -8 -384 -126v-189q215 111 384 118zM1664 491v184q-235 -116 -384 -71v224q-20 6 -39 15q-5 3 -33 17t-34.5 17t-31.5 15t-34.5 15.5t-32.5 13t-36 12.5t-35 8.5t-39.5 7.5t-39.5 4t-44 2 q-23 0 -49 -3v-222h19q102 0 192.5 -29t197.5 -82q19 -9 39 -15v-188q42 -17 91 -17q120 0 293 92zM1664 918v189q-169 -91 -306 -91q-45 0 -78 8v-196q148 -42 384 90zM320 1280q0 -35 -17.5 -64t-46.5 -46v-1266q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v1266 q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1792 1216v-763q0 -39 -35 -57q-10 -5 -17 -9q-218 -116 -369 -116q-88 0 -158 35l-28 14q-64 33 -99 48t-91 29t-114 14q-102 0 -235.5 -44t-228.5 -102q-15 -9 -33 -9q-16 0 -32 8 q-32 19 -32 56v742q0 35 31 55q35 21 78.5 42.5t114 52t152.5 49.5t155 19q112 0 209 -31t209 -86q38 -19 89 -19q122 0 310 112q22 12 31 17q31 16 62 -2q31 -20 31 -55z" />
+<glyph unicode="&#xf120;" horiz-adv-x="1664" d="M585 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23zM1664 96v-64q0 -14 -9 -23t-23 -9h-960q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h960q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf121;" horiz-adv-x="1920" d="M617 137l-50 -50q-10 -10 -23 -10t-23 10l-466 466q-10 10 -10 23t10 23l466 466q10 10 23 10t23 -10l50 -50q10 -10 10 -23t-10 -23l-393 -393l393 -393q10 -10 10 -23t-10 -23zM1208 1204l-373 -1291q-4 -13 -15.5 -19.5t-23.5 -2.5l-62 17q-13 4 -19.5 15.5t-2.5 24.5 l373 1291q4 13 15.5 19.5t23.5 2.5l62 -17q13 -4 19.5 -15.5t2.5 -24.5zM1865 553l-466 -466q-10 -10 -23 -10t-23 10l-50 50q-10 10 -10 23t10 23l393 393l-393 393q-10 10 -10 23t10 23l50 50q10 10 23 10t23 -10l466 -466q10 -10 10 -23t-10 -23z" />
+<glyph unicode="&#xf122;" horiz-adv-x="1792" d="M640 454v-70q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-69l-397 -398q-19 -19 -19 -45t19 -45zM1792 416q0 -58 -17 -133.5t-38.5 -138t-48 -125t-40.5 -90.5l-20 -40q-8 -17 -28 -17q-6 0 -9 1 q-25 8 -23 34q43 400 -106 565q-64 71 -170.5 110.5t-267.5 52.5v-251q0 -42 -39 -59q-13 -5 -25 -5q-27 0 -45 19l-512 512q-19 19 -19 45t19 45l512 512q29 31 70 14q39 -17 39 -59v-262q411 -28 599 -221q169 -173 169 -509z" />
+<glyph unicode="&#xf123;" horiz-adv-x="1664" d="M1186 579l257 250l-356 52l-66 10l-30 60l-159 322v-963l59 -31l318 -168l-60 355l-12 66zM1638 841l-363 -354l86 -500q5 -33 -6 -51.5t-34 -18.5q-17 0 -40 12l-449 236l-449 -236q-23 -12 -40 -12q-23 0 -34 18.5t-6 51.5l86 500l-364 354q-32 32 -23 59.5t54 34.5 l502 73l225 455q20 41 49 41q28 0 49 -41l225 -455l502 -73q45 -7 54 -34.5t-24 -59.5z" />
+<glyph unicode="&#xf124;" horiz-adv-x="1408" d="M1401 1187l-640 -1280q-17 -35 -57 -35q-5 0 -15 2q-22 5 -35.5 22.5t-13.5 39.5v576h-576q-22 0 -39.5 13.5t-22.5 35.5t4 42t29 30l1280 640q13 7 29 7q27 0 45 -19q15 -14 18.5 -34.5t-6.5 -39.5z" />
+<glyph unicode="&#xf125;" horiz-adv-x="1664" d="M557 256h595v595zM512 301l595 595h-595v-595zM1664 224v-192q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v224h-864q-14 0 -23 9t-9 23v864h-224q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h224v224q0 14 9 23t23 9h192q14 0 23 -9t9 -23 v-224h851l246 247q10 9 23 9t23 -9q9 -10 9 -23t-9 -23l-247 -246v-851h224q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf126;" horiz-adv-x="1024" d="M288 64q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM288 1216q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM928 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1024 1088q0 -52 -26 -96.5t-70 -69.5 q-2 -287 -226 -414q-68 -38 -203 -81q-128 -40 -169.5 -71t-41.5 -100v-26q44 -25 70 -69.5t26 -96.5q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 52 26 96.5t70 69.5v820q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136q0 -52 -26 -96.5t-70 -69.5v-497 q54 26 154 57q55 17 87.5 29.5t70.5 31t59 39.5t40.5 51t28 69.5t8.5 91.5q-44 25 -70 69.5t-26 96.5q0 80 56 136t136 56t136 -56t56 -136z" />
+<glyph unicode="&#xf127;" horiz-adv-x="1664" d="M439 265l-256 -256q-10 -9 -23 -9q-12 0 -23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23zM608 224v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM384 448q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23t9 23t23 9h320 q14 0 23 -9t9 -23zM1648 320q0 -120 -85 -203l-147 -146q-83 -83 -203 -83q-121 0 -204 85l-334 335q-21 21 -42 56l239 18l273 -274q27 -27 68 -27.5t68 26.5l147 146q28 28 28 67q0 40 -28 68l-274 275l18 239q35 -21 56 -42l336 -336q84 -86 84 -204zM1031 1044l-239 -18 l-273 274q-28 28 -68 28q-39 0 -68 -27l-147 -146q-28 -28 -28 -67q0 -40 28 -68l274 -274l-18 -240q-35 21 -56 42l-336 336q-84 86 -84 204q0 120 85 203l147 146q83 83 203 83q121 0 204 -85l334 -335q21 -21 42 -56zM1664 960q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9 t-9 23t9 23t23 9h320q14 0 23 -9t9 -23zM1120 1504v-320q0 -14 -9 -23t-23 -9t-23 9t-9 23v320q0 14 9 23t23 9t23 -9t9 -23zM1527 1353l-256 -256q-11 -9 -23 -9t-23 9q-9 10 -9 23t9 23l256 256q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf128;" horiz-adv-x="1024" d="M704 280v-240q0 -16 -12 -28t-28 -12h-240q-16 0 -28 12t-12 28v240q0 16 12 28t28 12h240q16 0 28 -12t12 -28zM1020 880q0 -54 -15.5 -101t-35 -76.5t-55 -59.5t-57.5 -43.5t-61 -35.5q-41 -23 -68.5 -65t-27.5 -67q0 -17 -12 -32.5t-28 -15.5h-240q-15 0 -25.5 18.5 t-10.5 37.5v45q0 83 65 156.5t143 108.5q59 27 84 56t25 76q0 42 -46.5 74t-107.5 32q-65 0 -108 -29q-35 -25 -107 -115q-13 -16 -31 -16q-12 0 -25 8l-164 125q-13 10 -15.5 25t5.5 28q160 266 464 266q80 0 161 -31t146 -83t106 -127.5t41 -158.5z" />
+<glyph unicode="&#xf129;" horiz-adv-x="640" d="M640 192v-128q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h64v384h-64q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h384q26 0 45 -19t19 -45v-576h64q26 0 45 -19t19 -45zM512 1344v-192q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v192 q0 26 19 45t45 19h256q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf12a;" horiz-adv-x="640" d="M512 288v-224q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v224q0 26 19 45t45 19h256q26 0 45 -19t19 -45zM542 1344l-28 -768q-1 -26 -20.5 -45t-45.5 -19h-256q-26 0 -45.5 19t-20.5 45l-28 768q-1 26 17.5 45t44.5 19h320q26 0 44.5 -19t17.5 -45z" />
+<glyph unicode="&#xf12b;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1534 846v-206h-514l-3 27 q-4 28 -4 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q83 65 188 65q110 0 178 -59.5t68 -158.5q0 -56 -24.5 -103t-62 -76.5t-81.5 -58.5t-82 -50.5t-65.5 -51.5t-30.5 -63h232v80 h126z" />
+<glyph unicode="&#xf12c;" d="M897 167v-167h-248l-159 252l-24 42q-8 9 -11 21h-3l-9 -21q-10 -20 -25 -44l-155 -250h-258v167h128l197 291l-185 272h-137v168h276l139 -228q2 -4 23 -42q8 -9 11 -21h3q3 9 11 21l25 42l140 228h257v-168h-125l-184 -267l204 -296h109zM1536 -50v-206h-514l-4 27 q-3 45 -3 46q0 64 26 117t65 86.5t84 65t84 54.5t65 54t26 64q0 38 -29.5 62.5t-70.5 24.5q-51 0 -97 -39q-14 -11 -36 -38l-105 92q26 37 63 66q80 65 188 65q110 0 178 -59.5t68 -158.5q0 -66 -34.5 -118.5t-84 -86t-99.5 -62.5t-87 -63t-41 -73h232v80h126z" />
+<glyph unicode="&#xf12d;" horiz-adv-x="1920" d="M896 128l336 384h-768l-336 -384h768zM1909 1205q15 -34 9.5 -71.5t-30.5 -65.5l-896 -1024q-38 -44 -96 -44h-768q-38 0 -69.5 20.5t-47.5 54.5q-15 34 -9.5 71.5t30.5 65.5l896 1024q38 44 96 44h768q38 0 69.5 -20.5t47.5 -54.5z" />
+<glyph unicode="&#xf12e;" horiz-adv-x="1664" d="M1664 438q0 -81 -44.5 -135t-123.5 -54q-41 0 -77.5 17.5t-59 38t-56.5 38t-71 17.5q-110 0 -110 -124q0 -39 16 -115t15 -115v-5q-22 0 -33 -1q-34 -3 -97.5 -11.5t-115.5 -13.5t-98 -5q-61 0 -103 26.5t-42 83.5q0 37 17.5 71t38 56.5t38 59t17.5 77.5q0 79 -54 123.5 t-135 44.5q-84 0 -143 -45.5t-59 -127.5q0 -43 15 -83t33.5 -64.5t33.5 -53t15 -50.5q0 -45 -46 -89q-37 -35 -117 -35q-95 0 -245 24q-9 2 -27.5 4t-27.5 4l-13 2q-1 0 -3 1q-2 0 -2 1v1024q2 -1 17.5 -3.5t34 -5t21.5 -3.5q150 -24 245 -24q80 0 117 35q46 44 46 89 q0 22 -15 50.5t-33.5 53t-33.5 64.5t-15 83q0 82 59 127.5t144 45.5q80 0 134 -44.5t54 -123.5q0 -41 -17.5 -77.5t-38 -59t-38 -56.5t-17.5 -71q0 -57 42 -83.5t103 -26.5q64 0 180 15t163 17v-2q-1 -2 -3.5 -17.5t-5 -34t-3.5 -21.5q-24 -150 -24 -245q0 -80 35 -117 q44 -46 89 -46q22 0 50.5 15t53 33.5t64.5 33.5t83 15q82 0 127.5 -59t45.5 -143z" />
+<glyph unicode="&#xf130;" horiz-adv-x="1152" d="M1152 832v-128q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-217 24 -364.5 187.5t-147.5 384.5v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -185 131.5 -316.5t316.5 -131.5 t316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45zM896 1216v-512q0 -132 -94 -226t-226 -94t-226 94t-94 226v512q0 132 94 226t226 94t226 -94t94 -226z" />
+<glyph unicode="&#xf131;" horiz-adv-x="1408" d="M271 591l-101 -101q-42 103 -42 214v128q0 26 19 45t45 19t45 -19t19 -45v-128q0 -53 15 -113zM1385 1193l-361 -361v-128q0 -132 -94 -226t-226 -94q-55 0 -109 19l-96 -96q97 -51 205 -51q185 0 316.5 131.5t131.5 316.5v128q0 26 19 45t45 19t45 -19t19 -45v-128 q0 -221 -147.5 -384.5t-364.5 -187.5v-132h256q26 0 45 -19t19 -45t-19 -45t-45 -19h-640q-26 0 -45 19t-19 45t19 45t45 19h256v132q-125 13 -235 81l-254 -254q-10 -10 -23 -10t-23 10l-82 82q-10 10 -10 23t10 23l1234 1234q10 10 23 10t23 -10l82 -82q10 -10 10 -23 t-10 -23zM1005 1325l-621 -621v512q0 132 94 226t226 94q102 0 184.5 -59t116.5 -152z" />
+<glyph unicode="&#xf132;" horiz-adv-x="1280" d="M1088 576v640h-448v-1137q119 63 213 137q235 184 235 360zM1280 1344v-768q0 -86 -33.5 -170.5t-83 -150t-118 -127.5t-126.5 -103t-121 -77.5t-89.5 -49.5t-42.5 -20q-12 -6 -26 -6t-26 6q-16 7 -42.5 20t-89.5 49.5t-121 77.5t-126.5 103t-118 127.5t-83 150 t-33.5 170.5v768q0 26 19 45t45 19h1152q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf133;" horiz-adv-x="1664" d="M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf134;" horiz-adv-x="1408" d="M512 1344q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1408 1376v-320q0 -16 -12 -25q-8 -7 -20 -7q-4 0 -7 1l-448 96q-11 2 -18 11t-7 20h-256v-102q111 -23 183.5 -111t72.5 -203v-800q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v800 q0 106 62.5 190.5t161.5 114.5v111h-32q-59 0 -115 -23.5t-91.5 -53t-66 -66.5t-40.5 -53.5t-14 -24.5q-17 -35 -57 -35q-16 0 -29 7q-23 12 -31.5 37t3.5 49q5 10 14.5 26t37.5 53.5t60.5 70t85 67t108.5 52.5q-25 42 -25 86q0 66 47 113t113 47t113 -47t47 -113 q0 -33 -14 -64h302q0 11 7 20t18 11l448 96q3 1 7 1q12 0 20 -7q12 -9 12 -25z" />
+<glyph unicode="&#xf135;" horiz-adv-x="1664" d="M1440 1088q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1664 1376q0 -249 -75.5 -430.5t-253.5 -360.5q-81 -80 -195 -176l-20 -379q-2 -16 -16 -26l-384 -224q-7 -4 -16 -4q-12 0 -23 9l-64 64q-13 14 -8 32l85 276l-281 281l-276 -85q-3 -1 -9 -1 q-14 0 -23 9l-64 64q-17 19 -5 39l224 384q10 14 26 16l379 20q96 114 176 195q188 187 358 258t431 71q14 0 24 -9.5t10 -22.5z" />
+<glyph unicode="&#xf136;" horiz-adv-x="1792" d="M1745 763l-164 -763h-334l178 832q13 56 -15 88q-27 33 -83 33h-169l-204 -953h-334l204 953h-286l-204 -953h-334l204 953l-153 327h1276q101 0 189.5 -40.5t147.5 -113.5q60 -73 81 -168.5t0 -194.5z" />
+<glyph unicode="&#xf137;" d="M909 141l102 102q19 19 19 45t-19 45l-307 307l307 307q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf138;" d="M717 141l454 454q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l307 -307l-307 -307q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf139;" d="M1165 397l102 102q19 19 19 45t-19 45l-454 454q-19 19 -45 19t-45 -19l-454 -454q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l307 307l307 -307q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13a;" d="M813 237l454 454q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-307 -307l-307 307q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l454 -454q19 -19 45 -19t45 19zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5 t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf13b;" horiz-adv-x="1408" d="M1130 939l16 175h-884l47 -534h612l-22 -228l-197 -53l-196 53l-13 140h-175l22 -278l362 -100h4v1l359 99l50 544h-644l-15 181h674zM0 1408h1408l-128 -1438l-578 -162l-574 162z" />
+<glyph unicode="&#xf13c;" horiz-adv-x="1792" d="M275 1408h1505l-266 -1333l-804 -267l-698 267l71 356h297l-29 -147l422 -161l486 161l68 339h-1208l58 297h1209l38 191h-1208z" />
+<glyph unicode="&#xf13d;" horiz-adv-x="1792" d="M960 1280q0 26 -19 45t-45 19t-45 -19t-19 -45t19 -45t45 -19t45 19t19 45zM1792 352v-352q0 -22 -20 -30q-8 -2 -12 -2q-13 0 -23 9l-93 93q-119 -143 -318.5 -226.5t-429.5 -83.5t-429.5 83.5t-318.5 226.5l-93 -93q-9 -9 -23 -9q-4 0 -12 2q-20 8 -20 30v352 q0 14 9 23t23 9h352q22 0 30 -20q8 -19 -7 -35l-100 -100q67 -91 189.5 -153.5t271.5 -82.5v647h-192q-26 0 -45 19t-19 45v128q0 26 19 45t45 19h192v163q-58 34 -93 92.5t-35 128.5q0 106 75 181t181 75t181 -75t75 -181q0 -70 -35 -128.5t-93 -92.5v-163h192q26 0 45 -19 t19 -45v-128q0 -26 -19 -45t-45 -19h-192v-647q149 20 271.5 82.5t189.5 153.5l-100 100q-15 16 -7 35q8 20 30 20h352q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf13e;" horiz-adv-x="1152" d="M1056 768q40 0 68 -28t28 -68v-576q0 -40 -28 -68t-68 -28h-960q-40 0 -68 28t-28 68v576q0 40 28 68t68 28h32v320q0 185 131.5 316.5t316.5 131.5t316.5 -131.5t131.5 -316.5q0 -26 -19 -45t-45 -19h-64q-26 0 -45 19t-19 45q0 106 -75 181t-181 75t-181 -75t-75 -181 v-320h736z" />
+<glyph unicode="&#xf140;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM1152 640q0 159 -112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5t271.5 -112.5t271.5 112.5t112.5 271.5zM1280 640q0 -212 -150 -362t-362 -150t-362 150 t-150 362t150 362t362 150t362 -150t150 -362zM1408 640q0 130 -51 248.5t-136.5 204t-204 136.5t-248.5 51t-248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5zM1536 640 q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf141;" horiz-adv-x="1408" d="M384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM896 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM1408 800v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf142;" horiz-adv-x="384" d="M384 288v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 800v-192q0 -40 -28 -68t-68 -28h-192q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68zM384 1312v-192q0 -40 -28 -68t-68 -28h-192 q-40 0 -68 28t-28 68v192q0 40 28 68t68 28h192q40 0 68 -28t28 -68z" />
+<glyph unicode="&#xf143;" d="M512 256q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM863 162q-13 232 -177 396t-396 177q-14 1 -24 -9t-10 -23v-128q0 -13 8.5 -22t21.5 -10q154 -11 264 -121t121 -264q1 -13 10 -21.5t22 -8.5h128q13 0 23 10 t9 24zM1247 161q-5 154 -56 297.5t-139.5 260t-205 205t-260 139.5t-297.5 56q-14 1 -23 -9q-10 -10 -10 -23v-128q0 -13 9 -22t22 -10q204 -7 378 -111.5t278.5 -278.5t111.5 -378q1 -13 10 -22t22 -9h128q13 0 23 10q11 9 9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf144;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM1152 585q32 18 32 55t-32 55l-544 320q-31 19 -64 1q-32 -19 -32 -56v-640q0 -37 32 -56 q16 -8 32 -8q17 0 32 9z" />
+<glyph unicode="&#xf145;" horiz-adv-x="1792" d="M1024 1084l316 -316l-572 -572l-316 316zM813 105l618 618q19 19 19 45t-19 45l-362 362q-18 18 -45 18t-45 -18l-618 -618q-19 -19 -19 -45t19 -45l362 -362q18 -18 45 -18t45 18zM1702 742l-907 -908q-37 -37 -90.5 -37t-90.5 37l-126 126q56 56 56 136t-56 136 t-136 56t-136 -56l-125 126q-37 37 -37 90.5t37 90.5l907 906q37 37 90.5 37t90.5 -37l125 -125q-56 -56 -56 -136t56 -136t136 -56t136 56l126 -125q37 -37 37 -90.5t-37 -90.5z" />
+<glyph unicode="&#xf146;" d="M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf147;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h832q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5 t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf148;" horiz-adv-x="1024" d="M1018 933q-18 -37 -58 -37h-192v-864q0 -14 -9 -23t-23 -9h-704q-21 0 -29 18q-8 20 4 35l160 192q9 11 25 11h320v640h-192q-40 0 -58 37q-17 37 9 68l320 384q18 22 49 22t49 -22l320 -384q27 -32 9 -68z" />
+<glyph unicode="&#xf149;" horiz-adv-x="1024" d="M32 1280h704q13 0 22.5 -9.5t9.5 -23.5v-863h192q40 0 58 -37t-9 -69l-320 -384q-18 -22 -49 -22t-49 22l-320 384q-26 31 -9 69q18 37 58 37h192v640h-320q-14 0 -25 11l-160 192q-13 14 -4 34q9 19 29 19z" />
+<glyph unicode="&#xf14a;" d="M685 237l614 614q19 19 19 45t-19 45l-102 102q-19 19 -45 19t-45 -19l-467 -467l-211 211q-19 19 -45 19t-45 -19l-102 -102q-19 -19 -19 -45t19 -45l358 -358q19 -19 45 -19t45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5 t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14b;" d="M404 428l152 -152l-52 -52h-56v96h-96v56zM818 818q14 -13 -3 -30l-291 -291q-17 -17 -30 -3q-14 13 3 30l291 291q17 17 30 3zM544 128l544 544l-288 288l-544 -544v-288h288zM1152 736l92 92q28 28 28 68t-28 68l-152 152q-28 28 -68 28t-68 -28l-92 -92zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14c;" d="M1280 608v480q0 26 -19 45t-45 19h-480q-42 0 -59 -39q-17 -41 14 -70l144 -144l-534 -534q-19 -19 -19 -45t19 -45l102 -102q19 -19 45 -19t45 19l534 534l144 -144q18 -19 45 -19q12 0 25 5q39 17 39 59zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14d;" d="M1005 435l352 352q19 19 19 45t-19 45l-352 352q-30 31 -69 14q-40 -17 -40 -59v-160q-119 0 -216 -19.5t-162.5 -51t-114 -79t-76.5 -95.5t-44.5 -109t-21.5 -111.5t-5 -110.5q0 -181 167 -404q10 -12 25 -12q7 0 13 3q22 9 19 33q-44 354 62 473q46 52 130 75.5 t224 23.5v-160q0 -42 40 -59q12 -5 24 -5q26 0 45 19zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf14e;" d="M640 448l256 128l-256 128v-256zM1024 1039v-542l-512 -256v542zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf150;" d="M1145 861q18 -35 -5 -66l-320 -448q-19 -27 -52 -27t-52 27l-320 448q-23 31 -5 66q17 35 57 35h640q40 0 57 -35zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf151;" d="M1145 419q-17 -35 -57 -35h-640q-40 0 -57 35q-18 35 5 66l320 448q19 27 52 27t52 -27l320 -448q23 -31 5 -66zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf152;" d="M1088 640q0 -33 -27 -52l-448 -320q-31 -23 -66 -5q-35 17 -35 57v640q0 40 35 57q35 18 66 -5l448 -320q27 -19 27 -52zM1280 160v960q0 14 -9 23t-23 9h-960q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h960q14 0 23 9t9 23zM1536 1120v-960q0 -119 -84.5 -203.5 t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf153;" horiz-adv-x="1024" d="M976 229l35 -159q3 -12 -3 -22.5t-17 -14.5l-5 -1q-4 -2 -10.5 -3.5t-16 -4.5t-21.5 -5.5t-25.5 -5t-30 -5t-33.5 -4.5t-36.5 -3t-38.5 -1q-234 0 -409 130.5t-238 351.5h-95q-13 0 -22.5 9.5t-9.5 22.5v113q0 13 9.5 22.5t22.5 9.5h66q-2 57 1 105h-67q-14 0 -23 9 t-9 23v114q0 14 9 23t23 9h98q67 210 243.5 338t400.5 128q102 0 194 -23q11 -3 20 -15q6 -11 3 -24l-43 -159q-3 -13 -14 -19.5t-24 -2.5l-4 1q-4 1 -11.5 2.5l-17.5 3.5t-22.5 3.5t-26 3t-29 2.5t-29.5 1q-126 0 -226 -64t-150 -176h468q16 0 25 -12q10 -12 7 -26 l-24 -114q-5 -26 -32 -26h-488q-3 -37 0 -105h459q15 0 25 -12q9 -12 6 -27l-24 -112q-2 -11 -11 -18.5t-20 -7.5h-387q48 -117 149.5 -185.5t228.5 -68.5q18 0 36 1.5t33.5 3.5t29.5 4.5t24.5 5t18.5 4.5l12 3l5 2q13 5 26 -2q12 -7 15 -21z" />
+<glyph unicode="&#xf154;" horiz-adv-x="1024" d="M1020 399v-367q0 -14 -9 -23t-23 -9h-956q-14 0 -23 9t-9 23v150q0 13 9.5 22.5t22.5 9.5h97v383h-95q-14 0 -23 9.5t-9 22.5v131q0 14 9 23t23 9h95v223q0 171 123.5 282t314.5 111q185 0 335 -125q9 -8 10 -20.5t-7 -22.5l-103 -127q-9 -11 -22 -12q-13 -2 -23 7 q-5 5 -26 19t-69 32t-93 18q-85 0 -137 -47t-52 -123v-215h305q13 0 22.5 -9t9.5 -23v-131q0 -13 -9.5 -22.5t-22.5 -9.5h-305v-379h414v181q0 13 9 22.5t23 9.5h162q14 0 23 -9.5t9 -22.5z" />
+<glyph unicode="&#xf155;" horiz-adv-x="1024" d="M978 351q0 -153 -99.5 -263.5t-258.5 -136.5v-175q0 -14 -9 -23t-23 -9h-135q-13 0 -22.5 9.5t-9.5 22.5v175q-66 9 -127.5 31t-101.5 44.5t-74 48t-46.5 37.5t-17.5 18q-17 21 -2 41l103 135q7 10 23 12q15 2 24 -9l2 -2q113 -99 243 -125q37 -8 74 -8q81 0 142.5 43 t61.5 122q0 28 -15 53t-33.5 42t-58.5 37.5t-66 32t-80 32.5q-39 16 -61.5 25t-61.5 26.5t-62.5 31t-56.5 35.5t-53.5 42.5t-43.5 49t-35.5 58t-21 66.5t-8.5 78q0 138 98 242t255 134v180q0 13 9.5 22.5t22.5 9.5h135q14 0 23 -9t9 -23v-176q57 -6 110.5 -23t87 -33.5 t63.5 -37.5t39 -29t15 -14q17 -18 5 -38l-81 -146q-8 -15 -23 -16q-14 -3 -27 7q-3 3 -14.5 12t-39 26.5t-58.5 32t-74.5 26t-85.5 11.5q-95 0 -155 -43t-60 -111q0 -26 8.5 -48t29.5 -41.5t39.5 -33t56 -31t60.5 -27t70 -27.5q53 -20 81 -31.5t76 -35t75.5 -42.5t62 -50 t53 -63.5t31.5 -76.5t13 -94z" />
+<glyph unicode="&#xf156;" horiz-adv-x="898" d="M898 1066v-102q0 -14 -9 -23t-23 -9h-168q-23 -144 -129 -234t-276 -110q167 -178 459 -536q14 -16 4 -34q-8 -18 -29 -18h-195q-16 0 -25 12q-306 367 -498 571q-9 9 -9 22v127q0 13 9.5 22.5t22.5 9.5h112q132 0 212.5 43t102.5 125h-427q-14 0 -23 9t-9 23v102 q0 14 9 23t23 9h413q-57 113 -268 113h-145q-13 0 -22.5 9.5t-9.5 22.5v133q0 14 9 23t23 9h832q14 0 23 -9t9 -23v-102q0 -14 -9 -23t-23 -9h-233q47 -61 64 -144h171q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf157;" horiz-adv-x="1027" d="M603 0h-172q-13 0 -22.5 9t-9.5 23v330h-288q-13 0 -22.5 9t-9.5 23v103q0 13 9.5 22.5t22.5 9.5h288v85h-288q-13 0 -22.5 9t-9.5 23v104q0 13 9.5 22.5t22.5 9.5h214l-321 578q-8 16 0 32q10 16 28 16h194q19 0 29 -18l215 -425q19 -38 56 -125q10 24 30.5 68t27.5 61 l191 420q8 19 29 19h191q17 0 27 -16q9 -14 1 -31l-313 -579h215q13 0 22.5 -9.5t9.5 -22.5v-104q0 -14 -9.5 -23t-22.5 -9h-290v-85h290q13 0 22.5 -9.5t9.5 -22.5v-103q0 -14 -9.5 -23t-22.5 -9h-290v-330q0 -13 -9.5 -22.5t-22.5 -9.5z" />
+<glyph unicode="&#xf158;" horiz-adv-x="1280" d="M1043 971q0 100 -65 162t-171 62h-320v-448h320q106 0 171 62t65 162zM1280 971q0 -193 -126.5 -315t-326.5 -122h-340v-118h505q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-505v-192q0 -14 -9.5 -23t-22.5 -9h-167q-14 0 -23 9t-9 23v192h-224q-14 0 -23 9t-9 23v128 q0 14 9 23t23 9h224v118h-224q-14 0 -23 9t-9 23v149q0 13 9 22.5t23 9.5h224v629q0 14 9 23t23 9h539q200 0 326.5 -122t126.5 -315z" />
+<glyph unicode="&#xf159;" horiz-adv-x="1792" d="M514 341l81 299h-159l75 -300q1 -1 1 -3t1 -3q0 1 0.5 3.5t0.5 3.5zM630 768l35 128h-292l32 -128h225zM822 768h139l-35 128h-70zM1271 340l78 300h-162l81 -299q0 -1 0.5 -3.5t1.5 -3.5q0 1 0.5 3t0.5 3zM1382 768l33 128h-297l34 -128h230zM1792 736v-64q0 -14 -9 -23 t-23 -9h-213l-164 -616q-7 -24 -31 -24h-159q-24 0 -31 24l-166 616h-209l-167 -616q-7 -24 -31 -24h-159q-11 0 -19.5 7t-10.5 17l-160 616h-208q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h175l-33 128h-142q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h109l-89 344q-5 15 5 28 q10 12 26 12h137q26 0 31 -24l90 -360h359l97 360q7 24 31 24h126q24 0 31 -24l98 -360h365l93 360q5 24 31 24h137q16 0 26 -12q10 -13 5 -28l-91 -344h111q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-145l-34 -128h179q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf15a;" horiz-adv-x="1280" d="M1167 896q18 -182 -131 -258q117 -28 175 -103t45 -214q-7 -71 -32.5 -125t-64.5 -89t-97 -58.5t-121.5 -34.5t-145.5 -15v-255h-154v251q-80 0 -122 1v-252h-154v255q-18 0 -54 0.5t-55 0.5h-200l31 183h111q50 0 58 51v402h16q-6 1 -16 1v287q-13 68 -89 68h-111v164 l212 -1q64 0 97 1v252h154v-247q82 2 122 2v245h154v-252q79 -7 140 -22.5t113 -45t82.5 -78t36.5 -114.5zM952 351q0 36 -15 64t-37 46t-57.5 30.5t-65.5 18.5t-74 9t-69 3t-64.5 -1t-47.5 -1v-338q8 0 37 -0.5t48 -0.5t53 1.5t58.5 4t57 8.5t55.5 14t47.5 21t39.5 30 t24.5 40t9.5 51zM881 827q0 33 -12.5 58.5t-30.5 42t-48 28t-55 16.5t-61.5 8t-58 2.5t-54 -1t-39.5 -0.5v-307q5 0 34.5 -0.5t46.5 0t50 2t55 5.5t51.5 11t48.5 18.5t37 27t27 38.5t9 51z" />
+<glyph unicode="&#xf15b;" d="M1024 1024v472q22 -14 36 -28l408 -408q14 -14 28 -36h-472zM896 992q0 -40 28 -68t68 -28h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544z" />
+<glyph unicode="&#xf15c;" d="M1468 1060q14 -14 28 -36h-472v472q22 -14 36 -28zM992 896h544v-1056q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h800v-544q0 -40 28 -68t68 -28zM1152 160v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-704q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h704q14 0 23 9t9 23z" />
+<glyph unicode="&#xf15d;" horiz-adv-x="1664" d="M1191 1128h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1572 -23 v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -11v-2l14 2q9 2 30 2h248v119h121zM1661 874v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162 l230 -662h70z" />
+<glyph unicode="&#xf15e;" horiz-adv-x="1664" d="M1191 104h177l-72 218l-12 47q-2 16 -2 20h-4l-3 -20q0 -1 -3.5 -18t-7.5 -29zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1661 -150 v-106h-288v106h75l-47 144h-243l-47 -144h75v-106h-287v106h70l230 662h162l230 -662h70zM1572 1001v-233h-584v90l369 529q12 18 21 27l11 9v3q-2 0 -6.5 -0.5t-7.5 -0.5q-12 -3 -30 -3h-232v-115h-120v229h567v-89l-369 -530q-6 -8 -21 -26l-11 -10v-3l14 3q9 1 30 1h248 v119h121z" />
+<glyph unicode="&#xf160;" horiz-adv-x="1792" d="M736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23zM1792 -32v-192q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832 q14 0 23 -9t9 -23zM1600 480v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1408 992v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1216 1504v-192q0 -14 -9 -23t-23 -9h-256 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf161;" horiz-adv-x="1792" d="M1216 -32v-192q0 -14 -9 -23t-23 -9h-256q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h256q14 0 23 -9t9 -23zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192 q14 0 23 -9t9 -23zM1408 480v-192q0 -14 -9 -23t-23 -9h-448q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h448q14 0 23 -9t9 -23zM1600 992v-192q0 -14 -9 -23t-23 -9h-640q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h640q14 0 23 -9t9 -23zM1792 1504v-192q0 -14 -9 -23t-23 -9h-832 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h832q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf162;" d="M1346 223q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9t9 -23 zM1486 165q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5 t82 -252.5zM1456 882v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165z" />
+<glyph unicode="&#xf163;" d="M1346 1247q0 63 -44 116t-103 53q-52 0 -83 -37t-31 -94t36.5 -95t104.5 -38q50 0 85 27t35 68zM736 96q0 -12 -10 -24l-319 -319q-10 -9 -23 -9q-12 0 -23 9l-320 320q-15 16 -7 35q8 20 30 20h192v1376q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1376h192q14 0 23 -9 t9 -23zM1456 -142v-114h-469v114h167v432q0 7 0.5 19t0.5 17v16h-2l-7 -12q-8 -13 -26 -31l-62 -58l-82 86l192 185h123v-654h165zM1486 1189q0 -62 -13 -121.5t-41 -114t-68 -95.5t-98.5 -65.5t-127.5 -24.5q-62 0 -108 16q-24 8 -42 15l39 113q15 -7 31 -11q37 -13 75 -13 q84 0 134.5 58.5t66.5 145.5h-2q-21 -23 -61.5 -37t-84.5 -14q-106 0 -173 71.5t-67 172.5q0 105 72 178t181 73q123 0 205 -94.5t82 -252.5z" />
+<glyph unicode="&#xf164;" horiz-adv-x="1664" d="M256 192q0 26 -19 45t-45 19q-27 0 -45.5 -19t-18.5 -45q0 -27 18.5 -45.5t45.5 -18.5q26 0 45 18.5t19 45.5zM416 704v-640q0 -26 -19 -45t-45 -19h-288q-26 0 -45 19t-19 45v640q0 26 19 45t45 19h288q26 0 45 -19t19 -45zM1600 704q0 -86 -55 -149q15 -44 15 -76 q3 -76 -43 -137q17 -56 0 -117q-15 -57 -54 -94q9 -112 -49 -181q-64 -76 -197 -78h-36h-76h-17q-66 0 -144 15.5t-121.5 29t-120.5 39.5q-123 43 -158 44q-26 1 -45 19.5t-19 44.5v641q0 25 18 43.5t43 20.5q24 2 76 59t101 121q68 87 101 120q18 18 31 48t17.5 48.5 t13.5 60.5q7 39 12.5 61t19.5 52t34 50q19 19 45 19q46 0 82.5 -10.5t60 -26t40 -40.5t24 -45t12 -50t5 -45t0.5 -39q0 -38 -9.5 -76t-19 -60t-27.5 -56q-3 -6 -10 -18t-11 -22t-8 -24h277q78 0 135 -57t57 -135z" />
+<glyph unicode="&#xf165;" horiz-adv-x="1664" d="M256 960q0 -26 -19 -45t-45 -19q-27 0 -45.5 19t-18.5 45q0 27 18.5 45.5t45.5 18.5q26 0 45 -18.5t19 -45.5zM416 448v640q0 26 -19 45t-45 19h-288q-26 0 -45 -19t-19 -45v-640q0 -26 19 -45t45 -19h288q26 0 45 19t19 45zM1545 597q55 -61 55 -149q-1 -78 -57.5 -135 t-134.5 -57h-277q4 -14 8 -24t11 -22t10 -18q18 -37 27 -57t19 -58.5t10 -76.5q0 -24 -0.5 -39t-5 -45t-12 -50t-24 -45t-40 -40.5t-60 -26t-82.5 -10.5q-26 0 -45 19q-20 20 -34 50t-19.5 52t-12.5 61q-9 42 -13.5 60.5t-17.5 48.5t-31 48q-33 33 -101 120q-49 64 -101 121 t-76 59q-25 2 -43 20.5t-18 43.5v641q0 26 19 44.5t45 19.5q35 1 158 44q77 26 120.5 39.5t121.5 29t144 15.5h17h76h36q133 -2 197 -78q58 -69 49 -181q39 -37 54 -94q17 -61 0 -117q46 -61 43 -137q0 -32 -15 -76z" />
+<glyph unicode="&#xf166;" d="M919 233v157q0 50 -29 50q-17 0 -33 -16v-224q16 -16 33 -16q29 0 29 49zM1103 355h66v34q0 51 -33 51t-33 -51v-34zM532 621v-70h-80v-423h-74v423h-78v70h232zM733 495v-367h-67v40q-39 -45 -76 -45q-33 0 -42 28q-6 16 -6 54v290h66v-270q0 -24 1 -26q1 -15 15 -15 q20 0 42 31v280h67zM985 384v-146q0 -52 -7 -73q-12 -42 -53 -42q-35 0 -68 41v-36h-67v493h67v-161q32 40 68 40q41 0 53 -42q7 -21 7 -74zM1236 255v-9q0 -29 -2 -43q-3 -22 -15 -40q-27 -40 -80 -40q-52 0 -81 38q-21 27 -21 86v129q0 59 20 86q29 38 80 38t78 -38 q21 -28 21 -86v-76h-133v-65q0 -51 34 -51q24 0 30 26q0 1 0.5 7t0.5 16.5v21.5h68zM785 1079v-156q0 -51 -32 -51t-32 51v156q0 52 32 52t32 -52zM1318 366q0 177 -19 260q-10 44 -43 73.5t-76 34.5q-136 15 -412 15q-275 0 -411 -15q-44 -5 -76.5 -34.5t-42.5 -73.5 q-20 -87 -20 -260q0 -176 20 -260q10 -43 42.5 -73t75.5 -35q137 -15 412 -15t412 15q43 5 75.5 35t42.5 73q20 84 20 260zM563 1017l90 296h-75l-51 -195l-53 195h-78l24 -69t23 -69q35 -103 46 -158v-201h74v201zM852 936v130q0 58 -21 87q-29 38 -78 38q-51 0 -78 -38 q-21 -29 -21 -87v-130q0 -58 21 -87q27 -38 78 -38q49 0 78 38q21 27 21 87zM1033 816h67v370h-67v-283q-22 -31 -42 -31q-15 0 -16 16q-1 2 -1 26v272h-67v-293q0 -37 6 -55q11 -27 43 -27q36 0 77 45v-40zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960 q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf167;" d="M971 292v-211q0 -67 -39 -67q-23 0 -45 22v301q22 22 45 22q39 0 39 -67zM1309 291v-46h-90v46q0 68 45 68t45 -68zM343 509h107v94h-312v-94h105v-569h100v569zM631 -60h89v494h-89v-378q-30 -42 -57 -42q-18 0 -21 21q-1 3 -1 35v364h-89v-391q0 -49 8 -73 q12 -37 58 -37q48 0 102 61v-54zM1060 88v197q0 73 -9 99q-17 56 -71 56q-50 0 -93 -54v217h-89v-663h89v48q45 -55 93 -55q54 0 71 55q9 27 9 100zM1398 98v13h-91q0 -51 -2 -61q-7 -36 -40 -36q-46 0 -46 69v87h179v103q0 79 -27 116q-39 51 -106 51q-68 0 -107 -51 q-28 -37 -28 -116v-173q0 -79 29 -116q39 -51 108 -51q72 0 108 53q18 27 21 54q2 9 2 58zM790 1011v210q0 69 -43 69t-43 -69v-210q0 -70 43 -70t43 70zM1509 260q0 -234 -26 -350q-14 -59 -58 -99t-102 -46q-184 -21 -555 -21t-555 21q-58 6 -102.5 46t-57.5 99 q-26 112 -26 350q0 234 26 350q14 59 58 99t103 47q183 20 554 20t555 -20q58 -7 102.5 -47t57.5 -99q26 -112 26 -350zM511 1536h102l-121 -399v-271h-100v271q-14 74 -61 212q-37 103 -65 187h106l71 -263zM881 1203v-175q0 -81 -28 -118q-37 -51 -106 -51q-67 0 -105 51 q-28 38 -28 118v175q0 80 28 117q38 51 105 51q69 0 106 -51q28 -37 28 -117zM1216 1365v-499h-91v55q-53 -62 -103 -62q-46 0 -59 37q-8 24 -8 75v394h91v-367q0 -33 1 -35q3 -22 21 -22q27 0 57 43v381h91z" />
+<glyph unicode="&#xf168;" horiz-adv-x="1408" d="M597 869q-10 -18 -257 -456q-27 -46 -65 -46h-239q-21 0 -31 17t0 36l253 448q1 0 0 1l-161 279q-12 22 -1 37q9 15 32 15h239q40 0 66 -45zM1403 1511q11 -16 0 -37l-528 -934v-1l336 -615q11 -20 1 -37q-10 -15 -32 -15h-239q-42 0 -66 45l-339 622q18 32 531 942 q25 45 64 45h241q22 0 31 -15z" />
+<glyph unicode="&#xf169;" d="M685 771q0 1 -126 222q-21 34 -52 34h-184q-18 0 -26 -11q-7 -12 1 -29l125 -216v-1l-196 -346q-9 -14 0 -28q8 -13 24 -13h185q31 0 50 36zM1309 1268q-7 12 -24 12h-187q-30 0 -49 -35l-411 -729q1 -2 262 -481q20 -35 52 -35h184q18 0 25 12q8 13 -1 28l-260 476v1 l409 723q8 16 0 28zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf16a;" horiz-adv-x="1792" d="M1280 640q0 37 -30 54l-512 320q-31 20 -65 2q-33 -18 -33 -56v-640q0 -38 33 -56q16 -8 31 -8q20 0 34 10l512 320q30 17 30 54zM1792 640q0 -96 -1 -150t-8.5 -136.5t-22.5 -147.5q-16 -73 -69 -123t-124 -58q-222 -25 -671 -25t-671 25q-71 8 -124.5 58t-69.5 123 q-14 65 -21.5 147.5t-8.5 136.5t-1 150t1 150t8.5 136.5t22.5 147.5q16 73 69 123t124 58q222 25 671 25t671 -25q71 -8 124.5 -58t69.5 -123q14 -65 21.5 -147.5t8.5 -136.5t1 -150z" />
+<glyph unicode="&#xf16b;" horiz-adv-x="1792" d="M402 829l494 -305l-342 -285l-490 319zM1388 274v-108l-490 -293v-1l-1 1l-1 -1v1l-489 293v108l147 -96l342 284v2l1 -1l1 1v-2l343 -284zM554 1418l342 -285l-494 -304l-338 270zM1390 829l338 -271l-489 -319l-343 285zM1239 1418l489 -319l-338 -270l-494 304z" />
+<glyph unicode="&#xf16c;" d="M1289 -96h-1118v480h-160v-640h1438v640h-160v-480zM347 428l33 157l783 -165l-33 -156zM450 802l67 146l725 -339l-67 -145zM651 1158l102 123l614 -513l-102 -123zM1048 1536l477 -641l-128 -96l-477 641zM330 65v159h800v-159h-800z" />
+<glyph unicode="&#xf16d;" d="M1362 110v648h-135q20 -63 20 -131q0 -126 -64 -232.5t-174 -168.5t-240 -62q-197 0 -337 135.5t-140 327.5q0 68 20 131h-141v-648q0 -26 17.5 -43.5t43.5 -17.5h1069q25 0 43 17.5t18 43.5zM1078 643q0 124 -90.5 211.5t-218.5 87.5q-127 0 -217.5 -87.5t-90.5 -211.5 t90.5 -211.5t217.5 -87.5q128 0 218.5 87.5t90.5 211.5zM1362 1003v165q0 28 -20 48.5t-49 20.5h-174q-29 0 -49 -20.5t-20 -48.5v-165q0 -29 20 -49t49 -20h174q29 0 49 20t20 49zM1536 1211v-1142q0 -81 -58 -139t-139 -58h-1142q-81 0 -139 58t-58 139v1142q0 81 58 139 t139 58h1142q81 0 139 -58t58 -139z" />
+<glyph unicode="&#xf16e;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM698 640q0 88 -62 150t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150zM1262 640q0 88 -62 150 t-150 62t-150 -62t-62 -150t62 -150t150 -62t150 62t62 150z" />
+<glyph unicode="&#xf170;" d="M768 914l201 -306h-402zM1133 384h94l-459 691l-459 -691h94l104 160h522zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf171;" horiz-adv-x="1408" d="M815 677q8 -63 -50.5 -101t-111.5 -6q-39 17 -53.5 58t-0.5 82t52 58q36 18 72.5 12t64 -35.5t27.5 -67.5zM926 698q-14 107 -113 164t-197 13q-63 -28 -100.5 -88.5t-34.5 -129.5q4 -91 77.5 -155t165.5 -56q91 8 152 84t50 168zM1165 1240q-20 27 -56 44.5t-58 22 t-71 12.5q-291 47 -566 -2q-43 -7 -66 -12t-55 -22t-50 -43q30 -28 76 -45.5t73.5 -22t87.5 -11.5q228 -29 448 -1q63 8 89.5 12t72.5 21.5t75 46.5zM1222 205q-8 -26 -15.5 -76.5t-14 -84t-28.5 -70t-58 -56.5q-86 -48 -189.5 -71.5t-202 -22t-201.5 18.5q-46 8 -81.5 18 t-76.5 27t-73 43.5t-52 61.5q-25 96 -57 292l6 16l18 9q223 -148 506.5 -148t507.5 148q21 -6 24 -23t-5 -45t-8 -37zM1403 1166q-26 -167 -111 -655q-5 -30 -27 -56t-43.5 -40t-54.5 -31q-252 -126 -610 -88q-248 27 -394 139q-15 12 -25.5 26.5t-17 35t-9 34t-6 39.5 t-5.5 35q-9 50 -26.5 150t-28 161.5t-23.5 147.5t-22 158q3 26 17.5 48.5t31.5 37.5t45 30t46 22.5t48 18.5q125 46 313 64q379 37 676 -50q155 -46 215 -122q16 -20 16.5 -51t-5.5 -54z" />
+<glyph unicode="&#xf172;" d="M848 666q0 43 -41 66t-77 1q-43 -20 -42.5 -72.5t43.5 -70.5q39 -23 81 4t36 72zM928 682q8 -66 -36 -121t-110 -61t-119 40t-56 113q-2 49 25.5 93t72.5 64q70 31 141.5 -10t81.5 -118zM1100 1073q-20 -21 -53.5 -34t-53 -16t-63.5 -8q-155 -20 -324 0q-44 6 -63 9.5 t-52.5 16t-54.5 32.5q13 19 36 31t40 15.5t47 8.5q198 35 408 1q33 -5 51 -8.5t43 -16t39 -31.5zM1142 327q0 7 5.5 26.5t3 32t-17.5 16.5q-161 -106 -365 -106t-366 106l-12 -6l-5 -12q26 -154 41 -210q47 -81 204 -108q249 -46 428 53q34 19 49 51.5t22.5 85.5t12.5 71z M1272 1020q9 53 -8 75q-43 55 -155 88q-216 63 -487 36q-132 -12 -226 -46q-38 -15 -59.5 -25t-47 -34t-29.5 -54q8 -68 19 -138t29 -171t24 -137q1 -5 5 -31t7 -36t12 -27t22 -28q105 -80 284 -100q259 -28 440 63q24 13 39.5 23t31 29t19.5 40q48 267 80 473zM1536 1120 v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf173;" horiz-adv-x="1024" d="M944 207l80 -237q-23 -35 -111 -66t-177 -32q-104 -2 -190.5 26t-142.5 74t-95 106t-55.5 120t-16.5 118v544h-168v215q72 26 129 69.5t91 90t58 102t34 99t15 88.5q1 5 4.5 8.5t7.5 3.5h244v-424h333v-252h-334v-518q0 -30 6.5 -56t22.5 -52.5t49.5 -41.5t81.5 -14 q78 2 134 29z" />
+<glyph unicode="&#xf174;" d="M1136 75l-62 183q-44 -22 -103 -22q-36 -1 -62 10.5t-38.5 31.5t-17.5 40.5t-5 43.5v398h257v194h-256v326h-188q-8 0 -9 -10q-5 -44 -17.5 -87t-39 -95t-77 -95t-118.5 -68v-165h130v-418q0 -57 21.5 -115t65 -111t121 -85.5t176.5 -30.5q69 1 136.5 25t85.5 50z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf175;" horiz-adv-x="768" d="M765 237q8 -19 -5 -35l-350 -384q-10 -10 -23 -10q-14 0 -24 10l-355 384q-13 16 -5 35q9 19 29 19h224v1248q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-1248h224q21 0 29 -19z" />
+<glyph unicode="&#xf176;" horiz-adv-x="768" d="M765 1043q-9 -19 -29 -19h-224v-1248q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v1248h-224q-21 0 -29 19t5 35l350 384q10 10 23 10q14 0 24 -10l355 -384q13 -16 5 -35z" />
+<glyph unicode="&#xf177;" horiz-adv-x="1792" d="M1792 736v-192q0 -14 -9 -23t-23 -9h-1248v-224q0 -21 -19 -29t-35 5l-384 350q-10 10 -10 23q0 14 10 24l384 354q16 14 35 6q19 -9 19 -29v-224h1248q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf178;" horiz-adv-x="1792" d="M1728 643q0 -14 -10 -24l-384 -354q-16 -14 -35 -6q-19 9 -19 29v224h-1248q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h1248v224q0 21 19 29t35 -5l384 -350q10 -10 10 -23z" />
+<glyph unicode="&#xf179;" horiz-adv-x="1408" d="M1393 321q-39 -125 -123 -250q-129 -196 -257 -196q-49 0 -140 32q-86 32 -151 32q-61 0 -142 -33q-81 -34 -132 -34q-152 0 -301 259q-147 261 -147 503q0 228 113 374q112 144 284 144q72 0 177 -30q104 -30 138 -30q45 0 143 34q102 34 173 34q119 0 213 -65 q52 -36 104 -100q-79 -67 -114 -118q-65 -94 -65 -207q0 -124 69 -223t158 -126zM1017 1494q0 -61 -29 -136q-30 -75 -93 -138q-54 -54 -108 -72q-37 -11 -104 -17q3 149 78 257q74 107 250 148q1 -3 2.5 -11t2.5 -11q0 -4 0.5 -10t0.5 -10z" />
+<glyph unicode="&#xf17a;" horiz-adv-x="1664" d="M682 530v-651l-682 94v557h682zM682 1273v-659h-682v565zM1664 530v-786l-907 125v661h907zM1664 1408v-794h-907v669z" />
+<glyph unicode="&#xf17b;" horiz-adv-x="1408" d="M493 1053q16 0 27.5 11.5t11.5 27.5t-11.5 27.5t-27.5 11.5t-27 -11.5t-11 -27.5t11 -27.5t27 -11.5zM915 1053q16 0 27 11.5t11 27.5t-11 27.5t-27 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27.5t27.5 -11.5zM103 869q42 0 72 -30t30 -72v-430q0 -43 -29.5 -73t-72.5 -30 t-73 30t-30 73v430q0 42 30 72t73 30zM1163 850v-666q0 -46 -32 -78t-77 -32h-75v-227q0 -43 -30 -73t-73 -30t-73 30t-30 73v227h-138v-227q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73l-1 227h-74q-46 0 -78 32t-32 78v666h918zM931 1255q107 -55 171 -153.5t64 -215.5 h-925q0 117 64 215.5t172 153.5l-71 131q-7 13 5 20q13 6 20 -6l72 -132q95 42 201 42t201 -42l72 132q7 12 20 6q12 -7 5 -20zM1408 767v-430q0 -43 -30 -73t-73 -30q-42 0 -72 30t-30 73v430q0 43 30 72.5t72 29.5q43 0 73 -29.5t30 -72.5z" />
+<glyph unicode="&#xf17c;" d="M663 1125q-11 -1 -15.5 -10.5t-8.5 -9.5q-5 -1 -5 5q0 12 19 15h10zM750 1111q-4 -1 -11.5 6.5t-17.5 4.5q24 11 32 -2q3 -6 -3 -9zM399 684q-4 1 -6 -3t-4.5 -12.5t-5.5 -13.5t-10 -13q-7 -10 -1 -12q4 -1 12.5 7t12.5 18q1 3 2 7t2 6t1.5 4.5t0.5 4v3t-1 2.5t-3 2z M1254 325q0 18 -55 42q4 15 7.5 27.5t5 26t3 21.5t0.5 22.5t-1 19.5t-3.5 22t-4 20.5t-5 25t-5.5 26.5q-10 48 -47 103t-72 75q24 -20 57 -83q87 -162 54 -278q-11 -40 -50 -42q-31 -4 -38.5 18.5t-8 83.5t-11.5 107q-9 39 -19.5 69t-19.5 45.5t-15.5 24.5t-13 15t-7.5 7 q-14 62 -31 103t-29.5 56t-23.5 33t-15 40q-4 21 6 53.5t4.5 49.5t-44.5 25q-15 3 -44.5 18t-35.5 16q-8 1 -11 26t8 51t36 27q37 3 51 -30t4 -58q-11 -19 -2 -26.5t30 -0.5q13 4 13 36v37q-5 30 -13.5 50t-21 30.5t-23.5 15t-27 7.5q-107 -8 -89 -134q0 -15 -1 -15 q-9 9 -29.5 10.5t-33 -0.5t-15.5 5q1 57 -16 90t-45 34q-27 1 -41.5 -27.5t-16.5 -59.5q-1 -15 3.5 -37t13 -37.5t15.5 -13.5q10 3 16 14q4 9 -7 8q-7 0 -15.5 14.5t-9.5 33.5q-1 22 9 37t34 14q17 0 27 -21t9.5 -39t-1.5 -22q-22 -15 -31 -29q-8 -12 -27.5 -23.5 t-20.5 -12.5q-13 -14 -15.5 -27t7.5 -18q14 -8 25 -19.5t16 -19t18.5 -13t35.5 -6.5q47 -2 102 15q2 1 23 7t34.5 10.5t29.5 13t21 17.5q9 14 20 8q5 -3 6.5 -8.5t-3 -12t-16.5 -9.5q-20 -6 -56.5 -21.5t-45.5 -19.5q-44 -19 -70 -23q-25 -5 -79 2q-10 2 -9 -2t17 -19 q25 -23 67 -22q17 1 36 7t36 14t33.5 17.5t30 17t24.5 12t17.5 2.5t8.5 -11q0 -2 -1 -4.5t-4 -5t-6 -4.5t-8.5 -5t-9 -4.5t-10 -5t-9.5 -4.5q-28 -14 -67.5 -44t-66.5 -43t-49 -1q-21 11 -63 73q-22 31 -25 22q-1 -3 -1 -10q0 -25 -15 -56.5t-29.5 -55.5t-21 -58t11.5 -63 q-23 -6 -62.5 -90t-47.5 -141q-2 -18 -1.5 -69t-5.5 -59q-8 -24 -29 -3q-32 31 -36 94q-2 28 4 56q4 19 -1 18l-4 -5q-36 -65 10 -166q5 -12 25 -28t24 -20q20 -23 104 -90.5t93 -76.5q16 -15 17.5 -38t-14 -43t-45.5 -23q8 -15 29 -44.5t28 -54t7 -70.5q46 24 7 92 q-4 8 -10.5 16t-9.5 12t-2 6q3 5 13 9.5t20 -2.5q46 -52 166 -36q133 15 177 87q23 38 34 30q12 -6 10 -52q-1 -25 -23 -92q-9 -23 -6 -37.5t24 -15.5q3 19 14.5 77t13.5 90q2 21 -6.5 73.5t-7.5 97t23 70.5q15 18 51 18q1 37 34.5 53t72.5 10.5t60 -22.5zM626 1152 q3 17 -2.5 30t-11.5 15q-9 2 -9 -7q2 -5 5 -6q10 0 7 -15q-3 -20 8 -20q3 0 3 3zM1045 955q-2 8 -6.5 11.5t-13 5t-14.5 5.5q-5 3 -9.5 8t-7 8t-5.5 6.5t-4 4t-4 -1.5q-14 -16 7 -43.5t39 -31.5q9 -1 14.5 8t3.5 20zM867 1168q0 11 -5 19.5t-11 12.5t-9 3q-14 -1 -7 -7l4 -2 q14 -4 18 -31q0 -3 8 2zM921 1401q0 2 -2.5 5t-9 7t-9.5 6q-15 15 -24 15q-9 -1 -11.5 -7.5t-1 -13t-0.5 -12.5q-1 -4 -6 -10.5t-6 -9t3 -8.5q4 -3 8 0t11 9t15 9q1 1 9 1t15 2t9 7zM1486 60q20 -12 31 -24.5t12 -24t-2.5 -22.5t-15.5 -22t-23.5 -19.5t-30 -18.5 t-31.5 -16.5t-32 -15.5t-27 -13q-38 -19 -85.5 -56t-75.5 -64q-17 -16 -68 -19.5t-89 14.5q-18 9 -29.5 23.5t-16.5 25.5t-22 19.5t-47 9.5q-44 1 -130 1q-19 0 -57 -1.5t-58 -2.5q-44 -1 -79.5 -15t-53.5 -30t-43.5 -28.5t-53.5 -11.5q-29 1 -111 31t-146 43q-19 4 -51 9.5 t-50 9t-39.5 9.5t-33.5 14.5t-17 19.5q-10 23 7 66.5t18 54.5q1 16 -4 40t-10 42.5t-4.5 36.5t10.5 27q14 12 57 14t60 12q30 18 42 35t12 51q21 -73 -32 -106q-32 -20 -83 -15q-34 3 -43 -10q-13 -15 5 -57q2 -6 8 -18t8.5 -18t4.5 -17t1 -22q0 -15 -17 -49t-14 -48 q3 -17 37 -26q20 -6 84.5 -18.5t99.5 -20.5q24 -6 74 -22t82.5 -23t55.5 -4q43 6 64.5 28t23 48t-7.5 58.5t-19 52t-20 36.5q-121 190 -169 242q-68 74 -113 40q-11 -9 -15 15q-3 16 -2 38q1 29 10 52t24 47t22 42q8 21 26.5 72t29.5 78t30 61t39 54q110 143 124 195 q-12 112 -16 310q-2 90 24 151.5t106 104.5q39 21 104 21q53 1 106 -13.5t89 -41.5q57 -42 91.5 -121.5t29.5 -147.5q-5 -95 30 -214q34 -113 133 -218q55 -59 99.5 -163t59.5 -191q8 -49 5 -84.5t-12 -55.5t-20 -22q-10 -2 -23.5 -19t-27 -35.5t-40.5 -33.5t-61 -14 q-18 1 -31.5 5t-22.5 13.5t-13.5 15.5t-11.5 20.5t-9 19.5q-22 37 -41 30t-28 -49t7 -97q20 -70 1 -195q-10 -65 18 -100.5t73 -33t85 35.5q59 49 89.5 66.5t103.5 42.5q53 18 77 36.5t18.5 34.5t-25 28.5t-51.5 23.5q-33 11 -49.5 48t-15 72.5t15.5 47.5q1 -31 8 -56.5 t14.5 -40.5t20.5 -28.5t21 -19t21.5 -13t16.5 -9.5z" />
+<glyph unicode="&#xf17d;" d="M1024 36q-42 241 -140 498h-2l-2 -1q-16 -6 -43 -16.5t-101 -49t-137 -82t-131 -114.5t-103 -148l-15 11q184 -150 418 -150q132 0 256 52zM839 643q-21 49 -53 111q-311 -93 -673 -93q-1 -7 -1 -21q0 -124 44 -236.5t124 -201.5q50 89 123.5 166.5t142.5 124.5t130.5 81 t99.5 48l37 13q4 1 13 3.5t13 4.5zM732 855q-120 213 -244 378q-138 -65 -234 -186t-128 -272q302 0 606 80zM1416 536q-210 60 -409 29q87 -239 128 -469q111 75 185 189.5t96 250.5zM611 1277q-1 0 -2 -1q1 1 2 1zM1201 1132q-185 164 -433 164q-76 0 -155 -19 q131 -170 246 -382q69 26 130 60.5t96.5 61.5t65.5 57t37.5 40.5zM1424 647q-3 232 -149 410l-1 -1q-9 -12 -19 -24.5t-43.5 -44.5t-71 -60.5t-100 -65t-131.5 -64.5q25 -53 44 -95q2 -6 6.5 -17.5t7.5 -16.5q36 5 74.5 7t73.5 2t69 -1.5t64 -4t56.5 -5.5t48 -6.5t36.5 -6 t25 -4.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf17e;" d="M1173 473q0 50 -19.5 91.5t-48.5 68.5t-73 49t-82.5 34t-87.5 23l-104 24q-30 7 -44 10.5t-35 11.5t-30 16t-16.5 21t-7.5 30q0 77 144 77q43 0 77 -12t54 -28.5t38 -33.5t40 -29t48 -12q47 0 75.5 32t28.5 77q0 55 -56 99.5t-142 67.5t-182 23q-68 0 -132 -15.5 t-119.5 -47t-89 -87t-33.5 -128.5q0 -61 19 -106.5t56 -75.5t80 -48.5t103 -32.5l146 -36q90 -22 112 -36q32 -20 32 -60q0 -39 -40 -64.5t-105 -25.5q-51 0 -91.5 16t-65 38.5t-45.5 45t-46 38.5t-54 16q-50 0 -75.5 -30t-25.5 -75q0 -92 122 -157.5t291 -65.5 q73 0 140 18.5t122.5 53.5t88.5 93.5t33 131.5zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5q-130 0 -234 80q-77 -16 -150 -16q-143 0 -273.5 55.5t-225 150t-150 225t-55.5 273.5q0 73 16 150q-80 104 -80 234q0 159 112.5 271.5t271.5 112.5q130 0 234 -80 q77 16 150 16q143 0 273.5 -55.5t225 -150t150 -225t55.5 -273.5q0 -73 -16 -150q80 -104 80 -234z" />
+<glyph unicode="&#xf180;" horiz-adv-x="1280" d="M1000 1102l37 194q5 23 -9 40t-35 17h-712q-23 0 -38.5 -17t-15.5 -37v-1101q0 -7 6 -1l291 352q23 26 38 33.5t48 7.5h239q22 0 37 14.5t18 29.5q24 130 37 191q4 21 -11.5 40t-36.5 19h-294q-29 0 -48 19t-19 48v42q0 29 19 47.5t48 18.5h346q18 0 35 13.5t20 29.5z M1227 1324q-15 -73 -53.5 -266.5t-69.5 -350t-35 -173.5q-6 -22 -9 -32.5t-14 -32.5t-24.5 -33t-38.5 -21t-58 -10h-271q-13 0 -22 -10q-8 -9 -426 -494q-22 -25 -58.5 -28.5t-48.5 5.5q-55 22 -55 98v1410q0 55 38 102.5t120 47.5h888q95 0 127 -53t10 -159zM1227 1324 l-158 -790q4 17 35 173.5t69.5 350t53.5 266.5z" />
+<glyph unicode="&#xf181;" d="M704 192v1024q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-1024q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1376 576v640q0 14 -9 23t-23 9h-480q-14 0 -23 -9t-9 -23v-640q0 -14 9 -23t23 -9h480q14 0 23 9t9 23zM1536 1344v-1408q0 -26 -19 -45t-45 -19h-1408 q-26 0 -45 19t-19 45v1408q0 26 19 45t45 19h1408q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf182;" horiz-adv-x="1280" d="M1280 480q0 -40 -28 -68t-68 -28q-51 0 -80 43l-227 341h-45v-132l247 -411q9 -15 9 -33q0 -26 -19 -45t-45 -19h-192v-272q0 -46 -33 -79t-79 -33h-160q-46 0 -79 33t-33 79v272h-192q-26 0 -45 19t-19 45q0 18 9 33l247 411v132h-45l-227 -341q-29 -43 -80 -43 q-40 0 -68 28t-28 68q0 29 16 53l256 384q73 107 176 107h384q103 0 176 -107l256 -384q16 -24 16 -53zM864 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf183;" horiz-adv-x="1024" d="M1024 832v-416q0 -40 -28 -68t-68 -28t-68 28t-28 68v352h-64v-912q0 -46 -33 -79t-79 -33t-79 33t-33 79v464h-64v-464q0 -46 -33 -79t-79 -33t-79 33t-33 79v912h-64v-352q0 -40 -28 -68t-68 -28t-68 28t-28 68v416q0 80 56 136t136 56h640q80 0 136 -56t56 -136z M736 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf184;" d="M773 234l350 473q16 22 24.5 59t-6 85t-61.5 79q-40 26 -83 25.5t-73.5 -17.5t-54.5 -45q-36 -40 -96 -40q-59 0 -95 40q-24 28 -54.5 45t-73.5 17.5t-84 -25.5q-46 -31 -60.5 -79t-6 -85t24.5 -59zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf185;" horiz-adv-x="1792" d="M1472 640q0 117 -45.5 223.5t-123 184t-184 123t-223.5 45.5t-223.5 -45.5t-184 -123t-123 -184t-45.5 -223.5t45.5 -223.5t123 -184t184 -123t223.5 -45.5t223.5 45.5t184 123t123 184t45.5 223.5zM1748 363q-4 -15 -20 -20l-292 -96v-306q0 -16 -13 -26q-15 -10 -29 -4 l-292 94l-180 -248q-10 -13 -26 -13t-26 13l-180 248l-292 -94q-14 -6 -29 4q-13 10 -13 26v306l-292 96q-16 5 -20 20q-5 17 4 29l180 248l-180 248q-9 13 -4 29q4 15 20 20l292 96v306q0 16 13 26q15 10 29 4l292 -94l180 248q9 12 26 12t26 -12l180 -248l292 94 q14 6 29 -4q13 -10 13 -26v-306l292 -96q16 -5 20 -20q5 -16 -4 -29l-180 -248l180 -248q9 -12 4 -29z" />
+<glyph unicode="&#xf186;" d="M1262 233q-54 -9 -110 -9q-182 0 -337 90t-245 245t-90 337q0 192 104 357q-201 -60 -328.5 -229t-127.5 -384q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51q144 0 273.5 61.5t220.5 171.5zM1465 318q-94 -203 -283.5 -324.5t-413.5 -121.5q-156 0 -298 61 t-245 164t-164 245t-61 298q0 153 57.5 292.5t156 241.5t235.5 164.5t290 68.5q44 2 61 -39q18 -41 -15 -72q-86 -78 -131.5 -181.5t-45.5 -218.5q0 -148 73 -273t198 -198t273 -73q118 0 228 51q41 18 72 -13q14 -14 17.5 -34t-4.5 -38z" />
+<glyph unicode="&#xf187;" horiz-adv-x="1792" d="M1088 704q0 26 -19 45t-45 19h-256q-26 0 -45 -19t-19 -45t19 -45t45 -19h256q26 0 45 19t19 45zM1664 896v-960q0 -26 -19 -45t-45 -19h-1408q-26 0 -45 19t-19 45v960q0 26 19 45t45 19h1408q26 0 45 -19t19 -45zM1728 1344v-256q0 -26 -19 -45t-45 -19h-1536 q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h1536q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf188;" horiz-adv-x="1664" d="M1632 576q0 -26 -19 -45t-45 -19h-224q0 -171 -67 -290l208 -209q19 -19 19 -45t-19 -45q-18 -19 -45 -19t-45 19l-198 197q-5 -5 -15 -13t-42 -28.5t-65 -36.5t-82 -29t-97 -13v896h-128v-896q-51 0 -101.5 13.5t-87 33t-66 39t-43.5 32.5l-15 14l-183 -207 q-20 -21 -48 -21q-24 0 -43 16q-19 18 -20.5 44.5t15.5 46.5l202 227q-58 114 -58 274h-224q-26 0 -45 19t-19 45t19 45t45 19h224v294l-173 173q-19 19 -19 45t19 45t45 19t45 -19l173 -173h844l173 173q19 19 45 19t45 -19t19 -45t-19 -45l-173 -173v-294h224q26 0 45 -19 t19 -45zM1152 1152h-640q0 133 93.5 226.5t226.5 93.5t226.5 -93.5t93.5 -226.5z" />
+<glyph unicode="&#xf189;" horiz-adv-x="1920" d="M1917 1016q23 -64 -150 -294q-24 -32 -65 -85q-78 -100 -90 -131q-17 -41 14 -81q17 -21 81 -82h1l1 -1l1 -1l2 -2q141 -131 191 -221q3 -5 6.5 -12.5t7 -26.5t-0.5 -34t-25 -27.5t-59 -12.5l-256 -4q-24 -5 -56 5t-52 22l-20 12q-30 21 -70 64t-68.5 77.5t-61 58 t-56.5 15.5q-3 -1 -8 -3.5t-17 -14.5t-21.5 -29.5t-17 -52t-6.5 -77.5q0 -15 -3.5 -27.5t-7.5 -18.5l-4 -5q-18 -19 -53 -22h-115q-71 -4 -146 16.5t-131.5 53t-103 66t-70.5 57.5l-25 24q-10 10 -27.5 30t-71.5 91t-106 151t-122.5 211t-130.5 272q-6 16 -6 27t3 16l4 6 q15 19 57 19l274 2q12 -2 23 -6.5t16 -8.5l5 -3q16 -11 24 -32q20 -50 46 -103.5t41 -81.5l16 -29q29 -60 56 -104t48.5 -68.5t41.5 -38.5t34 -14t27 5q2 1 5 5t12 22t13.5 47t9.5 81t0 125q-2 40 -9 73t-14 46l-6 12q-25 34 -85 43q-13 2 5 24q17 19 38 30q53 26 239 24 q82 -1 135 -13q20 -5 33.5 -13.5t20.5 -24t10.5 -32t3.5 -45.5t-1 -55t-2.5 -70.5t-1.5 -82.5q0 -11 -1 -42t-0.5 -48t3.5 -40.5t11.5 -39t22.5 -24.5q8 -2 17 -4t26 11t38 34.5t52 67t68 107.5q60 104 107 225q4 10 10 17.5t11 10.5l4 3l5 2.5t13 3t20 0.5l288 2 q39 5 64 -2.5t31 -16.5z" />
+<glyph unicode="&#xf18a;" horiz-adv-x="1792" d="M675 252q21 34 11 69t-45 50q-34 14 -73 1t-60 -46q-22 -34 -13 -68.5t43 -50.5t74.5 -2.5t62.5 47.5zM769 373q8 13 3.5 26.5t-17.5 18.5q-14 5 -28.5 -0.5t-21.5 -18.5q-17 -31 13 -45q14 -5 29 0.5t22 18.5zM943 266q-45 -102 -158 -150t-224 -12 q-107 34 -147.5 126.5t6.5 187.5q47 93 151.5 139t210.5 19q111 -29 158.5 -119.5t2.5 -190.5zM1255 426q-9 96 -89 170t-208.5 109t-274.5 21q-223 -23 -369.5 -141.5t-132.5 -264.5q9 -96 89 -170t208.5 -109t274.5 -21q223 23 369.5 141.5t132.5 264.5zM1563 422 q0 -68 -37 -139.5t-109 -137t-168.5 -117.5t-226 -83t-270.5 -31t-275 33.5t-240.5 93t-171.5 151t-65 199.5q0 115 69.5 245t197.5 258q169 169 341.5 236t246.5 -7q65 -64 20 -209q-4 -14 -1 -20t10 -7t14.5 0.5t13.5 3.5l6 2q139 59 246 59t153 -61q45 -63 0 -178 q-2 -13 -4.5 -20t4.5 -12.5t12 -7.5t17 -6q57 -18 103 -47t80 -81.5t34 -116.5zM1489 1046q42 -47 54.5 -108.5t-6.5 -117.5q-8 -23 -29.5 -34t-44.5 -4q-23 8 -34 29.5t-4 44.5q20 63 -24 111t-107 35q-24 -5 -45 8t-25 37q-5 24 8 44.5t37 25.5q60 13 119 -5.5t101 -65.5z M1670 1209q87 -96 112.5 -222.5t-13.5 -241.5q-9 -27 -34 -40t-52 -4t-40 34t-5 52q28 82 10 172t-80 158q-62 69 -148 95.5t-173 8.5q-28 -6 -52 9.5t-30 43.5t9.5 51.5t43.5 29.5q123 26 244 -11.5t208 -134.5z" />
+<glyph unicode="&#xf18b;" d="M1133 -34q-171 -94 -368 -94q-196 0 -367 94q138 87 235.5 211t131.5 268q35 -144 132.5 -268t235.5 -211zM638 1394v-485q0 -252 -126.5 -459.5t-330.5 -306.5q-181 215 -181 495q0 187 83.5 349.5t229.5 269.5t325 137zM1536 638q0 -280 -181 -495 q-204 99 -330.5 306.5t-126.5 459.5v485q179 -30 325 -137t229.5 -269.5t83.5 -349.5z" />
+<glyph unicode="&#xf18c;" horiz-adv-x="1408" d="M1402 433q-32 -80 -76 -138t-91 -88.5t-99 -46.5t-101.5 -14.5t-96.5 8.5t-86.5 22t-69.5 27.5t-46 22.5l-17 10q-113 -228 -289.5 -359.5t-384.5 -132.5q-19 0 -32 13t-13 32t13 31.5t32 12.5q173 1 322.5 107.5t251.5 294.5q-36 -14 -72 -23t-83 -13t-91 2.5t-93 28.5 t-92 59t-84.5 100t-74.5 146q114 47 214 57t167.5 -7.5t124.5 -56.5t88.5 -77t56.5 -82q53 131 79 291q-7 -1 -18 -2.5t-46.5 -2.5t-69.5 0.5t-81.5 10t-88.5 23t-84 42.5t-75 65t-54.5 94.5t-28.5 127.5q70 28 133.5 36.5t112.5 -1t92 -30t73.5 -50t56 -61t42 -63t27.5 -56 t16 -39.5l4 -16q12 122 12 195q-8 6 -21.5 16t-49 44.5t-63.5 71.5t-54 93t-33 112.5t12 127t70 138.5q73 -25 127.5 -61.5t84.5 -76.5t48 -85t20.5 -89t-0.5 -85.5t-13 -76.5t-19 -62t-17 -42l-7 -15q1 -5 1 -50.5t-1 -71.5q3 7 10 18.5t30.5 43t50.5 58t71 55.5t91.5 44.5 t112 14.5t132.5 -24q-2 -78 -21.5 -141.5t-50 -104.5t-69.5 -71.5t-81.5 -45.5t-84.5 -24t-80 -9.5t-67.5 1t-46.5 4.5l-17 3q-23 -147 -73 -283q6 7 18 18.5t49.5 41t77.5 52.5t99.5 42t117.5 20t129 -23.5t137 -77.5z" />
+<glyph unicode="&#xf18d;" horiz-adv-x="1280" d="M1259 283v-66q0 -85 -57.5 -144.5t-138.5 -59.5h-57l-260 -269v269h-529q-81 0 -138.5 59.5t-57.5 144.5v66h1238zM1259 609v-255h-1238v255h1238zM1259 937v-255h-1238v255h1238zM1259 1077v-67h-1238v67q0 84 57.5 143.5t138.5 59.5h846q81 0 138.5 -59.5t57.5 -143.5z " />
+<glyph unicode="&#xf18e;" d="M1152 640q0 -14 -9 -23l-320 -320q-9 -9 -23 -9q-13 0 -22.5 9.5t-9.5 22.5v192h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v192q0 14 9 23t23 9q12 0 24 -10l319 -319q9 -9 9 -23zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf190;" d="M1152 736v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-192q0 -14 -9 -23t-23 -9q-12 0 -24 10l-319 319q-9 9 -9 23t9 23l320 320q9 9 23 9q13 0 22.5 -9.5t9.5 -22.5v-192h352q13 0 22.5 -9.5t9.5 -22.5zM1312 640q0 148 -73 273t-198 198t-273 73t-273 -73t-198 -198 t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf191;" d="M1024 960v-640q0 -26 -19 -45t-45 -19q-20 0 -37 12l-448 320q-27 19 -27 52t27 52l448 320q17 12 37 12q26 0 45 -19t19 -45zM1280 160v960q0 13 -9.5 22.5t-22.5 9.5h-960q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h960q13 0 22.5 9.5t9.5 22.5z M1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf192;" d="M1024 640q0 -106 -75 -181t-181 -75t-181 75t-75 181t75 181t181 75t181 -75t75 -181zM768 1184q-148 0 -273 -73t-198 -198t-73 -273t73 -273t198 -198t273 -73t273 73t198 198t73 273t-73 273t-198 198t-273 73zM1536 640q0 -209 -103 -385.5t-279.5 -279.5 t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf193;" horiz-adv-x="1664" d="M1023 349l102 -204q-58 -179 -210 -290t-339 -111q-156 0 -288.5 77.5t-210 210t-77.5 288.5q0 181 104.5 330t274.5 211l17 -131q-122 -54 -195 -165.5t-73 -244.5q0 -185 131.5 -316.5t316.5 -131.5q126 0 232.5 65t165 175.5t49.5 236.5zM1571 249l58 -114l-256 -128 q-13 -7 -29 -7q-40 0 -57 35l-239 477h-472q-24 0 -42.5 16.5t-21.5 40.5l-96 779q-2 16 6 42q14 51 57 82.5t97 31.5q66 0 113 -47t47 -113q0 -69 -52 -117.5t-120 -41.5l37 -289h423v-128h-407l16 -128h455q40 0 57 -35l228 -455z" />
+<glyph unicode="&#xf194;" d="M1292 898q10 216 -161 222q-231 8 -312 -261q44 19 82 19q85 0 74 -96q-4 -57 -74 -167t-105 -110q-43 0 -82 169q-13 54 -45 255q-30 189 -160 177q-59 -7 -164 -100l-81 -72l-81 -72l52 -67q76 52 87 52q57 0 107 -179q15 -55 45 -164.5t45 -164.5q68 -179 164 -179 q157 0 383 294q220 283 226 444zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf195;" horiz-adv-x="1152" d="M1152 704q0 -191 -94.5 -353t-256.5 -256.5t-353 -94.5h-160q-14 0 -23 9t-9 23v611l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v93l-215 -66q-3 -1 -9 -1q-10 0 -19 6q-13 10 -13 26v128q0 23 23 31l233 71v250q0 14 9 23t23 9h160 q14 0 23 -9t9 -23v-181l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-93l375 116q15 5 28 -5t13 -26v-128q0 -23 -23 -31l-393 -121v-487q188 13 318 151t130 328q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf196;" horiz-adv-x="1408" d="M1152 736v-64q0 -14 -9 -23t-23 -9h-352v-352q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v352h-352q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h352v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-352h352q14 0 23 -9t9 -23zM1280 288v832q0 66 -47 113t-113 47h-832 q-66 0 -113 -47t-47 -113v-832q0 -66 47 -113t113 -47h832q66 0 113 47t47 113zM1408 1120v-832q0 -119 -84.5 -203.5t-203.5 -84.5h-832q-119 0 -203.5 84.5t-84.5 203.5v832q0 119 84.5 203.5t203.5 84.5h832q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf197;" horiz-adv-x="2176" d="M620 416q-110 -64 -268 -64h-128v64h-64q-13 0 -22.5 23.5t-9.5 56.5q0 24 7 49q-58 2 -96.5 10.5t-38.5 20.5t38.5 20.5t96.5 10.5q-7 25 -7 49q0 33 9.5 56.5t22.5 23.5h64v64h128q158 0 268 -64h1113q42 -7 106.5 -18t80.5 -14q89 -15 150 -40.5t83.5 -47.5t22.5 -40 t-22.5 -40t-83.5 -47.5t-150 -40.5q-16 -3 -80.5 -14t-106.5 -18h-1113zM1739 668q53 -36 53 -92t-53 -92l81 -30q68 48 68 122t-68 122zM625 400h1015q-217 -38 -456 -80q-57 0 -113 -24t-83 -48l-28 -24l-288 -288q-26 -26 -70.5 -45t-89.5 -19h-96l-93 464h29 q157 0 273 64zM352 816h-29l93 464h96q46 0 90 -19t70 -45l288 -288q4 -4 11 -10.5t30.5 -23t48.5 -29t61.5 -23t72.5 -10.5l456 -80h-1015q-116 64 -273 64z" />
+<glyph unicode="&#xf198;" horiz-adv-x="1664" d="M1519 760q62 0 103.5 -40.5t41.5 -101.5q0 -97 -93 -130l-172 -59l56 -167q7 -21 7 -47q0 -59 -42 -102t-101 -43q-47 0 -85.5 27t-53.5 72l-55 165l-310 -106l55 -164q8 -24 8 -47q0 -59 -42 -102t-102 -43q-47 0 -85 27t-53 72l-55 163l-153 -53q-29 -9 -50 -9 q-61 0 -101.5 40t-40.5 101q0 47 27.5 85t71.5 53l156 53l-105 313l-156 -54q-26 -8 -48 -8q-60 0 -101 40.5t-41 100.5q0 47 27.5 85t71.5 53l157 53l-53 159q-8 24 -8 47q0 60 42 102.5t102 42.5q47 0 85 -27t53 -72l54 -160l310 105l-54 160q-8 24 -8 47q0 59 42.5 102 t101.5 43q47 0 85.5 -27.5t53.5 -71.5l53 -161l162 55q21 6 43 6q60 0 102.5 -39.5t42.5 -98.5q0 -45 -30 -81.5t-74 -51.5l-157 -54l105 -316l164 56q24 8 46 8zM725 498l310 105l-105 315l-310 -107z" />
+<glyph unicode="&#xf199;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM1280 352v436q-31 -35 -64 -55q-34 -22 -132.5 -85t-151.5 -99q-98 -69 -164 -69v0v0q-66 0 -164 69 q-46 32 -141.5 92.5t-142.5 92.5q-12 8 -33 27t-31 27v-436q0 -40 28 -68t68 -28h832q40 0 68 28t28 68zM1280 925q0 41 -27.5 70t-68.5 29h-832q-40 0 -68 -28t-28 -68q0 -37 30.5 -76.5t67.5 -64.5q47 -32 137.5 -89t129.5 -83q3 -2 17 -11.5t21 -14t21 -13t23.5 -13 t21.5 -9.5t22.5 -7.5t20.5 -2.5t20.5 2.5t22.5 7.5t21.5 9.5t23.5 13t21 13t21 14t17 11.5l267 174q35 23 66.5 62.5t31.5 73.5z" />
+<glyph unicode="&#xf19a;" horiz-adv-x="1792" d="M127 640q0 163 67 313l367 -1005q-196 95 -315 281t-119 411zM1415 679q0 -19 -2.5 -38.5t-10 -49.5t-11.5 -44t-17.5 -59t-17.5 -58l-76 -256l-278 826q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-75 1 -202 10q-12 1 -20.5 -5t-11.5 -15t-1.5 -18.5t9 -16.5 t19.5 -8l80 -8l120 -328l-168 -504l-280 832q46 3 88 8q19 2 26 18.5t-2.5 31t-28.5 13.5l-205 -10q-7 0 -23 0.5t-26 0.5q105 160 274.5 253.5t367.5 93.5q147 0 280.5 -53t238.5 -149h-10q-55 0 -92 -40.5t-37 -95.5q0 -12 2 -24t4 -21.5t8 -23t9 -21t12 -22.5t12.5 -21 t14.5 -24t14 -23q63 -107 63 -212zM909 573l237 -647q1 -6 5 -11q-126 -44 -255 -44q-112 0 -217 32zM1570 1009q95 -174 95 -369q0 -209 -104 -385.5t-279 -278.5l235 678q59 169 59 276q0 42 -6 79zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286 t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 -215q173 0 331.5 68t273 182.5t182.5 273t68 331.5t-68 331.5t-182.5 273t-273 182.5t-331.5 68t-331.5 -68t-273 -182.5t-182.5 -273t-68 -331.5t68 -331.5t182.5 -273 t273 -182.5t331.5 -68z" />
+<glyph unicode="&#xf19b;" horiz-adv-x="1792" d="M1086 1536v-1536l-272 -128q-228 20 -414 102t-293 208.5t-107 272.5q0 140 100.5 263.5t275 205.5t391.5 108v-172q-217 -38 -356.5 -150t-139.5 -255q0 -152 154.5 -267t388.5 -145v1360zM1755 954l37 -390l-525 114l147 83q-119 70 -280 99v172q277 -33 481 -157z" />
+<glyph unicode="&#xf19c;" horiz-adv-x="2048" d="M960 1536l960 -384v-128h-128q0 -26 -20.5 -45t-48.5 -19h-1526q-28 0 -48.5 19t-20.5 45h-128v128zM256 896h256v-768h128v768h256v-768h128v768h256v-768h128v768h256v-768h59q28 0 48.5 -19t20.5 -45v-64h-1664v64q0 26 20.5 45t48.5 19h59v768zM1851 -64 q28 0 48.5 -19t20.5 -45v-128h-1920v128q0 26 20.5 45t48.5 19h1782z" />
+<glyph unicode="&#xf19d;" horiz-adv-x="2304" d="M1774 700l18 -316q4 -69 -82 -128t-235 -93.5t-323 -34.5t-323 34.5t-235 93.5t-82 128l18 316l574 -181q22 -7 48 -7t48 7zM2304 1024q0 -23 -22 -31l-1120 -352q-4 -1 -10 -1t-10 1l-652 206q-43 -34 -71 -111.5t-34 -178.5q63 -36 63 -109q0 -69 -58 -107l58 -433 q2 -14 -8 -25q-9 -11 -24 -11h-192q-15 0 -24 11q-10 11 -8 25l58 433q-58 38 -58 107q0 73 65 111q11 207 98 330l-333 104q-22 8 -22 31t22 31l1120 352q4 1 10 1t10 -1l1120 -352q22 -8 22 -31z" />
+<glyph unicode="&#xf19e;" d="M859 579l13 -707q-62 11 -105 11q-41 0 -105 -11l13 707q-40 69 -168.5 295.5t-216.5 374.5t-181 287q58 -15 108 -15q43 0 111 15q63 -111 133.5 -229.5t167 -276.5t138.5 -227q37 61 109.5 177.5t117.5 190t105 176t107 189.5q54 -14 107 -14q56 0 114 14v0 q-28 -39 -60 -88.5t-49.5 -78.5t-56.5 -96t-49 -84q-146 -248 -353 -610z" />
+<glyph unicode="&#xf1a0;" d="M768 750h725q12 -67 12 -128q0 -217 -91 -387.5t-259.5 -266.5t-386.5 -96q-157 0 -299 60.5t-245 163.5t-163.5 245t-60.5 299t60.5 299t163.5 245t245 163.5t299 60.5q300 0 515 -201l-209 -201q-123 119 -306 119q-129 0 -238.5 -65t-173.5 -176.5t-64 -243.5 t64 -243.5t173.5 -176.5t238.5 -65q87 0 160 24t120 60t82 82t51.5 87t22.5 78h-436v264z" />
+<glyph unicode="&#xf1a1;" horiz-adv-x="1792" d="M1095 369q16 -16 0 -31q-62 -62 -199 -62t-199 62q-16 15 0 31q6 6 15 6t15 -6q48 -49 169 -49q120 0 169 49q6 6 15 6t15 -6zM788 550q0 -37 -26 -63t-63 -26t-63.5 26t-26.5 63q0 38 26.5 64t63.5 26t63 -26.5t26 -63.5zM1183 550q0 -37 -26.5 -63t-63.5 -26t-63 26 t-26 63t26 63.5t63 26.5t63.5 -26t26.5 -64zM1434 670q0 49 -35 84t-85 35t-86 -36q-130 90 -311 96l63 283l200 -45q0 -37 26 -63t63 -26t63.5 26.5t26.5 63.5t-26.5 63.5t-63.5 26.5q-54 0 -80 -50l-221 49q-19 5 -25 -16l-69 -312q-180 -7 -309 -97q-35 37 -87 37 q-50 0 -85 -35t-35 -84q0 -35 18.5 -64t49.5 -44q-6 -27 -6 -56q0 -142 140 -243t337 -101q198 0 338 101t140 243q0 32 -7 57q30 15 48 43.5t18 63.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191 t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf1a2;" d="M939 407q13 -13 0 -26q-53 -53 -171 -53t-171 53q-13 13 0 26q5 6 13 6t13 -6q42 -42 145 -42t145 42q5 6 13 6t13 -6zM676 563q0 -31 -23 -54t-54 -23t-54 23t-23 54q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1014 563q0 -31 -23 -54t-54 -23t-54 23t-23 54 q0 32 22.5 54.5t54.5 22.5t54.5 -22.5t22.5 -54.5zM1229 666q0 42 -30 72t-73 30q-42 0 -73 -31q-113 78 -267 82l54 243l171 -39q1 -32 23.5 -54t53.5 -22q32 0 54.5 22.5t22.5 54.5t-22.5 54.5t-54.5 22.5q-48 0 -69 -43l-189 42q-17 5 -21 -13l-60 -268q-154 -6 -265 -83 q-30 32 -74 32q-43 0 -73 -30t-30 -72q0 -30 16 -55t42 -38q-5 -25 -5 -48q0 -122 120 -208.5t289 -86.5q170 0 290 86.5t120 208.5q0 25 -6 49q25 13 40.5 37.5t15.5 54.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1a3;" d="M866 697l90 27v62q0 79 -58 135t-138 56t-138 -55.5t-58 -134.5v-283q0 -20 -14 -33.5t-33 -13.5t-32.5 13.5t-13.5 33.5v120h-151v-122q0 -82 57.5 -139t139.5 -57q81 0 138.5 56.5t57.5 136.5v280q0 19 13.5 33t33.5 14q19 0 32.5 -14t13.5 -33v-54zM1199 502v122h-150 v-126q0 -20 -13.5 -33.5t-33.5 -13.5q-19 0 -32.5 14t-13.5 33v123l-90 -26l-60 28v-123q0 -80 58 -137t139 -57t138.5 57t57.5 139zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103 t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1a4;" horiz-adv-x="1920" d="M1062 824v118q0 42 -30 72t-72 30t-72 -30t-30 -72v-612q0 -175 -126 -299t-303 -124q-178 0 -303.5 125.5t-125.5 303.5v266h328v-262q0 -43 30 -72.5t72 -29.5t72 29.5t30 72.5v620q0 171 126.5 292t301.5 121q176 0 302 -122t126 -294v-136l-195 -58zM1592 602h328 v-266q0 -178 -125.5 -303.5t-303.5 -125.5q-177 0 -303 124.5t-126 300.5v268l131 -61l195 58v-270q0 -42 30 -71.5t72 -29.5t72 29.5t30 71.5v275z" />
+<glyph unicode="&#xf1a5;" d="M1472 160v480h-704v704h-480q-93 0 -158.5 -65.5t-65.5 -158.5v-480h704v-704h480q93 0 158.5 65.5t65.5 158.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z" />
+<glyph unicode="&#xf1a6;" horiz-adv-x="2048" d="M328 1254h204v-983h-532v697h328v286zM328 435v369h-123v-369h123zM614 968v-697h205v697h-205zM614 1254v-204h205v204h-205zM901 968h533v-942h-533v163h328v82h-328v697zM1229 435v369h-123v-369h123zM1516 968h532v-942h-532v163h327v82h-327v697zM1843 435v369h-123 v-369h123z" />
+<glyph unicode="&#xf1a7;" d="M1046 516q0 -64 -38 -109t-91 -45q-43 0 -70 15v277q28 17 70 17q53 0 91 -45.5t38 -109.5zM703 944q0 -64 -38 -109.5t-91 -45.5q-43 0 -70 15v277q28 17 70 17q53 0 91 -45t38 -109zM1265 513q0 134 -88 229t-213 95q-20 0 -39 -3q-23 -78 -78 -136q-87 -95 -211 -101 v-636l211 41v206q51 -19 117 -19q125 0 213 95t88 229zM922 940q0 134 -88.5 229t-213.5 95q-74 0 -141 -36h-186v-840l211 41v206q55 -19 116 -19q125 0 213.5 95t88.5 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960 q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1a8;" horiz-adv-x="2038" d="M1222 607q75 3 143.5 -20.5t118 -58.5t101 -94.5t84 -108t75.5 -120.5q33 -56 78.5 -109t75.5 -80.5t99 -88.5q-48 -30 -108.5 -57.5t-138.5 -59t-114 -47.5q-44 37 -74 115t-43.5 164.5t-33 180.5t-42.5 168.5t-72.5 123t-122.5 48.5l-10 -2l-6 -4q4 -5 13 -14 q6 -5 28 -23.5t25.5 -22t19 -18t18 -20.5t11.5 -21t10.5 -27.5t4.5 -31t4 -40.5l1 -33q1 -26 -2.5 -57.5t-7.5 -52t-12.5 -58.5t-11.5 -53q-35 1 -101 -9.5t-98 -10.5q-39 0 -72 10q-2 16 -2 47q0 74 3 96q2 13 31.5 41.5t57 59t26.5 51.5q-24 2 -43 -24 q-36 -53 -111.5 -99.5t-136.5 -46.5q-25 0 -75.5 63t-106.5 139.5t-84 96.5q-6 4 -27 30q-482 -112 -513 -112q-16 0 -28 11t-12 27q0 15 8.5 26.5t22.5 14.5l486 106q-8 14 -8 25t5.5 17.5t16 11.5t20 7t23 4.5t18.5 4.5q4 1 15.5 7.5t17.5 6.5q15 0 28 -16t20 -33 q163 37 172 37q17 0 29.5 -11t12.5 -28q0 -15 -8.5 -26t-23.5 -14l-182 -40l-1 -16q-1 -26 81.5 -117.5t104.5 -91.5q47 0 119 80t72 129q0 36 -23.5 53t-51 18.5t-51 11.5t-23.5 34q0 16 10 34l-68 19q43 44 43 117q0 26 -5 58q82 16 144 16q44 0 71.5 -1.5t48.5 -8.5 t31 -13.5t20.5 -24.5t15.5 -33.5t17 -47.5t24 -60l50 25q-3 -40 -23 -60t-42.5 -21t-40 -6.5t-16.5 -20.5zM1282 842q-5 5 -13.5 15.5t-12 14.5t-10.5 11.5t-10 10.5l-8 8t-8.5 7.5t-8 5t-8.5 4.5q-7 3 -14.5 5t-20.5 2.5t-22 0.5h-32.5h-37.5q-126 0 -217 -43 q16 30 36 46.5t54 29.5t65.5 36t46 36.5t50 55t43.5 50.5q12 -9 28 -31.5t32 -36.5t38 -13l12 1v-76l22 -1q247 95 371 190q28 21 50 39t42.5 37.5t33 31t29.5 34t24 31t24.5 37t23 38t27 47.5t29.5 53l7 9q-2 -53 -43 -139q-79 -165 -205 -264t-306 -142q-14 -3 -42 -7.5 t-50 -9.5t-39 -14q3 -19 24.5 -46t21.5 -34q0 -11 -26 -30zM1061 -79q39 26 131.5 47.5t146.5 21.5q9 0 22.5 -15.5t28 -42.5t26 -50t24 -51t14.5 -33q-121 -45 -244 -45q-61 0 -125 11zM822 568l48 12l109 -177l-73 -48zM1323 51q3 -15 3 -16q0 -7 -17.5 -14.5t-46 -13 t-54 -9.5t-53.5 -7.5t-32 -4.5l-7 43q21 2 60.5 8.5t72 10t60.5 3.5h14zM866 679l-96 -20l-6 17q10 1 32.5 7t34.5 6q19 0 35 -10zM1061 45h31l10 -83l-41 -12v95zM1950 1535v1v-1zM1950 1535l-1 -5l-2 -2l1 3zM1950 1535l1 1z" />
+<glyph unicode="&#xf1a9;" d="M1167 -50q-5 19 -24 5q-30 -22 -87 -39t-131 -17q-129 0 -193 49q-5 4 -13 4q-11 0 -26 -12q-7 -6 -7.5 -16t7.5 -20q34 -32 87.5 -46t102.5 -12.5t99 4.5q41 4 84.5 20.5t65 30t28.5 20.5q12 12 7 29zM1128 65q-19 47 -39 61q-23 15 -76 15q-47 0 -71 -10 q-29 -12 -78 -56q-26 -24 -12 -44q9 -8 17.5 -4.5t31.5 23.5q3 2 10.5 8.5t10.5 8.5t10 7t11.5 7t12.5 5t15 4.5t16.5 2.5t20.5 1q27 0 44.5 -7.5t23 -14.5t13.5 -22q10 -17 12.5 -20t12.5 1q23 12 14 34zM1483 346q0 22 -5 44.5t-16.5 45t-34 36.5t-52.5 14 q-33 0 -97 -41.5t-129 -83.5t-101 -42q-27 -1 -63.5 19t-76 49t-83.5 58t-100 49t-111 19q-115 -1 -197 -78.5t-84 -178.5q-2 -112 74 -164q29 -20 62.5 -28.5t103.5 -8.5q57 0 132 32.5t134 71t120 70.5t93 31q26 -1 65 -31.5t71.5 -67t68 -67.5t55.5 -32q35 -3 58.5 14 t55.5 63q28 41 42.5 101t14.5 106zM1536 506q0 -164 -62 -304.5t-166 -236t-242.5 -149.5t-290.5 -54t-293 57.5t-247.5 157t-170.5 241.5t-64 302q0 89 19.5 172.5t49 145.5t70.5 118.5t78.5 94t78.5 69.5t64.5 46.5t42.5 24.5q14 8 51 26.5t54.5 28.5t48 30t60.5 44 q36 28 58 72.5t30 125.5q129 -155 186 -193q44 -29 130 -68t129 -66q21 -13 39 -25t60.5 -46.5t76 -70.5t75 -95t69 -122t47 -148.5t19.5 -177.5z" />
+<glyph unicode="&#xf1aa;" d="M1070 463l-160 -160l-151 -152l-30 -30q-65 -64 -151.5 -87t-171.5 -2q-16 -70 -72 -115t-129 -45q-85 0 -145 60.5t-60 145.5q0 72 44.5 128t113.5 72q-22 86 1 173t88 152l12 12l151 -152l-11 -11q-37 -37 -37 -89t37 -90q37 -37 89 -37t89 37l30 30l151 152l161 160z M729 1145l12 -12l-152 -152l-12 12q-37 37 -89 37t-89 -37t-37 -89.5t37 -89.5l29 -29l152 -152l160 -160l-151 -152l-161 160l-151 152l-30 30q-68 67 -90 159.5t5 179.5q-70 15 -115 71t-45 129q0 85 60 145.5t145 60.5q76 0 133.5 -49t69.5 -123q84 20 169.5 -3.5 t149.5 -87.5zM1536 78q0 -85 -60 -145.5t-145 -60.5q-74 0 -131 47t-71 118q-86 -28 -179.5 -6t-161.5 90l-11 12l151 152l12 -12q37 -37 89 -37t89 37t37 89t-37 89l-30 30l-152 152l-160 160l152 152l160 -160l152 -152l29 -30q64 -64 87.5 -150.5t2.5 -171.5 q76 -11 126.5 -68.5t50.5 -134.5zM1534 1202q0 -77 -51 -135t-127 -69q26 -85 3 -176.5t-90 -158.5l-12 -12l-151 152l12 12q37 37 37 89t-37 89t-89 37t-89 -37l-30 -30l-152 -152l-160 -160l-152 152l161 160l152 152l29 30q67 67 159 89.5t178 -3.5q11 75 68.5 126 t135.5 51q85 0 145 -60.5t60 -145.5z" />
+<glyph unicode="&#xf1ab;" d="M654 458q-1 -3 -12.5 0.5t-31.5 11.5l-20 9q-44 20 -87 49q-7 5 -41 31.5t-38 28.5q-67 -103 -134 -181q-81 -95 -105 -110q-4 -2 -19.5 -4t-18.5 0q6 4 82 92q21 24 85.5 115t78.5 118q17 30 51 98.5t36 77.5q-8 1 -110 -33q-8 -2 -27.5 -7.5t-34.5 -9.5t-17 -5 q-2 -2 -2 -10.5t-1 -9.5q-5 -10 -31 -15q-23 -7 -47 0q-18 4 -28 21q-4 6 -5 23q6 2 24.5 5t29.5 6q58 16 105 32q100 35 102 35q10 2 43 19.5t44 21.5q9 3 21.5 8t14.5 5.5t6 -0.5q2 -12 -1 -33q0 -2 -12.5 -27t-26.5 -53.5t-17 -33.5q-25 -50 -77 -131l64 -28 q12 -6 74.5 -32t67.5 -28q4 -1 10.5 -25.5t4.5 -30.5zM449 944q3 -15 -4 -28q-12 -23 -50 -38q-30 -12 -60 -12q-26 3 -49 26q-14 15 -18 41l1 3q3 -3 19.5 -5t26.5 0t58 16q36 12 55 14q17 0 21 -17zM1147 815l63 -227l-139 42zM39 15l694 232v1032l-694 -233v-1031z M1280 332l102 -31l-181 657l-100 31l-216 -536l102 -31l45 110l211 -65zM777 1294l573 -184v380zM1088 -29l158 -13l-54 -160l-40 66q-130 -83 -276 -108q-58 -12 -91 -12h-84q-79 0 -199.5 39t-183.5 85q-8 7 -8 16q0 8 5 13.5t13 5.5q4 0 18 -7.5t30.5 -16.5t20.5 -11 q73 -37 159.5 -61.5t157.5 -24.5q95 0 167 14.5t157 50.5q15 7 30.5 15.5t34 19t28.5 16.5zM1536 1050v-1079l-774 246q-14 -6 -375 -127.5t-368 -121.5q-13 0 -18 13q0 1 -1 3v1078q3 9 4 10q5 6 20 11q106 35 149 50v384l558 -198q2 0 160.5 55t316 108.5t161.5 53.5 q20 0 20 -21v-418z" />
+<glyph unicode="&#xf1ac;" horiz-adv-x="1792" d="M288 1152q66 0 113 -47t47 -113v-1088q0 -66 -47 -113t-113 -47h-128q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h128zM1664 989q58 -34 93 -93t35 -128v-768q0 -106 -75 -181t-181 -75h-864q-66 0 -113 47t-47 113v1536q0 40 28 68t68 28h672q40 0 88 -20t76 -48 l152 -152q28 -28 48 -76t20 -88v-163zM928 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM928 512v128q0 14 -9 23 t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1184 256v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128 q14 0 23 9t9 23zM1184 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 0v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 256v128q0 14 -9 23t-23 9h-128 q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1440 512v128q0 14 -9 23t-23 9h-128q-14 0 -23 -9t-9 -23v-128q0 -14 9 -23t23 -9h128q14 0 23 9t9 23zM1536 896v256h-160q-40 0 -68 28t-28 68v160h-640v-512h896z" />
+<glyph unicode="&#xf1ad;" d="M1344 1536q26 0 45 -19t19 -45v-1664q0 -26 -19 -45t-45 -19h-1280q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h1280zM512 1248v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 992v-64q0 -14 9 -23t23 -9h64q14 0 23 9 t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 736v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM512 480v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 160v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM384 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM384 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 -96v192q0 14 -9 23t-23 9h-320q-14 0 -23 -9 t-9 -23v-192q0 -14 9 -23t23 -9h320q14 0 23 9t9 23zM896 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 928v64 q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM896 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 160v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64 q14 0 23 9t9 23zM1152 416v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 672v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 928v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9 t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1152 1184v64q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-64q0 -14 9 -23t23 -9h64q14 0 23 9t9 23z" />
+<glyph unicode="&#xf1ae;" horiz-adv-x="1280" d="M1188 988l-292 -292v-824q0 -46 -33 -79t-79 -33t-79 33t-33 79v384h-64v-384q0 -46 -33 -79t-79 -33t-79 33t-33 79v824l-292 292q-28 28 -28 68t28 68t68 28t68 -28l228 -228h368l228 228q28 28 68 28t68 -28t28 -68t-28 -68zM864 1152q0 -93 -65.5 -158.5 t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf1b0;" horiz-adv-x="1664" d="M780 1064q0 -60 -19 -113.5t-63 -92.5t-105 -39q-76 0 -138 57.5t-92 135.5t-30 151q0 60 19 113.5t63 92.5t105 39q77 0 138.5 -57.5t91.5 -135t30 -151.5zM438 581q0 -80 -42 -139t-119 -59q-76 0 -141.5 55.5t-100.5 133.5t-35 152q0 80 42 139.5t119 59.5 q76 0 141.5 -55.5t100.5 -134t35 -152.5zM832 608q118 0 255 -97.5t229 -237t92 -254.5q0 -46 -17 -76.5t-48.5 -45t-64.5 -20t-76 -5.5q-68 0 -187.5 45t-182.5 45q-66 0 -192.5 -44.5t-200.5 -44.5q-183 0 -183 146q0 86 56 191.5t139.5 192.5t187.5 146t193 59zM1071 819 q-61 0 -105 39t-63 92.5t-19 113.5q0 74 30 151.5t91.5 135t138.5 57.5q61 0 105 -39t63 -92.5t19 -113.5q0 -73 -30 -151t-92 -135.5t-138 -57.5zM1503 923q77 0 119 -59.5t42 -139.5q0 -74 -35 -152t-100.5 -133.5t-141.5 -55.5q-77 0 -119 59t-42 139q0 74 35 152.5 t100.5 134t141.5 55.5z" />
+<glyph unicode="&#xf1b1;" horiz-adv-x="768" d="M704 1008q0 -145 -57 -243.5t-152 -135.5l45 -821q2 -26 -16 -45t-44 -19h-192q-26 0 -44 19t-16 45l45 821q-95 37 -152 135.5t-57 243.5q0 128 42.5 249.5t117.5 200t160 78.5t160 -78.5t117.5 -200t42.5 -249.5z" />
+<glyph unicode="&#xf1b2;" horiz-adv-x="1792" d="M896 -93l640 349v636l-640 -233v-752zM832 772l698 254l-698 254l-698 -254zM1664 1024v-768q0 -35 -18 -65t-49 -47l-704 -384q-28 -16 -61 -16t-61 16l-704 384q-31 17 -49 47t-18 65v768q0 40 23 73t61 47l704 256q22 8 44 8t44 -8l704 -256q38 -14 61 -47t23 -73z " />
+<glyph unicode="&#xf1b3;" horiz-adv-x="2304" d="M640 -96l384 192v314l-384 -164v-342zM576 358l404 173l-404 173l-404 -173zM1664 -96l384 192v314l-384 -164v-342zM1600 358l404 173l-404 173l-404 -173zM1152 651l384 165v266l-384 -164v-267zM1088 1030l441 189l-441 189l-441 -189zM2176 512v-416q0 -36 -19 -67 t-52 -47l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-5 2 -7 4q-2 -2 -7 -4l-448 -224q-25 -14 -57 -14t-57 14l-448 224q-33 16 -52 47t-19 67v416q0 38 21.5 70t56.5 48l434 186v400q0 38 21.5 70t56.5 48l448 192q23 10 50 10t50 -10l448 -192q35 -16 56.5 -48t21.5 -70 v-400l434 -186q36 -16 57 -48t21 -70z" />
+<glyph unicode="&#xf1b4;" horiz-adv-x="2048" d="M1848 1197h-511v-124h511v124zM1596 771q-90 0 -146 -52.5t-62 -142.5h408q-18 195 -200 195zM1612 186q63 0 122 32t76 87h221q-100 -307 -427 -307q-214 0 -340.5 132t-126.5 347q0 208 130.5 345.5t336.5 137.5q138 0 240.5 -68t153 -179t50.5 -248q0 -17 -2 -47h-658 q0 -111 57.5 -171.5t166.5 -60.5zM277 236h296q205 0 205 167q0 180 -199 180h-302v-347zM277 773h281q78 0 123.5 36.5t45.5 113.5q0 144 -190 144h-260v-294zM0 1282h594q87 0 155 -14t126.5 -47.5t90 -96.5t31.5 -154q0 -181 -172 -263q114 -32 172 -115t58 -204 q0 -75 -24.5 -136.5t-66 -103.5t-98.5 -71t-121 -42t-134 -13h-611v1260z" />
+<glyph unicode="&#xf1b5;" d="M1248 1408q119 0 203.5 -84.5t84.5 -203.5v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960zM499 1041h-371v-787h382q117 0 197 57.5t80 170.5q0 158 -143 200q107 52 107 164q0 57 -19.5 96.5 t-56.5 60.5t-79 29.5t-97 8.5zM477 723h-176v184h163q119 0 119 -90q0 -94 -106 -94zM486 388h-185v217h189q124 0 124 -113q0 -104 -128 -104zM1136 356q-68 0 -104 38t-36 107h411q1 10 1 30q0 132 -74.5 220.5t-203.5 88.5q-128 0 -210 -86t-82 -216q0 -135 79 -217 t213 -82q205 0 267 191h-138q-11 -34 -47.5 -54t-75.5 -20zM1126 722q113 0 124 -122h-254q4 56 39 89t91 33zM964 988h319v-77h-319v77z" />
+<glyph unicode="&#xf1b6;" horiz-adv-x="1792" d="M1582 954q0 -101 -71.5 -172.5t-172.5 -71.5t-172.5 71.5t-71.5 172.5t71.5 172.5t172.5 71.5t172.5 -71.5t71.5 -172.5zM812 212q0 104 -73 177t-177 73q-27 0 -54 -6l104 -42q77 -31 109.5 -106.5t1.5 -151.5q-31 -77 -107 -109t-152 -1q-21 8 -62 24.5t-61 24.5 q32 -60 91 -96.5t130 -36.5q104 0 177 73t73 177zM1642 953q0 126 -89.5 215.5t-215.5 89.5q-127 0 -216.5 -89.5t-89.5 -215.5q0 -127 89.5 -216t216.5 -89q126 0 215.5 89t89.5 216zM1792 953q0 -189 -133.5 -322t-321.5 -133l-437 -319q-12 -129 -109 -218t-229 -89 q-121 0 -214 76t-118 192l-230 92v429l389 -157q79 48 173 48q13 0 35 -2l284 407q2 187 135.5 319t320.5 132q188 0 321.5 -133.5t133.5 -321.5z" />
+<glyph unicode="&#xf1b7;" d="M1242 889q0 80 -57 136.5t-137 56.5t-136.5 -57t-56.5 -136q0 -80 56.5 -136.5t136.5 -56.5t137 56.5t57 136.5zM632 301q0 -83 -58 -140.5t-140 -57.5q-56 0 -103 29t-72 77q52 -20 98 -40q60 -24 120 1.5t85 86.5q24 60 -1.5 120t-86.5 84l-82 33q22 5 42 5 q82 0 140 -57.5t58 -140.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v153l172 -69q20 -92 93.5 -152t168.5 -60q104 0 181 70t87 173l345 252q150 0 255.5 105.5t105.5 254.5q0 150 -105.5 255.5t-255.5 105.5 q-148 0 -253 -104.5t-107 -252.5l-225 -322q-9 1 -28 1q-75 0 -137 -37l-297 119v468q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5zM1289 887q0 -100 -71 -170.5t-171 -70.5t-170.5 70.5t-70.5 170.5t70.5 171t170.5 71q101 0 171.5 -70.5t70.5 -171.5z " />
+<glyph unicode="&#xf1b8;" horiz-adv-x="1792" d="M836 367l-15 -368l-2 -22l-420 29q-36 3 -67 31.5t-47 65.5q-11 27 -14.5 55t4 65t12 55t21.5 64t19 53q78 -12 509 -28zM449 953l180 -379l-147 92q-63 -72 -111.5 -144.5t-72.5 -125t-39.5 -94.5t-18.5 -63l-4 -21l-190 357q-17 26 -18 56t6 47l8 18q35 63 114 188 l-140 86zM1680 436l-188 -359q-12 -29 -36.5 -46.5t-43.5 -20.5l-18 -4q-71 -7 -219 -12l8 -164l-230 367l211 362l7 -173q170 -16 283 -5t170 33zM895 1360q-47 -63 -265 -435l-317 187l-19 12l225 356q20 31 60 45t80 10q24 -2 48.5 -12t42 -21t41.5 -33t36 -34.5 t36 -39.5t32 -35zM1550 1053l212 -363q18 -37 12.5 -76t-27.5 -74q-13 -20 -33 -37t-38 -28t-48.5 -22t-47 -16t-51.5 -14t-46 -12q-34 72 -265 436l313 195zM1407 1279l142 83l-220 -373l-419 20l151 86q-34 89 -75 166t-75.5 123.5t-64.5 80t-47 46.5l-17 13l405 -1 q31 3 58 -10.5t39 -28.5l11 -15q39 -61 112 -190z" />
+<glyph unicode="&#xf1b9;" horiz-adv-x="2048" d="M480 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM516 768h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5zM1888 448q0 66 -47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47t113 47t47 113zM2048 544v-384 q0 -14 -9 -23t-23 -9h-96v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-1024v-128q0 -80 -56 -136t-136 -56t-136 56t-56 136v128h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5t179 63.5h768q98 0 179 -63.5t104 -157.5 l105 -419h28q93 0 158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf1ba;" horiz-adv-x="2048" d="M1824 640q93 0 158.5 -65.5t65.5 -158.5v-384q0 -14 -9 -23t-23 -9h-96v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-1024v-64q0 -80 -56 -136t-136 -56t-136 56t-56 136v64h-96q-14 0 -23 9t-9 23v384q0 93 65.5 158.5t158.5 65.5h28l105 419q23 94 104 157.5 t179 63.5h128v224q0 14 9 23t23 9h448q14 0 23 -9t9 -23v-224h128q98 0 179 -63.5t104 -157.5l105 -419h28zM320 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM516 640h1016l-89 357q-2 8 -14 17.5t-21 9.5h-768q-9 0 -21 -9.5t-14 -17.5z M1728 160q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47z" />
+<glyph unicode="&#xf1bb;" d="M1504 64q0 -26 -19 -45t-45 -19h-462q1 -17 6 -87.5t5 -108.5q0 -25 -18 -42.5t-43 -17.5h-320q-25 0 -43 17.5t-18 42.5q0 38 5 108.5t6 87.5h-462q-26 0 -45 19t-19 45t19 45l402 403h-229q-26 0 -45 19t-19 45t19 45l402 403h-197q-26 0 -45 19t-19 45t19 45l384 384 q19 19 45 19t45 -19l384 -384q19 -19 19 -45t-19 -45t-45 -19h-197l402 -403q19 -19 19 -45t-19 -45t-45 -19h-229l402 -403q19 -19 19 -45z" />
+<glyph unicode="&#xf1bc;" d="M1127 326q0 32 -30 51q-193 115 -447 115q-133 0 -287 -34q-42 -9 -42 -52q0 -20 13.5 -34.5t35.5 -14.5q5 0 37 8q132 27 243 27q226 0 397 -103q19 -11 33 -11q19 0 33 13.5t14 34.5zM1223 541q0 40 -35 61q-237 141 -548 141q-153 0 -303 -42q-48 -13 -48 -64 q0 -25 17.5 -42.5t42.5 -17.5q7 0 37 8q122 33 251 33q279 0 488 -124q24 -13 38 -13q25 0 42.5 17.5t17.5 42.5zM1331 789q0 47 -40 70q-126 73 -293 110.5t-343 37.5q-204 0 -364 -47q-23 -7 -38.5 -25.5t-15.5 -48.5q0 -31 20.5 -52t51.5 -21q11 0 40 8q133 37 307 37 q159 0 309.5 -34t253.5 -95q21 -12 40 -12q29 0 50.5 20.5t21.5 51.5zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1bd;" horiz-adv-x="1024" d="M1024 1233l-303 -582l24 -31h279v-415h-507l-44 -30l-142 -273l-30 -30h-301v303l303 583l-24 30h-279v415h507l44 30l142 273l30 30h301v-303z" />
+<glyph unicode="&#xf1be;" horiz-adv-x="2304" d="M784 164l16 241l-16 523q-1 10 -7.5 17t-16.5 7q-9 0 -16 -7t-7 -17l-14 -523l14 -241q1 -10 7.5 -16.5t15.5 -6.5q22 0 24 23zM1080 193l11 211l-12 586q0 16 -13 24q-8 5 -16 5t-16 -5q-13 -8 -13 -24l-1 -6l-10 -579q0 -1 11 -236v-1q0 -10 6 -17q9 -11 23 -11 q11 0 20 9q9 7 9 20zM35 533l20 -128l-20 -126q-2 -9 -9 -9t-9 9l-17 126l17 128q2 9 9 9t9 -9zM121 612l26 -207l-26 -203q-2 -9 -10 -9q-9 0 -9 10l-23 202l23 207q0 9 9 9q8 0 10 -9zM401 159zM213 650l25 -245l-25 -237q0 -11 -11 -11q-10 0 -12 11l-21 237l21 245 q2 12 12 12q11 0 11 -12zM307 657l23 -252l-23 -244q-2 -13 -14 -13q-13 0 -13 13l-21 244l21 252q0 13 13 13q12 0 14 -13zM401 639l21 -234l-21 -246q-2 -16 -16 -16q-6 0 -10.5 4.5t-4.5 11.5l-20 246l20 234q0 6 4.5 10.5t10.5 4.5q14 0 16 -15zM784 164zM495 785 l21 -380l-21 -246q0 -7 -5 -12.5t-12 -5.5q-16 0 -18 18l-18 246l18 380q2 18 18 18q7 0 12 -5.5t5 -12.5zM589 871l19 -468l-19 -244q0 -8 -5.5 -13.5t-13.5 -5.5q-18 0 -20 19l-16 244l16 468q2 19 20 19q8 0 13.5 -5.5t5.5 -13.5zM687 911l18 -506l-18 -242 q-2 -21 -22 -21q-19 0 -21 21l-16 242l16 506q0 9 6.5 15.5t14.5 6.5q9 0 15 -6.5t7 -15.5zM1079 169v0v0zM881 915l15 -510l-15 -239q0 -10 -7.5 -17.5t-17.5 -7.5t-17 7t-8 18l-14 239l14 510q0 11 7.5 18t17.5 7t17.5 -7t7.5 -18zM980 896l14 -492l-14 -236q0 -11 -8 -19 t-19 -8t-19 8t-9 19l-12 236l12 492q1 12 9 20t19 8t18.5 -8t8.5 -20zM1192 404l-14 -231v0q0 -13 -9 -22t-22 -9t-22 9t-10 22l-6 114l-6 117l12 636v3q2 15 12 24q9 7 20 7q8 0 15 -5q14 -8 16 -26zM2304 423q0 -117 -83 -199.5t-200 -82.5h-786q-13 2 -22 11t-9 22v899 q0 23 28 33q85 34 181 34q195 0 338 -131.5t160 -323.5q53 22 110 22q117 0 200 -83t83 -201z" />
+<glyph unicode="&#xf1c0;" d="M768 768q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 0q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127 t443 -43zM768 384q237 0 443 43t325 127v-170q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5t-103 128v170q119 -84 325 -127t443 -43zM768 1536q208 0 385 -34.5t280 -93.5t103 -128v-128q0 -69 -103 -128t-280 -93.5t-385 -34.5t-385 34.5t-280 93.5 t-103 128v128q0 69 103 128t280 93.5t385 34.5z" />
+<glyph unicode="&#xf1c1;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M894 465q33 -26 84 -56q59 7 117 7q147 0 177 -49q16 -22 2 -52q0 -1 -1 -2l-2 -2v-1q-6 -38 -71 -38q-48 0 -115 20t-130 53q-221 -24 -392 -83q-153 -262 -242 -262q-15 0 -28 7l-24 12q-1 1 -6 5q-10 10 -6 36q9 40 56 91.5t132 96.5q14 9 23 -6q2 -2 2 -4q52 85 107 197 q68 136 104 262q-24 82 -30.5 159.5t6.5 127.5q11 40 42 40h21h1q23 0 35 -15q18 -21 9 -68q-2 -6 -4 -8q1 -3 1 -8v-30q-2 -123 -14 -192q55 -164 146 -238zM318 54q52 24 137 158q-51 -40 -87.5 -84t-49.5 -74zM716 974q-15 -42 -2 -132q1 7 7 44q0 3 7 43q1 4 4 8 q-1 1 -1 2t-0.5 1.5t-0.5 1.5q-1 22 -13 36q0 -1 -1 -2v-2zM592 313q135 54 284 81q-2 1 -13 9.5t-16 13.5q-76 67 -127 176q-27 -86 -83 -197q-30 -56 -45 -83zM1238 329q-24 24 -140 24q76 -28 124 -28q14 0 18 1q0 1 -2 3z" />
+<glyph unicode="&#xf1c2;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M233 768v-107h70l164 -661h159l128 485q7 20 10 46q2 16 2 24h4l3 -24q1 -3 3.5 -20t5.5 -26l128 -485h159l164 661h70v107h-300v-107h90l-99 -438q-5 -20 -7 -46l-2 -21h-4l-3 21q-1 5 -4 21t-5 25l-144 545h-114l-144 -545q-2 -9 -4.5 -24.5t-3.5 -21.5l-4 -21h-4l-2 21 q-2 26 -7 46l-99 438h90v107h-300z" />
+<glyph unicode="&#xf1c3;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M429 106v-106h281v106h-75l103 161q5 7 10 16.5t7.5 13.5t3.5 4h2q1 -4 5 -10q2 -4 4.5 -7.5t6 -8t6.5 -8.5l107 -161h-76v-106h291v106h-68l-192 273l195 282h67v107h-279v-107h74l-103 -159q-4 -7 -10 -16.5t-9 -13.5l-2 -3h-2q-1 4 -5 10q-6 11 -17 23l-106 159h76v107 h-290v-107h68l189 -272l-194 -283h-68z" />
+<glyph unicode="&#xf1c4;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M416 106v-106h327v106h-93v167h137q76 0 118 15q67 23 106.5 87t39.5 146q0 81 -37 141t-100 87q-48 19 -130 19h-368v-107h92v-555h-92zM769 386h-119v268h120q52 0 83 -18q56 -33 56 -115q0 -89 -62 -120q-31 -15 -78 -15z" />
+<glyph unicode="&#xf1c5;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M1280 320v-320h-1024v192l192 192l128 -128l384 384zM448 512q-80 0 -136 56t-56 136t56 136t136 56t136 -56t56 -136t-56 -136t-136 -56z" />
+<glyph unicode="&#xf1c6;" d="M640 1152v128h-128v-128h128zM768 1024v128h-128v-128h128zM640 896v128h-128v-128h128zM768 768v128h-128v-128h128zM1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400 v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-128v-128h-128v128h-512v-1536h1280zM781 593l107 -349q8 -27 8 -52q0 -83 -72.5 -137.5t-183.5 -54.5t-183.5 54.5t-72.5 137.5q0 25 8 52q21 63 120 396v128h128v-128h79 q22 0 39 -13t23 -34zM640 128q53 0 90.5 19t37.5 45t-37.5 45t-90.5 19t-90.5 -19t-37.5 -45t37.5 -45t90.5 -19z" />
+<glyph unicode="&#xf1c7;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M620 686q20 -8 20 -30v-544q0 -22 -20 -30q-8 -2 -12 -2q-12 0 -23 9l-166 167h-131q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h131l166 167q16 15 35 7zM1037 -3q31 0 50 24q129 159 129 363t-129 363q-16 21 -43 24t-47 -14q-21 -17 -23.5 -43.5t14.5 -47.5 q100 -123 100 -282t-100 -282q-17 -21 -14.5 -47.5t23.5 -42.5q18 -15 40 -15zM826 145q27 0 47 20q87 93 87 219t-87 219q-18 19 -45 20t-46 -17t-20 -44.5t18 -46.5q52 -57 52 -131t-52 -131q-19 -20 -18 -46.5t20 -44.5q20 -17 44 -17z" />
+<glyph unicode="&#xf1c8;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M768 768q52 0 90 -38t38 -90v-384q0 -52 -38 -90t-90 -38h-384q-52 0 -90 38t-38 90v384q0 52 38 90t90 38h384zM1260 766q20 -8 20 -30v-576q0 -22 -20 -30q-8 -2 -12 -2q-14 0 -23 9l-265 266v90l265 266q9 9 23 9q4 0 12 -2z" />
+<glyph unicode="&#xf1c9;" d="M1468 1156q28 -28 48 -76t20 -88v-1152q0 -40 -28 -68t-68 -28h-1344q-40 0 -68 28t-28 68v1600q0 40 28 68t68 28h896q40 0 88 -20t76 -48zM1024 1400v-376h376q-10 29 -22 41l-313 313q-12 12 -41 22zM1408 -128v1024h-416q-40 0 -68 28t-28 68v416h-768v-1536h1280z M480 768q8 11 21 12.5t24 -6.5l51 -38q11 -8 12.5 -21t-6.5 -24l-182 -243l182 -243q8 -11 6.5 -24t-12.5 -21l-51 -38q-11 -8 -24 -6.5t-21 12.5l-226 301q-14 19 0 38zM1282 467q14 -19 0 -38l-226 -301q-8 -11 -21 -12.5t-24 6.5l-51 38q-11 8 -12.5 21t6.5 24l182 243 l-182 243q-8 11 -6.5 24t12.5 21l51 38q11 8 24 6.5t21 -12.5zM662 6q-13 2 -20.5 13t-5.5 24l138 831q2 13 13 20.5t24 5.5l63 -10q13 -2 20.5 -13t5.5 -24l-138 -831q-2 -13 -13 -20.5t-24 -5.5z" />
+<glyph unicode="&#xf1ca;" d="M1497 709v-198q-101 -23 -198 -23q-65 -136 -165.5 -271t-181.5 -215.5t-128 -106.5q-80 -45 -162 3q-28 17 -60.5 43.5t-85 83.5t-102.5 128.5t-107.5 184t-105.5 244t-91.5 314.5t-70.5 390h283q26 -218 70 -398.5t104.5 -317t121.5 -235.5t140 -195q169 169 287 406 q-142 72 -223 220t-81 333q0 192 104 314.5t284 122.5q178 0 273 -105.5t95 -297.5q0 -159 -58 -286q-7 -1 -19.5 -3t-46 -2t-63 6t-62 25.5t-50.5 51.5q31 103 31 184q0 87 -29 132t-79 45q-53 0 -85 -49.5t-32 -140.5q0 -186 105 -293.5t267 -107.5q62 0 121 14z" />
+<glyph unicode="&#xf1cb;" horiz-adv-x="1792" d="M216 367l603 -402v359l-334 223zM154 511l193 129l-193 129v-258zM973 -35l603 402l-269 180l-334 -223v-359zM896 458l272 182l-272 182l-272 -182zM485 733l334 223v359l-603 -402zM1445 640l193 -129v258zM1307 733l269 180l-603 402v-359zM1792 913v-546 q0 -41 -34 -64l-819 -546q-21 -13 -43 -13t-43 13l-819 546q-34 23 -34 64v546q0 41 34 64l819 546q21 13 43 13t43 -13l819 -546q34 -23 34 -64z" />
+<glyph unicode="&#xf1cc;" horiz-adv-x="2048" d="M1800 764q111 -46 179.5 -145.5t68.5 -221.5q0 -164 -118 -280.5t-285 -116.5q-4 0 -11.5 0.5t-10.5 0.5h-1209h-1h-2h-5q-170 10 -288 125.5t-118 280.5q0 110 55 203t147 147q-12 39 -12 82q0 115 82 196t199 81q95 0 172 -58q75 154 222.5 248t326.5 94 q166 0 306 -80.5t221.5 -218.5t81.5 -301q0 -6 -0.5 -18t-0.5 -18zM468 498q0 -122 84 -193t208 -71q137 0 240 99q-16 20 -47.5 56.5t-43.5 50.5q-67 -65 -144 -65q-55 0 -93.5 33.5t-38.5 87.5q0 53 38.5 87t91.5 34q44 0 84.5 -21t73 -55t65 -75t69 -82t77 -75t97 -55 t121.5 -21q121 0 204.5 71.5t83.5 190.5q0 121 -84 192t-207 71q-143 0 -241 -97q14 -16 29.5 -34t34.5 -40t29 -34q66 64 142 64q52 0 92 -33t40 -84q0 -57 -37 -91.5t-94 -34.5q-43 0 -82.5 21t-72 55t-65.5 75t-69.5 82t-77.5 75t-96.5 55t-118.5 21q-122 0 -207 -70.5 t-85 -189.5z" />
+<glyph unicode="&#xf1cd;" horiz-adv-x="1792" d="M896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM896 1408q-190 0 -361 -90l194 -194q82 28 167 28t167 -28l194 194q-171 90 -361 90zM218 279l194 194 q-28 82 -28 167t28 167l-194 194q-90 -171 -90 -361t90 -361zM896 -128q190 0 361 90l-194 194q-82 -28 -167 -28t-167 28l-194 -194q171 -90 361 -90zM896 256q159 0 271.5 112.5t112.5 271.5t-112.5 271.5t-271.5 112.5t-271.5 -112.5t-112.5 -271.5t112.5 -271.5 t271.5 -112.5zM1380 473l194 -194q90 171 90 361t-90 361l-194 -194q28 -82 28 -167t-28 -167z" />
+<glyph unicode="&#xf1ce;" horiz-adv-x="1792" d="M1760 640q0 -176 -68.5 -336t-184 -275.5t-275.5 -184t-336 -68.5t-336 68.5t-275.5 184t-184 275.5t-68.5 336q0 213 97 398.5t265 305.5t374 151v-228q-221 -45 -366.5 -221t-145.5 -406q0 -130 51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5 t136.5 204t51 248.5q0 230 -145.5 406t-366.5 221v228q206 -31 374 -151t265 -305.5t97 -398.5z" />
+<glyph unicode="&#xf1d0;" horiz-adv-x="1792" d="M19 662q8 217 116 406t305 318h5q0 -1 -1 -3q-8 -8 -28 -33.5t-52 -76.5t-60 -110.5t-44.5 -135.5t-14 -150.5t39 -157.5t108.5 -154q50 -50 102 -69.5t90.5 -11.5t69.5 23.5t47 32.5l16 16q39 51 53 116.5t6.5 122.5t-21 107t-26.5 80l-14 29q-10 25 -30.5 49.5t-43 41 t-43.5 29.5t-35 19l-13 6l104 115q39 -17 78 -52t59 -61l19 -27q1 48 -18.5 103.5t-40.5 87.5l-20 31l161 183l160 -181q-33 -46 -52.5 -102.5t-22.5 -90.5l-4 -33q22 37 61.5 72.5t67.5 52.5l28 17l103 -115q-44 -14 -85 -50t-60 -65l-19 -29q-31 -56 -48 -133.5t-7 -170 t57 -156.5q33 -45 77.5 -60.5t85 -5.5t76 26.5t57.5 33.5l21 16q60 53 96.5 115t48.5 121.5t10 121.5t-18 118t-37 107.5t-45.5 93t-45 72t-34.5 47.5l-13 17q-14 13 -7 13l10 -3q40 -29 62.5 -46t62 -50t64 -58t58.5 -65t55.5 -77t45.5 -88t38 -103t23.5 -117t10.5 -136 q3 -259 -108 -465t-312 -321t-456 -115q-185 0 -351 74t-283.5 198t-184 293t-60.5 353z" />
+<glyph unicode="&#xf1d1;" horiz-adv-x="1792" d="M874 -102v-66q-208 6 -385 109.5t-283 275.5l58 34q29 -49 73 -99l65 57q148 -168 368 -212l-17 -86q65 -12 121 -13zM276 428l-83 -28q22 -60 49 -112l-57 -33q-98 180 -98 385t98 385l57 -33q-30 -56 -49 -112l82 -28q-35 -100 -35 -212q0 -109 36 -212zM1528 251 l58 -34q-106 -172 -283 -275.5t-385 -109.5v66q56 1 121 13l-17 86q220 44 368 212l65 -57q44 50 73 99zM1377 805l-233 -80q14 -42 14 -85t-14 -85l232 -80q-31 -92 -98 -169l-185 162q-57 -67 -147 -85l48 -241q-52 -10 -98 -10t-98 10l48 241q-90 18 -147 85l-185 -162 q-67 77 -98 169l232 80q-14 42 -14 85t14 85l-233 80q33 93 99 169l185 -162q59 68 147 86l-48 240q44 10 98 10t98 -10l-48 -240q88 -18 147 -86l185 162q66 -76 99 -169zM874 1448v-66q-65 -2 -121 -13l17 -86q-220 -42 -368 -211l-65 56q-38 -42 -73 -98l-57 33 q106 172 282 275.5t385 109.5zM1705 640q0 -205 -98 -385l-57 33q27 52 49 112l-83 28q36 103 36 212q0 112 -35 212l82 28q-19 56 -49 112l57 33q98 -180 98 -385zM1585 1063l-57 -33q-35 56 -73 98l-65 -56q-148 169 -368 211l17 86q-56 11 -121 13v66q209 -6 385 -109.5 t282 -275.5zM1748 640q0 173 -67.5 331t-181.5 272t-272 181.5t-331 67.5t-331 -67.5t-272 -181.5t-181.5 -272t-67.5 -331t67.5 -331t181.5 -272t272 -181.5t331 -67.5t331 67.5t272 181.5t181.5 272t67.5 331zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71 t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf1d2;" d="M582 228q0 -66 -93 -66q-107 0 -107 63q0 64 98 64q102 0 102 -61zM546 694q0 -85 -74 -85q-77 0 -77 84q0 90 77 90q36 0 55 -25.5t19 -63.5zM712 769v125q-78 -29 -135 -29q-50 29 -110 29q-86 0 -145 -57t-59 -143q0 -50 29.5 -102t73.5 -67v-3q-38 -17 -38 -85 q0 -53 41 -77v-3q-113 -37 -113 -139q0 -45 20 -78.5t54 -51t72 -25.5t81 -8q224 0 224 188q0 67 -48 99t-126 46q-27 5 -51.5 20.5t-24.5 39.5q0 44 49 52q77 15 122 70t45 134q0 24 -10 52q37 9 49 13zM771 350h137q-2 27 -2 82v387q0 46 2 69h-137q3 -23 3 -71v-392 q0 -50 -3 -75zM1280 366v121q-30 -21 -68 -21q-53 0 -53 82v225h52q9 0 26.5 -1t26.5 -1v117h-105q0 82 3 102h-140q4 -24 4 -55v-47h-60v-117q36 3 37 3q3 0 11 -0.5t12 -0.5v-2h-2v-217q0 -37 2.5 -64t11.5 -56.5t24.5 -48.5t43.5 -31t66 -12q64 0 108 24zM924 1072 q0 36 -24 63.5t-60 27.5t-60.5 -27t-24.5 -64q0 -36 25 -62.5t60 -26.5t59.5 27t24.5 62zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1d3;" horiz-adv-x="1792" d="M595 22q0 100 -165 100q-158 0 -158 -104q0 -101 172 -101q151 0 151 105zM536 777q0 61 -30 102t-89 41q-124 0 -124 -145q0 -135 124 -135q119 0 119 137zM805 1101v-202q-36 -12 -79 -22q16 -43 16 -84q0 -127 -73 -216.5t-197 -112.5q-40 -8 -59.5 -27t-19.5 -58 q0 -31 22.5 -51.5t58 -32t78.5 -22t86 -25.5t78.5 -37.5t58 -64t22.5 -98.5q0 -304 -363 -304q-69 0 -130 12.5t-116 41t-87.5 82t-32.5 127.5q0 165 182 225v4q-67 41 -67 126q0 109 63 137v4q-72 24 -119.5 108.5t-47.5 165.5q0 139 95 231.5t235 92.5q96 0 178 -47 q98 0 218 47zM1123 220h-222q4 45 4 134v609q0 94 -4 128h222q-4 -33 -4 -124v-613q0 -89 4 -134zM1724 442v-196q-71 -39 -174 -39q-62 0 -107 20t-70 50t-39.5 78t-18.5 92t-4 103v351h2v4q-7 0 -19 1t-18 1q-21 0 -59 -6v190h96v76q0 54 -6 89h227q-6 -41 -6 -165h171 v-190q-15 0 -43.5 2t-42.5 2h-85v-365q0 -131 87 -131q61 0 109 33zM1148 1389q0 -58 -39 -101.5t-96 -43.5q-58 0 -98 43.5t-40 101.5q0 59 39.5 103t98.5 44q58 0 96.5 -44.5t38.5 -102.5z" />
+<glyph unicode="&#xf1d4;" d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1d5;" horiz-adv-x="1280" d="M842 964q0 -80 -57 -136.5t-136 -56.5q-60 0 -111 35q-62 -67 -115 -146q-247 -371 -202 -859q1 -22 -12.5 -38.5t-34.5 -18.5h-5q-20 0 -35 13.5t-17 33.5q-14 126 -3.5 247.5t29.5 217t54 186t69 155.5t74 125q61 90 132 165q-16 35 -16 77q0 80 56.5 136.5t136.5 56.5 t136.5 -56.5t56.5 -136.5zM1223 953q0 -158 -78 -292t-212.5 -212t-292.5 -78q-64 0 -131 14q-21 5 -32.5 23.5t-6.5 39.5q5 20 23 31.5t39 7.5q51 -13 108 -13q97 0 186 38t153 102t102 153t38 186t-38 186t-102 153t-153 102t-186 38t-186 -38t-153 -102t-102 -153 t-38 -186q0 -114 52 -218q10 -20 3.5 -40t-25.5 -30t-39.5 -3t-30.5 26q-64 123 -64 265q0 119 46.5 227t124.5 186t186 124t226 46q158 0 292.5 -78t212.5 -212.5t78 -292.5z" />
+<glyph unicode="&#xf1d6;" horiz-adv-x="1792" d="M270 730q-8 19 -8 52q0 20 11 49t24 45q-1 22 7.5 53t22.5 43q0 139 92.5 288.5t217.5 209.5q139 66 324 66q133 0 266 -55q49 -21 90 -48t71 -56t55 -68t42 -74t32.5 -84.5t25.5 -89.5t22 -98l1 -5q55 -83 55 -150q0 -14 -9 -40t-9 -38q0 -1 1.5 -3.5t3.5 -5t2 -3.5 q77 -114 120.5 -214.5t43.5 -208.5q0 -43 -19.5 -100t-55.5 -57q-9 0 -19.5 7.5t-19 17.5t-19 26t-16 26.5t-13.5 26t-9 17.5q-1 1 -3 1l-5 -4q-59 -154 -132 -223q20 -20 61.5 -38.5t69 -41.5t35.5 -65q-2 -4 -4 -16t-7 -18q-64 -97 -302 -97q-53 0 -110.5 9t-98 20 t-104.5 30q-15 5 -23 7q-14 4 -46 4.5t-40 1.5q-41 -45 -127.5 -65t-168.5 -20q-35 0 -69 1.5t-93 9t-101 20.5t-74.5 40t-32.5 64q0 40 10 59.5t41 48.5q11 2 40.5 13t49.5 12q4 0 14 2q2 2 2 4l-2 3q-48 11 -108 105.5t-73 156.5l-5 3q-4 0 -12 -20q-18 -41 -54.5 -74.5 t-77.5 -37.5h-1q-4 0 -6 4.5t-5 5.5q-23 54 -23 100q0 275 252 466z" />
+<glyph unicode="&#xf1d7;" horiz-adv-x="2048" d="M580 1075q0 41 -25 66t-66 25q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 66 24.5t25 65.5zM1323 568q0 28 -25.5 50t-65.5 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q40 0 65.5 22t25.5 51zM1087 1075q0 41 -24.5 66t-65.5 25 q-43 0 -76 -25.5t-33 -65.5q0 -39 33 -64.5t76 -25.5q41 0 65.5 24.5t24.5 65.5zM1722 568q0 28 -26 50t-65 22q-27 0 -49.5 -22.5t-22.5 -49.5q0 -28 22.5 -50.5t49.5 -22.5q39 0 65 22t26 51zM1456 965q-31 4 -70 4q-169 0 -311 -77t-223.5 -208.5t-81.5 -287.5 q0 -78 23 -152q-35 -3 -68 -3q-26 0 -50 1.5t-55 6.5t-44.5 7t-54.5 10.5t-50 10.5l-253 -127l72 218q-290 203 -290 490q0 169 97.5 311t264 223.5t363.5 81.5q176 0 332.5 -66t262 -182.5t136.5 -260.5zM2048 404q0 -117 -68.5 -223.5t-185.5 -193.5l55 -181l-199 109 q-150 -37 -218 -37q-169 0 -311 70.5t-223.5 191.5t-81.5 264t81.5 264t223.5 191.5t311 70.5q161 0 303 -70.5t227.5 -192t85.5 -263.5z" />
+<glyph unicode="&#xf1d8;" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-453 185l-242 -295q-18 -23 -49 -23q-13 0 -22 4q-19 7 -30.5 23.5t-11.5 36.5v349l864 1059l-1069 -925l-395 162q-37 14 -40 55q-2 40 32 59l1664 960q15 9 32 9q20 0 36 -11z" />
+<glyph unicode="&#xf1d9;" horiz-adv-x="1792" d="M1764 1525q33 -24 27 -64l-256 -1536q-5 -29 -32 -45q-14 -8 -31 -8q-11 0 -24 5l-527 215l-298 -327q-18 -21 -47 -21q-14 0 -23 4q-19 7 -30 23.5t-11 36.5v452l-472 193q-37 14 -40 55q-3 39 32 59l1664 960q35 21 68 -2zM1422 26l221 1323l-1434 -827l336 -137 l863 639l-478 -797z" />
+<glyph unicode="&#xf1da;" d="M1536 640q0 -156 -61 -298t-164 -245t-245 -164t-298 -61q-172 0 -327 72.5t-264 204.5q-7 10 -6.5 22.5t8.5 20.5l137 138q10 9 25 9q16 -2 23 -12q73 -95 179 -147t225 -52q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5 t-163.5 109.5t-198.5 40.5q-98 0 -188 -35.5t-160 -101.5l137 -138q31 -30 14 -69q-17 -40 -59 -40h-448q-26 0 -45 19t-19 45v448q0 42 40 59q39 17 69 -14l130 -129q107 101 244.5 156.5t284.5 55.5q156 0 298 -61t245 -164t164 -245t61 -298zM896 928v-448q0 -14 -9 -23 t-23 -9h-320q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v352q0 14 9 23t23 9h64q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1db;" d="M768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103 t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1dc;" horiz-adv-x="1792" d="M1682 -128q-44 0 -132.5 3.5t-133.5 3.5q-44 0 -132 -3.5t-132 -3.5q-24 0 -37 20.5t-13 45.5q0 31 17 46t39 17t51 7t45 15q33 21 33 140l-1 391q0 21 -1 31q-13 4 -50 4h-675q-38 0 -51 -4q-1 -10 -1 -31l-1 -371q0 -142 37 -164q16 -10 48 -13t57 -3.5t45 -15 t20 -45.5q0 -26 -12.5 -48t-36.5 -22q-47 0 -139.5 3.5t-138.5 3.5q-43 0 -128 -3.5t-127 -3.5q-23 0 -35.5 21t-12.5 45q0 30 15.5 45t36 17.5t47.5 7.5t42 15q33 23 33 143l-1 57v813q0 3 0.5 26t0 36.5t-1.5 38.5t-3.5 42t-6.5 36.5t-11 31.5t-16 18q-15 10 -45 12t-53 2 t-41 14t-18 45q0 26 12 48t36 22q46 0 138.5 -3.5t138.5 -3.5q42 0 126.5 3.5t126.5 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17 -43.5t-38.5 -14.5t-49.5 -4t-43 -13q-35 -21 -35 -160l1 -320q0 -21 1 -32q13 -3 39 -3h699q25 0 38 3q1 11 1 32l1 320q0 139 -35 160 q-18 11 -58.5 12.5t-66 13t-25.5 49.5q0 26 12.5 48t37.5 22q44 0 132 -3.5t132 -3.5q43 0 129 3.5t129 3.5q25 0 37.5 -22t12.5 -48q0 -30 -17.5 -44t-40 -14.5t-51.5 -3t-44 -12.5q-35 -23 -35 -161l1 -943q0 -119 34 -140q16 -10 46 -13.5t53.5 -4.5t41.5 -15.5t18 -44.5 q0 -26 -12 -48t-36 -22z" />
+<glyph unicode="&#xf1dd;" horiz-adv-x="1280" d="M1278 1347v-73q0 -29 -18.5 -61t-42.5 -32q-50 0 -54 -1q-26 -6 -32 -31q-3 -11 -3 -64v-1152q0 -25 -18 -43t-43 -18h-108q-25 0 -43 18t-18 43v1218h-143v-1218q0 -25 -17.5 -43t-43.5 -18h-108q-26 0 -43.5 18t-17.5 43v496q-147 12 -245 59q-126 58 -192 179 q-64 117 -64 259q0 166 88 286q88 118 209 159q111 37 417 37h479q25 0 43 -18t18 -43z" />
+<glyph unicode="&#xf1de;" d="M352 128v-128h-352v128h352zM704 256q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM864 640v-128h-864v128h864zM224 1152v-128h-224v128h224zM1536 128v-128h-736v128h736zM576 1280q26 0 45 -19t19 -45v-256 q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1216 768q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h256zM1536 640v-128h-224v128h224zM1536 1152v-128h-864v128h864z" />
+<glyph unicode="&#xf1e0;" d="M1216 512q133 0 226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5t-226.5 93.5t-93.5 226.5q0 12 2 34l-360 180q-92 -86 -218 -86q-133 0 -226.5 93.5t-93.5 226.5t93.5 226.5t226.5 93.5q126 0 218 -86l360 180q-2 22 -2 34q0 133 93.5 226.5t226.5 93.5 t226.5 -93.5t93.5 -226.5t-93.5 -226.5t-226.5 -93.5q-126 0 -218 86l-360 -180q2 -22 2 -34t-2 -34l360 -180q92 86 218 86z" />
+<glyph unicode="&#xf1e1;" d="M1280 341q0 88 -62.5 151t-150.5 63q-84 0 -145 -58l-241 120q2 16 2 23t-2 23l241 120q61 -58 145 -58q88 0 150.5 63t62.5 151t-62.5 150.5t-150.5 62.5t-151 -62.5t-63 -150.5q0 -7 2 -23l-241 -120q-62 57 -145 57q-88 0 -150.5 -62.5t-62.5 -150.5t62.5 -150.5 t150.5 -62.5q83 0 145 57l241 -120q-2 -16 -2 -23q0 -88 63 -150.5t151 -62.5t150.5 62.5t62.5 150.5zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf1e2;" horiz-adv-x="1792" d="M571 947q-10 25 -34 35t-49 0q-108 -44 -191 -127t-127 -191q-10 -25 0 -49t35 -34q13 -5 24 -5q42 0 60 40q34 84 98.5 148.5t148.5 98.5q25 11 35 35t0 49zM1513 1303l46 -46l-244 -243l68 -68q19 -19 19 -45.5t-19 -45.5l-64 -64q89 -161 89 -343q0 -143 -55.5 -273.5 t-150 -225t-225 -150t-273.5 -55.5t-273.5 55.5t-225 150t-150 225t-55.5 273.5t55.5 273.5t150 225t225 150t273.5 55.5q182 0 343 -89l64 64q19 19 45.5 19t45.5 -19l68 -68zM1521 1359q-10 -10 -22 -10q-13 0 -23 10l-91 90q-9 10 -9 23t9 23q10 9 23 9t23 -9l90 -91 q10 -9 10 -22.5t-10 -22.5zM1751 1129q-11 -9 -23 -9t-23 9l-90 91q-10 9 -10 22.5t10 22.5q9 10 22.5 10t22.5 -10l91 -90q9 -10 9 -23t-9 -23zM1792 1312q0 -14 -9 -23t-23 -9h-96q-14 0 -23 9t-9 23t9 23t23 9h96q14 0 23 -9t9 -23zM1600 1504v-96q0 -14 -9 -23t-23 -9 t-23 9t-9 23v96q0 14 9 23t23 9t23 -9t9 -23zM1751 1449l-91 -90q-10 -10 -22 -10q-13 0 -23 10q-10 9 -10 22.5t10 22.5l90 91q10 9 23 9t23 -9q9 -10 9 -23t-9 -23z" />
+<glyph unicode="&#xf1e3;" horiz-adv-x="1792" d="M609 720l287 208l287 -208l-109 -336h-355zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM1515 186q149 203 149 454v3l-102 -89l-240 224l63 323 l134 -12q-150 206 -389 282l53 -124l-287 -159l-287 159l53 124q-239 -76 -389 -282l135 12l62 -323l-240 -224l-102 89v-3q0 -251 149 -454l30 132l326 -40l139 -298l-116 -69q117 -39 240 -39t240 39l-116 69l139 298l326 40z" />
+<glyph unicode="&#xf1e4;" horiz-adv-x="1792" d="M448 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM256 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM832 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23 v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM640 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM66 768q-28 0 -47 19t-19 46v129h514v-129q0 -27 -19 -46t-46 -19h-383zM1216 224v-192q0 -14 -9 -23t-23 -9h-192 q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1024 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1600 224v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23 zM1408 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 1016v-13h-514v10q0 104 -382 102q-382 -1 -382 -102v-10h-514v13q0 17 8.5 43t34 64t65.5 75.5t110.5 76t160 67.5t224 47.5t293.5 18.5t293 -18.5t224 -47.5 t160.5 -67.5t110.5 -76t65.5 -75.5t34 -64t8.5 -43zM1792 608v-192q0 -14 -9 -23t-23 -9h-192q-14 0 -23 9t-9 23v192q0 14 9 23t23 9h192q14 0 23 -9t9 -23zM1792 962v-129q0 -27 -19 -46t-46 -19h-384q-27 0 -46 19t-19 46v129h514z" />
+<glyph unicode="&#xf1e5;" horiz-adv-x="1792" d="M704 1216v-768q0 -26 -19 -45t-45 -19v-576q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v512l249 873q7 23 31 23h424zM1024 1216v-704h-256v704h256zM1792 320v-512q0 -26 -19 -45t-45 -19h-512q-26 0 -45 19t-19 45v576q-26 0 -45 19t-19 45v768h424q24 0 31 -23z M736 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23zM1408 1504v-224h-352v224q0 14 9 23t23 9h288q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1e6;" horiz-adv-x="1792" d="M1755 1083q37 -37 37 -90t-37 -91l-401 -400l150 -150l-160 -160q-163 -163 -389.5 -186.5t-411.5 100.5l-362 -362h-181v181l362 362q-124 185 -100.5 411.5t186.5 389.5l160 160l150 -150l400 401q38 37 91 37t90 -37t37 -90.5t-37 -90.5l-400 -401l234 -234l401 400 q38 37 91 37t90 -37z" />
+<glyph unicode="&#xf1e7;" horiz-adv-x="1792" d="M873 796q0 -83 -63.5 -142.5t-152.5 -59.5t-152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59t152.5 -59t63.5 -143zM1375 796q0 -83 -63 -142.5t-153 -59.5q-89 0 -152.5 59.5t-63.5 142.5q0 84 63.5 143t152.5 59q90 0 153 -59t63 -143zM1600 616v667q0 87 -32 123.5 t-111 36.5h-1112q-83 0 -112.5 -34t-29.5 -126v-673q43 -23 88.5 -40t81 -28t81 -18.5t71 -11t70 -4t58.5 -0.5t56.5 2t44.5 2q68 1 95 -27q6 -6 10 -9q26 -25 61 -51q7 91 118 87q5 0 36.5 -1.5t43 -2t45.5 -1t53 1t54.5 4.5t61 8.5t62 13.5t67 19.5t67.5 27t72 34.5z M1763 621q-121 -149 -372 -252q84 -285 -23 -465q-66 -113 -183 -148q-104 -32 -182 15q-86 51 -82 164l-1 326v1q-8 2 -24.5 6t-23.5 5l-1 -338q4 -114 -83 -164q-79 -47 -183 -15q-117 36 -182 150q-105 180 -22 463q-251 103 -372 252q-25 37 -4 63t60 -1q3 -2 11 -7 t11 -8v694q0 72 47 123t114 51h1257q67 0 114 -51t47 -123v-694l21 15q39 27 60 1t-4 -63z" />
+<glyph unicode="&#xf1e8;" horiz-adv-x="1792" d="M896 1102v-434h-145v434h145zM1294 1102v-434h-145v434h145zM1294 342l253 254v795h-1194v-1049h326v-217l217 217h398zM1692 1536v-1013l-434 -434h-326l-217 -217h-217v217h-398v1158l109 289h1483z" />
+<glyph unicode="&#xf1e9;" d="M773 217v-127q-1 -292 -6 -305q-12 -32 -51 -40q-54 -9 -181.5 38t-162.5 89q-13 15 -17 36q-1 12 4 26q4 10 34 47t181 216q1 0 60 70q15 19 39.5 24.5t49.5 -3.5q24 -10 37.5 -29t12.5 -42zM624 468q-3 -55 -52 -70l-120 -39q-275 -88 -292 -88q-35 2 -54 36 q-12 25 -17 75q-8 76 1 166.5t30 124.5t56 32q13 0 202 -77q70 -29 115 -47l84 -34q23 -9 35.5 -30.5t11.5 -48.5zM1450 171q-7 -54 -91.5 -161t-135.5 -127q-37 -14 -63 7q-14 10 -184 287l-47 77q-14 21 -11.5 46t19.5 46q35 43 83 26q1 -1 119 -40q203 -66 242 -79.5 t47 -20.5q28 -22 22 -61zM778 803q5 -102 -54 -122q-58 -17 -114 71l-378 598q-8 35 19 62q41 43 207.5 89.5t224.5 31.5q40 -10 49 -45q3 -18 22 -305.5t24 -379.5zM1440 695q3 -39 -26 -59q-15 -10 -329 -86q-67 -15 -91 -23l1 2q-23 -6 -46 4t-37 32q-30 47 0 87 q1 1 75 102q125 171 150 204t34 39q28 19 65 2q48 -23 123 -133.5t81 -167.5v-3z" />
+<glyph unicode="&#xf1ea;" horiz-adv-x="2048" d="M1024 1024h-384v-384h384v384zM1152 384v-128h-640v128h640zM1152 1152v-640h-640v640h640zM1792 384v-128h-512v128h512zM1792 640v-128h-512v128h512zM1792 896v-128h-512v128h512zM1792 1152v-128h-512v128h512zM256 192v960h-128v-960q0 -26 19 -45t45 -19t45 19 t19 45zM1920 192v1088h-1536v-1088q0 -33 -11 -64h1483q26 0 45 19t19 45zM2048 1408v-1216q0 -80 -56 -136t-136 -56h-1664q-80 0 -136 56t-56 136v1088h256v128h1792z" />
+<glyph unicode="&#xf1eb;" horiz-adv-x="2048" d="M1024 13q-20 0 -93 73.5t-73 93.5q0 32 62.5 54t103.5 22t103.5 -22t62.5 -54q0 -20 -73 -93.5t-93 -73.5zM1294 284q-2 0 -40 25t-101.5 50t-128.5 25t-128.5 -25t-101 -50t-40.5 -25q-18 0 -93.5 75t-75.5 93q0 13 10 23q78 77 196 121t233 44t233 -44t196 -121 q10 -10 10 -23q0 -18 -75.5 -93t-93.5 -75zM1567 556q-11 0 -23 8q-136 105 -252 154.5t-268 49.5q-85 0 -170.5 -22t-149 -53t-113.5 -62t-79 -53t-31 -22q-17 0 -92 75t-75 93q0 12 10 22q132 132 320 205t380 73t380 -73t320 -205q10 -10 10 -22q0 -18 -75 -93t-92 -75z M1838 827q-11 0 -22 9q-179 157 -371.5 236.5t-420.5 79.5t-420.5 -79.5t-371.5 -236.5q-11 -9 -22 -9q-17 0 -92.5 75t-75.5 93q0 13 10 23q187 186 445 288t527 102t527 -102t445 -288q10 -10 10 -23q0 -18 -75.5 -93t-92.5 -75z" />
+<glyph unicode="&#xf1ec;" horiz-adv-x="1792" d="M384 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM384 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5 t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 0q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5 t37.5 90.5zM384 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1152 384q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM768 768q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1536 0v384q0 52 -38 90t-90 38t-90 -38t-38 -90v-384q0 -52 38 -90t90 -38t90 38t38 90zM1152 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5z M1536 1088v256q0 26 -19 45t-45 19h-1280q-26 0 -45 -19t-19 -45v-256q0 -26 19 -45t45 -19h1280q26 0 45 19t19 45zM1536 768q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1664 1408v-1536q0 -52 -38 -90t-90 -38 h-1408q-52 0 -90 38t-38 90v1536q0 52 38 90t90 38h1408q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1ed;" d="M1519 890q18 -84 -4 -204q-87 -444 -565 -444h-44q-25 0 -44 -16.5t-24 -42.5l-4 -19l-55 -346l-2 -15q-5 -26 -24.5 -42.5t-44.5 -16.5h-251q-21 0 -33 15t-9 36q9 56 26.5 168t26.5 168t27 167.5t27 167.5q5 37 43 37h131q133 -2 236 21q175 39 287 144q102 95 155 246 q24 70 35 133q1 6 2.5 7.5t3.5 1t6 -3.5q79 -59 98 -162zM1347 1172q0 -107 -46 -236q-80 -233 -302 -315q-113 -40 -252 -42q0 -1 -90 -1l-90 1q-100 0 -118 -96q-2 -8 -85 -530q-1 -10 -12 -10h-295q-22 0 -36.5 16.5t-11.5 38.5l232 1471q5 29 27.5 48t51.5 19h598 q34 0 97.5 -13t111.5 -32q107 -41 163.5 -123t56.5 -196z" />
+<glyph unicode="&#xf1ee;" horiz-adv-x="1792" d="M602 949q19 -61 31 -123.5t17 -141.5t-14 -159t-62 -145q-21 81 -67 157t-95.5 127t-99 90.5t-78.5 57.5t-33 19q-62 34 -81.5 100t14.5 128t101 81.5t129 -14.5q138 -83 238 -177zM927 1236q11 -25 20.5 -46t36.5 -100.5t42.5 -150.5t25.5 -179.5t0 -205.5t-47.5 -209.5 t-105.5 -208.5q-51 -72 -138 -72q-54 0 -98 31q-57 40 -69 109t28 127q60 85 81 195t13 199.5t-32 180.5t-39 128t-22 52q-31 63 -8.5 129.5t85.5 97.5q34 17 75 17q47 0 88.5 -25t63.5 -69zM1248 567q-17 -160 -72 -311q-17 131 -63 246q25 174 -5 361q-27 178 -94 342 q114 -90 212 -211q9 -37 15 -80q26 -179 7 -347zM1520 1440q9 -17 23.5 -49.5t43.5 -117.5t50.5 -178t34 -227.5t5 -269t-47 -300t-112.5 -323.5q-22 -48 -66 -75.5t-95 -27.5q-39 0 -74 16q-67 31 -92.5 100t4.5 136q58 126 90 257.5t37.5 239.5t-3.5 213.5t-26.5 180.5 t-38.5 138.5t-32.5 90t-15.5 32.5q-34 65 -11.5 135.5t87.5 104.5q37 20 81 20q49 0 91.5 -25.5t66.5 -70.5z" />
+<glyph unicode="&#xf1f0;" horiz-adv-x="2304" d="M1975 546h-138q14 37 66 179l3 9q4 10 10 26t9 26l12 -55zM531 611l-58 295q-11 54 -75 54h-268l-2 -13q311 -79 403 -336zM710 960l-162 -438l-17 89q-26 70 -85 129.5t-131 88.5l135 -510h175l261 641h-176zM849 318h166l104 642h-166zM1617 944q-69 27 -149 27 q-123 0 -201 -59t-79 -153q-1 -102 145 -174q48 -23 67 -41t19 -39q0 -30 -30 -46t-69 -16q-86 0 -156 33l-22 11l-23 -144q74 -34 185 -34q130 -1 208.5 59t80.5 160q0 106 -140 174q-49 25 -71 42t-22 38q0 22 24.5 38.5t70.5 16.5q70 1 124 -24l15 -8zM2042 960h-128 q-65 0 -87 -54l-246 -588h174l35 96h212q5 -22 20 -96h154zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f1;" horiz-adv-x="2304" d="M671 603h-13q-47 0 -47 -32q0 -22 20 -22q17 0 28 15t12 39zM1066 639h62v3q1 4 0.5 6.5t-1 7t-2 8t-4.5 6.5t-7.5 5t-11.5 2q-28 0 -36 -38zM1606 603h-12q-48 0 -48 -32q0 -22 20 -22q17 0 28 15t12 39zM1925 629q0 41 -30 41q-19 0 -31 -20t-12 -51q0 -42 28 -42 q20 0 32.5 20t12.5 52zM480 770h87l-44 -262h-56l32 201l-71 -201h-39l-4 200l-34 -200h-53l44 262h81l2 -163zM733 663q0 -6 -4 -42q-16 -101 -17 -113h-47l1 22q-20 -26 -58 -26q-23 0 -37.5 16t-14.5 42q0 39 26 60.5t73 21.5q14 0 23 -1q0 3 0.5 5.5t1 4.5t0.5 3 q0 20 -36 20q-29 0 -59 -10q0 4 7 48q38 11 67 11q74 0 74 -62zM889 721l-8 -49q-22 3 -41 3q-27 0 -27 -17q0 -8 4.5 -12t21.5 -11q40 -19 40 -60q0 -72 -87 -71q-34 0 -58 6q0 2 7 49q29 -8 51 -8q32 0 32 19q0 7 -4.5 11.5t-21.5 12.5q-43 20 -43 59q0 72 84 72 q30 0 50 -4zM977 721h28l-7 -52h-29q-2 -17 -6.5 -40.5t-7 -38.5t-2.5 -18q0 -16 19 -16q8 0 16 2l-8 -47q-21 -7 -40 -7q-43 0 -45 47q0 12 8 56q3 20 25 146h55zM1180 648q0 -23 -7 -52h-111q-3 -22 10 -33t38 -11q30 0 58 14l-9 -54q-30 -8 -57 -8q-95 0 -95 95 q0 55 27.5 90.5t69.5 35.5q35 0 55.5 -21t20.5 -56zM1319 722q-13 -23 -22 -62q-22 2 -31 -24t-25 -128h-56l3 14q22 130 29 199h51l-3 -33q14 21 25.5 29.5t28.5 4.5zM1506 763l-9 -57q-28 14 -50 14q-31 0 -51 -27.5t-20 -70.5q0 -30 13.5 -47t38.5 -17q21 0 48 13 l-10 -59q-28 -8 -50 -8q-45 0 -71.5 30.5t-26.5 82.5q0 70 35.5 114.5t91.5 44.5q26 0 61 -13zM1668 663q0 -18 -4 -42q-13 -79 -17 -113h-46l1 22q-20 -26 -59 -26q-23 0 -37 16t-14 42q0 39 25.5 60.5t72.5 21.5q15 0 23 -1q2 7 2 13q0 20 -36 20q-29 0 -59 -10q0 4 8 48 q38 11 67 11q73 0 73 -62zM1809 722q-14 -24 -21 -62q-23 2 -31.5 -23t-25.5 -129h-56l3 14q19 104 29 199h52q0 -11 -4 -33q15 21 26.5 29.5t27.5 4.5zM1950 770h56l-43 -262h-53l3 19q-23 -23 -52 -23q-31 0 -49.5 24t-18.5 64q0 53 27.5 92t64.5 39q31 0 53 -29z M2061 640q0 148 -72.5 273t-198 198t-273.5 73q-181 0 -328 -110q127 -116 171 -284h-50q-44 150 -158 253q-114 -103 -158 -253h-50q44 168 171 284q-147 110 -328 110q-148 0 -273.5 -73t-198 -198t-72.5 -273t72.5 -273t198 -198t273.5 -73q181 0 328 110 q-120 111 -165 264h50q46 -138 152 -233q106 95 152 233h50q-45 -153 -165 -264q147 -110 328 -110q148 0 273.5 73t198 198t72.5 273zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f2;" horiz-adv-x="2304" d="M313 759q0 -51 -36 -84q-29 -26 -89 -26h-17v220h17q61 0 89 -27q36 -31 36 -83zM2089 824q0 -52 -64 -52h-19v101h20q63 0 63 -49zM380 759q0 74 -50 120.5t-129 46.5h-95v-333h95q74 0 119 38q60 51 60 128zM410 593h65v333h-65v-333zM730 694q0 40 -20.5 62t-75.5 42 q-29 10 -39.5 19t-10.5 23q0 16 13.5 26.5t34.5 10.5q29 0 53 -27l34 44q-41 37 -98 37q-44 0 -74 -27.5t-30 -67.5q0 -35 18 -55.5t64 -36.5q37 -13 45 -19q19 -12 19 -34q0 -20 -14 -33.5t-36 -13.5q-48 0 -71 44l-42 -40q44 -64 115 -64q51 0 83 30.5t32 79.5zM1008 604 v77q-37 -37 -78 -37q-49 0 -80.5 32.5t-31.5 82.5q0 48 31.5 81.5t77.5 33.5q43 0 81 -38v77q-40 20 -80 20q-74 0 -125.5 -50.5t-51.5 -123.5t51 -123.5t125 -50.5q42 0 81 19zM2240 0v527q-65 -40 -144.5 -84t-237.5 -117t-329.5 -137.5t-417.5 -134.5t-504 -118h1569 q26 0 45 19t19 45zM1389 757q0 75 -53 128t-128 53t-128 -53t-53 -128t53 -128t128 -53t128 53t53 128zM1541 584l144 342h-71l-90 -224l-89 224h-71l142 -342h35zM1714 593h184v56h-119v90h115v56h-115v74h119v57h-184v-333zM2105 593h80l-105 140q76 16 76 94q0 47 -31 73 t-87 26h-97v-333h65v133h9zM2304 1274v-1268q0 -56 -38.5 -95t-93.5 -39h-2040q-55 0 -93.5 39t-38.5 95v1268q0 56 38.5 95t93.5 39h2040q55 0 93.5 -39t38.5 -95z" />
+<glyph unicode="&#xf1f3;" horiz-adv-x="2304" d="M119 854h89l-45 108zM740 328l74 79l-70 79h-163v-49h142v-55h-142v-54h159zM898 406l99 -110v217zM1186 453q0 33 -40 33h-84v-69h83q41 0 41 36zM1475 457q0 29 -42 29h-82v-61h81q43 0 43 32zM1197 923q0 29 -42 29h-82v-60h81q43 0 43 31zM1656 854h89l-44 108z M699 1009v-271h-66v212l-94 -212h-57l-94 212v-212h-132l-25 60h-135l-25 -60h-70l116 271h96l110 -257v257h106l85 -184l77 184h108zM1255 453q0 -20 -5.5 -35t-14 -25t-22.5 -16.5t-26 -10t-31.5 -4.5t-31.5 -1t-32.5 0.5t-29.5 0.5v-91h-126l-80 90l-83 -90h-256v271h260 l80 -89l82 89h207q109 0 109 -89zM964 794v-56h-217v271h217v-57h-152v-49h148v-55h-148v-54h152zM2304 235v-229q0 -55 -38.5 -94.5t-93.5 -39.5h-2040q-55 0 -93.5 39.5t-38.5 94.5v678h111l25 61h55l25 -61h218v46l19 -46h113l20 47v-47h541v99l10 1q10 0 10 -14v-86h279 v23q23 -12 55 -18t52.5 -6.5t63 0.5t51.5 1l25 61h56l25 -61h227v58l34 -58h182v378h-180v-44l-25 44h-185v-44l-23 44h-249q-69 0 -109 -22v22h-172v-22q-24 22 -73 22h-628l-43 -97l-43 97h-198v-44l-22 44h-169l-78 -179v391q0 55 38.5 94.5t93.5 39.5h2040 q55 0 93.5 -39.5t38.5 -94.5v-678h-120q-51 0 -81 -22v22h-177q-55 0 -78 -22v22h-316v-22q-31 22 -87 22h-209v-22q-23 22 -91 22h-234l-54 -58l-50 58h-349v-378h343l55 59l52 -59h211v89h21q59 0 90 13v-102h174v99h8q8 0 10 -2t2 -10v-87h529q57 0 88 24v-24h168 q60 0 95 17zM1546 469q0 -23 -12 -43t-34 -29q25 -9 34 -26t9 -46v-54h-65v45q0 33 -12 43.5t-46 10.5h-69v-99h-65v271h154q48 0 77 -15t29 -58zM1269 936q0 -24 -12.5 -44t-33.5 -29q26 -9 34.5 -25.5t8.5 -46.5v-53h-65q0 9 0.5 26.5t0 25t-3 18.5t-8.5 16t-17.5 8.5 t-29.5 3.5h-70v-98h-64v271l153 -1q49 0 78 -14.5t29 -57.5zM1798 327v-56h-216v271h216v-56h-151v-49h148v-55h-148v-54zM1372 1009v-271h-66v271h66zM2065 357q0 -86 -102 -86h-126v58h126q34 0 34 25q0 16 -17 21t-41.5 5t-49.5 3.5t-42 22.5t-17 55q0 39 26 60t66 21 h130v-57h-119q-36 0 -36 -25q0 -16 17.5 -20.5t42 -4t49 -2.5t42 -21.5t17.5 -54.5zM2304 407v-101q-24 -35 -88 -35h-125v58h125q33 0 33 25q0 13 -12.5 19t-31 5.5t-40 2t-40 8t-31 24t-12.5 48.5q0 39 26.5 60t66.5 21h129v-57h-118q-36 0 -36 -25q0 -20 29 -22t68.5 -5 t56.5 -26zM2139 1008v-270h-92l-122 203v-203h-132l-26 60h-134l-25 -60h-75q-129 0 -129 133q0 138 133 138h63v-59q-7 0 -28 1t-28.5 0.5t-23 -2t-21.5 -6.5t-14.5 -13.5t-11.5 -23t-3 -33.5q0 -38 13.5 -58t49.5 -20h29l92 213h97l109 -256v256h99l114 -188v188h66z" />
+<glyph unicode="&#xf1f4;" horiz-adv-x="2304" d="M745 630q0 -37 -25.5 -61.5t-62.5 -24.5q-29 0 -46.5 16t-17.5 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM1530 779q0 -42 -22 -57t-66 -15l-32 -1l17 107q2 11 13 11h18q22 0 35 -2t25 -12.5t12 -30.5zM1881 630q0 -36 -25.5 -61t-61.5 -25q-29 0 -47 16 t-18 44q0 37 25 62.5t62 25.5q28 0 46.5 -16.5t18.5 -45.5zM513 801q0 59 -38.5 85.5t-100.5 26.5h-160q-19 0 -21 -19l-65 -408q-1 -6 3 -11t10 -5h76q20 0 22 19l18 110q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM822 489l41 261q1 6 -3 11t-10 5h-76 q-14 0 -17 -33q-27 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q28 0 58 12t48 32q-4 -12 -4 -21q0 -16 13 -16h69q19 0 22 19zM1269 752q0 5 -4 9.5t-9 4.5h-77q-11 0 -18 -10l-106 -156l-44 150q-5 16 -22 16h-75q-5 0 -9 -4.5t-4 -9.5q0 -2 19.5 -59 t42 -123t23.5 -70q-82 -112 -82 -120q0 -13 13 -13h77q11 0 18 10l255 368q2 2 2 7zM1649 801q0 59 -38.5 85.5t-100.5 26.5h-159q-20 0 -22 -19l-65 -408q-1 -6 3 -11t10 -5h82q12 0 16 13l18 116q1 8 7 13t15 6.5t17 1.5t19 -1t14 -1q86 0 135 48.5t49 134.5zM1958 489 l41 261q1 6 -3 11t-10 5h-76q-14 0 -17 -33q-26 40 -95 40q-72 0 -122.5 -54t-50.5 -127q0 -59 34.5 -94t92.5 -35q29 0 59 12t47 32q0 -1 -2 -9t-2 -12q0 -16 13 -16h69q19 0 22 19zM2176 898v1q0 14 -13 14h-74q-11 0 -13 -11l-65 -416l-1 -2q0 -5 4 -9.5t10 -4.5h66 q19 0 21 19zM392 764q-5 -35 -26 -46t-60 -11l-33 -1l17 107q2 11 13 11h19q40 0 58 -11.5t12 -48.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f5;" horiz-adv-x="2304" d="M1597 633q0 -69 -21 -106q-19 -35 -52 -35q-23 0 -41 9v224q29 30 57 30q57 0 57 -122zM2035 669h-110q6 98 56 98q51 0 54 -98zM476 534q0 59 -33 91.5t-101 57.5q-36 13 -52 24t-16 25q0 26 38 26q58 0 124 -33l18 112q-67 32 -149 32q-77 0 -123 -38q-48 -39 -48 -109 q0 -58 32.5 -90.5t99.5 -56.5q39 -14 54.5 -25.5t15.5 -27.5q0 -31 -48 -31q-29 0 -70 12.5t-72 30.5l-18 -113q72 -41 168 -41q81 0 129 37q51 41 51 117zM771 749l19 111h-96v135l-129 -21l-18 -114l-46 -8l-17 -103h62v-219q0 -84 44 -120q38 -30 111 -30q32 0 79 11v118 q-32 -7 -44 -7q-42 0 -42 50v197h77zM1087 724v139q-15 3 -28 3q-32 0 -55.5 -16t-33.5 -46l-10 56h-131v-471h150v306q26 31 82 31q16 0 26 -2zM1124 389h150v471h-150v-471zM1746 638q0 122 -45 179q-40 52 -111 52q-64 0 -117 -56l-8 47h-132v-645l150 25v151 q36 -11 68 -11q83 0 134 56q61 65 61 202zM1278 986q0 33 -23 56t-56 23t-56 -23t-23 -56t23 -56.5t56 -23.5t56 23.5t23 56.5zM2176 629q0 113 -48 176q-50 64 -144 64q-96 0 -151.5 -66t-55.5 -180q0 -128 63 -188q55 -55 161 -55q101 0 160 40l-16 103q-57 -31 -128 -31 q-43 0 -63 19q-23 19 -28 66h248q2 14 2 52zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf1f6;" horiz-adv-x="2048" d="M1558 684q61 -356 298 -556q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5zM1024 -176q16 0 16 16t-16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5zM2026 1424q8 -10 7.5 -23.5t-10.5 -22.5 l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5 l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="&#xf1f7;" horiz-adv-x="2048" d="M1040 -160q0 16 -16 16q-59 0 -101.5 42.5t-42.5 101.5q0 16 -16 16t-16 -16q0 -73 51.5 -124.5t124.5 -51.5q16 0 16 16zM503 315l877 760q-42 88 -132.5 146.5t-223.5 58.5q-93 0 -169.5 -31.5t-121.5 -80.5t-69 -103t-24 -105q0 -384 -137 -645zM1856 128 q0 -52 -38 -90t-90 -38h-448q0 -106 -75 -181t-181 -75t-180.5 74.5t-75.5 180.5l149 129h757q-166 187 -227 459l111 97q61 -356 298 -556zM1942 1520l84 -96q8 -10 7.5 -23.5t-10.5 -22.5l-1872 -1622q-10 -8 -23.5 -7t-21.5 11l-84 96q-8 10 -7.5 23.5t10.5 21.5l186 161 q-19 32 -19 66q50 42 91 88t85 119.5t74.5 158.5t50 206t19.5 260q0 152 117 282.5t307 158.5q-8 19 -8 39q0 40 28 68t68 28t68 -28t28 -68q0 -20 -8 -39q124 -18 219 -82.5t148 -157.5l418 363q10 8 23.5 7t21.5 -11z" />
+<glyph unicode="&#xf1f8;" horiz-adv-x="1408" d="M512 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM768 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1024 160v704q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-704 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM480 1152h448l-48 117q-7 9 -17 11h-317q-10 -2 -17 -11zM1408 1120v-64q0 -14 -9 -23t-23 -9h-96v-948q0 -83 -47 -143.5t-113 -60.5h-832q-66 0 -113 58.5t-47 141.5v952h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h309l70 167 q15 37 54 63t79 26h320q40 0 79 -26t54 -63l70 -167h309q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf1f9;" d="M1150 462v-109q0 -50 -36.5 -89t-94 -60.5t-118 -32.5t-117.5 -11q-205 0 -342.5 139t-137.5 346q0 203 136 339t339 136q34 0 75.5 -4.5t93 -18t92.5 -34t69 -56.5t28 -81v-109q0 -16 -16 -16h-118q-16 0 -16 16v70q0 43 -65.5 67.5t-137.5 24.5q-140 0 -228.5 -91.5 t-88.5 -237.5q0 -151 91.5 -249.5t233.5 -98.5q68 0 138 24t70 66v70q0 7 4.5 11.5t10.5 4.5h119q6 0 11 -4.5t5 -11.5zM768 1280q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51t248.5 51t204 136.5t136.5 204t51 248.5 t-51 248.5t-136.5 204t-204 136.5t-248.5 51zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf1fa;" d="M972 761q0 108 -53.5 169t-147.5 61q-63 0 -124 -30.5t-110 -84.5t-79.5 -137t-30.5 -180q0 -112 53.5 -173t150.5 -61q96 0 176 66.5t122.5 166t42.5 203.5zM1536 640q0 -111 -37 -197t-98.5 -135t-131.5 -74.5t-145 -27.5q-6 0 -15.5 -0.5t-16.5 -0.5q-95 0 -142 53 q-28 33 -33 83q-52 -66 -131.5 -110t-173.5 -44q-161 0 -249.5 95.5t-88.5 269.5q0 157 66 290t179 210.5t246 77.5q87 0 155 -35.5t106 -99.5l2 19l11 56q1 6 5.5 12t9.5 6h118q5 0 13 -11q5 -5 3 -16l-120 -614q-5 -24 -5 -48q0 -39 12.5 -52t44.5 -13q28 1 57 5.5t73 24 t77 50t57 89.5t24 137q0 292 -174 466t-466 174q-130 0 -248.5 -51t-204 -136.5t-136.5 -204t-51 -248.5t51 -248.5t136.5 -204t204 -136.5t248.5 -51q228 0 405 144q11 9 24 8t21 -12l41 -49q8 -12 7 -24q-2 -13 -12 -22q-102 -83 -227.5 -128t-258.5 -45q-156 0 -298 61 t-245 164t-164 245t-61 298t61 298t164 245t245 164t298 61q344 0 556 -212t212 -556z" />
+<glyph unicode="&#xf1fb;" horiz-adv-x="1792" d="M1698 1442q94 -94 94 -226.5t-94 -225.5l-225 -223l104 -104q10 -10 10 -23t-10 -23l-210 -210q-10 -10 -23 -10t-23 10l-105 105l-603 -603q-37 -37 -90 -37h-203l-256 -128l-64 64l128 256v203q0 53 37 90l603 603l-105 105q-10 10 -10 23t10 23l210 210q10 10 23 10 t23 -10l104 -104l223 225q93 94 225.5 94t226.5 -94zM512 64l576 576l-192 192l-576 -576v-192h192z" />
+<glyph unicode="&#xf1fc;" horiz-adv-x="1792" d="M1615 1536q70 0 122.5 -46.5t52.5 -116.5q0 -63 -45 -151q-332 -629 -465 -752q-97 -91 -218 -91q-126 0 -216.5 92.5t-90.5 219.5q0 128 92 212l638 579q59 54 130 54zM706 502q39 -76 106.5 -130t150.5 -76l1 -71q4 -213 -129.5 -347t-348.5 -134q-123 0 -218 46.5 t-152.5 127.5t-86.5 183t-29 220q7 -5 41 -30t62 -44.5t59 -36.5t46 -17q41 0 55 37q25 66 57.5 112.5t69.5 76t88 47.5t103 25.5t125 10.5z" />
+<glyph unicode="&#xf1fd;" horiz-adv-x="1792" d="M1792 128v-384h-1792v384q45 0 85 14t59 27.5t47 37.5q30 27 51.5 38t56.5 11t55.5 -11t52.5 -38q29 -25 47 -38t58 -27t86 -14q45 0 85 14.5t58 27t48 37.5q21 19 32.5 27t31 15t43.5 7q35 0 56.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14t85 14t59 27.5t47 37.5 q30 27 51.5 38t56.5 11q34 0 55.5 -11t51.5 -38q28 -24 47 -37.5t59 -27.5t85 -14zM1792 448v-192q-35 0 -55.5 11t-52.5 38q-29 25 -47 38t-58 27t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-22 -19 -33 -27t-31 -15t-44 -7q-35 0 -56.5 11t-51.5 38q-29 25 -47 38t-58 27 t-86 14q-45 0 -85 -14.5t-58 -27t-48 -37.5q-21 -19 -32.5 -27t-31 -15t-43.5 -7q-35 0 -56.5 11t-51.5 38q-28 24 -47 37.5t-59 27.5t-85 14q-46 0 -86 -14t-58 -27t-47 -38q-30 -27 -51.5 -38t-56.5 -11v192q0 80 56 136t136 56h64v448h256v-448h256v448h256v-448h256v448 h256v-448h64q80 0 136 -56t56 -136zM512 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1024 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51 t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150zM1536 1312q0 -77 -36 -118.5t-92 -41.5q-53 0 -90.5 37.5t-37.5 90.5q0 29 9.5 51t23.5 34t31 28t31 31.5t23.5 44.5t9.5 67q38 0 83 -74t45 -150z" />
+<glyph unicode="&#xf1fe;" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1664 1024l256 -896h-1664v576l448 576l576 -576z" />
+<glyph unicode="&#xf200;" horiz-adv-x="1792" d="M768 646l546 -546q-106 -108 -247.5 -168t-298.5 -60q-209 0 -385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103v-762zM955 640h773q0 -157 -60 -298.5t-168 -247.5zM1664 768h-768v768q209 0 385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf201;" horiz-adv-x="2048" d="M2048 0v-128h-2048v1536h128v-1408h1920zM1920 1248v-435q0 -21 -19.5 -29.5t-35.5 7.5l-121 121l-633 -633q-10 -10 -23 -10t-23 10l-233 233l-416 -416l-192 192l585 585q10 10 23 10t23 -10l233 -233l464 464l-121 121q-16 16 -7.5 35.5t29.5 19.5h435q14 0 23 -9 t9 -23z" />
+<glyph unicode="&#xf202;" horiz-adv-x="1792" d="M1292 832q0 -6 10 -41q10 -29 25 -49.5t41 -34t44 -20t55 -16.5q325 -91 325 -332q0 -146 -105.5 -242.5t-254.5 -96.5q-59 0 -111.5 18.5t-91.5 45.5t-77 74.5t-63 87.5t-53.5 103.5t-43.5 103t-39.5 106.5t-35.5 95q-32 81 -61.5 133.5t-73.5 96.5t-104 64t-142 20 q-96 0 -183 -55.5t-138 -144.5t-51 -185q0 -160 106.5 -279.5t263.5 -119.5q177 0 258 95q56 63 83 116l84 -152q-15 -34 -44 -70l1 -1q-131 -152 -388 -152q-147 0 -269.5 79t-190.5 207.5t-68 274.5q0 105 43.5 206t116 176.5t172 121.5t204.5 46q87 0 159 -19t123.5 -50 t95 -80t72.5 -99t58.5 -117t50.5 -124.5t50 -130.5t55 -127q96 -200 233 -200q81 0 138.5 48.5t57.5 128.5q0 42 -19 72t-50.5 46t-72.5 31.5t-84.5 27t-87.5 34t-81 52t-65 82t-39 122.5q-3 16 -3 33q0 110 87.5 192t198.5 78q78 -3 120.5 -14.5t90.5 -53.5h-1 q12 -11 23 -24.5t26 -36t19 -27.5l-129 -99q-26 49 -54 70v1q-23 21 -97 21q-49 0 -84 -33t-35 -83z" />
+<glyph unicode="&#xf203;" d="M1432 484q0 173 -234 239q-35 10 -53 16.5t-38 25t-29 46.5q0 2 -2 8.5t-3 12t-1 7.5q0 36 24.5 59.5t60.5 23.5q54 0 71 -15h-1q20 -15 39 -51l93 71q-39 54 -49 64q-33 29 -67.5 39t-85.5 10q-80 0 -142 -57.5t-62 -137.5q0 -7 2 -23q16 -96 64.5 -140t148.5 -73 q29 -8 49 -15.5t45 -21.5t38.5 -34.5t13.5 -46.5v-5q1 -58 -40.5 -93t-100.5 -35q-97 0 -167 144q-23 47 -51.5 121.5t-48 125.5t-54 110.5t-74 95.5t-103.5 60.5t-147 24.5q-101 0 -192 -56t-144 -148t-50 -192v-1q4 -108 50.5 -199t133.5 -147.5t196 -56.5q186 0 279 110 q20 27 31 51l-60 109q-42 -80 -99 -116t-146 -36q-115 0 -191 87t-76 204q0 105 82 189t186 84q112 0 170 -53.5t104 -172.5q8 -21 25.5 -68.5t28.5 -76.5t31.5 -74.5t38.5 -74t45.5 -62.5t55.5 -53.5t66 -33t80 -13.5q107 0 183 69.5t76 174.5zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf204;" horiz-adv-x="2048" d="M1152 640q0 104 -40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5t198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM1920 640q0 104 -40.5 198.5 t-109.5 163.5t-163.5 109.5t-198.5 40.5h-386q119 -90 188.5 -224t69.5 -288t-69.5 -288t-188.5 -224h386q104 0 198.5 40.5t163.5 109.5t109.5 163.5t40.5 198.5zM2048 640q0 -130 -51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5 t-136.5 204t-51 248.5t51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5z" />
+<glyph unicode="&#xf205;" horiz-adv-x="2048" d="M0 640q0 130 51 248.5t136.5 204t204 136.5t248.5 51h768q130 0 248.5 -51t204 -136.5t136.5 -204t51 -248.5t-51 -248.5t-136.5 -204t-204 -136.5t-248.5 -51h-768q-130 0 -248.5 51t-204 136.5t-136.5 204t-51 248.5zM1408 128q104 0 198.5 40.5t163.5 109.5 t109.5 163.5t40.5 198.5t-40.5 198.5t-109.5 163.5t-163.5 109.5t-198.5 40.5t-198.5 -40.5t-163.5 -109.5t-109.5 -163.5t-40.5 -198.5t40.5 -198.5t109.5 -163.5t163.5 -109.5t198.5 -40.5z" />
+<glyph unicode="&#xf206;" horiz-adv-x="2304" d="M762 384h-314q-40 0 -57.5 35t6.5 67l188 251q-65 31 -137 31q-132 0 -226 -94t-94 -226t94 -226t226 -94q115 0 203 72.5t111 183.5zM576 512h186q-18 85 -75 148zM1056 512l288 384h-480l-99 -132q105 -103 126 -252h165zM2176 448q0 132 -94 226t-226 94 q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94t226 94t94 226zM2304 448q0 -185 -131.5 -316.5t-316.5 -131.5t-316.5 131.5t-131.5 316.5q0 97 39.5 183.5t109.5 149.5l-65 98l-353 -469 q-18 -26 -51 -26h-197q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5t-131.5 316.5t131.5 316.5t316.5 131.5q114 0 215 -55l137 183h-224q-26 0 -45 19t-19 45t19 45t45 19h384v-128h435l-85 128h-222q-26 0 -45 19t-19 45t19 45t45 19h256q33 0 53 -28l267 -400 q91 44 192 44q185 0 316.5 -131.5t131.5 -316.5z" />
+<glyph unicode="&#xf207;" d="M384 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 320q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1362 716l-72 384q-5 23 -22.5 37.5t-40.5 14.5 h-918q-23 0 -40.5 -14.5t-22.5 -37.5l-72 -384q-5 -30 14 -53t49 -23h1062q30 0 49 23t14 53zM1136 1328q0 20 -14 34t-34 14h-640q-20 0 -34 -14t-14 -34t14 -34t34 -14h640q20 0 34 14t14 34zM1536 603v-603h-128v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5 t-37.5 90.5v128h-768v-128q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5v128h-128v603q0 112 25 223l103 454q9 78 97.5 137t230 89t312.5 30t312.5 -30t230 -89t97.5 -137l105 -454q23 -102 23 -223z" />
+<glyph unicode="&#xf208;" horiz-adv-x="2048" d="M1463 704q0 -35 -25 -60.5t-61 -25.5h-702q-36 0 -61 25.5t-25 60.5t25 60.5t61 25.5h702q36 0 61 -25.5t25 -60.5zM1677 704q0 86 -23 170h-982q-36 0 -61 25t-25 60q0 36 25 61t61 25h908q-88 143 -235 227t-320 84q-177 0 -327.5 -87.5t-238 -237.5t-87.5 -327 q0 -86 23 -170h982q36 0 61 -25t25 -60q0 -36 -25 -61t-61 -25h-908q88 -143 235.5 -227t320.5 -84q132 0 253 51.5t208 139t139 208t52 253.5zM2048 959q0 -35 -25 -60t-61 -25h-131q17 -85 17 -170q0 -167 -65.5 -319.5t-175.5 -263t-262.5 -176t-319.5 -65.5 q-246 0 -448.5 133t-301.5 350h-189q-36 0 -61 25t-25 61q0 35 25 60t61 25h132q-17 85 -17 170q0 167 65.5 319.5t175.5 263t262.5 176t320.5 65.5q245 0 447.5 -133t301.5 -350h188q36 0 61 -25t25 -61z" />
+<glyph unicode="&#xf209;" horiz-adv-x="1280" d="M953 1158l-114 -328l117 -21q165 451 165 518q0 56 -38 56q-57 0 -130 -225zM654 471l33 -88q37 42 71 67l-33 5.5t-38.5 7t-32.5 8.5zM362 1367q0 -98 159 -521q18 10 49 10q15 0 75 -5l-121 351q-75 220 -123 220q-19 0 -29 -17.5t-10 -37.5zM283 608q0 -36 51.5 -119 t117.5 -153t100 -70q14 0 25.5 13t11.5 27q0 24 -32 102q-13 32 -32 72t-47.5 89t-61.5 81t-62 32q-20 0 -45.5 -27t-25.5 -47zM125 273q0 -41 25 -104q59 -145 183.5 -227t281.5 -82q227 0 382 170q152 169 152 427q0 43 -1 67t-11.5 62t-30.5 56q-56 49 -211.5 75.5 t-270.5 26.5q-37 0 -49 -11q-12 -5 -12 -35q0 -34 21.5 -60t55.5 -40t77.5 -23.5t87.5 -11.5t85 -4t70 0h23q24 0 40 -19q15 -19 19 -55q-28 -28 -96 -54q-61 -22 -93 -46q-64 -46 -108.5 -114t-44.5 -137q0 -31 18.5 -88.5t18.5 -87.5l-3 -12q-4 -12 -4 -14 q-137 10 -146 216q-8 -2 -41 -2q2 -7 2 -21q0 -53 -40.5 -89.5t-94.5 -36.5q-82 0 -166.5 78t-84.5 159q0 34 33 67q52 -64 60 -76q77 -104 133 -104q12 0 26.5 8.5t14.5 20.5q0 34 -87.5 145t-116.5 111q-43 0 -70 -44.5t-27 -90.5zM11 264q0 101 42.5 163t136.5 88 q-28 74 -28 104q0 62 61 123t122 61q29 0 70 -15q-163 462 -163 567q0 80 41 130.5t119 50.5q131 0 325 -581q6 -17 8 -23q6 16 29 79.5t43.5 118.5t54 127.5t64.5 123t70.5 86.5t76.5 36q71 0 112 -49t41 -122q0 -108 -159 -550q61 -15 100.5 -46t58.5 -78t26 -93.5 t7 -110.5q0 -150 -47 -280t-132 -225t-211 -150t-278 -55q-111 0 -223 42q-149 57 -258 191.5t-109 286.5z" />
+<glyph unicode="&#xf20a;" horiz-adv-x="2048" d="M785 528h207q-14 -158 -98.5 -248.5t-214.5 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-203q-5 64 -35.5 99t-81.5 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t40 -51.5t66 -18q95 0 109 139zM1497 528h206 q-14 -158 -98 -248.5t-214 -90.5q-162 0 -254.5 116t-92.5 316q0 194 93 311.5t233 117.5q148 0 232 -87t97 -247h-204q-4 64 -35 99t-81 35q-57 0 -88.5 -60.5t-31.5 -177.5q0 -48 5 -84t18 -69.5t39.5 -51.5t65.5 -18q49 0 76.5 38t33.5 101zM1856 647q0 207 -15.5 307 t-60.5 161q-6 8 -13.5 14t-21.5 15t-16 11q-86 63 -697 63q-625 0 -710 -63q-5 -4 -17.5 -11.5t-21 -14t-14.5 -14.5q-45 -60 -60 -159.5t-15 -308.5q0 -208 15 -307.5t60 -160.5q6 -8 15 -15t20.5 -14t17.5 -12q44 -33 239.5 -49t470.5 -16q610 0 697 65q5 4 17 11t20.5 14 t13.5 16q46 60 61 159t15 309zM2048 1408v-1536h-2048v1536h2048z" />
+<glyph unicode="&#xf20b;" d="M992 912v-496q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v496q0 112 -80 192t-192 80h-272v-1152q0 -14 -9 -23t-23 -9h-160q-14 0 -23 9t-9 23v1344q0 14 9 23t23 9h464q135 0 249 -66.5t180.5 -180.5t66.5 -249zM1376 1376v-880q0 -135 -66.5 -249t-180.5 -180.5 t-249 -66.5h-464q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h160q14 0 23 -9t9 -23v-768h272q112 0 192 80t80 192v880q0 14 9 23t23 9h160q14 0 23 -9t9 -23z" />
+<glyph unicode="&#xf20c;" d="M1311 694v-114q0 -24 -13.5 -38t-37.5 -14h-202q-24 0 -38 14t-14 38v114q0 24 14 38t38 14h202q24 0 37.5 -14t13.5 -38zM821 464v250q0 53 -32.5 85.5t-85.5 32.5h-133q-68 0 -96 -52q-28 52 -96 52h-130q-53 0 -85.5 -32.5t-32.5 -85.5v-250q0 -22 21 -22h55 q22 0 22 22v230q0 24 13.5 38t38.5 14h94q24 0 38 -14t14 -38v-230q0 -22 21 -22h54q22 0 22 22v230q0 24 14 38t38 14h97q24 0 37.5 -14t13.5 -38v-230q0 -22 22 -22h55q21 0 21 22zM1410 560v154q0 53 -33 85.5t-86 32.5h-264q-53 0 -86 -32.5t-33 -85.5v-410 q0 -21 22 -21h55q21 0 21 21v180q31 -42 94 -42h191q53 0 86 32.5t33 85.5zM1536 1176v-1072q0 -96 -68 -164t-164 -68h-1072q-96 0 -164 68t-68 164v1072q0 96 68 164t164 68h1072q96 0 164 -68t68 -164z" />
+<glyph unicode="&#xf20d;" d="M915 450h-294l147 551zM1001 128h311l-324 1024h-440l-324 -1024h311l383 314zM1536 1120v-960q0 -118 -85 -203t-203 -85h-960q-118 0 -203 85t-85 203v960q0 118 85 203t203 85h960q118 0 203 -85t85 -203z" />
+<glyph unicode="&#xf20e;" horiz-adv-x="2048" d="M2048 641q0 -21 -13 -36.5t-33 -19.5l-205 -356q3 -9 3 -18q0 -20 -12.5 -35.5t-32.5 -19.5l-193 -337q3 -8 3 -16q0 -23 -16.5 -40t-40.5 -17q-25 0 -41 18h-400q-17 -20 -43 -20t-43 20h-399q-17 -20 -43 -20q-23 0 -40 16.5t-17 40.5q0 8 4 20l-193 335 q-20 4 -32.5 19.5t-12.5 35.5q0 9 3 18l-206 356q-20 5 -32.5 20.5t-12.5 35.5q0 21 13.5 36.5t33.5 19.5l199 344q0 1 -0.5 3t-0.5 3q0 36 34 51l209 363q-4 10 -4 18q0 24 17 40.5t40 16.5q26 0 44 -21h396q16 21 43 21t43 -21h398q18 21 44 21q23 0 40 -16.5t17 -40.5 q0 -6 -4 -18l207 -358q23 -1 39 -17.5t16 -38.5q0 -13 -7 -27l187 -324q19 -4 31.5 -19.5t12.5 -35.5zM1063 -158h389l-342 354h-143l-342 -354h360q18 16 39 16t39 -16zM112 654q1 -4 1 -13q0 -10 -2 -15l208 -360q2 0 4.5 -1t5.5 -2.5l5 -2.5l188 199v347l-187 194 q-13 -8 -29 -10zM986 1438h-388l190 -200l554 200h-280q-16 -16 -38 -16t-38 16zM1689 226q1 6 5 11l-64 68l-17 -79h76zM1583 226l22 105l-252 266l-296 -307l63 -64h463zM1495 -142l16 28l65 310h-427l333 -343q8 4 13 5zM578 -158h5l342 354h-373v-335l4 -6q14 -5 22 -13 zM552 226h402l64 66l-309 321l-157 -166v-221zM359 226h163v189l-168 -177q4 -8 5 -12zM358 1051q0 -1 0.5 -2t0.5 -2q0 -16 -8 -29l171 -177v269zM552 1121v-311l153 -157l297 314l-223 236zM556 1425l-4 -8v-264l205 74l-191 201q-6 -2 -10 -3zM1447 1438h-16l-621 -224 l213 -225zM1023 946l-297 -315l311 -319l296 307zM688 634l-136 141v-284zM1038 270l-42 -44h85zM1374 618l238 -251l132 624l-3 5l-1 1zM1718 1018q-8 13 -8 29v2l-216 376q-5 1 -13 5l-437 -463l310 -327zM522 1142v223l-163 -282zM522 196h-163l163 -283v283zM1607 196 l-48 -227l130 227h-82zM1729 266l207 361q-2 10 -2 14q0 1 3 16l-171 296l-129 -612l77 -82q5 3 15 7z" />
+<glyph unicode="&#xf210;" d="M0 856q0 131 91.5 226.5t222.5 95.5h742l352 358v-1470q0 -132 -91.5 -227t-222.5 -95h-780q-131 0 -222.5 95t-91.5 227v790zM1232 102l-176 180v425q0 46 -32 79t-78 33h-484q-46 0 -78 -33t-32 -79v-492q0 -46 32.5 -79.5t77.5 -33.5h770z" />
+<glyph unicode="&#xf211;" d="M934 1386q-317 -121 -556 -362.5t-358 -560.5q-20 89 -20 176q0 208 102.5 384.5t278.5 279t384 102.5q82 0 169 -19zM1203 1267q93 -65 164 -155q-389 -113 -674.5 -400.5t-396.5 -676.5q-93 72 -155 162q112 386 395 671t667 399zM470 -67q115 356 379.5 622t619.5 384 q40 -92 54 -195q-292 -120 -516 -345t-343 -518q-103 14 -194 52zM1536 -125q-193 50 -367 115q-135 -84 -290 -107q109 205 274 370.5t369 275.5q-21 -152 -101 -284q65 -175 115 -370z" />
+<glyph unicode="&#xf212;" horiz-adv-x="2048" d="M1893 1144l155 -1272q-131 0 -257 57q-200 91 -393 91q-226 0 -374 -148q-148 148 -374 148q-193 0 -393 -91q-128 -57 -252 -57h-5l155 1272q224 127 482 127q233 0 387 -106q154 106 387 106q258 0 482 -127zM1398 157q129 0 232 -28.5t260 -93.5l-124 1021 q-171 78 -368 78q-224 0 -374 -141q-150 141 -374 141q-197 0 -368 -78l-124 -1021q105 43 165.5 65t148.5 39.5t178 17.5q202 0 374 -108q172 108 374 108zM1438 191l-55 907q-211 -4 -359 -155q-152 155 -374 155q-176 0 -336 -66l-114 -941q124 51 228.5 76t221.5 25 q209 0 374 -102q172 107 374 102z" />
+<glyph unicode="&#xf213;" horiz-adv-x="2048" d="M1500 165v733q0 21 -15 36t-35 15h-93q-20 0 -35 -15t-15 -36v-733q0 -20 15 -35t35 -15h93q20 0 35 15t15 35zM1216 165v531q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-531q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM924 165v429q0 20 -15 35t-35 15h-101 q-20 0 -35 -15t-15 -35v-429q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM632 165v362q0 20 -15 35t-35 15h-101q-20 0 -35 -15t-15 -35v-362q0 -20 15 -35t35 -15h101q20 0 35 15t15 35zM2048 311q0 -166 -118 -284t-284 -118h-1244q-166 0 -284 118t-118 284 q0 116 63 214.5t168 148.5q-10 34 -10 73q0 113 80.5 193.5t193.5 80.5q102 0 180 -67q45 183 194 300t338 117q149 0 275 -73.5t199.5 -199.5t73.5 -275q0 -66 -14 -122q135 -33 221 -142.5t86 -247.5z" />
+<glyph unicode="&#xf214;" d="M0 1536h1536v-1392l-776 -338l-760 338v1392zM1436 209v926h-1336v-926l661 -294zM1436 1235v201h-1336v-201h1336zM181 937v-115h-37v115h37zM181 789v-115h-37v115h37zM181 641v-115h-37v115h37zM181 493v-115h-37v115h37zM181 345v-115h-37v115h37zM207 202l15 34 l105 -47l-15 -33zM343 142l15 34l105 -46l-15 -34zM478 82l15 34l105 -46l-15 -34zM614 23l15 33l104 -46l-15 -34zM797 10l105 46l15 -33l-105 -47zM932 70l105 46l15 -34l-105 -46zM1068 130l105 46l15 -34l-105 -46zM1203 189l105 47l15 -34l-105 -46zM259 1389v-36h-114 v36h114zM421 1389v-36h-115v36h115zM583 1389v-36h-115v36h115zM744 1389v-36h-114v36h114zM906 1389v-36h-114v36h114zM1068 1389v-36h-115v36h115zM1230 1389v-36h-115v36h115zM1391 1389v-36h-114v36h114zM181 1049v-79h-37v115h115v-36h-78zM421 1085v-36h-115v36h115z M583 1085v-36h-115v36h115zM744 1085v-36h-114v36h114zM906 1085v-36h-114v36h114zM1068 1085v-36h-115v36h115zM1230 1085v-36h-115v36h115zM1355 970v79h-78v36h115v-115h-37zM1355 822v115h37v-115h-37zM1355 674v115h37v-115h-37zM1355 526v115h37v-115h-37zM1355 378 v115h37v-115h-37zM1355 230v115h37v-115h-37zM760 265q-129 0 -221 91.5t-92 221.5q0 129 92 221t221 92q130 0 221.5 -92t91.5 -221q0 -130 -91.5 -221.5t-221.5 -91.5zM595 646q0 -36 19.5 -56.5t49.5 -25t64 -7t64 -2t49.5 -9t19.5 -30.5q0 -49 -112 -49q-97 0 -123 51 h-3l-31 -63q67 -42 162 -42q29 0 56.5 5t55.5 16t45.5 33t17.5 53q0 46 -27.5 69.5t-67.5 27t-79.5 3t-67 5t-27.5 25.5q0 21 20.5 33t40.5 15t41 3q34 0 70.5 -11t51.5 -34h3l30 58q-3 1 -21 8.5t-22.5 9t-19.5 7t-22 7t-20 4.5t-24 4t-23 1q-29 0 -56.5 -5t-54 -16.5 t-43 -34t-16.5 -53.5z" />
+<glyph unicode="&#xf215;" horiz-adv-x="2048" d="M863 504q0 112 -79.5 191.5t-191.5 79.5t-191 -79.5t-79 -191.5t79 -191t191 -79t191.5 79t79.5 191zM1726 505q0 112 -79 191t-191 79t-191.5 -79t-79.5 -191q0 -113 79.5 -192t191.5 -79t191 79.5t79 191.5zM2048 1314v-1348q0 -44 -31.5 -75.5t-76.5 -31.5h-1832 q-45 0 -76.5 31.5t-31.5 75.5v1348q0 44 31.5 75.5t76.5 31.5h431q44 0 76 -31.5t32 -75.5v-161h754v161q0 44 32 75.5t76 31.5h431q45 0 76.5 -31.5t31.5 -75.5z" />
+<glyph unicode="&#xf216;" horiz-adv-x="2048" d="M1430 953zM1690 749q148 0 253 -98.5t105 -244.5q0 -157 -109 -261.5t-267 -104.5q-85 0 -162 27.5t-138 73.5t-118 106t-109 126.5t-103.5 132.5t-108.5 126t-117 106t-136 73.5t-159 27.5q-154 0 -251.5 -91.5t-97.5 -244.5q0 -157 104 -250t263 -93q100 0 208 37.5 t193 98.5q5 4 21 18.5t30 24t22 9.5q14 0 24.5 -10.5t10.5 -24.5q0 -24 -60 -77q-101 -88 -234.5 -142t-260.5 -54q-133 0 -245.5 58t-180 165t-67.5 241q0 205 141.5 341t347.5 136q120 0 226.5 -43.5t185.5 -113t151.5 -153t139 -167.5t133.5 -153.5t149.5 -113 t172.5 -43.5q102 0 168.5 61.5t66.5 162.5q0 95 -64.5 159t-159.5 64q-30 0 -81.5 -18.5t-68.5 -18.5q-20 0 -35.5 15t-15.5 35q0 18 8.5 57t8.5 59q0 159 -107.5 263t-266.5 104q-58 0 -111.5 -18.5t-84 -40.5t-55.5 -40.5t-33 -18.5q-15 0 -25.5 10.5t-10.5 25.5 q0 19 25 46q59 67 147 103.5t182 36.5q191 0 318 -125.5t127 -315.5q0 -37 -4 -66q57 15 115 15z" />
+<glyph unicode="&#xf217;" horiz-adv-x="1664" d="M1216 832q0 26 -19 45t-45 19h-128v128q0 26 -19 45t-45 19t-45 -19t-19 -45v-128h-128q-26 0 -45 -19t-19 -45t19 -45t45 -19h128v-128q0 -26 19 -45t45 -19t45 19t19 45v128h128q26 0 45 19t19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf218;" horiz-adv-x="1664" d="M1280 832q0 26 -19 45t-45 19t-45 -19l-147 -146v293q0 26 -19 45t-45 19t-45 -19t-19 -45v-293l-147 146q-19 19 -45 19t-45 -19t-19 -45t19 -45l256 -256q19 -19 45 -19t45 19l256 256q19 19 19 45zM640 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5 t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1536 0q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1664 1088v-512q0 -24 -16 -42.5t-41 -21.5l-1044 -122q1 -7 4.5 -21.5t6 -26.5t2.5 -22q0 -16 -24 -64h920 q26 0 45 -19t19 -45t-19 -45t-45 -19h-1024q-26 0 -45 19t-19 45q0 14 11 39.5t29.5 59.5t20.5 38l-177 823h-204q-26 0 -45 19t-19 45t19 45t45 19h256q16 0 28.5 -6.5t20 -15.5t13 -24.5t7.5 -26.5t5.5 -29.5t4.5 -25.5h1201q26 0 45 -19t19 -45z" />
+<glyph unicode="&#xf219;" horiz-adv-x="2048" d="M212 768l623 -665l-300 665h-323zM1024 -4l349 772h-698zM538 896l204 384h-262l-288 -384h346zM1213 103l623 665h-323zM683 896h682l-204 384h-274zM1510 896h346l-288 384h-262zM1651 1382l384 -512q14 -18 13 -41.5t-17 -40.5l-960 -1024q-18 -20 -47 -20t-47 20 l-960 1024q-16 17 -17 40.5t13 41.5l384 512q18 26 51 26h1152q33 0 51 -26z" />
+<glyph unicode="&#xf21a;" horiz-adv-x="2048" d="M1811 -19q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83q19 19 45 19t45 -19l83 -83l83 83 q19 19 45 19t45 -19l83 -83zM237 19q-19 -19 -45 -19t-45 19l-128 128l90 90l83 -82l83 82q19 19 45 19t45 -19l83 -82l64 64v293l-210 314q-17 26 -7 56.5t40 40.5l177 58v299h128v128h256v128h256v-128h256v-128h128v-299l177 -58q30 -10 40 -40.5t-7 -56.5l-210 -314 v-293l19 18q19 19 45 19t45 -19l83 -82l83 82q19 19 45 19t45 -19l128 -128l-90 -90l-83 83l-83 -83q-18 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83l-83 -83 q-19 -19 -45 -19t-45 19l-83 83l-83 -83q-19 -19 -45 -19t-45 19l-83 83zM640 1152v-128l384 128l384 -128v128h-128v128h-512v-128h-128z" />
+<glyph unicode="&#xf21b;" d="M576 0l96 448l-96 128l-128 64zM832 0l128 640l-128 -64l-96 -128zM992 1010q-2 4 -4 6q-10 8 -96 8q-70 0 -167 -19q-7 -2 -21 -2t-21 2q-97 19 -167 19q-86 0 -96 -8q-2 -2 -4 -6q2 -18 4 -27q2 -3 7.5 -6.5t7.5 -10.5q2 -4 7.5 -20.5t7 -20.5t7.5 -17t8.5 -17t9 -14 t12 -13.5t14 -9.5t17.5 -8t20.5 -4t24.5 -2q36 0 59 12.5t32.5 30t14.5 34.5t11.5 29.5t17.5 12.5h12q11 0 17.5 -12.5t11.5 -29.5t14.5 -34.5t32.5 -30t59 -12.5q13 0 24.5 2t20.5 4t17.5 8t14 9.5t12 13.5t9 14t8.5 17t7.5 17t7 20.5t7.5 20.5q2 7 7.5 10.5t7.5 6.5 q2 9 4 27zM1408 131q0 -121 -73 -190t-194 -69h-874q-121 0 -194 69t-73 190q0 61 4.5 118t19 125.5t37.5 123.5t63.5 103.5t93.5 74.5l-90 220h214q-22 64 -22 128q0 12 2 32q-194 40 -194 96q0 57 210 99q17 62 51.5 134t70.5 114q32 37 76 37q30 0 84 -31t84 -31t84 31 t84 31q44 0 76 -37q36 -42 70.5 -114t51.5 -134q210 -42 210 -99q0 -56 -194 -96q7 -81 -20 -160h214l-82 -225q63 -33 107.5 -96.5t65.5 -143.5t29 -151.5t8 -148.5z" />
+<glyph unicode="&#xf21c;" horiz-adv-x="2304" d="M2301 500q12 -103 -22 -198.5t-99 -163.5t-158.5 -106t-196.5 -31q-161 11 -279.5 125t-134.5 274q-12 111 27.5 210.5t118.5 170.5l-71 107q-96 -80 -151 -194t-55 -244q0 -27 -18.5 -46.5t-45.5 -19.5h-256h-69q-23 -164 -149 -274t-294 -110q-185 0 -316.5 131.5 t-131.5 316.5t131.5 316.5t316.5 131.5q76 0 152 -27l24 45q-123 110 -304 110h-64q-26 0 -45 19t-19 45t19 45t45 19h128q78 0 145 -13.5t116.5 -38.5t71.5 -39.5t51 -36.5h512h115l-85 128h-222q-30 0 -49 22.5t-14 52.5q4 23 23 38t43 15h253q33 0 53 -28l70 -105 l114 114q19 19 46 19h101q26 0 45 -19t19 -45v-128q0 -26 -19 -45t-45 -19h-179l115 -172q131 63 275 36q143 -26 244 -134.5t118 -253.5zM448 128q115 0 203 72.5t111 183.5h-314q-35 0 -55 31q-18 32 -1 63l147 277q-47 13 -91 13q-132 0 -226 -94t-94 -226t94 -226 t226 -94zM1856 128q132 0 226 94t94 226t-94 226t-226 94q-60 0 -121 -24l174 -260q15 -23 10 -49t-27 -40q-15 -11 -36 -11q-35 0 -53 29l-174 260q-93 -95 -93 -225q0 -132 94 -226t226 -94z" />
+<glyph unicode="&#xf21d;" d="M1408 0q0 -63 -61.5 -113.5t-164 -81t-225 -46t-253.5 -15.5t-253.5 15.5t-225 46t-164 81t-61.5 113.5q0 49 33 88.5t91 66.5t118 44.5t131 29.5q26 5 48 -10.5t26 -41.5q5 -26 -10.5 -48t-41.5 -26q-58 -10 -106 -23.5t-76.5 -25.5t-48.5 -23.5t-27.5 -19.5t-8.5 -12 q3 -11 27 -26.5t73 -33t114 -32.5t160.5 -25t201.5 -10t201.5 10t160.5 25t114 33t73 33.5t27 27.5q-1 4 -8.5 11t-27.5 19t-48.5 23.5t-76.5 25t-106 23.5q-26 4 -41.5 26t-10.5 48q4 26 26 41.5t48 10.5q71 -12 131 -29.5t118 -44.5t91 -66.5t33 -88.5zM1024 896v-384 q0 -26 -19 -45t-45 -19h-64v-384q0 -26 -19 -45t-45 -19h-256q-26 0 -45 19t-19 45v384h-64q-26 0 -45 19t-19 45v384q0 53 37.5 90.5t90.5 37.5h384q53 0 90.5 -37.5t37.5 -90.5zM928 1280q0 -93 -65.5 -158.5t-158.5 -65.5t-158.5 65.5t-65.5 158.5t65.5 158.5t158.5 65.5 t158.5 -65.5t65.5 -158.5z" />
+<glyph unicode="&#xf21e;" horiz-adv-x="1792" d="M1280 512h305q-5 -6 -10 -10.5t-9 -7.5l-3 -4l-623 -600q-18 -18 -44 -18t-44 18l-624 602q-5 2 -21 20h369q22 0 39.5 13.5t22.5 34.5l70 281l190 -667q6 -20 23 -33t39 -13q21 0 38 13t23 33l146 485l56 -112q18 -35 57 -35zM1792 940q0 -145 -103 -300h-369l-111 221 q-8 17 -25.5 27t-36.5 8q-45 -5 -56 -46l-129 -430l-196 686q-6 20 -23.5 33t-39.5 13t-39 -13.5t-22 -34.5l-116 -464h-423q-103 155 -103 300q0 220 127 344t351 124q62 0 126.5 -21.5t120 -58t95.5 -68.5t76 -68q36 36 76 68t95.5 68.5t120 58t126.5 21.5q224 0 351 -124 t127 -344z" />
+<glyph unicode="&#xf221;" horiz-adv-x="1280" d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292 q11 134 80.5 249t182 188t245.5 88q170 19 319 -54t236 -212t87 -306zM128 960q0 -185 131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5z" />
+<glyph unicode="&#xf222;" d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-382 -383q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5 q203 0 359 -126l382 382h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf223;" horiz-adv-x="1280" d="M830 1220q145 -72 233.5 -210.5t88.5 -305.5q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5 t-147.5 384.5q0 167 88.5 305.5t233.5 210.5q-165 96 -228 273q-6 16 3.5 29.5t26.5 13.5h69q21 0 29 -20q44 -106 140 -171t214 -65t214 65t140 171q8 20 37 20h61q17 0 26.5 -13.5t3.5 -29.5q-63 -177 -228 -273zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf224;" d="M1024 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-149 16 -270.5 103t-186.5 223.5t-53 291.5q16 204 160 353.5t347 172.5q118 14 228 -19t198 -103l255 254h-134q-14 0 -23 9t-9 23v64zM576 256q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf225;" horiz-adv-x="1792" d="M1280 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q126 -158 126 -359q0 -221 -147.5 -384.5t-364.5 -187.5v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64 q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-217 24 -364.5 187.5t-147.5 384.5q0 201 126 359l-52 53l-101 -111q-9 -10 -22 -10.5t-23 7.5l-48 44q-10 8 -10.5 21.5t8.5 23.5l105 115l-111 112v-134q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9 t-9 23v288q0 26 19 45t45 19h288q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-133l106 -107l86 94q9 10 22 10.5t23 -7.5l48 -44q10 -8 10.5 -21.5t-8.5 -23.5l-90 -99l57 -56q158 126 359 126t359 -126l255 254h-134q-14 0 -23 9t-9 23v64zM832 256q185 0 316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf226;" horiz-adv-x="1792" d="M1790 1007q12 -155 -52.5 -292t-186 -224t-271.5 -103v-260h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-512v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23 t23 9h224v260q-150 16 -271.5 103t-186 224t-52.5 292q17 206 164.5 356.5t352.5 169.5q206 21 377 -94q171 115 377 94q205 -19 352.5 -169.5t164.5 -356.5zM896 647q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM576 512q115 0 218 57q-154 165 -154 391 q0 224 154 391q-103 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5zM1152 128v260q-137 15 -256 94q-119 -79 -256 -94v-260h512zM1216 512q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5q-115 0 -218 -57q154 -167 154 -391 q0 -226 -154 -391q103 -57 218 -57z" />
+<glyph unicode="&#xf227;" horiz-adv-x="1920" d="M1536 1120q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-31 -182 -166 -312t-318 -156q-210 -29 -384.5 80t-241.5 300q-117 6 -221 57.5t-177.5 133t-113.5 192.5t-32 230 q9 135 78 252t182 191.5t248 89.5q118 14 227.5 -19t198.5 -103l255 254h-134q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q59 -74 93 -169q182 -9 328 -124l255 254h-134q-14 0 -23 9 t-9 23v64zM1024 704q0 20 -4 58q-162 -25 -271 -150t-109 -292q0 -20 4 -58q162 25 271 150t109 292zM128 704q0 -168 111 -294t276 -149q-3 29 -3 59q0 210 135 369.5t338 196.5q-53 120 -163.5 193t-245.5 73q-185 0 -316.5 -131.5t-131.5 -316.5zM1088 -128 q185 0 316.5 131.5t131.5 316.5q0 168 -111 294t-276 149q3 -29 3 -59q0 -210 -135 -369.5t-338 -196.5q53 -120 163.5 -193t245.5 -73z" />
+<glyph unicode="&#xf228;" horiz-adv-x="2048" d="M1664 1504q0 14 9 23t23 9h288q26 0 45 -19t19 -45v-288q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v134l-254 -255q76 -95 107.5 -214t9.5 -247q-32 -180 -164.5 -310t-313.5 -157q-223 -34 -409 90q-117 -78 -256 -93v-132h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23 t-23 -9h-96v-96q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v96h-96q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96v132q-155 17 -279.5 109.5t-187 237.5t-39.5 307q25 187 159.5 322.5t320.5 164.5q224 34 410 -90q146 97 320 97q201 0 359 -126l255 254h-134q-14 0 -23 9 t-9 23v64zM896 391q128 131 128 313t-128 313q-128 -131 -128 -313t128 -313zM128 704q0 -185 131.5 -316.5t316.5 -131.5q117 0 218 57q-154 167 -154 391t154 391q-101 57 -218 57q-185 0 -316.5 -131.5t-131.5 -316.5zM1216 256q185 0 316.5 131.5t131.5 316.5 t-131.5 316.5t-316.5 131.5q-117 0 -218 -57q154 -167 154 -391t-154 -391q101 -57 218 -57z" />
+<glyph unicode="&#xf229;" d="M1472 1408q26 0 45 -19t19 -45v-416q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v262l-213 -214l140 -140q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-140 141l-78 -79q126 -156 126 -359q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5 t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123t223.5 45.5q203 0 359 -126l78 78l-172 172q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l172 -172l213 213h-261q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h416zM576 0q185 0 316.5 131.5t131.5 316.5t-131.5 316.5 t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf22a;" horiz-adv-x="1280" d="M640 892q217 -24 364.5 -187.5t147.5 -384.5q0 -167 -87 -306t-236 -212t-319 -54q-133 15 -245.5 88t-182 188t-80.5 249q-12 155 52.5 292t186 224t271.5 103v132h-160q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h160v165l-92 -92q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22 t9 23l202 201q19 19 45 19t45 -19l202 -201q9 -10 9 -23t-9 -22l-46 -46q-9 -9 -22 -9t-23 9l-92 92v-165h160q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-160v-132zM576 -128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5 t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf22b;" horiz-adv-x="2048" d="M1901 621q19 -19 19 -45t-19 -45l-294 -294q-9 -10 -22.5 -10t-22.5 10l-45 45q-10 9 -10 22.5t10 22.5l185 185h-294v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-132q-24 -217 -187.5 -364.5t-384.5 -147.5q-167 0 -306 87t-212 236t-54 319q15 133 88 245.5 t188 182t249 80.5q155 12 292 -52.5t224 -186t103 -271.5h132v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224h294l-185 185q-10 9 -10 22.5t10 22.5l45 45q9 10 22.5 10t22.5 -10zM576 128q185 0 316.5 131.5t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5 t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf22c;" horiz-adv-x="1280" d="M1152 960q0 -221 -147.5 -384.5t-364.5 -187.5v-612q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v612q-217 24 -364.5 187.5t-147.5 384.5q0 117 45.5 223.5t123 184t184 123t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5zM576 512q185 0 316.5 131.5 t131.5 316.5t-131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5z" />
+<glyph unicode="&#xf22d;" horiz-adv-x="1280" d="M1024 576q0 185 -131.5 316.5t-316.5 131.5t-316.5 -131.5t-131.5 -316.5t131.5 -316.5t316.5 -131.5t316.5 131.5t131.5 316.5zM1152 576q0 -117 -45.5 -223.5t-123 -184t-184 -123t-223.5 -45.5t-223.5 45.5t-184 123t-123 184t-45.5 223.5t45.5 223.5t123 184t184 123 t223.5 45.5t223.5 -45.5t184 -123t123 -184t45.5 -223.5z" />
+<glyph unicode="&#xf22e;" horiz-adv-x="1792" />
+<glyph unicode="&#xf22f;" horiz-adv-x="1792" />
+<glyph unicode="&#xf230;" d="M1451 1408q35 0 60 -25t25 -60v-1366q0 -35 -25 -60t-60 -25h-391v595h199l30 232h-229v148q0 56 23.5 84t91.5 28l122 1v207q-63 9 -178 9q-136 0 -217.5 -80t-81.5 -226v-171h-200v-232h200v-595h-735q-35 0 -60 25t-25 60v1366q0 35 25 60t60 25h1366z" />
+<glyph unicode="&#xf231;" horiz-adv-x="1280" d="M0 939q0 108 37.5 203.5t103.5 166.5t152 123t185 78t202 26q158 0 294 -66.5t221 -193.5t85 -287q0 -96 -19 -188t-60 -177t-100 -149.5t-145 -103t-189 -38.5q-68 0 -135 32t-96 88q-10 -39 -28 -112.5t-23.5 -95t-20.5 -71t-26 -71t-32 -62.5t-46 -77.5t-62 -86.5 l-14 -5l-9 10q-15 157 -15 188q0 92 21.5 206.5t66.5 287.5t52 203q-32 65 -32 169q0 83 52 156t132 73q61 0 95 -40.5t34 -102.5q0 -66 -44 -191t-44 -187q0 -63 45 -104.5t109 -41.5q55 0 102 25t78.5 68t56 95t38 110.5t20 111t6.5 99.5q0 173 -109.5 269.5t-285.5 96.5 q-200 0 -334 -129.5t-134 -328.5q0 -44 12.5 -85t27 -65t27 -45.5t12.5 -30.5q0 -28 -15 -73t-37 -45q-2 0 -17 3q-51 15 -90.5 56t-61 94.5t-32.5 108t-11 106.5z" />
+<glyph unicode="&#xf232;" d="M985 562q13 0 97.5 -44t89.5 -53q2 -5 2 -15q0 -33 -17 -76q-16 -39 -71 -65.5t-102 -26.5q-57 0 -190 62q-98 45 -170 118t-148 185q-72 107 -71 194v8q3 91 74 158q24 22 52 22q6 0 18 -1.5t19 -1.5q19 0 26.5 -6.5t15.5 -27.5q8 -20 33 -88t25 -75q0 -21 -34.5 -57.5 t-34.5 -46.5q0 -7 5 -15q34 -73 102 -137q56 -53 151 -101q12 -7 22 -7q15 0 54 48.5t52 48.5zM782 32q127 0 243.5 50t200.5 134t134 200.5t50 243.5t-50 243.5t-134 200.5t-200.5 134t-243.5 50t-243.5 -50t-200.5 -134t-134 -200.5t-50 -243.5q0 -203 120 -368l-79 -233 l242 77q158 -104 345 -104zM782 1414q153 0 292.5 -60t240.5 -161t161 -240.5t60 -292.5t-60 -292.5t-161 -240.5t-240.5 -161t-292.5 -60q-195 0 -365 94l-417 -134l136 405q-108 178 -108 389q0 153 60 292.5t161 240.5t240.5 161t292.5 60z" />
+<glyph unicode="&#xf233;" horiz-adv-x="1792" d="M128 128h1024v128h-1024v-128zM128 640h1024v128h-1024v-128zM1696 192q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM128 1152h1024v128h-1024v-128zM1696 704q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1696 1216 q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28t68 28t28 68zM1792 384v-384h-1792v384h1792zM1792 896v-384h-1792v384h1792zM1792 1408v-384h-1792v384h1792z" />
+<glyph unicode="&#xf234;" horiz-adv-x="2048" d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1664 512h352q13 0 22.5 -9.5t9.5 -22.5v-192q0 -13 -9.5 -22.5t-22.5 -9.5h-352v-352q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5 t-9.5 22.5v352h-352q-13 0 -22.5 9.5t-9.5 22.5v192q0 13 9.5 22.5t22.5 9.5h352v352q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5 -9.5t9.5 -22.5v-352zM928 288q0 -52 38 -90t90 -38h256v-238q-68 -50 -171 -50h-874q-121 0 -194 69t-73 190q0 53 3.5 103.5t14 109t26.5 108.5 t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q79 -61 154.5 -91.5t164.5 -30.5t164.5 30.5t154.5 91.5q20 17 39 17q132 0 217 -96h-223q-52 0 -90 -38t-38 -90v-192z" />
+<glyph unicode="&#xf235;" horiz-adv-x="2048" d="M704 640q-159 0 -271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5t-112.5 -271.5t-271.5 -112.5zM1781 320l249 -249q9 -9 9 -23q0 -13 -9 -22l-136 -136q-9 -9 -22 -9q-14 0 -23 9l-249 249l-249 -249q-9 -9 -23 -9q-13 0 -22 9l-136 136 q-9 9 -9 22q0 14 9 23l249 249l-249 249q-9 9 -9 23q0 13 9 22l136 136q9 9 22 9q14 0 23 -9l249 -249l249 249q9 9 23 9q13 0 22 -9l136 -136q9 -9 9 -22q0 -14 -9 -23zM1283 320l-181 -181q-37 -37 -37 -91q0 -53 37 -90l83 -83q-21 -3 -44 -3h-874q-121 0 -194 69 t-73 190q0 53 3.5 103.5t14 109t26.5 108.5t43 97.5t62 81t85.5 53.5t111.5 20q19 0 39 -17q154 -122 319 -122t319 122q20 17 39 17q28 0 57 -6q-28 -27 -41 -50t-13 -56q0 -54 37 -91z" />
+<glyph unicode="&#xf236;" horiz-adv-x="2048" d="M256 512h1728q26 0 45 -19t19 -45v-448h-256v256h-1536v-256h-256v1216q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-704zM832 832q0 106 -75 181t-181 75t-181 -75t-75 -181t75 -181t181 -75t181 75t75 181zM2048 576v64q0 159 -112.5 271.5t-271.5 112.5h-704 q-26 0 -45 -19t-19 -45v-384h1152z" />
+<glyph unicode="&#xf237;" d="M1536 1536l-192 -448h192v-192h-274l-55 -128h329v-192h-411l-357 -832l-357 832h-411v192h329l-55 128h-274v192h192l-192 448h256l323 -768h378l323 768h256zM768 320l108 256h-216z" />
+<glyph unicode="&#xf238;" d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM768 192q80 0 136 56t56 136t-56 136t-136 56 t-136 -56t-56 -136t56 -136t136 -56zM1344 768v512h-1152v-512h1152z" />
+<glyph unicode="&#xf239;" d="M1088 1536q185 0 316.5 -93.5t131.5 -226.5v-896q0 -130 -125.5 -222t-305.5 -97l213 -202q16 -15 8 -35t-30 -20h-1056q-22 0 -30 20t8 35l213 202q-180 5 -305.5 97t-125.5 222v896q0 133 131.5 226.5t316.5 93.5h640zM288 224q66 0 113 47t47 113t-47 113t-113 47 t-113 -47t-47 -113t47 -113t113 -47zM704 768v512h-544v-512h544zM1248 224q66 0 113 47t47 113t-47 113t-113 47t-113 -47t-47 -113t47 -113t113 -47zM1408 768v512h-576v-512h576z" />
+<glyph unicode="&#xf23a;" horiz-adv-x="1792" d="M597 1115v-1173q0 -25 -12.5 -42.5t-36.5 -17.5q-17 0 -33 8l-465 233q-21 10 -35.5 33.5t-14.5 46.5v1140q0 20 10 34t29 14q14 0 44 -15l511 -256q3 -3 3 -5zM661 1014l534 -866l-534 266v600zM1792 996v-1054q0 -25 -14 -40.5t-38 -15.5t-47 13l-441 220zM1789 1116 q0 -3 -256.5 -419.5t-300.5 -487.5l-390 634l324 527q17 28 52 28q14 0 26 -6l541 -270q4 -2 4 -6z" />
+<glyph unicode="&#xf23b;" d="M809 532l266 499h-112l-157 -312q-24 -48 -44 -92l-42 92l-155 312h-120l263 -493v-324h101v318zM1536 1408v-1536h-1536v1536h1536z" />
+<glyph unicode="&#xf23c;" horiz-adv-x="2296" d="M478 -139q-8 -16 -27 -34.5t-37 -25.5q-25 -9 -51.5 3.5t-28.5 31.5q-1 22 40 55t68 38q23 4 34 -21.5t2 -46.5zM1819 -139q7 -16 26 -34.5t38 -25.5q25 -9 51.5 3.5t27.5 31.5q2 22 -39.5 55t-68.5 38q-22 4 -33 -21.5t-2 -46.5zM1867 -30q13 -27 56.5 -59.5t77.5 -41.5 q45 -13 82 4.5t37 50.5q0 46 -67.5 100.5t-115.5 59.5q-40 5 -63.5 -37.5t-6.5 -76.5zM428 -30q-13 -27 -56 -59.5t-77 -41.5q-45 -13 -82 4.5t-37 50.5q0 46 67.5 100.5t115.5 59.5q40 5 63 -37.5t6 -76.5zM1158 1094h1q-41 0 -76 -15q27 -8 44 -30.5t17 -49.5 q0 -35 -27 -60t-65 -25q-52 0 -80 43q-5 -23 -5 -42q0 -74 56 -126.5t135 -52.5q80 0 136 52.5t56 126.5t-56 126.5t-136 52.5zM1462 1312q-99 109 -220.5 131.5t-245.5 -44.5q27 60 82.5 96.5t118 39.5t121.5 -17t99.5 -74.5t44.5 -131.5zM2212 73q8 -11 -11 -42 q7 -23 7 -40q1 -56 -44.5 -112.5t-109.5 -91.5t-118 -37q-48 -2 -92 21.5t-66 65.5q-687 -25 -1259 0q-23 -41 -66.5 -65t-92.5 -22q-86 3 -179.5 80.5t-92.5 160.5q2 22 7 40q-19 31 -11 42q6 10 31 1q14 22 41 51q-7 29 2 38q11 10 39 -4q29 20 59 34q0 29 13 37 q23 12 51 -16q35 5 61 -2q18 -4 38 -19v73q-11 0 -18 2q-53 10 -97 44.5t-55 87.5q-9 38 0 81q15 62 93 95q2 17 19 35.5t36 23.5t33 -7.5t19 -30.5h13q46 -5 60 -23q3 -3 5 -7q10 1 30.5 3.5t30.5 3.5q-15 11 -30 17q-23 40 -91 43q0 6 1 10q-62 2 -118.5 18.5t-84.5 47.5 q-32 36 -42.5 92t-2.5 112q16 126 90 179q23 16 52 4.5t32 -40.5q0 -1 1.5 -14t2.5 -21t3 -20t5.5 -19t8.5 -10q27 -14 76 -12q48 46 98 74q-40 4 -162 -14l47 46q61 58 163 111q145 73 282 86q-20 8 -41 15.5t-47 14t-42.5 10.5t-47.5 11t-43 10q595 126 904 -139 q98 -84 158 -222q85 -10 121 9h1q5 3 8.5 10t5.5 19t3 19.5t3 21.5l1 14q3 28 32 40t52 -5q73 -52 91 -178q7 -57 -3.5 -113t-42.5 -91q-28 -32 -83.5 -48.5t-115.5 -18.5v-10q-71 -2 -95 -43q-14 -5 -31 -17q11 -1 32 -3.5t30 -3.5q1 4 5 8q16 18 60 23h13q5 18 19 30t33 8 t36 -23t19 -36q79 -32 93 -95q9 -40 1 -81q-12 -53 -56 -88t-97 -44q-10 -2 -17 -2q0 -49 -1 -73q20 15 38 19q26 7 61 2q28 28 51 16q14 -9 14 -37q33 -16 59 -34q27 13 38 4q10 -10 2 -38q28 -30 41 -51q23 8 31 -1zM1937 1025q0 -29 -9 -54q82 -32 112 -132 q4 37 -9.5 98.5t-41.5 90.5q-20 19 -36 17t-16 -20zM1859 925q35 -42 47.5 -108.5t-0.5 -124.5q67 13 97 45q13 14 18 28q-3 64 -31 114.5t-79 66.5q-15 -15 -52 -21zM1822 921q-30 0 -44 1q42 -115 53 -239q21 0 43 3q16 68 1 135t-53 100zM258 839q30 100 112 132 q-9 25 -9 54q0 18 -16.5 20t-35.5 -17q-28 -29 -41.5 -90.5t-9.5 -98.5zM294 737q29 -31 97 -45q-13 58 -0.5 124.5t47.5 108.5v0q-37 6 -52 21q-51 -16 -78.5 -66t-31.5 -115q9 -17 18 -28zM471 683q14 124 73 235q-19 -4 -55 -18l-45 -19v1q-46 -89 -20 -196q25 -3 47 -3z M1434 644q8 -38 16.5 -108.5t11.5 -89.5q3 -18 9.5 -21.5t23.5 4.5q40 20 62 85.5t23 125.5q-24 2 -146 4zM1152 1285q-116 0 -199 -82.5t-83 -198.5q0 -117 83 -199.5t199 -82.5t199 82.5t83 199.5q0 116 -83 198.5t-199 82.5zM1380 646q-106 2 -211 0v1q-1 -27 2.5 -86 t13.5 -66q29 -14 93.5 -14.5t95.5 10.5q9 3 11 39t-0.5 69.5t-4.5 46.5zM1112 447q8 4 9.5 48t-0.5 88t-4 63v1q-212 -3 -214 -3q-4 -20 -7 -62t0 -83t14 -46q34 -15 101 -16t101 10zM718 636q-16 -59 4.5 -118.5t77.5 -84.5q15 -8 24 -5t12 21q3 16 8 90t10 103 q-69 -2 -136 -6zM591 510q3 -23 -34 -36q132 -141 271.5 -240t305.5 -154q172 49 310.5 146t293.5 250q-33 13 -30 34l3 9v1v-1q-17 2 -50 5.5t-48 4.5q-26 -90 -82 -132q-51 -38 -82 1q-5 6 -9 14q-7 13 -17 62q-2 -5 -5 -9t-7.5 -7t-8 -5.5t-9.5 -4l-10 -2.5t-12 -2 l-12 -1.5t-13.5 -1t-13.5 -0.5q-106 -9 -163 11q-4 -17 -10 -26.5t-21 -15t-23 -7t-36 -3.5q-2 0 -3 -0.5t-3 -0.5h-3q-179 -17 -203 40q-2 -63 -56 -54q-47 8 -91 54q-12 13 -20 26q-17 29 -26 65q-58 -6 -87 -10q1 -2 4 -10zM507 -118q3 14 3 30q-17 71 -51 130t-73 70 q-41 12 -101.5 -14.5t-104.5 -80t-39 -107.5q35 -53 100 -93t119 -42q51 -2 94 28t53 79zM510 53q23 -63 27 -119q195 113 392 174q-98 52 -180.5 120t-179.5 165q-6 -4 -29 -13q0 -2 -1 -5t-1 -4q31 -18 22 -37q-12 -23 -56 -34q-10 -13 -29 -24h-1q-2 -83 1 -150 q19 -34 35 -73zM579 -113q532 -21 1145 0q-254 147 -428 196q-76 -35 -156 -57q-8 -3 -16 0q-65 21 -129 49q-208 -60 -416 -188h-1v-1q1 0 1 1zM1763 -67q4 54 28 120q14 38 33 71l-1 -1q3 77 3 153q-15 8 -30 25q-42 9 -56 33q-9 20 22 38q-2 4 -2 9q-16 4 -28 12 q-204 -190 -383 -284q198 -59 414 -176zM2155 -90q5 54 -39 107.5t-104 80t-102 14.5q-38 -11 -72.5 -70.5t-51.5 -129.5q0 -16 3 -30q10 -49 53 -79t94 -28q54 2 119 42t100 93z" />
+<glyph unicode="&#xf23d;" horiz-adv-x="2304" d="M1524 -25q0 -68 -48 -116t-116 -48t-116.5 48t-48.5 116t48.5 116.5t116.5 48.5t116 -48.5t48 -116.5zM775 -25q0 -68 -48.5 -116t-116.5 -48t-116 48t-48 116t48 116.5t116 48.5t116.5 -48.5t48.5 -116.5zM0 1469q57 -60 110.5 -104.5t121 -82t136 -63t166 -45.5 t200 -31.5t250 -18.5t304 -9.5t372.5 -2.5q139 0 244.5 -5t181 -16.5t124 -27.5t71 -39.5t24 -51.5t-19.5 -64t-56.5 -76.5t-89.5 -91t-116 -104.5t-139 -119q-185 -157 -286 -247q29 51 76.5 109t94 105.5t94.5 98.5t83 91.5t54 80.5t13 70t-45.5 55.5t-116.5 41t-204 23.5 t-304 5q-168 -2 -314 6t-256 23t-204.5 41t-159.5 51.5t-122.5 62.5t-91.5 66.5t-68 71.5t-50.5 69.5t-40 68t-36.5 59.5z" />
+<glyph unicode="&#xf23e;" horiz-adv-x="1792" d="M896 1472q-169 0 -323 -66t-265.5 -177.5t-177.5 -265.5t-66 -323t66 -323t177.5 -265.5t265.5 -177.5t323 -66t323 66t265.5 177.5t177.5 265.5t66 323t-66 323t-177.5 265.5t-265.5 177.5t-323 66zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348 t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71zM496 704q16 0 16 -16v-480q0 -16 -16 -16h-32q-16 0 -16 16v480q0 16 16 16h32zM896 640q53 0 90.5 -37.5t37.5 -90.5q0 -35 -17.5 -64t-46.5 -46v-114q0 -14 -9 -23 t-23 -9h-64q-14 0 -23 9t-9 23v114q-29 17 -46.5 46t-17.5 64q0 53 37.5 90.5t90.5 37.5zM896 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM544 928v-96 q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 93 65.5 158.5t158.5 65.5t158.5 -65.5t65.5 -158.5v-96q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v96q0 146 -103 249t-249 103t-249 -103t-103 -249zM1408 192v512q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-512 q0 -26 19 -45t45 -19h896q26 0 45 19t19 45z" />
+<glyph unicode="&#xf240;" horiz-adv-x="2304" d="M1920 1024v-768h-1664v768h1664zM2048 448h128v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288zM2304 832v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113 v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160q53 0 90.5 -37.5t37.5 -90.5z" />
+<glyph unicode="&#xf241;" horiz-adv-x="2304" d="M256 256v768h1280v-768h-1280zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
+<glyph unicode="&#xf242;" horiz-adv-x="2304" d="M256 256v768h896v-768h-896zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
+<glyph unicode="&#xf243;" horiz-adv-x="2304" d="M256 256v768h512v-768h-512zM2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9 h-1856q-14 0 -23 -9t-9 -23v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
+<glyph unicode="&#xf244;" horiz-adv-x="2304" d="M2176 960q53 0 90.5 -37.5t37.5 -90.5v-384q0 -53 -37.5 -90.5t-90.5 -37.5v-160q0 -66 -47 -113t-113 -47h-1856q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1856q66 0 113 -47t47 -113v-160zM2176 448v384h-128v288q0 14 -9 23t-23 9h-1856q-14 0 -23 -9t-9 -23 v-960q0 -14 9 -23t23 -9h1856q14 0 23 9t9 23v288h128z" />
+<glyph unicode="&#xf245;" horiz-adv-x="1280" d="M1133 493q31 -30 14 -69q-17 -40 -59 -40h-382l201 -476q10 -25 0 -49t-34 -35l-177 -75q-25 -10 -49 0t-35 34l-191 452l-312 -312q-19 -19 -45 -19q-12 0 -24 5q-40 17 -40 59v1504q0 42 40 59q12 5 24 5q27 0 45 -19z" />
+<glyph unicode="&#xf246;" horiz-adv-x="1024" d="M832 1408q-320 0 -320 -224v-416h128v-128h-128v-544q0 -224 320 -224h64v-128h-64q-272 0 -384 146q-112 -146 -384 -146h-64v128h64q320 0 320 224v544h-128v128h128v416q0 224 -320 224h-64v128h64q272 0 384 -146q112 146 384 146h64v-128h-64z" />
+<glyph unicode="&#xf247;" horiz-adv-x="2048" d="M2048 1152h-128v-1024h128v-384h-384v128h-1280v-128h-384v384h128v1024h-128v384h384v-128h1280v128h384v-384zM1792 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 -128v128h-128v-128h128zM1664 0v128h128v1024h-128v128h-1280v-128h-128v-1024h128v-128 h1280zM1920 -128v128h-128v-128h128zM1280 896h384v-768h-896v256h-384v768h896v-256zM512 512h640v512h-640v-512zM1536 256v512h-256v-384h-384v-128h640z" />
+<glyph unicode="&#xf248;" horiz-adv-x="2304" d="M2304 768h-128v-640h128v-384h-384v128h-896v-128h-384v384h128v128h-384v-128h-384v384h128v640h-128v384h384v-128h896v128h384v-384h-128v-128h384v128h384v-384zM2048 1024v-128h128v128h-128zM1408 1408v-128h128v128h-128zM128 1408v-128h128v128h-128zM256 256 v128h-128v-128h128zM1536 384h-128v-128h128v128zM384 384h896v128h128v640h-128v128h-896v-128h-128v-640h128v-128zM896 -128v128h-128v-128h128zM2176 -128v128h-128v-128h128zM2048 128v640h-128v128h-384v-384h128v-384h-384v128h-384v-128h128v-128h896v128h128z" />
+<glyph unicode="&#xf249;" d="M1024 288v-416h-928q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68v-928h-416q-40 0 -68 -28t-28 -68zM1152 256h381q-15 -82 -65 -132l-184 -184q-50 -50 -132 -65v381z" />
+<glyph unicode="&#xf24a;" d="M1400 256h-248v-248q29 10 41 22l185 185q12 12 22 41zM1120 384h288v896h-1280v-1280h896v288q0 40 28 68t68 28zM1536 1312v-1024q0 -40 -20 -88t-48 -76l-184 -184q-28 -28 -76 -48t-88 -20h-1024q-40 0 -68 28t-28 68v1344q0 40 28 68t68 28h1344q40 0 68 -28t28 -68 z" />
+<glyph unicode="&#xf24b;" horiz-adv-x="2304" d="M1951 538q0 -26 -15.5 -44.5t-38.5 -23.5q-8 -2 -18 -2h-153v140h153q10 0 18 -2q23 -5 38.5 -23.5t15.5 -44.5zM1933 751q0 -25 -15 -42t-38 -21q-3 -1 -15 -1h-139v129h139q3 0 8.5 -0.5t6.5 -0.5q23 -4 38 -21.5t15 -42.5zM728 587v308h-228v-308q0 -58 -38 -94.5 t-105 -36.5q-108 0 -229 59v-112q53 -15 121 -23t109 -9l42 -1q328 0 328 217zM1442 403v113q-99 -52 -200 -59q-108 -8 -169 41t-61 142t61 142t169 41q101 -7 200 -58v112q-48 12 -100 19.5t-80 9.5l-28 2q-127 6 -218.5 -14t-140.5 -60t-71 -88t-22 -106t22 -106t71 -88 t140.5 -60t218.5 -14q101 4 208 31zM2176 518q0 54 -43 88.5t-109 39.5v3q57 8 89 41.5t32 79.5q0 55 -41 88t-107 36q-3 0 -12 0.5t-14 0.5h-455v-510h491q74 0 121.5 36.5t47.5 96.5zM2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90 t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf24c;" horiz-adv-x="2304" d="M858 295v693q-106 -41 -172 -135.5t-66 -211.5t66 -211.5t172 -134.5zM1362 641q0 117 -66 211.5t-172 135.5v-694q106 41 172 135.5t66 211.5zM1577 641q0 -159 -78.5 -294t-213.5 -213.5t-294 -78.5q-119 0 -227.5 46.5t-187 125t-125 187t-46.5 227.5q0 159 78.5 294 t213.5 213.5t294 78.5t294 -78.5t213.5 -213.5t78.5 -294zM1960 634q0 139 -55.5 261.5t-147.5 205.5t-213.5 131t-252.5 48h-301q-176 0 -323.5 -81t-235 -230t-87.5 -335q0 -171 87 -317.5t236 -231.5t323 -85h301q129 0 251.5 50.5t214.5 135t147.5 202.5t55.5 246z M2304 1280v-1280q0 -52 -38 -90t-90 -38h-2048q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h2048q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf24d;" horiz-adv-x="1792" d="M1664 -96v1088q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h1088q13 0 22.5 9.5t9.5 22.5zM1792 992v-1088q0 -66 -47 -113t-113 -47h-1088q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113 zM1408 1376v-160h-128v160q0 13 -9.5 22.5t-22.5 9.5h-1088q-13 0 -22.5 -9.5t-9.5 -22.5v-1088q0 -13 9.5 -22.5t22.5 -9.5h160v-128h-160q-66 0 -113 47t-47 113v1088q0 66 47 113t113 47h1088q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf24e;" horiz-adv-x="2304" d="M1728 1088l-384 -704h768zM448 1088l-384 -704h768zM1269 1280q-14 -40 -45.5 -71.5t-71.5 -45.5v-1291h608q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1344q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h608v1291q-40 14 -71.5 45.5t-45.5 71.5h-491q-14 0 -23 9t-9 23v64 q0 14 9 23t23 9h491q21 57 70 92.5t111 35.5t111 -35.5t70 -92.5h491q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-491zM1088 1264q33 0 56.5 23.5t23.5 56.5t-23.5 56.5t-56.5 23.5t-56.5 -23.5t-23.5 -56.5t23.5 -56.5t56.5 -23.5zM2176 384q0 -73 -46.5 -131t-117.5 -91 t-144.5 -49.5t-139.5 -16.5t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81zM896 384q0 -73 -46.5 -131t-117.5 -91t-144.5 -49.5t-139.5 -16.5 t-139.5 16.5t-144.5 49.5t-117.5 91t-46.5 131q0 11 35 81t92 174.5t107 195.5t102 184t56 100q18 33 56 33t56 -33q4 -7 56 -100t102 -184t107 -195.5t92 -174.5t35 -81z" />
+<glyph unicode="&#xf250;" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-77 -29 -149 -92.5 t-129.5 -152.5t-92.5 -210t-35 -253h1024q0 132 -35 253t-92.5 210t-129.5 152.5t-149 92.5q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" />
+<glyph unicode="&#xf251;" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -66 9 -128h1006q9 61 9 128zM1280 -128q0 130 -34 249.5t-90.5 208t-126.5 152t-146 94.5h-230q-76 -31 -146 -94.5t-126.5 -152t-90.5 -208t-34 -249.5h1024z" />
+<glyph unicode="&#xf252;" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM1280 1408h-1024q0 -206 85 -384h854q85 178 85 384zM1223 192q-54 141 -145.5 241.5t-194.5 142.5h-230q-103 -42 -194.5 -142.5t-145.5 -241.5h910z" />
+<glyph unicode="&#xf253;" d="M1408 1408q0 -261 -106.5 -461.5t-266.5 -306.5q160 -106 266.5 -306.5t106.5 -461.5h96q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h96q0 261 106.5 461.5t266.5 306.5q-160 106 -266.5 306.5t-106.5 461.5h-96q-14 0 -23 9 t-9 23v64q0 14 9 23t23 9h1472q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-96zM874 700q77 29 149 92.5t129.5 152.5t92.5 210t35 253h-1024q0 -132 35 -253t92.5 -210t129.5 -152.5t149 -92.5q19 -7 30.5 -23.5t11.5 -36.5t-11.5 -36.5t-30.5 -23.5q-137 -51 -244 -196 h700q-107 145 -244 196q-19 7 -30.5 23.5t-11.5 36.5t11.5 36.5t30.5 23.5z" />
+<glyph unicode="&#xf254;" d="M1504 -64q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472zM130 0q3 55 16 107t30 95t46 87t53.5 76t64.5 69.5t66 60t70.5 55t66.5 47.5t65 43q-43 28 -65 43t-66.5 47.5t-70.5 55t-66 60t-64.5 69.5t-53.5 76t-46 87 t-30 95t-16 107h1276q-3 -55 -16 -107t-30 -95t-46 -87t-53.5 -76t-64.5 -69.5t-66 -60t-70.5 -55t-66.5 -47.5t-65 -43q43 -28 65 -43t66.5 -47.5t70.5 -55t66 -60t64.5 -69.5t53.5 -76t46 -87t30 -95t16 -107h-1276zM1504 1536q14 0 23 -9t9 -23v-128q0 -14 -9 -23t-23 -9 h-1472q-14 0 -23 9t-9 23v128q0 14 9 23t23 9h1472z" />
+<glyph unicode="&#xf255;" d="M768 1152q-53 0 -90.5 -37.5t-37.5 -90.5v-128h-32v93q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-429l-32 30v172q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-224q0 -47 35 -82l310 -296q39 -39 39 -102q0 -26 19 -45t45 -19h640q26 0 45 19t19 45v25 q0 41 10 77l108 436q10 36 10 77v246q0 48 -32 81.5t-80 33.5q-46 0 -79 -33t-33 -79v-32h-32v125q0 40 -25 72.5t-64 40.5q-14 2 -23 2q-46 0 -79 -33t-33 -79v-128h-32v122q0 51 -32.5 89.5t-82.5 43.5q-5 1 -13 1zM768 1280q84 0 149 -50q57 34 123 34q59 0 111 -27 t86 -76q27 7 59 7q100 0 170 -71.5t70 -171.5v-246q0 -51 -13 -108l-109 -436q-6 -24 -6 -71q0 -80 -56 -136t-136 -56h-640q-84 0 -138 58.5t-54 142.5l-308 296q-76 73 -76 175v224q0 99 70.5 169.5t169.5 70.5q11 0 16 -1q6 95 75.5 160t164.5 65q52 0 98 -21 q72 69 174 69z" />
+<glyph unicode="&#xf256;" horiz-adv-x="1792" d="M880 1408q-46 0 -79 -33t-33 -79v-656h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528v-256l-154 205q-38 51 -102 51q-53 0 -90.5 -37.5t-37.5 -90.5q0 -43 26 -77l384 -512q38 -51 102 -51h688q34 0 61 22t34 56l76 405q5 32 5 59v498q0 46 -33 79t-79 33t-79 -33 t-33 -79v-272h-32v528q0 46 -33 79t-79 33t-79 -33t-33 -79v-528h-32v656q0 46 -33 79t-79 33zM880 1536q68 0 125.5 -35.5t88.5 -96.5q19 4 42 4q99 0 169.5 -70.5t70.5 -169.5v-17q105 6 180.5 -64t75.5 -175v-498q0 -40 -8 -83l-76 -404q-14 -79 -76.5 -131t-143.5 -52 h-688q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 106 75 181t181 75q78 0 128 -34v434q0 99 70.5 169.5t169.5 70.5q23 0 42 -4q31 61 88.5 96.5t125.5 35.5z" />
+<glyph unicode="&#xf257;" horiz-adv-x="1792" d="M1073 -128h-177q-163 0 -226 141q-23 49 -23 102v5q-62 30 -98.5 88.5t-36.5 127.5q0 38 5 48h-261q-106 0 -181 75t-75 181t75 181t181 75h113l-44 17q-74 28 -119.5 93.5t-45.5 145.5q0 106 75 181t181 75q46 0 91 -17l628 -239h401q106 0 181 -75t75 -181v-668 q0 -88 -54 -157.5t-140 -90.5l-339 -85q-92 -23 -186 -23zM1024 583l-155 -71l-163 -74q-30 -14 -48 -41.5t-18 -60.5q0 -46 33 -79t79 -33q26 0 46 10l338 154q-49 10 -80.5 50t-31.5 90v55zM1344 272q0 46 -33 79t-79 33q-26 0 -46 -10l-290 -132q-28 -13 -37 -17 t-30.5 -17t-29.5 -23.5t-16 -29t-8 -40.5q0 -50 31.5 -82t81.5 -32q20 0 38 9l352 160q30 14 48 41.5t18 60.5zM1112 1024l-650 248q-24 8 -46 8q-53 0 -90.5 -37.5t-37.5 -90.5q0 -40 22.5 -73t59.5 -47l526 -200v-64h-640q-53 0 -90.5 -37.5t-37.5 -90.5t37.5 -90.5 t90.5 -37.5h535l233 106v198q0 63 46 106l111 102h-69zM1073 0q82 0 155 19l339 85q43 11 70 45.5t27 78.5v668q0 53 -37.5 90.5t-90.5 37.5h-308l-136 -126q-36 -33 -36 -82v-296q0 -46 33 -77t79 -31t79 35t33 81v208h32v-208q0 -70 -57 -114q52 -8 86.5 -48.5t34.5 -93.5 q0 -42 -23 -78t-61 -53l-310 -141h91z" />
+<glyph unicode="&#xf258;" horiz-adv-x="2048" d="M1151 1536q61 0 116 -28t91 -77l572 -781q118 -159 118 -359v-355q0 -80 -56 -136t-136 -56h-384q-80 0 -136 56t-56 136v177l-286 143h-546q-80 0 -136 56t-56 136v32q0 119 84.5 203.5t203.5 84.5h420l42 128h-686q-100 0 -173.5 67.5t-81.5 166.5q-65 79 -65 182v32 q0 80 56 136t136 56h959zM1920 -64v355q0 157 -93 284l-573 781q-39 52 -103 52h-959q-26 0 -45 -19t-19 -45q0 -32 1.5 -49.5t9.5 -40.5t25 -43q10 31 35.5 50t56.5 19h832v-32h-832q-26 0 -45 -19t-19 -45q0 -44 3 -58q8 -44 44 -73t81 -29h640h91q40 0 68 -28t28 -68 q0 -15 -5 -30l-64 -192q-10 -29 -35 -47.5t-56 -18.5h-443q-66 0 -113 -47t-47 -113v-32q0 -26 19 -45t45 -19h561q16 0 29 -7l317 -158q24 -13 38.5 -36t14.5 -50v-197q0 -26 19 -45t45 -19h384q26 0 45 19t19 45z" />
+<glyph unicode="&#xf259;" horiz-adv-x="2048" d="M816 1408q-48 0 -79.5 -34t-31.5 -82q0 -14 3 -28l150 -624h-26l-116 482q-9 38 -39.5 62t-69.5 24q-47 0 -79 -34t-32 -81q0 -11 4 -29q3 -13 39 -161t68 -282t32 -138v-227l-307 230q-34 26 -77 26q-52 0 -89.5 -36.5t-37.5 -88.5q0 -67 56 -110l507 -379 q34 -26 76 -26h694q33 0 59 20.5t34 52.5l100 401q8 30 10 88t9 86l116 478q3 12 3 26q0 46 -33 79t-80 33q-38 0 -69 -25.5t-40 -62.5l-99 -408h-26l132 547q3 14 3 28q0 47 -32 80t-80 33q-38 0 -68.5 -24t-39.5 -62l-145 -602h-127l-164 682q-9 38 -39.5 62t-68.5 24z M1461 -256h-694q-85 0 -153 51l-507 380q-50 38 -78.5 94t-28.5 118q0 105 75 179t180 74q25 0 49.5 -5.5t41.5 -11t41 -20.5t35 -23t38.5 -29.5t37.5 -28.5l-123 512q-7 35 -7 59q0 93 60 162t152 79q14 87 80.5 144.5t155.5 57.5q83 0 148 -51.5t85 -132.5l103 -428 l83 348q20 81 85 132.5t148 51.5q87 0 152.5 -54t82.5 -139q93 -10 155 -78t62 -161q0 -30 -7 -57l-116 -477q-5 -22 -5 -67q0 -51 -13 -108l-101 -401q-19 -75 -79.5 -122.5t-137.5 -47.5z" />
+<glyph unicode="&#xf25a;" horiz-adv-x="1792" d="M640 1408q-53 0 -90.5 -37.5t-37.5 -90.5v-512v-384l-151 202q-41 54 -107 54q-52 0 -89 -38t-37 -90q0 -43 26 -77l384 -512q38 -51 102 -51h718q22 0 39.5 13.5t22.5 34.5l92 368q24 96 24 194v217q0 41 -28 71t-68 30t-68 -28t-28 -68h-32v61q0 48 -32 81.5t-80 33.5 q-46 0 -79 -33t-33 -79v-64h-32v90q0 55 -37 94.5t-91 39.5q-53 0 -90.5 -37.5t-37.5 -90.5v-96h-32v570q0 55 -37 94.5t-91 39.5zM640 1536q107 0 181.5 -77.5t74.5 -184.5v-220q22 2 32 2q99 0 173 -69q47 21 99 21q113 0 184 -87q27 7 56 7q94 0 159 -67.5t65 -161.5 v-217q0 -116 -28 -225l-92 -368q-16 -64 -68 -104.5t-118 -40.5h-718q-60 0 -114.5 27.5t-90.5 74.5l-384 512q-51 68 -51 154q0 105 74.5 180.5t179.5 75.5q71 0 130 -35v547q0 106 75 181t181 75zM768 128v384h-32v-384h32zM1024 128v384h-32v-384h32zM1280 128v384h-32 v-384h32z" />
+<glyph unicode="&#xf25b;" d="M1288 889q60 0 107 -23q141 -63 141 -226v-177q0 -94 -23 -186l-85 -339q-21 -86 -90.5 -140t-157.5 -54h-668q-106 0 -181 75t-75 181v401l-239 628q-17 45 -17 91q0 106 75 181t181 75q80 0 145.5 -45.5t93.5 -119.5l17 -44v113q0 106 75 181t181 75t181 -75t75 -181 v-261q27 5 48 5q69 0 127.5 -36.5t88.5 -98.5zM1072 896q-33 0 -60.5 -18t-41.5 -48l-74 -163l-71 -155h55q50 0 90 -31.5t50 -80.5l154 338q10 20 10 46q0 46 -33 79t-79 33zM1293 761q-22 0 -40.5 -8t-29 -16t-23.5 -29.5t-17 -30.5t-17 -37l-132 -290q-10 -20 -10 -46 q0 -46 33 -79t79 -33q33 0 60.5 18t41.5 48l160 352q9 18 9 38q0 50 -32 81.5t-82 31.5zM128 1120q0 -22 8 -46l248 -650v-69l102 111q43 46 106 46h198l106 233v535q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5v-640h-64l-200 526q-14 37 -47 59.5t-73 22.5 q-53 0 -90.5 -37.5t-37.5 -90.5zM1180 -128q44 0 78.5 27t45.5 70l85 339q19 73 19 155v91l-141 -310q-17 -38 -53 -61t-78 -23q-53 0 -93.5 34.5t-48.5 86.5q-44 -57 -114 -57h-208v32h208q46 0 81 33t35 79t-31 79t-77 33h-296q-49 0 -82 -36l-126 -136v-308 q0 -53 37.5 -90.5t90.5 -37.5h668z" />
+<glyph unicode="&#xf25c;" horiz-adv-x="1973" d="M857 992v-117q0 -13 -9.5 -22t-22.5 -9h-298v-812q0 -13 -9 -22.5t-22 -9.5h-135q-13 0 -22.5 9t-9.5 23v812h-297q-13 0 -22.5 9t-9.5 22v117q0 14 9 23t23 9h793q13 0 22.5 -9.5t9.5 -22.5zM1895 995l77 -961q1 -13 -8 -24q-10 -10 -23 -10h-134q-12 0 -21 8.5 t-10 20.5l-46 588l-189 -425q-8 -19 -29 -19h-120q-20 0 -29 19l-188 427l-45 -590q-1 -12 -10 -20.5t-21 -8.5h-135q-13 0 -23 10q-9 10 -9 24l78 961q1 12 10 20.5t21 8.5h142q20 0 29 -19l220 -520q10 -24 20 -51q3 7 9.5 24.5t10.5 26.5l221 520q9 19 29 19h141 q13 0 22 -8.5t10 -20.5z" />
+<glyph unicode="&#xf25d;" horiz-adv-x="1792" d="M1042 833q0 88 -60 121q-33 18 -117 18h-123v-281h162q66 0 102 37t36 105zM1094 548l205 -373q8 -17 -1 -31q-8 -16 -27 -16h-152q-20 0 -28 17l-194 365h-155v-350q0 -14 -9 -23t-23 -9h-134q-14 0 -23 9t-9 23v960q0 14 9 23t23 9h294q128 0 190 -24q85 -31 134 -109 t49 -180q0 -92 -42.5 -165.5t-115.5 -109.5q6 -10 9 -16zM896 1376q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM1792 640 q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf25e;" horiz-adv-x="1792" d="M605 303q153 0 257 104q14 18 3 36l-45 82q-6 13 -24 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13t-23.5 -14.5t-28.5 -13.5t-33.5 -9.5t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78 q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-148 0 -246 -96.5t-98 -240.5q0 -146 97 -241.5t247 -95.5zM1235 303q153 0 257 104q14 18 4 36l-45 82q-8 14 -25 17q-16 2 -27 -11l-4 -3q-4 -4 -11.5 -10t-17.5 -13t-23.5 -14.5t-28.5 -13.5t-33.5 -9.5 t-37.5 -3.5q-76 0 -125 50t-49 127q0 76 48 125.5t122 49.5q37 0 71.5 -14t50.5 -28l16 -14q11 -11 26 -10q16 2 24 14l53 78q13 20 -2 39q-3 4 -11 12t-30 23.5t-48.5 28t-67.5 22.5t-86 10q-147 0 -245.5 -96.5t-98.5 -240.5q0 -146 97 -241.5t247 -95.5zM896 1376 q-150 0 -286 -58.5t-234.5 -157t-157 -234.5t-58.5 -286t58.5 -286t157 -234.5t234.5 -157t286 -58.5t286 58.5t234.5 157t157 234.5t58.5 286t-58.5 286t-157 234.5t-234.5 157t-286 58.5zM896 1536q182 0 348 -71t286 -191t191 -286t71 -348t-71 -348t-191 -286t-286 -191 t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71z" />
+<glyph unicode="&#xf260;" horiz-adv-x="2048" d="M736 736l384 -384l-384 -384l-672 672l672 672l168 -168l-96 -96l-72 72l-480 -480l480 -480l193 193l-289 287zM1312 1312l672 -672l-672 -672l-168 168l96 96l72 -72l480 480l-480 480l-193 -193l289 -287l-96 -96l-384 384z" />
+<glyph unicode="&#xf261;" horiz-adv-x="1792" d="M717 182l271 271l-279 279l-88 -88l192 -191l-96 -96l-279 279l279 279l40 -40l87 87l-127 128l-454 -454zM1075 190l454 454l-454 454l-271 -271l279 -279l88 88l-192 191l96 96l279 -279l-279 -279l-40 40l-87 -88zM1792 640q0 -182 -71 -348t-191 -286t-286 -191 t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf262;" horiz-adv-x="2304" d="M651 539q0 -39 -27.5 -66.5t-65.5 -27.5q-39 0 -66.5 27.5t-27.5 66.5q0 38 27.5 65.5t66.5 27.5q38 0 65.5 -27.5t27.5 -65.5zM1805 540q0 -39 -27.5 -66.5t-66.5 -27.5t-66.5 27.5t-27.5 66.5t27.5 66t66.5 27t66.5 -27t27.5 -66zM765 539q0 79 -56.5 136t-136.5 57 t-136.5 -56.5t-56.5 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM1918 540q0 80 -56.5 136.5t-136.5 56.5q-79 0 -136 -56.5t-57 -136.5t56.5 -136.5t136.5 -56.5t136.5 56.5t56.5 136.5zM850 539q0 -116 -81.5 -197.5t-196.5 -81.5q-116 0 -197.5 82t-81.5 197 t82 196.5t197 81.5t196.5 -81.5t81.5 -196.5zM2004 540q0 -115 -81.5 -196.5t-197.5 -81.5q-115 0 -196.5 81.5t-81.5 196.5t81.5 196.5t196.5 81.5q116 0 197.5 -81.5t81.5 -196.5zM1040 537q0 191 -135.5 326.5t-326.5 135.5q-125 0 -231 -62t-168 -168.5t-62 -231.5 t62 -231.5t168 -168.5t231 -62q191 0 326.5 135.5t135.5 326.5zM1708 1110q-254 111 -556 111q-319 0 -573 -110q117 0 223 -45.5t182.5 -122.5t122 -183t45.5 -223q0 115 43.5 219.5t118 180.5t177.5 123t217 50zM2187 537q0 191 -135 326.5t-326 135.5t-326.5 -135.5 t-135.5 -326.5t135.5 -326.5t326.5 -135.5t326 135.5t135 326.5zM1921 1103h383q-44 -51 -75 -114.5t-40 -114.5q110 -151 110 -337q0 -156 -77 -288t-209 -208.5t-287 -76.5q-133 0 -249 56t-196 155q-47 -56 -129 -179q-11 22 -53.5 82.5t-74.5 97.5 q-80 -99 -196.5 -155.5t-249.5 -56.5q-155 0 -287 76.5t-209 208.5t-77 288q0 186 110 337q-9 51 -40 114.5t-75 114.5h365q149 100 355 156.5t432 56.5q224 0 421 -56t348 -157z" />
+<glyph unicode="&#xf263;" horiz-adv-x="1280" d="M640 629q-188 0 -321 133t-133 320q0 188 133 321t321 133t321 -133t133 -321q0 -187 -133 -320t-321 -133zM640 1306q-92 0 -157.5 -65.5t-65.5 -158.5q0 -92 65.5 -157.5t157.5 -65.5t157.5 65.5t65.5 157.5q0 93 -65.5 158.5t-157.5 65.5zM1163 574q13 -27 15 -49.5 t-4.5 -40.5t-26.5 -38.5t-42.5 -37t-61.5 -41.5q-115 -73 -315 -94l73 -72l267 -267q30 -31 30 -74t-30 -73l-12 -13q-31 -30 -74 -30t-74 30q-67 68 -267 268l-267 -268q-31 -30 -74 -30t-73 30l-12 13q-31 30 -31 73t31 74l267 267l72 72q-203 21 -317 94 q-39 25 -61.5 41.5t-42.5 37t-26.5 38.5t-4.5 40.5t15 49.5q10 20 28 35t42 22t56 -2t65 -35q5 -4 15 -11t43 -24.5t69 -30.5t92 -24t113 -11q91 0 174 25.5t120 50.5l38 25q33 26 65 35t56 2t42 -22t28 -35z" />
+<glyph unicode="&#xf264;" d="M927 956q0 -66 -46.5 -112.5t-112.5 -46.5t-112.5 46.5t-46.5 112.5t46.5 112.5t112.5 46.5t112.5 -46.5t46.5 -112.5zM1141 593q-10 20 -28 32t-47.5 9.5t-60.5 -27.5q-10 -8 -29 -20t-81 -32t-127 -20t-124 18t-86 36l-27 18q-31 25 -60.5 27.5t-47.5 -9.5t-28 -32 q-22 -45 -2 -74.5t87 -73.5q83 -53 226 -67l-51 -52q-142 -142 -191 -190q-22 -22 -22 -52.5t22 -52.5l9 -9q22 -22 52.5 -22t52.5 22l191 191q114 -115 191 -191q22 -22 52.5 -22t52.5 22l9 9q22 22 22 52.5t-22 52.5l-191 190l-52 52q141 14 225 67q67 44 87 73.5t-2 74.5 zM1092 956q0 134 -95 229t-229 95t-229 -95t-95 -229t95 -229t229 -95t229 95t95 229zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z" />
+<glyph unicode="&#xf265;" horiz-adv-x="1720" d="M1565 1408q65 0 110 -45.5t45 -110.5v-519q0 -176 -68 -336t-182.5 -275t-274 -182.5t-334.5 -67.5q-176 0 -335.5 67.5t-274.5 182.5t-183 275t-68 336v519q0 64 46 110t110 46h1409zM861 344q47 0 82 33l404 388q37 35 37 85q0 49 -34.5 83.5t-83.5 34.5q-47 0 -82 -33 l-323 -310l-323 310q-35 33 -81 33q-49 0 -83.5 -34.5t-34.5 -83.5q0 -51 36 -85l405 -388q33 -33 81 -33z" />
+<glyph unicode="&#xf266;" horiz-adv-x="2304" d="M1494 -103l-295 695q-25 -49 -158.5 -305.5t-198.5 -389.5q-1 -1 -27.5 -0.5t-26.5 1.5q-82 193 -255.5 587t-259.5 596q-21 50 -66.5 107.5t-103.5 100.5t-102 43q0 5 -0.5 24t-0.5 27h583v-50q-39 -2 -79.5 -16t-66.5 -43t-10 -64q26 -59 216.5 -499t235.5 -540 q31 61 140 266.5t131 247.5q-19 39 -126 281t-136 295q-38 69 -201 71v50l513 -1v-47q-60 -2 -93.5 -25t-12.5 -69q33 -70 87 -189.5t86 -187.5q110 214 173 363q24 55 -10 79.5t-129 26.5q1 7 1 25v24q64 0 170.5 0.5t180 1t92.5 0.5v-49q-62 -2 -119 -33t-90 -81 l-213 -442q13 -33 127.5 -290t121.5 -274l441 1017q-14 38 -49.5 62.5t-65 31.5t-55.5 8v50l460 -4l1 -2l-1 -44q-139 -4 -201 -145q-526 -1216 -559 -1291h-49z" />
+<glyph unicode="&#xf267;" horiz-adv-x="1792" d="M949 643q0 -26 -16.5 -45t-41.5 -19q-26 0 -45 16.5t-19 41.5q0 26 17 45t42 19t44 -16.5t19 -41.5zM964 585l350 581q-9 -8 -67.5 -62.5t-125.5 -116.5t-136.5 -127t-117 -110.5t-50.5 -51.5l-349 -580q7 7 67 62t126 116.5t136 127t117 111t50 50.5zM1611 640 q0 -201 -104 -371q-3 2 -17 11t-26.5 16.5t-16.5 7.5q-13 0 -13 -13q0 -10 59 -44q-74 -112 -184.5 -190.5t-241.5 -110.5l-16 67q-1 10 -15 10q-5 0 -8 -5.5t-2 -9.5l16 -68q-72 -15 -146 -15q-199 0 -372 105q1 2 13 20.5t21.5 33.5t9.5 19q0 13 -13 13q-6 0 -17 -14.5 t-22.5 -34.5t-13.5 -23q-113 75 -192 187.5t-110 244.5l69 15q10 3 10 15q0 5 -5.5 8t-10.5 2l-68 -15q-14 72 -14 139q0 206 109 379q2 -1 18.5 -12t30 -19t17.5 -8q13 0 13 12q0 6 -12.5 15.5t-32.5 21.5l-20 12q77 112 189 189t244 107l15 -67q2 -10 15 -10q5 0 8 5.5 t2 10.5l-15 66q71 13 134 13q204 0 379 -109q-39 -56 -39 -65q0 -13 12 -13q11 0 48 64q111 -75 187.5 -186t107.5 -241l-56 -12q-10 -2 -10 -16q0 -5 5.5 -8t9.5 -2l57 13q14 -72 14 -140zM1696 640q0 163 -63.5 311t-170.5 255t-255 170.5t-311 63.5t-311 -63.5 t-255 -170.5t-170.5 -255t-63.5 -311t63.5 -311t170.5 -255t255 -170.5t311 -63.5t311 63.5t255 170.5t170.5 255t63.5 311zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71t348 -71t286 -191 t191 -286t71 -348z" />
+<glyph unicode="&#xf268;" horiz-adv-x="1792" d="M893 1536q240 2 451 -120q232 -134 352 -372l-742 39q-160 9 -294 -74.5t-185 -229.5l-276 424q128 159 311 245.5t383 87.5zM146 1131l337 -663q72 -143 211 -217t293 -45l-230 -451q-212 33 -385 157.5t-272.5 316t-99.5 411.5q0 267 146 491zM1732 962 q58 -150 59.5 -310.5t-48.5 -306t-153 -272t-246 -209.5q-230 -133 -498 -119l405 623q88 131 82.5 290.5t-106.5 277.5zM896 942q125 0 213.5 -88.5t88.5 -213.5t-88.5 -213.5t-213.5 -88.5t-213.5 88.5t-88.5 213.5t88.5 213.5t213.5 88.5z" />
+<glyph unicode="&#xf269;" horiz-adv-x="1792" d="M903 -256q-283 0 -504.5 150.5t-329.5 398.5q-58 131 -67 301t26 332.5t111 312t179 242.5l-11 -281q11 14 68 15.5t70 -15.5q42 81 160.5 138t234.5 59q-54 -45 -119.5 -148.5t-58.5 -163.5q25 -8 62.5 -13.5t63 -7.5t68 -4t50.5 -3q15 -5 9.5 -45.5t-30.5 -75.5 q-5 -7 -16.5 -18.5t-56.5 -35.5t-101 -34l15 -189l-139 67q-18 -43 -7.5 -81.5t36 -66.5t65.5 -41.5t81 -6.5q51 9 98 34.5t83.5 45t73.5 17.5q61 -4 89.5 -33t19.5 -65q-1 -2 -2.5 -5.5t-8.5 -12.5t-18 -15.5t-31.5 -10.5t-46.5 -1q-60 -95 -144.5 -135.5t-209.5 -29.5 q74 -61 162.5 -82.5t168.5 -6t154.5 52t128 87.5t80.5 104q43 91 39 192.5t-37.5 188.5t-78.5 125q87 -38 137 -79.5t77 -112.5q15 170 -57.5 343t-209.5 284q265 -77 412 -279.5t151 -517.5q2 -127 -40.5 -255t-123.5 -238t-189 -196t-247.5 -135.5t-288.5 -49.5z" />
+<glyph unicode="&#xf26a;" horiz-adv-x="1792" d="M1493 1308q-165 110 -359 110q-155 0 -293 -73t-240 -200q-75 -93 -119.5 -218t-48.5 -266v-42q4 -141 48.5 -266t119.5 -218q102 -127 240 -200t293 -73q194 0 359 110q-121 -108 -274.5 -168t-322.5 -60q-29 0 -43 1q-175 8 -333 82t-272 193t-181 281t-67 339 q0 182 71 348t191 286t286 191t348 71h3q168 -1 320.5 -60.5t273.5 -167.5zM1792 640q0 -192 -77 -362.5t-213 -296.5q-104 -63 -222 -63q-137 0 -255 84q154 56 253.5 233t99.5 405q0 227 -99 404t-253 234q119 83 254 83q119 0 226 -65q135 -125 210.5 -295t75.5 -361z " />
+<glyph unicode="&#xf26b;" horiz-adv-x="1792" d="M1792 599q0 -56 -7 -104h-1151q0 -146 109.5 -244.5t257.5 -98.5q99 0 185.5 46.5t136.5 130.5h423q-56 -159 -170.5 -281t-267.5 -188.5t-321 -66.5q-187 0 -356 83q-228 -116 -394 -116q-237 0 -237 263q0 115 45 275q17 60 109 229q199 360 475 606 q-184 -79 -427 -354q63 274 283.5 449.5t501.5 175.5q30 0 45 -1q255 117 433 117q64 0 116 -13t94.5 -40.5t66.5 -76.5t24 -115q0 -116 -75 -286q101 -182 101 -390zM1722 1239q0 83 -53 132t-137 49q-108 0 -254 -70q121 -47 222.5 -131.5t170.5 -195.5q51 135 51 216z M128 2q0 -86 48.5 -132.5t134.5 -46.5q115 0 266 83q-122 72 -213.5 183t-137.5 245q-98 -205 -98 -332zM632 715h728q-5 142 -113 237t-251 95q-144 0 -251.5 -95t-112.5 -237z" />
+<glyph unicode="&#xf26c;" horiz-adv-x="2048" d="M1792 288v960q0 13 -9.5 22.5t-22.5 9.5h-1600q-13 0 -22.5 -9.5t-9.5 -22.5v-960q0 -13 9.5 -22.5t22.5 -9.5h1600q13 0 22.5 9.5t9.5 22.5zM1920 1248v-960q0 -66 -47 -113t-113 -47h-736v-128h352q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-832q-14 0 -23 9t-9 23 v64q0 14 9 23t23 9h352v128h-736q-66 0 -113 47t-47 113v960q0 66 47 113t113 47h1600q66 0 113 -47t47 -113z" />
+<glyph unicode="&#xf26d;" horiz-adv-x="1792" d="M138 1408h197q-70 -64 -126 -149q-36 -56 -59 -115t-30 -125.5t-8.5 -120t10.5 -132t21 -126t28 -136.5q4 -19 6 -28q51 -238 81 -329q57 -171 152 -275h-272q-48 0 -82 34t-34 82v1304q0 48 34 82t82 34zM1346 1408h308q48 0 82 -34t34 -82v-1304q0 -48 -34 -82t-82 -34 h-178q212 210 196 565l-469 -101q-2 -45 -12 -82t-31 -72t-59.5 -59.5t-93.5 -36.5q-123 -26 -199 40q-32 27 -53 61t-51.5 129t-64.5 258q-35 163 -45.5 263t-5.5 139t23 77q20 41 62.5 73t102.5 45q45 12 83.5 6.5t67 -17t54 -35t43 -48t34.5 -56.5l468 100 q-68 175 -180 287z" />
+<glyph unicode="&#xf26e;" d="M1401 -11l-6 -6q-113 -114 -259 -175q-154 -64 -317 -64q-165 0 -317 64q-148 63 -259 175q-113 112 -175 258q-42 103 -54 189q-4 28 48 36q51 8 56 -20q1 -1 1 -4q18 -90 46 -159q50 -124 152 -226q98 -98 226 -152q132 -56 276 -56q143 0 276 56q128 55 225 152l6 6 q10 10 25 6q12 -3 33 -22q36 -37 17 -58zM929 604l-66 -66l63 -63q21 -21 -7 -49q-17 -17 -32 -17q-10 0 -19 10l-62 61l-66 -66q-5 -5 -15 -5q-15 0 -31 16l-2 2q-18 15 -18 29q0 7 8 17l66 65l-66 66q-16 16 14 45q18 18 31 18q6 0 13 -5l65 -66l65 65q18 17 48 -13 q27 -27 11 -44zM1400 547q0 -118 -46 -228q-45 -105 -126 -186q-80 -80 -187 -126t-228 -46t-228 46t-187 126q-82 82 -125 186q-15 32 -15 40h-1q-9 27 43 44q50 16 60 -12q37 -99 97 -167h1v339v2q3 136 102 232q105 103 253 103q147 0 251 -103t104 -249 q0 -147 -104.5 -251t-250.5 -104q-58 0 -112 16q-28 11 -13 61q16 51 44 43l14 -3q14 -3 32.5 -6t30.5 -3q104 0 176 71.5t72 174.5q0 101 -72 171q-71 71 -175 71q-107 0 -178 -80q-64 -72 -64 -160v-413q110 -67 242 -67q96 0 185 36.5t156 103.5t103.5 155t36.5 183 q0 198 -141 339q-140 140 -339 140q-200 0 -340 -140q-53 -53 -77 -87l-2 -2q-8 -11 -13 -15.5t-21.5 -9.5t-38.5 3q-21 5 -36.5 16.5t-15.5 26.5v680q0 15 10.5 26.5t27.5 11.5h877q30 0 30 -55t-30 -55h-811v-483h1q40 42 102 84t108 61q109 46 231 46q121 0 228 -46 t187 -126q81 -81 126 -186q46 -112 46 -229zM1369 1128q9 -8 9 -18t-5.5 -18t-16.5 -21q-26 -26 -39 -26q-9 0 -16 7q-106 91 -207 133q-128 56 -276 56q-133 0 -262 -49q-27 -10 -45 37q-9 25 -8 38q3 16 16 20q130 57 299 57q164 0 316 -64q137 -58 235 -152z" />
+<glyph unicode="&#xf270;" horiz-adv-x="1792" d="M1551 60q15 6 26 3t11 -17.5t-15 -33.5q-13 -16 -44 -43.5t-95.5 -68t-141 -74t-188 -58t-229.5 -24.5q-119 0 -238 31t-209 76.5t-172.5 104t-132.5 105t-84 87.5q-8 9 -10 16.5t1 12t8 7t11.5 2t11.5 -4.5q192 -117 300 -166q389 -176 799 -90q190 40 391 135z M1758 175q11 -16 2.5 -69.5t-28.5 -102.5q-34 -83 -85 -124q-17 -14 -26 -9t0 24q21 45 44.5 121.5t6.5 98.5q-5 7 -15.5 11.5t-27 6t-29.5 2.5t-35 0t-31.5 -2t-31 -3t-22.5 -2q-6 -1 -13 -1.5t-11 -1t-8.5 -1t-7 -0.5h-5.5h-4.5t-3 0.5t-2 1.5l-1.5 3q-6 16 47 40t103 30 q46 7 108 1t76 -24zM1364 618q0 -31 13.5 -64t32 -58t37.5 -46t33 -32l13 -11l-227 -224q-40 37 -79 75.5t-58 58.5l-19 20q-11 11 -25 33q-38 -59 -97.5 -102.5t-127.5 -63.5t-140 -23t-137.5 21t-117.5 65.5t-83 113t-31 162.5q0 84 28 154t72 116.5t106.5 83t122.5 57 t130 34.5t119.5 18.5t99.5 6.5v127q0 65 -21 97q-34 53 -121 53q-6 0 -16.5 -1t-40.5 -12t-56 -29.5t-56 -59.5t-48 -96l-294 27q0 60 22 119t67 113t108 95t151.5 65.5t190.5 24.5q100 0 181 -25t129.5 -61.5t81 -83t45 -86t12.5 -73.5v-589zM692 597q0 -86 70 -133 q66 -44 139 -22q84 25 114 123q14 45 14 101v162q-59 -2 -111 -12t-106.5 -33.5t-87 -71t-32.5 -114.5z" />
+<glyph unicode="&#xf271;" horiz-adv-x="1792" d="M1536 1280q52 0 90 -38t38 -90v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128zM1152 1376v-288q0 -14 9 -23t23 -9 h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM384 1376v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23zM1536 -128v1024h-1408v-1024h1408zM896 448h224q14 0 23 -9t9 -23v-64q0 -14 -9 -23t-23 -9h-224 v-224q0 -14 -9 -23t-23 -9h-64q-14 0 -23 9t-9 23v224h-224q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h224v224q0 14 9 23t23 9h64q14 0 23 -9t9 -23v-224z" />
+<glyph unicode="&#xf272;" horiz-adv-x="1792" d="M1152 416v-64q0 -14 -9 -23t-23 -9h-576q-14 0 -23 9t-9 23v64q0 14 9 23t23 9h576q14 0 23 -9t9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23 t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47 t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf273;" horiz-adv-x="1792" d="M1111 151l-46 -46q-9 -9 -22 -9t-23 9l-188 189l-188 -189q-10 -9 -23 -9t-22 9l-46 46q-9 9 -9 22t9 23l189 188l-189 188q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l188 -188l188 188q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23l-188 -188l188 -188q9 -10 9 -23t-9 -22z M128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280 q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf274;" horiz-adv-x="1792" d="M1303 572l-512 -512q-10 -9 -23 -9t-23 9l-288 288q-9 10 -9 23t9 22l46 46q9 9 22 9t23 -9l220 -220l444 444q10 9 23 9t22 -9l46 -46q9 -9 9 -22t-9 -23zM128 -128h1408v1024h-1408v-1024zM512 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23 t23 -9h64q14 0 23 9t9 23zM1280 1088v288q0 14 -9 23t-23 9h-64q-14 0 -23 -9t-9 -23v-288q0 -14 9 -23t23 -9h64q14 0 23 9t9 23zM1664 1152v-1280q0 -52 -38 -90t-90 -38h-1408q-52 0 -90 38t-38 90v1280q0 52 38 90t90 38h128v96q0 66 47 113t113 47h64q66 0 113 -47 t47 -113v-96h384v96q0 66 47 113t113 47h64q66 0 113 -47t47 -113v-96h128q52 0 90 -38t38 -90z" />
+<glyph unicode="&#xf275;" horiz-adv-x="1792" d="M448 1536q26 0 45 -19t19 -45v-891l536 429q17 14 40 14q26 0 45 -19t19 -45v-379l536 429q17 14 40 14q26 0 45 -19t19 -45v-1152q0 -26 -19 -45t-45 -19h-1664q-26 0 -45 19t-19 45v1664q0 26 19 45t45 19h384z" />
+<glyph unicode="&#xf276;" horiz-adv-x="1024" d="M512 448q66 0 128 15v-655q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v655q61 -15 128 -15zM512 1536q212 0 362 -150t150 -362t-150 -362t-362 -150t-362 150t-150 362t150 362t362 150zM512 1312q14 0 23 9t9 23t-9 23t-23 9q-146 0 -249 -103t-103 -249 q0 -14 9 -23t23 -9t23 9t9 23q0 119 84.5 203.5t203.5 84.5z" />
+<glyph unicode="&#xf277;" horiz-adv-x="1792" d="M1745 1239q10 -10 10 -23t-10 -23l-141 -141q-28 -28 -68 -28h-1344q-26 0 -45 19t-19 45v256q0 26 19 45t45 19h576v64q0 26 19 45t45 19h128q26 0 45 -19t19 -45v-64h512q40 0 68 -28zM768 320h256v-512q0 -26 -19 -45t-45 -19h-128q-26 0 -45 19t-19 45v512zM1600 768 q26 0 45 -19t19 -45v-256q0 -26 -19 -45t-45 -19h-1344q-40 0 -68 28l-141 141q-10 10 -10 23t10 23l141 141q28 28 68 28h512v192h256v-192h576z" />
+<glyph unicode="&#xf278;" horiz-adv-x="2048" d="M2020 1525q28 -20 28 -53v-1408q0 -20 -11 -36t-29 -23l-640 -256q-24 -11 -48 0l-616 246l-616 -246q-10 -5 -24 -5q-19 0 -36 11q-28 20 -28 53v1408q0 20 11 36t29 23l640 256q24 11 48 0l616 -246l616 246q32 13 60 -6zM736 1390v-1270l576 -230v1270zM128 1173 v-1270l544 217v1270zM1920 107v1270l-544 -217v-1270z" />
+<glyph unicode="&#xf279;" horiz-adv-x="1792" d="M512 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472q0 20 17 28l480 256q7 4 15 4zM1760 1536q13 0 22.5 -9.5t9.5 -22.5v-1472q0 -20 -17 -28l-480 -256q-7 -4 -15 -4q-13 0 -22.5 9.5t-9.5 22.5v1472 q0 20 17 28l480 256q7 4 15 4zM640 1536q8 0 14 -3l512 -256q18 -10 18 -29v-1472q0 -13 -9.5 -22.5t-22.5 -9.5q-8 0 -14 3l-512 256q-18 10 -18 29v1472q0 13 9.5 22.5t22.5 9.5z" />
+<glyph unicode="&#xf27a;" horiz-adv-x="1792" d="M640 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1024 640q0 53 -37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1408 640q0 53 -37.5 90.5t-90.5 37.5 t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-110 0 -211 18q-173 -173 -435 -229q-52 -10 -86 -13q-12 -1 -22 6t-13 18q-4 15 20 37q5 5 23.5 21.5t25.5 23.5t23.5 25.5t24 31.5t20.5 37 t20 48t14.5 57.5t12.5 72.5q-146 90 -229.5 216.5t-83.5 269.5q0 174 120 321.5t326 233t450 85.5t450 -85.5t326 -233t120 -321.5z" />
+<glyph unicode="&#xf27b;" horiz-adv-x="1792" d="M640 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1024 640q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM1408 640q0 -53 -37.5 -90.5t-90.5 -37.5 t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM896 1152q-204 0 -381.5 -69.5t-282 -187.5t-104.5 -255q0 -112 71.5 -213.5t201.5 -175.5l87 -50l-27 -96q-24 -91 -70 -172q152 63 275 171l43 38l57 -6q69 -8 130 -8q204 0 381.5 69.5t282 187.5 t104.5 255t-104.5 255t-282 187.5t-381.5 69.5zM1792 640q0 -174 -120 -321.5t-326 -233t-450 -85.5q-70 0 -145 8q-198 -175 -460 -242q-49 -14 -114 -22h-5q-15 0 -27 10.5t-16 27.5v1q-3 4 -0.5 12t2 10t4.5 9.5l6 9t7 8.5t8 9q7 8 31 34.5t34.5 38t31 39.5t32.5 51 t27 59t26 76q-157 89 -247.5 220t-90.5 281q0 130 71 248.5t191 204.5t286 136.5t348 50.5t348 -50.5t286 -136.5t191 -204.5t71 -248.5z" />
+<glyph unicode="&#xf27c;" horiz-adv-x="1024" d="M512 345l512 295v-591l-512 -296v592zM0 640v-591l512 296zM512 1527v-591l-512 -296v591zM512 936l512 295v-591z" />
+<glyph unicode="&#xf27d;" horiz-adv-x="1792" d="M1709 1018q-10 -236 -332 -651q-333 -431 -562 -431q-142 0 -240 263q-44 160 -132 482q-72 262 -157 262q-18 0 -127 -76l-77 98q24 21 108 96.5t130 115.5q156 138 241 146q95 9 153 -55.5t81 -203.5q44 -287 66 -373q55 -249 120 -249q51 0 154 161q101 161 109 246 q13 139 -109 139q-57 0 -121 -26q120 393 459 382q251 -8 236 -326z" />
+<glyph unicode="&#xf27e;" d="M0 1408h1536v-1536h-1536v1536zM1085 293l-221 631l221 297h-634l221 -297l-221 -631l317 -304z" />
+<glyph unicode="&#xf280;" d="M0 1408h1536v-1536h-1536v1536zM908 1088l-12 -33l75 -83l-31 -114l25 -25l107 57l107 -57l25 25l-31 114l75 83l-12 33h-95l-53 96h-32l-53 -96h-95zM641 925q32 0 44.5 -16t11.5 -63l174 21q0 55 -17.5 92.5t-50.5 56t-69 25.5t-85 7q-133 0 -199 -57.5t-66 -182.5v-72 h-96v-128h76q20 0 20 -8v-382q0 -14 -5 -20t-18 -7l-73 -7v-88h448v86l-149 14q-6 1 -8.5 1.5t-3.5 2.5t-0.5 4t1 7t0.5 10v387h191l38 128h-231q-6 0 -2 6t4 9v80q0 27 1.5 40.5t7.5 28t19.5 20t36.5 5.5zM1248 96v86l-54 9q-7 1 -9.5 2.5t-2.5 3t1 7.5t1 12v520h-275 l-23 -101l83 -22q23 -7 23 -27v-370q0 -14 -6 -18.5t-20 -6.5l-70 -9v-86h352z" />
+<glyph unicode="&#xf281;" horiz-adv-x="1792" d="M1792 690q0 -58 -29.5 -105.5t-79.5 -72.5q12 -46 12 -96q0 -155 -106.5 -287t-290.5 -208.5t-400 -76.5t-399.5 76.5t-290 208.5t-106.5 287q0 47 11 94q-51 25 -82 73.5t-31 106.5q0 82 58 140.5t141 58.5q85 0 145 -63q218 152 515 162l116 521q3 13 15 21t26 5 l369 -81q18 37 54 59.5t79 22.5q62 0 106 -43.5t44 -105.5t-44 -106t-106 -44t-105.5 43.5t-43.5 105.5l-334 74l-104 -472q300 -9 519 -160q58 61 143 61q83 0 141 -58.5t58 -140.5zM418 491q0 -62 43.5 -106t105.5 -44t106 44t44 106t-44 105.5t-106 43.5q-61 0 -105 -44 t-44 -105zM1228 136q11 11 11 26t-11 26q-10 10 -25 10t-26 -10q-41 -42 -121 -62t-160 -20t-160 20t-121 62q-11 10 -26 10t-25 -10q-11 -10 -11 -25.5t11 -26.5q43 -43 118.5 -68t122.5 -29.5t91 -4.5t91 4.5t122.5 29.5t118.5 68zM1225 341q62 0 105.5 44t43.5 106 q0 61 -44 105t-105 44q-62 0 -106 -43.5t-44 -105.5t44 -106t106 -44z" />
+<glyph unicode="&#xf282;" horiz-adv-x="1792" d="M69 741h1q16 126 58.5 241.5t115 217t167.5 176t223.5 117.5t276.5 43q231 0 414 -105.5t294 -303.5q104 -187 104 -442v-188h-1125q1 -111 53.5 -192.5t136.5 -122.5t189.5 -57t213 -3t208 46.5t173.5 84.5v-377q-92 -55 -229.5 -92t-312.5 -38t-316 53 q-189 73 -311.5 249t-124.5 372q-3 242 111 412t325 268q-48 -60 -78 -125.5t-46 -159.5h635q8 77 -8 140t-47 101.5t-70.5 66.5t-80.5 41t-75 20.5t-56 8.5l-22 1q-135 -5 -259.5 -44.5t-223.5 -104.5t-176 -140.5t-138 -163.5z" />
+<glyph unicode="&#xf283;" horiz-adv-x="2304" d="M0 32v608h2304v-608q0 -66 -47 -113t-113 -47h-1984q-66 0 -113 47t-47 113zM640 256v-128h384v128h-384zM256 256v-128h256v128h-256zM2144 1408q66 0 113 -47t47 -113v-224h-2304v224q0 66 47 113t113 47h1984z" />
+<glyph unicode="&#xf284;" horiz-adv-x="1792" d="M1549 857q55 0 85.5 -28.5t30.5 -83.5t-34 -82t-91 -27h-136v-177h-25v398h170zM1710 267l-4 -11l-5 -10q-113 -230 -330.5 -366t-474.5 -136q-182 0 -348 71t-286 191t-191 286t-71 348t71 348t191 286t286 191t348 71q244 0 454.5 -124t329.5 -338l2 -4l8 -16 q-30 -15 -136.5 -68.5t-163.5 -84.5q-6 -3 -479 -268q384 -183 799 -366zM896 -234q250 0 462.5 132.5t322.5 357.5l-287 129q-72 -140 -206 -222t-292 -82q-151 0 -280 75t-204 204t-75 280t75 280t204 204t280 75t280 -73.5t204 -204.5l280 143q-116 208 -321 329 t-443 121q-119 0 -232.5 -31.5t-209 -87.5t-176.5 -137t-137 -176.5t-87.5 -209t-31.5 -232.5t31.5 -232.5t87.5 -209t137 -176.5t176.5 -137t209 -87.5t232.5 -31.5z" />
+<glyph unicode="&#xf285;" horiz-adv-x="1792" d="M1427 827l-614 386l92 151h855zM405 562l-184 116v858l1183 -743zM1424 697l147 -95v-858l-532 335zM1387 718l-500 -802h-855l356 571z" />
+<glyph unicode="&#xf286;" horiz-adv-x="1792" d="M640 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1152 528v224q0 16 -16 16h-96q-16 0 -16 -16v-224q0 -16 16 -16h96q16 0 16 16zM1664 496v-752h-640v320q0 80 -56 136t-136 56t-136 -56t-56 -136v-320h-640v752q0 16 16 16h96 q16 0 16 -16v-112h128v624q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h16v393q-32 19 -32 55q0 26 19 45t45 19t45 -19t19 -45q0 -36 -32 -55v-9h272q16 0 16 -16v-224q0 -16 -16 -16h-272v-128h16q16 0 16 -16v-112h128 v112q0 16 16 16h96q16 0 16 -16v-112h128v112q0 16 16 16h96q16 0 16 -16v-624h128v112q0 16 16 16h96q16 0 16 -16z" />
+<glyph unicode="&#xf287;" horiz-adv-x="2304" d="M2288 731q16 -8 16 -27t-16 -27l-320 -192q-8 -5 -16 -5q-9 0 -16 4q-16 10 -16 28v128h-858q37 -58 83 -165q16 -37 24.5 -55t24 -49t27 -47t27 -34t31.5 -26t33 -8h96v96q0 14 9 23t23 9h320q14 0 23 -9t9 -23v-320q0 -14 -9 -23t-23 -9h-320q-14 0 -23 9t-9 23v96h-96 q-32 0 -61 10t-51 23.5t-45 40.5t-37 46t-33.5 57t-28.5 57.5t-28 60.5q-23 53 -37 81.5t-36 65t-44.5 53.5t-46.5 17h-360q-22 -84 -91 -138t-157 -54q-106 0 -181 75t-75 181t75 181t181 75q88 0 157 -54t91 -138h104q24 0 46.5 17t44.5 53.5t36 65t37 81.5q19 41 28 60.5 t28.5 57.5t33.5 57t37 46t45 40.5t51 23.5t61 10h107q21 57 70 92.5t111 35.5q80 0 136 -56t56 -136t-56 -136t-136 -56q-62 0 -111 35.5t-70 92.5h-107q-17 0 -33 -8t-31.5 -26t-27 -34t-27 -47t-24 -49t-24.5 -55q-46 -107 -83 -165h1114v128q0 18 16 28t32 -1z" />
+<glyph unicode="&#xf288;" horiz-adv-x="1792" d="M1150 774q0 -56 -39.5 -95t-95.5 -39h-253v269h253q56 0 95.5 -39.5t39.5 -95.5zM1329 774q0 130 -91.5 222t-222.5 92h-433v-896h180v269h253q130 0 222 91.5t92 221.5zM1792 640q0 -182 -71 -348t-191 -286t-286 -191t-348 -71t-348 71t-286 191t-191 286t-71 348 t71 348t191 286t286 191t348 71t348 -71t286 -191t191 -286t71 -348z" />
+<glyph unicode="&#xf289;" horiz-adv-x="2304" d="M1645 438q0 59 -34 106.5t-87 68.5q-7 -45 -23 -92q-7 -24 -27.5 -38t-44.5 -14q-12 0 -24 3q-31 10 -45 38.5t-4 58.5q23 71 23 143q0 123 -61 227.5t-166 165.5t-228 61q-134 0 -247 -73t-167 -194q108 -28 188 -106q22 -23 22 -55t-22 -54t-54 -22t-55 22 q-75 75 -180 75q-106 0 -181 -74.5t-75 -180.5t75 -180.5t181 -74.5h1046q79 0 134.5 55.5t55.5 133.5zM1798 438q0 -142 -100.5 -242t-242.5 -100h-1046q-169 0 -289 119.5t-120 288.5q0 153 100 267t249 136q62 184 221 298t354 114q235 0 408.5 -158.5t196.5 -389.5 q116 -25 192.5 -118.5t76.5 -214.5zM2048 438q0 -175 -97 -319q-23 -33 -64 -33q-24 0 -43 13q-26 17 -32 48.5t12 57.5q71 104 71 233t-71 233q-18 26 -12 57t32 49t57.5 11.5t49.5 -32.5q97 -142 97 -318zM2304 438q0 -244 -134 -443q-23 -34 -64 -34q-23 0 -42 13 q-26 18 -32.5 49t11.5 57q108 164 108 358q0 195 -108 357q-18 26 -11.5 57.5t32.5 48.5q26 18 57 12t49 -33q134 -198 134 -442z" />
+<glyph unicode="&#xf28a;" d="M1500 -13q0 -89 -63 -152.5t-153 -63.5t-153.5 63.5t-63.5 152.5q0 90 63.5 153.5t153.5 63.5t153 -63.5t63 -153.5zM1267 268q-115 -15 -192.5 -102.5t-77.5 -205.5q0 -74 33 -138q-146 -78 -379 -78q-109 0 -201 21t-153.5 54.5t-110.5 76.5t-76 85t-44.5 83 t-23.5 66.5t-6 39.5q0 19 4.5 42.5t18.5 56t36.5 58t64 43.5t94.5 18t94 -17.5t63 -41t35.5 -53t17.5 -49t4 -33.5q0 -34 -23 -81q28 -27 82 -42t93 -17l40 -1q115 0 190 51t75 133q0 26 -9 48.5t-31.5 44.5t-49.5 41t-74 44t-93.5 47.5t-119.5 56.5q-28 13 -43 20 q-116 55 -187 100t-122.5 102t-72 125.5t-20.5 162.5q0 78 20.5 150t66 137.5t112.5 114t166.5 77t221.5 28.5q120 0 220 -26t164.5 -67t109.5 -94t64 -105.5t19 -103.5q0 -46 -15 -82.5t-36.5 -58t-48.5 -36t-49 -19.5t-39 -5h-8h-32t-39 5t-44 14t-41 28t-37 46t-24 70.5 t-10 97.5q-15 16 -59 25.5t-81 10.5l-37 1q-68 0 -117.5 -31t-70.5 -70t-21 -76q0 -24 5 -43t24 -46t53 -51t97 -53.5t150 -58.5q76 -25 138.5 -53.5t109 -55.5t83 -59t60.5 -59.5t41 -62.5t26.5 -62t14.5 -63.5t6 -62t1 -62.5z" />
+<glyph unicode="&#xf28b;" d="M704 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1152 352v576q0 14 -9 23t-23 9h-256q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h256q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103 t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5t103 -385.5z" />
+<glyph unicode="&#xf28c;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 t73 -273t198 -198t273 -73zM864 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h192q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-192z" />
+<glyph unicode="&#xf28d;" d="M1088 352v576q0 14 -9 23t-23 9h-576q-14 0 -23 -9t-9 -23v-576q0 -14 9 -23t23 -9h576q14 0 23 9t9 23zM1536 640q0 -209 -103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103t385.5 -103t279.5 -279.5 t103 -385.5z" />
+<glyph unicode="&#xf28e;" d="M768 1408q209 0 385.5 -103t279.5 -279.5t103 -385.5t-103 -385.5t-279.5 -279.5t-385.5 -103t-385.5 103t-279.5 279.5t-103 385.5t103 385.5t279.5 279.5t385.5 103zM768 96q148 0 273 73t198 198t73 273t-73 273t-198 198t-273 73t-273 -73t-198 -198t-73 -273 t73 -273t198 -198t273 -73zM480 320q-14 0 -23 9t-9 23v576q0 14 9 23t23 9h576q14 0 23 -9t9 -23v-576q0 -14 -9 -23t-23 -9h-576z" />
+<glyph unicode="&#xf290;" horiz-adv-x="1792" d="M1757 128l35 -313q3 -28 -16 -50q-19 -21 -48 -21h-1664q-29 0 -48 21q-19 22 -16 50l35 313h1722zM1664 967l86 -775h-1708l86 775q3 24 21 40.5t43 16.5h256v-128q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5v128h384v-128q0 -53 37.5 -90.5t90.5 -37.5 t90.5 37.5t37.5 90.5v128h256q25 0 43 -16.5t21 -40.5zM1280 1152v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 106 -75 181t-181 75t-181 -75t-75 -181v-256q0 -26 -19 -45t-45 -19t-45 19t-19 45v256q0 159 112.5 271.5t271.5 112.5t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf291;" horiz-adv-x="2048" d="M1920 768q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-15l-115 -662q-8 -46 -44 -76t-82 -30h-1280q-46 0 -82 30t-44 76l-115 662h-15q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5h1792zM485 -32q26 2 43.5 22.5t15.5 46.5l-32 416q-2 26 -22.5 43.5 t-46.5 15.5t-43.5 -22.5t-15.5 -46.5l32 -416q2 -25 20.5 -42t43.5 -17h5zM896 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1280 32v416q0 26 -19 45t-45 19t-45 -19t-19 -45v-416q0 -26 19 -45t45 -19t45 19t19 45zM1632 27l32 416 q2 26 -15.5 46.5t-43.5 22.5t-46.5 -15.5t-22.5 -43.5l-32 -416q-2 -26 15.5 -46.5t43.5 -22.5h5q25 0 43.5 17t20.5 42zM476 1244l-93 -412h-132l101 441q19 88 89 143.5t160 55.5h167q0 26 19 45t45 19h384q26 0 45 -19t19 -45h167q90 0 160 -55.5t89 -143.5l101 -441 h-132l-93 412q-11 44 -45.5 72t-79.5 28h-167q0 -26 -19 -45t-45 -19h-384q-26 0 -45 19t-19 45h-167q-45 0 -79.5 -28t-45.5 -72z" />
+<glyph unicode="&#xf292;" horiz-adv-x="1792" d="M991 512l64 256h-254l-64 -256h254zM1759 1016l-56 -224q-7 -24 -31 -24h-327l-64 -256h311q15 0 25 -12q10 -14 6 -28l-56 -224q-5 -24 -31 -24h-327l-81 -328q-7 -24 -31 -24h-224q-16 0 -26 12q-9 12 -6 28l78 312h-254l-81 -328q-7 -24 -31 -24h-225q-15 0 -25 12 q-9 12 -6 28l78 312h-311q-15 0 -25 12q-9 12 -6 28l56 224q7 24 31 24h327l64 256h-311q-15 0 -25 12q-10 14 -6 28l56 224q5 24 31 24h327l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h254l81 328q7 24 32 24h224q15 0 25 -12q9 -12 6 -28l-78 -312h311 q15 0 25 -12q9 -12 6 -28z" />
+<glyph unicode="&#xf293;" d="M841 483l148 -148l-149 -149zM840 1094l149 -149l-148 -148zM710 -130l464 464l-306 306l306 306l-464 464v-611l-255 255l-93 -93l320 -321l-320 -321l93 -93l255 255v-611zM1429 640q0 -209 -32 -365.5t-87.5 -257t-140.5 -162.5t-181.5 -86.5t-219.5 -24.5 t-219.5 24.5t-181.5 86.5t-140.5 162.5t-87.5 257t-32 365.5t32 365.5t87.5 257t140.5 162.5t181.5 86.5t219.5 24.5t219.5 -24.5t181.5 -86.5t140.5 -162.5t87.5 -257t32 -365.5z" />
+<glyph unicode="&#xf294;" horiz-adv-x="1024" d="M596 113l173 172l-173 172v-344zM596 823l173 172l-173 172v-344zM628 640l356 -356l-539 -540v711l-297 -296l-108 108l372 373l-372 373l108 108l297 -296v711l539 -540z" />
+<glyph unicode="&#xf295;" d="M1280 256q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM512 1024q0 52 -38 90t-90 38t-90 -38t-38 -90t38 -90t90 -38t90 38t38 90zM1536 256q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5t271.5 -112.5 t112.5 -271.5zM1440 1344q0 -20 -13 -38l-1056 -1408q-19 -26 -51 -26h-160q-26 0 -45 19t-19 45q0 20 13 38l1056 1408q19 26 51 26h160q26 0 45 -19t19 -45zM768 1024q0 -159 -112.5 -271.5t-271.5 -112.5t-271.5 112.5t-112.5 271.5t112.5 271.5t271.5 112.5 t271.5 -112.5t112.5 -271.5z" />
+<glyph unicode="&#xf296;" horiz-adv-x="1792" />
+<glyph unicode="&#xf297;" horiz-adv-x="1792" />
+<glyph unicode="&#xf298;" horiz-adv-x="1792" />
+<glyph unicode="&#xf299;" horiz-adv-x="1792" />
+<glyph unicode="&#xf29a;" horiz-adv-x="1792" />
+<glyph unicode="&#xf29b;" horiz-adv-x="1792" />
+<glyph unicode="&#xf29c;" horiz-adv-x="1792" />
+<glyph unicode="&#xf29d;" horiz-adv-x="1792" />
+<glyph unicode="&#xf29e;" horiz-adv-x="1792" />
+<glyph unicode="&#xf500;" horiz-adv-x="1792" />
+</font>
+</defs></svg> \ No newline at end of file
diff --git a/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.ttf b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.ttf
new file mode 100644
index 0000000..26dea79
--- /dev/null
+++ b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.ttf
Binary files differ
diff --git a/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff
new file mode 100644
index 0000000..dc35ce3
--- /dev/null
+++ b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff
Binary files differ
diff --git a/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff2 b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff2
new file mode 100644
index 0000000..500e517
--- /dev/null
+++ b/src/usr/local/www/font-awesome/fonts/fontawesome-webfont.woff2
Binary files differ
diff --git a/src/usr/local/www/font-awesome/less/animated.less b/src/usr/local/www/font-awesome/less/animated.less
new file mode 100644
index 0000000..66ad52a
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/animated.less
@@ -0,0 +1,34 @@
+// Animated Icons
+// --------------------------
+
+.@{fa-css-prefix}-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+
+.@{fa-css-prefix}-pulse {
+ -webkit-animation: fa-spin 1s infinite steps(8);
+ animation: fa-spin 1s infinite steps(8);
+}
+
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
diff --git a/src/usr/local/www/font-awesome/less/bordered-pulled.less b/src/usr/local/www/font-awesome/less/bordered-pulled.less
new file mode 100644
index 0000000..f1c8ad7
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/bordered-pulled.less
@@ -0,0 +1,25 @@
+// Bordered & Pulled
+// -------------------------
+
+.@{fa-css-prefix}-border {
+ padding: .2em .25em .15em;
+ border: solid .08em @fa-border-color;
+ border-radius: .1em;
+}
+
+.@{fa-css-prefix}-pull-left { float: left; }
+.@{fa-css-prefix}-pull-right { float: right; }
+
+.@{fa-css-prefix} {
+ &.@{fa-css-prefix}-pull-left { margin-right: .3em; }
+ &.@{fa-css-prefix}-pull-right { margin-left: .3em; }
+}
+
+/* Deprecated as of 4.4.0 */
+.pull-right { float: right; }
+.pull-left { float: left; }
+
+.@{fa-css-prefix} {
+ &.pull-left { margin-right: .3em; }
+ &.pull-right { margin-left: .3em; }
+}
diff --git a/src/usr/local/www/font-awesome/less/core.less b/src/usr/local/www/font-awesome/less/core.less
new file mode 100644
index 0000000..c577ac8
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/core.less
@@ -0,0 +1,12 @@
+// Base Class Definition
+// -------------------------
+
+.@{fa-css-prefix} {
+ display: inline-block;
+ font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+}
diff --git a/src/usr/local/www/font-awesome/less/fixed-width.less b/src/usr/local/www/font-awesome/less/fixed-width.less
new file mode 100644
index 0000000..110289f
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/fixed-width.less
@@ -0,0 +1,6 @@
+// Fixed Width Icons
+// -------------------------
+.@{fa-css-prefix}-fw {
+ width: (18em / 14);
+ text-align: center;
+}
diff --git a/src/usr/local/www/font-awesome/less/font-awesome.less b/src/usr/local/www/font-awesome/less/font-awesome.less
new file mode 100644
index 0000000..c35d3ee
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/font-awesome.less
@@ -0,0 +1,17 @@
+/*!
+ * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+
+@import "variables.less";
+@import "mixins.less";
+@import "path.less";
+@import "core.less";
+@import "larger.less";
+@import "fixed-width.less";
+@import "list.less";
+@import "bordered-pulled.less";
+@import "animated.less";
+@import "rotated-flipped.less";
+@import "stacked.less";
+@import "icons.less";
diff --git a/src/usr/local/www/font-awesome/less/icons.less b/src/usr/local/www/font-awesome/less/icons.less
new file mode 100644
index 0000000..ca60abd
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/icons.less
@@ -0,0 +1,697 @@
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+
+.@{fa-css-prefix}-glass:before { content: @fa-var-glass; }
+.@{fa-css-prefix}-music:before { content: @fa-var-music; }
+.@{fa-css-prefix}-search:before { content: @fa-var-search; }
+.@{fa-css-prefix}-envelope-o:before { content: @fa-var-envelope-o; }
+.@{fa-css-prefix}-heart:before { content: @fa-var-heart; }
+.@{fa-css-prefix}-star:before { content: @fa-var-star; }
+.@{fa-css-prefix}-star-o:before { content: @fa-var-star-o; }
+.@{fa-css-prefix}-user:before { content: @fa-var-user; }
+.@{fa-css-prefix}-film:before { content: @fa-var-film; }
+.@{fa-css-prefix}-th-large:before { content: @fa-var-th-large; }
+.@{fa-css-prefix}-th:before { content: @fa-var-th; }
+.@{fa-css-prefix}-th-list:before { content: @fa-var-th-list; }
+.@{fa-css-prefix}-check:before { content: @fa-var-check; }
+.@{fa-css-prefix}-remove:before,
+.@{fa-css-prefix}-close:before,
+.@{fa-css-prefix}-times:before { content: @fa-var-times; }
+.@{fa-css-prefix}-search-plus:before { content: @fa-var-search-plus; }
+.@{fa-css-prefix}-search-minus:before { content: @fa-var-search-minus; }
+.@{fa-css-prefix}-power-off:before { content: @fa-var-power-off; }
+.@{fa-css-prefix}-signal:before { content: @fa-var-signal; }
+.@{fa-css-prefix}-gear:before,
+.@{fa-css-prefix}-cog:before { content: @fa-var-cog; }
+.@{fa-css-prefix}-trash-o:before { content: @fa-var-trash-o; }
+.@{fa-css-prefix}-home:before { content: @fa-var-home; }
+.@{fa-css-prefix}-file-o:before { content: @fa-var-file-o; }
+.@{fa-css-prefix}-clock-o:before { content: @fa-var-clock-o; }
+.@{fa-css-prefix}-road:before { content: @fa-var-road; }
+.@{fa-css-prefix}-download:before { content: @fa-var-download; }
+.@{fa-css-prefix}-arrow-circle-o-down:before { content: @fa-var-arrow-circle-o-down; }
+.@{fa-css-prefix}-arrow-circle-o-up:before { content: @fa-var-arrow-circle-o-up; }
+.@{fa-css-prefix}-inbox:before { content: @fa-var-inbox; }
+.@{fa-css-prefix}-play-circle-o:before { content: @fa-var-play-circle-o; }
+.@{fa-css-prefix}-rotate-right:before,
+.@{fa-css-prefix}-repeat:before { content: @fa-var-repeat; }
+.@{fa-css-prefix}-refresh:before { content: @fa-var-refresh; }
+.@{fa-css-prefix}-list-alt:before { content: @fa-var-list-alt; }
+.@{fa-css-prefix}-lock:before { content: @fa-var-lock; }
+.@{fa-css-prefix}-flag:before { content: @fa-var-flag; }
+.@{fa-css-prefix}-headphones:before { content: @fa-var-headphones; }
+.@{fa-css-prefix}-volume-off:before { content: @fa-var-volume-off; }
+.@{fa-css-prefix}-volume-down:before { content: @fa-var-volume-down; }
+.@{fa-css-prefix}-volume-up:before { content: @fa-var-volume-up; }
+.@{fa-css-prefix}-qrcode:before { content: @fa-var-qrcode; }
+.@{fa-css-prefix}-barcode:before { content: @fa-var-barcode; }
+.@{fa-css-prefix}-tag:before { content: @fa-var-tag; }
+.@{fa-css-prefix}-tags:before { content: @fa-var-tags; }
+.@{fa-css-prefix}-book:before { content: @fa-var-book; }
+.@{fa-css-prefix}-bookmark:before { content: @fa-var-bookmark; }
+.@{fa-css-prefix}-print:before { content: @fa-var-print; }
+.@{fa-css-prefix}-camera:before { content: @fa-var-camera; }
+.@{fa-css-prefix}-font:before { content: @fa-var-font; }
+.@{fa-css-prefix}-bold:before { content: @fa-var-bold; }
+.@{fa-css-prefix}-italic:before { content: @fa-var-italic; }
+.@{fa-css-prefix}-text-height:before { content: @fa-var-text-height; }
+.@{fa-css-prefix}-text-width:before { content: @fa-var-text-width; }
+.@{fa-css-prefix}-align-left:before { content: @fa-var-align-left; }
+.@{fa-css-prefix}-align-center:before { content: @fa-var-align-center; }
+.@{fa-css-prefix}-align-right:before { content: @fa-var-align-right; }
+.@{fa-css-prefix}-align-justify:before { content: @fa-var-align-justify; }
+.@{fa-css-prefix}-list:before { content: @fa-var-list; }
+.@{fa-css-prefix}-dedent:before,
+.@{fa-css-prefix}-outdent:before { content: @fa-var-outdent; }
+.@{fa-css-prefix}-indent:before { content: @fa-var-indent; }
+.@{fa-css-prefix}-video-camera:before { content: @fa-var-video-camera; }
+.@{fa-css-prefix}-photo:before,
+.@{fa-css-prefix}-image:before,
+.@{fa-css-prefix}-picture-o:before { content: @fa-var-picture-o; }
+.@{fa-css-prefix}-pencil:before { content: @fa-var-pencil; }
+.@{fa-css-prefix}-map-marker:before { content: @fa-var-map-marker; }
+.@{fa-css-prefix}-adjust:before { content: @fa-var-adjust; }
+.@{fa-css-prefix}-tint:before { content: @fa-var-tint; }
+.@{fa-css-prefix}-edit:before,
+.@{fa-css-prefix}-pencil-square-o:before { content: @fa-var-pencil-square-o; }
+.@{fa-css-prefix}-share-square-o:before { content: @fa-var-share-square-o; }
+.@{fa-css-prefix}-check-square-o:before { content: @fa-var-check-square-o; }
+.@{fa-css-prefix}-arrows:before { content: @fa-var-arrows; }
+.@{fa-css-prefix}-step-backward:before { content: @fa-var-step-backward; }
+.@{fa-css-prefix}-fast-backward:before { content: @fa-var-fast-backward; }
+.@{fa-css-prefix}-backward:before { content: @fa-var-backward; }
+.@{fa-css-prefix}-play:before { content: @fa-var-play; }
+.@{fa-css-prefix}-pause:before { content: @fa-var-pause; }
+.@{fa-css-prefix}-stop:before { content: @fa-var-stop; }
+.@{fa-css-prefix}-forward:before { content: @fa-var-forward; }
+.@{fa-css-prefix}-fast-forward:before { content: @fa-var-fast-forward; }
+.@{fa-css-prefix}-step-forward:before { content: @fa-var-step-forward; }
+.@{fa-css-prefix}-eject:before { content: @fa-var-eject; }
+.@{fa-css-prefix}-chevron-left:before { content: @fa-var-chevron-left; }
+.@{fa-css-prefix}-chevron-right:before { content: @fa-var-chevron-right; }
+.@{fa-css-prefix}-plus-circle:before { content: @fa-var-plus-circle; }
+.@{fa-css-prefix}-minus-circle:before { content: @fa-var-minus-circle; }
+.@{fa-css-prefix}-times-circle:before { content: @fa-var-times-circle; }
+.@{fa-css-prefix}-check-circle:before { content: @fa-var-check-circle; }
+.@{fa-css-prefix}-question-circle:before { content: @fa-var-question-circle; }
+.@{fa-css-prefix}-info-circle:before { content: @fa-var-info-circle; }
+.@{fa-css-prefix}-crosshairs:before { content: @fa-var-crosshairs; }
+.@{fa-css-prefix}-times-circle-o:before { content: @fa-var-times-circle-o; }
+.@{fa-css-prefix}-check-circle-o:before { content: @fa-var-check-circle-o; }
+.@{fa-css-prefix}-ban:before { content: @fa-var-ban; }
+.@{fa-css-prefix}-arrow-left:before { content: @fa-var-arrow-left; }
+.@{fa-css-prefix}-arrow-right:before { content: @fa-var-arrow-right; }
+.@{fa-css-prefix}-arrow-up:before { content: @fa-var-arrow-up; }
+.@{fa-css-prefix}-arrow-down:before { content: @fa-var-arrow-down; }
+.@{fa-css-prefix}-mail-forward:before,
+.@{fa-css-prefix}-share:before { content: @fa-var-share; }
+.@{fa-css-prefix}-expand:before { content: @fa-var-expand; }
+.@{fa-css-prefix}-compress:before { content: @fa-var-compress; }
+.@{fa-css-prefix}-plus:before { content: @fa-var-plus; }
+.@{fa-css-prefix}-minus:before { content: @fa-var-minus; }
+.@{fa-css-prefix}-asterisk:before { content: @fa-var-asterisk; }
+.@{fa-css-prefix}-exclamation-circle:before { content: @fa-var-exclamation-circle; }
+.@{fa-css-prefix}-gift:before { content: @fa-var-gift; }
+.@{fa-css-prefix}-leaf:before { content: @fa-var-leaf; }
+.@{fa-css-prefix}-fire:before { content: @fa-var-fire; }
+.@{fa-css-prefix}-eye:before { content: @fa-var-eye; }
+.@{fa-css-prefix}-eye-slash:before { content: @fa-var-eye-slash; }
+.@{fa-css-prefix}-warning:before,
+.@{fa-css-prefix}-exclamation-triangle:before { content: @fa-var-exclamation-triangle; }
+.@{fa-css-prefix}-plane:before { content: @fa-var-plane; }
+.@{fa-css-prefix}-calendar:before { content: @fa-var-calendar; }
+.@{fa-css-prefix}-random:before { content: @fa-var-random; }
+.@{fa-css-prefix}-comment:before { content: @fa-var-comment; }
+.@{fa-css-prefix}-magnet:before { content: @fa-var-magnet; }
+.@{fa-css-prefix}-chevron-up:before { content: @fa-var-chevron-up; }
+.@{fa-css-prefix}-chevron-down:before { content: @fa-var-chevron-down; }
+.@{fa-css-prefix}-retweet:before { content: @fa-var-retweet; }
+.@{fa-css-prefix}-shopping-cart:before { content: @fa-var-shopping-cart; }
+.@{fa-css-prefix}-folder:before { content: @fa-var-folder; }
+.@{fa-css-prefix}-folder-open:before { content: @fa-var-folder-open; }
+.@{fa-css-prefix}-arrows-v:before { content: @fa-var-arrows-v; }
+.@{fa-css-prefix}-arrows-h:before { content: @fa-var-arrows-h; }
+.@{fa-css-prefix}-bar-chart-o:before,
+.@{fa-css-prefix}-bar-chart:before { content: @fa-var-bar-chart; }
+.@{fa-css-prefix}-twitter-square:before { content: @fa-var-twitter-square; }
+.@{fa-css-prefix}-facebook-square:before { content: @fa-var-facebook-square; }
+.@{fa-css-prefix}-camera-retro:before { content: @fa-var-camera-retro; }
+.@{fa-css-prefix}-key:before { content: @fa-var-key; }
+.@{fa-css-prefix}-gears:before,
+.@{fa-css-prefix}-cogs:before { content: @fa-var-cogs; }
+.@{fa-css-prefix}-comments:before { content: @fa-var-comments; }
+.@{fa-css-prefix}-thumbs-o-up:before { content: @fa-var-thumbs-o-up; }
+.@{fa-css-prefix}-thumbs-o-down:before { content: @fa-var-thumbs-o-down; }
+.@{fa-css-prefix}-star-half:before { content: @fa-var-star-half; }
+.@{fa-css-prefix}-heart-o:before { content: @fa-var-heart-o; }
+.@{fa-css-prefix}-sign-out:before { content: @fa-var-sign-out; }
+.@{fa-css-prefix}-linkedin-square:before { content: @fa-var-linkedin-square; }
+.@{fa-css-prefix}-thumb-tack:before { content: @fa-var-thumb-tack; }
+.@{fa-css-prefix}-external-link:before { content: @fa-var-external-link; }
+.@{fa-css-prefix}-sign-in:before { content: @fa-var-sign-in; }
+.@{fa-css-prefix}-trophy:before { content: @fa-var-trophy; }
+.@{fa-css-prefix}-github-square:before { content: @fa-var-github-square; }
+.@{fa-css-prefix}-upload:before { content: @fa-var-upload; }
+.@{fa-css-prefix}-lemon-o:before { content: @fa-var-lemon-o; }
+.@{fa-css-prefix}-phone:before { content: @fa-var-phone; }
+.@{fa-css-prefix}-square-o:before { content: @fa-var-square-o; }
+.@{fa-css-prefix}-bookmark-o:before { content: @fa-var-bookmark-o; }
+.@{fa-css-prefix}-phone-square:before { content: @fa-var-phone-square; }
+.@{fa-css-prefix}-twitter:before { content: @fa-var-twitter; }
+.@{fa-css-prefix}-facebook-f:before,
+.@{fa-css-prefix}-facebook:before { content: @fa-var-facebook; }
+.@{fa-css-prefix}-github:before { content: @fa-var-github; }
+.@{fa-css-prefix}-unlock:before { content: @fa-var-unlock; }
+.@{fa-css-prefix}-credit-card:before { content: @fa-var-credit-card; }
+.@{fa-css-prefix}-feed:before,
+.@{fa-css-prefix}-rss:before { content: @fa-var-rss; }
+.@{fa-css-prefix}-hdd-o:before { content: @fa-var-hdd-o; }
+.@{fa-css-prefix}-bullhorn:before { content: @fa-var-bullhorn; }
+.@{fa-css-prefix}-bell:before { content: @fa-var-bell; }
+.@{fa-css-prefix}-certificate:before { content: @fa-var-certificate; }
+.@{fa-css-prefix}-hand-o-right:before { content: @fa-var-hand-o-right; }
+.@{fa-css-prefix}-hand-o-left:before { content: @fa-var-hand-o-left; }
+.@{fa-css-prefix}-hand-o-up:before { content: @fa-var-hand-o-up; }
+.@{fa-css-prefix}-hand-o-down:before { content: @fa-var-hand-o-down; }
+.@{fa-css-prefix}-arrow-circle-left:before { content: @fa-var-arrow-circle-left; }
+.@{fa-css-prefix}-arrow-circle-right:before { content: @fa-var-arrow-circle-right; }
+.@{fa-css-prefix}-arrow-circle-up:before { content: @fa-var-arrow-circle-up; }
+.@{fa-css-prefix}-arrow-circle-down:before { content: @fa-var-arrow-circle-down; }
+.@{fa-css-prefix}-globe:before { content: @fa-var-globe; }
+.@{fa-css-prefix}-wrench:before { content: @fa-var-wrench; }
+.@{fa-css-prefix}-tasks:before { content: @fa-var-tasks; }
+.@{fa-css-prefix}-filter:before { content: @fa-var-filter; }
+.@{fa-css-prefix}-briefcase:before { content: @fa-var-briefcase; }
+.@{fa-css-prefix}-arrows-alt:before { content: @fa-var-arrows-alt; }
+.@{fa-css-prefix}-group:before,
+.@{fa-css-prefix}-users:before { content: @fa-var-users; }
+.@{fa-css-prefix}-chain:before,
+.@{fa-css-prefix}-link:before { content: @fa-var-link; }
+.@{fa-css-prefix}-cloud:before { content: @fa-var-cloud; }
+.@{fa-css-prefix}-flask:before { content: @fa-var-flask; }
+.@{fa-css-prefix}-cut:before,
+.@{fa-css-prefix}-scissors:before { content: @fa-var-scissors; }
+.@{fa-css-prefix}-copy:before,
+.@{fa-css-prefix}-files-o:before { content: @fa-var-files-o; }
+.@{fa-css-prefix}-paperclip:before { content: @fa-var-paperclip; }
+.@{fa-css-prefix}-save:before,
+.@{fa-css-prefix}-floppy-o:before { content: @fa-var-floppy-o; }
+.@{fa-css-prefix}-square:before { content: @fa-var-square; }
+.@{fa-css-prefix}-navicon:before,
+.@{fa-css-prefix}-reorder:before,
+.@{fa-css-prefix}-bars:before { content: @fa-var-bars; }
+.@{fa-css-prefix}-list-ul:before { content: @fa-var-list-ul; }
+.@{fa-css-prefix}-list-ol:before { content: @fa-var-list-ol; }
+.@{fa-css-prefix}-strikethrough:before { content: @fa-var-strikethrough; }
+.@{fa-css-prefix}-underline:before { content: @fa-var-underline; }
+.@{fa-css-prefix}-table:before { content: @fa-var-table; }
+.@{fa-css-prefix}-magic:before { content: @fa-var-magic; }
+.@{fa-css-prefix}-truck:before { content: @fa-var-truck; }
+.@{fa-css-prefix}-pinterest:before { content: @fa-var-pinterest; }
+.@{fa-css-prefix}-pinterest-square:before { content: @fa-var-pinterest-square; }
+.@{fa-css-prefix}-google-plus-square:before { content: @fa-var-google-plus-square; }
+.@{fa-css-prefix}-google-plus:before { content: @fa-var-google-plus; }
+.@{fa-css-prefix}-money:before { content: @fa-var-money; }
+.@{fa-css-prefix}-caret-down:before { content: @fa-var-caret-down; }
+.@{fa-css-prefix}-caret-up:before { content: @fa-var-caret-up; }
+.@{fa-css-prefix}-caret-left:before { content: @fa-var-caret-left; }
+.@{fa-css-prefix}-caret-right:before { content: @fa-var-caret-right; }
+.@{fa-css-prefix}-columns:before { content: @fa-var-columns; }
+.@{fa-css-prefix}-unsorted:before,
+.@{fa-css-prefix}-sort:before { content: @fa-var-sort; }
+.@{fa-css-prefix}-sort-down:before,
+.@{fa-css-prefix}-sort-desc:before { content: @fa-var-sort-desc; }
+.@{fa-css-prefix}-sort-up:before,
+.@{fa-css-prefix}-sort-asc:before { content: @fa-var-sort-asc; }
+.@{fa-css-prefix}-envelope:before { content: @fa-var-envelope; }
+.@{fa-css-prefix}-linkedin:before { content: @fa-var-linkedin; }
+.@{fa-css-prefix}-rotate-left:before,
+.@{fa-css-prefix}-undo:before { content: @fa-var-undo; }
+.@{fa-css-prefix}-legal:before,
+.@{fa-css-prefix}-gavel:before { content: @fa-var-gavel; }
+.@{fa-css-prefix}-dashboard:before,
+.@{fa-css-prefix}-tachometer:before { content: @fa-var-tachometer; }
+.@{fa-css-prefix}-comment-o:before { content: @fa-var-comment-o; }
+.@{fa-css-prefix}-comments-o:before { content: @fa-var-comments-o; }
+.@{fa-css-prefix}-flash:before,
+.@{fa-css-prefix}-bolt:before { content: @fa-var-bolt; }
+.@{fa-css-prefix}-sitemap:before { content: @fa-var-sitemap; }
+.@{fa-css-prefix}-umbrella:before { content: @fa-var-umbrella; }
+.@{fa-css-prefix}-paste:before,
+.@{fa-css-prefix}-clipboard:before { content: @fa-var-clipboard; }
+.@{fa-css-prefix}-lightbulb-o:before { content: @fa-var-lightbulb-o; }
+.@{fa-css-prefix}-exchange:before { content: @fa-var-exchange; }
+.@{fa-css-prefix}-cloud-download:before { content: @fa-var-cloud-download; }
+.@{fa-css-prefix}-cloud-upload:before { content: @fa-var-cloud-upload; }
+.@{fa-css-prefix}-user-md:before { content: @fa-var-user-md; }
+.@{fa-css-prefix}-stethoscope:before { content: @fa-var-stethoscope; }
+.@{fa-css-prefix}-suitcase:before { content: @fa-var-suitcase; }
+.@{fa-css-prefix}-bell-o:before { content: @fa-var-bell-o; }
+.@{fa-css-prefix}-coffee:before { content: @fa-var-coffee; }
+.@{fa-css-prefix}-cutlery:before { content: @fa-var-cutlery; }
+.@{fa-css-prefix}-file-text-o:before { content: @fa-var-file-text-o; }
+.@{fa-css-prefix}-building-o:before { content: @fa-var-building-o; }
+.@{fa-css-prefix}-hospital-o:before { content: @fa-var-hospital-o; }
+.@{fa-css-prefix}-ambulance:before { content: @fa-var-ambulance; }
+.@{fa-css-prefix}-medkit:before { content: @fa-var-medkit; }
+.@{fa-css-prefix}-fighter-jet:before { content: @fa-var-fighter-jet; }
+.@{fa-css-prefix}-beer:before { content: @fa-var-beer; }
+.@{fa-css-prefix}-h-square:before { content: @fa-var-h-square; }
+.@{fa-css-prefix}-plus-square:before { content: @fa-var-plus-square; }
+.@{fa-css-prefix}-angle-double-left:before { content: @fa-var-angle-double-left; }
+.@{fa-css-prefix}-angle-double-right:before { content: @fa-var-angle-double-right; }
+.@{fa-css-prefix}-angle-double-up:before { content: @fa-var-angle-double-up; }
+.@{fa-css-prefix}-angle-double-down:before { content: @fa-var-angle-double-down; }
+.@{fa-css-prefix}-angle-left:before { content: @fa-var-angle-left; }
+.@{fa-css-prefix}-angle-right:before { content: @fa-var-angle-right; }
+.@{fa-css-prefix}-angle-up:before { content: @fa-var-angle-up; }
+.@{fa-css-prefix}-angle-down:before { content: @fa-var-angle-down; }
+.@{fa-css-prefix}-desktop:before { content: @fa-var-desktop; }
+.@{fa-css-prefix}-laptop:before { content: @fa-var-laptop; }
+.@{fa-css-prefix}-tablet:before { content: @fa-var-tablet; }
+.@{fa-css-prefix}-mobile-phone:before,
+.@{fa-css-prefix}-mobile:before { content: @fa-var-mobile; }
+.@{fa-css-prefix}-circle-o:before { content: @fa-var-circle-o; }
+.@{fa-css-prefix}-quote-left:before { content: @fa-var-quote-left; }
+.@{fa-css-prefix}-quote-right:before { content: @fa-var-quote-right; }
+.@{fa-css-prefix}-spinner:before { content: @fa-var-spinner; }
+.@{fa-css-prefix}-circle:before { content: @fa-var-circle; }
+.@{fa-css-prefix}-mail-reply:before,
+.@{fa-css-prefix}-reply:before { content: @fa-var-reply; }
+.@{fa-css-prefix}-github-alt:before { content: @fa-var-github-alt; }
+.@{fa-css-prefix}-folder-o:before { content: @fa-var-folder-o; }
+.@{fa-css-prefix}-folder-open-o:before { content: @fa-var-folder-open-o; }
+.@{fa-css-prefix}-smile-o:before { content: @fa-var-smile-o; }
+.@{fa-css-prefix}-frown-o:before { content: @fa-var-frown-o; }
+.@{fa-css-prefix}-meh-o:before { content: @fa-var-meh-o; }
+.@{fa-css-prefix}-gamepad:before { content: @fa-var-gamepad; }
+.@{fa-css-prefix}-keyboard-o:before { content: @fa-var-keyboard-o; }
+.@{fa-css-prefix}-flag-o:before { content: @fa-var-flag-o; }
+.@{fa-css-prefix}-flag-checkered:before { content: @fa-var-flag-checkered; }
+.@{fa-css-prefix}-terminal:before { content: @fa-var-terminal; }
+.@{fa-css-prefix}-code:before { content: @fa-var-code; }
+.@{fa-css-prefix}-mail-reply-all:before,
+.@{fa-css-prefix}-reply-all:before { content: @fa-var-reply-all; }
+.@{fa-css-prefix}-star-half-empty:before,
+.@{fa-css-prefix}-star-half-full:before,
+.@{fa-css-prefix}-star-half-o:before { content: @fa-var-star-half-o; }
+.@{fa-css-prefix}-location-arrow:before { content: @fa-var-location-arrow; }
+.@{fa-css-prefix}-crop:before { content: @fa-var-crop; }
+.@{fa-css-prefix}-code-fork:before { content: @fa-var-code-fork; }
+.@{fa-css-prefix}-unlink:before,
+.@{fa-css-prefix}-chain-broken:before { content: @fa-var-chain-broken; }
+.@{fa-css-prefix}-question:before { content: @fa-var-question; }
+.@{fa-css-prefix}-info:before { content: @fa-var-info; }
+.@{fa-css-prefix}-exclamation:before { content: @fa-var-exclamation; }
+.@{fa-css-prefix}-superscript:before { content: @fa-var-superscript; }
+.@{fa-css-prefix}-subscript:before { content: @fa-var-subscript; }
+.@{fa-css-prefix}-eraser:before { content: @fa-var-eraser; }
+.@{fa-css-prefix}-puzzle-piece:before { content: @fa-var-puzzle-piece; }
+.@{fa-css-prefix}-microphone:before { content: @fa-var-microphone; }
+.@{fa-css-prefix}-microphone-slash:before { content: @fa-var-microphone-slash; }
+.@{fa-css-prefix}-shield:before { content: @fa-var-shield; }
+.@{fa-css-prefix}-calendar-o:before { content: @fa-var-calendar-o; }
+.@{fa-css-prefix}-fire-extinguisher:before { content: @fa-var-fire-extinguisher; }
+.@{fa-css-prefix}-rocket:before { content: @fa-var-rocket; }
+.@{fa-css-prefix}-maxcdn:before { content: @fa-var-maxcdn; }
+.@{fa-css-prefix}-chevron-circle-left:before { content: @fa-var-chevron-circle-left; }
+.@{fa-css-prefix}-chevron-circle-right:before { content: @fa-var-chevron-circle-right; }
+.@{fa-css-prefix}-chevron-circle-up:before { content: @fa-var-chevron-circle-up; }
+.@{fa-css-prefix}-chevron-circle-down:before { content: @fa-var-chevron-circle-down; }
+.@{fa-css-prefix}-html5:before { content: @fa-var-html5; }
+.@{fa-css-prefix}-css3:before { content: @fa-var-css3; }
+.@{fa-css-prefix}-anchor:before { content: @fa-var-anchor; }
+.@{fa-css-prefix}-unlock-alt:before { content: @fa-var-unlock-alt; }
+.@{fa-css-prefix}-bullseye:before { content: @fa-var-bullseye; }
+.@{fa-css-prefix}-ellipsis-h:before { content: @fa-var-ellipsis-h; }
+.@{fa-css-prefix}-ellipsis-v:before { content: @fa-var-ellipsis-v; }
+.@{fa-css-prefix}-rss-square:before { content: @fa-var-rss-square; }
+.@{fa-css-prefix}-play-circle:before { content: @fa-var-play-circle; }
+.@{fa-css-prefix}-ticket:before { content: @fa-var-ticket; }
+.@{fa-css-prefix}-minus-square:before { content: @fa-var-minus-square; }
+.@{fa-css-prefix}-minus-square-o:before { content: @fa-var-minus-square-o; }
+.@{fa-css-prefix}-level-up:before { content: @fa-var-level-up; }
+.@{fa-css-prefix}-level-down:before { content: @fa-var-level-down; }
+.@{fa-css-prefix}-check-square:before { content: @fa-var-check-square; }
+.@{fa-css-prefix}-pencil-square:before { content: @fa-var-pencil-square; }
+.@{fa-css-prefix}-external-link-square:before { content: @fa-var-external-link-square; }
+.@{fa-css-prefix}-share-square:before { content: @fa-var-share-square; }
+.@{fa-css-prefix}-compass:before { content: @fa-var-compass; }
+.@{fa-css-prefix}-toggle-down:before,
+.@{fa-css-prefix}-caret-square-o-down:before { content: @fa-var-caret-square-o-down; }
+.@{fa-css-prefix}-toggle-up:before,
+.@{fa-css-prefix}-caret-square-o-up:before { content: @fa-var-caret-square-o-up; }
+.@{fa-css-prefix}-toggle-right:before,
+.@{fa-css-prefix}-caret-square-o-right:before { content: @fa-var-caret-square-o-right; }
+.@{fa-css-prefix}-euro:before,
+.@{fa-css-prefix}-eur:before { content: @fa-var-eur; }
+.@{fa-css-prefix}-gbp:before { content: @fa-var-gbp; }
+.@{fa-css-prefix}-dollar:before,
+.@{fa-css-prefix}-usd:before { content: @fa-var-usd; }
+.@{fa-css-prefix}-rupee:before,
+.@{fa-css-prefix}-inr:before { content: @fa-var-inr; }
+.@{fa-css-prefix}-cny:before,
+.@{fa-css-prefix}-rmb:before,
+.@{fa-css-prefix}-yen:before,
+.@{fa-css-prefix}-jpy:before { content: @fa-var-jpy; }
+.@{fa-css-prefix}-ruble:before,
+.@{fa-css-prefix}-rouble:before,
+.@{fa-css-prefix}-rub:before { content: @fa-var-rub; }
+.@{fa-css-prefix}-won:before,
+.@{fa-css-prefix}-krw:before { content: @fa-var-krw; }
+.@{fa-css-prefix}-bitcoin:before,
+.@{fa-css-prefix}-btc:before { content: @fa-var-btc; }
+.@{fa-css-prefix}-file:before { content: @fa-var-file; }
+.@{fa-css-prefix}-file-text:before { content: @fa-var-file-text; }
+.@{fa-css-prefix}-sort-alpha-asc:before { content: @fa-var-sort-alpha-asc; }
+.@{fa-css-prefix}-sort-alpha-desc:before { content: @fa-var-sort-alpha-desc; }
+.@{fa-css-prefix}-sort-amount-asc:before { content: @fa-var-sort-amount-asc; }
+.@{fa-css-prefix}-sort-amount-desc:before { content: @fa-var-sort-amount-desc; }
+.@{fa-css-prefix}-sort-numeric-asc:before { content: @fa-var-sort-numeric-asc; }
+.@{fa-css-prefix}-sort-numeric-desc:before { content: @fa-var-sort-numeric-desc; }
+.@{fa-css-prefix}-thumbs-up:before { content: @fa-var-thumbs-up; }
+.@{fa-css-prefix}-thumbs-down:before { content: @fa-var-thumbs-down; }
+.@{fa-css-prefix}-youtube-square:before { content: @fa-var-youtube-square; }
+.@{fa-css-prefix}-youtube:before { content: @fa-var-youtube; }
+.@{fa-css-prefix}-xing:before { content: @fa-var-xing; }
+.@{fa-css-prefix}-xing-square:before { content: @fa-var-xing-square; }
+.@{fa-css-prefix}-youtube-play:before { content: @fa-var-youtube-play; }
+.@{fa-css-prefix}-dropbox:before { content: @fa-var-dropbox; }
+.@{fa-css-prefix}-stack-overflow:before { content: @fa-var-stack-overflow; }
+.@{fa-css-prefix}-instagram:before { content: @fa-var-instagram; }
+.@{fa-css-prefix}-flickr:before { content: @fa-var-flickr; }
+.@{fa-css-prefix}-adn:before { content: @fa-var-adn; }
+.@{fa-css-prefix}-bitbucket:before { content: @fa-var-bitbucket; }
+.@{fa-css-prefix}-bitbucket-square:before { content: @fa-var-bitbucket-square; }
+.@{fa-css-prefix}-tumblr:before { content: @fa-var-tumblr; }
+.@{fa-css-prefix}-tumblr-square:before { content: @fa-var-tumblr-square; }
+.@{fa-css-prefix}-long-arrow-down:before { content: @fa-var-long-arrow-down; }
+.@{fa-css-prefix}-long-arrow-up:before { content: @fa-var-long-arrow-up; }
+.@{fa-css-prefix}-long-arrow-left:before { content: @fa-var-long-arrow-left; }
+.@{fa-css-prefix}-long-arrow-right:before { content: @fa-var-long-arrow-right; }
+.@{fa-css-prefix}-apple:before { content: @fa-var-apple; }
+.@{fa-css-prefix}-windows:before { content: @fa-var-windows; }
+.@{fa-css-prefix}-android:before { content: @fa-var-android; }
+.@{fa-css-prefix}-linux:before { content: @fa-var-linux; }
+.@{fa-css-prefix}-dribbble:before { content: @fa-var-dribbble; }
+.@{fa-css-prefix}-skype:before { content: @fa-var-skype; }
+.@{fa-css-prefix}-foursquare:before { content: @fa-var-foursquare; }
+.@{fa-css-prefix}-trello:before { content: @fa-var-trello; }
+.@{fa-css-prefix}-female:before { content: @fa-var-female; }
+.@{fa-css-prefix}-male:before { content: @fa-var-male; }
+.@{fa-css-prefix}-gittip:before,
+.@{fa-css-prefix}-gratipay:before { content: @fa-var-gratipay; }
+.@{fa-css-prefix}-sun-o:before { content: @fa-var-sun-o; }
+.@{fa-css-prefix}-moon-o:before { content: @fa-var-moon-o; }
+.@{fa-css-prefix}-archive:before { content: @fa-var-archive; }
+.@{fa-css-prefix}-bug:before { content: @fa-var-bug; }
+.@{fa-css-prefix}-vk:before { content: @fa-var-vk; }
+.@{fa-css-prefix}-weibo:before { content: @fa-var-weibo; }
+.@{fa-css-prefix}-renren:before { content: @fa-var-renren; }
+.@{fa-css-prefix}-pagelines:before { content: @fa-var-pagelines; }
+.@{fa-css-prefix}-stack-exchange:before { content: @fa-var-stack-exchange; }
+.@{fa-css-prefix}-arrow-circle-o-right:before { content: @fa-var-arrow-circle-o-right; }
+.@{fa-css-prefix}-arrow-circle-o-left:before { content: @fa-var-arrow-circle-o-left; }
+.@{fa-css-prefix}-toggle-left:before,
+.@{fa-css-prefix}-caret-square-o-left:before { content: @fa-var-caret-square-o-left; }
+.@{fa-css-prefix}-dot-circle-o:before { content: @fa-var-dot-circle-o; }
+.@{fa-css-prefix}-wheelchair:before { content: @fa-var-wheelchair; }
+.@{fa-css-prefix}-vimeo-square:before { content: @fa-var-vimeo-square; }
+.@{fa-css-prefix}-turkish-lira:before,
+.@{fa-css-prefix}-try:before { content: @fa-var-try; }
+.@{fa-css-prefix}-plus-square-o:before { content: @fa-var-plus-square-o; }
+.@{fa-css-prefix}-space-shuttle:before { content: @fa-var-space-shuttle; }
+.@{fa-css-prefix}-slack:before { content: @fa-var-slack; }
+.@{fa-css-prefix}-envelope-square:before { content: @fa-var-envelope-square; }
+.@{fa-css-prefix}-wordpress:before { content: @fa-var-wordpress; }
+.@{fa-css-prefix}-openid:before { content: @fa-var-openid; }
+.@{fa-css-prefix}-institution:before,
+.@{fa-css-prefix}-bank:before,
+.@{fa-css-prefix}-university:before { content: @fa-var-university; }
+.@{fa-css-prefix}-mortar-board:before,
+.@{fa-css-prefix}-graduation-cap:before { content: @fa-var-graduation-cap; }
+.@{fa-css-prefix}-yahoo:before { content: @fa-var-yahoo; }
+.@{fa-css-prefix}-google:before { content: @fa-var-google; }
+.@{fa-css-prefix}-reddit:before { content: @fa-var-reddit; }
+.@{fa-css-prefix}-reddit-square:before { content: @fa-var-reddit-square; }
+.@{fa-css-prefix}-stumbleupon-circle:before { content: @fa-var-stumbleupon-circle; }
+.@{fa-css-prefix}-stumbleupon:before { content: @fa-var-stumbleupon; }
+.@{fa-css-prefix}-delicious:before { content: @fa-var-delicious; }
+.@{fa-css-prefix}-digg:before { content: @fa-var-digg; }
+.@{fa-css-prefix}-pied-piper:before { content: @fa-var-pied-piper; }
+.@{fa-css-prefix}-pied-piper-alt:before { content: @fa-var-pied-piper-alt; }
+.@{fa-css-prefix}-drupal:before { content: @fa-var-drupal; }
+.@{fa-css-prefix}-joomla:before { content: @fa-var-joomla; }
+.@{fa-css-prefix}-language:before { content: @fa-var-language; }
+.@{fa-css-prefix}-fax:before { content: @fa-var-fax; }
+.@{fa-css-prefix}-building:before { content: @fa-var-building; }
+.@{fa-css-prefix}-child:before { content: @fa-var-child; }
+.@{fa-css-prefix}-paw:before { content: @fa-var-paw; }
+.@{fa-css-prefix}-spoon:before { content: @fa-var-spoon; }
+.@{fa-css-prefix}-cube:before { content: @fa-var-cube; }
+.@{fa-css-prefix}-cubes:before { content: @fa-var-cubes; }
+.@{fa-css-prefix}-behance:before { content: @fa-var-behance; }
+.@{fa-css-prefix}-behance-square:before { content: @fa-var-behance-square; }
+.@{fa-css-prefix}-steam:before { content: @fa-var-steam; }
+.@{fa-css-prefix}-steam-square:before { content: @fa-var-steam-square; }
+.@{fa-css-prefix}-recycle:before { content: @fa-var-recycle; }
+.@{fa-css-prefix}-automobile:before,
+.@{fa-css-prefix}-car:before { content: @fa-var-car; }
+.@{fa-css-prefix}-cab:before,
+.@{fa-css-prefix}-taxi:before { content: @fa-var-taxi; }
+.@{fa-css-prefix}-tree:before { content: @fa-var-tree; }
+.@{fa-css-prefix}-spotify:before { content: @fa-var-spotify; }
+.@{fa-css-prefix}-deviantart:before { content: @fa-var-deviantart; }
+.@{fa-css-prefix}-soundcloud:before { content: @fa-var-soundcloud; }
+.@{fa-css-prefix}-database:before { content: @fa-var-database; }
+.@{fa-css-prefix}-file-pdf-o:before { content: @fa-var-file-pdf-o; }
+.@{fa-css-prefix}-file-word-o:before { content: @fa-var-file-word-o; }
+.@{fa-css-prefix}-file-excel-o:before { content: @fa-var-file-excel-o; }
+.@{fa-css-prefix}-file-powerpoint-o:before { content: @fa-var-file-powerpoint-o; }
+.@{fa-css-prefix}-file-photo-o:before,
+.@{fa-css-prefix}-file-picture-o:before,
+.@{fa-css-prefix}-file-image-o:before { content: @fa-var-file-image-o; }
+.@{fa-css-prefix}-file-zip-o:before,
+.@{fa-css-prefix}-file-archive-o:before { content: @fa-var-file-archive-o; }
+.@{fa-css-prefix}-file-sound-o:before,
+.@{fa-css-prefix}-file-audio-o:before { content: @fa-var-file-audio-o; }
+.@{fa-css-prefix}-file-movie-o:before,
+.@{fa-css-prefix}-file-video-o:before { content: @fa-var-file-video-o; }
+.@{fa-css-prefix}-file-code-o:before { content: @fa-var-file-code-o; }
+.@{fa-css-prefix}-vine:before { content: @fa-var-vine; }
+.@{fa-css-prefix}-codepen:before { content: @fa-var-codepen; }
+.@{fa-css-prefix}-jsfiddle:before { content: @fa-var-jsfiddle; }
+.@{fa-css-prefix}-life-bouy:before,
+.@{fa-css-prefix}-life-buoy:before,
+.@{fa-css-prefix}-life-saver:before,
+.@{fa-css-prefix}-support:before,
+.@{fa-css-prefix}-life-ring:before { content: @fa-var-life-ring; }
+.@{fa-css-prefix}-circle-o-notch:before { content: @fa-var-circle-o-notch; }
+.@{fa-css-prefix}-ra:before,
+.@{fa-css-prefix}-rebel:before { content: @fa-var-rebel; }
+.@{fa-css-prefix}-ge:before,
+.@{fa-css-prefix}-empire:before { content: @fa-var-empire; }
+.@{fa-css-prefix}-git-square:before { content: @fa-var-git-square; }
+.@{fa-css-prefix}-git:before { content: @fa-var-git; }
+.@{fa-css-prefix}-y-combinator-square:before,
+.@{fa-css-prefix}-yc-square:before,
+.@{fa-css-prefix}-hacker-news:before { content: @fa-var-hacker-news; }
+.@{fa-css-prefix}-tencent-weibo:before { content: @fa-var-tencent-weibo; }
+.@{fa-css-prefix}-qq:before { content: @fa-var-qq; }
+.@{fa-css-prefix}-wechat:before,
+.@{fa-css-prefix}-weixin:before { content: @fa-var-weixin; }
+.@{fa-css-prefix}-send:before,
+.@{fa-css-prefix}-paper-plane:before { content: @fa-var-paper-plane; }
+.@{fa-css-prefix}-send-o:before,
+.@{fa-css-prefix}-paper-plane-o:before { content: @fa-var-paper-plane-o; }
+.@{fa-css-prefix}-history:before { content: @fa-var-history; }
+.@{fa-css-prefix}-circle-thin:before { content: @fa-var-circle-thin; }
+.@{fa-css-prefix}-header:before { content: @fa-var-header; }
+.@{fa-css-prefix}-paragraph:before { content: @fa-var-paragraph; }
+.@{fa-css-prefix}-sliders:before { content: @fa-var-sliders; }
+.@{fa-css-prefix}-share-alt:before { content: @fa-var-share-alt; }
+.@{fa-css-prefix}-share-alt-square:before { content: @fa-var-share-alt-square; }
+.@{fa-css-prefix}-bomb:before { content: @fa-var-bomb; }
+.@{fa-css-prefix}-soccer-ball-o:before,
+.@{fa-css-prefix}-futbol-o:before { content: @fa-var-futbol-o; }
+.@{fa-css-prefix}-tty:before { content: @fa-var-tty; }
+.@{fa-css-prefix}-binoculars:before { content: @fa-var-binoculars; }
+.@{fa-css-prefix}-plug:before { content: @fa-var-plug; }
+.@{fa-css-prefix}-slideshare:before { content: @fa-var-slideshare; }
+.@{fa-css-prefix}-twitch:before { content: @fa-var-twitch; }
+.@{fa-css-prefix}-yelp:before { content: @fa-var-yelp; }
+.@{fa-css-prefix}-newspaper-o:before { content: @fa-var-newspaper-o; }
+.@{fa-css-prefix}-wifi:before { content: @fa-var-wifi; }
+.@{fa-css-prefix}-calculator:before { content: @fa-var-calculator; }
+.@{fa-css-prefix}-paypal:before { content: @fa-var-paypal; }
+.@{fa-css-prefix}-google-wallet:before { content: @fa-var-google-wallet; }
+.@{fa-css-prefix}-cc-visa:before { content: @fa-var-cc-visa; }
+.@{fa-css-prefix}-cc-mastercard:before { content: @fa-var-cc-mastercard; }
+.@{fa-css-prefix}-cc-discover:before { content: @fa-var-cc-discover; }
+.@{fa-css-prefix}-cc-amex:before { content: @fa-var-cc-amex; }
+.@{fa-css-prefix}-cc-paypal:before { content: @fa-var-cc-paypal; }
+.@{fa-css-prefix}-cc-stripe:before { content: @fa-var-cc-stripe; }
+.@{fa-css-prefix}-bell-slash:before { content: @fa-var-bell-slash; }
+.@{fa-css-prefix}-bell-slash-o:before { content: @fa-var-bell-slash-o; }
+.@{fa-css-prefix}-trash:before { content: @fa-var-trash; }
+.@{fa-css-prefix}-copyright:before { content: @fa-var-copyright; }
+.@{fa-css-prefix}-at:before { content: @fa-var-at; }
+.@{fa-css-prefix}-eyedropper:before { content: @fa-var-eyedropper; }
+.@{fa-css-prefix}-paint-brush:before { content: @fa-var-paint-brush; }
+.@{fa-css-prefix}-birthday-cake:before { content: @fa-var-birthday-cake; }
+.@{fa-css-prefix}-area-chart:before { content: @fa-var-area-chart; }
+.@{fa-css-prefix}-pie-chart:before { content: @fa-var-pie-chart; }
+.@{fa-css-prefix}-line-chart:before { content: @fa-var-line-chart; }
+.@{fa-css-prefix}-lastfm:before { content: @fa-var-lastfm; }
+.@{fa-css-prefix}-lastfm-square:before { content: @fa-var-lastfm-square; }
+.@{fa-css-prefix}-toggle-off:before { content: @fa-var-toggle-off; }
+.@{fa-css-prefix}-toggle-on:before { content: @fa-var-toggle-on; }
+.@{fa-css-prefix}-bicycle:before { content: @fa-var-bicycle; }
+.@{fa-css-prefix}-bus:before { content: @fa-var-bus; }
+.@{fa-css-prefix}-ioxhost:before { content: @fa-var-ioxhost; }
+.@{fa-css-prefix}-angellist:before { content: @fa-var-angellist; }
+.@{fa-css-prefix}-cc:before { content: @fa-var-cc; }
+.@{fa-css-prefix}-shekel:before,
+.@{fa-css-prefix}-sheqel:before,
+.@{fa-css-prefix}-ils:before { content: @fa-var-ils; }
+.@{fa-css-prefix}-meanpath:before { content: @fa-var-meanpath; }
+.@{fa-css-prefix}-buysellads:before { content: @fa-var-buysellads; }
+.@{fa-css-prefix}-connectdevelop:before { content: @fa-var-connectdevelop; }
+.@{fa-css-prefix}-dashcube:before { content: @fa-var-dashcube; }
+.@{fa-css-prefix}-forumbee:before { content: @fa-var-forumbee; }
+.@{fa-css-prefix}-leanpub:before { content: @fa-var-leanpub; }
+.@{fa-css-prefix}-sellsy:before { content: @fa-var-sellsy; }
+.@{fa-css-prefix}-shirtsinbulk:before { content: @fa-var-shirtsinbulk; }
+.@{fa-css-prefix}-simplybuilt:before { content: @fa-var-simplybuilt; }
+.@{fa-css-prefix}-skyatlas:before { content: @fa-var-skyatlas; }
+.@{fa-css-prefix}-cart-plus:before { content: @fa-var-cart-plus; }
+.@{fa-css-prefix}-cart-arrow-down:before { content: @fa-var-cart-arrow-down; }
+.@{fa-css-prefix}-diamond:before { content: @fa-var-diamond; }
+.@{fa-css-prefix}-ship:before { content: @fa-var-ship; }
+.@{fa-css-prefix}-user-secret:before { content: @fa-var-user-secret; }
+.@{fa-css-prefix}-motorcycle:before { content: @fa-var-motorcycle; }
+.@{fa-css-prefix}-street-view:before { content: @fa-var-street-view; }
+.@{fa-css-prefix}-heartbeat:before { content: @fa-var-heartbeat; }
+.@{fa-css-prefix}-venus:before { content: @fa-var-venus; }
+.@{fa-css-prefix}-mars:before { content: @fa-var-mars; }
+.@{fa-css-prefix}-mercury:before { content: @fa-var-mercury; }
+.@{fa-css-prefix}-intersex:before,
+.@{fa-css-prefix}-transgender:before { content: @fa-var-transgender; }
+.@{fa-css-prefix}-transgender-alt:before { content: @fa-var-transgender-alt; }
+.@{fa-css-prefix}-venus-double:before { content: @fa-var-venus-double; }
+.@{fa-css-prefix}-mars-double:before { content: @fa-var-mars-double; }
+.@{fa-css-prefix}-venus-mars:before { content: @fa-var-venus-mars; }
+.@{fa-css-prefix}-mars-stroke:before { content: @fa-var-mars-stroke; }
+.@{fa-css-prefix}-mars-stroke-v:before { content: @fa-var-mars-stroke-v; }
+.@{fa-css-prefix}-mars-stroke-h:before { content: @fa-var-mars-stroke-h; }
+.@{fa-css-prefix}-neuter:before { content: @fa-var-neuter; }
+.@{fa-css-prefix}-genderless:before { content: @fa-var-genderless; }
+.@{fa-css-prefix}-facebook-official:before { content: @fa-var-facebook-official; }
+.@{fa-css-prefix}-pinterest-p:before { content: @fa-var-pinterest-p; }
+.@{fa-css-prefix}-whatsapp:before { content: @fa-var-whatsapp; }
+.@{fa-css-prefix}-server:before { content: @fa-var-server; }
+.@{fa-css-prefix}-user-plus:before { content: @fa-var-user-plus; }
+.@{fa-css-prefix}-user-times:before { content: @fa-var-user-times; }
+.@{fa-css-prefix}-hotel:before,
+.@{fa-css-prefix}-bed:before { content: @fa-var-bed; }
+.@{fa-css-prefix}-viacoin:before { content: @fa-var-viacoin; }
+.@{fa-css-prefix}-train:before { content: @fa-var-train; }
+.@{fa-css-prefix}-subway:before { content: @fa-var-subway; }
+.@{fa-css-prefix}-medium:before { content: @fa-var-medium; }
+.@{fa-css-prefix}-yc:before,
+.@{fa-css-prefix}-y-combinator:before { content: @fa-var-y-combinator; }
+.@{fa-css-prefix}-optin-monster:before { content: @fa-var-optin-monster; }
+.@{fa-css-prefix}-opencart:before { content: @fa-var-opencart; }
+.@{fa-css-prefix}-expeditedssl:before { content: @fa-var-expeditedssl; }
+.@{fa-css-prefix}-battery-4:before,
+.@{fa-css-prefix}-battery-full:before { content: @fa-var-battery-full; }
+.@{fa-css-prefix}-battery-3:before,
+.@{fa-css-prefix}-battery-three-quarters:before { content: @fa-var-battery-three-quarters; }
+.@{fa-css-prefix}-battery-2:before,
+.@{fa-css-prefix}-battery-half:before { content: @fa-var-battery-half; }
+.@{fa-css-prefix}-battery-1:before,
+.@{fa-css-prefix}-battery-quarter:before { content: @fa-var-battery-quarter; }
+.@{fa-css-prefix}-battery-0:before,
+.@{fa-css-prefix}-battery-empty:before { content: @fa-var-battery-empty; }
+.@{fa-css-prefix}-mouse-pointer:before { content: @fa-var-mouse-pointer; }
+.@{fa-css-prefix}-i-cursor:before { content: @fa-var-i-cursor; }
+.@{fa-css-prefix}-object-group:before { content: @fa-var-object-group; }
+.@{fa-css-prefix}-object-ungroup:before { content: @fa-var-object-ungroup; }
+.@{fa-css-prefix}-sticky-note:before { content: @fa-var-sticky-note; }
+.@{fa-css-prefix}-sticky-note-o:before { content: @fa-var-sticky-note-o; }
+.@{fa-css-prefix}-cc-jcb:before { content: @fa-var-cc-jcb; }
+.@{fa-css-prefix}-cc-diners-club:before { content: @fa-var-cc-diners-club; }
+.@{fa-css-prefix}-clone:before { content: @fa-var-clone; }
+.@{fa-css-prefix}-balance-scale:before { content: @fa-var-balance-scale; }
+.@{fa-css-prefix}-hourglass-o:before { content: @fa-var-hourglass-o; }
+.@{fa-css-prefix}-hourglass-1:before,
+.@{fa-css-prefix}-hourglass-start:before { content: @fa-var-hourglass-start; }
+.@{fa-css-prefix}-hourglass-2:before,
+.@{fa-css-prefix}-hourglass-half:before { content: @fa-var-hourglass-half; }
+.@{fa-css-prefix}-hourglass-3:before,
+.@{fa-css-prefix}-hourglass-end:before { content: @fa-var-hourglass-end; }
+.@{fa-css-prefix}-hourglass:before { content: @fa-var-hourglass; }
+.@{fa-css-prefix}-hand-grab-o:before,
+.@{fa-css-prefix}-hand-rock-o:before { content: @fa-var-hand-rock-o; }
+.@{fa-css-prefix}-hand-stop-o:before,
+.@{fa-css-prefix}-hand-paper-o:before { content: @fa-var-hand-paper-o; }
+.@{fa-css-prefix}-hand-scissors-o:before { content: @fa-var-hand-scissors-o; }
+.@{fa-css-prefix}-hand-lizard-o:before { content: @fa-var-hand-lizard-o; }
+.@{fa-css-prefix}-hand-spock-o:before { content: @fa-var-hand-spock-o; }
+.@{fa-css-prefix}-hand-pointer-o:before { content: @fa-var-hand-pointer-o; }
+.@{fa-css-prefix}-hand-peace-o:before { content: @fa-var-hand-peace-o; }
+.@{fa-css-prefix}-trademark:before { content: @fa-var-trademark; }
+.@{fa-css-prefix}-registered:before { content: @fa-var-registered; }
+.@{fa-css-prefix}-creative-commons:before { content: @fa-var-creative-commons; }
+.@{fa-css-prefix}-gg:before { content: @fa-var-gg; }
+.@{fa-css-prefix}-gg-circle:before { content: @fa-var-gg-circle; }
+.@{fa-css-prefix}-tripadvisor:before { content: @fa-var-tripadvisor; }
+.@{fa-css-prefix}-odnoklassniki:before { content: @fa-var-odnoklassniki; }
+.@{fa-css-prefix}-odnoklassniki-square:before { content: @fa-var-odnoklassniki-square; }
+.@{fa-css-prefix}-get-pocket:before { content: @fa-var-get-pocket; }
+.@{fa-css-prefix}-wikipedia-w:before { content: @fa-var-wikipedia-w; }
+.@{fa-css-prefix}-safari:before { content: @fa-var-safari; }
+.@{fa-css-prefix}-chrome:before { content: @fa-var-chrome; }
+.@{fa-css-prefix}-firefox:before { content: @fa-var-firefox; }
+.@{fa-css-prefix}-opera:before { content: @fa-var-opera; }
+.@{fa-css-prefix}-internet-explorer:before { content: @fa-var-internet-explorer; }
+.@{fa-css-prefix}-tv:before,
+.@{fa-css-prefix}-television:before { content: @fa-var-television; }
+.@{fa-css-prefix}-contao:before { content: @fa-var-contao; }
+.@{fa-css-prefix}-500px:before { content: @fa-var-500px; }
+.@{fa-css-prefix}-amazon:before { content: @fa-var-amazon; }
+.@{fa-css-prefix}-calendar-plus-o:before { content: @fa-var-calendar-plus-o; }
+.@{fa-css-prefix}-calendar-minus-o:before { content: @fa-var-calendar-minus-o; }
+.@{fa-css-prefix}-calendar-times-o:before { content: @fa-var-calendar-times-o; }
+.@{fa-css-prefix}-calendar-check-o:before { content: @fa-var-calendar-check-o; }
+.@{fa-css-prefix}-industry:before { content: @fa-var-industry; }
+.@{fa-css-prefix}-map-pin:before { content: @fa-var-map-pin; }
+.@{fa-css-prefix}-map-signs:before { content: @fa-var-map-signs; }
+.@{fa-css-prefix}-map-o:before { content: @fa-var-map-o; }
+.@{fa-css-prefix}-map:before { content: @fa-var-map; }
+.@{fa-css-prefix}-commenting:before { content: @fa-var-commenting; }
+.@{fa-css-prefix}-commenting-o:before { content: @fa-var-commenting-o; }
+.@{fa-css-prefix}-houzz:before { content: @fa-var-houzz; }
+.@{fa-css-prefix}-vimeo:before { content: @fa-var-vimeo; }
+.@{fa-css-prefix}-black-tie:before { content: @fa-var-black-tie; }
+.@{fa-css-prefix}-fonticons:before { content: @fa-var-fonticons; }
+.@{fa-css-prefix}-reddit-alien:before { content: @fa-var-reddit-alien; }
+.@{fa-css-prefix}-edge:before { content: @fa-var-edge; }
+.@{fa-css-prefix}-credit-card-alt:before { content: @fa-var-credit-card-alt; }
+.@{fa-css-prefix}-codiepie:before { content: @fa-var-codiepie; }
+.@{fa-css-prefix}-modx:before { content: @fa-var-modx; }
+.@{fa-css-prefix}-fort-awesome:before { content: @fa-var-fort-awesome; }
+.@{fa-css-prefix}-usb:before { content: @fa-var-usb; }
+.@{fa-css-prefix}-product-hunt:before { content: @fa-var-product-hunt; }
+.@{fa-css-prefix}-mixcloud:before { content: @fa-var-mixcloud; }
+.@{fa-css-prefix}-scribd:before { content: @fa-var-scribd; }
+.@{fa-css-prefix}-pause-circle:before { content: @fa-var-pause-circle; }
+.@{fa-css-prefix}-pause-circle-o:before { content: @fa-var-pause-circle-o; }
+.@{fa-css-prefix}-stop-circle:before { content: @fa-var-stop-circle; }
+.@{fa-css-prefix}-stop-circle-o:before { content: @fa-var-stop-circle-o; }
+.@{fa-css-prefix}-shopping-bag:before { content: @fa-var-shopping-bag; }
+.@{fa-css-prefix}-shopping-basket:before { content: @fa-var-shopping-basket; }
+.@{fa-css-prefix}-hashtag:before { content: @fa-var-hashtag; }
+.@{fa-css-prefix}-bluetooth:before { content: @fa-var-bluetooth; }
+.@{fa-css-prefix}-bluetooth-b:before { content: @fa-var-bluetooth-b; }
+.@{fa-css-prefix}-percent:before { content: @fa-var-percent; }
diff --git a/src/usr/local/www/font-awesome/less/larger.less b/src/usr/local/www/font-awesome/less/larger.less
new file mode 100644
index 0000000..c9d6467
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/larger.less
@@ -0,0 +1,13 @@
+// Icon Sizes
+// -------------------------
+
+/* makes the font 33% larger relative to the icon container */
+.@{fa-css-prefix}-lg {
+ font-size: (4em / 3);
+ line-height: (3em / 4);
+ vertical-align: -15%;
+}
+.@{fa-css-prefix}-2x { font-size: 2em; }
+.@{fa-css-prefix}-3x { font-size: 3em; }
+.@{fa-css-prefix}-4x { font-size: 4em; }
+.@{fa-css-prefix}-5x { font-size: 5em; }
diff --git a/src/usr/local/www/font-awesome/less/list.less b/src/usr/local/www/font-awesome/less/list.less
new file mode 100644
index 0000000..0b44038
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/list.less
@@ -0,0 +1,19 @@
+// List Icons
+// -------------------------
+
+.@{fa-css-prefix}-ul {
+ padding-left: 0;
+ margin-left: @fa-li-width;
+ list-style-type: none;
+ > li { position: relative; }
+}
+.@{fa-css-prefix}-li {
+ position: absolute;
+ left: -@fa-li-width;
+ width: @fa-li-width;
+ top: (2em / 14);
+ text-align: center;
+ &.@{fa-css-prefix}-lg {
+ left: (-@fa-li-width + (4em / 14));
+ }
+}
diff --git a/src/usr/local/www/font-awesome/less/mixins.less b/src/usr/local/www/font-awesome/less/mixins.less
new file mode 100644
index 0000000..d5a43a1
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/mixins.less
@@ -0,0 +1,26 @@
+// Mixins
+// --------------------------
+
+.fa-icon() {
+ display: inline-block;
+ font: normal normal normal @fa-font-size-base/@fa-line-height-base FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+}
+
+.fa-icon-rotate(@degrees, @rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation);
+ -webkit-transform: rotate(@degrees);
+ -ms-transform: rotate(@degrees);
+ transform: rotate(@degrees);
+}
+
+.fa-icon-flip(@horiz, @vert, @rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1);
+ -webkit-transform: scale(@horiz, @vert);
+ -ms-transform: scale(@horiz, @vert);
+ transform: scale(@horiz, @vert);
+}
diff --git a/src/usr/local/www/font-awesome/less/path.less b/src/usr/local/www/font-awesome/less/path.less
new file mode 100644
index 0000000..9211e66
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/path.less
@@ -0,0 +1,15 @@
+/* FONT PATH
+ * -------------------------- */
+
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}');
+ src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'),
+ url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'),
+ url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'),
+ url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'),
+ url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg');
+// src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
+ font-weight: normal;
+ font-style: normal;
+}
diff --git a/src/usr/local/www/font-awesome/less/rotated-flipped.less b/src/usr/local/www/font-awesome/less/rotated-flipped.less
new file mode 100644
index 0000000..f6ba814
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/rotated-flipped.less
@@ -0,0 +1,20 @@
+// Rotated & Flipped Icons
+// -------------------------
+
+.@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); }
+.@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); }
+.@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); }
+
+.@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); }
+.@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); }
+
+// Hook for IE8-9
+// -------------------------
+
+:root .@{fa-css-prefix}-rotate-90,
+:root .@{fa-css-prefix}-rotate-180,
+:root .@{fa-css-prefix}-rotate-270,
+:root .@{fa-css-prefix}-flip-horizontal,
+:root .@{fa-css-prefix}-flip-vertical {
+ filter: none;
+}
diff --git a/src/usr/local/www/font-awesome/less/stacked.less b/src/usr/local/www/font-awesome/less/stacked.less
new file mode 100644
index 0000000..fc53fb0
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/stacked.less
@@ -0,0 +1,20 @@
+// Stacked Icons
+// -------------------------
+
+.@{fa-css-prefix}-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.@{fa-css-prefix}-stack-1x { line-height: inherit; }
+.@{fa-css-prefix}-stack-2x { font-size: 2em; }
+.@{fa-css-prefix}-inverse { color: @fa-inverse; }
diff --git a/src/usr/local/www/font-awesome/less/variables.less b/src/usr/local/www/font-awesome/less/variables.less
new file mode 100644
index 0000000..37c4b80
--- /dev/null
+++ b/src/usr/local/www/font-awesome/less/variables.less
@@ -0,0 +1,708 @@
+// Variables
+// --------------------------
+
+@fa-font-path: "../fonts";
+@fa-font-size-base: 14px;
+@fa-line-height-base: 1;
+//@fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts"; // for referencing Bootstrap CDN font files directly
+@fa-css-prefix: fa;
+@fa-version: "4.5.0";
+@fa-border-color: #eee;
+@fa-inverse: #fff;
+@fa-li-width: (30em / 14);
+
+@fa-var-500px: "\f26e";
+@fa-var-adjust: "\f042";
+@fa-var-adn: "\f170";
+@fa-var-align-center: "\f037";
+@fa-var-align-justify: "\f039";
+@fa-var-align-left: "\f036";
+@fa-var-align-right: "\f038";
+@fa-var-amazon: "\f270";
+@fa-var-ambulance: "\f0f9";
+@fa-var-anchor: "\f13d";
+@fa-var-android: "\f17b";
+@fa-var-angellist: "\f209";
+@fa-var-angle-double-down: "\f103";
+@fa-var-angle-double-left: "\f100";
+@fa-var-angle-double-right: "\f101";
+@fa-var-angle-double-up: "\f102";
+@fa-var-angle-down: "\f107";
+@fa-var-angle-left: "\f104";
+@fa-var-angle-right: "\f105";
+@fa-var-angle-up: "\f106";
+@fa-var-apple: "\f179";
+@fa-var-archive: "\f187";
+@fa-var-area-chart: "\f1fe";
+@fa-var-arrow-circle-down: "\f0ab";
+@fa-var-arrow-circle-left: "\f0a8";
+@fa-var-arrow-circle-o-down: "\f01a";
+@fa-var-arrow-circle-o-left: "\f190";
+@fa-var-arrow-circle-o-right: "\f18e";
+@fa-var-arrow-circle-o-up: "\f01b";
+@fa-var-arrow-circle-right: "\f0a9";
+@fa-var-arrow-circle-up: "\f0aa";
+@fa-var-arrow-down: "\f063";
+@fa-var-arrow-left: "\f060";
+@fa-var-arrow-right: "\f061";
+@fa-var-arrow-up: "\f062";
+@fa-var-arrows: "\f047";
+@fa-var-arrows-alt: "\f0b2";
+@fa-var-arrows-h: "\f07e";
+@fa-var-arrows-v: "\f07d";
+@fa-var-asterisk: "\f069";
+@fa-var-at: "\f1fa";
+@fa-var-automobile: "\f1b9";
+@fa-var-backward: "\f04a";
+@fa-var-balance-scale: "\f24e";
+@fa-var-ban: "\f05e";
+@fa-var-bank: "\f19c";
+@fa-var-bar-chart: "\f080";
+@fa-var-bar-chart-o: "\f080";
+@fa-var-barcode: "\f02a";
+@fa-var-bars: "\f0c9";
+@fa-var-battery-0: "\f244";
+@fa-var-battery-1: "\f243";
+@fa-var-battery-2: "\f242";
+@fa-var-battery-3: "\f241";
+@fa-var-battery-4: "\f240";
+@fa-var-battery-empty: "\f244";
+@fa-var-battery-full: "\f240";
+@fa-var-battery-half: "\f242";
+@fa-var-battery-quarter: "\f243";
+@fa-var-battery-three-quarters: "\f241";
+@fa-var-bed: "\f236";
+@fa-var-beer: "\f0fc";
+@fa-var-behance: "\f1b4";
+@fa-var-behance-square: "\f1b5";
+@fa-var-bell: "\f0f3";
+@fa-var-bell-o: "\f0a2";
+@fa-var-bell-slash: "\f1f6";
+@fa-var-bell-slash-o: "\f1f7";
+@fa-var-bicycle: "\f206";
+@fa-var-binoculars: "\f1e5";
+@fa-var-birthday-cake: "\f1fd";
+@fa-var-bitbucket: "\f171";
+@fa-var-bitbucket-square: "\f172";
+@fa-var-bitcoin: "\f15a";
+@fa-var-black-tie: "\f27e";
+@fa-var-bluetooth: "\f293";
+@fa-var-bluetooth-b: "\f294";
+@fa-var-bold: "\f032";
+@fa-var-bolt: "\f0e7";
+@fa-var-bomb: "\f1e2";
+@fa-var-book: "\f02d";
+@fa-var-bookmark: "\f02e";
+@fa-var-bookmark-o: "\f097";
+@fa-var-briefcase: "\f0b1";
+@fa-var-btc: "\f15a";
+@fa-var-bug: "\f188";
+@fa-var-building: "\f1ad";
+@fa-var-building-o: "\f0f7";
+@fa-var-bullhorn: "\f0a1";
+@fa-var-bullseye: "\f140";
+@fa-var-bus: "\f207";
+@fa-var-buysellads: "\f20d";
+@fa-var-cab: "\f1ba";
+@fa-var-calculator: "\f1ec";
+@fa-var-calendar: "\f073";
+@fa-var-calendar-check-o: "\f274";
+@fa-var-calendar-minus-o: "\f272";
+@fa-var-calendar-o: "\f133";
+@fa-var-calendar-plus-o: "\f271";
+@fa-var-calendar-times-o: "\f273";
+@fa-var-camera: "\f030";
+@fa-var-camera-retro: "\f083";
+@fa-var-car: "\f1b9";
+@fa-var-caret-down: "\f0d7";
+@fa-var-caret-left: "\f0d9";
+@fa-var-caret-right: "\f0da";
+@fa-var-caret-square-o-down: "\f150";
+@fa-var-caret-square-o-left: "\f191";
+@fa-var-caret-square-o-right: "\f152";
+@fa-var-caret-square-o-up: "\f151";
+@fa-var-caret-up: "\f0d8";
+@fa-var-cart-arrow-down: "\f218";
+@fa-var-cart-plus: "\f217";
+@fa-var-cc: "\f20a";
+@fa-var-cc-amex: "\f1f3";
+@fa-var-cc-diners-club: "\f24c";
+@fa-var-cc-discover: "\f1f2";
+@fa-var-cc-jcb: "\f24b";
+@fa-var-cc-mastercard: "\f1f1";
+@fa-var-cc-paypal: "\f1f4";
+@fa-var-cc-stripe: "\f1f5";
+@fa-var-cc-visa: "\f1f0";
+@fa-var-certificate: "\f0a3";
+@fa-var-chain: "\f0c1";
+@fa-var-chain-broken: "\f127";
+@fa-var-check: "\f00c";
+@fa-var-check-circle: "\f058";
+@fa-var-check-circle-o: "\f05d";
+@fa-var-check-square: "\f14a";
+@fa-var-check-square-o: "\f046";
+@fa-var-chevron-circle-down: "\f13a";
+@fa-var-chevron-circle-left: "\f137";
+@fa-var-chevron-circle-right: "\f138";
+@fa-var-chevron-circle-up: "\f139";
+@fa-var-chevron-down: "\f078";
+@fa-var-chevron-left: "\f053";
+@fa-var-chevron-right: "\f054";
+@fa-var-chevron-up: "\f077";
+@fa-var-child: "\f1ae";
+@fa-var-chrome: "\f268";
+@fa-var-circle: "\f111";
+@fa-var-circle-o: "\f10c";
+@fa-var-circle-o-notch: "\f1ce";
+@fa-var-circle-thin: "\f1db";
+@fa-var-clipboard: "\f0ea";
+@fa-var-clock-o: "\f017";
+@fa-var-clone: "\f24d";
+@fa-var-close: "\f00d";
+@fa-var-cloud: "\f0c2";
+@fa-var-cloud-download: "\f0ed";
+@fa-var-cloud-upload: "\f0ee";
+@fa-var-cny: "\f157";
+@fa-var-code: "\f121";
+@fa-var-code-fork: "\f126";
+@fa-var-codepen: "\f1cb";
+@fa-var-codiepie: "\f284";
+@fa-var-coffee: "\f0f4";
+@fa-var-cog: "\f013";
+@fa-var-cogs: "\f085";
+@fa-var-columns: "\f0db";
+@fa-var-comment: "\f075";
+@fa-var-comment-o: "\f0e5";
+@fa-var-commenting: "\f27a";
+@fa-var-commenting-o: "\f27b";
+@fa-var-comments: "\f086";
+@fa-var-comments-o: "\f0e6";
+@fa-var-compass: "\f14e";
+@fa-var-compress: "\f066";
+@fa-var-connectdevelop: "\f20e";
+@fa-var-contao: "\f26d";
+@fa-var-copy: "\f0c5";
+@fa-var-copyright: "\f1f9";
+@fa-var-creative-commons: "\f25e";
+@fa-var-credit-card: "\f09d";
+@fa-var-credit-card-alt: "\f283";
+@fa-var-crop: "\f125";
+@fa-var-crosshairs: "\f05b";
+@fa-var-css3: "\f13c";
+@fa-var-cube: "\f1b2";
+@fa-var-cubes: "\f1b3";
+@fa-var-cut: "\f0c4";
+@fa-var-cutlery: "\f0f5";
+@fa-var-dashboard: "\f0e4";
+@fa-var-dashcube: "\f210";
+@fa-var-database: "\f1c0";
+@fa-var-dedent: "\f03b";
+@fa-var-delicious: "\f1a5";
+@fa-var-desktop: "\f108";
+@fa-var-deviantart: "\f1bd";
+@fa-var-diamond: "\f219";
+@fa-var-digg: "\f1a6";
+@fa-var-dollar: "\f155";
+@fa-var-dot-circle-o: "\f192";
+@fa-var-download: "\f019";
+@fa-var-dribbble: "\f17d";
+@fa-var-dropbox: "\f16b";
+@fa-var-drupal: "\f1a9";
+@fa-var-edge: "\f282";
+@fa-var-edit: "\f044";
+@fa-var-eject: "\f052";
+@fa-var-ellipsis-h: "\f141";
+@fa-var-ellipsis-v: "\f142";
+@fa-var-empire: "\f1d1";
+@fa-var-envelope: "\f0e0";
+@fa-var-envelope-o: "\f003";
+@fa-var-envelope-square: "\f199";
+@fa-var-eraser: "\f12d";
+@fa-var-eur: "\f153";
+@fa-var-euro: "\f153";
+@fa-var-exchange: "\f0ec";
+@fa-var-exclamation: "\f12a";
+@fa-var-exclamation-circle: "\f06a";
+@fa-var-exclamation-triangle: "\f071";
+@fa-var-expand: "\f065";
+@fa-var-expeditedssl: "\f23e";
+@fa-var-external-link: "\f08e";
+@fa-var-external-link-square: "\f14c";
+@fa-var-eye: "\f06e";
+@fa-var-eye-slash: "\f070";
+@fa-var-eyedropper: "\f1fb";
+@fa-var-facebook: "\f09a";
+@fa-var-facebook-f: "\f09a";
+@fa-var-facebook-official: "\f230";
+@fa-var-facebook-square: "\f082";
+@fa-var-fast-backward: "\f049";
+@fa-var-fast-forward: "\f050";
+@fa-var-fax: "\f1ac";
+@fa-var-feed: "\f09e";
+@fa-var-female: "\f182";
+@fa-var-fighter-jet: "\f0fb";
+@fa-var-file: "\f15b";
+@fa-var-file-archive-o: "\f1c6";
+@fa-var-file-audio-o: "\f1c7";
+@fa-var-file-code-o: "\f1c9";
+@fa-var-file-excel-o: "\f1c3";
+@fa-var-file-image-o: "\f1c5";
+@fa-var-file-movie-o: "\f1c8";
+@fa-var-file-o: "\f016";
+@fa-var-file-pdf-o: "\f1c1";
+@fa-var-file-photo-o: "\f1c5";
+@fa-var-file-picture-o: "\f1c5";
+@fa-var-file-powerpoint-o: "\f1c4";
+@fa-var-file-sound-o: "\f1c7";
+@fa-var-file-text: "\f15c";
+@fa-var-file-text-o: "\f0f6";
+@fa-var-file-video-o: "\f1c8";
+@fa-var-file-word-o: "\f1c2";
+@fa-var-file-zip-o: "\f1c6";
+@fa-var-files-o: "\f0c5";
+@fa-var-film: "\f008";
+@fa-var-filter: "\f0b0";
+@fa-var-fire: "\f06d";
+@fa-var-fire-extinguisher: "\f134";
+@fa-var-firefox: "\f269";
+@fa-var-flag: "\f024";
+@fa-var-flag-checkered: "\f11e";
+@fa-var-flag-o: "\f11d";
+@fa-var-flash: "\f0e7";
+@fa-var-flask: "\f0c3";
+@fa-var-flickr: "\f16e";
+@fa-var-floppy-o: "\f0c7";
+@fa-var-folder: "\f07b";
+@fa-var-folder-o: "\f114";
+@fa-var-folder-open: "\f07c";
+@fa-var-folder-open-o: "\f115";
+@fa-var-font: "\f031";
+@fa-var-fonticons: "\f280";
+@fa-var-fort-awesome: "\f286";
+@fa-var-forumbee: "\f211";
+@fa-var-forward: "\f04e";
+@fa-var-foursquare: "\f180";
+@fa-var-frown-o: "\f119";
+@fa-var-futbol-o: "\f1e3";
+@fa-var-gamepad: "\f11b";
+@fa-var-gavel: "\f0e3";
+@fa-var-gbp: "\f154";
+@fa-var-ge: "\f1d1";
+@fa-var-gear: "\f013";
+@fa-var-gears: "\f085";
+@fa-var-genderless: "\f22d";
+@fa-var-get-pocket: "\f265";
+@fa-var-gg: "\f260";
+@fa-var-gg-circle: "\f261";
+@fa-var-gift: "\f06b";
+@fa-var-git: "\f1d3";
+@fa-var-git-square: "\f1d2";
+@fa-var-github: "\f09b";
+@fa-var-github-alt: "\f113";
+@fa-var-github-square: "\f092";
+@fa-var-gittip: "\f184";
+@fa-var-glass: "\f000";
+@fa-var-globe: "\f0ac";
+@fa-var-google: "\f1a0";
+@fa-var-google-plus: "\f0d5";
+@fa-var-google-plus-square: "\f0d4";
+@fa-var-google-wallet: "\f1ee";
+@fa-var-graduation-cap: "\f19d";
+@fa-var-gratipay: "\f184";
+@fa-var-group: "\f0c0";
+@fa-var-h-square: "\f0fd";
+@fa-var-hacker-news: "\f1d4";
+@fa-var-hand-grab-o: "\f255";
+@fa-var-hand-lizard-o: "\f258";
+@fa-var-hand-o-down: "\f0a7";
+@fa-var-hand-o-left: "\f0a5";
+@fa-var-hand-o-right: "\f0a4";
+@fa-var-hand-o-up: "\f0a6";
+@fa-var-hand-paper-o: "\f256";
+@fa-var-hand-peace-o: "\f25b";
+@fa-var-hand-pointer-o: "\f25a";
+@fa-var-hand-rock-o: "\f255";
+@fa-var-hand-scissors-o: "\f257";
+@fa-var-hand-spock-o: "\f259";
+@fa-var-hand-stop-o: "\f256";
+@fa-var-hashtag: "\f292";
+@fa-var-hdd-o: "\f0a0";
+@fa-var-header: "\f1dc";
+@fa-var-headphones: "\f025";
+@fa-var-heart: "\f004";
+@fa-var-heart-o: "\f08a";
+@fa-var-heartbeat: "\f21e";
+@fa-var-history: "\f1da";
+@fa-var-home: "\f015";
+@fa-var-hospital-o: "\f0f8";
+@fa-var-hotel: "\f236";
+@fa-var-hourglass: "\f254";
+@fa-var-hourglass-1: "\f251";
+@fa-var-hourglass-2: "\f252";
+@fa-var-hourglass-3: "\f253";
+@fa-var-hourglass-end: "\f253";
+@fa-var-hourglass-half: "\f252";
+@fa-var-hourglass-o: "\f250";
+@fa-var-hourglass-start: "\f251";
+@fa-var-houzz: "\f27c";
+@fa-var-html5: "\f13b";
+@fa-var-i-cursor: "\f246";
+@fa-var-ils: "\f20b";
+@fa-var-image: "\f03e";
+@fa-var-inbox: "\f01c";
+@fa-var-indent: "\f03c";
+@fa-var-industry: "\f275";
+@fa-var-info: "\f129";
+@fa-var-info-circle: "\f05a";
+@fa-var-inr: "\f156";
+@fa-var-instagram: "\f16d";
+@fa-var-institution: "\f19c";
+@fa-var-internet-explorer: "\f26b";
+@fa-var-intersex: "\f224";
+@fa-var-ioxhost: "\f208";
+@fa-var-italic: "\f033";
+@fa-var-joomla: "\f1aa";
+@fa-var-jpy: "\f157";
+@fa-var-jsfiddle: "\f1cc";
+@fa-var-key: "\f084";
+@fa-var-keyboard-o: "\f11c";
+@fa-var-krw: "\f159";
+@fa-var-language: "\f1ab";
+@fa-var-laptop: "\f109";
+@fa-var-lastfm: "\f202";
+@fa-var-lastfm-square: "\f203";
+@fa-var-leaf: "\f06c";
+@fa-var-leanpub: "\f212";
+@fa-var-legal: "\f0e3";
+@fa-var-lemon-o: "\f094";
+@fa-var-level-down: "\f149";
+@fa-var-level-up: "\f148";
+@fa-var-life-bouy: "\f1cd";
+@fa-var-life-buoy: "\f1cd";
+@fa-var-life-ring: "\f1cd";
+@fa-var-life-saver: "\f1cd";
+@fa-var-lightbulb-o: "\f0eb";
+@fa-var-line-chart: "\f201";
+@fa-var-link: "\f0c1";
+@fa-var-linkedin: "\f0e1";
+@fa-var-linkedin-square: "\f08c";
+@fa-var-linux: "\f17c";
+@fa-var-list: "\f03a";
+@fa-var-list-alt: "\f022";
+@fa-var-list-ol: "\f0cb";
+@fa-var-list-ul: "\f0ca";
+@fa-var-location-arrow: "\f124";
+@fa-var-lock: "\f023";
+@fa-var-long-arrow-down: "\f175";
+@fa-var-long-arrow-left: "\f177";
+@fa-var-long-arrow-right: "\f178";
+@fa-var-long-arrow-up: "\f176";
+@fa-var-magic: "\f0d0";
+@fa-var-magnet: "\f076";
+@fa-var-mail-forward: "\f064";
+@fa-var-mail-reply: "\f112";
+@fa-var-mail-reply-all: "\f122";
+@fa-var-male: "\f183";
+@fa-var-map: "\f279";
+@fa-var-map-marker: "\f041";
+@fa-var-map-o: "\f278";
+@fa-var-map-pin: "\f276";
+@fa-var-map-signs: "\f277";
+@fa-var-mars: "\f222";
+@fa-var-mars-double: "\f227";
+@fa-var-mars-stroke: "\f229";
+@fa-var-mars-stroke-h: "\f22b";
+@fa-var-mars-stroke-v: "\f22a";
+@fa-var-maxcdn: "\f136";
+@fa-var-meanpath: "\f20c";
+@fa-var-medium: "\f23a";
+@fa-var-medkit: "\f0fa";
+@fa-var-meh-o: "\f11a";
+@fa-var-mercury: "\f223";
+@fa-var-microphone: "\f130";
+@fa-var-microphone-slash: "\f131";
+@fa-var-minus: "\f068";
+@fa-var-minus-circle: "\f056";
+@fa-var-minus-square: "\f146";
+@fa-var-minus-square-o: "\f147";
+@fa-var-mixcloud: "\f289";
+@fa-var-mobile: "\f10b";
+@fa-var-mobile-phone: "\f10b";
+@fa-var-modx: "\f285";
+@fa-var-money: "\f0d6";
+@fa-var-moon-o: "\f186";
+@fa-var-mortar-board: "\f19d";
+@fa-var-motorcycle: "\f21c";
+@fa-var-mouse-pointer: "\f245";
+@fa-var-music: "\f001";
+@fa-var-navicon: "\f0c9";
+@fa-var-neuter: "\f22c";
+@fa-var-newspaper-o: "\f1ea";
+@fa-var-object-group: "\f247";
+@fa-var-object-ungroup: "\f248";
+@fa-var-odnoklassniki: "\f263";
+@fa-var-odnoklassniki-square: "\f264";
+@fa-var-opencart: "\f23d";
+@fa-var-openid: "\f19b";
+@fa-var-opera: "\f26a";
+@fa-var-optin-monster: "\f23c";
+@fa-var-outdent: "\f03b";
+@fa-var-pagelines: "\f18c";
+@fa-var-paint-brush: "\f1fc";
+@fa-var-paper-plane: "\f1d8";
+@fa-var-paper-plane-o: "\f1d9";
+@fa-var-paperclip: "\f0c6";
+@fa-var-paragraph: "\f1dd";
+@fa-var-paste: "\f0ea";
+@fa-var-pause: "\f04c";
+@fa-var-pause-circle: "\f28b";
+@fa-var-pause-circle-o: "\f28c";
+@fa-var-paw: "\f1b0";
+@fa-var-paypal: "\f1ed";
+@fa-var-pencil: "\f040";
+@fa-var-pencil-square: "\f14b";
+@fa-var-pencil-square-o: "\f044";
+@fa-var-percent: "\f295";
+@fa-var-phone: "\f095";
+@fa-var-phone-square: "\f098";
+@fa-var-photo: "\f03e";
+@fa-var-picture-o: "\f03e";
+@fa-var-pie-chart: "\f200";
+@fa-var-pied-piper: "\f1a7";
+@fa-var-pied-piper-alt: "\f1a8";
+@fa-var-pinterest: "\f0d2";
+@fa-var-pinterest-p: "\f231";
+@fa-var-pinterest-square: "\f0d3";
+@fa-var-plane: "\f072";
+@fa-var-play: "\f04b";
+@fa-var-play-circle: "\f144";
+@fa-var-play-circle-o: "\f01d";
+@fa-var-plug: "\f1e6";
+@fa-var-plus: "\f067";
+@fa-var-plus-circle: "\f055";
+@fa-var-plus-square: "\f0fe";
+@fa-var-plus-square-o: "\f196";
+@fa-var-power-off: "\f011";
+@fa-var-print: "\f02f";
+@fa-var-product-hunt: "\f288";
+@fa-var-puzzle-piece: "\f12e";
+@fa-var-qq: "\f1d6";
+@fa-var-qrcode: "\f029";
+@fa-var-question: "\f128";
+@fa-var-question-circle: "\f059";
+@fa-var-quote-left: "\f10d";
+@fa-var-quote-right: "\f10e";
+@fa-var-ra: "\f1d0";
+@fa-var-random: "\f074";
+@fa-var-rebel: "\f1d0";
+@fa-var-recycle: "\f1b8";
+@fa-var-reddit: "\f1a1";
+@fa-var-reddit-alien: "\f281";
+@fa-var-reddit-square: "\f1a2";
+@fa-var-refresh: "\f021";
+@fa-var-registered: "\f25d";
+@fa-var-remove: "\f00d";
+@fa-var-renren: "\f18b";
+@fa-var-reorder: "\f0c9";
+@fa-var-repeat: "\f01e";
+@fa-var-reply: "\f112";
+@fa-var-reply-all: "\f122";
+@fa-var-retweet: "\f079";
+@fa-var-rmb: "\f157";
+@fa-var-road: "\f018";
+@fa-var-rocket: "\f135";
+@fa-var-rotate-left: "\f0e2";
+@fa-var-rotate-right: "\f01e";
+@fa-var-rouble: "\f158";
+@fa-var-rss: "\f09e";
+@fa-var-rss-square: "\f143";
+@fa-var-rub: "\f158";
+@fa-var-ruble: "\f158";
+@fa-var-rupee: "\f156";
+@fa-var-safari: "\f267";
+@fa-var-save: "\f0c7";
+@fa-var-scissors: "\f0c4";
+@fa-var-scribd: "\f28a";
+@fa-var-search: "\f002";
+@fa-var-search-minus: "\f010";
+@fa-var-search-plus: "\f00e";
+@fa-var-sellsy: "\f213";
+@fa-var-send: "\f1d8";
+@fa-var-send-o: "\f1d9";
+@fa-var-server: "\f233";
+@fa-var-share: "\f064";
+@fa-var-share-alt: "\f1e0";
+@fa-var-share-alt-square: "\f1e1";
+@fa-var-share-square: "\f14d";
+@fa-var-share-square-o: "\f045";
+@fa-var-shekel: "\f20b";
+@fa-var-sheqel: "\f20b";
+@fa-var-shield: "\f132";
+@fa-var-ship: "\f21a";
+@fa-var-shirtsinbulk: "\f214";
+@fa-var-shopping-bag: "\f290";
+@fa-var-shopping-basket: "\f291";
+@fa-var-shopping-cart: "\f07a";
+@fa-var-sign-in: "\f090";
+@fa-var-sign-out: "\f08b";
+@fa-var-signal: "\f012";
+@fa-var-simplybuilt: "\f215";
+@fa-var-sitemap: "\f0e8";
+@fa-var-skyatlas: "\f216";
+@fa-var-skype: "\f17e";
+@fa-var-slack: "\f198";
+@fa-var-sliders: "\f1de";
+@fa-var-slideshare: "\f1e7";
+@fa-var-smile-o: "\f118";
+@fa-var-soccer-ball-o: "\f1e3";
+@fa-var-sort: "\f0dc";
+@fa-var-sort-alpha-asc: "\f15d";
+@fa-var-sort-alpha-desc: "\f15e";
+@fa-var-sort-amount-asc: "\f160";
+@fa-var-sort-amount-desc: "\f161";
+@fa-var-sort-asc: "\f0de";
+@fa-var-sort-desc: "\f0dd";
+@fa-var-sort-down: "\f0dd";
+@fa-var-sort-numeric-asc: "\f162";
+@fa-var-sort-numeric-desc: "\f163";
+@fa-var-sort-up: "\f0de";
+@fa-var-soundcloud: "\f1be";
+@fa-var-space-shuttle: "\f197";
+@fa-var-spinner: "\f110";
+@fa-var-spoon: "\f1b1";
+@fa-var-spotify: "\f1bc";
+@fa-var-square: "\f0c8";
+@fa-var-square-o: "\f096";
+@fa-var-stack-exchange: "\f18d";
+@fa-var-stack-overflow: "\f16c";
+@fa-var-star: "\f005";
+@fa-var-star-half: "\f089";
+@fa-var-star-half-empty: "\f123";
+@fa-var-star-half-full: "\f123";
+@fa-var-star-half-o: "\f123";
+@fa-var-star-o: "\f006";
+@fa-var-steam: "\f1b6";
+@fa-var-steam-square: "\f1b7";
+@fa-var-step-backward: "\f048";
+@fa-var-step-forward: "\f051";
+@fa-var-stethoscope: "\f0f1";
+@fa-var-sticky-note: "\f249";
+@fa-var-sticky-note-o: "\f24a";
+@fa-var-stop: "\f04d";
+@fa-var-stop-circle: "\f28d";
+@fa-var-stop-circle-o: "\f28e";
+@fa-var-street-view: "\f21d";
+@fa-var-strikethrough: "\f0cc";
+@fa-var-stumbleupon: "\f1a4";
+@fa-var-stumbleupon-circle: "\f1a3";
+@fa-var-subscript: "\f12c";
+@fa-var-subway: "\f239";
+@fa-var-suitcase: "\f0f2";
+@fa-var-sun-o: "\f185";
+@fa-var-superscript: "\f12b";
+@fa-var-support: "\f1cd";
+@fa-var-table: "\f0ce";
+@fa-var-tablet: "\f10a";
+@fa-var-tachometer: "\f0e4";
+@fa-var-tag: "\f02b";
+@fa-var-tags: "\f02c";
+@fa-var-tasks: "\f0ae";
+@fa-var-taxi: "\f1ba";
+@fa-var-television: "\f26c";
+@fa-var-tencent-weibo: "\f1d5";
+@fa-var-terminal: "\f120";
+@fa-var-text-height: "\f034";
+@fa-var-text-width: "\f035";
+@fa-var-th: "\f00a";
+@fa-var-th-large: "\f009";
+@fa-var-th-list: "\f00b";
+@fa-var-thumb-tack: "\f08d";
+@fa-var-thumbs-down: "\f165";
+@fa-var-thumbs-o-down: "\f088";
+@fa-var-thumbs-o-up: "\f087";
+@fa-var-thumbs-up: "\f164";
+@fa-var-ticket: "\f145";
+@fa-var-times: "\f00d";
+@fa-var-times-circle: "\f057";
+@fa-var-times-circle-o: "\f05c";
+@fa-var-tint: "\f043";
+@fa-var-toggle-down: "\f150";
+@fa-var-toggle-left: "\f191";
+@fa-var-toggle-off: "\f204";
+@fa-var-toggle-on: "\f205";
+@fa-var-toggle-right: "\f152";
+@fa-var-toggle-up: "\f151";
+@fa-var-trademark: "\f25c";
+@fa-var-train: "\f238";
+@fa-var-transgender: "\f224";
+@fa-var-transgender-alt: "\f225";
+@fa-var-trash: "\f1f8";
+@fa-var-trash-o: "\f014";
+@fa-var-tree: "\f1bb";
+@fa-var-trello: "\f181";
+@fa-var-tripadvisor: "\f262";
+@fa-var-trophy: "\f091";
+@fa-var-truck: "\f0d1";
+@fa-var-try: "\f195";
+@fa-var-tty: "\f1e4";
+@fa-var-tumblr: "\f173";
+@fa-var-tumblr-square: "\f174";
+@fa-var-turkish-lira: "\f195";
+@fa-var-tv: "\f26c";
+@fa-var-twitch: "\f1e8";
+@fa-var-twitter: "\f099";
+@fa-var-twitter-square: "\f081";
+@fa-var-umbrella: "\f0e9";
+@fa-var-underline: "\f0cd";
+@fa-var-undo: "\f0e2";
+@fa-var-university: "\f19c";
+@fa-var-unlink: "\f127";
+@fa-var-unlock: "\f09c";
+@fa-var-unlock-alt: "\f13e";
+@fa-var-unsorted: "\f0dc";
+@fa-var-upload: "\f093";
+@fa-var-usb: "\f287";
+@fa-var-usd: "\f155";
+@fa-var-user: "\f007";
+@fa-var-user-md: "\f0f0";
+@fa-var-user-plus: "\f234";
+@fa-var-user-secret: "\f21b";
+@fa-var-user-times: "\f235";
+@fa-var-users: "\f0c0";
+@fa-var-venus: "\f221";
+@fa-var-venus-double: "\f226";
+@fa-var-venus-mars: "\f228";
+@fa-var-viacoin: "\f237";
+@fa-var-video-camera: "\f03d";
+@fa-var-vimeo: "\f27d";
+@fa-var-vimeo-square: "\f194";
+@fa-var-vine: "\f1ca";
+@fa-var-vk: "\f189";
+@fa-var-volume-down: "\f027";
+@fa-var-volume-off: "\f026";
+@fa-var-volume-up: "\f028";
+@fa-var-warning: "\f071";
+@fa-var-wechat: "\f1d7";
+@fa-var-weibo: "\f18a";
+@fa-var-weixin: "\f1d7";
+@fa-var-whatsapp: "\f232";
+@fa-var-wheelchair: "\f193";
+@fa-var-wifi: "\f1eb";
+@fa-var-wikipedia-w: "\f266";
+@fa-var-windows: "\f17a";
+@fa-var-won: "\f159";
+@fa-var-wordpress: "\f19a";
+@fa-var-wrench: "\f0ad";
+@fa-var-xing: "\f168";
+@fa-var-xing-square: "\f169";
+@fa-var-y-combinator: "\f23b";
+@fa-var-y-combinator-square: "\f1d4";
+@fa-var-yahoo: "\f19e";
+@fa-var-yc: "\f23b";
+@fa-var-yc-square: "\f1d4";
+@fa-var-yelp: "\f1e9";
+@fa-var-yen: "\f157";
+@fa-var-youtube: "\f167";
+@fa-var-youtube-play: "\f16a";
+@fa-var-youtube-square: "\f166";
+
diff --git a/src/usr/local/www/font-awesome/scss/_animated.scss b/src/usr/local/www/font-awesome/scss/_animated.scss
new file mode 100644
index 0000000..8a020db
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_animated.scss
@@ -0,0 +1,34 @@
+// Spinning Icons
+// --------------------------
+
+.#{$fa-css-prefix}-spin {
+ -webkit-animation: fa-spin 2s infinite linear;
+ animation: fa-spin 2s infinite linear;
+}
+
+.#{$fa-css-prefix}-pulse {
+ -webkit-animation: fa-spin 1s infinite steps(8);
+ animation: fa-spin 1s infinite steps(8);
+}
+
+@-webkit-keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
+
+@keyframes fa-spin {
+ 0% {
+ -webkit-transform: rotate(0deg);
+ transform: rotate(0deg);
+ }
+ 100% {
+ -webkit-transform: rotate(359deg);
+ transform: rotate(359deg);
+ }
+}
diff --git a/src/usr/local/www/font-awesome/scss/_bordered-pulled.scss b/src/usr/local/www/font-awesome/scss/_bordered-pulled.scss
new file mode 100644
index 0000000..d4b85a0
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_bordered-pulled.scss
@@ -0,0 +1,25 @@
+// Bordered & Pulled
+// -------------------------
+
+.#{$fa-css-prefix}-border {
+ padding: .2em .25em .15em;
+ border: solid .08em $fa-border-color;
+ border-radius: .1em;
+}
+
+.#{$fa-css-prefix}-pull-left { float: left; }
+.#{$fa-css-prefix}-pull-right { float: right; }
+
+.#{$fa-css-prefix} {
+ &.#{$fa-css-prefix}-pull-left { margin-right: .3em; }
+ &.#{$fa-css-prefix}-pull-right { margin-left: .3em; }
+}
+
+/* Deprecated as of 4.4.0 */
+.pull-right { float: right; }
+.pull-left { float: left; }
+
+.#{$fa-css-prefix} {
+ &.pull-left { margin-right: .3em; }
+ &.pull-right { margin-left: .3em; }
+}
diff --git a/src/usr/local/www/font-awesome/scss/_core.scss b/src/usr/local/www/font-awesome/scss/_core.scss
new file mode 100644
index 0000000..7425ef8
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_core.scss
@@ -0,0 +1,12 @@
+// Base Class Definition
+// -------------------------
+
+.#{$fa-css-prefix} {
+ display: inline-block;
+ font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+}
diff --git a/src/usr/local/www/font-awesome/scss/_fixed-width.scss b/src/usr/local/www/font-awesome/scss/_fixed-width.scss
new file mode 100644
index 0000000..b221c98
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_fixed-width.scss
@@ -0,0 +1,6 @@
+// Fixed Width Icons
+// -------------------------
+.#{$fa-css-prefix}-fw {
+ width: (18em / 14);
+ text-align: center;
+}
diff --git a/src/usr/local/www/font-awesome/scss/_icons.scss b/src/usr/local/www/font-awesome/scss/_icons.scss
new file mode 100644
index 0000000..6f93759
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_icons.scss
@@ -0,0 +1,697 @@
+/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
+ readers do not read off random characters that represent icons */
+
+.#{$fa-css-prefix}-glass:before { content: $fa-var-glass; }
+.#{$fa-css-prefix}-music:before { content: $fa-var-music; }
+.#{$fa-css-prefix}-search:before { content: $fa-var-search; }
+.#{$fa-css-prefix}-envelope-o:before { content: $fa-var-envelope-o; }
+.#{$fa-css-prefix}-heart:before { content: $fa-var-heart; }
+.#{$fa-css-prefix}-star:before { content: $fa-var-star; }
+.#{$fa-css-prefix}-star-o:before { content: $fa-var-star-o; }
+.#{$fa-css-prefix}-user:before { content: $fa-var-user; }
+.#{$fa-css-prefix}-film:before { content: $fa-var-film; }
+.#{$fa-css-prefix}-th-large:before { content: $fa-var-th-large; }
+.#{$fa-css-prefix}-th:before { content: $fa-var-th; }
+.#{$fa-css-prefix}-th-list:before { content: $fa-var-th-list; }
+.#{$fa-css-prefix}-check:before { content: $fa-var-check; }
+.#{$fa-css-prefix}-remove:before,
+.#{$fa-css-prefix}-close:before,
+.#{$fa-css-prefix}-times:before { content: $fa-var-times; }
+.#{$fa-css-prefix}-search-plus:before { content: $fa-var-search-plus; }
+.#{$fa-css-prefix}-search-minus:before { content: $fa-var-search-minus; }
+.#{$fa-css-prefix}-power-off:before { content: $fa-var-power-off; }
+.#{$fa-css-prefix}-signal:before { content: $fa-var-signal; }
+.#{$fa-css-prefix}-gear:before,
+.#{$fa-css-prefix}-cog:before { content: $fa-var-cog; }
+.#{$fa-css-prefix}-trash-o:before { content: $fa-var-trash-o; }
+.#{$fa-css-prefix}-home:before { content: $fa-var-home; }
+.#{$fa-css-prefix}-file-o:before { content: $fa-var-file-o; }
+.#{$fa-css-prefix}-clock-o:before { content: $fa-var-clock-o; }
+.#{$fa-css-prefix}-road:before { content: $fa-var-road; }
+.#{$fa-css-prefix}-download:before { content: $fa-var-download; }
+.#{$fa-css-prefix}-arrow-circle-o-down:before { content: $fa-var-arrow-circle-o-down; }
+.#{$fa-css-prefix}-arrow-circle-o-up:before { content: $fa-var-arrow-circle-o-up; }
+.#{$fa-css-prefix}-inbox:before { content: $fa-var-inbox; }
+.#{$fa-css-prefix}-play-circle-o:before { content: $fa-var-play-circle-o; }
+.#{$fa-css-prefix}-rotate-right:before,
+.#{$fa-css-prefix}-repeat:before { content: $fa-var-repeat; }
+.#{$fa-css-prefix}-refresh:before { content: $fa-var-refresh; }
+.#{$fa-css-prefix}-list-alt:before { content: $fa-var-list-alt; }
+.#{$fa-css-prefix}-lock:before { content: $fa-var-lock; }
+.#{$fa-css-prefix}-flag:before { content: $fa-var-flag; }
+.#{$fa-css-prefix}-headphones:before { content: $fa-var-headphones; }
+.#{$fa-css-prefix}-volume-off:before { content: $fa-var-volume-off; }
+.#{$fa-css-prefix}-volume-down:before { content: $fa-var-volume-down; }
+.#{$fa-css-prefix}-volume-up:before { content: $fa-var-volume-up; }
+.#{$fa-css-prefix}-qrcode:before { content: $fa-var-qrcode; }
+.#{$fa-css-prefix}-barcode:before { content: $fa-var-barcode; }
+.#{$fa-css-prefix}-tag:before { content: $fa-var-tag; }
+.#{$fa-css-prefix}-tags:before { content: $fa-var-tags; }
+.#{$fa-css-prefix}-book:before { content: $fa-var-book; }
+.#{$fa-css-prefix}-bookmark:before { content: $fa-var-bookmark; }
+.#{$fa-css-prefix}-print:before { content: $fa-var-print; }
+.#{$fa-css-prefix}-camera:before { content: $fa-var-camera; }
+.#{$fa-css-prefix}-font:before { content: $fa-var-font; }
+.#{$fa-css-prefix}-bold:before { content: $fa-var-bold; }
+.#{$fa-css-prefix}-italic:before { content: $fa-var-italic; }
+.#{$fa-css-prefix}-text-height:before { content: $fa-var-text-height; }
+.#{$fa-css-prefix}-text-width:before { content: $fa-var-text-width; }
+.#{$fa-css-prefix}-align-left:before { content: $fa-var-align-left; }
+.#{$fa-css-prefix}-align-center:before { content: $fa-var-align-center; }
+.#{$fa-css-prefix}-align-right:before { content: $fa-var-align-right; }
+.#{$fa-css-prefix}-align-justify:before { content: $fa-var-align-justify; }
+.#{$fa-css-prefix}-list:before { content: $fa-var-list; }
+.#{$fa-css-prefix}-dedent:before,
+.#{$fa-css-prefix}-outdent:before { content: $fa-var-outdent; }
+.#{$fa-css-prefix}-indent:before { content: $fa-var-indent; }
+.#{$fa-css-prefix}-video-camera:before { content: $fa-var-video-camera; }
+.#{$fa-css-prefix}-photo:before,
+.#{$fa-css-prefix}-image:before,
+.#{$fa-css-prefix}-picture-o:before { content: $fa-var-picture-o; }
+.#{$fa-css-prefix}-pencil:before { content: $fa-var-pencil; }
+.#{$fa-css-prefix}-map-marker:before { content: $fa-var-map-marker; }
+.#{$fa-css-prefix}-adjust:before { content: $fa-var-adjust; }
+.#{$fa-css-prefix}-tint:before { content: $fa-var-tint; }
+.#{$fa-css-prefix}-edit:before,
+.#{$fa-css-prefix}-pencil-square-o:before { content: $fa-var-pencil-square-o; }
+.#{$fa-css-prefix}-share-square-o:before { content: $fa-var-share-square-o; }
+.#{$fa-css-prefix}-check-square-o:before { content: $fa-var-check-square-o; }
+.#{$fa-css-prefix}-arrows:before { content: $fa-var-arrows; }
+.#{$fa-css-prefix}-step-backward:before { content: $fa-var-step-backward; }
+.#{$fa-css-prefix}-fast-backward:before { content: $fa-var-fast-backward; }
+.#{$fa-css-prefix}-backward:before { content: $fa-var-backward; }
+.#{$fa-css-prefix}-play:before { content: $fa-var-play; }
+.#{$fa-css-prefix}-pause:before { content: $fa-var-pause; }
+.#{$fa-css-prefix}-stop:before { content: $fa-var-stop; }
+.#{$fa-css-prefix}-forward:before { content: $fa-var-forward; }
+.#{$fa-css-prefix}-fast-forward:before { content: $fa-var-fast-forward; }
+.#{$fa-css-prefix}-step-forward:before { content: $fa-var-step-forward; }
+.#{$fa-css-prefix}-eject:before { content: $fa-var-eject; }
+.#{$fa-css-prefix}-chevron-left:before { content: $fa-var-chevron-left; }
+.#{$fa-css-prefix}-chevron-right:before { content: $fa-var-chevron-right; }
+.#{$fa-css-prefix}-plus-circle:before { content: $fa-var-plus-circle; }
+.#{$fa-css-prefix}-minus-circle:before { content: $fa-var-minus-circle; }
+.#{$fa-css-prefix}-times-circle:before { content: $fa-var-times-circle; }
+.#{$fa-css-prefix}-check-circle:before { content: $fa-var-check-circle; }
+.#{$fa-css-prefix}-question-circle:before { content: $fa-var-question-circle; }
+.#{$fa-css-prefix}-info-circle:before { content: $fa-var-info-circle; }
+.#{$fa-css-prefix}-crosshairs:before { content: $fa-var-crosshairs; }
+.#{$fa-css-prefix}-times-circle-o:before { content: $fa-var-times-circle-o; }
+.#{$fa-css-prefix}-check-circle-o:before { content: $fa-var-check-circle-o; }
+.#{$fa-css-prefix}-ban:before { content: $fa-var-ban; }
+.#{$fa-css-prefix}-arrow-left:before { content: $fa-var-arrow-left; }
+.#{$fa-css-prefix}-arrow-right:before { content: $fa-var-arrow-right; }
+.#{$fa-css-prefix}-arrow-up:before { content: $fa-var-arrow-up; }
+.#{$fa-css-prefix}-arrow-down:before { content: $fa-var-arrow-down; }
+.#{$fa-css-prefix}-mail-forward:before,
+.#{$fa-css-prefix}-share:before { content: $fa-var-share; }
+.#{$fa-css-prefix}-expand:before { content: $fa-var-expand; }
+.#{$fa-css-prefix}-compress:before { content: $fa-var-compress; }
+.#{$fa-css-prefix}-plus:before { content: $fa-var-plus; }
+.#{$fa-css-prefix}-minus:before { content: $fa-var-minus; }
+.#{$fa-css-prefix}-asterisk:before { content: $fa-var-asterisk; }
+.#{$fa-css-prefix}-exclamation-circle:before { content: $fa-var-exclamation-circle; }
+.#{$fa-css-prefix}-gift:before { content: $fa-var-gift; }
+.#{$fa-css-prefix}-leaf:before { content: $fa-var-leaf; }
+.#{$fa-css-prefix}-fire:before { content: $fa-var-fire; }
+.#{$fa-css-prefix}-eye:before { content: $fa-var-eye; }
+.#{$fa-css-prefix}-eye-slash:before { content: $fa-var-eye-slash; }
+.#{$fa-css-prefix}-warning:before,
+.#{$fa-css-prefix}-exclamation-triangle:before { content: $fa-var-exclamation-triangle; }
+.#{$fa-css-prefix}-plane:before { content: $fa-var-plane; }
+.#{$fa-css-prefix}-calendar:before { content: $fa-var-calendar; }
+.#{$fa-css-prefix}-random:before { content: $fa-var-random; }
+.#{$fa-css-prefix}-comment:before { content: $fa-var-comment; }
+.#{$fa-css-prefix}-magnet:before { content: $fa-var-magnet; }
+.#{$fa-css-prefix}-chevron-up:before { content: $fa-var-chevron-up; }
+.#{$fa-css-prefix}-chevron-down:before { content: $fa-var-chevron-down; }
+.#{$fa-css-prefix}-retweet:before { content: $fa-var-retweet; }
+.#{$fa-css-prefix}-shopping-cart:before { content: $fa-var-shopping-cart; }
+.#{$fa-css-prefix}-folder:before { content: $fa-var-folder; }
+.#{$fa-css-prefix}-folder-open:before { content: $fa-var-folder-open; }
+.#{$fa-css-prefix}-arrows-v:before { content: $fa-var-arrows-v; }
+.#{$fa-css-prefix}-arrows-h:before { content: $fa-var-arrows-h; }
+.#{$fa-css-prefix}-bar-chart-o:before,
+.#{$fa-css-prefix}-bar-chart:before { content: $fa-var-bar-chart; }
+.#{$fa-css-prefix}-twitter-square:before { content: $fa-var-twitter-square; }
+.#{$fa-css-prefix}-facebook-square:before { content: $fa-var-facebook-square; }
+.#{$fa-css-prefix}-camera-retro:before { content: $fa-var-camera-retro; }
+.#{$fa-css-prefix}-key:before { content: $fa-var-key; }
+.#{$fa-css-prefix}-gears:before,
+.#{$fa-css-prefix}-cogs:before { content: $fa-var-cogs; }
+.#{$fa-css-prefix}-comments:before { content: $fa-var-comments; }
+.#{$fa-css-prefix}-thumbs-o-up:before { content: $fa-var-thumbs-o-up; }
+.#{$fa-css-prefix}-thumbs-o-down:before { content: $fa-var-thumbs-o-down; }
+.#{$fa-css-prefix}-star-half:before { content: $fa-var-star-half; }
+.#{$fa-css-prefix}-heart-o:before { content: $fa-var-heart-o; }
+.#{$fa-css-prefix}-sign-out:before { content: $fa-var-sign-out; }
+.#{$fa-css-prefix}-linkedin-square:before { content: $fa-var-linkedin-square; }
+.#{$fa-css-prefix}-thumb-tack:before { content: $fa-var-thumb-tack; }
+.#{$fa-css-prefix}-external-link:before { content: $fa-var-external-link; }
+.#{$fa-css-prefix}-sign-in:before { content: $fa-var-sign-in; }
+.#{$fa-css-prefix}-trophy:before { content: $fa-var-trophy; }
+.#{$fa-css-prefix}-github-square:before { content: $fa-var-github-square; }
+.#{$fa-css-prefix}-upload:before { content: $fa-var-upload; }
+.#{$fa-css-prefix}-lemon-o:before { content: $fa-var-lemon-o; }
+.#{$fa-css-prefix}-phone:before { content: $fa-var-phone; }
+.#{$fa-css-prefix}-square-o:before { content: $fa-var-square-o; }
+.#{$fa-css-prefix}-bookmark-o:before { content: $fa-var-bookmark-o; }
+.#{$fa-css-prefix}-phone-square:before { content: $fa-var-phone-square; }
+.#{$fa-css-prefix}-twitter:before { content: $fa-var-twitter; }
+.#{$fa-css-prefix}-facebook-f:before,
+.#{$fa-css-prefix}-facebook:before { content: $fa-var-facebook; }
+.#{$fa-css-prefix}-github:before { content: $fa-var-github; }
+.#{$fa-css-prefix}-unlock:before { content: $fa-var-unlock; }
+.#{$fa-css-prefix}-credit-card:before { content: $fa-var-credit-card; }
+.#{$fa-css-prefix}-feed:before,
+.#{$fa-css-prefix}-rss:before { content: $fa-var-rss; }
+.#{$fa-css-prefix}-hdd-o:before { content: $fa-var-hdd-o; }
+.#{$fa-css-prefix}-bullhorn:before { content: $fa-var-bullhorn; }
+.#{$fa-css-prefix}-bell:before { content: $fa-var-bell; }
+.#{$fa-css-prefix}-certificate:before { content: $fa-var-certificate; }
+.#{$fa-css-prefix}-hand-o-right:before { content: $fa-var-hand-o-right; }
+.#{$fa-css-prefix}-hand-o-left:before { content: $fa-var-hand-o-left; }
+.#{$fa-css-prefix}-hand-o-up:before { content: $fa-var-hand-o-up; }
+.#{$fa-css-prefix}-hand-o-down:before { content: $fa-var-hand-o-down; }
+.#{$fa-css-prefix}-arrow-circle-left:before { content: $fa-var-arrow-circle-left; }
+.#{$fa-css-prefix}-arrow-circle-right:before { content: $fa-var-arrow-circle-right; }
+.#{$fa-css-prefix}-arrow-circle-up:before { content: $fa-var-arrow-circle-up; }
+.#{$fa-css-prefix}-arrow-circle-down:before { content: $fa-var-arrow-circle-down; }
+.#{$fa-css-prefix}-globe:before { content: $fa-var-globe; }
+.#{$fa-css-prefix}-wrench:before { content: $fa-var-wrench; }
+.#{$fa-css-prefix}-tasks:before { content: $fa-var-tasks; }
+.#{$fa-css-prefix}-filter:before { content: $fa-var-filter; }
+.#{$fa-css-prefix}-briefcase:before { content: $fa-var-briefcase; }
+.#{$fa-css-prefix}-arrows-alt:before { content: $fa-var-arrows-alt; }
+.#{$fa-css-prefix}-group:before,
+.#{$fa-css-prefix}-users:before { content: $fa-var-users; }
+.#{$fa-css-prefix}-chain:before,
+.#{$fa-css-prefix}-link:before { content: $fa-var-link; }
+.#{$fa-css-prefix}-cloud:before { content: $fa-var-cloud; }
+.#{$fa-css-prefix}-flask:before { content: $fa-var-flask; }
+.#{$fa-css-prefix}-cut:before,
+.#{$fa-css-prefix}-scissors:before { content: $fa-var-scissors; }
+.#{$fa-css-prefix}-copy:before,
+.#{$fa-css-prefix}-files-o:before { content: $fa-var-files-o; }
+.#{$fa-css-prefix}-paperclip:before { content: $fa-var-paperclip; }
+.#{$fa-css-prefix}-save:before,
+.#{$fa-css-prefix}-floppy-o:before { content: $fa-var-floppy-o; }
+.#{$fa-css-prefix}-square:before { content: $fa-var-square; }
+.#{$fa-css-prefix}-navicon:before,
+.#{$fa-css-prefix}-reorder:before,
+.#{$fa-css-prefix}-bars:before { content: $fa-var-bars; }
+.#{$fa-css-prefix}-list-ul:before { content: $fa-var-list-ul; }
+.#{$fa-css-prefix}-list-ol:before { content: $fa-var-list-ol; }
+.#{$fa-css-prefix}-strikethrough:before { content: $fa-var-strikethrough; }
+.#{$fa-css-prefix}-underline:before { content: $fa-var-underline; }
+.#{$fa-css-prefix}-table:before { content: $fa-var-table; }
+.#{$fa-css-prefix}-magic:before { content: $fa-var-magic; }
+.#{$fa-css-prefix}-truck:before { content: $fa-var-truck; }
+.#{$fa-css-prefix}-pinterest:before { content: $fa-var-pinterest; }
+.#{$fa-css-prefix}-pinterest-square:before { content: $fa-var-pinterest-square; }
+.#{$fa-css-prefix}-google-plus-square:before { content: $fa-var-google-plus-square; }
+.#{$fa-css-prefix}-google-plus:before { content: $fa-var-google-plus; }
+.#{$fa-css-prefix}-money:before { content: $fa-var-money; }
+.#{$fa-css-prefix}-caret-down:before { content: $fa-var-caret-down; }
+.#{$fa-css-prefix}-caret-up:before { content: $fa-var-caret-up; }
+.#{$fa-css-prefix}-caret-left:before { content: $fa-var-caret-left; }
+.#{$fa-css-prefix}-caret-right:before { content: $fa-var-caret-right; }
+.#{$fa-css-prefix}-columns:before { content: $fa-var-columns; }
+.#{$fa-css-prefix}-unsorted:before,
+.#{$fa-css-prefix}-sort:before { content: $fa-var-sort; }
+.#{$fa-css-prefix}-sort-down:before,
+.#{$fa-css-prefix}-sort-desc:before { content: $fa-var-sort-desc; }
+.#{$fa-css-prefix}-sort-up:before,
+.#{$fa-css-prefix}-sort-asc:before { content: $fa-var-sort-asc; }
+.#{$fa-css-prefix}-envelope:before { content: $fa-var-envelope; }
+.#{$fa-css-prefix}-linkedin:before { content: $fa-var-linkedin; }
+.#{$fa-css-prefix}-rotate-left:before,
+.#{$fa-css-prefix}-undo:before { content: $fa-var-undo; }
+.#{$fa-css-prefix}-legal:before,
+.#{$fa-css-prefix}-gavel:before { content: $fa-var-gavel; }
+.#{$fa-css-prefix}-dashboard:before,
+.#{$fa-css-prefix}-tachometer:before { content: $fa-var-tachometer; }
+.#{$fa-css-prefix}-comment-o:before { content: $fa-var-comment-o; }
+.#{$fa-css-prefix}-comments-o:before { content: $fa-var-comments-o; }
+.#{$fa-css-prefix}-flash:before,
+.#{$fa-css-prefix}-bolt:before { content: $fa-var-bolt; }
+.#{$fa-css-prefix}-sitemap:before { content: $fa-var-sitemap; }
+.#{$fa-css-prefix}-umbrella:before { content: $fa-var-umbrella; }
+.#{$fa-css-prefix}-paste:before,
+.#{$fa-css-prefix}-clipboard:before { content: $fa-var-clipboard; }
+.#{$fa-css-prefix}-lightbulb-o:before { content: $fa-var-lightbulb-o; }
+.#{$fa-css-prefix}-exchange:before { content: $fa-var-exchange; }
+.#{$fa-css-prefix}-cloud-download:before { content: $fa-var-cloud-download; }
+.#{$fa-css-prefix}-cloud-upload:before { content: $fa-var-cloud-upload; }
+.#{$fa-css-prefix}-user-md:before { content: $fa-var-user-md; }
+.#{$fa-css-prefix}-stethoscope:before { content: $fa-var-stethoscope; }
+.#{$fa-css-prefix}-suitcase:before { content: $fa-var-suitcase; }
+.#{$fa-css-prefix}-bell-o:before { content: $fa-var-bell-o; }
+.#{$fa-css-prefix}-coffee:before { content: $fa-var-coffee; }
+.#{$fa-css-prefix}-cutlery:before { content: $fa-var-cutlery; }
+.#{$fa-css-prefix}-file-text-o:before { content: $fa-var-file-text-o; }
+.#{$fa-css-prefix}-building-o:before { content: $fa-var-building-o; }
+.#{$fa-css-prefix}-hospital-o:before { content: $fa-var-hospital-o; }
+.#{$fa-css-prefix}-ambulance:before { content: $fa-var-ambulance; }
+.#{$fa-css-prefix}-medkit:before { content: $fa-var-medkit; }
+.#{$fa-css-prefix}-fighter-jet:before { content: $fa-var-fighter-jet; }
+.#{$fa-css-prefix}-beer:before { content: $fa-var-beer; }
+.#{$fa-css-prefix}-h-square:before { content: $fa-var-h-square; }
+.#{$fa-css-prefix}-plus-square:before { content: $fa-var-plus-square; }
+.#{$fa-css-prefix}-angle-double-left:before { content: $fa-var-angle-double-left; }
+.#{$fa-css-prefix}-angle-double-right:before { content: $fa-var-angle-double-right; }
+.#{$fa-css-prefix}-angle-double-up:before { content: $fa-var-angle-double-up; }
+.#{$fa-css-prefix}-angle-double-down:before { content: $fa-var-angle-double-down; }
+.#{$fa-css-prefix}-angle-left:before { content: $fa-var-angle-left; }
+.#{$fa-css-prefix}-angle-right:before { content: $fa-var-angle-right; }
+.#{$fa-css-prefix}-angle-up:before { content: $fa-var-angle-up; }
+.#{$fa-css-prefix}-angle-down:before { content: $fa-var-angle-down; }
+.#{$fa-css-prefix}-desktop:before { content: $fa-var-desktop; }
+.#{$fa-css-prefix}-laptop:before { content: $fa-var-laptop; }
+.#{$fa-css-prefix}-tablet:before { content: $fa-var-tablet; }
+.#{$fa-css-prefix}-mobile-phone:before,
+.#{$fa-css-prefix}-mobile:before { content: $fa-var-mobile; }
+.#{$fa-css-prefix}-circle-o:before { content: $fa-var-circle-o; }
+.#{$fa-css-prefix}-quote-left:before { content: $fa-var-quote-left; }
+.#{$fa-css-prefix}-quote-right:before { content: $fa-var-quote-right; }
+.#{$fa-css-prefix}-spinner:before { content: $fa-var-spinner; }
+.#{$fa-css-prefix}-circle:before { content: $fa-var-circle; }
+.#{$fa-css-prefix}-mail-reply:before,
+.#{$fa-css-prefix}-reply:before { content: $fa-var-reply; }
+.#{$fa-css-prefix}-github-alt:before { content: $fa-var-github-alt; }
+.#{$fa-css-prefix}-folder-o:before { content: $fa-var-folder-o; }
+.#{$fa-css-prefix}-folder-open-o:before { content: $fa-var-folder-open-o; }
+.#{$fa-css-prefix}-smile-o:before { content: $fa-var-smile-o; }
+.#{$fa-css-prefix}-frown-o:before { content: $fa-var-frown-o; }
+.#{$fa-css-prefix}-meh-o:before { content: $fa-var-meh-o; }
+.#{$fa-css-prefix}-gamepad:before { content: $fa-var-gamepad; }
+.#{$fa-css-prefix}-keyboard-o:before { content: $fa-var-keyboard-o; }
+.#{$fa-css-prefix}-flag-o:before { content: $fa-var-flag-o; }
+.#{$fa-css-prefix}-flag-checkered:before { content: $fa-var-flag-checkered; }
+.#{$fa-css-prefix}-terminal:before { content: $fa-var-terminal; }
+.#{$fa-css-prefix}-code:before { content: $fa-var-code; }
+.#{$fa-css-prefix}-mail-reply-all:before,
+.#{$fa-css-prefix}-reply-all:before { content: $fa-var-reply-all; }
+.#{$fa-css-prefix}-star-half-empty:before,
+.#{$fa-css-prefix}-star-half-full:before,
+.#{$fa-css-prefix}-star-half-o:before { content: $fa-var-star-half-o; }
+.#{$fa-css-prefix}-location-arrow:before { content: $fa-var-location-arrow; }
+.#{$fa-css-prefix}-crop:before { content: $fa-var-crop; }
+.#{$fa-css-prefix}-code-fork:before { content: $fa-var-code-fork; }
+.#{$fa-css-prefix}-unlink:before,
+.#{$fa-css-prefix}-chain-broken:before { content: $fa-var-chain-broken; }
+.#{$fa-css-prefix}-question:before { content: $fa-var-question; }
+.#{$fa-css-prefix}-info:before { content: $fa-var-info; }
+.#{$fa-css-prefix}-exclamation:before { content: $fa-var-exclamation; }
+.#{$fa-css-prefix}-superscript:before { content: $fa-var-superscript; }
+.#{$fa-css-prefix}-subscript:before { content: $fa-var-subscript; }
+.#{$fa-css-prefix}-eraser:before { content: $fa-var-eraser; }
+.#{$fa-css-prefix}-puzzle-piece:before { content: $fa-var-puzzle-piece; }
+.#{$fa-css-prefix}-microphone:before { content: $fa-var-microphone; }
+.#{$fa-css-prefix}-microphone-slash:before { content: $fa-var-microphone-slash; }
+.#{$fa-css-prefix}-shield:before { content: $fa-var-shield; }
+.#{$fa-css-prefix}-calendar-o:before { content: $fa-var-calendar-o; }
+.#{$fa-css-prefix}-fire-extinguisher:before { content: $fa-var-fire-extinguisher; }
+.#{$fa-css-prefix}-rocket:before { content: $fa-var-rocket; }
+.#{$fa-css-prefix}-maxcdn:before { content: $fa-var-maxcdn; }
+.#{$fa-css-prefix}-chevron-circle-left:before { content: $fa-var-chevron-circle-left; }
+.#{$fa-css-prefix}-chevron-circle-right:before { content: $fa-var-chevron-circle-right; }
+.#{$fa-css-prefix}-chevron-circle-up:before { content: $fa-var-chevron-circle-up; }
+.#{$fa-css-prefix}-chevron-circle-down:before { content: $fa-var-chevron-circle-down; }
+.#{$fa-css-prefix}-html5:before { content: $fa-var-html5; }
+.#{$fa-css-prefix}-css3:before { content: $fa-var-css3; }
+.#{$fa-css-prefix}-anchor:before { content: $fa-var-anchor; }
+.#{$fa-css-prefix}-unlock-alt:before { content: $fa-var-unlock-alt; }
+.#{$fa-css-prefix}-bullseye:before { content: $fa-var-bullseye; }
+.#{$fa-css-prefix}-ellipsis-h:before { content: $fa-var-ellipsis-h; }
+.#{$fa-css-prefix}-ellipsis-v:before { content: $fa-var-ellipsis-v; }
+.#{$fa-css-prefix}-rss-square:before { content: $fa-var-rss-square; }
+.#{$fa-css-prefix}-play-circle:before { content: $fa-var-play-circle; }
+.#{$fa-css-prefix}-ticket:before { content: $fa-var-ticket; }
+.#{$fa-css-prefix}-minus-square:before { content: $fa-var-minus-square; }
+.#{$fa-css-prefix}-minus-square-o:before { content: $fa-var-minus-square-o; }
+.#{$fa-css-prefix}-level-up:before { content: $fa-var-level-up; }
+.#{$fa-css-prefix}-level-down:before { content: $fa-var-level-down; }
+.#{$fa-css-prefix}-check-square:before { content: $fa-var-check-square; }
+.#{$fa-css-prefix}-pencil-square:before { content: $fa-var-pencil-square; }
+.#{$fa-css-prefix}-external-link-square:before { content: $fa-var-external-link-square; }
+.#{$fa-css-prefix}-share-square:before { content: $fa-var-share-square; }
+.#{$fa-css-prefix}-compass:before { content: $fa-var-compass; }
+.#{$fa-css-prefix}-toggle-down:before,
+.#{$fa-css-prefix}-caret-square-o-down:before { content: $fa-var-caret-square-o-down; }
+.#{$fa-css-prefix}-toggle-up:before,
+.#{$fa-css-prefix}-caret-square-o-up:before { content: $fa-var-caret-square-o-up; }
+.#{$fa-css-prefix}-toggle-right:before,
+.#{$fa-css-prefix}-caret-square-o-right:before { content: $fa-var-caret-square-o-right; }
+.#{$fa-css-prefix}-euro:before,
+.#{$fa-css-prefix}-eur:before { content: $fa-var-eur; }
+.#{$fa-css-prefix}-gbp:before { content: $fa-var-gbp; }
+.#{$fa-css-prefix}-dollar:before,
+.#{$fa-css-prefix}-usd:before { content: $fa-var-usd; }
+.#{$fa-css-prefix}-rupee:before,
+.#{$fa-css-prefix}-inr:before { content: $fa-var-inr; }
+.#{$fa-css-prefix}-cny:before,
+.#{$fa-css-prefix}-rmb:before,
+.#{$fa-css-prefix}-yen:before,
+.#{$fa-css-prefix}-jpy:before { content: $fa-var-jpy; }
+.#{$fa-css-prefix}-ruble:before,
+.#{$fa-css-prefix}-rouble:before,
+.#{$fa-css-prefix}-rub:before { content: $fa-var-rub; }
+.#{$fa-css-prefix}-won:before,
+.#{$fa-css-prefix}-krw:before { content: $fa-var-krw; }
+.#{$fa-css-prefix}-bitcoin:before,
+.#{$fa-css-prefix}-btc:before { content: $fa-var-btc; }
+.#{$fa-css-prefix}-file:before { content: $fa-var-file; }
+.#{$fa-css-prefix}-file-text:before { content: $fa-var-file-text; }
+.#{$fa-css-prefix}-sort-alpha-asc:before { content: $fa-var-sort-alpha-asc; }
+.#{$fa-css-prefix}-sort-alpha-desc:before { content: $fa-var-sort-alpha-desc; }
+.#{$fa-css-prefix}-sort-amount-asc:before { content: $fa-var-sort-amount-asc; }
+.#{$fa-css-prefix}-sort-amount-desc:before { content: $fa-var-sort-amount-desc; }
+.#{$fa-css-prefix}-sort-numeric-asc:before { content: $fa-var-sort-numeric-asc; }
+.#{$fa-css-prefix}-sort-numeric-desc:before { content: $fa-var-sort-numeric-desc; }
+.#{$fa-css-prefix}-thumbs-up:before { content: $fa-var-thumbs-up; }
+.#{$fa-css-prefix}-thumbs-down:before { content: $fa-var-thumbs-down; }
+.#{$fa-css-prefix}-youtube-square:before { content: $fa-var-youtube-square; }
+.#{$fa-css-prefix}-youtube:before { content: $fa-var-youtube; }
+.#{$fa-css-prefix}-xing:before { content: $fa-var-xing; }
+.#{$fa-css-prefix}-xing-square:before { content: $fa-var-xing-square; }
+.#{$fa-css-prefix}-youtube-play:before { content: $fa-var-youtube-play; }
+.#{$fa-css-prefix}-dropbox:before { content: $fa-var-dropbox; }
+.#{$fa-css-prefix}-stack-overflow:before { content: $fa-var-stack-overflow; }
+.#{$fa-css-prefix}-instagram:before { content: $fa-var-instagram; }
+.#{$fa-css-prefix}-flickr:before { content: $fa-var-flickr; }
+.#{$fa-css-prefix}-adn:before { content: $fa-var-adn; }
+.#{$fa-css-prefix}-bitbucket:before { content: $fa-var-bitbucket; }
+.#{$fa-css-prefix}-bitbucket-square:before { content: $fa-var-bitbucket-square; }
+.#{$fa-css-prefix}-tumblr:before { content: $fa-var-tumblr; }
+.#{$fa-css-prefix}-tumblr-square:before { content: $fa-var-tumblr-square; }
+.#{$fa-css-prefix}-long-arrow-down:before { content: $fa-var-long-arrow-down; }
+.#{$fa-css-prefix}-long-arrow-up:before { content: $fa-var-long-arrow-up; }
+.#{$fa-css-prefix}-long-arrow-left:before { content: $fa-var-long-arrow-left; }
+.#{$fa-css-prefix}-long-arrow-right:before { content: $fa-var-long-arrow-right; }
+.#{$fa-css-prefix}-apple:before { content: $fa-var-apple; }
+.#{$fa-css-prefix}-windows:before { content: $fa-var-windows; }
+.#{$fa-css-prefix}-android:before { content: $fa-var-android; }
+.#{$fa-css-prefix}-linux:before { content: $fa-var-linux; }
+.#{$fa-css-prefix}-dribbble:before { content: $fa-var-dribbble; }
+.#{$fa-css-prefix}-skype:before { content: $fa-var-skype; }
+.#{$fa-css-prefix}-foursquare:before { content: $fa-var-foursquare; }
+.#{$fa-css-prefix}-trello:before { content: $fa-var-trello; }
+.#{$fa-css-prefix}-female:before { content: $fa-var-female; }
+.#{$fa-css-prefix}-male:before { content: $fa-var-male; }
+.#{$fa-css-prefix}-gittip:before,
+.#{$fa-css-prefix}-gratipay:before { content: $fa-var-gratipay; }
+.#{$fa-css-prefix}-sun-o:before { content: $fa-var-sun-o; }
+.#{$fa-css-prefix}-moon-o:before { content: $fa-var-moon-o; }
+.#{$fa-css-prefix}-archive:before { content: $fa-var-archive; }
+.#{$fa-css-prefix}-bug:before { content: $fa-var-bug; }
+.#{$fa-css-prefix}-vk:before { content: $fa-var-vk; }
+.#{$fa-css-prefix}-weibo:before { content: $fa-var-weibo; }
+.#{$fa-css-prefix}-renren:before { content: $fa-var-renren; }
+.#{$fa-css-prefix}-pagelines:before { content: $fa-var-pagelines; }
+.#{$fa-css-prefix}-stack-exchange:before { content: $fa-var-stack-exchange; }
+.#{$fa-css-prefix}-arrow-circle-o-right:before { content: $fa-var-arrow-circle-o-right; }
+.#{$fa-css-prefix}-arrow-circle-o-left:before { content: $fa-var-arrow-circle-o-left; }
+.#{$fa-css-prefix}-toggle-left:before,
+.#{$fa-css-prefix}-caret-square-o-left:before { content: $fa-var-caret-square-o-left; }
+.#{$fa-css-prefix}-dot-circle-o:before { content: $fa-var-dot-circle-o; }
+.#{$fa-css-prefix}-wheelchair:before { content: $fa-var-wheelchair; }
+.#{$fa-css-prefix}-vimeo-square:before { content: $fa-var-vimeo-square; }
+.#{$fa-css-prefix}-turkish-lira:before,
+.#{$fa-css-prefix}-try:before { content: $fa-var-try; }
+.#{$fa-css-prefix}-plus-square-o:before { content: $fa-var-plus-square-o; }
+.#{$fa-css-prefix}-space-shuttle:before { content: $fa-var-space-shuttle; }
+.#{$fa-css-prefix}-slack:before { content: $fa-var-slack; }
+.#{$fa-css-prefix}-envelope-square:before { content: $fa-var-envelope-square; }
+.#{$fa-css-prefix}-wordpress:before { content: $fa-var-wordpress; }
+.#{$fa-css-prefix}-openid:before { content: $fa-var-openid; }
+.#{$fa-css-prefix}-institution:before,
+.#{$fa-css-prefix}-bank:before,
+.#{$fa-css-prefix}-university:before { content: $fa-var-university; }
+.#{$fa-css-prefix}-mortar-board:before,
+.#{$fa-css-prefix}-graduation-cap:before { content: $fa-var-graduation-cap; }
+.#{$fa-css-prefix}-yahoo:before { content: $fa-var-yahoo; }
+.#{$fa-css-prefix}-google:before { content: $fa-var-google; }
+.#{$fa-css-prefix}-reddit:before { content: $fa-var-reddit; }
+.#{$fa-css-prefix}-reddit-square:before { content: $fa-var-reddit-square; }
+.#{$fa-css-prefix}-stumbleupon-circle:before { content: $fa-var-stumbleupon-circle; }
+.#{$fa-css-prefix}-stumbleupon:before { content: $fa-var-stumbleupon; }
+.#{$fa-css-prefix}-delicious:before { content: $fa-var-delicious; }
+.#{$fa-css-prefix}-digg:before { content: $fa-var-digg; }
+.#{$fa-css-prefix}-pied-piper:before { content: $fa-var-pied-piper; }
+.#{$fa-css-prefix}-pied-piper-alt:before { content: $fa-var-pied-piper-alt; }
+.#{$fa-css-prefix}-drupal:before { content: $fa-var-drupal; }
+.#{$fa-css-prefix}-joomla:before { content: $fa-var-joomla; }
+.#{$fa-css-prefix}-language:before { content: $fa-var-language; }
+.#{$fa-css-prefix}-fax:before { content: $fa-var-fax; }
+.#{$fa-css-prefix}-building:before { content: $fa-var-building; }
+.#{$fa-css-prefix}-child:before { content: $fa-var-child; }
+.#{$fa-css-prefix}-paw:before { content: $fa-var-paw; }
+.#{$fa-css-prefix}-spoon:before { content: $fa-var-spoon; }
+.#{$fa-css-prefix}-cube:before { content: $fa-var-cube; }
+.#{$fa-css-prefix}-cubes:before { content: $fa-var-cubes; }
+.#{$fa-css-prefix}-behance:before { content: $fa-var-behance; }
+.#{$fa-css-prefix}-behance-square:before { content: $fa-var-behance-square; }
+.#{$fa-css-prefix}-steam:before { content: $fa-var-steam; }
+.#{$fa-css-prefix}-steam-square:before { content: $fa-var-steam-square; }
+.#{$fa-css-prefix}-recycle:before { content: $fa-var-recycle; }
+.#{$fa-css-prefix}-automobile:before,
+.#{$fa-css-prefix}-car:before { content: $fa-var-car; }
+.#{$fa-css-prefix}-cab:before,
+.#{$fa-css-prefix}-taxi:before { content: $fa-var-taxi; }
+.#{$fa-css-prefix}-tree:before { content: $fa-var-tree; }
+.#{$fa-css-prefix}-spotify:before { content: $fa-var-spotify; }
+.#{$fa-css-prefix}-deviantart:before { content: $fa-var-deviantart; }
+.#{$fa-css-prefix}-soundcloud:before { content: $fa-var-soundcloud; }
+.#{$fa-css-prefix}-database:before { content: $fa-var-database; }
+.#{$fa-css-prefix}-file-pdf-o:before { content: $fa-var-file-pdf-o; }
+.#{$fa-css-prefix}-file-word-o:before { content: $fa-var-file-word-o; }
+.#{$fa-css-prefix}-file-excel-o:before { content: $fa-var-file-excel-o; }
+.#{$fa-css-prefix}-file-powerpoint-o:before { content: $fa-var-file-powerpoint-o; }
+.#{$fa-css-prefix}-file-photo-o:before,
+.#{$fa-css-prefix}-file-picture-o:before,
+.#{$fa-css-prefix}-file-image-o:before { content: $fa-var-file-image-o; }
+.#{$fa-css-prefix}-file-zip-o:before,
+.#{$fa-css-prefix}-file-archive-o:before { content: $fa-var-file-archive-o; }
+.#{$fa-css-prefix}-file-sound-o:before,
+.#{$fa-css-prefix}-file-audio-o:before { content: $fa-var-file-audio-o; }
+.#{$fa-css-prefix}-file-movie-o:before,
+.#{$fa-css-prefix}-file-video-o:before { content: $fa-var-file-video-o; }
+.#{$fa-css-prefix}-file-code-o:before { content: $fa-var-file-code-o; }
+.#{$fa-css-prefix}-vine:before { content: $fa-var-vine; }
+.#{$fa-css-prefix}-codepen:before { content: $fa-var-codepen; }
+.#{$fa-css-prefix}-jsfiddle:before { content: $fa-var-jsfiddle; }
+.#{$fa-css-prefix}-life-bouy:before,
+.#{$fa-css-prefix}-life-buoy:before,
+.#{$fa-css-prefix}-life-saver:before,
+.#{$fa-css-prefix}-support:before,
+.#{$fa-css-prefix}-life-ring:before { content: $fa-var-life-ring; }
+.#{$fa-css-prefix}-circle-o-notch:before { content: $fa-var-circle-o-notch; }
+.#{$fa-css-prefix}-ra:before,
+.#{$fa-css-prefix}-rebel:before { content: $fa-var-rebel; }
+.#{$fa-css-prefix}-ge:before,
+.#{$fa-css-prefix}-empire:before { content: $fa-var-empire; }
+.#{$fa-css-prefix}-git-square:before { content: $fa-var-git-square; }
+.#{$fa-css-prefix}-git:before { content: $fa-var-git; }
+.#{$fa-css-prefix}-y-combinator-square:before,
+.#{$fa-css-prefix}-yc-square:before,
+.#{$fa-css-prefix}-hacker-news:before { content: $fa-var-hacker-news; }
+.#{$fa-css-prefix}-tencent-weibo:before { content: $fa-var-tencent-weibo; }
+.#{$fa-css-prefix}-qq:before { content: $fa-var-qq; }
+.#{$fa-css-prefix}-wechat:before,
+.#{$fa-css-prefix}-weixin:before { content: $fa-var-weixin; }
+.#{$fa-css-prefix}-send:before,
+.#{$fa-css-prefix}-paper-plane:before { content: $fa-var-paper-plane; }
+.#{$fa-css-prefix}-send-o:before,
+.#{$fa-css-prefix}-paper-plane-o:before { content: $fa-var-paper-plane-o; }
+.#{$fa-css-prefix}-history:before { content: $fa-var-history; }
+.#{$fa-css-prefix}-circle-thin:before { content: $fa-var-circle-thin; }
+.#{$fa-css-prefix}-header:before { content: $fa-var-header; }
+.#{$fa-css-prefix}-paragraph:before { content: $fa-var-paragraph; }
+.#{$fa-css-prefix}-sliders:before { content: $fa-var-sliders; }
+.#{$fa-css-prefix}-share-alt:before { content: $fa-var-share-alt; }
+.#{$fa-css-prefix}-share-alt-square:before { content: $fa-var-share-alt-square; }
+.#{$fa-css-prefix}-bomb:before { content: $fa-var-bomb; }
+.#{$fa-css-prefix}-soccer-ball-o:before,
+.#{$fa-css-prefix}-futbol-o:before { content: $fa-var-futbol-o; }
+.#{$fa-css-prefix}-tty:before { content: $fa-var-tty; }
+.#{$fa-css-prefix}-binoculars:before { content: $fa-var-binoculars; }
+.#{$fa-css-prefix}-plug:before { content: $fa-var-plug; }
+.#{$fa-css-prefix}-slideshare:before { content: $fa-var-slideshare; }
+.#{$fa-css-prefix}-twitch:before { content: $fa-var-twitch; }
+.#{$fa-css-prefix}-yelp:before { content: $fa-var-yelp; }
+.#{$fa-css-prefix}-newspaper-o:before { content: $fa-var-newspaper-o; }
+.#{$fa-css-prefix}-wifi:before { content: $fa-var-wifi; }
+.#{$fa-css-prefix}-calculator:before { content: $fa-var-calculator; }
+.#{$fa-css-prefix}-paypal:before { content: $fa-var-paypal; }
+.#{$fa-css-prefix}-google-wallet:before { content: $fa-var-google-wallet; }
+.#{$fa-css-prefix}-cc-visa:before { content: $fa-var-cc-visa; }
+.#{$fa-css-prefix}-cc-mastercard:before { content: $fa-var-cc-mastercard; }
+.#{$fa-css-prefix}-cc-discover:before { content: $fa-var-cc-discover; }
+.#{$fa-css-prefix}-cc-amex:before { content: $fa-var-cc-amex; }
+.#{$fa-css-prefix}-cc-paypal:before { content: $fa-var-cc-paypal; }
+.#{$fa-css-prefix}-cc-stripe:before { content: $fa-var-cc-stripe; }
+.#{$fa-css-prefix}-bell-slash:before { content: $fa-var-bell-slash; }
+.#{$fa-css-prefix}-bell-slash-o:before { content: $fa-var-bell-slash-o; }
+.#{$fa-css-prefix}-trash:before { content: $fa-var-trash; }
+.#{$fa-css-prefix}-copyright:before { content: $fa-var-copyright; }
+.#{$fa-css-prefix}-at:before { content: $fa-var-at; }
+.#{$fa-css-prefix}-eyedropper:before { content: $fa-var-eyedropper; }
+.#{$fa-css-prefix}-paint-brush:before { content: $fa-var-paint-brush; }
+.#{$fa-css-prefix}-birthday-cake:before { content: $fa-var-birthday-cake; }
+.#{$fa-css-prefix}-area-chart:before { content: $fa-var-area-chart; }
+.#{$fa-css-prefix}-pie-chart:before { content: $fa-var-pie-chart; }
+.#{$fa-css-prefix}-line-chart:before { content: $fa-var-line-chart; }
+.#{$fa-css-prefix}-lastfm:before { content: $fa-var-lastfm; }
+.#{$fa-css-prefix}-lastfm-square:before { content: $fa-var-lastfm-square; }
+.#{$fa-css-prefix}-toggle-off:before { content: $fa-var-toggle-off; }
+.#{$fa-css-prefix}-toggle-on:before { content: $fa-var-toggle-on; }
+.#{$fa-css-prefix}-bicycle:before { content: $fa-var-bicycle; }
+.#{$fa-css-prefix}-bus:before { content: $fa-var-bus; }
+.#{$fa-css-prefix}-ioxhost:before { content: $fa-var-ioxhost; }
+.#{$fa-css-prefix}-angellist:before { content: $fa-var-angellist; }
+.#{$fa-css-prefix}-cc:before { content: $fa-var-cc; }
+.#{$fa-css-prefix}-shekel:before,
+.#{$fa-css-prefix}-sheqel:before,
+.#{$fa-css-prefix}-ils:before { content: $fa-var-ils; }
+.#{$fa-css-prefix}-meanpath:before { content: $fa-var-meanpath; }
+.#{$fa-css-prefix}-buysellads:before { content: $fa-var-buysellads; }
+.#{$fa-css-prefix}-connectdevelop:before { content: $fa-var-connectdevelop; }
+.#{$fa-css-prefix}-dashcube:before { content: $fa-var-dashcube; }
+.#{$fa-css-prefix}-forumbee:before { content: $fa-var-forumbee; }
+.#{$fa-css-prefix}-leanpub:before { content: $fa-var-leanpub; }
+.#{$fa-css-prefix}-sellsy:before { content: $fa-var-sellsy; }
+.#{$fa-css-prefix}-shirtsinbulk:before { content: $fa-var-shirtsinbulk; }
+.#{$fa-css-prefix}-simplybuilt:before { content: $fa-var-simplybuilt; }
+.#{$fa-css-prefix}-skyatlas:before { content: $fa-var-skyatlas; }
+.#{$fa-css-prefix}-cart-plus:before { content: $fa-var-cart-plus; }
+.#{$fa-css-prefix}-cart-arrow-down:before { content: $fa-var-cart-arrow-down; }
+.#{$fa-css-prefix}-diamond:before { content: $fa-var-diamond; }
+.#{$fa-css-prefix}-ship:before { content: $fa-var-ship; }
+.#{$fa-css-prefix}-user-secret:before { content: $fa-var-user-secret; }
+.#{$fa-css-prefix}-motorcycle:before { content: $fa-var-motorcycle; }
+.#{$fa-css-prefix}-street-view:before { content: $fa-var-street-view; }
+.#{$fa-css-prefix}-heartbeat:before { content: $fa-var-heartbeat; }
+.#{$fa-css-prefix}-venus:before { content: $fa-var-venus; }
+.#{$fa-css-prefix}-mars:before { content: $fa-var-mars; }
+.#{$fa-css-prefix}-mercury:before { content: $fa-var-mercury; }
+.#{$fa-css-prefix}-intersex:before,
+.#{$fa-css-prefix}-transgender:before { content: $fa-var-transgender; }
+.#{$fa-css-prefix}-transgender-alt:before { content: $fa-var-transgender-alt; }
+.#{$fa-css-prefix}-venus-double:before { content: $fa-var-venus-double; }
+.#{$fa-css-prefix}-mars-double:before { content: $fa-var-mars-double; }
+.#{$fa-css-prefix}-venus-mars:before { content: $fa-var-venus-mars; }
+.#{$fa-css-prefix}-mars-stroke:before { content: $fa-var-mars-stroke; }
+.#{$fa-css-prefix}-mars-stroke-v:before { content: $fa-var-mars-stroke-v; }
+.#{$fa-css-prefix}-mars-stroke-h:before { content: $fa-var-mars-stroke-h; }
+.#{$fa-css-prefix}-neuter:before { content: $fa-var-neuter; }
+.#{$fa-css-prefix}-genderless:before { content: $fa-var-genderless; }
+.#{$fa-css-prefix}-facebook-official:before { content: $fa-var-facebook-official; }
+.#{$fa-css-prefix}-pinterest-p:before { content: $fa-var-pinterest-p; }
+.#{$fa-css-prefix}-whatsapp:before { content: $fa-var-whatsapp; }
+.#{$fa-css-prefix}-server:before { content: $fa-var-server; }
+.#{$fa-css-prefix}-user-plus:before { content: $fa-var-user-plus; }
+.#{$fa-css-prefix}-user-times:before { content: $fa-var-user-times; }
+.#{$fa-css-prefix}-hotel:before,
+.#{$fa-css-prefix}-bed:before { content: $fa-var-bed; }
+.#{$fa-css-prefix}-viacoin:before { content: $fa-var-viacoin; }
+.#{$fa-css-prefix}-train:before { content: $fa-var-train; }
+.#{$fa-css-prefix}-subway:before { content: $fa-var-subway; }
+.#{$fa-css-prefix}-medium:before { content: $fa-var-medium; }
+.#{$fa-css-prefix}-yc:before,
+.#{$fa-css-prefix}-y-combinator:before { content: $fa-var-y-combinator; }
+.#{$fa-css-prefix}-optin-monster:before { content: $fa-var-optin-monster; }
+.#{$fa-css-prefix}-opencart:before { content: $fa-var-opencart; }
+.#{$fa-css-prefix}-expeditedssl:before { content: $fa-var-expeditedssl; }
+.#{$fa-css-prefix}-battery-4:before,
+.#{$fa-css-prefix}-battery-full:before { content: $fa-var-battery-full; }
+.#{$fa-css-prefix}-battery-3:before,
+.#{$fa-css-prefix}-battery-three-quarters:before { content: $fa-var-battery-three-quarters; }
+.#{$fa-css-prefix}-battery-2:before,
+.#{$fa-css-prefix}-battery-half:before { content: $fa-var-battery-half; }
+.#{$fa-css-prefix}-battery-1:before,
+.#{$fa-css-prefix}-battery-quarter:before { content: $fa-var-battery-quarter; }
+.#{$fa-css-prefix}-battery-0:before,
+.#{$fa-css-prefix}-battery-empty:before { content: $fa-var-battery-empty; }
+.#{$fa-css-prefix}-mouse-pointer:before { content: $fa-var-mouse-pointer; }
+.#{$fa-css-prefix}-i-cursor:before { content: $fa-var-i-cursor; }
+.#{$fa-css-prefix}-object-group:before { content: $fa-var-object-group; }
+.#{$fa-css-prefix}-object-ungroup:before { content: $fa-var-object-ungroup; }
+.#{$fa-css-prefix}-sticky-note:before { content: $fa-var-sticky-note; }
+.#{$fa-css-prefix}-sticky-note-o:before { content: $fa-var-sticky-note-o; }
+.#{$fa-css-prefix}-cc-jcb:before { content: $fa-var-cc-jcb; }
+.#{$fa-css-prefix}-cc-diners-club:before { content: $fa-var-cc-diners-club; }
+.#{$fa-css-prefix}-clone:before { content: $fa-var-clone; }
+.#{$fa-css-prefix}-balance-scale:before { content: $fa-var-balance-scale; }
+.#{$fa-css-prefix}-hourglass-o:before { content: $fa-var-hourglass-o; }
+.#{$fa-css-prefix}-hourglass-1:before,
+.#{$fa-css-prefix}-hourglass-start:before { content: $fa-var-hourglass-start; }
+.#{$fa-css-prefix}-hourglass-2:before,
+.#{$fa-css-prefix}-hourglass-half:before { content: $fa-var-hourglass-half; }
+.#{$fa-css-prefix}-hourglass-3:before,
+.#{$fa-css-prefix}-hourglass-end:before { content: $fa-var-hourglass-end; }
+.#{$fa-css-prefix}-hourglass:before { content: $fa-var-hourglass; }
+.#{$fa-css-prefix}-hand-grab-o:before,
+.#{$fa-css-prefix}-hand-rock-o:before { content: $fa-var-hand-rock-o; }
+.#{$fa-css-prefix}-hand-stop-o:before,
+.#{$fa-css-prefix}-hand-paper-o:before { content: $fa-var-hand-paper-o; }
+.#{$fa-css-prefix}-hand-scissors-o:before { content: $fa-var-hand-scissors-o; }
+.#{$fa-css-prefix}-hand-lizard-o:before { content: $fa-var-hand-lizard-o; }
+.#{$fa-css-prefix}-hand-spock-o:before { content: $fa-var-hand-spock-o; }
+.#{$fa-css-prefix}-hand-pointer-o:before { content: $fa-var-hand-pointer-o; }
+.#{$fa-css-prefix}-hand-peace-o:before { content: $fa-var-hand-peace-o; }
+.#{$fa-css-prefix}-trademark:before { content: $fa-var-trademark; }
+.#{$fa-css-prefix}-registered:before { content: $fa-var-registered; }
+.#{$fa-css-prefix}-creative-commons:before { content: $fa-var-creative-commons; }
+.#{$fa-css-prefix}-gg:before { content: $fa-var-gg; }
+.#{$fa-css-prefix}-gg-circle:before { content: $fa-var-gg-circle; }
+.#{$fa-css-prefix}-tripadvisor:before { content: $fa-var-tripadvisor; }
+.#{$fa-css-prefix}-odnoklassniki:before { content: $fa-var-odnoklassniki; }
+.#{$fa-css-prefix}-odnoklassniki-square:before { content: $fa-var-odnoklassniki-square; }
+.#{$fa-css-prefix}-get-pocket:before { content: $fa-var-get-pocket; }
+.#{$fa-css-prefix}-wikipedia-w:before { content: $fa-var-wikipedia-w; }
+.#{$fa-css-prefix}-safari:before { content: $fa-var-safari; }
+.#{$fa-css-prefix}-chrome:before { content: $fa-var-chrome; }
+.#{$fa-css-prefix}-firefox:before { content: $fa-var-firefox; }
+.#{$fa-css-prefix}-opera:before { content: $fa-var-opera; }
+.#{$fa-css-prefix}-internet-explorer:before { content: $fa-var-internet-explorer; }
+.#{$fa-css-prefix}-tv:before,
+.#{$fa-css-prefix}-television:before { content: $fa-var-television; }
+.#{$fa-css-prefix}-contao:before { content: $fa-var-contao; }
+.#{$fa-css-prefix}-500px:before { content: $fa-var-500px; }
+.#{$fa-css-prefix}-amazon:before { content: $fa-var-amazon; }
+.#{$fa-css-prefix}-calendar-plus-o:before { content: $fa-var-calendar-plus-o; }
+.#{$fa-css-prefix}-calendar-minus-o:before { content: $fa-var-calendar-minus-o; }
+.#{$fa-css-prefix}-calendar-times-o:before { content: $fa-var-calendar-times-o; }
+.#{$fa-css-prefix}-calendar-check-o:before { content: $fa-var-calendar-check-o; }
+.#{$fa-css-prefix}-industry:before { content: $fa-var-industry; }
+.#{$fa-css-prefix}-map-pin:before { content: $fa-var-map-pin; }
+.#{$fa-css-prefix}-map-signs:before { content: $fa-var-map-signs; }
+.#{$fa-css-prefix}-map-o:before { content: $fa-var-map-o; }
+.#{$fa-css-prefix}-map:before { content: $fa-var-map; }
+.#{$fa-css-prefix}-commenting:before { content: $fa-var-commenting; }
+.#{$fa-css-prefix}-commenting-o:before { content: $fa-var-commenting-o; }
+.#{$fa-css-prefix}-houzz:before { content: $fa-var-houzz; }
+.#{$fa-css-prefix}-vimeo:before { content: $fa-var-vimeo; }
+.#{$fa-css-prefix}-black-tie:before { content: $fa-var-black-tie; }
+.#{$fa-css-prefix}-fonticons:before { content: $fa-var-fonticons; }
+.#{$fa-css-prefix}-reddit-alien:before { content: $fa-var-reddit-alien; }
+.#{$fa-css-prefix}-edge:before { content: $fa-var-edge; }
+.#{$fa-css-prefix}-credit-card-alt:before { content: $fa-var-credit-card-alt; }
+.#{$fa-css-prefix}-codiepie:before { content: $fa-var-codiepie; }
+.#{$fa-css-prefix}-modx:before { content: $fa-var-modx; }
+.#{$fa-css-prefix}-fort-awesome:before { content: $fa-var-fort-awesome; }
+.#{$fa-css-prefix}-usb:before { content: $fa-var-usb; }
+.#{$fa-css-prefix}-product-hunt:before { content: $fa-var-product-hunt; }
+.#{$fa-css-prefix}-mixcloud:before { content: $fa-var-mixcloud; }
+.#{$fa-css-prefix}-scribd:before { content: $fa-var-scribd; }
+.#{$fa-css-prefix}-pause-circle:before { content: $fa-var-pause-circle; }
+.#{$fa-css-prefix}-pause-circle-o:before { content: $fa-var-pause-circle-o; }
+.#{$fa-css-prefix}-stop-circle:before { content: $fa-var-stop-circle; }
+.#{$fa-css-prefix}-stop-circle-o:before { content: $fa-var-stop-circle-o; }
+.#{$fa-css-prefix}-shopping-bag:before { content: $fa-var-shopping-bag; }
+.#{$fa-css-prefix}-shopping-basket:before { content: $fa-var-shopping-basket; }
+.#{$fa-css-prefix}-hashtag:before { content: $fa-var-hashtag; }
+.#{$fa-css-prefix}-bluetooth:before { content: $fa-var-bluetooth; }
+.#{$fa-css-prefix}-bluetooth-b:before { content: $fa-var-bluetooth-b; }
+.#{$fa-css-prefix}-percent:before { content: $fa-var-percent; }
diff --git a/src/usr/local/www/font-awesome/scss/_larger.scss b/src/usr/local/www/font-awesome/scss/_larger.scss
new file mode 100644
index 0000000..41e9a81
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_larger.scss
@@ -0,0 +1,13 @@
+// Icon Sizes
+// -------------------------
+
+/* makes the font 33% larger relative to the icon container */
+.#{$fa-css-prefix}-lg {
+ font-size: (4em / 3);
+ line-height: (3em / 4);
+ vertical-align: -15%;
+}
+.#{$fa-css-prefix}-2x { font-size: 2em; }
+.#{$fa-css-prefix}-3x { font-size: 3em; }
+.#{$fa-css-prefix}-4x { font-size: 4em; }
+.#{$fa-css-prefix}-5x { font-size: 5em; }
diff --git a/src/usr/local/www/font-awesome/scss/_list.scss b/src/usr/local/www/font-awesome/scss/_list.scss
new file mode 100644
index 0000000..7d1e4d5
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_list.scss
@@ -0,0 +1,19 @@
+// List Icons
+// -------------------------
+
+.#{$fa-css-prefix}-ul {
+ padding-left: 0;
+ margin-left: $fa-li-width;
+ list-style-type: none;
+ > li { position: relative; }
+}
+.#{$fa-css-prefix}-li {
+ position: absolute;
+ left: -$fa-li-width;
+ width: $fa-li-width;
+ top: (2em / 14);
+ text-align: center;
+ &.#{$fa-css-prefix}-lg {
+ left: -$fa-li-width + (4em / 14);
+ }
+}
diff --git a/src/usr/local/www/font-awesome/scss/_mixins.scss b/src/usr/local/www/font-awesome/scss/_mixins.scss
new file mode 100644
index 0000000..f96719b
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_mixins.scss
@@ -0,0 +1,26 @@
+// Mixins
+// --------------------------
+
+@mixin fa-icon() {
+ display: inline-block;
+ font: normal normal normal #{$fa-font-size-base}/#{$fa-line-height-base} FontAwesome; // shortening font declaration
+ font-size: inherit; // can't have font-size inherit on line above, so need to override
+ text-rendering: auto; // optimizelegibility throws things off #1094
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+
+}
+
+@mixin fa-icon-rotate($degrees, $rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
+ -webkit-transform: rotate($degrees);
+ -ms-transform: rotate($degrees);
+ transform: rotate($degrees);
+}
+
+@mixin fa-icon-flip($horiz, $vert, $rotation) {
+ filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
+ -webkit-transform: scale($horiz, $vert);
+ -ms-transform: scale($horiz, $vert);
+ transform: scale($horiz, $vert);
+}
diff --git a/src/usr/local/www/font-awesome/scss/_path.scss b/src/usr/local/www/font-awesome/scss/_path.scss
new file mode 100644
index 0000000..bb457c2
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_path.scss
@@ -0,0 +1,15 @@
+/* FONT PATH
+ * -------------------------- */
+
+@font-face {
+ font-family: 'FontAwesome';
+ src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}');
+ src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'),
+ url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'),
+ url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'),
+ url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'),
+ url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg');
+// src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts
+ font-weight: normal;
+ font-style: normal;
+}
diff --git a/src/usr/local/www/font-awesome/scss/_rotated-flipped.scss b/src/usr/local/www/font-awesome/scss/_rotated-flipped.scss
new file mode 100644
index 0000000..a3558fd
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_rotated-flipped.scss
@@ -0,0 +1,20 @@
+// Rotated & Flipped Icons
+// -------------------------
+
+.#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); }
+.#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); }
+.#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); }
+
+.#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); }
+.#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); }
+
+// Hook for IE8-9
+// -------------------------
+
+:root .#{$fa-css-prefix}-rotate-90,
+:root .#{$fa-css-prefix}-rotate-180,
+:root .#{$fa-css-prefix}-rotate-270,
+:root .#{$fa-css-prefix}-flip-horizontal,
+:root .#{$fa-css-prefix}-flip-vertical {
+ filter: none;
+}
diff --git a/src/usr/local/www/font-awesome/scss/_stacked.scss b/src/usr/local/www/font-awesome/scss/_stacked.scss
new file mode 100644
index 0000000..aef7403
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_stacked.scss
@@ -0,0 +1,20 @@
+// Stacked Icons
+// -------------------------
+
+.#{$fa-css-prefix}-stack {
+ position: relative;
+ display: inline-block;
+ width: 2em;
+ height: 2em;
+ line-height: 2em;
+ vertical-align: middle;
+}
+.#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x {
+ position: absolute;
+ left: 0;
+ width: 100%;
+ text-align: center;
+}
+.#{$fa-css-prefix}-stack-1x { line-height: inherit; }
+.#{$fa-css-prefix}-stack-2x { font-size: 2em; }
+.#{$fa-css-prefix}-inverse { color: $fa-inverse; }
diff --git a/src/usr/local/www/font-awesome/scss/_variables.scss b/src/usr/local/www/font-awesome/scss/_variables.scss
new file mode 100644
index 0000000..0a47110
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/_variables.scss
@@ -0,0 +1,708 @@
+// Variables
+// --------------------------
+
+$fa-font-path: "../fonts" !default;
+$fa-font-size-base: 14px !default;
+$fa-line-height-base: 1 !default;
+//$fa-font-path: "//netdna.bootstrapcdn.com/font-awesome/4.5.0/fonts" !default; // for referencing Bootstrap CDN font files directly
+$fa-css-prefix: fa !default;
+$fa-version: "4.5.0" !default;
+$fa-border-color: #eee !default;
+$fa-inverse: #fff !default;
+$fa-li-width: (30em / 14) !default;
+
+$fa-var-500px: "\f26e";
+$fa-var-adjust: "\f042";
+$fa-var-adn: "\f170";
+$fa-var-align-center: "\f037";
+$fa-var-align-justify: "\f039";
+$fa-var-align-left: "\f036";
+$fa-var-align-right: "\f038";
+$fa-var-amazon: "\f270";
+$fa-var-ambulance: "\f0f9";
+$fa-var-anchor: "\f13d";
+$fa-var-android: "\f17b";
+$fa-var-angellist: "\f209";
+$fa-var-angle-double-down: "\f103";
+$fa-var-angle-double-left: "\f100";
+$fa-var-angle-double-right: "\f101";
+$fa-var-angle-double-up: "\f102";
+$fa-var-angle-down: "\f107";
+$fa-var-angle-left: "\f104";
+$fa-var-angle-right: "\f105";
+$fa-var-angle-up: "\f106";
+$fa-var-apple: "\f179";
+$fa-var-archive: "\f187";
+$fa-var-area-chart: "\f1fe";
+$fa-var-arrow-circle-down: "\f0ab";
+$fa-var-arrow-circle-left: "\f0a8";
+$fa-var-arrow-circle-o-down: "\f01a";
+$fa-var-arrow-circle-o-left: "\f190";
+$fa-var-arrow-circle-o-right: "\f18e";
+$fa-var-arrow-circle-o-up: "\f01b";
+$fa-var-arrow-circle-right: "\f0a9";
+$fa-var-arrow-circle-up: "\f0aa";
+$fa-var-arrow-down: "\f063";
+$fa-var-arrow-left: "\f060";
+$fa-var-arrow-right: "\f061";
+$fa-var-arrow-up: "\f062";
+$fa-var-arrows: "\f047";
+$fa-var-arrows-alt: "\f0b2";
+$fa-var-arrows-h: "\f07e";
+$fa-var-arrows-v: "\f07d";
+$fa-var-asterisk: "\f069";
+$fa-var-at: "\f1fa";
+$fa-var-automobile: "\f1b9";
+$fa-var-backward: "\f04a";
+$fa-var-balance-scale: "\f24e";
+$fa-var-ban: "\f05e";
+$fa-var-bank: "\f19c";
+$fa-var-bar-chart: "\f080";
+$fa-var-bar-chart-o: "\f080";
+$fa-var-barcode: "\f02a";
+$fa-var-bars: "\f0c9";
+$fa-var-battery-0: "\f244";
+$fa-var-battery-1: "\f243";
+$fa-var-battery-2: "\f242";
+$fa-var-battery-3: "\f241";
+$fa-var-battery-4: "\f240";
+$fa-var-battery-empty: "\f244";
+$fa-var-battery-full: "\f240";
+$fa-var-battery-half: "\f242";
+$fa-var-battery-quarter: "\f243";
+$fa-var-battery-three-quarters: "\f241";
+$fa-var-bed: "\f236";
+$fa-var-beer: "\f0fc";
+$fa-var-behance: "\f1b4";
+$fa-var-behance-square: "\f1b5";
+$fa-var-bell: "\f0f3";
+$fa-var-bell-o: "\f0a2";
+$fa-var-bell-slash: "\f1f6";
+$fa-var-bell-slash-o: "\f1f7";
+$fa-var-bicycle: "\f206";
+$fa-var-binoculars: "\f1e5";
+$fa-var-birthday-cake: "\f1fd";
+$fa-var-bitbucket: "\f171";
+$fa-var-bitbucket-square: "\f172";
+$fa-var-bitcoin: "\f15a";
+$fa-var-black-tie: "\f27e";
+$fa-var-bluetooth: "\f293";
+$fa-var-bluetooth-b: "\f294";
+$fa-var-bold: "\f032";
+$fa-var-bolt: "\f0e7";
+$fa-var-bomb: "\f1e2";
+$fa-var-book: "\f02d";
+$fa-var-bookmark: "\f02e";
+$fa-var-bookmark-o: "\f097";
+$fa-var-briefcase: "\f0b1";
+$fa-var-btc: "\f15a";
+$fa-var-bug: "\f188";
+$fa-var-building: "\f1ad";
+$fa-var-building-o: "\f0f7";
+$fa-var-bullhorn: "\f0a1";
+$fa-var-bullseye: "\f140";
+$fa-var-bus: "\f207";
+$fa-var-buysellads: "\f20d";
+$fa-var-cab: "\f1ba";
+$fa-var-calculator: "\f1ec";
+$fa-var-calendar: "\f073";
+$fa-var-calendar-check-o: "\f274";
+$fa-var-calendar-minus-o: "\f272";
+$fa-var-calendar-o: "\f133";
+$fa-var-calendar-plus-o: "\f271";
+$fa-var-calendar-times-o: "\f273";
+$fa-var-camera: "\f030";
+$fa-var-camera-retro: "\f083";
+$fa-var-car: "\f1b9";
+$fa-var-caret-down: "\f0d7";
+$fa-var-caret-left: "\f0d9";
+$fa-var-caret-right: "\f0da";
+$fa-var-caret-square-o-down: "\f150";
+$fa-var-caret-square-o-left: "\f191";
+$fa-var-caret-square-o-right: "\f152";
+$fa-var-caret-square-o-up: "\f151";
+$fa-var-caret-up: "\f0d8";
+$fa-var-cart-arrow-down: "\f218";
+$fa-var-cart-plus: "\f217";
+$fa-var-cc: "\f20a";
+$fa-var-cc-amex: "\f1f3";
+$fa-var-cc-diners-club: "\f24c";
+$fa-var-cc-discover: "\f1f2";
+$fa-var-cc-jcb: "\f24b";
+$fa-var-cc-mastercard: "\f1f1";
+$fa-var-cc-paypal: "\f1f4";
+$fa-var-cc-stripe: "\f1f5";
+$fa-var-cc-visa: "\f1f0";
+$fa-var-certificate: "\f0a3";
+$fa-var-chain: "\f0c1";
+$fa-var-chain-broken: "\f127";
+$fa-var-check: "\f00c";
+$fa-var-check-circle: "\f058";
+$fa-var-check-circle-o: "\f05d";
+$fa-var-check-square: "\f14a";
+$fa-var-check-square-o: "\f046";
+$fa-var-chevron-circle-down: "\f13a";
+$fa-var-chevron-circle-left: "\f137";
+$fa-var-chevron-circle-right: "\f138";
+$fa-var-chevron-circle-up: "\f139";
+$fa-var-chevron-down: "\f078";
+$fa-var-chevron-left: "\f053";
+$fa-var-chevron-right: "\f054";
+$fa-var-chevron-up: "\f077";
+$fa-var-child: "\f1ae";
+$fa-var-chrome: "\f268";
+$fa-var-circle: "\f111";
+$fa-var-circle-o: "\f10c";
+$fa-var-circle-o-notch: "\f1ce";
+$fa-var-circle-thin: "\f1db";
+$fa-var-clipboard: "\f0ea";
+$fa-var-clock-o: "\f017";
+$fa-var-clone: "\f24d";
+$fa-var-close: "\f00d";
+$fa-var-cloud: "\f0c2";
+$fa-var-cloud-download: "\f0ed";
+$fa-var-cloud-upload: "\f0ee";
+$fa-var-cny: "\f157";
+$fa-var-code: "\f121";
+$fa-var-code-fork: "\f126";
+$fa-var-codepen: "\f1cb";
+$fa-var-codiepie: "\f284";
+$fa-var-coffee: "\f0f4";
+$fa-var-cog: "\f013";
+$fa-var-cogs: "\f085";
+$fa-var-columns: "\f0db";
+$fa-var-comment: "\f075";
+$fa-var-comment-o: "\f0e5";
+$fa-var-commenting: "\f27a";
+$fa-var-commenting-o: "\f27b";
+$fa-var-comments: "\f086";
+$fa-var-comments-o: "\f0e6";
+$fa-var-compass: "\f14e";
+$fa-var-compress: "\f066";
+$fa-var-connectdevelop: "\f20e";
+$fa-var-contao: "\f26d";
+$fa-var-copy: "\f0c5";
+$fa-var-copyright: "\f1f9";
+$fa-var-creative-commons: "\f25e";
+$fa-var-credit-card: "\f09d";
+$fa-var-credit-card-alt: "\f283";
+$fa-var-crop: "\f125";
+$fa-var-crosshairs: "\f05b";
+$fa-var-css3: "\f13c";
+$fa-var-cube: "\f1b2";
+$fa-var-cubes: "\f1b3";
+$fa-var-cut: "\f0c4";
+$fa-var-cutlery: "\f0f5";
+$fa-var-dashboard: "\f0e4";
+$fa-var-dashcube: "\f210";
+$fa-var-database: "\f1c0";
+$fa-var-dedent: "\f03b";
+$fa-var-delicious: "\f1a5";
+$fa-var-desktop: "\f108";
+$fa-var-deviantart: "\f1bd";
+$fa-var-diamond: "\f219";
+$fa-var-digg: "\f1a6";
+$fa-var-dollar: "\f155";
+$fa-var-dot-circle-o: "\f192";
+$fa-var-download: "\f019";
+$fa-var-dribbble: "\f17d";
+$fa-var-dropbox: "\f16b";
+$fa-var-drupal: "\f1a9";
+$fa-var-edge: "\f282";
+$fa-var-edit: "\f044";
+$fa-var-eject: "\f052";
+$fa-var-ellipsis-h: "\f141";
+$fa-var-ellipsis-v: "\f142";
+$fa-var-empire: "\f1d1";
+$fa-var-envelope: "\f0e0";
+$fa-var-envelope-o: "\f003";
+$fa-var-envelope-square: "\f199";
+$fa-var-eraser: "\f12d";
+$fa-var-eur: "\f153";
+$fa-var-euro: "\f153";
+$fa-var-exchange: "\f0ec";
+$fa-var-exclamation: "\f12a";
+$fa-var-exclamation-circle: "\f06a";
+$fa-var-exclamation-triangle: "\f071";
+$fa-var-expand: "\f065";
+$fa-var-expeditedssl: "\f23e";
+$fa-var-external-link: "\f08e";
+$fa-var-external-link-square: "\f14c";
+$fa-var-eye: "\f06e";
+$fa-var-eye-slash: "\f070";
+$fa-var-eyedropper: "\f1fb";
+$fa-var-facebook: "\f09a";
+$fa-var-facebook-f: "\f09a";
+$fa-var-facebook-official: "\f230";
+$fa-var-facebook-square: "\f082";
+$fa-var-fast-backward: "\f049";
+$fa-var-fast-forward: "\f050";
+$fa-var-fax: "\f1ac";
+$fa-var-feed: "\f09e";
+$fa-var-female: "\f182";
+$fa-var-fighter-jet: "\f0fb";
+$fa-var-file: "\f15b";
+$fa-var-file-archive-o: "\f1c6";
+$fa-var-file-audio-o: "\f1c7";
+$fa-var-file-code-o: "\f1c9";
+$fa-var-file-excel-o: "\f1c3";
+$fa-var-file-image-o: "\f1c5";
+$fa-var-file-movie-o: "\f1c8";
+$fa-var-file-o: "\f016";
+$fa-var-file-pdf-o: "\f1c1";
+$fa-var-file-photo-o: "\f1c5";
+$fa-var-file-picture-o: "\f1c5";
+$fa-var-file-powerpoint-o: "\f1c4";
+$fa-var-file-sound-o: "\f1c7";
+$fa-var-file-text: "\f15c";
+$fa-var-file-text-o: "\f0f6";
+$fa-var-file-video-o: "\f1c8";
+$fa-var-file-word-o: "\f1c2";
+$fa-var-file-zip-o: "\f1c6";
+$fa-var-files-o: "\f0c5";
+$fa-var-film: "\f008";
+$fa-var-filter: "\f0b0";
+$fa-var-fire: "\f06d";
+$fa-var-fire-extinguisher: "\f134";
+$fa-var-firefox: "\f269";
+$fa-var-flag: "\f024";
+$fa-var-flag-checkered: "\f11e";
+$fa-var-flag-o: "\f11d";
+$fa-var-flash: "\f0e7";
+$fa-var-flask: "\f0c3";
+$fa-var-flickr: "\f16e";
+$fa-var-floppy-o: "\f0c7";
+$fa-var-folder: "\f07b";
+$fa-var-folder-o: "\f114";
+$fa-var-folder-open: "\f07c";
+$fa-var-folder-open-o: "\f115";
+$fa-var-font: "\f031";
+$fa-var-fonticons: "\f280";
+$fa-var-fort-awesome: "\f286";
+$fa-var-forumbee: "\f211";
+$fa-var-forward: "\f04e";
+$fa-var-foursquare: "\f180";
+$fa-var-frown-o: "\f119";
+$fa-var-futbol-o: "\f1e3";
+$fa-var-gamepad: "\f11b";
+$fa-var-gavel: "\f0e3";
+$fa-var-gbp: "\f154";
+$fa-var-ge: "\f1d1";
+$fa-var-gear: "\f013";
+$fa-var-gears: "\f085";
+$fa-var-genderless: "\f22d";
+$fa-var-get-pocket: "\f265";
+$fa-var-gg: "\f260";
+$fa-var-gg-circle: "\f261";
+$fa-var-gift: "\f06b";
+$fa-var-git: "\f1d3";
+$fa-var-git-square: "\f1d2";
+$fa-var-github: "\f09b";
+$fa-var-github-alt: "\f113";
+$fa-var-github-square: "\f092";
+$fa-var-gittip: "\f184";
+$fa-var-glass: "\f000";
+$fa-var-globe: "\f0ac";
+$fa-var-google: "\f1a0";
+$fa-var-google-plus: "\f0d5";
+$fa-var-google-plus-square: "\f0d4";
+$fa-var-google-wallet: "\f1ee";
+$fa-var-graduation-cap: "\f19d";
+$fa-var-gratipay: "\f184";
+$fa-var-group: "\f0c0";
+$fa-var-h-square: "\f0fd";
+$fa-var-hacker-news: "\f1d4";
+$fa-var-hand-grab-o: "\f255";
+$fa-var-hand-lizard-o: "\f258";
+$fa-var-hand-o-down: "\f0a7";
+$fa-var-hand-o-left: "\f0a5";
+$fa-var-hand-o-right: "\f0a4";
+$fa-var-hand-o-up: "\f0a6";
+$fa-var-hand-paper-o: "\f256";
+$fa-var-hand-peace-o: "\f25b";
+$fa-var-hand-pointer-o: "\f25a";
+$fa-var-hand-rock-o: "\f255";
+$fa-var-hand-scissors-o: "\f257";
+$fa-var-hand-spock-o: "\f259";
+$fa-var-hand-stop-o: "\f256";
+$fa-var-hashtag: "\f292";
+$fa-var-hdd-o: "\f0a0";
+$fa-var-header: "\f1dc";
+$fa-var-headphones: "\f025";
+$fa-var-heart: "\f004";
+$fa-var-heart-o: "\f08a";
+$fa-var-heartbeat: "\f21e";
+$fa-var-history: "\f1da";
+$fa-var-home: "\f015";
+$fa-var-hospital-o: "\f0f8";
+$fa-var-hotel: "\f236";
+$fa-var-hourglass: "\f254";
+$fa-var-hourglass-1: "\f251";
+$fa-var-hourglass-2: "\f252";
+$fa-var-hourglass-3: "\f253";
+$fa-var-hourglass-end: "\f253";
+$fa-var-hourglass-half: "\f252";
+$fa-var-hourglass-o: "\f250";
+$fa-var-hourglass-start: "\f251";
+$fa-var-houzz: "\f27c";
+$fa-var-html5: "\f13b";
+$fa-var-i-cursor: "\f246";
+$fa-var-ils: "\f20b";
+$fa-var-image: "\f03e";
+$fa-var-inbox: "\f01c";
+$fa-var-indent: "\f03c";
+$fa-var-industry: "\f275";
+$fa-var-info: "\f129";
+$fa-var-info-circle: "\f05a";
+$fa-var-inr: "\f156";
+$fa-var-instagram: "\f16d";
+$fa-var-institution: "\f19c";
+$fa-var-internet-explorer: "\f26b";
+$fa-var-intersex: "\f224";
+$fa-var-ioxhost: "\f208";
+$fa-var-italic: "\f033";
+$fa-var-joomla: "\f1aa";
+$fa-var-jpy: "\f157";
+$fa-var-jsfiddle: "\f1cc";
+$fa-var-key: "\f084";
+$fa-var-keyboard-o: "\f11c";
+$fa-var-krw: "\f159";
+$fa-var-language: "\f1ab";
+$fa-var-laptop: "\f109";
+$fa-var-lastfm: "\f202";
+$fa-var-lastfm-square: "\f203";
+$fa-var-leaf: "\f06c";
+$fa-var-leanpub: "\f212";
+$fa-var-legal: "\f0e3";
+$fa-var-lemon-o: "\f094";
+$fa-var-level-down: "\f149";
+$fa-var-level-up: "\f148";
+$fa-var-life-bouy: "\f1cd";
+$fa-var-life-buoy: "\f1cd";
+$fa-var-life-ring: "\f1cd";
+$fa-var-life-saver: "\f1cd";
+$fa-var-lightbulb-o: "\f0eb";
+$fa-var-line-chart: "\f201";
+$fa-var-link: "\f0c1";
+$fa-var-linkedin: "\f0e1";
+$fa-var-linkedin-square: "\f08c";
+$fa-var-linux: "\f17c";
+$fa-var-list: "\f03a";
+$fa-var-list-alt: "\f022";
+$fa-var-list-ol: "\f0cb";
+$fa-var-list-ul: "\f0ca";
+$fa-var-location-arrow: "\f124";
+$fa-var-lock: "\f023";
+$fa-var-long-arrow-down: "\f175";
+$fa-var-long-arrow-left: "\f177";
+$fa-var-long-arrow-right: "\f178";
+$fa-var-long-arrow-up: "\f176";
+$fa-var-magic: "\f0d0";
+$fa-var-magnet: "\f076";
+$fa-var-mail-forward: "\f064";
+$fa-var-mail-reply: "\f112";
+$fa-var-mail-reply-all: "\f122";
+$fa-var-male: "\f183";
+$fa-var-map: "\f279";
+$fa-var-map-marker: "\f041";
+$fa-var-map-o: "\f278";
+$fa-var-map-pin: "\f276";
+$fa-var-map-signs: "\f277";
+$fa-var-mars: "\f222";
+$fa-var-mars-double: "\f227";
+$fa-var-mars-stroke: "\f229";
+$fa-var-mars-stroke-h: "\f22b";
+$fa-var-mars-stroke-v: "\f22a";
+$fa-var-maxcdn: "\f136";
+$fa-var-meanpath: "\f20c";
+$fa-var-medium: "\f23a";
+$fa-var-medkit: "\f0fa";
+$fa-var-meh-o: "\f11a";
+$fa-var-mercury: "\f223";
+$fa-var-microphone: "\f130";
+$fa-var-microphone-slash: "\f131";
+$fa-var-minus: "\f068";
+$fa-var-minus-circle: "\f056";
+$fa-var-minus-square: "\f146";
+$fa-var-minus-square-o: "\f147";
+$fa-var-mixcloud: "\f289";
+$fa-var-mobile: "\f10b";
+$fa-var-mobile-phone: "\f10b";
+$fa-var-modx: "\f285";
+$fa-var-money: "\f0d6";
+$fa-var-moon-o: "\f186";
+$fa-var-mortar-board: "\f19d";
+$fa-var-motorcycle: "\f21c";
+$fa-var-mouse-pointer: "\f245";
+$fa-var-music: "\f001";
+$fa-var-navicon: "\f0c9";
+$fa-var-neuter: "\f22c";
+$fa-var-newspaper-o: "\f1ea";
+$fa-var-object-group: "\f247";
+$fa-var-object-ungroup: "\f248";
+$fa-var-odnoklassniki: "\f263";
+$fa-var-odnoklassniki-square: "\f264";
+$fa-var-opencart: "\f23d";
+$fa-var-openid: "\f19b";
+$fa-var-opera: "\f26a";
+$fa-var-optin-monster: "\f23c";
+$fa-var-outdent: "\f03b";
+$fa-var-pagelines: "\f18c";
+$fa-var-paint-brush: "\f1fc";
+$fa-var-paper-plane: "\f1d8";
+$fa-var-paper-plane-o: "\f1d9";
+$fa-var-paperclip: "\f0c6";
+$fa-var-paragraph: "\f1dd";
+$fa-var-paste: "\f0ea";
+$fa-var-pause: "\f04c";
+$fa-var-pause-circle: "\f28b";
+$fa-var-pause-circle-o: "\f28c";
+$fa-var-paw: "\f1b0";
+$fa-var-paypal: "\f1ed";
+$fa-var-pencil: "\f040";
+$fa-var-pencil-square: "\f14b";
+$fa-var-pencil-square-o: "\f044";
+$fa-var-percent: "\f295";
+$fa-var-phone: "\f095";
+$fa-var-phone-square: "\f098";
+$fa-var-photo: "\f03e";
+$fa-var-picture-o: "\f03e";
+$fa-var-pie-chart: "\f200";
+$fa-var-pied-piper: "\f1a7";
+$fa-var-pied-piper-alt: "\f1a8";
+$fa-var-pinterest: "\f0d2";
+$fa-var-pinterest-p: "\f231";
+$fa-var-pinterest-square: "\f0d3";
+$fa-var-plane: "\f072";
+$fa-var-play: "\f04b";
+$fa-var-play-circle: "\f144";
+$fa-var-play-circle-o: "\f01d";
+$fa-var-plug: "\f1e6";
+$fa-var-plus: "\f067";
+$fa-var-plus-circle: "\f055";
+$fa-var-plus-square: "\f0fe";
+$fa-var-plus-square-o: "\f196";
+$fa-var-power-off: "\f011";
+$fa-var-print: "\f02f";
+$fa-var-product-hunt: "\f288";
+$fa-var-puzzle-piece: "\f12e";
+$fa-var-qq: "\f1d6";
+$fa-var-qrcode: "\f029";
+$fa-var-question: "\f128";
+$fa-var-question-circle: "\f059";
+$fa-var-quote-left: "\f10d";
+$fa-var-quote-right: "\f10e";
+$fa-var-ra: "\f1d0";
+$fa-var-random: "\f074";
+$fa-var-rebel: "\f1d0";
+$fa-var-recycle: "\f1b8";
+$fa-var-reddit: "\f1a1";
+$fa-var-reddit-alien: "\f281";
+$fa-var-reddit-square: "\f1a2";
+$fa-var-refresh: "\f021";
+$fa-var-registered: "\f25d";
+$fa-var-remove: "\f00d";
+$fa-var-renren: "\f18b";
+$fa-var-reorder: "\f0c9";
+$fa-var-repeat: "\f01e";
+$fa-var-reply: "\f112";
+$fa-var-reply-all: "\f122";
+$fa-var-retweet: "\f079";
+$fa-var-rmb: "\f157";
+$fa-var-road: "\f018";
+$fa-var-rocket: "\f135";
+$fa-var-rotate-left: "\f0e2";
+$fa-var-rotate-right: "\f01e";
+$fa-var-rouble: "\f158";
+$fa-var-rss: "\f09e";
+$fa-var-rss-square: "\f143";
+$fa-var-rub: "\f158";
+$fa-var-ruble: "\f158";
+$fa-var-rupee: "\f156";
+$fa-var-safari: "\f267";
+$fa-var-save: "\f0c7";
+$fa-var-scissors: "\f0c4";
+$fa-var-scribd: "\f28a";
+$fa-var-search: "\f002";
+$fa-var-search-minus: "\f010";
+$fa-var-search-plus: "\f00e";
+$fa-var-sellsy: "\f213";
+$fa-var-send: "\f1d8";
+$fa-var-send-o: "\f1d9";
+$fa-var-server: "\f233";
+$fa-var-share: "\f064";
+$fa-var-share-alt: "\f1e0";
+$fa-var-share-alt-square: "\f1e1";
+$fa-var-share-square: "\f14d";
+$fa-var-share-square-o: "\f045";
+$fa-var-shekel: "\f20b";
+$fa-var-sheqel: "\f20b";
+$fa-var-shield: "\f132";
+$fa-var-ship: "\f21a";
+$fa-var-shirtsinbulk: "\f214";
+$fa-var-shopping-bag: "\f290";
+$fa-var-shopping-basket: "\f291";
+$fa-var-shopping-cart: "\f07a";
+$fa-var-sign-in: "\f090";
+$fa-var-sign-out: "\f08b";
+$fa-var-signal: "\f012";
+$fa-var-simplybuilt: "\f215";
+$fa-var-sitemap: "\f0e8";
+$fa-var-skyatlas: "\f216";
+$fa-var-skype: "\f17e";
+$fa-var-slack: "\f198";
+$fa-var-sliders: "\f1de";
+$fa-var-slideshare: "\f1e7";
+$fa-var-smile-o: "\f118";
+$fa-var-soccer-ball-o: "\f1e3";
+$fa-var-sort: "\f0dc";
+$fa-var-sort-alpha-asc: "\f15d";
+$fa-var-sort-alpha-desc: "\f15e";
+$fa-var-sort-amount-asc: "\f160";
+$fa-var-sort-amount-desc: "\f161";
+$fa-var-sort-asc: "\f0de";
+$fa-var-sort-desc: "\f0dd";
+$fa-var-sort-down: "\f0dd";
+$fa-var-sort-numeric-asc: "\f162";
+$fa-var-sort-numeric-desc: "\f163";
+$fa-var-sort-up: "\f0de";
+$fa-var-soundcloud: "\f1be";
+$fa-var-space-shuttle: "\f197";
+$fa-var-spinner: "\f110";
+$fa-var-spoon: "\f1b1";
+$fa-var-spotify: "\f1bc";
+$fa-var-square: "\f0c8";
+$fa-var-square-o: "\f096";
+$fa-var-stack-exchange: "\f18d";
+$fa-var-stack-overflow: "\f16c";
+$fa-var-star: "\f005";
+$fa-var-star-half: "\f089";
+$fa-var-star-half-empty: "\f123";
+$fa-var-star-half-full: "\f123";
+$fa-var-star-half-o: "\f123";
+$fa-var-star-o: "\f006";
+$fa-var-steam: "\f1b6";
+$fa-var-steam-square: "\f1b7";
+$fa-var-step-backward: "\f048";
+$fa-var-step-forward: "\f051";
+$fa-var-stethoscope: "\f0f1";
+$fa-var-sticky-note: "\f249";
+$fa-var-sticky-note-o: "\f24a";
+$fa-var-stop: "\f04d";
+$fa-var-stop-circle: "\f28d";
+$fa-var-stop-circle-o: "\f28e";
+$fa-var-street-view: "\f21d";
+$fa-var-strikethrough: "\f0cc";
+$fa-var-stumbleupon: "\f1a4";
+$fa-var-stumbleupon-circle: "\f1a3";
+$fa-var-subscript: "\f12c";
+$fa-var-subway: "\f239";
+$fa-var-suitcase: "\f0f2";
+$fa-var-sun-o: "\f185";
+$fa-var-superscript: "\f12b";
+$fa-var-support: "\f1cd";
+$fa-var-table: "\f0ce";
+$fa-var-tablet: "\f10a";
+$fa-var-tachometer: "\f0e4";
+$fa-var-tag: "\f02b";
+$fa-var-tags: "\f02c";
+$fa-var-tasks: "\f0ae";
+$fa-var-taxi: "\f1ba";
+$fa-var-television: "\f26c";
+$fa-var-tencent-weibo: "\f1d5";
+$fa-var-terminal: "\f120";
+$fa-var-text-height: "\f034";
+$fa-var-text-width: "\f035";
+$fa-var-th: "\f00a";
+$fa-var-th-large: "\f009";
+$fa-var-th-list: "\f00b";
+$fa-var-thumb-tack: "\f08d";
+$fa-var-thumbs-down: "\f165";
+$fa-var-thumbs-o-down: "\f088";
+$fa-var-thumbs-o-up: "\f087";
+$fa-var-thumbs-up: "\f164";
+$fa-var-ticket: "\f145";
+$fa-var-times: "\f00d";
+$fa-var-times-circle: "\f057";
+$fa-var-times-circle-o: "\f05c";
+$fa-var-tint: "\f043";
+$fa-var-toggle-down: "\f150";
+$fa-var-toggle-left: "\f191";
+$fa-var-toggle-off: "\f204";
+$fa-var-toggle-on: "\f205";
+$fa-var-toggle-right: "\f152";
+$fa-var-toggle-up: "\f151";
+$fa-var-trademark: "\f25c";
+$fa-var-train: "\f238";
+$fa-var-transgender: "\f224";
+$fa-var-transgender-alt: "\f225";
+$fa-var-trash: "\f1f8";
+$fa-var-trash-o: "\f014";
+$fa-var-tree: "\f1bb";
+$fa-var-trello: "\f181";
+$fa-var-tripadvisor: "\f262";
+$fa-var-trophy: "\f091";
+$fa-var-truck: "\f0d1";
+$fa-var-try: "\f195";
+$fa-var-tty: "\f1e4";
+$fa-var-tumblr: "\f173";
+$fa-var-tumblr-square: "\f174";
+$fa-var-turkish-lira: "\f195";
+$fa-var-tv: "\f26c";
+$fa-var-twitch: "\f1e8";
+$fa-var-twitter: "\f099";
+$fa-var-twitter-square: "\f081";
+$fa-var-umbrella: "\f0e9";
+$fa-var-underline: "\f0cd";
+$fa-var-undo: "\f0e2";
+$fa-var-university: "\f19c";
+$fa-var-unlink: "\f127";
+$fa-var-unlock: "\f09c";
+$fa-var-unlock-alt: "\f13e";
+$fa-var-unsorted: "\f0dc";
+$fa-var-upload: "\f093";
+$fa-var-usb: "\f287";
+$fa-var-usd: "\f155";
+$fa-var-user: "\f007";
+$fa-var-user-md: "\f0f0";
+$fa-var-user-plus: "\f234";
+$fa-var-user-secret: "\f21b";
+$fa-var-user-times: "\f235";
+$fa-var-users: "\f0c0";
+$fa-var-venus: "\f221";
+$fa-var-venus-double: "\f226";
+$fa-var-venus-mars: "\f228";
+$fa-var-viacoin: "\f237";
+$fa-var-video-camera: "\f03d";
+$fa-var-vimeo: "\f27d";
+$fa-var-vimeo-square: "\f194";
+$fa-var-vine: "\f1ca";
+$fa-var-vk: "\f189";
+$fa-var-volume-down: "\f027";
+$fa-var-volume-off: "\f026";
+$fa-var-volume-up: "\f028";
+$fa-var-warning: "\f071";
+$fa-var-wechat: "\f1d7";
+$fa-var-weibo: "\f18a";
+$fa-var-weixin: "\f1d7";
+$fa-var-whatsapp: "\f232";
+$fa-var-wheelchair: "\f193";
+$fa-var-wifi: "\f1eb";
+$fa-var-wikipedia-w: "\f266";
+$fa-var-windows: "\f17a";
+$fa-var-won: "\f159";
+$fa-var-wordpress: "\f19a";
+$fa-var-wrench: "\f0ad";
+$fa-var-xing: "\f168";
+$fa-var-xing-square: "\f169";
+$fa-var-y-combinator: "\f23b";
+$fa-var-y-combinator-square: "\f1d4";
+$fa-var-yahoo: "\f19e";
+$fa-var-yc: "\f23b";
+$fa-var-yc-square: "\f1d4";
+$fa-var-yelp: "\f1e9";
+$fa-var-yen: "\f157";
+$fa-var-youtube: "\f167";
+$fa-var-youtube-play: "\f16a";
+$fa-var-youtube-square: "\f166";
+
diff --git a/src/usr/local/www/font-awesome/scss/font-awesome.scss b/src/usr/local/www/font-awesome/scss/font-awesome.scss
new file mode 100644
index 0000000..f4668a5
--- /dev/null
+++ b/src/usr/local/www/font-awesome/scss/font-awesome.scss
@@ -0,0 +1,17 @@
+/*!
+ * Font Awesome 4.5.0 by @davegandy - http://fontawesome.io - @fontawesome
+ * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
+ */
+
+@import "variables";
+@import "mixins";
+@import "path";
+@import "core";
+@import "larger";
+@import "fixed-width";
+@import "list";
+@import "bordered-pulled";
+@import "animated";
+@import "rotated-flipped";
+@import "stacked";
+@import "icons";
diff --git a/src/usr/local/www/foot.inc b/src/usr/local/www/foot.inc
index 500474f..4f73507 100755
--- a/src/usr/local/www/foot.inc
+++ b/src/usr/local/www/foot.inc
@@ -1,6 +1,3 @@
- <!--
- pfSense_MODULE: footer
- -->
<?php
/*
* We put jquery in the footer; it is the preferred position for speed
@@ -12,9 +9,11 @@
<footer class="footer">
<div class="container">
<p class="text-muted">
+ <a id="tpl" style="display: none;" href="#" title="<?=gettext('Top of page')?>"><i class="fa fa-caret-square-o-up pull-left"></i></a>
<a target="_blank" href="<?=$g['product_website_footer']?>"><?=$g['product_name']?></a> is &copy;
<?=$g['product_copyright_years']?> by <a href="<?=$g['product_copyright_url']?>" class="tblnk"><?=$g['product_copyright']?></a>. All Rights Reserved.
[<a href="/license.php" class="tblnk">view license</a>]
+ <a id="tpr" style="display: none;" href="#" title="<?=gettext('Top of page')?>"><i class="fa fa-caret-square-o-up pull-right"></i></a>
</p>
</div>
</footer>
@@ -24,5 +23,15 @@
<script src="/bootstrap/js/bootstrap.min.js"></script>
<script src="/jquery/pfSense.js"></script>
<script src="/jquery/pfSenseHelpers.js"></script>
+ <script src="/sortable/sortable.js"></script>
+
+ <script type="text/javascript">
+ //<![CDATA[
+ // Un-hide the "Top of page" icons if the page is larger than the window
+ if ($(document).height() > $(window).height()) {
+ $('[id^=tp]').show();
+ }
+ //]]>
+ </script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/usr/local/www/getserviceproviders.php b/src/usr/local/www/getserviceproviders.php
index c38d356..406b148 100644
--- a/src/usr/local/www/getserviceproviders.php
+++ b/src/usr/local/www/getserviceproviders.php
@@ -2,13 +2,12 @@
/*
getserviceproviders.php
*/
-
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2010 Vinicius Coque <vinicius.coque@bluepex.com>
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -54,9 +53,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: ajax
-*/
##|+PRIV
##|*IDENT=page-getserviceproviders
diff --git a/src/usr/local/www/getstats.php b/src/usr/local/www/getstats.php
index 42f61bf..8b3dbda 100644
--- a/src/usr/local/www/getstats.php
+++ b/src/usr/local/www/getstats.php
@@ -3,11 +3,11 @@
getstats.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2009 Bill Marquette
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -53,9 +53,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: ajax
-*/
##|+PRIV
##|*IDENT=page-getstats
diff --git a/src/usr/local/www/graph.php b/src/usr/local/www/graph.php
index f9ccb98..0f3f421 100755
--- a/src/usr/local/www/graph.php
+++ b/src/usr/local/www/graph.php
@@ -3,12 +3,15 @@
graph.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2004-2006 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
* and Jonathan Watt <jwatt@jwatt.org>
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +19,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -54,13 +57,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: graph
-*/
##|+PRIV
##|*IDENT=page-diagnostics-interfacetraffic
-##|*NAME=Diagnostics: Interface Traffic page
+##|*NAME=Diagnostics: Interface Traffic
##|*DESCR=Allow access to the 'Diagnostics: Interface Traffic' page.
##|*MATCH=graph.php*
##|-PRIV
@@ -122,12 +122,6 @@ $width=200; //SVG internal width : do not modify
$fetch_link = "ifstats.php?if=" . htmlspecialchars($ifnum);
-/* check for custom theme colors */
-if (file_exists("/usr/local/www/themes/{$g['theme']}/graph.php")) {
- $themetxt = file_get_contents("/usr/local/www/themes/{$g['theme']}/graph.php");
- eval($themetxt);
-}
-
/********* Graph DATA **************/
print('<?xml version="1.0" encoding="UTF-8"?>' . "\n");?>
<svg width="100%" height="100%" viewBox="0 0 <?=$width?> <?=$height?>" preserveAspectRatio="none" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" onload="init(evt)">
diff --git a/src/usr/local/www/graph_cpu.php b/src/usr/local/www/graph_cpu.php
index 75b8ad7..23b6122 100644
--- a/src/usr/local/www/graph_cpu.php
+++ b/src/usr/local/www/graph_cpu.php
@@ -1,17 +1,17 @@
<?php
/*
- $Id$
-*/
-/*
graph_cpu.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2004-2006 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
* and Jonathan Watt <jwatt@jwatt.org>
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -19,12 +19,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -57,15 +57,13 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: graph
-*/
##|+PRIV
##|*IDENT=page-diagnostics-cpuutilization
-##|*NAME=Diagnostics: CPU Utilization page
+##|*NAME=Diagnostics: CPU Utilization
##|*DESCR=Allow access to the 'Diagnostics: CPU Utilization' page.
##|*MATCH=graph_cpu.php*
+##|*MATCH=stats.php*
##|-PRIV
require_once("guiconfig.inc");
diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc
index 66b8afd..a30696e 100644
--- a/src/usr/local/www/guiconfig.inc
+++ b/src/usr/local/www/guiconfig.inc
@@ -4,7 +4,9 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -53,9 +55,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: base
-*/
/* Include authentication routines */
/* THIS MUST BE ABOVE ALL OTHER CODE */
@@ -82,23 +81,8 @@ require_once("authgui.inc");
/* parse the configuration and include all configuration functions */
require_once("functions.inc");
-/* Pull in all the gui related display classes) */
-foreach (scandir("/usr/local/www/classes/") as $file) {
- if (substr($file, -4) == ".inc") {
- require_once("classes/{$file}");
- }
-}
-
-$g['theme'] = get_current_theme();
-
-/* Set the default interface language */
-if ($config['system']['language'] <> "") {
- $g['language'] = $config['system']['language'];
-} elseif ($g['language'] == "") {
- $g['language'] = 'en_US';
-}
-
-set_language($g['language']);
+/* Include the autoloader for all the GUI display classes */
+require_once("classes/autoload.inc.php");
/* used by progress bar */
$lastseen = "-1";
@@ -111,7 +95,7 @@ $mandfldhtmlspc = ""; /* same as above, but with spacing */
if (!$ignorefirmwarelock) {
if (is_subsystem_dirty('firmwarelock')) {
if (!$d_isfwfile) {
- header("Location: system_firmware.php");
+ header("Location: system_update.php");
exit;
} else {
return;
@@ -317,8 +301,9 @@ function verify_gzip_file($fname) {
function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $class="alert-warning") {
global $g;
- if (strpos($class, "alert-") !== 0)
+ if (strpos($class, "alert-") !== 0) {
$class = 'alert-' . $class;
+ }
if (empty($value)) {
$value = gettext("Apply changes");
@@ -329,12 +314,14 @@ function print_info_box_np($msg, $name="apply", $value="", $showapply=false, $cl
if (stristr($msg, gettext("apply")) != false || stristr($msg, gettext("save")) != false || stristr($msg, gettext("create")) != false || $showapply) {
$msg .= '<form method="post" class="pull-right"><button type="submit" class="btn btn-default" name="'. $name .'" value="'.$value.'">'.$name.'</button>';
- if ($_POST['if'])
+ if ($_POST['if']) {
$msg .= "<input type=\"hidden\" name=\"if\" value=\"" . htmlspecialchars($_POST['if']) . "\" />";
+ }
$msg .= '</form>';
- } else
+ } else {
$msg = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>'. $msg;
+ }
echo '<div class="alert ' . $class . ' clearfix" role="alert">'.$msg.'</div>';
}
@@ -343,7 +330,7 @@ function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes",
global $g;
if (stristr($msg, "apply") != false || stristr($msg, "save") != false || stristr($msg, "create") != false) {
- $savebutton = "<td class=\"infoboxsave nowrap\">";
+ $savebutton = "<td class=\"infoboxsave text-nowrap\">";
$savebutton .= "<input type=\"button\" value=\"". gettext("Undo") . "\" onclick=\"document.location='{$undo}'\" />";
$savebutton .= "<input name=\"{$name}\" type=\"submit\" class=\"formbtn\" id=\"${name}\" value=\"{$value}\" />";
$savebutton .= "</td>";
@@ -351,22 +338,10 @@ function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes",
$savebutton .= "<input type=\"hidden\" name=\"if\" value=\"" . htmlspecialchars($_POST['if']) . "\" />";
}
}
+
$nifty_redbox = "#990000";
$nifty_blackbox = "#000000";
- $themename = $g['theme'];
-
- if (file_exists("/usr/local/www/themes/{$themename}/tabcontrols.php")) {
- $toeval = file_get_contents("/usr/local/www/themes/{$themename}/tabcontrols.php");
- eval($toeval);
- }
-
- if (file_exists("/usr/local/www/themes/{$themename}/infobox.php")) {
- $toeval = file_get_contents("/usr/local/www/themes/{$themename}/infobox.php");
- eval($toeval);
- }
-
-
if (!$savebutton) {
$savebutton = "<td class=\"infoboxsave\"><input value=\"" . gettext("Close") . "\" type=\"button\" onclick=\"jQuery(this).parents('table[id=redboxtable]').hide();\" /></td>";
}
@@ -379,7 +354,7 @@ function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes",
<table class="infoboxnptable2" summary="message">
<tr>
<td class="infoboxnptd">
- &nbsp;&nbsp;&nbsp;<img class="infoboxnpimg" src="/themes/{$g['theme']}/images/icons/icon_exclam.gif" alt="exclamation" />
+ &nbsp;&nbsp;&nbsp;<i class="fa fa-exclamation-circle"></i>
</td>
<td class="infoboxnptd2">
<b>{$msg}</b>
@@ -395,12 +370,6 @@ function print_info_box_np_undo($msg, $name = "apply", $value = "Apply changes",
</td>
</tr>
</table>
- <script type="text/javascript">
- //<![CDATA[
- Rounded("div#redbox","all","#FFF","{$nifty_redbox}","smooth");
- Rounded("td#blackbox","all","#FFF","{$nifty_blackbox}","smooth");
- //]]>
- </script>
EOFnp;
}
@@ -525,9 +494,6 @@ function firewall_check_for_advanced_options(&$item) {
if ($item['defaultqueue']) {
$item_set .= "defaultqueue {$item['defaultqueue']} ";
}
- if ($item['l7container']) {
- $item_set .= "layer7 {$item['l7container']} ";
- }
if ($item['tag']) {
$item_set .= "tag {$item['tag']} ";
}
@@ -557,18 +523,20 @@ function gentitle($title) {
}
function genhtmltitle($title) {
- if (!is_array($title))
+ if (!is_array($title)) {
return '<h1 class="page-header"><a href="">' . $title . '</a></h1>';
+ }
$heading = '<h1 class="page-header"><a href="">' . end($title) . '</a></h1>';
// If the array contains only one element, there are no breadcrumbs, so don't
// add anything else
- if(count($title) > 1) {
+ if (count($title) > 1) {
$bc = '<ol class="breadcrumb">';
- foreach ($title as $el)
+ foreach ($title as $el) {
$bc .= '<li>'.$el.'</li>';
+ }
$bc .= '</ol>';
} else {
@@ -587,53 +555,21 @@ function update_changedesc($update) {
$changecount++;
}
-function clear_log_file($logfile = "/var/log/system.log", $restart_syslogd = true) {
- global $config, $g;
- if ($restart_syslogd) {
- exec("/usr/bin/killall syslogd");
- }
- if (isset($config['system']['disablesyslogclog'])) {
- unlink($logfile);
- touch($logfile);
- } else {
- $log_size = isset($config['syslog']['logfilesize']) ? $config['syslog']['logfilesize'] : "511488";
- if (isset($config['system']['usefifolog'])) {
- exec("/usr/sbin/fifolog_create -s {$log_size} " . escapeshellarg($logfile));
- } else {
- exec("/usr/local/sbin/clog -i -s {$log_size} " . escapeshellarg($logfile));
- }
- }
- if ($restart_syslogd) {
- system_syslogd_start();
- }
-}
-
-function clear_all_log_files() {
- global $g;
- exec("/usr/bin/killall syslogd");
-
- $log_files = array("system", "filter", "dhcpd", "vpn", "pptps", "poes", "l2tps", "openvpn", "portalauth", "ipsec", "ppp", "relayd", "wireless", "lighttpd", "ntpd", "gateways", "resolver", "routing");
- foreach ($log_files as $lfile) {
- clear_log_file("{$g['varlog_path']}/{$lfile}.log", false);
- }
-
- system_syslogd_start();
- killbyname("dhcpd");
- services_dhcpd_configure();
- return;
-}
-
-// This version of dump_clog() does not output <td></td> or any other table elements. It can be renamed
-// and the dump_clog() removed once all of the diag_log*.php files have been converted to Bootstrap
+// This version of dump_clog() does not output <td></td> or any other table elements.
function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "") {
global $g, $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
+ $specific_log = basename($logfile, '.log') . '_settings';
+ if ($config['syslog'][$specific_log]['cronorder'] == 'forward') $sor = "";
+ if ($config['syslog'][$specific_log]['cronorder'] == 'reverse') $sor = "-r";
$logarr = "";
$grepline = " ";
- if (is_array($grepfor))
+ if (is_array($grepfor)) {
$grepline .= " | /usr/bin/egrep " . escapeshellarg(implode("|", $grepfor));
- if (is_array($grepinvert))
+ }
+ if (is_array($grepinvert)) {
$grepline .= " | /usr/bin/egrep -v " . escapeshellarg(implode("|", $grepinvert));
+ }
if (is_dir($logfile)) {
$logarr = array("File $logfile is a directory.");
} elseif (file_exists($logfile) && filesize($logfile) == 0) {
@@ -642,10 +578,7 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g
if ($config['system']['disablesyslogclog']) {
exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
} else {
- if (isset($config['system']['usefifolog']))
- exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
- else
- exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
+ exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
}
}
echo "\n";
@@ -656,14 +589,9 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g
$logent = preg_split("/\s+/", $logent, 6);
if ($withorig) {
- if (isset($config['system']['usefifolog'])) {
- $entry_date_time = htmlspecialchars(date("F j, Y, g:i a","" . $logent[1] . ""));
- $entry_text = htmlspecialchars($logent[5]);
- } else {
- $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3)));
- $entry_text = ($logent[3] == $config['system']['hostname']) ? "" : $logent[3] . " ";
- $entry_text .= htmlspecialchars($logent[4] . " " . $logent[5]);
- }
+ $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3)));
+ $entry_text = ($logent[3] == $config['system']['hostname']) ? "" : $logent[3] . " ";
+ $entry_text .= htmlspecialchars($logent[4] . " " . $logent[5]);
echo "{$entry_date_time}";
echo " " . "{$entry_text}" . "\n";
} else {
@@ -677,6 +605,9 @@ function dump_clog_no_table($logfile, $tail, $withorig = true, $grepfor = "", $g
function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "") {
global $g, $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
+ $specific_log = basename($logfile, '.log') . '_settings';
+ if ($config['syslog'][$specific_log]['cronorder'] == 'forward') $sor = "";
+ if ($config['syslog'][$specific_log]['cronorder'] == 'reverse') $sor = "-r";
$logarr = "";
$grepline = " ";
if (is_array($grepfor)) {
@@ -693,37 +624,35 @@ function dump_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert
if ($config['system']['disablesyslogclog']) {
exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
} else {
- if (isset($config['system']['usefifolog'])) {
- exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
- } else {
- exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
- }
+ exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
}
}
+
+ $rows = 0;
foreach ($logarr as $logent) {
+ $rows++;
$logent = preg_split("/\s+/", $logent, 6);
- echo "<tr valign=\"top\">\n";
+ echo "<tr>\n";
if ($withorig) {
- if (isset($config['system']['usefifolog'])) {
- $entry_date_time = htmlspecialchars(date("F j, Y, g:i a", "" . $logent[1] . ""));
- $entry_text = htmlspecialchars($logent[5]);
- } else {
- $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3)));
- $entry_text = ($logent[3] == $config['system']['hostname']) ? "" : $logent[3] . " ";
- $entry_text .= htmlspecialchars($logent[4] . " " . $logent[5]);
- }
- echo "<td class=\"listlr nowrap\">{$entry_date_time}</td>\n";
- echo "<td class=\"listr\">{$entry_text}</td>\n";
+ $entry_date_time = htmlspecialchars(join(" ", array_slice($logent, 0, 3)));
+ $entry_text = ($logent[3] == $config['system']['hostname']) ? "" : $logent[3] . " ";
+ $entry_text .= htmlspecialchars($logent[4] . " " . $logent[5]);
+ echo "<td class=\"text-nowrap\">{$entry_date_time}</td>\n";
+ echo "<td style=\"word-wrap:break-word; word-break:break-all; white-space:normal\">{$entry_text}</td>\n";
} else {
- echo "<td class=\"listlr\" colspan=\"2\">" . htmlspecialchars($logent[5]) . "</td>\n";
+ echo "<td>" . htmlspecialchars($logent[5]) . "</td>\n";
}
echo "</tr>\n";
}
+ return($rows);
}
function return_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinvert = "", $grepreverse = false) {
global $g, $config;
$sor = (isset($config['syslog']['reverse']) || $grepreverse) ? "-r" : "";
+ $specific_log = basename($logfile, '.log') . '_settings';
+ if (($config['syslog'][$specific_log]['cronorder'] == 'forward') && !$grepreverse) $sor = "";
+ if (($config['syslog'][$specific_log]['cronorder'] == 'reverse') || $grepreverse) $sor = "-r";
$logarr = "";
$grepline = " ";
if (is_array($grepfor)) {
@@ -735,11 +664,7 @@ function return_clog($logfile, $tail, $withorig = true, $grepfor = "", $grepinve
if ($config['system']['disablesyslogclog']) {
exec("cat " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
} else {
- if (isset($config['system']['usefifolog'])) {
- exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . "{$grepline} | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
- } else {
- exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
- }
+ exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . "{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail {$sor} -n " . escapeshellarg($tail), $logarr);
}
return($logarr);
}
@@ -884,13 +809,6 @@ function display_widget_tabs(& $tab_array) {
echo "&nbsp;&nbsp;&nbsp;</b>";
echo "</div>";
}
-
- echo "<script type=\"text/javascript\">";
- echo "\n//<![CDATA[\n";
- echo "Rounded(\"div.{$tabclass}-tabactive\",\"top\",\"#CCCCCC\",\"#EEEEEE\",\"smooth\");\n";
- echo "Rounded(\"div.{$tabclass}-tabdeactive\",\"top\",\"#CCCCCC\",\"#777777\",\"smooth\");\n";
- echo "//]]>\n";
- echo "</script>";
echo "</div>";
}
@@ -994,7 +912,7 @@ function print_rfc2616_select($tag, $current) {
echo "<select id=\"{$tag}\" name=\"{$tag}\">\n";
foreach ($rfc2616 as $code => $message) {
if ($code == $current) {
- $sel = " selected=\"selected\"";
+ $sel = " selected";
} else {
$sel = "";
}
@@ -1076,8 +994,9 @@ function display_top_tabs(& $tab_array, $no_drop_down = false, $type = 'pills')
$font_color = "white";
$tabcharcount = 0;
- foreach ($tab_array as $ta)
+ foreach ($tab_array as $ta) {
$tabcharcount = $tabcharcount + strlen($ta[0]);
+ }
if ($no_drop_down == true) {
$tabcharcount = 0;
@@ -1086,55 +1005,65 @@ function display_top_tabs(& $tab_array, $no_drop_down = false, $type = 'pills')
// If the character count of the tab names is > 670
// then show a select item dropdown menubox.
- if ($tabcharcount > $tab_array_char_limit): ?>
+ if ($tabcharcount > $tab_array_char_limit) {
echo gettext("Currently viewing: ");
echo "<select name=\"TabSelect\" onchange=\"tabs_will_go(this)\">\n";
+
foreach ($tab_array as $ta) {
- if ($ta[1] == "true")
- $selected = " selected=\"selected\"";
- else
+ if ($ta[1] == "true") {
+ $selected = " selected";
+ } else {
$selected = "";
+ }
// Onclick in option will not work in some browser
// echo "<option onclick=\"document.location='{$ta[2]}';\"{$selected}>{$ta['0']}</option>\n";
echo "<option value=\"{$ta[2]}\"{$selected}>{$ta['0']}</option>\n";
}
+
echo "</select>\n<p>&nbsp;</p>";
echo "<script type=\"text/javascript\">";
echo "\n//<![CDATA[\n";
echo " function tabs_will_go(obj){ document.location = obj.value; }\n";
echo "//]]>\n";
echo "</script>";
-<? else: ?>
- <ul class="nav nav-<?= $type ?>">
- <?php foreach ($tab_array as $ta): ?>
- <li role="presentation"<?=($ta[1] ? ' class="active"' : '')?>><a href="<?=$ta[2]?>"><?=$ta[0]?></a></li>
- <?php endforeach; ?>
- </ul>
-<?php endif;
-}
+ } else {
+ echo '<ul class="nav nav-' . $type . '">';
-function add_package_tabs($pkgname, &$tab_array) {
- global $config, $g;
+ foreach ($tab_array as $ta) {
+ echo '<li role="presentation"';
+ if ($ta[1]) {
+ echo ' class="active"';
+ }
-// $pkg = get_pkg_data($pkgname);
+ echo '><a href="' . $ta[2] . '">' . $ta[0] . '</a></li>';
+ }
- if (!isset($pkg['configurationfile']) || !file_exists('/usr/local/pkg/' . $pkg['configurationfile'])) {
- return;
+ echo '</ul>';
}
+}
- $pkg_config = parse_xml_config_pkg('/usr/local/pkg/' . $pkg['configurationfile'], "packagegui");
+function add_package_tabs($tabgroup, &$tab_array) {
+ global $config, $g;
- if (!isset($pkg_config['tabs']['tab'])) {
+ if (!isset($config['installedpackages']['package'])) {
return;
}
- foreach ($pkg_config['tabs']['tab'] as $tab) {
- $tab_entry = array();
- if ($tab['name']) {
- $tab_entry[] = $tab['name'];
- $tab_entry[] = false;
- $tab_entry[] = $tab['url'];
- $tab_array[] = $tab_entry;
+ foreach ($config['installedpackages']['package'] as $pkg) {
+ $pkg_config = read_package_configurationfile($pkg['name']);
+
+ if (!isset($pkg_config['tabs']['tab'])) {
+ continue;
+ }
+
+ foreach ($pkg_config['tabs']['tab'] as $tab) {
+ $tab_entry = array();
+ if ($tab['name']) {
+ $tab_entry[] = $tab['name'];
+ $tab_entry[] = false;
+ $tab_entry[] = $tab['url'];
+ $tab_array[] = $tab_entry;
+ }
}
}
}
@@ -1142,19 +1071,19 @@ function add_package_tabs($pkgname, &$tab_array) {
function alias_info_popup($alias_id) {
global $config;
- if (!is_array($config['aliases']['alias'][$alias_id]))
+ if (!is_array($config['aliases']['alias'][$alias_id])) {
return;
+ }
$maxlength = 60;
$alias = $config['aliases']['alias'][$alias_id];
$content = "";
- if ($alias['url'])
- {
+ if ($alias['url']) {
// TODO: Change it when pf supports tables with ports
if ($alias['type'] == "urltable") {
exec("/sbin/pfctl -t {$alias['name']} -T show | wc -l", $total_entries);
- $counter=preg_replace("/\D/","",$total_entries[0]);
+ $counter=preg_replace("/\D/", "", $total_entries[0]);
exec("/sbin/pfctl -t {$alias['name']} -T show | head -10002", $alias_addresses);
} else {
$urlfn = alias_expand_urltable($alias['name']);
@@ -1162,13 +1091,11 @@ function alias_info_popup($alias_id) {
$counter = count($alias_addresses);
}
- $content .= '<h5>'. $alias['url'] .'</h5><ul><li>'. implode('</li><li>', $alias_ports_address) .'</li></ul>';
-
- if ($counter > 10002)
+ $content .= '<h5>'. $alias['url'] .'</h5><ul><li>'. implode('</li><li>', $alias_addresses) .'</li></ul>';
+ if ($counter > 10002) {
$content .= '<i>'. gettext("listing only first 10k items") .'</i>';
- }
- else
- {
+ }
+ } else {
$alias_addresses = explode (" ", $alias['address']);
$alias_details = explode ("||", $alias['detail']);
$idx = 0;
@@ -1196,8 +1123,9 @@ function alias_info_popup($alias_id) {
$content .= "<table>\n";
}
- if (strlen($alias['descr']) >= $maxlength)
+ if (strlen($alias['descr']) >= $maxlength) {
$alias['descr'] = substr($alias['descr'], 0, $maxlength) . '&hellip;';
+ }
return $content;
}
@@ -1205,19 +1133,24 @@ function alias_info_popup($alias_id) {
function rule_columns_with_alias($src, $srcport, $dst, $dstport) {
global $config;
- if ($config['aliases']['alias'] == "" || !is_array($config['aliases']['alias']))
+ if ($config['aliases']['alias'] == "" || !is_array($config['aliases']['alias'])) {
return;
+ }
$columns = array();
foreach ($config['aliases']['alias'] as $alias_id => $alias_name) {
- if ($alias_name['name'] == $src)
+ if ($alias_name['name'] == $src) {
$columns['src'] = $alias_id;
- if ($alias_name['name'] == $srcport)
+ }
+ if ($alias_name['name'] == $srcport) {
$columns['srcport'] = $alias_id;
- if ($alias_name['name'] == $dst )
+ }
+ if ($alias_name['name'] == $dst) {
$columns['dst'] = $alias_id;
- if ($alias_name['name'] == $dstport)
+ }
+ if ($alias_name['name'] == $dstport) {
$columns['dstport'] = $alias_id;
+ }
}
return $columns;
@@ -1235,8 +1168,28 @@ var_dump($content);die;
<?php
}
-$timezone = $config['system']['timezone'];
-if (!$timezone) {
+function set_flash_message($class, $msg) {
+ @session_start();
+ $_SESSION['flash_messages'][$class][] = $msg;
+}
+
+function get_flash_message() {
+ @session_start();
+ if (isset($_SESSION['flash_messages']) && !empty($_SESSION['flash_messages'])) {
+ foreach ($_SESSION['flash_messages'] as $class => $flash_message) {
+ print_info_box_np(implode("<br />", $flash_message), null, null, false, $class);
+ }
+ unset($_SESSION['flash_messages']);
+ }
+}
+
+/* set timezone */
+if (isset($config['system']['timezone']) &&
+ !empty($config['system']['timezone'])) {
+ $timezone = $config['system']['timezone'];
+} elseif (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
+ $timezone = $g['default_timezone'];
+} else {
$timezone = "Etc/UTC";
}
diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc
index a6b1d9d..c8e99dd 100755
--- a/src/usr/local/www/head.inc
+++ b/src/usr/local/www/head.inc
@@ -1,10 +1,6 @@
<?php
-/*
- pfSense_MODULE: head.inc
-*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -58,27 +54,47 @@ require_once("globals.inc");
require_once("functions.inc");
require_once("shortcuts.inc");
require_once("service-utils.inc");
-
-/* $Id$ */
+require_once('notices.inc');
header('Content-Type: text/html; charset=utf-8');
$pagetitle = gentitle($pgtitle);
if (isset($config['system']['webgui']['pagenamefirst'])) {
- $tabtitle = $pagetitle . " - " . $config['system']['hostname'] . "." . $config['system']['domain'];
+ $tabtitle = $pagetitle . " - " . htmlspecialchars($config['system']['hostname'] . "." . $config['system']['domain']);
} else {
- $tabtitle = $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pagetitle;
+ $tabtitle = htmlspecialchars($config['system']['hostname'] . "." . $config['system']['domain']) . " - " . $pagetitle;
+}
+
+$cssfile = "/bootstrap/css/pfSense.css";
+
+if (isset($config['system']['webgui']['webguicss'])) {
+ if (file_exists("/usr/local/www/bootstrap/css/" . $config['system']['webgui']['webguicss'])) {
+ $cssfile = "/bootstrap/css/" . $config['system']['webgui']['webguicss'];
+ }
+}
+
+// set default colmns to two if unset
+if (!isset($config['system']['webgui']['dashboardcolumns'])) {
+ $config['system']['webgui']['dashboardcolumns'] = 2;
}
+
?>
<!DOCTYPE html>
<html lang="en">
<head>
- <link rel="stylesheet" href="/bootstrap/css/pfSense.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="<?=$cssfile?>" />
+ <link rel="stylesheet" href="/font-awesome/css/font-awesome.min.css">
+ <link rel="stylesheet" href="/sortable/sortable-theme-bootstrap.css">
<title><?=$tabtitle?></title>
- <script>var events = events || [];</script>
+ <script type="text/javascript">
+ //<![CDATA[
+ var events = events || [];
+ //]]>
+ </script>
</head>
-<body id="<?=basename($_SERVER['SCRIPT_NAME'], '.php')?>">
+
<?php
/* Determine automated help URL. Should output the page name and parameters
@@ -122,7 +138,7 @@ function return_ext_menu($section) {
$htmltext = "";
$extarray = array();
- if ( (!empty($config['installedpackages']['package'])) && (!empty($config['installedpackages']['menu']))) {
+ if ((!empty($config['installedpackages']['package'])) && (!empty($config['installedpackages']['menu']))) {
foreach ($config['installedpackages']['menu'] as $menu) {
// print('Name: ' . $menu['name'] . ', Pkg category: ' . $menu['category'] . ', Section: ' . $section . '<br />');
if ($menu['section'] != $section) {
@@ -179,7 +195,7 @@ function output_menu($arrayitem, $target = null) {
$system_menu = array();
$system_menu[] = array(gettext("Logout"), "/index.php?logout");
$system_menu[] = array(gettext("Advanced"), "/system_advanced_admin.php");
-$system_menu[] = array(gettext("Firmware"), "/system_firmware.php");
+$system_menu[] = array(gettext("Update"), "/pkg_mgr_install.php?id=firmware");
$system_menu[] = array(gettext("General Setup"), "/system.php");
$system_menu[] = array(gettext("High Avail. Sync"), "/system_hasync.php");
if ($g['platform'] == $g['product_name'] or $g['platform'] == "nanobsd") {
@@ -233,10 +249,10 @@ if ($g['services_dhcp_server_enable']) {
}
$services_menu[] = array(gettext("Dynamic DNS"), "/services_dyndns.php");
-$services_menu[] = array(gettext("IGMP proxy"), "/services_igmpproxy.php");
+$services_menu[] = array(gettext("IGMP Proxy"), "/services_igmpproxy.php");
$services_menu[] = array(gettext("Load Balancer"), "/load_balancer_pool.php");
$services_menu[] = array(gettext("NTP"), "/services_ntpd.php");
-$services_menu[] = array(gettext("PPPoE Server"), "/vpn_pppoe.php");
+$services_menu[] = array(gettext("PPPoE Server"), "/services_pppoe.php");
$services_menu[] = array(gettext("SNMP"), "/services_snmp.php");
if (count($config['interfaces']) > 1) {
@@ -259,30 +275,27 @@ $vpn_menu = msort(array_merge($vpn_menu, return_ext_menu("VPN")), 0);
// Status
$status_menu = array();
-if (count($config['captiveportal']) > 0) {
- $status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php");
-}
-
-$status_menu[] = array(gettext("CARP (failover)"), "/carp_status.php");
+$status_menu[] = array(gettext("Captive Portal"), "/status_captiveportal.php");
+$status_menu[] = array(gettext("CARP (failover)"), "/status_carp.php");
$status_menu[] = array(gettext("Dashboard"), "/index.php");
$status_menu[] = array(gettext("Gateways"), "/status_gateways.php");
$status_menu[] = array(gettext("DHCP Leases"), "/status_dhcp_leases.php");
$status_menu[] = array(gettext("DHCPv6 Leases"), "/status_dhcpv6_leases.php");
$status_menu[] = array(gettext("Filter Reload"), "/status_filter_reload.php");
$status_menu[] = array(gettext("Interfaces"), "/status_interfaces.php");
-$status_menu[] = array(gettext("IPsec"), "/diag_ipsec.php");
+$status_menu[] = array(gettext("IPsec"), "/status_ipsec.php");
$status_menu[] = array(gettext("Load Balancer"), "/status_lb_pool.php");
$status_menu[] = array(gettext("NTP"), "/status_ntpd.php");
$status_menu[] = array(gettext("OpenVPN"), "/status_openvpn.php");
if ($g['platform'] == $g['product_name']) {
- $status_menu[] = array(gettext("Package Logs"), "/diag_pkglogs.php");
+ $status_menu[] = array(gettext("Package Logs"), "/status_pkglogs.php");
}
$status_menu[] = array(gettext("Queues"), "/status_queues.php");
$status_menu[] = array(gettext("RRD Graphs"), "/status_rrd_graph.php");
$status_menu[] = array(gettext("Services"), "/status_services.php");
-$status_menu[] = array(gettext("System Logs"), "/diag_logs.php");
+$status_menu[] = array(gettext("System Logs"), "/status_logs.php");
$status_menu[] = array(gettext("Traffic Graph"), "/status_graph.php?if=wan");
if (count($config['interfaces']) > 1) {
@@ -292,7 +305,7 @@ if (count($config['interfaces']) > 1) {
$ifentries = get_configured_interface_with_descr();
foreach ($ifentries as $ent => $entdesc) {
if (is_array($config['interfaces'][$ent]['wireless']) &&
- preg_match($g['wireless_regex'], $config['interfaces'][$ent]['if'])) {
+ preg_match($g['wireless_regex'], $config['interfaces'][$ent]['if'])) {
$wifdescrs[$ent] = $entdesc;
}
}
@@ -317,15 +330,15 @@ if (file_exists("/var/run/gmirror_active")) {
$diagnostics_menu[] = array(gettext("GEOM Mirrors"), "/diag_gmirror.php");
}
-$diagnostics_menu[] = array(gettext("Halt System"), "/halt.php");
+$diagnostics_menu[] = array(gettext("Halt System"), "/diag_halt.php");
$diagnostics_menu[] = array(gettext("Limiter Info"), "/diag_limiter_info.php");
$diagnostics_menu[] = array(gettext("NDP Table"), "/diag_ndp.php");
$diagnostics_menu[] = array(gettext("Tables"), "/diag_tables.php");
$diagnostics_menu[] = array(gettext("Ping"), "/diag_ping.php");
$diagnostics_menu[] = array(gettext("Test Port"), "/diag_testport.php");
$diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php");
-$diagnostics_menu[] = array(gettext("pfTop"), "/diag_system_pftop.php");
-$diagnostics_menu[] = array(gettext("Reboot"), "/reboot.php");
+$diagnostics_menu[] = array(gettext("pfTop"), "/diag_pftop.php");
+$diagnostics_menu[] = array(gettext("Reboot"), "/diag_reboot.php");
$diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php");
$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php");
$diagnostics_menu[] = array(gettext("Sockets"), "/diag_sockets.php");
@@ -361,13 +374,25 @@ if (!$g['disablehelpmenu']) {
$help_menu[] = array(gettext("Developers Wiki"), "https://www.pfsense.org/j.php?jumpto=devwiki");
$help_menu[] = array(gettext("Paid Support"), "https://www.pfsense.org/j.php?jumpto=portal");
$help_menu[] = array(gettext("pfSense Book"), "https://www.pfsense.org/j.php?jumpto=book");
- $help_menu[] = array(gettext("Search portal"), "https://www.pfsense.org/j.php?jumpto=searchportal");
+ $help_menu[] = array(gettext("Search Portal"), "https://www.pfsense.org/j.php?jumpto=searchportal");
$help_menu[] = array(gettext("FreeBSD Handbook"), "https://www.pfsense.org/j.php?jumpto=fbsdhandbook");
$help_menu = msort(array_merge($help_menu, return_ext_menu("Help")), 0);
}
+$menuclass = "static";
+
+if (isset($config['system']['webgui']['webguifixedmenu'])) {
+ $menuclass = "fixed";
+}
+
+$numColumns = $config['system']['webgui']['dashboardcolumns'];
+
+if (($pagename === "index.php") && ($numColumns > 2)) {
+ $columnsContainer = 'style="max-width: ' . 585*$numColumns . 'px;width: 100%"';
+}
?>
-<nav class="navbar navbar-static-top navbar-inverse">
+<body id="<?=$numColumns?>">
+<nav id="topmenu" class="navbar navbar-<?=$menuclass?>-top navbar-inverse">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#pf-navbar">
@@ -405,29 +430,34 @@ if (!$g['disablehelpmenu']) {
<?php if (are_notices_pending()):?>
<?php $notices = get_notices()?>
<li class="dropdown">
- <a href="#" data-toggle="modal" data-target="#notices" role="button" aria-expanded="false"><?=gettext("Notices")?>
- <span class="badge"><?=count($notices)?></span>
+ <a href="#" data-toggle="modal" data-target="#notices" role="button" aria-expanded="false">
+ <i class="fa fa-bell text-danger" title="<?=gettext("Notices")?>"></i>
+ <span class="badge bg-danger"><?=count($notices)?></span>
+ </a>
+ </li>
+ <?php
+ endif;
+ ?>
+ <li class="dropdown">
+ <a href="/index.php?logout">
+ <i class="fa fa-sign-out" title="<?=gettext("Log out")?>"></i>
</a>
</li>
-<?php
- endif;
-?>
</ul>
</div>
</div>
</nav>
-<div class="container">
+<div class="container <?=$menuclass?>" <?=$columnsContainer?>>
<header class="header">
<?php
// If you set $notitle = true BEFORE including head.inc, the page title will be supressed
- if(isset($notitle)) {
+ if (isset($notitle)) {
print('<br />');
unset($notitle);
} else {
-
- print(genhtmltitle($pgtitle));
+ print(genhtmltitle($pgtitle));
}
?>
<ul class="context-links">
@@ -459,7 +489,7 @@ echo '<li>'. get_shortcut_log_link($shortcut_section, false). '</li>';
<?php if (!$g['disablehelpicon']): ?>
<li>
<a href="<?=$helpurl?>" title="<?=gettext("Help for items on this page")?>" class="help-icon">
- <i class="icon-large icon-question-sign"></i>
+ <i class="fa fa-question-circle"></i>
</a>
</li>
<?php endif?>
@@ -473,8 +503,10 @@ if (is_subsystem_dirty('packagelock') || file_exists('/conf/needs_package_sync'
} else {
$pgtitle = array(gettext("System"), gettext("Package Manager"));
$info_text = gettext("Packages are currently being reinstalled in the background.<p>Do not make changes in the GUI until this is complete.");
+ $info_text .= gettext("<p>If the above message is still displayed after a couple of hours, use the 'Clear Package Lock' button on the <a href='diag_backup.php' title='Backup/Restore'>Backup/Restore page</a> and reinstall packages manually.");
}
- print_info_box("{$info_text}<p><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif' alt='firmware update' />");
+
+ print_info_box($info_text);
}
$pgtitle_output = true;
@@ -495,7 +527,7 @@ if ($config['remote_managed_pages']['item']) {
if (are_notices_pending()):?>
<div id="notices" class="modal fade" role="dialog">
- <div class="mopdal-dialog">
+ <div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
@@ -509,11 +541,11 @@ if (are_notices_pending()):?>
<?php
$noticeCategories = array();
- if(is_array($notices)) {
- foreach ($notices as $time => $notice)
- {
- if (!isset($noticeCategories[ $notice['category'] ]))
+ if (is_array($notices)) {
+ foreach ($notices as $time => $notice) {
+ if (!isset($noticeCategories[ $notice['category'] ])) {
$noticeCategories[ $notice['category'] ] = array();
+ }
$notice['time'] = $time;
array_push($noticeCategories[ $notice['category'] ], $notice);
@@ -542,20 +574,33 @@ if (are_notices_pending()):?>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
- <a type="button" class="btn btn-primary" href="javascript:clear_notices();">Mark all as read</a>
+ <button type="button" id="clearallnotices" class="btn btn-primary"><?=gettext("Mark all as read")?></button>
</div>
</div>
</div>
</div>
-<script>
- // Do some Ajax to make index.php clear the notices
- function clear_notices() {
- xmlhttp=new XMLHttpRequest();
- xmlhttp.open("GET","index.php?closenotice=all",true);
- xmlhttp.send();
- location.reload(); // reload the page to clear the notices indicator and dismiss the modal dialog all in one
- }
+<script type="text/javascript">
+//<![CDATA[
+ events.push(function() {
+ $('#clearallnotices').click(function() {
+ ajaxRequest = $.ajax({
+ url: "/index.php",
+ type: "post",
+ data: { closenotice: "all"},
+ success: function() {
+ window.location = window.location.href;
+ },
+ failure: function() {
+ alert("Error clearing notices!");
+ }
+ });
+ });
+ });
+//]]>
</script>
<?php endif;
+
+// Get the flash Messages
+get_flash_message();
diff --git a/src/usr/local/www/help.php b/src/usr/local/www/help.php
index a59c521..485e33f 100644
--- a/src/usr/local/www/help.php
+++ b/src/usr/local/www/help.php
@@ -1,13 +1,12 @@
<?php
-/*
+/*
Redirector for Contextual Help System
- */
+*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * c) 2009 Jim Pingle <jimp@pfsense.org>
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -53,7 +52,7 @@
* ====================================================================
*
*/
-
+
require_once("guiconfig.inc");
/* Define hash of jumpto url maps */
@@ -80,7 +79,7 @@ $helppages = array(
'interfaces_vlan_edit.php' => 'https://doc.pfsense.org/index.php/VLAN_Trunking',
'diag_routes.php' => 'https://doc.pfsense.org/index.php/Viewing_Routes',
'diag_packet_capture.php' => 'https://doc.pfsense.org/index.php/Sniffers,_Packet_Capture',
- 'diag_system_pftop.php' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage#pftop',
+ 'diag_pftop.php' => 'https://doc.pfsense.org/index.php/How_can_I_monitor_bandwidth_usage#pftop',
'status_rrd_graph.php' => 'https://doc.pfsense.org/index.php/RRD_Graphs',
'status_rrd_graph_img.php' => 'https://doc.pfsense.org/index.php/RRD_Graphs',
'status_rrd_graph_settings.php' => 'https://doc.pfsense.org/index.php/RRD_Graphs',
@@ -91,7 +90,6 @@ $helppages = array(
'diag_confbak.php' => 'https://doc.pfsense.org/index.php/Configuration_History',
'diag_defaults.php' => 'https://doc.pfsense.org/index.php/Factory_Defaults',
'firewall_shaper.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide',
- 'firewall_shaper_layer7.php' => 'https://doc.pfsense.org/index.php/Layer_7',
'firewall_shaper_queues.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide',
'firewall_shaper_vinterface.php' => 'https://doc.pfsense.org/index.php/Limiters',
'firewall_shaper_wizards.php' => 'https://doc.pfsense.org/index.php/Traffic_Shaping_Guide',
@@ -100,23 +98,22 @@ $helppages = array(
'diag_dns.php' => 'https://doc.pfsense.org/index.php/DNS_Lookup',
'diag_dump_states.php' => 'https://doc.pfsense.org/index.php/Show_States',
'diag_resetstate.php' => 'https://doc.pfsense.org/index.php/Reset_States',
- 'diag_logs.php' => 'https://doc.pfsense.org/index.php/System_Logs',
+ 'status_logs.php' => 'https://doc.pfsense.org/index.php/System_Logs',
'diag_logs_auth.php' => 'https://doc.pfsense.org/index.php/Captive_Portal_Authentication_Logs',
'diag_logs_dhcp.php' => 'https://doc.pfsense.org/index.php/DHCP_Logs',
- 'diag_logs_filter.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs',
- 'diag_logs_filter_dynamic.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs',
- 'diag_logs_filter_summary.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs',
+ 'status_logs_filter.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs',
+ 'status_logs_filter_dynamic.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs',
+ 'status_logs_filter_summary.php' => 'https://doc.pfsense.org/index.php/Firewall_Logs',
'diag_logs_ntpd.php' => 'https://doc.pfsense.org/index.php/NTP_Logs',
'diag_logs_ppp.php' => 'https://doc.pfsense.org/index.php/PPP_Logs',
'diag_logs_relayd.php' => 'https://doc.pfsense.org/index.php/Load_Balancer_Logs',
- 'diag_logs_settings.php' => 'https://doc.pfsense.org/index.php/Log_Settings',
- 'diag_logs_vpn.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Logs',
+ 'status_logs_settings.php' => 'https://doc.pfsense.org/index.php/Log_Settings',
+ 'status_logs_vpn.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Logs',
'diag_logs_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Logs',
'diag_logs_openvpn.php' => 'https://doc.pfsense.org/index.php/OpenVPN_Logs',
'diag_nanobsd.php' => 'https://doc.pfsense.org/index.php/NanoBSD_Diagnostics',
- 'diag_patterns.php' => 'https://doc.pfsense.org/index.php/Layer7_Pattern_Diagnostics',
'diag_ping.php' => 'https://doc.pfsense.org/index.php/Ping_Host',
- 'diag_pkglogs.php' => 'https://doc.pfsense.org/index.php/Package_Logs',
+ 'status_pkglogs.php' => 'https://doc.pfsense.org/index.php/Package_Logs',
'diag_tables.php' => 'https://doc.pfsense.org/index.php/Tables',
'diag_system_activity.php' => 'https://doc.pfsense.org/index.php/System_Activity',
'diag_traceroute.php' => 'https://doc.pfsense.org/index.php/Traceroute',
@@ -125,8 +122,8 @@ $helppages = array(
'exec.php' => 'https://doc.pfsense.org/index.php/Execute_Command',
'firewall_nat_1to1.php' => 'https://doc.pfsense.org/index.php/1:1_NAT',
'firewall_nat_1to1_edit.php' => 'https://doc.pfsense.org/index.php/1:1_NAT',
- 'halt.php' => 'https://doc.pfsense.org/index.php/Halt_System',
- 'reboot.php' => 'https://doc.pfsense.org/index.php/Reboot_System',
+ 'diag_halt.php' => 'https://doc.pfsense.org/index.php/Halt_System',
+ 'diag_reboot.php' => 'https://doc.pfsense.org/index.php/Reboot_System',
'status_filter_reload.php' => 'https://doc.pfsense.org/index.php/Filter_Reload_Status',
'status_gateway_groups.php' => 'https://doc.pfsense.org/index.php/Gateway_Status',
'status_gateways.php' => 'https://doc.pfsense.org/index.php/Gateway_Status',
@@ -138,7 +135,6 @@ $helppages = array(
'pkg_mgr.php' => 'https://doc.pfsense.org/index.php/Package_Manager',
'pkg_mgr_install.php' => 'https://doc.pfsense.org/index.php/Package_Manager',
'pkg_mgr_installed.php' => 'https://doc.pfsense.org/index.php/Package_Manager',
- 'pkg_mgr_settings.php' => 'https://doc.pfsense.org/index.php/Package_Manager_Settings',
'interfaces.php' => 'https://doc.pfsense.org/index.php/Interface_Settings',
'interfaces_assign.php' => 'https://doc.pfsense.org/index.php/Assign_Interfaces',
'interfaces_bridge.php' => 'https://doc.pfsense.org/index.php/Interface_Bridges',
@@ -177,10 +173,7 @@ $helppages = array(
'system_advanced_network.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#Firewall.2FNAT',
'system_advanced_notifications.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#Notifications',
'system_advanced_sysctl.php' => 'https://doc.pfsense.org/index.php/Advanced_Setup#System_Tunables',
- 'system_firmware.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates',
- 'system_firmware_auto.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates',
- 'system_firmware_check.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates',
- 'system_firmware_settings.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates',
+ 'system_update_settings.php' => 'https://doc.pfsense.org/index.php/Firmware_Updates',
'system_gateway_groups.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings',
'system_gateway_groups_edit.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings',
'system_gateways.php' => 'https://doc.pfsense.org/index.php/Gateway_Settings',
@@ -201,17 +194,17 @@ $helppages = array(
'vpn_l2tp.php' => 'https://doc.pfsense.org/index.php/L2TP_VPN_Settings',
'vpn_l2tp_users.php' => 'https://doc.pfsense.org/index.php/L2TP_VPN_Settings',
'vpn_l2tp_users_edit.php' => 'https://doc.pfsense.org/index.php/L2TP_VPN_Settings',
- 'vpn_pppoe.php' => 'https://doc.pfsense.org/index.php/PPPoE_Server_Settings',
- 'vpn_pppoe_edit.php' => 'https://doc.pfsense.org/index.php/PPPoE_Server_Settings',
+ 'services_pppoe.php' => 'https://doc.pfsense.org/index.php/PPPoE_Server_Settings',
+ 'services_pppoe_edit.php' => 'https://doc.pfsense.org/index.php/PPPoE_Server_Settings',
'vpn_pptp.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Settings',
'vpn_pptp_users.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Settings',
'vpn_pptp_users_edit.php' => 'https://doc.pfsense.org/index.php/PPTP_VPN_Settings',
- 'diag_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Status',
- 'diag_ipsec_sad.php' => 'https://doc.pfsense.org/index.php/IPsec_Status',
- 'diag_ipsec_spd.php' => 'https://doc.pfsense.org/index.php/IPsec_Status',
+ 'status_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Status',
+ 'status_ipsec_sad.php' => 'https://doc.pfsense.org/index.php/IPsec_Status',
+ 'status_ipsec_spd.php' => 'https://doc.pfsense.org/index.php/IPsec_Status',
'vpn_ipsec.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels',
'vpn_ipsec_mobile.php' => 'https://doc.pfsense.org/index.php/IPsec_Mobile_Clients',
- 'diag_ipsec_leases.php' => 'https://doc.pfsense.org/index.php/IPsec_Mobile_Clients',
+ 'status_ipsec_leases.php' => 'https://doc.pfsense.org/index.php/IPsec_Mobile_Clients',
'vpn_ipsec_phase1.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels',
'vpn_ipsec_phase2.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels',
'vpn_ipsec_keys.php' => 'https://doc.pfsense.org/index.php/IPsec_Tunnels',
@@ -263,7 +256,6 @@ $helppages = array(
'status_ntpd.php' => 'https://doc.pfsense.org/index.php/NTP_Server',
'services_ntpd_gps.php' => 'https://doc.pfsense.org/index.php/NTP_Server',
'services_ntpd_pps.php' => 'https://doc.pfsense.org/index.php/NTP_Server',
- 'system_firmware_restorefullbackup.php' => 'https://doc.pfsense.org/index.php/Full_Backup',
'load_balancer_monitor.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing',
'load_balancer_monitor_edit.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing',
'load_balancer_pool.php' => 'https://doc.pfsense.org/index.php/Inbound_Load_Balancing#Set_up_Load_Balancing_Pool',
@@ -278,7 +270,7 @@ $helppages = array(
'services_dhcpv6.php' => 'https://doc.pfsense.org/index.php/DHCPv6_Server',
'services_dhcpv6_edit.php' => 'https://doc.pfsense.org/index.php/DHCPv6_Server',
'services_router_advertisements.php' => 'https://doc.pfsense.org/index.php/Router_Advertisements',
- 'carp_status.php' => 'https://doc.pfsense.org/index.php/CARP_Status',
+ 'status_carp.php' => 'https://doc.pfsense.org/index.php/CARP_Status',
'system_hasync.php' => 'https://doc.pfsense.org/index.php/High_Availability',
'services_unbound.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver',
'services_unbound_advanced.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver#Advanced_Settings_Tab',
@@ -287,7 +279,7 @@ $helppages = array(
'services_unbound_host_edit.php' => 'https://doc.pfsense.org/index.php/Unbound_DNS_Resolver',
'diag_gmirror.php' => 'https://doc.pfsense.org/index.php/Create_a_Software_RAID1_%28gmirror%29',
- /* From here down are packages. Not checking these as strictly,
+ /* From here down are packages. Not checking these as strictly,
any information is better than nothing. */
'olsrd.xml' => 'https://doc.pfsense.org/index.php/OLSR_Daemon',
'routed.xml' => 'https://doc.pfsense.org/index.php/Routing_Information_Protocol_(RIP)', # RIP
diff --git a/src/usr/local/www/ifstats.php b/src/usr/local/www/ifstats.php
index fe6ce70..741b68f 100644
--- a/src/usr/local/www/ifstats.php
+++ b/src/usr/local/www/ifstats.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
ifstats.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -54,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/netstat
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-xmlrpcinterfacestats
-##|*NAME=XMLRPC Interface Stats page
+##|*NAME=XMLRPC Interface Stats
##|*DESCR=Allow access to the 'XMLRPC Interface Stats' page.
##|*MATCH=ifstats.php*
##|-PRIV
diff --git a/src/usr/local/www/includes/functions.inc.php b/src/usr/local/www/includes/functions.inc.php
index 3bb3edd..b092de7 100644
--- a/src/usr/local/www/includes/functions.inc.php
+++ b/src/usr/local/www/includes/functions.inc.php
@@ -1,7 +1,6 @@
<?
/*
functions.inc.php
- pfSense_MODULE: ajax
Copyright (C) 2013-2015 Electric Sheep Fencing, LP
*/
diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php
index 608262a..613ba78 100644
--- a/src/usr/local/www/index.php
+++ b/src/usr/local/www/index.php
@@ -1,11 +1,12 @@
<?php
-/* $Id$ */
/*
index.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,14 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-system-login/logout
-##|*NAME=System: Login / Logout page / Dashboard
+##|*NAME=System: Login / Logout / Dashboard
##|*DESCR=Allow access to the 'System: Login / Logout' page and Dashboard.
##|*MATCH=index.php*
##|-PRIV
@@ -78,10 +75,15 @@ require_once('functions.inc');
require_once('notices.inc');
require_once("pkg-utils.inc");
+if (isset($_POST['closenotice'])) {
+ close_notice($_POST['closenotice']);
+ sleep(1);
+ exit;
+}
+
if (isset($_GET['closenotice'])) {
close_notice($_GET['closenotice']);
- echo get_menu_messages();
- exit;
+ sleep(1);
}
if ($g['disablecrashreporter'] != true) {
@@ -110,16 +112,40 @@ if ($g['disablecrashreporter'] != true) {
}
}
+##build list of php include files
+$phpincludefiles = array();
+$directory = "/usr/local/www/widgets/include/";
+$dirhandle = opendir($directory);
+$filename = "";
+
+while (false !== ($filename = readdir($dirhandle))) {
+ $phpincludefiles[] = $filename;
+}
+
+## Include each widget include file.
+## These define vars that specify the widget title and title link.
+foreach ($phpincludefiles as $includename) {
+ if (!stristr($includename, ".inc")) {
+ continue;
+ }
+ if (file_exists($directory . $includename)) {
+ include($directory . $includename);
+ }
+}
+
##build list of widgets
-foreach (glob("/usr/local/www/widgets/widgets/*.widget.php") as $file)
-{
+foreach (glob("/usr/local/www/widgets/widgets/*.widget.php") as $file) {
$name = basename($file, '.widget.php');
- $widgets[ $name ] = array('name' => ucwords(str_replace('_', ' ', $name)), 'display' => 'none');
-}
+ // Get the widget title that should be in a var defined in the widget's inc file.
+ $widgettitle = ${$name . '_title'};
-##insert the system information widget as first, so as to be displayed first
-unset($widgets['system_information']);
-$widgets = array_merge(array('system_information' => array('name' => 'System Information')), $widgets);
+ if ((strlen($widgettitle) == 0)) {
+ // Fall back to constructing a title from the file name of the widget.
+ $widgettitle = ucwords(str_replace('_', ' ', $name));
+ }
+
+ $widgets[ $name ] = array('name' => $widgettitle, 'display' => 'none');
+}
##if no config entry found, initialize config entry
if (!is_array($config['widgets'])) {
@@ -132,7 +158,7 @@ if ($_POST && $_POST['sequence']) {
foreach ($widgets as $widgetname => $widgetconfig) {
if ($_POST[$widgetname . '-config']) {
- $config['widgets'][$widgetname . '-config'] = $_POST[$name . '-config'];
+ $config['widgets'][$widgetname . '-config'] = $_POST[$widgetname . '-config'];
}
}
@@ -212,13 +238,15 @@ if ($fd) {
or preg_match("/^safe.: (\w.*)/", $dmesgl, $matches)
or preg_match("/^ubsec.: (.*?),/", $dmesgl, $matches)
or preg_match("/^padlock.: <(.*?)>,/", $dmesgl, $matches)
- or preg_match("/^glxsb.: (.*?),/", $dmesgl, $matches)
- or preg_match("/^aesni.: (.*?),/", $dmesgl, $matches)) {
+ or preg_match("/^glxsb.: (.*?),/", $dmesgl, $matches)) {
$hwcrypto = $matches[1];
break;
}
}
fclose($fd);
+ if (!isset($hwcrypto) && get_single_sysctl("dev.aesni.0.%desc")) {
+ $hwcrypto = get_single_sysctl("dev.aesni.0.%desc");
+ }
}
##build widget saved list information
@@ -226,17 +254,35 @@ if ($config['widgets'] && $config['widgets']['sequence'] != "") {
$pconfig['sequence'] = $config['widgets']['sequence'];
$widgetsfromconfig = array();
- foreach (explode(',', $pconfig['sequence']) as $line)
- {
+ foreach (explode(',', $pconfig['sequence']) as $line) {
list($file, $col, $display) = explode(':', $line);
// be backwards compatible
+ // If the display column information is missing, we will assign a temporary
+ // column here. Next time the user saves the dashboard it will fix itself
+ if ($col == "") {
+ if ($file == "system_information") {
+ $col = "col1";
+ } else {
+ $col = "col2";
+ }
+ }
+
$offset = strpos($file, '-container');
- if (false !== $offset)
+ if (false !== $offset) {
$file = substr($file, 0, $offset);
+ }
+
+ // Get the widget title that should be in a var defined in the widget's inc file.
+ $widgettitle = ${$file . '_title'};
+
+ if ((strlen($widgettitle) == 0)) {
+ // Fall back to constructing a title from the file name of the widget.
+ $widgettitle = ucwords(str_replace('_', ' ', $file));
+ }
$widgetsfromconfig[ $file ] = array(
- 'name' => ucwords(str_replace('_', ' ', $file)),
+ 'name' => $widgettitle,
'col' => $col,
'display' => $display,
);
@@ -247,40 +293,16 @@ if ($config['widgets'] && $config['widgets']['sequence'] != "") {
##find custom configurations of a particular widget and load its info to $pconfig
foreach ($widgets as $widgetname => $widgetconfig) {
- if ($config['widgets'][$name . '-config']) {
- $pconfig[$name . '-config'] = $config['widgets'][$name . '-config'];
+ if ($config['widgets'][$widgetname . '-config']) {
+ $pconfig[$widgetname . '-config'] = $config['widgets'][$widgetname . '-config'];
}
}
}
-##build list of php include files
-$phpincludefiles = array();
-$directory = "/usr/local/www/widgets/include/";
-$dirhandle = opendir($directory);
-$filename = "";
-
-while (false !== ($filename = readdir($dirhandle))) {
- $phpincludefiles[] = $filename;
-}
-
-foreach ($phpincludefiles as $includename) {
- if (!stristr($includename, ".inc")) {
- continue;
- }
- if (file_exists($directory . $includename)) {
- include($directory . $includename);
- }
-}
-
## Set Page Title and Include Header
-$pgtitle = array(gettext("Status: Dashboard"));
+$pgtitle = array(gettext("Status"), gettext("Dashboard"));
include("head.inc");
-/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */
-if (!verify_all_package_servers()) {
- print_info_box(package_server_mismatch_message());
-}
-
if ($savemsg) {
print_info_box($savemsg);
}
@@ -291,20 +313,20 @@ pfSense_handle_custom_code("/usr/local/pkg/dashboard/pre_dashboard");
<div class="panel panel-default" id="widget-available">
<div class="panel-heading"><?=gettext("Available Widgets"); ?>
- <span class="icons">
- <a data-toggle="collapse" href="#widget-available .panel-body" name="widgets-available">
- <i class="icon-white icon-plus-sign"></i>
+ <span class="widget-heading-icon">
+ <a data-toggle="collapse" href="#widget-available_panel-body" id="widgets-available">
+ <i class="fa fa-plus-circle"></i>
</a>
</span>
</div>
- <div class="panel-body collapse out">
+ <div id="widget-available_panel-body" class="panel-body collapse out">
<div class="content">
<div class="row">
<?php
foreach ($widgets as $widgetname => $widgetconfig):
if ($widgetconfig['display'] == 'none'):
?>
- <div class="col-sm-3"><a href="#" name="btnadd-<?=$widgetname?>"><i class="icon icon-plus"></i> <?=$widgetconfig['name']?></a></div>
+ <div class="col-sm-3"><a href="#" id="btnadd-<?=$widgetname?>"><i class="fa fa-plus"></i> <?=$widgetconfig['name']?></a></div>
<?php endif; ?>
<?php endforeach; ?>
</div>
@@ -335,7 +357,7 @@ foreach ($widgets as $widgetname => $widgetconfig):
</div>
<div class="hidden" id="widgetSequence">
- <form action="/" method="post" id="widgetSequence" name="widgetForm">
+ <form action="/" method="post" id="widgetSequence_form" name="widgetForm">
<input type="hidden" name="sequence" value="" />
<button type="submit" id="btnstore" class="btn btn-primary">Store widget configuration</button>
@@ -344,132 +366,123 @@ foreach ($widgets as $widgetname => $widgetconfig):
<?php
$widgetColumns = array();
-foreach ($widgets as $widgetname => $widgetconfig)
-{
- if ($widgetconfig['display'] == 'none')
+foreach ($widgets as $widgetname => $widgetconfig) {
+ if ($widgetconfig['display'] == 'none') {
continue;
+ }
if (!file_exists('/usr/local/www/widgets/widgets/'. $widgetname.'.widget.php')) {
continue;
}
- if (!isset($widgetColumns[ $widgetconfig['col'] ]))
+ if (!isset($widgetColumns[ $widgetconfig['col'] ])) {
$widgetColumns[ $widgetconfig['col'] ] = array();
+ }
$widgetColumns[ $widgetconfig['col'] ][ $widgetname ] = $widgetconfig;
}
?>
<div class="row">
-<?php foreach ($widgetColumns as $column => $columnWidgets):?>
- <div class="col-md-6" id="widgets-<?=$column?>">
-<?php foreach ($columnWidgets as $widgetname => $widgetconfig):?>
- <div class="panel panel-default" id="widget-<?=$widgetname?>">
- <div class="panel-heading">
- <?=$widgetconfig['name']?>
- <span class="icons">
- <a data-toggle="collapse" href="#widget-<?=$widgetname?> .panel-footer" class="config hidden">
- <i class="icon-white icon-wrench"></i>
- </a>
- <a data-toggle="collapse" href="#widget-<?=$widgetname?> .panel-body">
- <!-- actual icon is determined in css based on state of body -->
- <i class="icon-white icon-plus-sign"></i>
- </a>
- <a data-toggle="close" href="#widget-<?=$widgetname?>">
- <i class="icon-white icon-remove-sign"></i>
- </a>
- </span>
- </div>
- <div class="panel-body collapse<?=($widgetconfig['display']=='close' ? '' : ' in')?>">
- <?php include('/usr/local/www/widgets/widgets/'. $widgetname.'.widget.php'); ?>
- </div>
- </div>
-<?php endforeach; ?>
- </div>
-<?php endforeach; ?>
+<?php
+ $columnWidth = 12 / $numColumns;
+
+ for ($currentColumnNumber = 1; $currentColumnNumber <= $numColumns; $currentColumnNumber++) {
+ echo '<div class="col-md-' . $columnWidth . '" id="widgets-col' . $currentColumnNumber . '">';
+
+ //if col$currentColumnNumber exists
+ if (isset($widgetColumns['col'.$currentColumnNumber])) {
+ $columnWidgets = $widgetColumns['col'.$currentColumnNumber];
+
+ foreach ($columnWidgets as $widgetname => $widgetconfig) {
+ // Compose the widget title and include the title link if available
+ $widgetlink = ${$widgetname . '_title_link'};
+
+ if ((strlen($widgetlink) > 0)) {
+ $wtitle = '<a href="' . $widgetlink . '"> ' . $widgetconfig['name'] . '</a>';
+ } else {
+ $wtitle = $widgetconfig['name'];
+ }
+ ?>
+ <div class="panel panel-default" id="widget-<?=$widgetname?>">
+ <div class="panel-heading">
+ <?=$wtitle?>
+ <span class="widget-heading-icon">
+ <a data-toggle="collapse" href="#widget-<?=$widgetname?>_panel-footer" class="config hidden">
+ <i class="fa fa-wrench"></i>
+ </a>
+ <a data-toggle="collapse" href="#widget-<?=$widgetname?>_panel-body">
+ <!-- actual icon is determined in css based on state of body -->
+ <i class="fa fa-plus-circle"></i>
+ </a>
+ <a data-toggle="close" href="#widget-<?=$widgetname?>">
+ <i class="fa fa-times-circle"></i>
+ </a>
+ </span>
+ </div>
+ <div id="widget-<?=$widgetname?>_panel-body" class="panel-body collapse<?=($widgetconfig['display'] == 'close' ? '' : ' in')?>">
+ <?php include('/usr/local/www/widgets/widgets/'. $widgetname.'.widget.php'); ?>
+ </div>
+ </div>
+ <?php
+ }
+ } else {
+ echo '<div class="col-md-' . $columnWidth . '" id="widgets-col' . $currentColumnNumber . '"></div>';
+ }
+ echo "</div>";
+ }
+?>
+
</div>
-<script>
-function updateWidgets(newWidget)
-{
+<script type="text/javascript">
+//<![CDATA[
+function updateWidgets(newWidget) {
var sequence = '';
- $('.container .col-md-6').each(function(idx, col){
- $('.panel', col).each(function(idx, widget){
+ $('.container .col-md-<?=$columnWidth?>').each(function(idx, col) {
+ $('.panel', col).each(function(idx, widget) {
var isOpen = $('.panel-body', widget).hasClass('in');
- sequence += widget.id.split('-')[1] +':'+ col.id.split('-')[1] +':'+ (isOpen ? 'open' : 'close') +',';
+ sequence += widget.id.split('-')[1] + ':' + col.id.split('-')[1] + ':' + (isOpen ? 'open' : 'close') + ',';
});
});
- if (typeof newWidget !== 'undefined')
- sequence += newWidget + ':' + 'col2:close';
+ if (typeof newWidget !== 'undefined') {
+ // The system_information widget is always added to column one. Others go in column two
+ if (newWidget == "system_information") {
+ sequence += newWidget + ':' + 'col1:open';
+ } else {
+ sequence += newWidget + ':' + 'col2:open';
+ }
+ }
$('#widgetSequence').removeClass('hidden');
- $('input[name=sequence]', $('#widgetSequence')).val(sequence);
+ $('input[name=sequence]', $('#widgetSequence_form')).val(sequence);
}
events.push(function() {
- // Hide configuration button for panels without configuration
- $('.container .panel-heading a.config').each(function (idx, el){
- var config = $(el).parents('.panel').children('.panel-footer');
- if (config.length == 1)
- $(el).removeClass('hidden');
- });
-
- // Initial state & toggle icons of collapsed panel
- $('.container .panel-heading a[data-toggle="collapse"]').each(function (idx, el){
- var body = $(el).parents('.panel').children('.panel-body')
- var isOpen = body.hasClass('in');
-
- $(el).children('i').toggleClass('icon-plus-sign', !isOpen);
- $(el).children('i').toggleClass('icon-minus-sign', isOpen);
-
- body.on('shown.bs.collapse', function(){
- $(el).children('i').toggleClass('icon-minus-sign', true);
- $(el).children('i').toggleClass('icon-plus-sign', false);
-
- if($(el).closest('a').attr('name') != 'widgets-available') {
- updateWidgets();
- }
- });
-
- body.on('hidden.bs.collapse', function(){
- $(el).children('i').toggleClass('icon-minus-sign', false);
- $(el).children('i').toggleClass('icon-plus-sign', true);
-
- if($(el).closest('a').attr('name') != 'widgets-available') {
- updateWidgets();
- }
- });
- });
// Make panels destroyable
- $('.container .panel-heading a[data-toggle="close"]').each(function (idx, el){
- $(el).on('click', function(e){
+ $('.container .panel-heading a[data-toggle="close"]').each(function (idx, el) {
+ $(el).on('click', function(e) {
$(el).parents('.panel').remove();
updateWidgets();
})
});
// Make panels sortable
- $('.container .col-md-6').sortable({
+ $('.container .col-md-<?=$columnWidth?>').sortable({
handle: '.panel-heading',
cursor: 'grabbing',
- connectWith: '.container .col-md-6',
+ connectWith: '.container .col-md-<?=$columnWidth?>',
update: updateWidgets
});
// On clicking a widget to install . .
- $('[name^=btnadd-]').click(function(event) {
- // Extract the widget name from the button name that got us here
- var widgetToAdd = this.name.replace('btnadd-', '');
-
- // Set its display type to 'close'
- <?php $widgets[widgetToAdd]['display'] = 'close'; ?>
-
- // Add it to the list of displayed widgets
- updateWidgets(widgetToAdd);
+ $('[id^=btnadd-]').click(function(event) {
+ // Add the widget name to the list of displayed widgets
+ updateWidgets(this.id.replace('btnadd-', ''));
// We don't want to see the "Store" button because we are doing that automatically
$('#btnstore').hide();
@@ -479,10 +492,12 @@ events.push(function() {
});
});
+//]]>
</script>
<?php
//build list of javascript include files
-foreach (glob('widgets/javascript/*.js') as $file)
+foreach (glob('widgets/javascript/*.js') as $file) {
echo '<script src="'.$file.'"></script>';
+}
include("foot.inc");
diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php
index c9cc38c..0ad0958 100644
--- a/src/usr/local/www/interfaces.php
+++ b/src/usr/local/www/interfaces.php
@@ -1,13 +1,13 @@
<?php
-/* $Id$ */
/*
interfaces.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-2008 Scott Ullrich
* Copyright (c) 2006 Daniel S. Haischt
- * Copyright (c) 2008-2010 Ermal Luçi
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -56,14 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/arp
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-interfaces
-##|*NAME=Interfaces: WAN page
+##|*NAME=Interfaces: WAN
##|*DESCR=Allow access to the 'Interfaces' page.
##|*MATCH=interfaces.php*
##|-PRIV
@@ -78,7 +74,6 @@ require_once("rrd.inc");
require_once("vpn.inc");
require_once("xmlparse_attr.inc");
-define("ALLOWWEP", false);
define("ANTENNAS", false);
if (isset($_POST['referer'])) {
@@ -124,12 +119,14 @@ function remove_bad_chars($string) {
if (!is_array($config['gateways']['gateway_item'])) {
$config['gateways']['gateway_item'] = array();
}
+
$a_gateways = &$config['gateways']['gateway_item'];
$wancfg = &$config['interfaces'][$if];
$old_wancfg = $wancfg;
$old_wancfg['realif'] = get_real_interface($if);
$old_ppps = $a_ppps;
+
// Populate page descr if it does not exist.
if ($if == "wan" && !$wancfg['descr']) {
$wancfg['descr'] = "WAN";
@@ -144,7 +141,7 @@ foreach ($a_ppps as $pppid => $ppp) {
}
}
-$type_disabled = (substr($wancfg['if'], 0, 3) == 'gre') ? 'disabled="disabled"' : '';
+$type_disabled = (substr($wancfg['if'], 0, 3) == 'gre') ? 'disabled' : '';
if ($wancfg['if'] == $a_ppps[$pppid]['if']) {
$pconfig['pppid'] = $pppid;
@@ -220,6 +217,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) {
$pconfig['ptpid'] = interfaces_ptpid_next();
$pppid = count($a_ppps);
}
+
$pconfig['dhcphostname'] = $wancfg['dhcphostname'];
$pconfig['alias-address'] = $wancfg['alias-address'];
$pconfig['alias-subnet'] = $wancfg['alias-subnet'];
@@ -361,8 +359,6 @@ switch ($wancfg['ipaddrv6']) {
break;
}
-// print_r($pconfig);
-
$pconfig['blockpriv'] = isset($wancfg['blockpriv']);
$pconfig['blockbogons'] = isset($wancfg['blockbogons']);
$pconfig['spoofmac'] = $wancfg['spoofmac'];
@@ -432,7 +428,6 @@ if (isset($wancfg['wireless'])) {
$pconfig['debug_mode'] = $wancfg['wireless']['wpa']['debug_mode'];
$pconfig['macaddr_acl'] = $wancfg['wireless']['wpa']['macaddr_acl'];
$pconfig['mac_acl_enable'] = isset($wancfg['wireless']['wpa']['mac_acl_enable']);
- $pconfig['auth_algs'] = $wancfg['wireless']['wpa']['auth_algs'];
$pconfig['wpa_mode'] = $wancfg['wireless']['wpa']['wpa_mode'];
$pconfig['wpa_key_mgmt'] = $wancfg['wireless']['wpa']['wpa_key_mgmt'];
$pconfig['wpa_pairwise'] = $wancfg['wireless']['wpa']['wpa_pairwise'];
@@ -448,23 +443,6 @@ if (isset($wancfg['wireless'])) {
$pconfig['mac_acl'] = $wancfg['wireless']['mac_acl'];
- if(ALLOWWEP) {
- $pconfig['wep_enable'] = isset($wancfg['wireless']['wep']['enable']);
-
- if (is_array($wancfg['wireless']['wep']) && is_array($wancfg['wireless']['wep']['key'])) {
- $i = 1;
- foreach ($wancfg['wireless']['wep']['key'] as $wepkey) {
- $pconfig['key' . $i] = $wepkey['value'];
- if (isset($wepkey['txkey'])) {
- $pconfig['txkey'] = $i;
- }
- $i++;
- }
- if (!isset($wepkey['txkey'])) {
- $pconfig['txkey'] = 1;
- }
- }
- }
}
if ($_POST['apply']) {
@@ -484,7 +462,7 @@ if ($_POST['apply']) {
} else {
interface_bring_down($ifapply, true, $ifcfgo);
if (isset($config['dhcpd'][$ifapply]['enable']) ||
- isset($config['dhcpdv6'][$ifapply]['enable'])) {
+ isset($config['dhcpdv6'][$ifapply]['enable'])) {
services_dhcpd_configure();
}
}
@@ -693,8 +671,8 @@ if ($_POST['apply']) {
continue;
}
if ($config['interfaces'][$ifent]['ipaddrv6'] == 'track6' &&
- $config['interfaces'][$ifent]['track6-interface'] == $_POST['track6-interface'] &&
- $config['interfaces'][$ifent]['track6-prefix-id'] == $track6_prefix_id) {
+ $config['interfaces'][$ifent]['track6-interface'] == $_POST['track6-interface'] &&
+ $config['interfaces'][$ifent]['track6-prefix-id'] == $track6_prefix_id) {
$input_errors[] = sprintf(gettext("This track6 prefix ID is already being used in %s."), $ifdescr);
}
}
@@ -802,12 +780,12 @@ if ($_POST['apply']) {
$input_errors[] = gettext("The idle timeout value must be an integer.");
}
if ($_POST['pppoe_resethour'] != "" && !is_numericint($_POST['pppoe_resethour']) &&
- $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) {
- $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23).");
+ $_POST['pppoe_resethour'] >= 0 && $_POST['pppoe_resethour'] <=23) {
+ $input_errors[] = gettext("A valid PPPoE reset hour must be specified (0-23).");
}
if ($_POST['pppoe_resetminute'] != "" && !is_numericint($_POST['pppoe_resetminute']) &&
- $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) {
- $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59).");
+ $_POST['pppoe_resetminute'] >= 0 && $_POST['pppoe_resetminute'] <=59) {
+ $input_errors[] = gettext("A valid PPPoE reset minute must be specified (0-59).");
}
if ($_POST['pppoe_resetdate'] != "" && !is_numeric(str_replace("/", "", $_POST['pppoe_resetdate']))) {
$input_errors[] = gettext("A valid PPPoE reset date must be specified (mm/dd/yyyy).");
@@ -956,54 +934,6 @@ if ($_POST['apply']) {
$input_errors[] = gettext("Invalid option chosen for OFDM Protection Mode");
}
- if(ALLOWWEP) {
- /* loop through keys and enforce size */
- for ($i = 1; $i <= 4; $i++) {
- if ($_POST['key' . $i]) {
- /* 64 bit */
- if (strlen($_POST['key' . $i]) == 5) {
- continue;
- }
-
- if (strlen($_POST['key' . $i]) == 10) {
- /* hex key */
- if (stristr($_POST['key' . $i], "0x") == false) {
- $_POST['key' . $i] = "0x" . $_POST['key' . $i];
- }
- continue;
- }
-
- if (strlen($_POST['key' . $i]) == 12) {
- /* hex key */
- if (stristr($_POST['key' . $i], "0x") == false) {
- $_POST['key' . $i] = "0x" . $_POST['key' . $i];
- }
- continue;
- }
-
- /* 128 bit */
- if (strlen($_POST['key' . $i]) == 13) {
- continue;
- }
-
- if (strlen($_POST['key' . $i]) == 26) {
- /* hex key */
- if (stristr($_POST['key' . $i], "0x") == false) {
- $_POST['key' . $i] = "0x" . $_POST['key' . $i];
- }
- continue;
- }
-
- if (strlen($_POST['key' . $i]) == 28) {
- continue;
- }
-
- $input_errors[] = gettext("Invalid WEP key. Enter a valid 40, 64, 104 or 128 bit WEP key.");
- break;
- }
- }
- }
-
if ($_POST['passphrase']) {
$passlen = strlen($_POST['passphrase']);
if ($passlen < 8 || $passlen > 63) {
@@ -1017,6 +947,19 @@ if ($_POST['apply']) {
}
}
}
+
+ if ($_POST['ppp_password'] != $_POST['ppp_password_confirm']) {
+ $input_errors[] = gettext("PPP Password and confirmed password must match!");
+ }
+
+ if ($_POST['pppoe_password'] != $_POST['pppoe_password_confirm']) {
+ $input_errors[] = gettext("PPPoE Password and confirmed password must match!");
+ }
+
+ if ($_POST['pptp_password'] != $_POST['pptp_password_confirm']) {
+ $input_errors[] = gettext("PTPP Password and confirmed password must match!");
+ }
+
if (!$input_errors) {
// These 3 fields can be a list of multiple data items when used for MLPPP.
// The UI in this code only processes the first of the list, so save the data here then we can preserve any other entries.
@@ -1195,7 +1138,9 @@ if ($_POST['apply']) {
$a_ppps[$pppid]['if'] = $_POST['type'].$_POST['ptpid'];
$a_ppps[$pppid]['ports'] = $_POST['port'];
$a_ppps[$pppid]['username'] = $_POST['ppp_username'];
- $a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']);
+ if ($_POST['ppp_password'] != DMYPWD) {
+ $a_ppps[$pppid]['password'] = base64_encode($_POST['ppp_password']);
+ }
$a_ppps[$pppid]['phone'] = $_POST['phone'];
$a_ppps[$pppid]['apn'] = $_POST['apn'];
$wancfg['if'] = $_POST['type'] . $_POST['ptpid'];
@@ -1212,7 +1157,9 @@ if ($_POST['apply']) {
$a_ppps[$pppid]['ports'] = $wancfg['if'];
}
$a_ppps[$pppid]['username'] = $_POST['pppoe_username'];
- $a_ppps[$pppid]['password'] = base64_encode($_POST['pppoe_password']);
+ if ($_POST['pppoe_password'] != DMYPWD) {
+ $a_ppps[$pppid]['password'] = base64_encode($_POST['pppoe_password']);
+ }
if (!empty($_POST['provider'])) {
$a_ppps[$pppid]['provider'] = $_POST['provider'];
} else {
@@ -1248,7 +1195,9 @@ if ($_POST['apply']) {
$a_ppps[$pppid]['ports'] = $wancfg['if'];
}
$a_ppps[$pppid]['username'] = $_POST['pptp_username'];
- $a_ppps[$pppid]['password'] = base64_encode($_POST['pptp_password']);
+ if ($_POST['pptp_password'] != DMYPWD) {
+ $a_ppps[$pppid]['password'] = base64_encode($_POST['pptp_password']);
+ }
// Replace the first (0) entry with the posted data. Preserve any other entries that might be there.
$poriginal['pptp_localip'][0] = $_POST['pptp_local0'];
$a_ppps[$pppid]['localip'] = implode(',', $poriginal['pptp_localip']);
@@ -1509,7 +1458,6 @@ function handle_wireless_post() {
$wancfg['wireless']['wpa'] = array();
}
$wancfg['wireless']['wpa']['macaddr_acl'] = $_POST['macaddr_acl'];
- $wancfg['wireless']['wpa']['auth_algs'] = $_POST['auth_algs'];
$wancfg['wireless']['wpa']['wpa_mode'] = $_POST['wpa_mode'];
$wancfg['wireless']['wpa']['wpa_key_mgmt'] = $_POST['wpa_key_mgmt'];
$wancfg['wireless']['wpa']['wpa_pairwise'] = $_POST['wpa_pairwise'];
@@ -1588,17 +1536,6 @@ function handle_wireless_post() {
unset($wancfg['wireless']['wpa']['enable']);
}
- if(ALLOWWEP) {
- if ($_POST['wep_enable'] == "yes") {
- if (!is_array($wancfg['wireless']['wep'])) {
- $wancfg['wireless']['wep'] = array();
- }
- $wancfg['wireless']['wep']['enable'] = $_POST['wep_enable'] = true;
- } else if (isset($wancfg['wireless']['wep'])) {
- unset($wancfg['wireless']['wep']);
- }
- }
-
if ($_POST['wme_enable'] == "yes") {
if (!is_array($wancfg['wireless']['wme'])) {
$wancfg['wireless']['wme'] = array();
@@ -1642,20 +1579,6 @@ function handle_wireless_post() {
unset($wancfg['wireless']['turbo']['enable']);
}
- if(ALLOWWEP) {
- $wancfg['wireless']['wep']['key'] = array();
- for ($i = 1; $i <= 4; $i++) {
- if ($_POST['key' . $i]) {
- $newkey = array();
- $newkey['value'] = $_POST['key' . $i];
- if ($_POST['txkey'] == $i) {
- $newkey['txkey'] = true;
- }
- $wancfg['wireless']['wep']['key'][] = $newkey;
- }
- }
- }
-
interface_sync_wireless_clones($wancfg, true);
}
@@ -1713,8 +1636,6 @@ $shortcut_section = "interfaces";
$types4 = array("none" => gettext("None"), "staticv4" => gettext("Static IPv4"), "dhcp" => gettext("DHCP"), "ppp" => gettext("PPP"), "pppoe" => gettext("PPPoE"), "pptp" => gettext("PPTP"), "l2tp" => gettext("L2TP"));
$types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"), "dhcp6" => gettext("DHCP6"), "slaac" => gettext("SLAAC"), "6rd" => gettext("6rd Tunnel"), "6to4" => gettext("6to4 Tunnel"), "track6" => gettext("Track Interface"));
-$closehead = false;
-
// Get the MAC address
$ip = $_SERVER['REMOTE_ADDR'];
$mymac = `/usr/sbin/arp -an | grep '('{$ip}')' | head -n 1 | cut -d" " -f4`;
@@ -1762,20 +1683,20 @@ function build_gatewayv6_list() {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if (is_subsystem_dirty('interfaces'))
+if (is_subsystem_dirty('interfaces')) {
print_info_box_np(sprintf(gettext("The %s configuration has been changed."), $wancfg['descr']) . "<br />" .
gettext("You must apply the changes in order for them to take effect. Don't forget to adjust the DHCP Server range if needed after applying."));
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-require_once('classes/Form.class.php');
-require_once('classes/Modal.class.php');
-
$form = new Form(new Form_Button(
'Submit',
gettext("Save")
@@ -1813,10 +1734,10 @@ $section->addInput(new Form_Select(
));
$macaddress = new Form_Input(
- 'mac',
+ 'spoofmac',
'MAC Address',
'text',
- $pconfig['mac'],
+ $pconfig['spoofmac'],
['placeholder' => 'xx:xx:xx:xx:xx:xx']
);
@@ -1893,56 +1814,6 @@ $section->add($group);
$form->add($section);
-// Add new gateway modal pop-up
-$modal = new Modal('New gateway', 'newgateway', 'large');
-
-$modal->addInput(new Form_Checkbox(
- 'defaultgw',
- 'Default',
- 'Default gateway',
- ($if == "wan" || $if == "WAN")
-));
-
-$modal->addInput(new Form_Input(
- 'name',
- 'Gateway name',
- 'text',
- $wancfg['descr'] . "GW"
-));
-
-$modal->addInput(new Form_IpAddress(
- 'gatewayip',
- 'Gateway IPv4',
- null
-));
-
-$modal->addInput(new Form_Input(
- 'gatewaydescr',
- 'Description',
- 'text'
-));
-
-$btnaddgw = new Form_Button(
- 'add',
- 'Add'
-);
-
-$btnaddgw->removeClass('btn-primary')->addClass('btn-success');
-
-$btncnxgw = new Form_Button(
- 'cnx',
- 'Cancel'
-);
-
-$btncnxgw->removeClass('btn-primary')->addClass('btn-default');
-
-$modal->addInput(new Form_StaticText(
- null,
- $btnaddgw . $btncnxgw
-));
-
-$form->add($modal);
-
$section = new Form_Section('Static IPv6 configuration');
$section->addClass('staticv6');
@@ -2087,7 +1958,8 @@ $group->add(new Form_Input(
'adv_dhcp_pt_select_timeout',
null,
'number',
- $pconfig['adv_dhcp_pt_select_timeout']
+ $pconfig['adv_dhcp_pt_select_timeout'],
+ ['min' => 0]
))->setHelp('Select timeout');
$group->add(new Form_Input(
@@ -2155,7 +2027,7 @@ $section->add($group);
$section->addInput(new Form_Input(
'adv_dhcp_config_file_override_path',
- 'Option modifiers',
+ 'Config file override',
'text',
$pconfig['adv_dhcp_config_file_override_path']
))->sethelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '<br />' .
@@ -2187,10 +2059,10 @@ $section->addInput(new Form_Input(
'Some ISPs may require certain options be or not be requested.');
$section->addInput(new Form_Input(
- 'adv_dhcp_require_options',
- 'Request options',
+ 'adv_dhcp_required_options',
+ 'Require options',
'text',
- $pconfig['adv_dhcp_require_options']
+ $pconfig['adv_dhcp_required_options']
))->sethelp('The values in this field are DHCP options required by the client when requesting a DHCP lease. [option [, ...]]');
$section->addInput(new Form_Input(
@@ -2599,7 +2471,7 @@ $section->addInput(new Form_Input(
$pconfig['ppp_username']
));
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'ppp_password',
'Password',
'password',
@@ -2665,7 +2537,7 @@ $section->addInput(new Form_Input(
$pconfig['pppoe_username']
));
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'pppoe_password',
'Password',
'password',
@@ -2796,7 +2668,7 @@ $section->addInput(new Form_Input(
$pconfig['pptp_username']
));
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'pptp_password',
'Password',
'password',
@@ -2874,8 +2746,9 @@ if (isset($wancfg['wireless'])) {
}
}
- if (count($mode_list) == 1)
+ if (count($mode_list) == 1) {
$mode_list[''] = '';
+ }
$section->addInput(new Form_Select(
'standard',
@@ -2891,9 +2764,7 @@ if (isset($wancfg['wireless'])) {
$pconfig['protmode'],
['off' => 'Off', 'cts' => 'CTS to self', 'rtscts' => 'RTS and CTS']
))->setHelp('For IEEE 802.11g, use the specified technique for protecting OFDM frames in a mixed 11b/11g network.');
- }
- else
- {
+ } else {
$section->addInput(new Form_Input(
'protmode',
null,
@@ -3085,50 +2956,6 @@ if (isset($wancfg['wireless'])) {
$form->add($section);
- if(ALLOWWEP) {
- // WEP Section
- $section = new Form_Section('WEP');
-
- $section->addInput(new Form_Checkbox(
- 'wep_enable',
- 'Enable',
- 'Enable WEP',
- $pconfig['wep_enable'],
- 'yes'
- ));
-
- for($idx=1; $idx <= 4; $idx++) {
- $group = new Form_Group('Key' . $idx);
-
- $group->add(new Form_Input(
- 'key' . $idx,
- null,
- 'text',
- $pconfig['key' . $idx]
- ));
-
- $group->add(new Form_Checkbox(
- 'txkey',
- null,
- null,
- $pconfig['txkey'],
- $idx
- ))->displayAsRadio()->setHelp($idx == 4 ? 'Tx key':'');
-
- $section->add($group);
- }
-
- $section->addInput(new Form_StaticText(
- null,
- '<span class="help-block">' .
- gettext('40 (64) bit keys may be entered as 5 ASCII characters or 10 hex digits preceded by "0x"') . '<br />' .
- gettext('104 (128) bit keys may be entered as 13 ASCII characters or 26 hex digits preceded by "0x"') .
- '</span>'
- ));
-
- $form->add($section);
- }
-
// WPA Section
$section = new Form_Section('WPA');
@@ -3161,22 +2988,6 @@ if (isset($wancfg['wireless'])) {
['WPA-PSK' => 'Pre-Shared Key', 'WPA-EAP' => 'Extensible Authentication Protocol', 'WPA-PSK WPA-EAP' => 'Both']
));
- if(ALLOWWEP) {
- $section->addInput(new Form_Select(
- 'auth_algs',
- 'Authentication',
- $pconfig['auth_algs'],
- ['1' => 'Open System Authentication', '2' => 'Shared Key Authentication', '3' => 'Both']
- ))->setHelp('Shared Key Authentication requires WEP');
- } else {
- $section->addInput(new Form_Input(
- 'auth_algs',
- null,
- 'hidden',
- '1'
- ));;
- }
-
$section->addInput(new Form_Select(
'wpa_pairwise',
'WPA Pairwise',
@@ -3291,7 +3102,7 @@ $section->addInput(new Form_Checkbox(
' as well as loopback addresses (127/8). You should generally leave this option turned on, unless your WAN network ' .
'lies in such a private address space, too.');
- $section->addInput(new Form_Checkbox(
+$section->addInput(new Form_Checkbox(
'blockbogons',
'Block bogon networks',
'',
@@ -3326,25 +3137,80 @@ $form->addGlobal(new Form_Input(
$pconfig['ptpid']
));
+
+// Add new gateway modal pop-up
+$modal = new Modal('New gateway', 'newgateway', 'large');
+
+$modal->addInput(new Form_Checkbox(
+ 'defaultgw',
+ 'Default',
+ 'Default gateway',
+ ($if == "wan" || $if == "WAN")
+));
+
+$modal->addInput(new Form_Input(
+ 'name',
+ 'Gateway name',
+ 'text',
+ $wancfg['descr'] . "GW"
+));
+
+$modal->addInput(new Form_IpAddress(
+ 'gatewayip',
+ 'Gateway IPv4',
+ null
+));
+
+$modal->addInput(new Form_Input(
+ 'gatewaydescr',
+ 'Description',
+ 'text'
+));
+
+$btnaddgw = new Form_Button(
+ 'add',
+ 'Add'
+);
+
+$btnaddgw->removeClass('btn-primary')->addClass('btn-success');
+
+$btncnxgw = new Form_Button(
+ 'cnx',
+ 'Cancel'
+);
+
+$btncnxgw->removeClass('btn-primary')->addClass('btn-default');
+
+$modal->addInput(new Form_StaticText(
+ null,
+ $btnaddgw . $btncnxgw
+));
+
+$form->add($modal);
+
print($form);
?>
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
-
+events.push(function() {
function updateType(t) {
+
switch (t) {
case "none": {
$('.dhcpadvanced, .staticv4, .dhcp, .pppoe, .pptp, .ppp').hide();
break;
}
case "staticv4": {
- $('.dhcpadvanced, .none, .dhcp, .pppoe, .pptp, .ppp').hide();
+ $('.dhcpadvanced, .none, .dhcp').hide();
+ $('.pppoe, .pptp, .ppp').hide();
break;
}
case "dhcp": {
- $('.dhcpadvanced, .none, .staticv4, .pppoe, .pptp, .ppp').hide();
+ $('.dhcpadvanced, .none').hide();
+ $('.staticv4').hide(); // MYSTERY: This line makes the page very slow to load, but why? There is nothing special
+ // about the staticv4 class
+ $('.pppoe, .pptp, .ppp').hide();
break;
}
case "ppp": {
@@ -3370,8 +3236,9 @@ events.push(function(){
}
function updateTypeSix(t) {
- if (!isNaN(t[0]))
+ if (!isNaN(t[0])) {
t = '_' + t;
+ }
switch (t) {
case "none": {
@@ -3483,8 +3350,7 @@ events.push(function(){
$("#newgateway").modal('hide');
}
- function addOption(selectbox, text, value)
- {
+ function addOption(selectbox, text, value) {
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
@@ -3515,8 +3381,7 @@ events.push(function(){
}
- function addOption_v6(selectbox, text, value)
- {
+ function addOption_v6(selectbox, text, value) {
var optn = document.createElement("OPTION");
optn.text = text;
optn.value = value;
@@ -3547,7 +3412,6 @@ events.push(function(){
}
function country_list() {
-
$('#country').children().remove();
$('#provider_list').children().remove();
$('#providerplan').children().remove();
@@ -3656,7 +3520,7 @@ events.push(function(){
var adv = $('#dhcpadv').prop('checked');
var ovr = $('#dhcpovr').prop('checked');
- if(ovr) {
+ if (ovr) {
hideInput('dhcphostname', true);
hideIpAddress('alias-address', true);
hideInput('dhcprejectfrom', true);
@@ -3671,34 +3535,64 @@ events.push(function(){
}
}
+ // DHCP preset actions
+ // Set presets from value of radio buttons
+ function setPresets(val) {
+ // timeout, retry, select-timeout, reboot, backoff-cutoff, initial-interval
+ if (val == "DHCP") setPresetsnow("60", "300", "0", "10", "120", "10");
+ if (val == "pfSense") setPresetsnow("60", "15", "0", "", "", "1");
+ if (val == "SavedCfg") setPresetsnow("<?=htmlspecialchars($pconfig['adv_dhcp_pt_timeout']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_retry']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_select_timeout']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_reboot']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_backoff_cutoff']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_initial_interval']);?>");
+ if (val == "Clear") setPresetsnow("", "", "", "", "", "");
+ }
+
+ function setPresetsnow(timeout, retry, selecttimeout, reboot, backoffcutoff, initialinterval) {
+ $('#adv_dhcp_pt_timeout').val(timeout);
+ $('#adv_dhcp_pt_retry').val(retry);
+ $('#adv_dhcp_pt_select_timeout').val(selecttimeout);
+ $('#adv_dhcp_pt_reboot').val(reboot);
+ $('#adv_dhcp_pt_backoff_cutoff').val(backoffcutoff);
+ $('#adv_dhcp_pt_initial_interval').val(initialinterval);
+ }
+
// ---------- On initial page load ------------------------------------------------------------
updateType($('#type').val());
updateTypeSix($('#type6').val());
show_reset_settings($('#pppoe-reset-type').val());
- $("#add").prop('type' ,'button');
- $("#cnx").prop('type' ,'button');
- $("#addgw").prop('type' ,'button');
- $("#add6").prop('type' ,'button');
- $("#cnx6").prop('type' ,'button');
- $("#addgw6").prop('type' ,'button');
+ $("#add").prop('type', 'button');
+ $("#cnx").prop('type', 'button');
+ $("#addgw").prop('type', 'button');
+ $("#add6").prop('type', 'button');
+ $("#cnx6").prop('type', 'button');
+ $("#addgw6").prop('type', 'button');
hideClass('dhcp6advanced', true);
hideClass('dhcpadvanced', true);
show_dhcp6adv();
setDHCPoptions()
+ // Set preset buttons on page load
+ var sv = "<?=htmlspecialchars($pconfig['adv_dhcp_pt_values']);?>";
+ if (sv == "") {
+ $("input[name=adv_dhcp_pt_values][value='SavedCfg']").prop('checked', true);
+ } else {
+ $("input[name=adv_dhcp_pt_values][value="+sv+"]").prop('checked', true);
+ }
+
+ // Set preset from value
+ setPresets(sv);
+
// ---------- Click checkbox handlers ---------------------------------------------------------
- $('#type').on('change', function() {
- updateType( this.value );
+ $('#type').on('change', function() {
+ updateType(this.value);
});
$('#type6').on('change', function() {
- updateTypeSix( this.value );
+ updateTypeSix(this.value);
});
$('#pppoe-reset-type').on('change', function() {
- show_reset_settings( this.value );
+ show_reset_settings(this.value);
});
$("#add").click(function() {
@@ -3741,37 +3635,11 @@ events.push(function(){
show_dhcp6adv();
});
- // DHCP preset actions
- // Set presets from value of radio buttons
- function setPresets(val) {
- // timeout, retry, select-timeout, reboot, backoff-cutoff, initial-interval
- if (val == "DHCP") setPresetsnow("60", "300", "0", "10", "120", "10");
- if (val == "pfSense") setPresetsnow("60", "15", "0", "", "", "1");
- if (val == "SavedCfg") setPresetsnow("<?=htmlspecialchars($pconfig['adv_dhcp_pt_timeout']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_retry']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_select_timeout']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_reboot']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_backoff_cutoff']);?>", "<?=htmlspecialchars($pconfig['adv_dhcp_pt_initial_interval']);?>");
- if (val == "Clear") setPresetsnow("", "", "", "", "", "");
- }
-
- function setPresetsnow(timeout, retry, selecttimeout, reboot, backoffcutoff, initialinterval) {
- $('#adv_dhcp_pt_timeout').val(timeout);
- $('#adv_dhcp_pt_retry').val(retry);
- $('#adv_dhcp_pt_select_timeout').val(selecttimeout);
- $('#adv_dhcp_pt_reboot').val(reboot);
- $('#adv_dhcp_pt_backoff_cutoff').val(backoffcutoff);
- $('#adv_dhcp_pt_initial_interval').val(initialinterval);
- }
-
- // Set preset buttons on page load
- var sv = "<?=htmlspecialchars($pconfig['adv_dhcp_pt_values']);?>";
- if(sv == "")
- $("input[name=adv_dhcp_pt_values][value='SavedCfg']").prop('checked', true);
-
- // Set preset from value
- setPresets(sv);
-
// On click . .
- $('[id=adv_dhcp_pt_values]').click(function () {
+ $('[name=adv_dhcp_pt_values]').click(function () {
setPresets($('input[name=adv_dhcp_pt_values]:checked').val());
});
+
});
//]]>
</script>
diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php
index 0e2152e..95f949d 100644
--- a/src/usr/local/www/interfaces_assign.php
+++ b/src/usr/local/www/interfaces_assign.php
@@ -1,42 +1,65 @@
<?php
/*
interfaces_assign.php
- part of m0n0wall (http://m0n0.ch/wall)
- Written by Jim McBeath based on existing m0n0wall files
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Written by Jim McBeath based on existing m0n0wall files
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-assignnetworkports
-##|*NAME=Interfaces: Assign network ports page
+##|*NAME=Interfaces: Assign network ports
##|*DESCR=Allow access to the 'Interfaces: Assign network ports' page.
##|*MATCH=interfaces_assign.php*
##|-PRIV
@@ -383,8 +406,9 @@ if (isset($_POST['add']) && isset($_POST['if_add'])) {
}
} else {
unset($delbtn);
- if (!empty($_POST['del']))
+ if (!empty($_POST['del'])) {
$delbtn = key($_POST['del']);
+ }
if (isset($delbtn)) {
$id = $delbtn;
@@ -480,20 +504,21 @@ if (file_exists("/tmp/reload_interfaces")) {
pfSense_handle_custom_code("/usr/local/pkg/interfaces_assign/pre_input_errors");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
-$tab_array[0] = array(gettext("Interface assignments"), true, "interfaces_assign.php");
-$tab_array[1] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
-$tab_array[2] = array(gettext("Wireless"), false, "interfaces_wireless.php");
-$tab_array[3] = array(gettext("VLANs"), false, "interfaces_vlan.php");
-$tab_array[4] = array(gettext("QinQs"), false, "interfaces_qinq.php");
-$tab_array[5] = array(gettext("PPPs"), false, "interfaces_ppps.php");
-$tab_array[7] = array(gettext("GRE"), false, "interfaces_gre.php");
-$tab_array[8] = array(gettext("GIF"), false, "interfaces_gif.php");
-$tab_array[9] = array(gettext("Bridges"), false, "interfaces_bridge.php");
-$tab_array[10] = array(gettext("LAGG"), false, "interfaces_lagg.php");
+$tab_array[] = array(gettext("Interface assignments"), true, "interfaces_assign.php");
+$tab_array[] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
+$tab_array[] = array(gettext("Wireless"), false, "interfaces_wireless.php");
+$tab_array[] = array(gettext("VLANs"), false, "interfaces_vlan.php");
+$tab_array[] = array(gettext("QinQs"), false, "interfaces_qinq.php");
+$tab_array[] = array(gettext("PPPs"), false, "interfaces_ppps.php");
+$tab_array[] = array(gettext("GRE"), false, "interfaces_gre.php");
+$tab_array[] = array(gettext("GIF"), false, "interfaces_gif.php");
+$tab_array[] = array(gettext("Bridges"), false, "interfaces_bridge.php");
+$tab_array[] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
?>
<form action="interfaces_assign.php" method="post">
@@ -503,22 +528,24 @@ display_top_tabs($tab_array);
<tr>
<th><?=gettext("Interface")?></th>
<th><?=gettext("Network port")?></th>
+ <th>&nbsp;</th>
</tr>
</thead>
<tbody>
<?php
foreach ($config['interfaces'] as $ifname => $iface):
- if ($iface['descr'])
+ if ($iface['descr']) {
$ifdescr = $iface['descr'];
- else
+ } else {
$ifdescr = strtoupper($ifname);
+ }
?>
<tr>
<td><a href="/interfaces.php?if=<?=$ifname?>"><?=$ifdescr?></a></td>
<td>
<select name="<?=$ifname?>" id="<?=$ifname?>" class="form-control">
<?php foreach ($portlist as $portname => $portinfo):?>
- <option value="<?=$portname?>" <?=($portname == $iface['if']) ? ' selected="selected"': ''?>>
+ <option value="<?=$portname?>" <?=($portname == $iface['if']) ? ' selected': ''?>>
<?=interface_assign_description($portinfo, $portname)?>
</option>
<?php endforeach;?>
@@ -526,7 +553,10 @@ display_top_tabs($tab_array);
</td>
<td>
<?php if ($ifname != 'wan'):?>
- <input type="submit" name="del[<?=$ifname?>]" class="btn btn-danger" value="<?=gettext("delete interface")?>"/>
+ <button type="submit" name="del[<?=$ifname?>]" class="btn btn-danger btn-sm" title="<?=gettext("Delete interface")?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete")?>
+ </button>
<?php endif;?>
</td>
</tr>
@@ -540,14 +570,17 @@ display_top_tabs($tab_array);
<td>
<select name="if_add" id="if_add" class="form-control">
<?php foreach ($unused_portlist as $portname => $portinfo):?>
- <option value="<?=$portname?>" <?=($portname == $iface['if']) ? ' selected="selected"': ''?>>
+ <option value="<?=$portname?>" <?=($portname == $iface['if']) ? ' selected': ''?>>
<?=interface_assign_description($portinfo, $portname)?>
</option>
<?php endforeach;?>
</select>
</td>
<td>
- <input type="submit" name="add" title="<?=gettext("add selected interface")?>" value="add interface" class="btn btn-success" />
+ <button type="submit" name="add" title="<?=gettext("Add selected interface")?>" value="add interface" class="btn btn-success btn-sm" >
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </button>
</td>
</tr>
<?php endif;?>
@@ -555,9 +588,9 @@ display_top_tabs($tab_array);
</table>
</div>
- <input name="Submit" type="submit" class="btn btn-default" value="<?=gettext("Save")?>" /><br /><br />
+ <button name="Submit" type="submit" class="btn btn-primary" value="<?=gettext('Save')?>"><?=gettext('Save')?></button>
</form>
-
+<br />
<p class="alert alert-info"><?=gettext("Interfaces that are configured as members of a lagg(4) interface will not be shown.")?></p>
<?php include("foot.inc")?>
diff --git a/src/usr/local/www/interfaces_bridge.php b/src/usr/local/www/interfaces_bridge.php
index df28e78..9a45bc6 100644
--- a/src/usr/local/www/interfaces_bridge.php
+++ b/src/usr/local/www/interfaces_bridge.php
@@ -1,41 +1,61 @@
<?php
-/* $Id$ */
/*
interfaces_bridge.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: interfaces_assign
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-bridge
-##|*NAME=Interfaces: Bridge page
+##|*NAME=Interfaces: Bridge
##|*DESCR=Allow access to the 'Interfaces: Bridge' page.
##|*MATCH=interfaces_bridge.php*
##|-PRIV
@@ -86,13 +106,13 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array(gettext("Interfaces"),gettext("Bridge"));
+$pgtitle = array(gettext("Interfaces"), gettext("Bridge"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
- print_input_errors($input_errors); ?>
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
-<?php
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
$tab_array[] = array(gettext("Interface Groups"), false, "interfaces_groups.php");
@@ -138,8 +158,9 @@ foreach ($a_bridges as $bridge) {
echo $ifdescrs[$member];
$j++;
}
- if ($j > 0 && $j < count($members))
+ if ($j > 0 && $j < count($members)) {
echo ", ";
+ }
}
?>
</td>
@@ -147,8 +168,8 @@ foreach ($a_bridges as $bridge) {
<?=htmlspecialchars($bridge['descr'])?>
</td>
<td>
- <a href="interfaces_bridge_edit.php?id=<?=$i?>" class="btn btn-default btn-xs"><?=gettext("Edit")?></a>
- <a href="interfaces_bridge.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit interface bridge')?>" href="interfaces_bridge_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete interface bridge')?>" href="interfaces_bridge.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -159,9 +180,12 @@ foreach ($a_bridges as $bridge) {
</table>
<nav class="action-buttons">
- <a href="interfaces_bridge_edit.php" class="btn btn-success"><?=gettext("Add")?></a>
+ <a href="interfaces_bridge_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/interfaces_bridge_edit.php b/src/usr/local/www/interfaces_bridge_edit.php
index cdc6a94..4997ef5 100644
--- a/src/usr/local/www/interfaces_bridge_edit.php
+++ b/src/usr/local/www/interfaces_bridge_edit.php
@@ -1,48 +1,70 @@
<?php
-/* $Id$ */
/*
interfaces_bridge_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-bridge-edit
-##|*NAME=Interfaces: Bridge edit page
+##|*NAME=Interfaces: Bridge edit
##|*DESCR=Allow access to the 'Interfaces: Bridge : Edit' page.
##|*MATCH=interfaces_bridge_edit.php*
##|-PRIV
require("guiconfig.inc");
-if (!is_array($config['bridges']['bridged']))
+if (!is_array($config['bridges']['bridged'])) {
$config['bridges']['bridged'] = array();
+}
$a_bridges = &$config['bridges']['bridged'];
@@ -187,7 +209,19 @@ if ($_POST) {
if ($_POST['span'] != "none" && $_POST['span'] == $ifmembers) {
$input_errors[] = gettext("Span interface cannot be part of the bridge. Remove the span interface from bridge members to continue.");
}
+ foreach ($a_bridges as $a_bridge) {
+ if ($_POST['bridgeif'] === $a_bridge['bridgeif']) {
+ continue;
+ }
+ $a_members = explode(',', $a_bridge['members']);
+ foreach ($a_members as $a_member) {
+ if ($ifmembers === $a_member) {
+ $input_errors[] = $ifmembers . gettext(" is part of another bridge. Remove the interface from bridge members to continue.");
+ }
+ }
+ }
}
+ $pconfig['members'] = implode(',', $_POST['members']);
}
if (!$input_errors) {
@@ -283,8 +317,9 @@ function build_spanport_list() {
$splist = array('none' => 'None');
- foreach ($ifacelist as $ifn => $ifdescr)
+ foreach ($ifacelist as $ifn => $ifdescr) {
$splist[$ifn] = $ifdescr;
+ }
return($splist);
}
@@ -323,14 +358,13 @@ function build_port_list($selecton) {
return($portlist);
}
-$pgtitle = array(gettext("Interfaces"),gettext("Bridge"),gettext("Edit"));
+$pgtitle = array(gettext("Interfaces"), gettext("Bridge"), gettext("Edit"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -347,7 +381,7 @@ $section->addInput(new Form_Select(
))->setHelp('Interfaces participating in the bridge');
$section->addInput(new Form_Input(
- 'Descr',
+ 'descr',
'Description',
'text',
$pconfig['descr']
@@ -365,10 +399,11 @@ $form->add($section);
$section = new Form_Section('Advanced Configuration');
// Set initial toggle state manually for now
-if($pconfig['showadvanced'])
+if ($pconfig['showadvanced']) {
$section->addClass('toggle-advanced in');
-else
+} else {
$section->addClass('toggle-advanced collapse');
+}
$section->addInput(new Form_Input(
'maxaddr',
@@ -468,10 +503,11 @@ $section->addInput(new Form_Checkbox(
// Show the spanning tree section
$form->add($section);
$section = new Form_Section('RSTP/STP');
-if($pconfig['showadvanced'])
+if ($pconfig['showadvanced']) {
$section->addClass('toggle-advanced in');
-else
+} else {
$section->addClass('toggle-advanced collapse');
+}
$section->addInput(new Form_Select(
'proto',
@@ -556,7 +592,23 @@ foreach ($ifacelist as $ifn => $ifdescr) {
$i++;
}
+$section->addInput(new Form_Input(
+ 'bridgeif',
+ null,
+ 'hidden',
+ $pconfig['bridgeif']
+));
+
+if (isset($id) && $a_bridges[$id]) {
+ $section->addInput(new Form_Input(
+ 'id',
+ null,
+ 'hidden',
+ $id
+ ));
+}
+
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/interfaces_gif.php b/src/usr/local/www/interfaces_gif.php
index 8b62154..dd56647 100644
--- a/src/usr/local/www/interfaces_gif.php
+++ b/src/usr/local/www/interfaces_gif.php
@@ -1,41 +1,61 @@
<?php
-/* $Id$ */
/*
interfaces_gif.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-gif
-##|*NAME=Interfaces: GIF page
+##|*NAME=Interfaces: GIF
##|*DESCR=Allow access to the 'Interfaces: GIF' page.
##|*MATCH=interfaces_gif.php*
##|-PRIV
@@ -84,8 +104,9 @@ $pgtitle = array(gettext("Interfaces"), gettext("GIF"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
@@ -124,8 +145,8 @@ display_top_tabs($tab_array);
<?=htmlspecialchars($gif['descr'])?>
</td>
<td>
- <a href="interfaces_gif_edit.php?id=<?=$i?>" class="btn btn-default btn-xs"><?=gettext("Edit")?></a>
- <a href="interfaces_gif.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit GIF interface')?>" href="interfaces_gif_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete GIF interface')?>" href="interfaces_gif.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php endforeach; ?>
@@ -134,9 +155,10 @@ display_top_tabs($tab_array);
</div>
<nav class="action-buttons">
- <a href="interfaces_gif_edit.php" class="btn btn-success">
+ <a href="interfaces_gif_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add")?>
</a>
</nav>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/interfaces_gif_edit.php b/src/usr/local/www/interfaces_gif_edit.php
index 8aa8722..6f04802 100644
--- a/src/usr/local/www/interfaces_gif_edit.php
+++ b/src/usr/local/www/interfaces_gif_edit.php
@@ -1,48 +1,70 @@
<?php
-/* $Id$ */
/*
interfaces_gif_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-gif-edit
-##|*NAME=Interfaces: GIF: Edit page
+##|*NAME=Interfaces: GIF: Edit
##|*DESCR=Allow access to the 'Interfaces: GIF: Edit' page.
##|*MATCH=interfaces_gif_edit.php*
##|-PRIV
require("guiconfig.inc");
-if (!is_array($config['gifs']['gif']))
+if (!is_array($config['gifs']['gif'])) {
$config['gifs']['gif'] = array();
+}
$a_gifs = &$config['gifs']['gif'];
@@ -83,11 +105,11 @@ if ($_POST) {
(!is_ipaddr($_POST['remote-addr']))) {
$input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
}
-
+
if (!is_numericint($_POST['tunnel-remote-net'])) {
$input_errors[] = gettext("The gif tunnel subnet must be an integer.");
}
-
+
if (is_ipaddrv4($_POST['tunnel-local-addr'])) {
if (!is_ipaddrv4($_POST['tunnel-remote-addr'])) {
$input_errors[] = gettext("The gif tunnel remote address must be IPv4 where tunnel local address is IPv4.");
@@ -137,20 +159,22 @@ if ($_POST) {
$gif['gifif'] = $_POST['gifif'];
$gif['gifif'] = interface_gif_configure($gif);
- if ($gif['gifif'] == "" || !stristr($gif['gifif'], "gif"))
+ if ($gif['gifif'] == "" || !stristr($gif['gifif'], "gif")) {
$input_errors[] = gettext("Error occurred creating interface, please retry.");
- else {
- if (isset($id) && $a_gifs[$id])
+ } else {
+ if (isset($id) && $a_gifs[$id]) {
$a_gifs[$id] = $gif;
- else
+ } else {
$a_gifs[] = $gif;
+ }
write_config();
$confif = convert_real_interface_to_friendly_interface_name($gif['gifif']);
- if ($confif != "")
+ if ($confif != "") {
interface_configure($confif);
+ }
header("Location: interfaces_gif.php");
exit;
@@ -161,20 +185,20 @@ if ($_POST) {
function build_parent_list() {
$parentlist = array();
$portlist = get_possible_listen_ips();
- foreach ($portlist as $ifn => $ifinfo)
+ foreach ($portlist as $ifn => $ifinfo) {
$parentlist[$ifn] = $ifinfo;
+ }
return($parentlist);
}
-$pgtitle = array(gettext("Interfaces"),gettext("GIF"),gettext("Edit"));
+$pgtitle = array(gettext("Interfaces"), gettext("GIF"), gettext("Edit"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
diff --git a/src/usr/local/www/interfaces_gre.php b/src/usr/local/www/interfaces_gre.php
index 7d77c66..00a2397 100644
--- a/src/usr/local/www/interfaces_gre.php
+++ b/src/usr/local/www/interfaces_gre.php
@@ -1,41 +1,61 @@
<?php
-/* $Id$ */
/*
interfaces_gre.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-gre
-##|*NAME=Interfaces: GRE page
+##|*NAME=Interfaces: GRE
##|*DESCR=Allow access to the 'Interfaces: GRE' page.
##|*MATCH=interfaces_gre.php*
##|-PRIV
@@ -84,8 +104,9 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Interfaces"), gettext("GRE"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
@@ -123,12 +144,8 @@ display_top_tabs($tab_array);
<?=htmlspecialchars($gre['descr'])?>
</td>
<td>
- <a href="interfaces_gre_edit.php?id=<?=$i?>" class="btn btn-default btn-xs">
- <?=gettext("Edit")?>
- </a>
- <a href="interfaces_gre.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs">
- <?=gettext("Delete")?>
- </a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit GRE interface')?>" href="interfaces_gre_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete GRE interface')?>" href="interfaces_gre.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php endforeach; ?>
@@ -137,9 +154,10 @@ display_top_tabs($tab_array);
</div>
<nav class="action-buttons">
- <a href="interfaces_gre_edit.php" class="btn btn-success">
+ <a href="interfaces_gre_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add")?>
</a>
</nav>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/interfaces_gre_edit.php b/src/usr/local/www/interfaces_gre_edit.php
index b092ab1..6ce4a5f 100644
--- a/src/usr/local/www/interfaces_gre_edit.php
+++ b/src/usr/local/www/interfaces_gre_edit.php
@@ -1,40 +1,61 @@
<?php
-/* $Id$ */
/*
interfaces_gre_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-gre-edit
-##|*NAME=Interfaces: GRE: Edit page
+##|*NAME=Interfaces: GRE: Edit
##|*DESCR=Allow access to the 'Interfaces: GRE: Edit' page.
##|*MATCH=interfaces_gre_edit.php*
##|-PRIV
@@ -42,8 +63,9 @@
require("guiconfig.inc");
require_once("functions.inc");
-if (!is_array($config['gres']['gre']))
+if (!is_array($config['gres']['gre'])) {
$config['gres']['gre'] = array();
+}
$a_gres = &$config['gres']['gre'];
@@ -83,11 +105,11 @@ if ($_POST) {
(!is_ipaddr($_POST['remote-addr']))) {
$input_errors[] = gettext("The tunnel local and tunnel remote fields must have valid IP addresses.");
}
-
+
if (!is_numericint($_POST['tunnel-remote-net'])) {
$input_errors[] = gettext("The GRE tunnel subnet must be an integer.");
}
-
+
if (is_ipaddrv4($_POST['tunnel-local-addr'])) {
if (!is_ipaddrv4($_POST['tunnel-remote-addr'])) {
$input_errors[] = gettext("The GRE Tunnel remote address must be IPv4 where tunnel local address is IPv4.");
@@ -105,7 +127,7 @@ if ($_POST) {
$input_errors[] = gettext("The GRE tunnel subnet must be an integer between 1 and 128.");
}
}
-
+
foreach ($a_gres as $gre) {
if (isset($id) && ($a_gres[$id]) && ($a_gres[$id] === $gre)) {
continue;
@@ -144,8 +166,9 @@ if ($_POST) {
$confif = convert_real_interface_to_friendly_interface_name($gre['greif']);
- if ($confif != "")
+ if ($confif != "") {
interface_configure($confif);
+ }
header("Location: interfaces_gre.php");
exit;
@@ -156,20 +179,20 @@ if ($_POST) {
function build_parent_list() {
$parentlist = array();
$portlist = get_possible_listen_ips();
- foreach ($portlist as $ifn => $ifinfo)
+ foreach ($portlist as $ifn => $ifinfo) {
$parentlist[$ifn] = $ifinfo;
+ }
return($parentlist);
}
-$pgtitle = array(gettext("Interfaces"),gettext("GRE"),gettext("Edit"));
+$pgtitle = array(gettext("Interfaces"), gettext("GRE"), gettext("Edit"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -254,4 +277,4 @@ if (isset($id) && $a_gres[$id]) {
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/interfaces_groups.php b/src/usr/local/www/interfaces_groups.php
index a6a2c32..5d4156d 100644
--- a/src/usr/local/www/interfaces_groups.php
+++ b/src/usr/local/www/interfaces_groups.php
@@ -1,41 +1,61 @@
<?php
/*
interfaces_groups.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Ermal Luçi
- Copyright (C) 2004 Scott Ullrich
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-groups
-##|*NAME=Interfaces: Groups page
+##|*NAME=Interfaces: Groups
##|*DESCR=Create interface groups
##|*MATCH=interfaces_groups.php*
##|-PRIV
@@ -82,9 +102,6 @@ $tab_array[] = array(gettext("GIF"), false, "interfaces_gif.php");
$tab_array[] = array(gettext("Bridges"), false, "interfaces_bridge.php");
$tab_array[] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
-
-print_info_box(gettext('Interface Groups allow you to setup rules for multiple interfaces without duplicating the rules.<br />' .
- 'If you remove members from an interface group, the group rules are no longer applicable to that interface.'));
?>
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed">
@@ -107,13 +124,14 @@ print_info_box(gettext('Interface Groups allow you to setup rules for multiple i
$members_arr = explode(" ", $ifgroupentry['members']);
$iflist = get_configured_interface_with_descr(false, true);
$memberses_arr = array();
- foreach ($members_arr as $memb)
+ foreach ($members_arr as $memb) {
$memberses_arr[] = $iflist[$memb] ? $iflist[$memb] : $memb;
+ }
unset($iflist);
$memberses = implode(", ", $memberses_arr);
echo $memberses;
- if(count($members_arr) >= 10) {
+ if (count($members_arr) >= 10) {
echo '&hellip;';
}
?>
@@ -122,12 +140,8 @@ print_info_box(gettext('Interface Groups allow you to setup rules for multiple i
<?=htmlspecialchars($ifgroupentry['descr']);?>
</td>
<td>
- <a class="btn btn-default btn-sm" role="button" href="interfaces_groups_edit.php?id=<?=$i; ?>">
- <?=gettext('Edit'); ?>
- </a>
- <a class="btn btn-danger btn-sm" role="button" href="interfaces_groups.php?act=del&amp;id=<?=$i; ?>">
- <?=gettext("Delete"); ?>
- </a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit group')?>" href="interfaces_groups_edit.php?id=<?=$i; ?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete group')?>" href="interfaces_groups.php?act=del&amp;id=<?=$i; ?>"></a>
</td>
</tr>
<?php endforeach; ?>
@@ -137,10 +151,16 @@ print_info_box(gettext('Interface Groups allow you to setup rules for multiple i
<nav class="action-buttons">
<a class="btn btn-success btn-sm" href="interfaces_groups_edit.php" role="button">
- <?=gettext("Add Group");?>
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add");?>
</a>
</nav>
+<div id="infoblock">
+ <?=print_info_box(gettext('Interface Groups allow you to setup rules for multiple interfaces without duplicating the rules.<br />' .
+ 'If you remove members from an interface group, the group rules are no longer applicable to that interface.'), info)?>
+
+</div>
<?php
-include("fend.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php
index f9fc399..f7ef013 100644
--- a/src/usr/local/www/interfaces_groups_edit.php
+++ b/src/usr/local/www/interfaces_groups_edit.php
@@ -1,41 +1,61 @@
<?php
/*
interfaces_groups_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Ermal Luçi
- Copyright (C) 2004 Scott Ullrich
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-groups-edit
-##|*NAME=Interfaces: Groups: Edit page
+##|*NAME=Interfaces: Groups: Edit
##|*DESCR=Allow access to the 'Interfaces: Groups: Edit' page.
##|*MATCH=interfaces_groups_edit.php*
##|-PRIV
@@ -102,7 +122,18 @@ if ($_POST) {
}
}
- $members = isset($_POST['members']) ? join(' ', $_POST['members']) : "";
+ if (isset($_POST['members'])) {
+ foreach ($_POST['members'] as $member) {
+ if ($isfirst > 0) {
+ $members .= " ";
+ }
+
+ $members .= $member[0];
+ $isfirst++;
+ }
+ } else {
+ $members = "";
+ }
if (!$input_errors) {
$ifgroupentry = array();
@@ -206,7 +237,6 @@ $tab_array[9] = array(gettext("Bridges"), false, "interfaces_bridge.php");
$tab_array[10] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Interface Group Edit');
@@ -253,5 +283,5 @@ print $form;
unset($interface_list);
unset($interface_list_disabled);
-include("fend.inc");
+include("foot.inc");
?>
diff --git a/src/usr/local/www/interfaces_lagg.php b/src/usr/local/www/interfaces_lagg.php
index 6724e1e..72c9c9f 100644
--- a/src/usr/local/www/interfaces_lagg.php
+++ b/src/usr/local/www/interfaces_lagg.php
@@ -1,41 +1,61 @@
<?php
-/* $Id$ */
/*
interfaces_lagg.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-lagg
-##|*NAME=Interfaces: LAGG: page
+##|*NAME=Interfaces: LAGG:
##|*DESCR=Allow access to the 'Interfaces: LAGG' page.
##|*MATCH=interfaces_lagg.php*
##|-PRIV
@@ -91,8 +111,9 @@ $pgtitle = array(gettext("Interfaces"), gettext("LAGG"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
@@ -135,8 +156,8 @@ foreach ($a_laggs as $lagg) {
<?=htmlspecialchars($lagg['descr'])?>
</td>
<td>
- <a href="interfaces_lagg_edit.php?id=<?=$i?>" class="btn btn-default btn-xs"><?=gettext("Edit")?></a>
- <a href="interfaces_lagg.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit LAGG interface')?>" href="interfaces_lagg_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete LAGG interface')?>" href="interfaces_lagg.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -147,7 +168,10 @@ foreach ($a_laggs as $lagg) {
</table>
<nav class="action-buttons">
- <a href="interfaces_lagg_edit.php" class="btn btn-success"><?=gettext("Add")?></a>
+ <a href="interfaces_lagg_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
</div>
<?php
diff --git a/src/usr/local/www/interfaces_lagg_edit.php b/src/usr/local/www/interfaces_lagg_edit.php
index 8590f01..ea26d3c 100644
--- a/src/usr/local/www/interfaces_lagg_edit.php
+++ b/src/usr/local/www/interfaces_lagg_edit.php
@@ -1,48 +1,70 @@
<?php
-/* $Id$ */
/*
interfaces_lagg_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-lagg-edit
-##|*NAME=Interfaces: LAGG: Edit page
+##|*NAME=Interfaces: LAGG: Edit
##|*DESCR=Allow access to the 'Interfaces: LAGG: Edit' page.
##|*MATCH=interfaces_lagg_edit.php*
##|-PRIV
require("guiconfig.inc");
-if (!is_array($config['laggs']['lagg']))
+if (!is_array($config['laggs']['lagg'])) {
$config['laggs']['lagg'] = array();
+}
$a_laggs = &$config['laggs']['lagg'];
@@ -141,6 +163,7 @@ if (isset($id) && $a_laggs[$id]) {
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
+ $pconfig['members'] = implode(',', $_POST['members']);
/* input validation */
$reqdfields = explode(" ", "members proto");
@@ -185,8 +208,9 @@ if ($_POST) {
write_config();
$confif = convert_real_interface_to_friendly_interface_name($lagg['laggif']);
- if ($confif != "")
+ if ($confif != "") {
interface_configure($confif);
+ }
header("Location: interfaces_lagg.php");
exit;
@@ -200,24 +224,28 @@ function build_member_list() {
$memberlist = array('list' => array(),
'selected' => array());
- $members_array = explode(',', $pconfig['members']);
foreach ($portlist as $ifn => $ifinfo) {
- if (array_key_exists($ifn, $realifchecklist))
+ if (array_key_exists($ifn, $realifchecklist)) {
continue;
+ }
$memberlist['list'][$ifn] = $ifn . '(' . $ifinfo['mac'] . ')';
- if (stristr($pconfig['members'], $ifn))
+ if (stristr($pconfig['members'], $ifn)) {
array_push($memberlist['selected'], $ifn);
+ }
}
return($memberlist);
}
-$pgtitle = array(gettext("Interfaces"),gettext("LAGG"),gettext("Edit"));
+$pgtitle = array(gettext("Interfaces"), gettext("LAGG"), gettext("Edit"));
$shortcut_section = "interfaces";
include("head.inc");
-require_once('classes/Form.class.php');
+
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
$form = new Form();
@@ -259,4 +287,4 @@ if (isset($id) && $a_laggs[$id]) {
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/interfaces_ppps.php b/src/usr/local/www/interfaces_ppps.php
index 966a6ca..6804743 100644
--- a/src/usr/local/www/interfaces_ppps.php
+++ b/src/usr/local/www/interfaces_ppps.php
@@ -1,43 +1,65 @@
<?php
-/* $Id$ */
/*
interfaces_ppps.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-ppps
-##|*NAME=Interfaces: ppps page
-##|*DESCR=Allow access to the 'Interfaces: ppps' page.
+##|*NAME=Interfaces: PPPs
+##|*DESCR=Allow access to the 'Interfaces: PPPs' page.
##|*MATCH=interfaces_ppps.php*
##|-PRIV
@@ -81,7 +103,7 @@ if (!is_array($config['ppps']['ppp'])) {
}
$a_ppps = $config['ppps']['ppp'];
-$pgtitle = array(gettext("Interfaces"),gettext("PPPs"));
+$pgtitle = array(gettext("Interfaces"), gettext("PPPs"));
$shortcut_section = "interfaces";
include("head.inc");
@@ -123,8 +145,9 @@ foreach ($a_ppps as $id => $ppp) {
<?php
$portlist = explode(",", $ppp['ports']);
foreach ($portlist as $portid => $port) {
- if ($port != get_real_interface($port) && $ppp['type'] != "ppp")
+ if ($port != get_real_interface($port) && $ppp['type'] != "ppp") {
$portlist[$portid] = convert_friendly_interface_to_friendly_descr($port);
+ }
}
echo htmlspecialchars(implode(",", $portlist));
?>
@@ -133,8 +156,8 @@ foreach ($a_ppps as $id => $ppp) {
<?=htmlspecialchars($ppp['descr'])?>
</td>
<td>
- <a href="interfaces_ppps_edit.php?id=<?=$i?>" class="btn btn-default btn-xs"><?=gettext("Edit")?></a>
- <a href="interfaces_ppps.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit PPP interface')?>" href="interfaces_ppps_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete PPP interface')?>" href="interfaces_ppps.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -145,7 +168,10 @@ foreach ($a_ppps as $id => $ppp) {
</table>
<nav class="action-buttons">
- <a href="interfaces_ppps_edit.php" class="btn btn-success"><?=gettext("Add")?></a>
+ <a href="interfaces_ppps_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
</div>
<?php
diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php
index a7856d5..0233eed 100644
--- a/src/usr/local/www/interfaces_ppps_edit.php
+++ b/src/usr/local/www/interfaces_ppps_edit.php
@@ -1,44 +1,66 @@
<?php
-/* $Id$ */
/*
interfaces_ppps_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
- Copyright (C) 2010 Gabriel B. <gnoahb@gmail.com>.
- All rights reserved.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
+ * Copyright (c) 2010 Gabriel B. <gnoahb@gmail.com>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-ppps-edit
-##|*NAME=Interfaces: PPPs: Edit page
+##|*NAME=Interfaces: PPPs: Edit
##|*DESCR=Allow access to the 'Interfaces: PPPs: Edit' page.
##|*MATCH=interfaces_ppps_edit.php*
##|-PRIV
@@ -67,20 +89,17 @@ if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) {
}
}
-if($_GET && $_GET['type'])
+if ($_GET && $_GET['type']) {
$pconfig['type'] = $_GET['type'];
+}
-if($_GET && $_GET['country'])
- $pconfig['country'] = $_GET['country'];
-
-if($_GET && $_GET['provider'])
- $pconfig['provider'] = $_GET['provider'];
-
-if (is_numericint($_GET['id']))
+if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
+}
-if (isset($_POST['id']) && is_numericint($_POST['id']))
+if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
+}
if (isset($id) && $a_ppps[$id]) {
$pconfig['ptpid'] = $a_ppps[$id]['ptpid'];
@@ -95,13 +114,14 @@ if (isset($id) && $a_ppps[$id]) {
$pconfig['idletimeout'] = $a_ppps[$id]['idletimeout'];
$pconfig['uptime'] = $a_ppps[$id]['uptime'];
$pconfig['descr'] = $a_ppps[$id]['descr'];
- $pconfig['bandwidth'] = explode(",",$a_ppps[$id]['bandwidth']);
- $pconfig['mtu'] = explode(",",$a_ppps[$id]['mtu']);
- $pconfig['mru'] = explode(",",$a_ppps[$id]['mru']);
- $pconfig['mrru'] = explode(",",$a_ppps[$id]['mrru']);
+ $pconfig['bandwidth'] = explode(",", $a_ppps[$id]['bandwidth']);
+ $pconfig['mtu'] = explode(",", $a_ppps[$id]['mtu']);
+ $pconfig['mru'] = explode(",", $a_ppps[$id]['mru']);
+ $pconfig['mrru'] = explode(",", $a_ppps[$id]['mrru']);
- if (isset($a_ppps[$id]['shortseq']))
+ if (isset($a_ppps[$id]['shortseq'])) {
$pconfig['shortseq'] = true;
+ }
if (isset($a_ppps[$id]['acfcomp'])) {
$pconfig['acfcomp'] = true;
@@ -189,7 +209,6 @@ if (isset($id) && $a_ppps[$id]) {
}
if ($_POST) {
-
unset($input_errors);
$pconfig = $_POST;
@@ -238,6 +257,9 @@ if ($_POST) {
$input_errors[] = gettext("Please choose a Link Type.");
break;
}
+ if ($_POST['passwordfld'] != $_POST['passwordfld_confirm']) {
+ $input_errors[] = gettext("Password and confirmed password must match.");
+ }
if ($_POST['type'] == "ppp" && count($_POST['interfaces']) > 1) {
$input_errors[] = gettext("Multilink connections (MLPPP) using the PPP link type is not currently supported. Please select only one Link Interface.");
}
@@ -294,19 +316,6 @@ if ($_POST) {
}
}
-/*
- foreach ($a_ppps as $ppp) {
- if (isset($id) && ($a_ppps[$id]) && ($a_ppps[$id] === $ppp)) {
- continue;
- }
-
- if ($ppp['serialport'] == $_POST['serialport']) {
- $input_errors[] = "Serial port is in use";
- break;
- }
- }
-*/
-
if (!$input_errors) {
$ppp = array();
$ppp['ptpid'] = $_POST['ptpid'];
@@ -314,7 +323,11 @@ if ($_POST) {
$ppp['if'] = $ppp['type'].$ppp['ptpid'];
$ppp['ports'] = implode(',', $_POST['interfaces']);
$ppp['username'] = $_POST['username'];
- $ppp['password'] = base64_encode($_POST['passwordfld']);
+ if ($_POST['passwordfld'] != DMYPWD) {
+ $ppp['password'] = base64_encode($_POST['passwordfld']);
+ } else {
+ $ppp['password'] = $a_ppps[$id]['password'];
+ }
$ppp['ondemand'] = $_POST['ondemand'] ? true : false;
if (!empty($_POST['idletimeout'])) {
$ppp['idletimeout'] = $_POST['idletimeout'];
@@ -435,7 +448,6 @@ if ($_POST) {
}
} // end if ($_POST)
-$closehead = false;
$pgtitle = array(gettext("Interfaces"), gettext("PPPs"), gettext("Edit"));
$shortcut_section = "interfaces";
include("head.inc");
@@ -444,10 +456,12 @@ $types = array("select" => gettext("Select"), "ppp" => "PPP", "pppoe" => "PPPoE"
$serviceproviders_xml = "/usr/local/share/mobile-broadband-provider-info/serviceproviders.xml";
$serviceproviders_contents = file_get_contents($serviceproviders_xml);
-$serviceproviders_attr = xml2array($serviceproviders_contents,1,"attr");
+$serviceproviders_attr = xml2array($serviceproviders_contents, 1, "attr");
$serviceproviders = &$serviceproviders_attr['serviceproviders']['country'];
+//print_r($serviceproviders);
+
function build_country_list() {
global $serviceproviders;
@@ -456,68 +470,13 @@ function build_country_list() {
// get_country_name is in pfSense-utils.inc
$country_list = get_country_name("ALL");
- foreach($country_list as $country) {
+ foreach ($country_list as $country) {
$list[$country['code']] = $country['name'];
}
return($list);
}
-function build_provider_list($country) {
- global $serviceproviders;
-
- $list = array();
-
- foreach($serviceproviders as $sp) {
- if($sp['attr']['code'] == strtolower($country)) {
- if(is_array($sp['provider'][0])) {
- foreach($sp['provider'] as $provider) {
- array_push($list, $provider['name']['value']);
- }
- }
- }
- }
-
- return array_combine($list, $list);
-}
-
-function build_plans_list($country, $provider) {
- global $serviceproviders;
-
- $list = array();
-
- foreach($serviceproviders as $sprecord) {
- if($sprecord['attr']['code'] == strtolower($country)) {
- foreach($sprecord['provider'] as $sp) {
- if(strtolower($sp['name']['value']) == strtolower($provider)) {
- if(array_key_exists('gsm', $sp)) {
-
- if(array_key_exists('attr',$sp['gsm']['apn'])) {
- $name = ($sp['gsm']['apn']['name'] ? $sp['gsm']['apn']['name'] : $sp['name']['value']);
- echo $name . ":" . $sp['gsm']['apn']['attr']['value'];
- } else {
- foreach($sp['gsm']['apn'] as $apn_info) {
- $name = ($apn_info['name']['value'] ? $apn_info['name']['value'] : $apn_info['gsm']['apn']['name']);
-
- $key = $apn_info['attr']['value'];
- $list[$key] = $name . ($key ? ' ':'') . '- ' . $key;
- }
- }
- }
-
- if(array_key_exists('cdma',$sp)) {
- $name = $sp['cdma']['name']['value'] ? $sp['cdma']['name']['value']:$sp['name']['value'];
- $key = 'CDMA';
- $list[$key] = $name . ' - ' . $key;
- }
- }
- }
- }
- }
-
- return($list);
-}
-
$port_count = 0;
$serport_count = 0;
@@ -527,16 +486,18 @@ function build_link_list() {
$linklist = array('list' => array(),
'selected' => array());
- $selected_ports = explode(',',$pconfig['interfaces']);
+ $selected_ports = array();
- if (!is_dir("/var/spool/lock"))
- mwexec("/bin/mkdir -p /var/spool/lock");
+ if ($pconfig['interfaces']) {
+ $selected_ports = explode(',', $pconfig['interfaces']);
+ }
- if($pconfig['type'] == 'ppp') {
- $serialports = glob("/dev/cua?[0-9]{,.[0-9]}", GLOB_BRACE);
- //DEBUG
- $serialports = glob("/dev/tty?[0-9]{,.[0-9]}", GLOB_BRACE);
+ if (!is_dir("/var/spool/lock")) {
+ mwexec("/bin/mkdir -p /var/spool/lock");
+ }
+ if ($pconfig['type'] == 'ppp') {
+ $serialports = glob("/dev/cua[a-zA-Z][0-9]{,.[0-9],.[0-9][0-9],[0-9],[0-9].[0-9],[0-9].[0-9][0-9]}", GLOB_BRACE);
$serport_count = 0;
foreach ($serialports as $port) {
@@ -544,45 +505,48 @@ function build_link_list() {
$linklist['list'][$port] = trim($port);
- if (in_array($port, $selected_ports))
+ if (in_array($port, $selected_ports)) {
array_push($linklist['selected'], $port);
+ }
}
- }
- else {
+ } else {
$port_count = 0;
- foreach ($portlist as $ifn => $ifinfo){
+ foreach ($portlist as $ifn => $ifinfo) {
$port_count++;
$string = "";
if (is_array($ifinfo)) {
$string .= $ifn;
- if ($ifinfo['mac'])
- $string .= " ({$ifinfo['mac']})";
- } else
+ if ($ifinfo['mac']) {
+ $string .= " ({$ifinfo['mac']})";
+ }
+ } else {
$string .= $ifinfo;
+ }
$linklist['list'][$ifn] = $string;
- if (in_array($ifn, $selected_ports))
+ if (in_array($ifn, $selected_ports)) {
array_push($linklist['selected'], $ifn);
+ }
}
- if($serport_count > $port_count)
- $port_count=$serport_count;
+ if ($serport_count > $port_count) {
+ $port_count = $serport_count;
+ }
}
return($linklist);
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-$linkparamstr = gettext('Bandwidth is set only for MLLP conncetions and when links have diferent bandwidths' . '<br />' .
+$linkparamstr = gettext('Bandwidth is set only for MLPPP connections and when links have different bandwidths' . '<br />' .
'MTU defaults to 1492' . '<br />' .
'MRU will be auto-negotiated by default' . '<br />' .
- 'Set only for MLLP conncetions. MRRU will be auto-negotiated by default.');
-
-require_once('classes/Form.class.php');
+ 'Set only for MLPPP connections. MRRU will be auto-negotiated by default.');
$form = new Form();
@@ -623,14 +587,14 @@ $section->addInput(new Form_Select(
'provider',
'Provider',
$pconfig['provider'],
- build_provider_list($pconfig['country'])
+ []
));
$section->addInput(new Form_Select(
'providerplan',
'Plan',
$pconfig['providerplan'],
- build_plans_list($pconfig['country'], $pconfig['provider'])
+ []
))->setHelp('Select to fill in data for your service provider.');
$section->addInput(new Form_Input(
@@ -640,17 +604,17 @@ $section->addInput(new Form_Input(
$pconfig['username']
));
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'passwordfld',
'Password',
'password',
- $pconfig['passwordfld']
+ $pconfig['password']
));
-// These elements arehidden by default, and un-hidden in Javascript
-if($pconfig['type'] == 'pptp' || $pconfig['type'] == 'l2tp') {
+// These elements are hidden by default, and un-hidden in Javascript
+if ($pconfig['type'] == 'pptp' || $pconfig['type'] == 'l2tp') {
$j = 0;
- foreach($linklist['list'] as $ifnm =>$nm) {
+ foreach ($linklist['list'] as $ifnm => $nm) {
$group = new Form_Group('IP/Gateway (' . $ifnm . ')');
@@ -663,7 +627,7 @@ if($pconfig['type'] == 'pptp' || $pconfig['type'] == 'l2tp') {
$group->add(new Form_Input(
'gateway' . $j,
null,
- 'password',
+ 'text',
$pconfig['gateway'][$j]
))->setHelp('IP or Hostname');
@@ -674,7 +638,7 @@ if($pconfig['type'] == 'pptp' || $pconfig['type'] == 'l2tp') {
}
}
-if($pconfig['type'] == 'ppp') {
+if ($pconfig['type'] == 'ppp') {
$section->addInput(new Form_Input(
'phone',
'Phone number',
@@ -730,7 +694,7 @@ $section->addInput(new Form_Checkbox(
'uptime',
'Uptime logging',
'Enable persistent logging of connection uptime. ',
- $pconfig['uptime']
+ isset($pconfig['uptime'])
))->setHelp(sprintf('Causes cumulative uptime to be recorded and displayed on the %sStatus->Interfaces%s page.', '<a href="status_interfaces.php">', '</a>'));
$group = new Form_Group('Service name');
@@ -766,7 +730,7 @@ $section->addInput(new Form_Select(
)
))->addClass('pppoe')->setHelp('Select a reset timing type');
-$group = new Form_Group('Rest Date/Time');
+$group = new Form_Group('Reset Date/Time');
$group->addClass('pppoe-reset-date');
$group->add(new Form_Input(
@@ -795,7 +759,7 @@ $group->setHelp('Leaving the date field empty will cause the reset to be execute
$section->add($group);
-$group = new Form_Group('Rest frequency');
+$group = new Form_Group('Reset frequency');
$group->addClass('pppoe-reset-cron');
$group->add(new Form_Checkbox(
@@ -912,7 +876,7 @@ $section->addInput(new Form_Checkbox(
// Display the Link parameters. We will hide this by default, then un-hide the selected ones on clicking 'Advanced'
$j = 0;
-foreach($linklist['list'] as $ifnm =>$nm) {
+foreach ($linklist['list'] as $ifnm =>$nm) {
$group = new Form_Group('Link Parameters (' . $ifnm . ')');
@@ -926,21 +890,21 @@ foreach($linklist['list'] as $ifnm =>$nm) {
$group->add(new Form_Input(
'mtu' . $j,
null,
- 'password',
+ 'text',
$pconfig['mtu'][$j]
))->setHelp('MTU');
$group->add(new Form_Input(
'mru' . $j,
null,
- 'password',
+ 'text',
$pconfig['mru'][$j]
))->setHelp('MRU');
$group->add(new Form_Input(
'mrru' . $j,
null,
- 'password',
+ 'text',
$pconfig['mrru'][$j]
))->setHelp('MRRU');
@@ -980,18 +944,17 @@ print($form);
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
var showadvanced = false;
function setAdvVisible() {
// Update the button text and toggle showadvanced
- if(showadvanced) {
+ if (showadvanced) {
$("#btnadvanced").prop('value', 'Hide');
showadvanced = false;
- }
- else {
+ } else {
$("#btnadvanced").prop('value', 'Show');
showadvanced = true;
}
@@ -1024,8 +987,8 @@ events.push(function(){
hideClass('pppoe-reset-date', true);
hideClass('pppoe-reset-cron', true);
- if(!hide) {
- switch($('#pppoe-reset-type').val()) {
+ if (!hide) {
+ switch ($('#pppoe-reset-type').val()) {
case 'custom' :
hideClass('pppoe-reset-date', false);
break;
@@ -1041,19 +1004,90 @@ events.push(function(){
hideClass('linkparam', true);
hideInput('linkparamhelp', true);
- var selected = $('.interfaces').val();
- var length = selected.length;
+ var selected = $('#interfaces').val();
+ var length = $("#interfaces :selected").length;
- for(var i=0; i<length; i++) {
+ for (var i=0; i<length; i++) {
hideClass('localip' + selected[i], false);
- if(!showadvanced) {
+ if (!showadvanced) {
hideClass('linkparam' + selected[i], false);
hideInput('linkparamhelp', false);
- }
+ }
}
}
+ function hideProviders(hide) {
+ hideInput('country', hide);
+ hideInput('provider', hide);
+ hideInput('providerplan', hide);
+ }
+
+ function providers_list() {
+ $('#provider option').remove();
+ $('#providerplan option').remove();
+ $('#provider').append(new Option('', ''));
+ $.ajax("getserviceproviders.php",{
+ type: 'POST',
+ data: {country : $('#country').val()},
+ success: function(responseText) {
+ var responseTextArr = responseText.split("\n");
+ var value, i;
+ responseTextArr.sort();
+ for (i = 0; i < responseTextArr.length; i += 1) {
+ value = responseTextArr[i];
+ if (/\S/.test(value)) {
+ $('#provider').append(new Option(value, value));
+ }
+ }
+ }
+ });
+ }
+
+ function providerplan_list() {
+ $('#providerplan option').remove();
+ $('#providerplan').append( new Option('','') );
+ $.ajax("getserviceproviders.php",{
+ type: 'POST',
+ data: {country : $('#country').val(), provider : $('#provider').val()},
+ success: function(responseText) {
+ var responseTextArr = responseText.split("\n");
+ var value, providerplan, i;
+ responseTextArr.sort();
+ for (i = 0; i < responseTextArr.length; i += 1) {
+ value = responseTextArr[i];
+ if (/\S/.test(value)) {
+ providerplan = value.split(":");
+ $('#providerplan').append(new Option(providerplan[0] + " - " + providerplan[1],
+ providerplan[1]));
+ }
+ }
+ }
+ });
+ }
+
+ function prefill_provider() {
+ $.ajax("getserviceproviders.php",{
+ type: "POST",
+ data: {country : $('#country').val(), provider : $('#provider').val(), plan : $('#providerplan').val()},
+ success: function(responseXML) {
+ var xmldoc = responseXML;
+ var provider = xmldoc.getElementsByTagName('connection')[0];
+ $('#username').val('');
+ $('#password').val('');
+ if (provider.getElementsByTagName('apn')[0].firstChild.data == "CDMA") {
+ $('#phone').val('#777');
+ $('#apn').val('');
+ } else {
+ $('#phone').val('*99#');
+ $('#apn').val(provider.getElementsByTagName('apn')[0].firstChild.data);
+ }
+ $('#username').val(provider.getElementsByTagName('username')[0].firstChild.data);
+ $('#password').val(provider.getElementsByTagName('password')[0].firstChild.data);
+ }
+ });
+ }
+
// Make the ‘btnadvanced’ button a plain button, not a submit button
$("#btnadvanced").prop('type','button');
@@ -1069,25 +1103,40 @@ events.push(function(){
// Multiselect boxes must be handled by class
$('.interfaces').on('change', function() {
hideInterfaces();
- });
+ });
- // When type, country or provider are changed, reload the page and build the new selector arrays
+ // When type, country, provider or plan are changed, reload the page and build the new selector arrays
$('#type').on('change', function() {
window.location = 'interfaces_ppps_edit.php?id=' + $('#id').val() + '&type=' + this.value;
});
$('#country').on('change', function() {
- window.location = 'interfaces_ppps_edit.php?id=' + $('#id').val() + '&country=' + this.value + '&type=' + $('#type').val();
+ providers_list();
+ hideInput('provider', false);
});
$('#provider').on('change', function() {
- window.location = 'interfaces_ppps_edit.php?id=' + $('#id').val() + '&provider=' + this.value + '&type=' + $('#type').val() + '&country=' + $('#country').val();
+ providerplan_list();
+ hideInput('providerplan', false);
+ });
+
+ $('#providerplan').on('change', function() {
+ prefill_provider();
});
// Set element visibility on initial page load
setAdvVisible();
hideClass('linkparam', true);
+
+ hideProviders($('#type').val() != "ppp");
+ if ($('provider').size() == 0) {
+ hideInput('provider', true);
+ }
+
+ if ($('providerplan').size() == 0) {
+ hideInput('providerplan', true);
+ }
});
//]]>
@@ -1095,3 +1144,4 @@ events.push(function(){
<?php
include("foot.inc");
+
diff --git a/src/usr/local/www/interfaces_qinq.php b/src/usr/local/www/interfaces_qinq.php
index f68ac54..53babb3 100644
--- a/src/usr/local/www/interfaces_qinq.php
+++ b/src/usr/local/www/interfaces_qinq.php
@@ -1,40 +1,61 @@
<?php
-/* $Id$ */
/*
interfaces_qinq.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/ngctl
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-qinq
-##|*NAME=Interfaces: QinQ page
+##|*NAME=Interfaces: QinQ
##|*DESCR=Allow access to the 'Interfaces: QinQ' page.
##|*MATCH=interfaces_qinq.php*
##|-PRIV
@@ -94,8 +115,9 @@ $pgtitle = array(gettext("Interfaces"), gettext("QinQ"));
$shortcut_section = "interfaces";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[] = array(gettext("Interface assignments"), false, "interfaces_assign.php");
@@ -110,10 +132,6 @@ $tab_array[] = array(gettext("Bridges"), false, "interfaces_bridge.php");
$tab_array[] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
-print_info_box(sprintf(gettext('Not all drivers/NICs support 802.1Q QinQ tagging properly. <br />On cards that do not explicitly support it, ' .
- 'QinQ tagging will still work, but the reduced MTU may cause problems.<br />' .
- 'See the %s handbook for information on supported cards.'), $g['product_name']));
-
?>
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed">
@@ -146,8 +164,8 @@ print_info_box(sprintf(gettext('Not all drivers/NICs support 802.1Q QinQ tagging
<?=htmlspecialchars($qinq['descr'])?>&nbsp;
</td>
<td>
- <a href="interfaces_qinq_edit.php?id=<?=$i?>" class="btn btn-default btn-xs"><?=gettext("Edit")?></a>
- <a href="interfaces_qinq.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit Q-in-Q interface')?>" href="interfaces_qinq_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete Q-in-Q interface')?>" href="interfaces_qinq.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -158,9 +176,17 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="interfaces_qinq_edit.php" class="btn btn-success">
+ <a href="interfaces_qinq_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
<?=gettext("Add")?>
</a>
</nav>
+
+<div id="infoblock">
+ <?=print_info_box(sprintf(gettext('Not all drivers/NICs support 802.1Q QinQ tagging properly. <br />On cards that do not explicitly support it, ' .
+ 'QinQ tagging will still work, but the reduced MTU may cause problems.<br />' .
+ 'See the %s handbook for information on supported cards.'), $g['product_name']), info)?>
+</div>
+
<?php
include("foot.inc");
diff --git a/src/usr/local/www/interfaces_qinq_edit.php b/src/usr/local/www/interfaces_qinq_edit.php
index dad4cf1..9d98573 100644
--- a/src/usr/local/www/interfaces_qinq_edit.php
+++ b/src/usr/local/www/interfaces_qinq_edit.php
@@ -1,40 +1,61 @@
<?php
/*
interfaces_qinq_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/ngctl
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-qinq-edit
-##|*NAME=Interfaces: QinQ: Edit page
+##|*NAME=Interfaces: QinQ: Edit
##|*DESCR=Allow access to 'Interfaces: QinQ: Edit' page
##|*MATCH=interfaces_qinq_edit.php*
##|-PRIV
@@ -126,18 +147,18 @@ if ($_POST) {
$member = explode("-", $memb);
if (count($member) > 1) {
- if (preg_match("/([^0-9])+/", $member[0], $match) || preg_match("/([^0-9])+/", $member[1], $match))
+ if (preg_match("/([^0-9])+/", $member[0], $match) || preg_match("/([^0-9])+/", $member[1], $match)) {
$input_errors[] = gettext("Tags can contain only numbers or a range in format #-#.");
+ }
for ($i = $member[0]; $i <= $member[1]; $i++) {
$members .= ($isfirst == 0 ? '':' ') . $i;
$isfirst++;
}
- }
- else { // Just a single number
- if (preg_match("/([^0-9])+/", $memb, $match))
+ } else { // Just a single number
+ if (preg_match("/([^0-9])+/", $memb, $match)) {
$input_errors[] = gettext("Tags can contain only numbers or a range in format #-#.");
- else {
+ } else {
$members .= ($isfirst == 0 ? '':' ') . $memb;
$isfirst++;
}
@@ -221,8 +242,9 @@ function build_parent_list() {
$list = array();
foreach ($portlist as $ifn => $ifinfo) {
- if (is_jumbo_capable($ifn))
+ if (is_jumbo_capable($ifn)) {
$list[$ifn] = $ifn . ' (' . $ifinfo['mac'] . ')';
+ }
}
return($list);
@@ -230,10 +252,9 @@ function build_parent_list() {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
@@ -290,12 +311,13 @@ $counter = 0;
$members = $pconfig['members'];
// List each of the member tags from the space-separated list
-if ($members != "")
+if ($members != "") {
$item = explode(" ", $members);
-else
+} else {
$item = array('');
+}
-foreach($item as $ww) {
+foreach ($item as $ww) {
$member = $item[$counter];
$group = new Form_Group($counter == 0 ? 'Tag(s)':'');
diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php
index bdd7898..041a131 100644
--- a/src/usr/local/www/interfaces_vlan.php
+++ b/src/usr/local/www/interfaces_vlan.php
@@ -1,12 +1,12 @@
<?php
-/* $Id$ */
/*
interfaces_vlan.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -55,14 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-interfaces-vlan
-##|*NAME=Interfaces: VLAN page
+##|*NAME=Interfaces: VLAN
##|*DESCR=Allow access to the 'Interfaces: VLAN' page.
##|*MATCH=interfaces_vlan.php*
##|-PRIV
@@ -129,10 +125,6 @@ $tab_array[] = array(gettext("Bridges"), false, "interfaces_bridge.php");
$tab_array[] = array(gettext("LAGG"), false, "interfaces_lagg.php");
display_top_tabs($tab_array);
-print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '.
- 'VLAN tagging properly. <br />On cards that do not explicitly support it, VLAN '.
- 'tagging will still work, but the reduced MTU may cause problems.<br />See the '.
- '%s handbook for information on supported cards.'),$g['product_name']));
?>
<form action="interfaces_vlan.php" method="post">
<input id="act" type="hidden" name="act" value="" />
@@ -140,39 +132,52 @@ print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '.
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed">
- <tr>
- <th><?=gettext('Interface');?></th>
- <th><?=gettext('VLAN tag');?></th>
- <th><?=gettext('Description');?></th>
- </tr>
+ <thead>
+ <tr>
+ <th><?=gettext('Interface');?></th>
+ <th><?=gettext('VLAN tag');?></th>
+ <th><?=gettext('Priority');?></th>
+ <th><?=gettext('Description');?></th>
+ </tr>
+ </thead>
<?php
$i = 0;
foreach ($a_vlans as $vlan) {
?>
- <tr>
- <td><?=htmlspecialchars($vlan['if']);?></td>
- <td><?=htmlspecialchars($vlan['tag']);?></td>
- <td><?=htmlspecialchars($vlan['descr']);?></td>
- <td>
- <a class="btn btn-primary btn-xs" role="button" href="interfaces_vlan_edit.php?id=<?=$i?>"><?=gettext('Edit')?></a>
-<!-- <a class="btn btn-danger btn-xs" role="button" href="interfaces_vlan.php?act=del&amp;id=<?=$i?>"><?=gettext('Delete')?></a></td> -->
- <a class="btn btn-danger btn-xs" role="button" id="del-<?=$i?>"><?=gettext('Delete')?></a></td>
- </td>
- </tr>
- <?php
+ <tr>
+ <td><?=htmlspecialchars($vlan['if']);?></td>
+ <td><?=htmlspecialchars($vlan['tag']);?></td>
+ <td><?=htmlspecialchars($vlan['pcp']);?></td>
+ <td><?=htmlspecialchars($vlan['descr']);?></td>
+ <td>
+ <a class="fa fa-pencil" title="<?=gettext('Edit VLAN')?>" role="button" href="interfaces_vlan_edit.php?id=<?=$i?>"></a>
+<!-- <a class="btn btn-danger btn-xs" role="button" href="interfaces_vlan.php?act=del&amp;id=<?=$i?>"><?=gettext('Delete')?></a></td> -->
+ <a class="fa fa-trash" title="<?=gettext('Delete VLAN')?>" role="button" id="del-<?=$i?>"></a>
+ </td>
+ </tr>
+<?php
$i++;
}
?>
</table>
<nav class="action-buttons">
- <a class="btn btn-success" role="button" href="interfaces_vlan_edit.php"><?=gettext('Add VLAN'); ?></a>
+ <a class="btn btn-success btn-sm" role="button" href="interfaces_vlan_edit.php">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add'); ?>
+ </a>
</nav>
</div>
</form>
-<script>
+<div id="infoblock">
+ <?=print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '.
+ 'VLAN tagging properly. <br />On cards that do not explicitly support it, VLAN '.
+ 'tagging will still work, but the reduced MTU may cause problems.<br />See the '.
+ '%s handbook for information on supported cards.'), $g['product_name']), info)?>
+</div>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Select 'delete button' clicks, extract the id, set the hidden input values and submit
$('[id^=del-]').click(function(event) {
$('#act').val('del');
diff --git a/src/usr/local/www/interfaces_vlan_edit.php b/src/usr/local/www/interfaces_vlan_edit.php
index 3be34ca..42258e7 100644
--- a/src/usr/local/www/interfaces_vlan_edit.php
+++ b/src/usr/local/www/interfaces_vlan_edit.php
@@ -1,49 +1,73 @@
<?php
-/* $Id$ */
/*
interfaces_vlan_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-vlan-edit
-##|*NAME=Interfaces: VLAN: Edit page
+##|*NAME=Interfaces: VLAN: Edit
##|*DESCR=Allow access to the 'Interfaces: VLAN: Edit' page.
##|*MATCH=interfaces_vlan_edit.php*
##|-PRIV
require("guiconfig.inc");
-if (!is_array($config['vlans']['vlan']))
+if (!is_array($config['vlans']['vlan'])) {
$config['vlans']['vlan'] = array();
+}
$a_vlans = &$config['vlans']['vlan'];
@@ -67,6 +91,7 @@ if (isset($id) && $a_vlans[$id]) {
$pconfig['if'] = $a_vlans[$id]['if'];
$pconfig['vlanif'] = $a_vlans[$id]['vlanif'];
$pconfig['tag'] = $a_vlans[$id]['tag'];
+ $pconfig['pcp'] = $a_vlans[$id]['pcp'];
$pconfig['descr'] = $a_vlans[$id]['descr'];
}
@@ -84,6 +109,9 @@ if ($_POST) {
if (isset($_POST['tag']) && (!is_numericint($_POST['tag']) || ($_POST['tag'] < '1') || ($_POST['tag'] > '4094'))) {
$input_errors[] = gettext("The VLAN tag must be an integer between 1 and 4094.");
}
+ if (isset($_POST['pcp']) && !empty($_POST['pcp']) && (!is_numericint($_POST['pcp']) || ($_POST['pcp'] < '0') || ($_POST['pcp'] > '7'))) {
+ $input_errors[] = gettext("The VLAN Priority must be an integer between 0 and 7.");
+ }
if (!does_interface_exist($_POST['if'])) {
$input_errors[] = gettext("Interface supplied as parent is invalid");
@@ -125,13 +153,15 @@ if ($_POST) {
pfSense_interface_destroy("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}");
$confif = convert_real_interface_to_friendly_interface_name("{$a_vlans[$id]['if']}_vlan{$a_vlans[$id]['tag']}");
}
- if ($confif != "")
+ if ($confif != "") {
$config['interfaces'][$confif]['if'] = "{$_POST['if']}_vlan{$_POST['tag']}";
+ }
}
}
$vlan = array();
$vlan['if'] = $_POST['if'];
$vlan['tag'] = $_POST['tag'];
+ $vlan['pcp'] = $_POST['pcp'];
$vlan['descr'] = $_POST['descr'];
$vlan['vlanif'] = "{$_POST['if']}_vlan{$_POST['tag']}";
$vlan['vlanif'] = interface_vlan_configure($vlan);
@@ -146,14 +176,29 @@ if ($_POST) {
write_config();
- if ($confif != "")
+ if ($confif != "") {
interface_configure($confif);
+ }
header("Location: interfaces_vlan.php");
exit;
}
}
}
+function build_interfaces_list() {
+ global $portlist;
+
+ $list = array();
+
+ foreach ($portlist as $ifn => $ifinfo) {
+ if (is_jumbo_capable($ifn)) {
+ $list[$ifn] = $ifn . " (" . $ifinfo['mac'] . ")";
+ }
+ }
+
+ return($list);
+}
+
$pgtitle = array(gettext("Interfaces"), gettext("VLAN"), gettext("Edit"));
$shortcut_section = "interfaces";
include("head.inc");
@@ -162,25 +207,14 @@ if ($input_errors) {
print_input_errors($input_errors);
}
-require_once('classes/Form.class.php');
$form = new Form;
-$section = new Form_Section('Interface VLAN Edit');
+$section = new Form_Section('Interface VLAN Edit');
$section->addInput(new Form_Select(
'if',
'Parent Interface',
$pconfig['if'],
- array_combine(
- array_keys($portlist),
- array_map(
- function($key, $value) {
- return (is_jumbo_capable($key)) ? "{$key} ({$value['mac']})" : $value;
- },
- array_keys($portlist),
- array_values($portlist)
- )
- ),
- false
+ build_interfaces_list()
))->setWidth(6)->setHelp('Only VLAN capable interfaces will be shown.');
$section->addInput(new Form_Input(
@@ -192,6 +226,14 @@ $section->addInput(new Form_Input(
))->setWidth(6)->setHelp(gettext('802.1Q VLAN tag (between 1 and 4094).'));
$section->addInput(new Form_Input(
+ 'pcp',
+ 'VLAN Priority',
+ 'text',
+ $pconfig['pcp'],
+ ['placeholder' => '0']
+))->setWidth(6)->setHelp(gettext('802.1Q VLAN Priority (between 0 and 7).'));
+
+$section->addInput(new Form_Input(
'descr',
'Description',
'text',
diff --git a/src/usr/local/www/interfaces_wireless.php b/src/usr/local/www/interfaces_wireless.php
index cb90387..7ddbfa1 100644
--- a/src/usr/local/www/interfaces_wireless.php
+++ b/src/usr/local/www/interfaces_wireless.php
@@ -1,40 +1,62 @@
<?php
-/* $Id$ */
/*
interfaces_wireless.php
-
- Copyright (C) 2010 Erik Fonnesbeck
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces_assign
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Erik Fonnesbeck
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-wireless
-##|*NAME=Interfaces: Wireless page
+##|*NAME=Interfaces: Wireless
##|*DESCR=Allow access to the 'Interfaces: Wireless' page.
##|*MATCH=interfaces_wireless.php*
##|-PRIV
@@ -84,8 +106,10 @@ $pgtitle = array(gettext("Interfaces"), gettext("Wireless"));
$shortcut_section = "wireless";
include("head.inc");
-if ($input_errors)
- print_input_errors($input_errors); ?>
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
+?>
<?php
$tab_array = array();
@@ -130,8 +154,8 @@ foreach ($a_clones as $clone) {
<?=htmlspecialchars($clone['descr'])?>
</td>
<td>
- <a href="interfaces_wireless_edit.php?id=<?=$i?>" class="btn btn-default btn-xs"><?=gettext("Edit")?></a>
- <a href="interfaces_wireless.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit WiFi interface')?>" href="interfaces_wireless_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete WiFi interface')?>" href="interfaces_wireless.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -142,7 +166,9 @@ foreach ($a_clones as $clone) {
</table>
<nav class="action-buttons">
- <a href="interfaces_wireless_edit.php" class="btn btn-success"><?=gettext("Add")?></a>
+ <a href="interfaces_wireless_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?></a>
</nav>
</div>
<?php
diff --git a/src/usr/local/www/interfaces_wireless_edit.php b/src/usr/local/www/interfaces_wireless_edit.php
index 7919424..07e0d08 100644
--- a/src/usr/local/www/interfaces_wireless_edit.php
+++ b/src/usr/local/www/interfaces_wireless_edit.php
@@ -1,51 +1,75 @@
<?php
-/* $Id$ */
/*
interfaces_wireless_edit.php
-
- Copyright (C) 2010 Erik Fonnesbeck
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Erik Fonnesbeck
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-interfaces-wireless-edit
-##|*NAME=Interfaces: Wireless edit page
-##|*DESCR=Allow access to the 'Interfaces: Wireless : Edit' page.
+##|*NAME=Interfaces: Wireless: Edit
+##|*DESCR=Allow access to the 'Interfaces: Wireless: Edit' page.
##|*MATCH=interfaces_wireless_edit.php*
##|-PRIV
require("guiconfig.inc");
-if (!is_array($config['wireless']))
+if (!is_array($config['wireless'])) {
$config['wireless'] = array();
+}
-if (!is_array($config['wireless']['clone']))
+if (!is_array($config['wireless']['clone'])) {
$config['wireless']['clone'] = array();
+}
$a_clones = &$config['wireless']['clone'];
@@ -167,19 +191,19 @@ function build_parent_list() {
}
}
- if($count > 0)
+ if ($count > 0) {
return($parentlist);
- else
+ } else {
return(array('0' => gettext('None available')));
+ }
}
-$pgtitle = array(gettext("Interfaces"),gettext("Wireless"),gettext("Edit"));
+$pgtitle = array(gettext("Interfaces"), gettext("Wireless"), gettext("Edit"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -229,4 +253,4 @@ if (isset($id) && $a_clones[$id]) {
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/jquery/pfSense.js b/src/usr/local/www/jquery/pfSense.js
index 1b1398d..948d237 100644
--- a/src/usr/local/www/jquery/pfSense.js
+++ b/src/usr/local/www/jquery/pfSense.js
@@ -80,7 +80,7 @@ $(function() {
var group = $(this).parents('div.form-group');
var clone = group.clone(true);
- clone.find('*').removeAttr('value');
+ clone.find('*').removeAttr('value');
clone.appendTo(group.parent());
});
@@ -93,10 +93,10 @@ $(function() {
});
})();
- // Automatically change IpAddress mask selectors to 128/32 options for IPv6/IPvd addresses
+ // Automatically change IpAddress mask selectors to 128/32 options for IPv6/IPv4 addresses
$('span.pfIpMask + select').each(function (idx, select){
var input = $(select).prevAll('input[type=text]');
-
+
input.on('change', function(e){
var isV6 = (input.val().indexOf(':') != -1), min = 0, max = 128;
if (!isV6)
@@ -105,10 +105,10 @@ $(function() {
if (input.val() == "")
return;
- // Eat all of the options with a value greater than max. We don't want them to be available
+ // Eat all of the options with a value greater than max. We don't want them to be available
while (select.options[0].value > max)
select.remove(0);
-
+
if (select.options.length < max) {
for (var i=select.options.length; i<=max; i++)
select.options.add(new Option(i, i), 0);
@@ -118,44 +118,48 @@ $(function() {
// Fire immediately
input.change();
});
-
- // Add confirm to all btn-danger buttons
+
+ // Add confirm to all btn-danger buttons and fa-trash icons
// Use element title in the confirmation message, or if not available
// the element value
- $('.btn-danger').on('click', function(e){
- var msg = $.trim(this.textContent);
-
- if(!msg)
- var msg = $.trim(this.value).toLowerCase();
-
- var q = 'Are you sure you wish to '+ msg +'?';
-
- if ($(this).attr('title') != undefined)
- q = $(this).attr('title')+'?';
-
- if (!confirm(q))
- e.preventDefault();
+ $('.btn-danger, .fa-trash').on('click', function(e){
+ if(!($(this).hasClass('no-confirm'))) {
+ var msg = $.trim(this.textContent);
+
+ if(!msg)
+ var msg = $.trim(this.value).toLowerCase();
+
+ var q = 'Are you sure you wish to '+ msg +'?';
+
+ if ($(this).attr('title') != undefined)
+ q = 'Are you sure you wish to '+ $(this).attr('title').toLowerCase() + '?';
+
+ if (!confirm(q))
+ e.preventDefault();
+ }
});
- // Add toggle-all when there are multiple checkboxes and none of them are radio buttons
+ // Add toggle-all when there are multiple checkboxes
$('.control-label + .checkbox.multi').each(function() {
var a = $('<a name="btntoggleall" class="btn btn-xs btn-default">toggle all</a>');
-
- if(($(this).html().indexOf("type=\"radio\"") == -1)) {
- a.on('click', function() {
- var wrap = $(this).parents('.form-group').find('.checkbox.multi'),
- all = wrap.find('input[type=checkbox]'),
- checked = wrap.find('input[type=checkbox]:checked');
-
- all.prop('checked', (all.length != checked.length));
- });
-
- a.appendTo($(this));
- }
+
+ a.on('click', function() {
+ var wrap = $(this).parents('.form-group').find('.checkbox.multi'),
+ all = wrap.find('input[type=checkbox]'),
+ checked = wrap.find('input[type=checkbox]:checked');
+
+ all.prop('checked', (all.length != checked.length));
+ });
+
+ a.appendTo($(this));
});
+ // The need to NOT hide the advanced options if the elements therein are not set to the system
+ // default values makes it better to handle advanced option hiding in each PHP file so this is being
+ // disabled for now by changing the class name it acts on to "auto-advanced"
+
// Hide advanced inputs by default
- if ($('.advanced').length > 0)
+ if ($('.auto-advanced').length > 0)
{
var advButt = $('<a id="toggle-advanced" class="btn btn-default">toggle advanced options</a>');
advButt.on('click', function() {
@@ -164,7 +168,7 @@ $(function() {
advButt.insertAfter($('#save'));
- $('.advanced').parents('.form-group').collapse({toggle: true});
+ $('.auto-advanced').parents('.form-group').collapse({toggle: true});
}
// Enable popovers globally
@@ -174,6 +178,7 @@ $(function() {
$('input[type=checkbox][data-toggle="collapse"]:not(:checked)').each(function() {
$( $(this).data('target') ).addClass('collapse');
});
+
$('input[type=checkbox][data-toggle="disable"]:not(:checked)').each(function() {
$( $(this).data('target') ).prop('disabled', true);
});
@@ -246,4 +251,4 @@ $(function() {
});
});
}(Plugin, $, window, document));
-}(jQuery, window, document)); \ No newline at end of file
+}(jQuery, window, document));
diff --git a/src/usr/local/www/jquery/pfSenseHelpers.js b/src/usr/local/www/jquery/pfSenseHelpers.js
index 0668489..1959301 100644
--- a/src/usr/local/www/jquery/pfSenseHelpers.js
+++ b/src/usr/local/www/jquery/pfSenseHelpers.js
@@ -106,9 +106,9 @@ function hideSelect(id, hide) {
function hideMultiCheckbox(id, hide) {
if(hide)
- $('#' + id).parent().addClass('hidden');
+ $("[name=" + id + "]").parent().addClass('hidden');
else
- $('#' + id).parent().removeClass('hidden');
+ $("[name=" + id + "]").parent().removeClass('hidden');
}
// Hides the <div> in which the specified IP address element lives so that the input, its label and help text are hidden
@@ -138,6 +138,38 @@ function hideLabel(text, hide) {
element.parent('div').removeClass('hidden');
}
+// Toggle table row checkboxes and background colors on the pages that use sortable tables:
+// /usr/local/www/firewall_nat.php
+// /usr/local/www/firewall_nat_1to1.php
+// /usr/local/www/firewall_nat_out.php
+// /usr/local/www/firewall_rules.php
+// /usr/local/www/vpn_ipsec.php
+// Striping of the tables is handled here, NOT with the Bootstrap table-striped class because it would
+// get confused when rows are sorted or deleted.
+
+function fr_toggle(id, prefix) {
+ if (!prefix)
+ prefix = 'fr';
+
+ var checkbox = document.getElementById(prefix + 'c' + id);
+ checkbox.checked = !checkbox.checked;
+ fr_bgcolor(id, prefix);
+}
+
+// Change background color of selected row based on state of checkbox
+function fr_bgcolor(id, prefix) {
+ if (!prefix)
+ prefix = 'fr';
+
+ var row = $('#' + prefix + id);
+
+ if ($('#' + prefix + 'c' + id).prop('checked') ) {
+ row.addClass('active');
+ } else {
+ row.removeClass('active');
+ }
+}
+
// The following functions are used by Form_Groups assigned a class of "repeatable" and provide the ability
// to add/delete rows of sequentially numbered elements, their labels and their help text
// See firewall_aliases_edit.php for an example
@@ -176,19 +208,24 @@ function setMasks() {
// Complicated function to move all help text associated with this input id to the same id
// on the row above. That way if you delete the last row, you don't lose the help
function moveHelpText(id) {
- $('#' + id).parent('div').parent('div').find('input').each(function() { // For each <span></span>
+ $('#' + id).parent('div').parent('div').find('input, select, checkbox').each(function() { // For each <span></span>
var fromId = this.id;
var toId = decrStringInt(fromId);
var helpSpan;
if(!$(this).hasClass('pfIpMask') && !$(this).hasClass('btn')) {
-
- helpSpan = $('#' + fromId).parent('div').parent('div').find('span:last').clone();
+ if($('#' + decrStringInt(fromId)).parent('div').hasClass('input-group')) {
+ helpSpan = $('#' + fromId).parent('div').parent('div').find('span:last').clone();
+ } else {
+ helpSpan = $('#' + fromId).parent('div').find('span:last').clone();
+ }
if($(helpSpan).hasClass('help-block')) {
- if($('#' + decrStringInt(fromId)).parent('div').hasClass('input-group'))
+ if($('#' + decrStringInt(fromId)).parent('div').hasClass('input-group')) {
$('#' + decrStringInt(fromId)).parent('div').after(helpSpan);
- else
+ }
+ else {
$('#' + decrStringInt(fromId)).after(helpSpan);
+ }
}
}
});
@@ -231,7 +268,7 @@ function renumber() {
$(this).prop("name", this.name.replace(/\d+$/, "") + idx);
});
- $(this).find('label').attr('for', $(this).find('label').attr('for').replace(/\d+$/, "") + idx);
+// $(this).find('label').attr('for', $(this).find('label').attr('for').replace(/\d+$/, "") + idx);
idx++;
});
@@ -240,6 +277,15 @@ function renumber() {
function delete_row(row) {
$('#' + row).parent('div').parent('div').remove();
renumber();
+ checkLastRow();
+}
+
+function checkLastRow() {
+ if($('.repeatable').length <= 1) {
+ $('#deleterow0').hide();
+ } else {
+ $('[id^=deleterow]').show();
+ }
}
function add_row() {
@@ -247,8 +293,7 @@ function add_row() {
var lastRepeatableGroup = $('.repeatable:last');
// Clone it
- var newGroup = lastRepeatableGroup.clone(true);
-
+ var newGroup = lastRepeatableGroup.clone();
// Increment the suffix number for each input element in the new group
$(newGroup).find('input').each(function() {
$(this).prop("id", bumpStringInt(this.id));
@@ -275,7 +320,8 @@ function add_row() {
});
// And for "for" tags
- $(newGroup).find('label').attr('for', bumpStringInt($(newGroup).find('label').attr('for')));
+// $(newGroup).find('label').attr('for', bumpStringInt($(newGroup).find('label').attr('for')));
+
$(newGroup).find('label').text(""); // Clear the label. We only want it on the very first row
// Insert the updated/cloned row
@@ -289,9 +335,33 @@ function add_row() {
setMasks();
- $('[id^=address]').autocomplete({
- source: addressarray
+ checkLastRow();
+
+ // Autocomplete
+ if ( typeof addressarray !== 'undefined') {
+ $('[id^=address]').each(function() {
+ if(this.id.substring(0, 8) != "address_") {
+ $(this).autocomplete({
+ source: addressarray
+ });
+ }
+ });
+ }
+
+ // Now that we are no longer cloning the event handlers, we need to remove and re-add after a new row
+ // has been added to the table
+ $('[id^=delete]').unbind();
+ $('[id^=delete]').click(function(event) {
+ if($('.repeatable').length > 1) {
+ if((typeof retainhelp) == "undefined")
+ moveHelpText(event.target.id);
+
+ delete_row(event.target.id);
+ }
+ else
+ alert('You may not delete the last row!');
});
+
}
// These are action buttons, not submit buttons
@@ -312,4 +382,63 @@ $('[id^=delete]').click(function(event) {
}
else
alert('You may not delete the last row!');
+});
+
+// "More information" handlers
+
+// If there is an infoblock, automatically add an info icon that toggles its display
+if($('#infoblock').length != 0) {
+ $('#infoblock').before('<i class="fa fa-info-circle icon-pointer" style="color: #337AB7;; font-size:20px; margin-left: 10px; margin-bottom: 10px;" id="showinfo" title="More information"></i>');
+
+ // and remove the 'X' button from the last text box (Which we assume to be the infoblock)
+ $('.close :last').remove();
+}
+
+// Hide information on page load
+$('#infoblock').hide();
+
+// Show the help on clicking the info icon
+$('#showinfo').click(function() {
+ $('#infoblock').toggle();
+});
+
+// Put a dummy row into any empty table to keep IE happy
+$('tbody').each(function(){
+ $(this).html($.trim($(this).html()))
+});
+
+$('tbody:empty').html("<tr><td></td></tr>");
+
+// Hide configuration button for panels without configuration
+$('.container .panel-heading a.config').each(function (idx, el){
+ var config = $(el).parents('.panel').children('.panel-footer');
+ if (config.length == 1)
+ $(el).removeClass('hidden');
+});
+
+// Initial state & toggle icons of collapsed panel
+$('.container .panel-heading a[data-toggle="collapse"]').each(function (idx, el){
+ var body = $(el).parents('.panel').children('.panel-body')
+ var isOpen = body.hasClass('in');
+
+ $(el).children('i').toggleClass('fa-plus-circle', !isOpen);
+ $(el).children('i').toggleClass('fa-minus-circle', isOpen);
+
+ body.on('shown.bs.collapse', function(){
+ $(el).children('i').toggleClass('fa-minus-circle', true);
+ $(el).children('i').toggleClass('fa-plus-circle', false);
+
+ if($(el).closest('a').attr('id') != 'widgets-available') {
+ updateWidgets();
+ }
+ });
+
+ body.on('hidden.bs.collapse', function(){
+ $(el).children('i').toggleClass('fa-minus-circle', false);
+ $(el).children('i').toggleClass('fa-plus-circle', true);
+
+ if($(el).closest('a').attr('id') != 'widgets-available') {
+ updateWidgets();
+ }
+ });
}); \ No newline at end of file
diff --git a/src/usr/local/www/license.php b/src/usr/local/www/license.php
index ed1256d..255f0ed 100644
--- a/src/usr/local/www/license.php
+++ b/src/usr/local/www/license.php
@@ -1,38 +1,61 @@
<?php
-/* $Id$ */
/*
license.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-license
-##|*NAME=System: License page
+##|*NAME=System: License
##|*DESCR=Allow access to the 'System: License' page.
##|*MATCH=license.php*
##|-PRIV
@@ -89,7 +112,7 @@ include("head.inc");
<?= "{$g['product_name']} " . gettext("is based upon/includes various free software packages, ".
"listed below.")?><br />
<?php printf(gettext("The authors of %s would like to thank the authors of these " .
- "software packages for their efforts"),$g['product_name'])?>.
+ "software packages for their efforts"), $g['product_name'])?>.
</p>
<p>
FreeBSD (<a href="http://www.freebsd.org" target="_blank">http://www.freebsd.org</a>)<br />
@@ -151,4 +174,4 @@ include("head.inc");
</div>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/load_balancer_monitor.php b/src/usr/local/www/load_balancer_monitor.php
index e299d64..89251ee 100644
--- a/src/usr/local/www/load_balancer_monitor.php
+++ b/src/usr/local/www/load_balancer_monitor.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
load_balancer_monitor.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-loadbalancer-monitor
-##|*NAME=Services: Load Balancer: Monitors page
+##|*NAME=Services: Load Balancer: Monitors
##|*DESCR=Allow access to the 'Services: Load Balancer: Monitors' page.
##|*MATCH=load_balancer_monitor.php*
##|-PRIV
@@ -83,19 +104,22 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Monitor"));
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Monitor"));
$shortcut_section = "relayd";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('loadbalancer'))
+if (is_subsystem_dirty('loadbalancer')) {
print_info_box_np(gettext("The load balancer configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
/* active tabs */
$tab_array = array();
@@ -122,7 +146,7 @@ display_top_tabs($tab_array);
<tbody>
<?php
$idx = 0;
-foreach($a_monitor as $monitor) {
+foreach ($a_monitor as $monitor) {
?>
<tr>
<td>
@@ -135,9 +159,9 @@ foreach($a_monitor as $monitor) {
<?=$monitor['descr']?>
</td>
<td>
- <a href="load_balancer_monitor_edit.php?id=<?=$idx?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="load_balancer_monitor.php?act=del&id=<?=$idx?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
- <a href="load_balancer_monitor_edit.php?act=dup&id=<?=$idx?>" class="btn btn-xs btn-default"><?=gettext('Duplicate')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit monitor')?>" href="load_balancer_monitor_edit.php?id=<?=$idx?>"></a>
+ <a class="fa fa-clone" title="<?=gettext('Copy monitor')?>" href="load_balancer_monitor_edit.php?act=dup&id=<?=$idx?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete monitor')?>" href="load_balancer_monitor.php?act=del&id=<?=$idx?>"></a>
</td>
</tr>
<?php
@@ -147,14 +171,15 @@ foreach($a_monitor as $monitor) {
</tbody>
</table>
</div>
-
- <nav class="action-buttons">
- <a href="load_balancer_monitor_edit.php" class="btn btn-success"><?=gettext('Add')?></a>
- </nav>
-
</div>
</form>
+<nav class="action-buttons">
+ <a href="load_balancer_monitor_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+</nav>
<?php
diff --git a/src/usr/local/www/load_balancer_monitor_edit.php b/src/usr/local/www/load_balancer_monitor_edit.php
index 5348c19..615064f 100644
--- a/src/usr/local/www/load_balancer_monitor_edit.php
+++ b/src/usr/local/www/load_balancer_monitor_edit.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
load_balancer_monitor_edit.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-loadbalancer-monitor-edit
-##|*NAME=Services: Load Balancer: Monitor: Edit page
+##|*NAME=Services: Load Balancer: Monitor: Edit
##|*DESCR=Allow access to the 'Services: Load Balancer: Monitor: Edit' page.
##|*MATCH=load_balancer_monitor_edit.php*
##|-PRIV
@@ -218,19 +239,20 @@ $types = array("icmp" => gettext("ICMP"), "tcp" => gettext("TCP"), "http" => get
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Hides all elements of the specified class. This will usually be a section
function hideClass(s_class, hide) {
- if(hide)
+ if (hide) {
$('.' + s_class).hide();
- else
+ } else {
$('.' + s_class).show();
+ }
}
// Hide all sections except 't'
- function updateType(t){
- switch(t) {
+ function updateType(t) {
+ switch (t) {
<?php
/* OK, so this is sick using php to generate javascript, but it needed to be done */
foreach ($types as $key => $val) {
@@ -264,10 +286,9 @@ events.push(function(){
</script>
<?php
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
diff --git a/src/usr/local/www/load_balancer_pool.php b/src/usr/local/www/load_balancer_pool.php
index 6dc647e..fee5f4b 100644
--- a/src/usr/local/www/load_balancer_pool.php
+++ b/src/usr/local/www/load_balancer_pool.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
load_balancer_pool.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-loadbalancer-pool
-##|*NAME=Load Balancer: Pool page
+##|*NAME=Load Balancer: Pool
##|*DESCR=Allow access to the 'Load Balancer: Pool' page.
##|*MATCH=load_balancer_pool.php*
##|-PRIV
@@ -97,19 +118,22 @@ for ($i = 0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
$a_pool[$i]['monitor'] = "<a href=\"/load_balancer_monitor_edit.php?id={$mondex[$a_pool[$i]['monitor']]}\">" . htmlspecialchars($a_pool[$i]['monitor']) . "</a>";
}
-$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool"));
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Pool"));
$shortcut_section = "relayd";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
-if (is_subsystem_dirty('loadbalancer'))
+if (is_subsystem_dirty('loadbalancer')) {
print_info_box_np(sprintf(gettext("The load balancer configuration has been changed%sYou must apply the changes in order for them to take effect."), "<br />"));
+}
/* active tabs */
$tab_array = array();
@@ -140,7 +164,7 @@ display_top_tabs($tab_array);
<?php
$idx = 0;
-foreach($a_pool as $pool) {
+foreach ($a_pool as $pool) {
?>
<tr>
<td>
@@ -170,9 +194,9 @@ foreach($a_pool as $pool) {
<?=htmlspecialchars($pool['descr'])?>
</td>
<td>
- <a href="load_balancer_pool_edit.php?id=<?=$idx?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="load_balancer_pool.php?act=del&id=<?=$idx?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
- <a href="load_balancer_pool_edit.php?act=dup&id=<?=$idx?>" class="btn btn-xs btn-default"><?=gettext('Duplicate')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit pool')?>" href="load_balancer_pool_edit.php?id=<?=$idx?>"></a>
+ <a class="fa fa-clone" title="<?=gettext('Copy pool')?>" href="load_balancer_pool_edit.php?act=dup&id=<?=$idx?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete pool')?>" href="load_balancer_pool.php?act=del&id=<?=$idx?>"></a>
</td>
</tr>
<?php
@@ -182,12 +206,14 @@ foreach($a_pool as $pool) {
</tbody>
</table>
</div>
-
- <nav class="action-buttons">
- <a href="load_balancer_pool_edit.php" class="btn btn-success"><?=gettext('Add')?></a>
- </nav>
-
</div>
</form>
-<?php include("foot.inc"); \ No newline at end of file
+<nav class="action-buttons">
+ <a href="load_balancer_pool_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+</nav>
+
+<?php include("foot.inc");
diff --git a/src/usr/local/www/load_balancer_pool_edit.php b/src/usr/local/www/load_balancer_pool_edit.php
index 90550c8..b2ae2f4 100644
--- a/src/usr/local/www/load_balancer_pool_edit.php
+++ b/src/usr/local/www/load_balancer_pool_edit.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
load_balancer_pool_edit.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2005-2008 Bill Marquette <bill.marquette@gmail.com>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-loadbalancer-pool-edit
-##|*NAME=Load Balancer: Pool: Edit page
+##|*NAME=Load Balancer: Pool: Edit
##|*DESCR=Allow access to the 'Load Balancer: Pool: Edit' page.
##|*MATCH=load_balancer_pool_edit.php*
##|-PRIV
@@ -52,10 +73,12 @@ if (!is_array($config['load_balancer']['lbpool'])) {
$a_pool = &$config['load_balancer']['lbpool'];
-if (is_numericint($_GET['id']))
+if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
-if (isset($_POST['id']) && is_numericint($_POST['id']))
+}
+if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
+}
if (isset($id) && $a_pool[$id]) {
$pconfig['name'] = $a_pool[$id]['name'];
@@ -81,55 +104,61 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "name mode port monitor servers");
- $reqdfieldsn = array(gettext("Name"),gettext("Mode"),gettext("Port"),gettext("Monitor"),gettext("Server List"));
+ $reqdfieldsn = array(gettext("Name"), gettext("Mode"), gettext("Port"), gettext("Monitor"), gettext("Server List"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
/* Ensure that our pool names are unique */
- for ($i=0; isset($config['load_balancer']['lbpool'][$i]); $i++)
- if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id))
+ for ($i=0; isset($config['load_balancer']['lbpool'][$i]); $i++) {
+ if (($_POST['name'] == $config['load_balancer']['lbpool'][$i]['name']) && ($i != $id)) {
$input_errors[] = gettext("This pool name has already been used. Pool names must be unique.");
+ }
+ }
- if (preg_match('/[ \/]/', $_POST['name']))
+ if (preg_match('/[ \/]/', $_POST['name'])) {
$input_errors[] = gettext("You cannot use spaces or slashes in the 'name' field.");
+ }
- if (strlen($_POST['name']) > 16)
+ if (strlen($_POST['name']) > 16) {
$input_errors[] = gettext("The 'name' field must be 16 characters or less.");
+ }
- if (in_array($_POST['name'], $reserved_table_names))
+ if (in_array($_POST['name'], $reserved_table_names)) {
$input_errors[] = sprintf(gettext("The name '%s' is a reserved word and cannot be used."), $_POST['name']);
+ }
- if (is_alias($_POST['name']))
+ if (is_alias($_POST['name'])) {
$input_errors[] = sprintf(gettext("Sorry, an alias is already named %s."), $_POST['name']);
+ }
- if (!is_portoralias($_POST['port']))
+ if (!is_portoralias($_POST['port'])) {
$input_errors[] = gettext("The port must be an integer between 1 and 65535, or a port alias.");
+ }
// May as well use is_port as we want a positive integer and such.
- if (!empty($_POST['retry']) && !is_port($_POST['retry']))
+ if (!empty($_POST['retry']) && !is_port($_POST['retry'])) {
$input_errors[] = gettext("The retry value must be an integer between 1 and 65535.");
+ }
if (!in_array($_POST['mode'], $allowed_modes)) {
$input_errors[] = gettext("The submitted mode is not valid.");
}
if (is_array($_POST['servers'])) {
- foreach($pconfig['servers'] as $svrent) {
+ foreach ($pconfig['servers'] as $svrent) {
if (!is_ipaddr($svrent) && !is_subnetv4($svrent)) {
$input_errors[] = sprintf(gettext("%s is not a valid IP address or IPv4 subnet (in \"enabled\" list)."), $svrent);
- }
- else if (is_subnetv4($svrent) && subnet_size($svrent) > 64) {
+ } else if (is_subnetv4($svrent) && subnet_size($svrent) > 64) {
$input_errors[] = sprintf(gettext("%s is a subnet containing more than 64 IP addresses (in \"enabled\" list)."), $svrent);
}
}
}
if (is_array($_POST['serversdisabled'])) {
- foreach($pconfig['serversdisabled'] as $svrent) {
+ foreach ($pconfig['serversdisabled'] as $svrent) {
if (!is_ipaddr($svrent) && !is_subnetv4($svrent)) {
$input_errors[] = sprintf(gettext("%s is not a valid IP address or IPv4 subnet (in \"disabled\" list)."), $svrent);
- }
- else if (is_subnetv4($svrent) && subnet_size($svrent) > 64) {
+ } else if (is_subnetv4($svrent) && subnet_size($svrent) > 64) {
$input_errors[] = sprintf(gettext("%s is a subnet containing more than 64 IP addresses (in \"disabled\" list)."), $svrent);
}
}
@@ -137,19 +166,23 @@ if ($_POST) {
$m = array();
- for ($i=0; isset($config['load_balancer']['monitor_type'][$i]); $i++)
+ for ($i=0; isset($config['load_balancer']['monitor_type'][$i]); $i++) {
$m[$config['load_balancer']['monitor_type'][$i]['name']] = $config['load_balancer']['monitor_type'][$i];
+ }
- if (!isset($m[$_POST['monitor']]))
+ if (!isset($m[$_POST['monitor']])) {
$input_errors[] = gettext("Invalid monitor chosen.");
+ }
if (!$input_errors) {
$poolent = array();
- if(isset($id) && $a_pool[$id])
+ if (isset($id) && $a_pool[$id]) {
$poolent = $a_pool[$id];
+ }
- if($poolent['name'] != "")
+ if ($poolent['name'] != "") {
$changedesc .= sprintf(gettext(" modified '%s' pool:"), $poolent['name']);
+ }
update_if_changed("name", $poolent['name'], $_POST['name']);
update_if_changed("mode", $poolent['mode'], $_POST['mode']);
@@ -163,12 +196,14 @@ if ($_POST) {
if (isset($id) && $a_pool[$id]) {
/* modify all virtual servers with this name */
for ($i = 0; isset($config['load_balancer']['virtual_server'][$i]); $i++) {
- if ($config['load_balancer']['virtual_server'][$i]['lbpool'] == $a_pool[$id]['name'])
+ if ($config['load_balancer']['virtual_server'][$i]['lbpool'] == $a_pool[$id]['name']) {
$config['load_balancer']['virtual_server'][$i]['lbpool'] = $poolent['name'];
+ }
}
$a_pool[$id] = $poolent;
- } else
+ } else {
$a_pool[] = $poolent;
+ }
if ($changecount > 0) {
/* Mark pool dirty */
@@ -181,7 +216,7 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Services"), gettext("Load Balancer"),gettext("Pool"),gettext("Edit"));
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Pool"), gettext("Edit"));
$shortcut_section = "relayd";
include("head.inc");
@@ -189,7 +224,7 @@ include("head.inc");
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Disables the specified input element
function disableInput(id, disable) {
@@ -208,11 +243,12 @@ events.push(function(){
var len = From.length;
var option;
- if(len > 1) {
- for(i=0; i<len; i++) {
- if(From.eq(i).is(':selected')) {
+ if (len > 1) {
+ for (i=0; i<len; i++) {
+ if (From.eq(i).is(':selected')) {
option = From.eq(i).val();
- To.append(new Option(option, option));
+ value = From.eq(i).text();
+ To.append(new Option(value, option));
From.eq(i).remove();
}
}
@@ -224,7 +260,7 @@ events.push(function(){
if ($("#mode").val() == "failover") {
disableInput('movetoenabled', $('[name="servers[]"] option').length > 0);
} else {
- disableInput('movetoenabled',false);
+ disableInput('movetoenabled', false);
}
}
@@ -237,8 +273,8 @@ events.push(function(){
var len = $('[name="servers[]"] option').length;
var option;
- if(len > 1) {
- for(i=len-1; i>0; i--) {
+ if (len > 1) {
+ for (i=len-1; i>0; i--) {
option = $('[name="servers[]"] option').eq(i).val();
$('[name="serversdisabled[]"]').append(new Option(option, option));
$('[name="servers[]"] option').eq(i).remove();
@@ -285,7 +321,7 @@ events.push(function(){
checkPoolControls();
// On submit
- $('form').submit(function(){
+ $('form').submit(function() {
AllServers($('[name="servers[]"] option'), true);
AllServers($('[name="serversdisabled[]"] option'), true);
});
@@ -295,10 +331,9 @@ events.push(function(){
</script>
<?php
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
@@ -352,10 +387,11 @@ $section = new Form_Section('Add item to the pool');
$monitorlist = array();
-foreach ($config['load_balancer']['monitor_type'] as $monitor)
+foreach ($config['load_balancer']['monitor_type'] as $monitor) {
$monitorlist[$monitor['name']] = $monitor['name'];
+}
-if(count($config['load_balancer']['monitor_type'])) {
+if (count($config['load_balancer']['monitor_type'])) {
$section->addInput(new Form_Select(
'monitor',
'Monitor',
@@ -394,8 +430,9 @@ $list = array();
if (is_array($pconfig['serversdisabled'])) {
foreach ($pconfig['serversdisabled'] as $svrent) {
- if ($svrent != '')
+ if ($svrent != '') {
$list[$svrent] = $svrent;
+ }
}
}
@@ -458,9 +495,9 @@ $form->add($section);
print($form);
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// --------- Autocomplete -----------------------------------------------------------------------------------------
var customarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
@@ -473,4 +510,4 @@ events.push(function(){
</script>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/load_balancer_setting.php b/src/usr/local/www/load_balancer_setting.php
index 04ddfb9..57f96af 100644
--- a/src/usr/local/www/load_balancer_setting.php
+++ b/src/usr/local/www/load_balancer_setting.php
@@ -1,43 +1,63 @@
<?php
-/* $Id$ */
/*
load_balancer_setting.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2008 Bill Marquette <bill.marquette@gmail.com>.
- Copyright (C) 2012 Pierre POMES <pierre.pomes@gmail.com>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Bill Marquette <bill.marquette@gmail.com>.
+ * Copyright (c) 2012 Pierre POMES <pierre.pomes@gmail.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-loadbalancer-setting
-##|*NAME=Services: Load Balancer: setting page
+##|*NAME=Services: Load Balancer: Settings
##|*DESCR=Allow access to the 'Settings: Load Balancer: Settings' page.
##|*MATCH=load_balancer_setting.php*
##|-PRIV
@@ -97,20 +117,23 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Services"),gettext("Load Balancer"),gettext("Settings"));
+$pgtitle = array(gettext("Services"), gettext("Load Balancer"), gettext("Settings"));
$shortcut_section = "relayd";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('loadbalancer'))
+if (is_subsystem_dirty('loadbalancer')) {
print_info_box_np(gettext("The load balancer configuration has been changed") . ' ' .
gettext("You must apply the changes in order for them to take effect."), 'Apply', null, false, 'danger');
+}
/* active tabs */
$tab_array = array();
@@ -120,8 +143,6 @@ $tab_array[] = array(gettext("Monitors"), false, "load_balancer_monitor.php");
$tab_array[] = array(gettext("Settings"), true, "load_balancer_setting.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('Relayd Global Settings');
diff --git a/src/usr/local/www/load_balancer_virtual_server.php b/src/usr/local/www/load_balancer_virtual_server.php
index 823935a..f0fb0dd 100644
--- a/src/usr/local/www/load_balancer_virtual_server.php
+++ b/src/usr/local/www/load_balancer_virtual_server.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
load_balancer_virtual_server.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,13 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-services-loadbalancer-virtualservers
-##|*NAME=Services: Load Balancer: Virtual Servers page
+##|*NAME=Services: Load Balancer: Virtual Servers
##|*DESCR=Allow access to the 'Services: Load Balancer: Virtual Servers' page.
##|*MATCH=load_balancer_virtual_server.php*
##|-PRIV
@@ -128,14 +123,17 @@ $shortcut_section = "relayd-virtualservers";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
-if (is_subsystem_dirty('loadbalancer'))
+if (is_subsystem_dirty('loadbalancer')) {
print_info_box_np(gettext("The virtual server configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
/* active tabs */
$tab_array = array();
@@ -148,7 +146,7 @@ display_top_tabs($tab_array);
<form action="load_balancer_virtual_server.php" method="post">
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('Virtual ervers')?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('Virtual Servers')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover">
<thead>
@@ -165,9 +163,9 @@ display_top_tabs($tab_array);
</thead>
<tbody>
<?php
-if(!empty($a_vs)) {
+if (!empty($a_vs)) {
$i = 0;
- foreach($a_vs as $a_v) {
+ foreach ($a_vs as $a_v) {
?>
<tr>
<td><?=htmlspecialchars($a_v['name'])?></td>
@@ -178,9 +176,9 @@ if(!empty($a_vs)) {
<td><?=$a_v['sitedown']?></td>
<td><?=htmlspecialchars($a_v['descr'])?></td>
<td>
- <a type="button" class="btn btn-info btn-xs" href="load_balancer_virtual_server_edit.php?id=<?=$i?>"><?=gettext('Edit')?></a>
- <a type="button" class="btn btn-warning btn-xs" href="load_balancer_virtual_server_edit.php?act=dup&id=<?=$i?>"><?=gettext('Copy')?></a>
- <a type="button" class="btn btn-danger btn-xs" href="load_balancer_virtual_server.php?act=del&id=<?=$i?>"><?=gettext('Del')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit virtual server')?>" href="load_balancer_virtual_server_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-clone" title="<?=gettext('Copy virtual server')?>" href="load_balancer_virtual_server_edit.php?act=dup&id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete virtual server')?>" href="load_balancer_virtual_server.php?act=del&id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -198,13 +196,15 @@ if(!empty($a_vs)) {
</table>
</div>
</div>
-
- <nav class="action-buttons">
- <a href="load_balancer_virtual_server_edit.php" class="btn btn-success"><?=gettext("Add")?></a>
- </nav>
-
</form>
+<nav class="action-buttons">
+ <a href="load_balancer_virtual_server_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
+
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/load_balancer_virtual_server_edit.php b/src/usr/local/www/load_balancer_virtual_server_edit.php
index 1dfe7b6..31bf0ce 100644
--- a/src/usr/local/www/load_balancer_virtual_server_edit.php
+++ b/src/usr/local/www/load_balancer_virtual_server_edit.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
load_balancer_virtual_server_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2005-2008 Bill Marquette <bill.marquette@gmail.com>
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,13 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-loadbalancer-virtualserver-edit
-##|*NAME=Load Balancer: Virtual Server: Edit page
+##|*NAME=Load Balancer: Virtual Server: Edit
##|*DESCR=Allow access to the 'Load Balancer: Virtual Server: Edit' page.
##|*MATCH=load_balancer_virtual_server_edit.php*
##|-PRIV
@@ -200,10 +195,9 @@ $shortcut_section = "relayd-virtualservers";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -309,9 +303,9 @@ print($form);
print_info_box(gettext('Don\'t forget to add a firewall rule for the virtual server/pool after you have finished setting it up.'));
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
var customarray = <?= json_encode(get_alias_list(array("port", "url_ports", "urltable_ports"))) ?>;
@@ -327,4 +321,4 @@ events.push(function(){
//]]>
</script>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/logo.png b/src/usr/local/www/logo.png
index 9362fcb..cca5afb 100644
--- a/src/usr/local/www/logo.png
+++ b/src/usr/local/www/logo.png
Binary files differ
diff --git a/src/usr/local/www/pfs-mini.png b/src/usr/local/www/pfs-mini.png
new file mode 100644
index 0000000..9e504e2
--- /dev/null
+++ b/src/usr/local/www/pfs-mini.png
Binary files differ
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index 3381a36..63e36f9 100755
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
pkg.php
/*
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,13 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: pkgs
-*/
##|+PRIV
##|*IDENT=page-package-settings
-##|*NAME=Package: Settings page
+##|*NAME=Package: Settings
##|*DESCR=Allow access to the 'Package: Settings' page.
##|*MATCH=pkg.php*
##|-PRIV
@@ -68,11 +63,6 @@
require_once("guiconfig.inc");
require_once("pkg-utils.inc");
-function gentitle_pkg($pgname) {
- global $config;
- return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname;
-}
-
function domTT_title($title_msg) {
print "onmouseout=\"this.style.color = ''; domTT_mouseout(this, event);\" onmouseover=\"domTT_activate(this, event, 'content', '".gettext($title_msg)."', 'trail', true, 'delay', 0, 'fade', 'both', 'fadeMax', 93, 'styleClass', 'niceTitle');\"";
}
@@ -85,8 +75,14 @@ if ($xml == "") {
include("foot.inc");
exit;
} else {
- if (file_exists("/usr/local/pkg/" . $xml)) {
- $pkg = parse_xml_config_pkg("/usr/local/pkg/" . $xml, "packagegui");
+ $pkg_xml_prefix = "/usr/local/pkg/";
+ $pkg_full_path = "{$pkg_xml_prefix}/{$xml}";
+ if (substr_compare(realpath($pkg_full_path), $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) {
+ print_info_box_np(gettext("ERROR: Invalid path specified."));
+ die;
+ }
+ if (file_exists($pkg_full_path)) {
+ $pkg = parse_xml_config_pkg($pkg_full_path, "packagegui");
} else {
include("head.inc");
print_info_box_np(gettext("File not found ") . htmlspecialchars($xml));
@@ -180,125 +176,148 @@ if ($pkg['custom_php_command_before_form'] != "") {
eval($pkg['custom_php_command_before_form']);
}
-$pgtitle = array($pkg['title']);
+// Breadcrumb
+if ($pkg['title'] != "") {
+ /*if (!$only_edit) { // Is any package still making use of this?? Is this something that is still wanted, considering the breadcrumb policy https://redmine.pfsense.org/issues/5527
+ $pkg['title'] = $pkg['title'] . '/Edit'; // If this needs to live on, then it has to be moved to run AFTER "foreach ($pkg['tabs']['tab'] as $tab)"-loop. This due to $pgtitle[] = $tab['text'];
+ }*/
+ if (strpos($pkg['title'], '/')) {
+ $title = explode('/', $pkg['title']);
+
+ foreach ($title as $subtitle) {
+ $pgtitle[] = gettext($subtitle);
+ }
+ } else {
+ $pgtitle = array(gettext("Package"), gettext($pkg['title']));
+ }
+} else {
+ $pgtitle = array(gettext("Package"), gettext("Editor"));
+}
+
+if ($pkg['tabs'] != "") {
+ $tab_array = array();
+ foreach ($pkg['tabs']['tab'] as $tab) {
+ if ($tab['tab_level']) {
+ $tab_level = $tab['tab_level'];
+ } else {
+ $tab_level = 1;
+ }
+ if (isset($tab['active'])) {
+ $active = true;
+ $pgtitle[] = $tab['text'];
+ } else {
+ $active = false;
+ }
+ if (isset($tab['no_drop_down'])) {
+ $no_drop_down = true;
+ }
+ $urltmp = "";
+ if ($tab['url'] != "") {
+ $urltmp = $tab['url'];
+ }
+ if ($tab['xml'] != "") {
+ $urltmp = "pkg_edit.php?xml=" . $tab['xml'];
+ }
+
+ $addresswithport = getenv("HTTP_HOST");
+ $colonpos = strpos($addresswithport, ":");
+ if ($colonpos !== False) {
+ //my url is actually just the IP address of the pfsense box
+ $myurl = substr($addresswithport, 0, $colonpos);
+ } else {
+ $myurl = $addresswithport;
+ }
+ // eval url so that above $myurl item can be processed if need be.
+ $url = str_replace('$myurl', $myurl, $urltmp);
+
+ $tab_array[$tab_level][] = array(
+ $tab['text'],
+ $active,
+ $url
+ );
+ }
+
+ ksort($tab_array);
+}
+
include("head.inc");
+if (isset($tab_array)) {
+ foreach ($tab_array as $tabid => $tab) {
+ display_top_tabs($tab); //, $no_drop_down, $tabid);
+ }
+}
?>
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
+
function setFilter(filtertext) {
jQuery('#pkg_filter').val(filtertext);
document.pkgform.submit();
}
- <?php
- if ($pkg['adddeleteeditpagefields']['movable']) {
- ?>
- jQuery(document).ready(function() {
- jQuery('#mainarea table tbody').sortable({
- items: 'tr.sortable',
- cursor: 'move',
- distance: 10,
- opacity: 0.8,
- helper: function(e, ui) {
- ui.children().each(function() {
- jQuery(this).width(jQuery(this).width());
- });
- return ui;
- },
+<?php
+ if ($pkg['adddeleteeditpagefields']['movable']) {
+?>
+ $('#mainarea table tbody').sortable({
+ items: 'tr.sortable',
+ cursor: 'move',
+ distance: 10,
+ opacity: 0.8,
+ helper: function(e, ui) {
+ ui.children().each(function() {
+ jQuery(this).width(jQuery(this).width());
});
- });
- function save_changes_to_xml(xml) {
- var ids=jQuery('#mainarea table tbody').sortable('serialize', {key:"ids[]"});
- var strloading="<img src='/themes/<?= $g['theme']; ?>/images/misc/loader.gif' alt='loader' /> " + "<?=gettext('Saving changes...')?>";
- if (confirm("<?=gettext("Do you really want to save changes?")?>")) {
- jQuery.ajax({
- type: 'get',
- cache: false,
- url: "<?=$_SERVER['SCRIPT_NAME']?>",
- data: {xml:'<?=$xml?>', act:'update', ids: ids},
- beforeSend: function() {
- jQuery('#savemsg').empty().html(strloading);
- },
- error: function(data) {
- jQuery('#savemsg').empty().html('Error:' + data);
- },
- success: function(data) {
- jQuery('#savemsg').empty().html(data);
- }
- });
- }
- }
- <?php
- }
- ?>
+ return ui;
+ },
+ });
+<?php
+ }
+?>
});
+
+function save_changes_to_xml(xml) {
+ var ids = $('#mainarea table tbody').sortable('serialize', {key:"ids[]"});
+ var strloading="<?=gettext('Saving changes...')?>";
+ if (confirm("<?=gettext("Do you really want to save changes?")?>")) {
+ $.ajax({
+ type: 'get',
+ cache: false,
+ url: "<?=$_SERVER['SCRIPT_NAME']?>",
+ data: {xml:'<?=$xml?>', act:'update', ids: ids},
+ beforeSend: function() {
+ $('#savemsg').empty().html(strloading);
+ },
+ error: function(data) {
+ $('#savemsg').empty().html('Error:' + data);
+ },
+ success: function(data) {
+ $('#savemsg').empty().html(data);
+ }
+ });
+ }
+}
+
//]]>
</script>
<?php
-if ($_GET['savemsg'] != "")
+if ($_GET['savemsg'] != "") {
$savemsg = htmlspecialchars($_GET['savemsg']);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
?>
<form action="pkg.php" name="pkgform" method="get">
<input type='hidden' name='xml' value='<?=$_REQUEST['xml']?>' />
-<?php
- if ($pkg['tabs'] != "") {
- $tab_array = array();
- foreach ($pkg['tabs']['tab'] as $tab) {
- if ($tab['tab_level']) {
- $tab_level = $tab['tab_level'];
- } else {
- $tab_level = 1;
- }
- if (isset($tab['active'])) {
- $active = true;
- } else {
- $active = false;
- }
- if (isset($tab['no_drop_down'])) {
- $no_drop_down = true;
- }
- $urltmp = "";
- if ($tab['url'] != "") {
- $urltmp = $tab['url'];
- }
- if ($tab['xml'] != "") {
- $urltmp = "pkg_edit.php?xml=" . $tab['xml'];
- }
-
- $addresswithport = getenv("HTTP_HOST");
- $colonpos = strpos($addresswithport, ":");
- if ($colonpos !== False) {
- //my url is actually just the IP address of the pfsense box
- $myurl = substr($addresswithport, 0, $colonpos);
- } else {
- $myurl = $addresswithport;
- }
- // eval url so that above $myurl item can be processed if need be.
- $url = str_replace('$myurl', $myurl, $urltmp);
-
- $tab_array[$tab_level][] = array(
- $tab['text'],
- $active,
- $url
- );
- }
-
- ksort($tab_array);
- foreach ($tab_array as $tab) {
- display_top_tabs($tab, $no_drop_down);
- }
- }
-?>
-
- <table class="table table-striped table-hover table-condensed">
+ <div id="mainarea" class="panel panel-default">
+ <table id="mainarea" class="table table-striped table-hover table-condensed">
+ <thead>
<?php
/* Handle filtering bar A-Z */
$include_filtering_inputbox = false;
@@ -336,7 +355,7 @@ if ($savemsg)
echo "Filter field: <select name='pkg_filter_type'>";
foreach ($field['sortablefields']['item'] as $si) {
if ($si['name'] == $_REQUEST['pkg_filter_type']) {
- $SELECTED = "selected=\"selected\"";
+ $SELECTED = "selected";
} else {
$SELECTED = "";
}
@@ -353,6 +372,7 @@ if ($savemsg)
}
?>
<tr>
+
<?php
if ($display_maximum_rows) {
$totalpages = ceil(round((count($evaledvar) / $display_maximum_rows), 9));
@@ -372,14 +392,14 @@ if ($savemsg)
$tmppp++;
}
}
- echo "<tr><td colspan='" . count($pkg['adddeleteeditpagefields']['columnitem']) . "'>";
+ echo "<tr><th colspan='" . count($pkg['adddeleteeditpagefields']['columnitem']) . "'>";
echo "<table width='100%' summary=''>";
echo "<tr>";
echo "<td align='left'>Displaying page $page of $totalpages</b></td>";
echo "<td align='right'>Rows per page: <select onchange='document.pkgform.submit();' name='display_maximum_rows'>";
for ($x = 0; $x < 250; $x++) {
if ($x == $display_maximum_rows) {
- $SELECTED = "selected=\"selected\"";
+ $SELECTED = "selected";
} else {
$SELECTED = "";
}
@@ -388,17 +408,20 @@ if ($savemsg)
}
echo "</select></td></tr>";
echo "</table>";
- echo "</td></tr>";
+ echo "</th></tr>";
}
+
$cols = 0;
if ($pkg['adddeleteeditpagefields']['columnitem'] != "") {
foreach ($pkg['adddeleteeditpagefields']['columnitem'] as $column) {
- echo "<td class=\"listhdrr\">" . $column['fielddescr'] . "</td>";
+ echo "<th class=\"listhdrr\">" . $column['fielddescr'] . "</th>";
$cols++;
}
}
?>
</tr>
+ </thead>
+ <tbody>
<?php
$i = 0;
$pagination_counter = 0;
@@ -496,22 +519,23 @@ if ($savemsg)
} // foreach columnitem
} // if columnitem
?>
- <td valign="middle" class="list nowrap">
+ <td valign="middle" class="list text-nowrap">
<table border="0" cellspacing="0" cellpadding="1" summary="icons">
<tr>
<?php
#Show custom description to edit button if defined
$edit_msg=($pkg['adddeleteeditpagefields']['edittext']?$pkg['adddeleteeditpagefields']['edittext']:"Edit this item");
?>
- <td valign="middle"><a href="pkg_edit.php?xml=<?=$xml?>&amp;act=edit&amp;id=<?=$i?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" <?=domTT_title($edit_msg)?> alt="edit" /></a></td>
+ <td><a class="fa fa-pencil" href="pkg_edit.php?xml=<?=$xml?>&amp;act=edit&amp;id=<?=$i?>" title="<?=$edit_msg?>"></a></td>
<?php
#Show custom description to delete button if defined
$delete_msg=($pkg['adddeleteeditpagefields']['deletetext']?$pkg['adddeleteeditpagefields']['deletetext']:"Delete this item");
?>
- <td valign="middle"><a href="pkg.php?xml=<?=$xml?>&amp;act=del&amp;id=<?=$i?>" onclick="return confirm('<?=gettext("Do you really want to delete this item?")?>')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" <?=domTT_title($delete_msg)?> alt="delete" /></a></td>
+ <td>&nbsp;<a class="fa fa-trash" href="pkg.php?xml=<?=$xml?>&amp;act=del&amp;id=<?=$i?>" title="<?=gettext("Delete")?>"></a></td>
</tr>
- </table>
- </td>
+ </tbody>
+ </table>
+ </td>
<?php
echo "</tr>\n"; // Pairs with an echo tr some way above
// Handle pagination and display_maximum_rows
@@ -562,12 +586,14 @@ if ($savemsg)
#Show custom description to add button if defined
$add_msg=($pkg['adddeleteeditpagefields']['addtext']?$pkg['adddeleteeditpagefields']['addtext']:"Add a new item");
?>
- <td valign="middle"><a href="pkg_edit.php?xml=<?=$xml?>&amp;id=<?=$i?>" class="btn btn-xs btn-success"><?=gettext('Add')?></a></td>
+ <td><a href="pkg_edit.php?xml=<?=$xml?>&amp;id=<?=$i?>" class="btn btn-sm btn-success" title="<?=$add_msg?>"><?=gettext('Add')?></a></td>
<?php
#Show description button and info if defined
if ($pkg['adddeleteeditpagefields']['description']) {
?>
- <td valign="middle"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_info_pkg.gif" <?=domTT_title($pkg['adddeleteeditpagefields']['description'])?> alt="info" /></td>
+ <td>
+ <i class="fa fa-info-circle"><?=$pkg['adddeleteeditpagefields']['description']?></i>
+ </td>
<?php
}
?>
@@ -580,13 +606,15 @@ if ($savemsg)
#Show save button only when movable is defined
if ($pkg['adddeleteeditpagefields']['movable']) {
?>
- <tr>
- <td><input class="btn btn-primary" type="button" value="Save" name="Submit" onclick="save_changes_to_xml('<?=$xml?>')" /></td>
- </tr>
+
+
+
<?php
}
?>
</table>
+ </div>
+ <input class="btn btn-primary" type="button" value="Save" name="Submit" onclick="save_changes_to_xml('<?=$xml?>')" />
</form>
<?php
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php
index 1773d9a..57e51ef 100644
--- a/src/usr/local/www/pkg_edit.php
+++ b/src/usr/local/www/pkg_edit.php
@@ -1,10 +1,9 @@
<?php
-/* $Id$ */
/*
pkg_edit.php
-*//* ====================================================================
+*/
+/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -53,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: pkgs
-*/
##|+PRIV
##|*IDENT=page-package-edit
-##|*NAME=Package: Edit page
+##|*NAME=Package: Edit
##|*DESCR=Allow access to the 'Package: Edit' page.
##|*MATCH=pkg_edit.php*
##|-PRIV
@@ -130,8 +125,9 @@ if ($config['installedpackages'] && !is_array($config['installedpackages'][xml_s
}
// If the first entry in the array is an empty <config/> tag, kill it.
-if ($config['installedpackages'] && (count($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']) > 0)
- && ($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'][0] == "")) {
+if ($config['installedpackages'] &&
+ (count($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']) > 0) &&
+ ($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config'][0] == "")) {
array_shift($config['installedpackages'][xml_safe_fieldname($pkg['name'])]['config']);
}
@@ -152,7 +148,7 @@ if ($_POST) {
$reqfields = array();
$reqfieldsn = array();
foreach ($pkg['fields']['field'] as $field) {
- if (($field['type'] == 'input') && isset($field['required'])) {
+ if (isset($field['required'])) {
if ($field['fieldname']) {
$reqfields[] = $field['fieldname'];
}
@@ -286,20 +282,6 @@ if ($_POST) {
}
}
-if ($pkg['title'] != "") {
- $edit = ($only_edit ? '' : ": " . gettext("Edit"));
- $pgtitle = $pkg['title'] . $edit;
-} else {
- $pgtitle = gettext("Package Editor");
-}
-
-if ($pkg['custom_php_after_head_command']) {
- $closehead = false;
- include("head.inc");
- eval($pkg['custom_php_after_head_command']);
-} else {
- include("head.inc");
-}
// Turn an embedded table into a bootstrap class table. This is for backward compatibility.
// We remove any table attributes in the XML and replace them with Bootstrap table classes
@@ -308,7 +290,7 @@ function bootstrapTable($text) {
$c = strpos($text, '>', $t); // And its closing bracket
// Substitute everything inbetween with our new classes
- if($t && $c && (($c - $t) < 200) ) {
+ if ($t && $c && (($c - $t) < 200)) {
return(substr_replace($text, ' class="table table-striped table-hover table-condensed"', $t, ($c - $t)));
}
}
@@ -317,18 +299,25 @@ function bootstrapTable($text) {
* ROW helper function. Creates one element in the row from a PHP table by adding
* the specified element to $group
*/
-function display_row($trc, $value, $fieldname, $type, $rowhelper, $description) {
+function display_row($trc, $value, $fieldname, $type, $rowhelper, $description, $ewidth = null) {
global $text, $group;
switch ($type) {
case "input":
- $group->add(new Form_Input(
+ $inpt = new Form_Input(
$fieldname . $trc,
null,
'text',
$value
- ))->setHelp($description);
+ );
+
+ $inpt->setHelp($description);
+ if ($ewidth) {
+ $inpt->setWidth($ewidth);
+ }
+
+ $group->add($inpt);
break;
case "checkbox":
$group->add(new Form_Checkbox(
@@ -349,7 +338,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $description)
))->setHelp($description);
break;
case "textarea":
- $group->add(new Form_TextArea(
+ $group->add(new Form_Textarea(
$fieldname . $trc,
null,
$value
@@ -362,19 +351,27 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $description)
$options[$rowopt['value']] = $rowopt['name'];
}
- $group->add(new Form_Select(
+ $grp = new Form_Select(
$fieldname . $trc,
null,
$value,
$options
- ))->setHelp($description);
+ );
+
+ $grp->setHelp($description);
+
+ if ($ewidth) {
+ $grp->setWidth($ewidth);
+ }
+
+ $group->add($grp);
break;
case "interfaces_selection":
$size = ($size ? "size=\"{$size}\"" : '');
$multiple = '';
if (isset($rowhelper['multiple'])) {
- $multiple = "multiple=\"multiple\"";
+ $multiple = "multiple";
}
echo "<select style='height:22px;' id='{$fieldname}{$trc}' name='{$fieldname}{$trc}' {$size} {$multiple}>\n";
$ifaces = get_configured_interface_with_descr();
@@ -396,7 +393,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $description)
foreach ($ifaces as $ifname => $iface) {
$options[$ifname] = $iface;
- if(in_array($ifname, $values)) {
+ if (in_array($ifname, $values)) {
array_push($selected, $ifname);
}
}
@@ -427,7 +424,7 @@ function display_row($trc, $value, $fieldname, $type, $rowhelper, $description)
$source_value = ($rowhelper['source_value'] ? $opt[$rowhelper['source_value']] : $opt[$rowhelper['value']]);
$options[$source_value] = $source_name;
- if($source_value == $value) {
+ if ($source_value == $value) {
array_push($selected, $value);
}
}
@@ -530,14 +527,24 @@ function parse_package_templates() {
}
}
-// Start of page display
-require_once('classes/Form.class.php');
+//breadcrumb
+if ($pkg['title'] != "") {
+ if (!$only_edit) {
+ $pkg['title'] = $pkg['title'] . '/Edit';
+ }
-if ($input_errors)
- print_input_errors($input_errors);
+ if (strpos($pkg['title'], '/')) {
+ $title = explode('/', $pkg['title']);
-if ($savemsg)
- print_info_box($savemsg, 'success');
+ foreach ($title as $subtitle) {
+ $pgtitle[] = gettext($subtitle);
+ }
+ } else {
+ $pgtitle = array(gettext("Package"), gettext($pkg['title']));
+ }
+} else {
+ $pgtitle = array(gettext("Package"), gettext("Editor"));
+}
// Create any required tabs
if ($pkg['tabs'] != "") {
@@ -551,6 +558,7 @@ if ($pkg['tabs'] != "") {
if (isset($tab['active'])) {
$active = true;
+ $pgtitle[] = $tab['text'] ;
} else {
$active = false;
}
@@ -589,24 +597,50 @@ if ($pkg['tabs'] != "") {
}
ksort($tab_array);
+}
+include("head.inc");
+if ($pkg['custom_php_after_head_command']) {
+ eval($pkg['custom_php_after_head_command']);
+}
+if (isset($tab_array)) {
foreach ($tab_array as $tabid => $tab) {
display_top_tabs($tab); //, $no_drop_down, $tabid);
}
}
+// Start of page display
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, 'success');
+}
+
$cols = 0;
$savevalue = gettext("Save");
if ($pkg['savetext'] != "") {
$savevalue = $pkg['savetext'];
}
+$savehelp = gettext("");
+if ($pkg['savehelp'] != "") {
+ $savehelp = $pkg['savehelp'];
+}
+
$grouping = false; // Indicates the elements we are composing are part of a combined group
-$form = new Form(new Form_Button(
+$savebutton = new Form_Button(
'submit',
$savevalue
-));
+);
+
+if ($savehelp) {
+ $savebutton->setHelp($savehelp);
+}
+
+$form = new Form($savebutton);
$form->addGlobal(new Form_Input(
'xml',
@@ -616,7 +650,7 @@ $form->addGlobal(new Form_Input(
));
/* If a package's XML has <advanced_options/> configured, then setup
- * ta section for the fields that have <advancedfield/> set.
+ * the section for the fields that have <advancedfield/> set.
* These fields will be placed below other fields in a separate area titled 'Advanced Features'.
* These advanced fields are not normally configured and generally left to default to 'default settings'.
*/
@@ -629,7 +663,7 @@ if ($pkg['advanced_options'] == "enabled") {
$js_array = array();
-// Now loop through all of hte fields defined in the XML
+// Now loop through all of the fields defined in the XML
foreach ($pkg['fields']['field'] as $pkga) {
if ($pkga['type'] == "sorting") {
@@ -646,8 +680,9 @@ foreach ($pkg['fields']['field'] as $pkga) {
$advfield_count++;
} else {
- if(isset($section))
+ if (isset($section)) {
$form->add($section);
+ }
$section = new Form_Section(strip_tags($pkga['name']));
}
@@ -684,43 +719,50 @@ foreach ($pkg['fields']['field'] as $pkga) {
// If we get here but have no $section, the package config file probably had no listtopic field
// We can create a section with a generic name to fix that
- if(!$section)
+ if (!$section) {
$section = new Form_Section(gettext('General options'));
+ }
switch ($pkga['type']) {
// Create an input element. The format is slightly different depending on whether we are composing a group,
// section, or advanced section. This is true for every element type
case "input":
- if($grouping) {
- $group->add(new Form_Input(
+ if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value)) {
+ $value = base64_decode($value);
+ }
+
+ $grp = new Form_Input(
$pkga['fieldname'],
$pkga['fielddescr'],
'text',
$value
- ))->setHelp($pkga['description']);
+ );
+
+ $grp->setHelp($pkga['description']);
+
+ if ($pkga['width']) {
+ $grp->setWidth($pkga['width']);
+ }
+
+ if ($grouping) {
+ $group->add($grp);
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
- $advanced->addInput(new Form_Input(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- 'text',
- $value
- ))->setHelp($pkga['description']);
+ $advanced->addInput($grp);
} else {
- $section->addInput(new Form_Input(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- 'text',
- $value
- ))->setHelp($pkga['description']);
+ $section->addInput($grp);
}
}
break;
case "password":
- // Creat a password element
- if($grouping) {
+ if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value)) {
+ $value = base64_decode($value);
+ }
+
+ // Create a password element
+ if ($grouping) {
$group->add(new Form_Input(
$pkga['fieldname'],
$pkga['fielddescr'],
@@ -748,12 +790,13 @@ foreach ($pkg['fields']['field'] as $pkga) {
break;
case "info":
- // If the info containe a table we should detect and Bootstrap it
+ // If the info contains a table we should detect and Bootstrap it
- if (strpos($pkga['description'], '<table') !== FALSE)
+ if (strpos($pkga['description'], '<table') !== FALSE) {
$info = bootstrapTable($pkga['description']);
- else
+ } else {
$info = $pkga['description'];
+ }
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
$advanced->addInput(new Form_StaticText(
@@ -777,7 +820,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
$fieldname = $pkga['fieldname'];
if (isset($pkga['multiple'])) {
- $multiple = 'multiple="multiple"';
+ $multiple = 'multiple';
$items = explode(',', $value);
$fieldname .= "[]";
} else {
@@ -795,36 +838,33 @@ foreach ($pkg['fields']['field'] as $pkga) {
}
}
- if (isset($pkga['advancedfield']) && isset($advfield_count))
+ if (isset($pkga['advancedfield']) && isset($advfield_count)) {
$function = $grouping ? $advanced->add:$advanced->addInput;
- else
+ } else {
$function = ($grouping) ? $section->add:$section->addInput;
+ }
- if($grouping) {
- $group->add(new Form_Select(
+ $grp = new Form_Select(
$pkga['fieldname'],
strip_tags($pkga['fielddescr']),
isset($pkga['multiple']) ? $selectedlist:$selectedlist[0],
$optionlist,
isset($pkga['multiple'])
- ))->setHelp($pkga['description'])->setOnchange($onchange)->setAttribute('size', $pkga['size']);
+ );
+
+ $grp ->setHelp($pkga['description'])->setOnchange($onchange)->setAttribute('size', $pkga['size']);
+
+ if ($pkga['width']) {
+ $grp->setWidth($pkga['width']);
+ }
+
+ if ($grouping) {
+ $group->add($grp);
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
- $advanced->addInput(new Form_Select(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- isset($pkga['multiple']) ? $selectedlist:$selectedlist[0],
- $optionlist,
- isset($pkga['multiple'])
- ))->setHelp($pkga['description'])->setOnchange($onchange)->setAttribute('size', $pkga['size']);
+ $advanced->addInput($grp);
} else {
- $section->addInput(new Form_Select(
- $pkga['fieldname'],
- strip_tags($pkga['fielddescr']),
- isset($pkga['multiple']) ? $selectedlist:$selectedlist[0],
- $optionlist,
- isset($pkga['multiple'])
- ))->setHelp($pkga['description'])->setOnchange($onchange)->setAttribute('size', $pkga['size']);
+ $section->addInput($grp);
}
}
@@ -858,14 +898,15 @@ foreach ($pkg['fields']['field'] as $pkga) {
$source_value =($pkga['source_value'] ? $opt[$pkga['source_value']] : $opt[$pkga['value']]);
$srcoptions[$source_value] = $source_name;
- if(in_array($source_value, $items))
+ if (in_array($source_value, $items)) {
array_push($srcselected, $source_value);
+ }
}
- if($grouping) {
+ if ($grouping) {
$group->add(new Form_Select(
$pkga['fieldname'],
- $pkga['name'],
+ strip_tags($pkga['fielddescr']),
isset($pkga['multiple']) ? $srcselected:$srcselected[0],
$srcoptions,
isset($pkga['multiple'])
@@ -874,7 +915,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
$advanced->addInput(new Form_Select(
$pkga['fieldname'],
- $pkga['name'],
+ strip_tags($pkga['fielddescr']),
isset($pkga['multiple']) ? $srcselected:$srcselected[0],
$srcoptions,
isset($pkga['multiple'])
@@ -882,7 +923,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
} else {
$section->addInput(new Form_Select(
$pkga['fieldname'],
- $pkga['name'],
+ strip_tags($pkga['fielddescr']),
isset($pkga['multiple']) ? $srcselected:$srcselected[0],
$srcoptions,
isset($pkga['multiple'])
@@ -900,7 +941,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
}
- if($grouping) {
+ if ($grouping) {
$group->add(new Form_Select(
$pkga['fieldname'],
null,
@@ -930,80 +971,93 @@ foreach ($pkg['fields']['field'] as $pkga) {
// Create a checkbox element
case "checkbox":
$onchange = (isset($pkga['onchange']) ? "{$pkga['onchange']}" : '');
- if (isset($pkga['enablefields']) || isset($pkga['checkenablefields']))
+ if (isset($pkga['enablefields']) || isset($pkga['checkenablefields'])) {
$onclick = 'javascript:enablechange();';
- else
+ } else {
$onclick = '';
+ }
- if($grouping) {
+ if ($grouping) {
$group->add(new Form_Checkbox(
$pkga['fieldname'],
$pkga['fielddescr'],
- 'Show log entries in reverse order (newest entries on top)',
+ fixup_string($pkga['description']),
($value == "on"),
'on'
- ))->setHelp(fixup_string($pkga['description']))
- ->setOnclick($onclick)
- ->setOnchange($onchange);
+ ))->setOnclick($onclick)
+ ->setOnchange($onchange)
+ ->setHelp($pkga['sethelp']);
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
$advanced->addInput(new Form_Checkbox(
$pkga['fieldname'],
$pkga['fielddescr'],
- 'Show log entries in reverse order (newest entries on top)',
+ fixup_string($pkga['description']),
($value == "on"),
'on'
- ))->setHelp(fixup_string($pkga['description']))
- ->setOnclick($onclick)
- ->setOnchange($onchange);
+ ))->setOnclick($onclick)
+ ->setOnchange($onchange)
+ ->setHelp($pkga['sethelp']);
} else {
$section->addInput(new Form_Checkbox(
$pkga['fieldname'],
$pkga['fielddescr'],
- 'Show log entries in reverse order (newest entries on top)',
+ fixup_string($pkga['description']),
($value == "on"),
'on'
- ))->setHelp(fixup_string($pkga['description']))
- ->setOnclick($onclick)
- ->setOnchange($onchange);
+ ))->setOnclick($onclick)
+ ->setOnchange($onchange)
+ ->setHelp($pkga['sethelp']);
}
}
break;
- // Creat textarea element
+ // Create a textarea element
case "textarea":
+ $rows = $cols = 0;
+
if ($pkga['rows']) {
- $rows = " rows='{$pkga['rows']}' ";
+ $rows = $pkga['rows'];
}
if ($pkga['cols']) {
- $cols = " cols='{$pkga['cols']}' ";
+ $cols = $pkga['cols'];
}
+
if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value)) {
$value = base64_decode($value);
}
- $wrap =($pkga['wrap'] == "off" ? 'wrap="off" style="white-space:nowrap;"' : '');
-
- if ($grouping) {
- $group->add(new Form_TextArea(
+ $grp = new Form_Textarea(
$pkga['fieldname'],
$pkga['fielddescr'],
$value
- ))->setHelp(fixup_string($pkga['description']));
+ );
+
+ $grp->setHelp(fixup_string($pkga['description']));
+
+ if ($rows > 0) {
+ $grp->setRows($rows);
+ }
+
+ if ($cols > 0) {
+ $grp->setCols($cols);
+ }
+
+ if ($pkga['wrap'] == "off") {
+ $grp->setAttribute("wrap", "off");
+ $grp->setAttribute("style", "white-space:nowrap; width: auto;");
+ } else {
+ $grp->setAttribute("style", "width: auto;");
+ }
+
+ if ($grouping) {
+ $group->add($grp);
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
- $advanced->addInput(new Form_TextArea(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- $value
- ))->setHelp(fixup_string($pkga['description']));
+ $advanced->addInput($grp);
} else {
- $section->addInput(new Form_TextArea(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- $value
- ))->setHelp(fixup_string($pkga['description']));
+ $section->addInput($grp);
}
}
@@ -1017,7 +1071,6 @@ foreach ($pkg['fields']['field'] as $pkga) {
$a_aliases = &$config['aliases']['alias'];
$addrisfirst = 0;
$aliasesaddr = "";
- $value = "value='{$value}'";
if (isset($a_aliases)) {
if (!empty($pkga['typealiases'])) {
@@ -1041,28 +1094,26 @@ foreach ($pkg['fields']['field'] as $pkga) {
}
}
- if(grouping) {
- $group->add(new Form_Input(
+ $grp = new Form_Input(
$pkga['fieldname'],
$pkga['fielddescr'],
'text',
$value
- ))->setHelp($pkga['description']);
+ );
+
+ $grp->setHelp($pkga['description']);
+
+ if ($pkga['width']) {
+ $grp->setWidth($pkga['width']);
+ }
+
+ if (grouping) {
+ $group->add($grp);
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
- $advanced->addInput(new Form_Input(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- 'text',
- $value
- ))->setHelp($pkga['description']);
+ $advanced->addInput($grp);
} else {
- $section->addInput(new Form_Input(
- $pkga['fieldname'],
- $pkga['fielddescr'],
- 'text',
- $value
- ))->setHelp($pkga['description']);
+ $section->addInput($grp);
}
}
@@ -1138,7 +1189,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
$fieldname = $pkga['fieldname'];
if (isset($pkga['multiple'])) {
$fieldname .= '[]';
- $multiple = 'multiple="multiple"';
+ $multiple = 'multiple';
}
$selectedlist = array();
@@ -1158,7 +1209,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
$optionlist[$iface['ip']] = $iface['description'];
}
- if($grouping) {
+ if ($grouping) {
$group->add(new Form_Select(
$pkga['fieldname'],
$pkga['fielddescr'],
@@ -1190,31 +1241,31 @@ foreach ($pkg['fields']['field'] as $pkga) {
// Create radio button
case "radio":
- if($grouping) {
+ if ($grouping) {
$group->add(new Form_Checkbox(
$pkga['fieldname'],
$pkga['fielddescr'],
- 'Show log entries in reverse order (newest entries on top)',
+ fixup_string($pkga['description']),
($value == "on"),
'on'
- ))->setHelp(fixup_string($pkga['description']))->displayAsRadio();
+ ))->displayAsRadio();
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
$advanced->addInput(new Form_Checkbox(
$pkga['fieldname'],
$pkga['fielddescr'],
- 'Show log entries in reverse order (newest entries on top)',
+ fixup_string($pkga['description']),
($value == "on"),
'on'
- ))->setHelp(fixup_string($pkga['description']))->displayAsRadio();
+ ))->displayAsRadio();
} else {
$section->addInput(new Form_Checkbox(
$pkga['fieldname'],
$pkga['fielddescr'],
- 'Show log entries in reverse order (newest entries on top)',
+ fixup_string($pkga['description']),
($value == "on"),
'on'
- ))->setHelp(fixup_string($pkga['description']))->displayAsRadio();
+ ))->displayAsRadio();
}
}
@@ -1227,22 +1278,22 @@ foreach ($pkg['fields']['field'] as $pkga) {
$pkga['fieldname']
);
- if(grouping) {
+ if (grouping) {
$group->add(new Form_StaticText(
null,
$newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>'
));
} else {
if (isset($pkga['advancedfield']) && isset($advfield_count)) {
- $advanced->addInput(new Form_StaticText(
- null,
- $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>'
- ));
+ $advanced->addInput(new Form_StaticText(
+ null,
+ $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>'
+ ));
} else {
- $section->addInput(new Form_StaticText(
- null,
- $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>'
- ));
+ $section->addInput(new Form_StaticText(
+ null,
+ $newbtn . '<br />' . '<div class="help-block">' . fixup_string($pkga['description']) . '</div>'
+ ));
}
}
@@ -1269,7 +1320,7 @@ foreach ($pkg['fields']['field'] as $pkga) {
}
}
- if($grouping) {
+ if ($grouping) {
$group->add(new Form_Select(
$pkga['fieldname'],
$pkga['fielddescr'],
@@ -1318,6 +1369,8 @@ foreach ($pkg['fields']['field'] as $pkga) {
foreach ($pkga['rowhelper']['rowhelperfield'] as $rowhelper) {
unset($value);
+ $width = null;
+
if ($rowhelper['value'] != "") {
$value = $rowhelper['value'];
}
@@ -1330,6 +1383,11 @@ foreach ($pkg['fields']['field'] as $pkga) {
}
$type = $rowhelper['type'];
+ if ($type == "input" || $type == "password" || $type == "textarea") {
+ if (($rowhelper['encoding'] == 'base64') && !$get_from_post && !empty($value)) {
+ $value = base64_decode($value);
+ }
+ }
$fieldname = $rowhelper['fieldname'];
if ($rowhelper['size']) {
@@ -1340,7 +1398,11 @@ foreach ($pkg['fields']['field'] as $pkga) {
$size = "8";
}
- display_row($rowcounter, $value, $fieldname, $type, $rowhelper, ($numrows == $rowcounter) ? $fielddescr:null);
+ if ($rowhelper['width']) {
+ $width = $rowhelper['width'];
+ }
+
+ display_row($rowcounter, $value, $fieldname, $type, $rowhelper, ($numrows == $rowcounter) ? $fielddescr:null, $width);
$text = "";
$trc++;
@@ -1349,7 +1411,9 @@ foreach ($pkg['fields']['field'] as $pkga) {
// Delete row button
$group->add(new Form_Button(
'deleterow' . $rowcounter,
- 'Delete'
+ 'Delete',
+ null,
+ 'fa-trash'
))->removeClass('btn-primary')->addClass('btn-warning btn-sm');
$rowcounter++;
@@ -1372,10 +1436,11 @@ foreach ($pkg['fields']['field'] as $pkga) {
null
));
- if($advanced)
+ if ($advanced) {
$advanced->add($group);
- else
+ } else {
$section->add($group);
+ }
$grouping = false;
}
@@ -1394,7 +1459,7 @@ $form->addGlobal(new Form_Input(
));
// If we created an advanced section, add it (and a button) to the form here
-if(!empty($advanced)) {
+if (!empty($advanced)) {
$form->addGlobal(new Form_Button(
'showadv',
'Show advanced options'
@@ -1407,15 +1472,16 @@ print($form);
if ($pkg['note'] != "") {
print_info_box($pkg['note']);
+}
-if ($pkg['custom_php_after_form_command'])
+if ($pkg['custom_php_after_form_command']) {
eval($pkg['custom_php_after_form_command']);
}
if ($pkg['fields']['field'] != "") { ?>
<script type="text/javascript">
//<![CDATA[
- events.push(function(){
+ events.push(function() {
// Hide the advanced section
var advanced_visible = false;
@@ -1423,17 +1489,19 @@ if ($pkg['fields']['field'] != "") { ?>
// Hide on page load
$('.advancedoptions').hide();
- // But show it if you click the showadv button
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+
+ // Show advanced section if you click the showadv button
$('#showadv').prop('type', 'button');
$("#showadv").click(function() {
advanced_visible = !advanced_visible;
- if(advanced_visible) {
+ if (advanced_visible) {
$('.advancedoptions').show();
$("#showadv").prop('value', 'Hide advanced Options');
- }
- else {
+ } else {
$('.advancedoptions').hide();
$("#showadv").prop('value', 'Show advanced Options');
}
diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php
index ed4f908..8f05bd1 100644
--- a/src/usr/local/www/pkg_mgr.php
+++ b/src/usr/local/www/pkg_mgr.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
pkg_mgr.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2013 Marcello Coutinho
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,14 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ifconfig
- pfSense_MODULE: pkgs
-*/
##|+PRIV
##|*IDENT=page-system-packagemanager
-##|*NAME=System: Package Manager page
+##|*NAME=System: Package Manager
##|*DESCR=Allow access to the 'System: Package Manager' page.
##|*MATCH=pkg_mgr.php*
##|-PRIV
@@ -73,29 +67,27 @@ require_once("globals.inc");
require_once("guiconfig.inc");
require_once("pkg-utils.inc");
-/* if upgrade in progress, alert user */
-if(is_subsystem_dirty('packagelock')) {
- $pgtitle = array(gettext("System"),gettext("Package Manager"));
+// if upgrade in progress, alert user
+if (is_subsystem_dirty('packagelock')) {
+ $pgtitle = array(gettext("System"), gettext("Package Manager"));
include("head.inc");
print_info_box_np("Please wait while packages are reinstalled in the background.");
include("foot.inc");
exit;
}
+$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Available Packages"));
include("head.inc");
-$pkg_info = get_pkg_info();
-
-$pgtitle = array(gettext("System"),gettext("Package Manager"));
-
$tab_array = array();
$tab_array[] = array(gettext("Available Packages"), true, "pkg_mgr.php");
$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
display_top_tabs($tab_array);
-if($pkg_info) {
- //Check categories
- $categories=array();
+$pkg_info = get_pkg_info();
+if ($pkg_info) {
+ // Check categories
+ $categories = array();
foreach ($pkg_info as $pkg_data) {
if (isset($pkg_data['categories'][0])) {
$categories[$pkg_data['categories'][0]]++;
@@ -103,125 +95,207 @@ if($pkg_info) {
}
ksort($categories, SORT_STRING|SORT_FLAG_CASE);
- $cm_count=0;
+ $cm_count = 0;
$tab_array = array();
- $visible_categories=array();
- $categories_min_count=($g['pkg_categories_min_count'] ? $g['pkg_categories_min_count'] : 3);
- $categories_max_display=($g['pkg_categories_max_display'] ? $g['pkg_categories_max_display'] : 6);
+ $visible_categories = array();
+ $categories_min_count = ($g['pkg_categories_min_count'] ? $g['pkg_categories_min_count'] : 3);
+ $categories_max_display = ($g['pkg_categories_max_display'] ? $g['pkg_categories_max_display'] : 6);
- /* check selected category or define default category to show */
- if (isset($_REQUEST['category']))
+ // check selected category or define default category to show
+ if (isset($_REQUEST['category'])) {
$menu_category = $_REQUEST['category'];
- else if (isset($g['pkg_default_category']))
+ } elseif (isset($g['pkg_default_category'])) {
$menu_category = $g['pkg_default_category'];
- else
+ } else {
$menu_category = "All";
+ }
$menu_category = (isset($_REQUEST['category']) ? $_REQUEST['category'] : "All");
$show_category = ($menu_category == "Other" || $menu_category == "All");
- $tab_array[] = array(gettext("All"), $menu_category=="All" ? true : false, "pkg_mgr.php?category=All");
+ $tab_array[] = array(gettext("All"), $menu_category == "All" ? true : false, "pkg_mgr.php?category=All");
foreach ($categories as $category => $c_count) {
if ($c_count >= $categories_min_count && $cm_count <= $categories_max_display) {
- $tab_array[] = array(gettext($category) , $menu_category==$category ? true : false, "pkg_mgr.php?category={$category}");
- $visible_categories[]=$category;
+ $tab_array[] = array(gettext($category) , $menu_category == $category ? true : false, "pkg_mgr.php?category={$category}");
+ $visible_categories[] = $category;
$cm_count++;
}
}
- $tab_array[] = array(gettext("Other Categories"), $menu_category=="Other" ? true : false, "pkg_mgr.php?category=Other");
- if (count($categories) > 1)
- display_top_tabs($tab_array);
-}
+ $tab_array[] = array(gettext("Other Categories"), $menu_category == "Other" ? true : false, "pkg_mgr.php?category=Other");
-function compareName($a, $b) {
- return(strcasecmp ($a['name'], $b['name']));
+// if (count($categories) > 1)
+// display_top_tabs($tab_array);
}
-if(!$pkg_info || !is_array($pkg_info)):?>
- <div class="alert alert-warning">
- <?=gettext("There are currently no packages available for installation.")?>
+if (!$pkg_info || !is_array($pkg_info)):?>
+
+<div class="alert alert-warning">
+ <?=gettext("There are currently no packages available for installation.")?>
+</div>
+<?php else:?>
+
+<div class="panel panel-default" id="search-panel">
+ <div class="panel-heading"><?=gettext('Search')?>
+ <span class="widget-heading-icon pull-right">
+ <a data-toggle="collapse" href="#search-panel_panel-body">
+ <i class="fa fa-plus-circle"></i>
+ </a>
+ </span>
+ </div>
+ <div id="search-panel_panel-body" class="panel-body collapse in">
+ <div class="form-group">
+ <label class="col-sm-2 control-label">
+ <?=gettext("Search term")?>
+ </label>
+ <div class="col-sm-5"><input class="form-control" name="searchstr" id="searchstr" type="text"/></div>
+ <div class="col-sm-2">
+ <select id="where" class="form-control">
+ <option value="0"><?=gettext("Name")?></option>
+ <option value="1"><?=gettext("Description")?></option>
+ <option value="2" selected><?=gettext("Both")?></option>
+ </select>
+ </div>
+ <div class="col-sm-3">
+ <a id="btnsearch" title="<?=gettext("Search")?>" class="btn btn-primary btn-sm"><?=gettext("Search")?></a>
+ <a id="btnclear" title="<?=gettext("Clear")?>" class="btn btn-default btn-sm"><?=gettext("Clear")?></a>
+ </div>
+ <div class="col-sm-10 col-sm-offset-2">
+ <span class="help-block">Enter a search string or *nix regular expression to search package names and descriptions.</span>
+ </div>
+ </div>
</div>
-<?php else: ?>
- <div class="table-responsive">
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th><?=gettext("Name")?></th>
+</div>
+
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('Packages')?></h2></div>
+ <div class="panel-body table-responsive">
+ <table id="pkgtable" class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th><?=gettext("Name")?></th>
<?php if (!$g['disablepackagehistory']):?>
- <th><?=gettext("Version")?></th>
+ <th><?=gettext("Version")?></th>
<?php endif;?>
+ <th><?=gettext("Description")?></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
- <th><?=gettext("Description")?></th>
- </tr>
- </thead>
- <tbody>
-<?php
+<?php foreach ($pkg_info as $index):
+ if (isset($index['installed'])) {
+ continue;
+ }
- // Sort case insensitve (so we get AbCdEf not ACEcdf)
- usort($pkg_info, 'compareName');
+ if ($menu_category != "All" && $index['categories'][0] != $menu_category &&
+ !($menu_category == "Other" && !in_array($index['categories'][0], $visible_categories))) {
+ continue;
+ }
+?>
+ <tr>
+ <td>
+<?php if ($index['www']):?>
+ <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['www'])?>">
+<?php endif;?>
+ <?=htmlspecialchars($index['shortname'])?>
+ </a>
+ </td>
- foreach($pkg_info as $index):
+<?php if (!$g['disablepackagehistory']):?>
+ <td>
+ <?=htmlspecialchars($index['version'])?>
+ </td>
+<?php endif;?>
+ <td>
+ <?=$index['desc']?>
+<?php if (is_array($index['deps']) && count($index['deps'])):?>
+ <br /><br /><?= gettext("Package Dependencies")?>:<ul>
+ <?php foreach ($index['deps'] as $pdep):?>
+ <a target="_blank" href="https://freshports.org/<?=$pdep['origin']?>" class="fa fa-globe"><small>&nbsp;<?= basename($pdep['origin']) . '-' . $pdep['version']?></small></a>&emsp;
+ <?php endforeach;?></ul>
+<?php endif;?>
+ </td>
+ <td>
+ <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success btn-sm">install</a>
+<?php if (!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']):?>
+ <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default btn-sm">info</a>
+<?php endif;?>
+ </td>
+ </tr>
+<?php endforeach;?>
+ </tbody>
+ </table>
+ </div>
+</div>
+<?php endif;?>
- if(get_package_id($index['name']) >= 0 ) {
- continue;
- }
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
- $shortname = $index['name'];
- pkg_remove_prefix($shortname);
+ // Initial state & toggle icons of collapsed panel
+ $('.panel-heading a[data-toggle="collapse"]').each(function (idx, el) {
+ var body = $(el).parents('.panel').children('.panel-body')
+ var isOpen = body.hasClass('in');
- if ($menu_category != "All" && $index['categories'][0] != $menu_category && !($menu_category == "Other" && !in_array($index['categories'][0], $visible_categories))) {
- continue;
- }
+ $(el).children('i').toggleClass('fa-plus-circle', !isOpen);
+ $(el).children('i').toggleClass('fa-minus-circle', isOpen);
- // Check to see if it is already installed
- if(isset($config['installedpackages']['package'])) {
- foreach($config['installedpackages']['package'] as $installedpkg) {
- if($installedpkg['name'] == $shortname) {
- continue(2);
+ body.on('shown.bs.collapse', function() {
+ $(el).children('i').toggleClass('fa-minus-circle', true);
+ $(el).children('i').toggleClass('fa-plus-circle', false);
+ });
+ });
+
+ // Make these controls plain buttons
+ $("#btnsearch").prop('type', 'button');
+ $("#btnclear").prop('type', 'button');
+
+ // Search for a term in the package name and/or description
+ $("#btnsearch").click(function() {
+ var searchstr = $('#searchstr').val().toLowerCase();
+ var table = $("table tbody");
+ var where = $('#where').val();
+
+ table.find('tr').each(function (i) {
+ var $tds = $(this).find('td'),
+ shortname = $tds.eq(0).text().trim().toLowerCase(),
+ descr = $tds.eq(2).text().trim().toLowerCase();
+
+ regexp = new RegExp(searchstr);
+ if (searchstr.length > 0) {
+ if (!(regexp.test(shortname) && (where != 1)) && !(regexp.test(descr) && (where != 0))) {
+ $(this).hide();
+ } else {
+ $(this).show();
}
+ } else {
+ $(this).show(); // A blank search string shows all
}
- }
+ });
+ });
-?>
- <tr>
- <td>
-<?php if ($index['www']):?>
- <a title="<?=gettext("Visit official website")?>" target="_blank" href="<?=htmlspecialchars($index['www'])?>">
-<?php endif; ?>
- <?=htmlspecialchars($shortname)?>
- </a>
- </td>
+ // Clear the search term and unhide all rows (that were hidden during a previous search)
+ $("#btnclear").click(function() {
+ var table = $("table tbody");
-<?php
- if (!$g['disablepackagehistory']):?>
- <td>
-<!-- We no longer have a package revision history URL
- $changeloglink is undefined
- <a target="_blank" title="<?=gettext("View changelog")?>" href="<?=htmlspecialchars($changeloglink)?>">
--->
- <?=htmlspecialchars($index['version'])?>
-<!--
- </a>
--->
- </td>
-<?php
-endif;
+ $('#searchstr').val("");
+
+ table.find('tr').each(function (i) {
+ $(this).show();
+ });
+ });
+
+ // Hitting the enter key will do the same as clicking the search button
+ $("#searchstr").on("keyup", function (event) {
+ if (event.keyCode == 13) {
+ $("#btnsearch").get(0).click();
+ }
+ });
+});
+//]]>
+</script>
+
+<?php include("foot.inc");
?>
- <td>
- <?=$index['desc']?>
- </td>
- <td>
- <a title="<?=gettext("Click to install")?>" href="pkg_mgr_install.php?id=<?=$index['name']?>" class="btn btn-success">install</a>
-<?php if(!$g['disablepackageinfo'] && $index['pkginfolink'] && $index['pkginfolink'] != $index['www']):?>
- <a target="_blank" title="<?=gettext("View more inforation")?>" href="<?=htmlspecialchars($index['pkginfolink'])?>" class="btn btn-default">info</a>
-<?php endif;?>
- </td>
- </tr>
-<?php
- endforeach;
-endif;?>
- </tbody>
- </table>
- </div>
-<?php include("foot.inc")?>
diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php
index 7d5ff31..d702beb 100644
--- a/src/usr/local/www/pkg_mgr_install.php
+++ b/src/usr/local/www/pkg_mgr_install.php
@@ -1,42 +1,62 @@
<?php
-/* $Id$ */
/*
pkg_mgr_install.php
- part of pfSense (https://www.pfsense.org)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2004-2010 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2005 Colin Smith
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: pkgs
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Colin Smith
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-packagemanager-installpackage
-##|*NAME=System: Package Manager: Install Package page
+##|*NAME=System: Package Manager: Install Package
##|*DESCR=Allow access to the 'System: Package Manager: Install Package' page.
##|*MATCH=pkg_mgr_install.php*
##|-PRIV
@@ -49,11 +69,140 @@ require_once("filter.inc");
require_once("shaper.inc");
require_once("pkg-utils.inc");
-global $static_output;
-
-$static_output = "";
-$static_status = "";
$sendto = "output";
+$start_polling = false;
+$firmwareupdate = false;
+$guitimeout = 90; // Seconds to wait before reloading the page after reboot
+$guiretry = 20; // Seconds to try again if $guitimeout was not long enough
+//---------------------------------------------------------------------------------------------------------------------
+// After an installation or removal has been started (mwexec(/usr/local/sbin/pfSense-upgrade-GUI.sh . . . )) AJAX calls
+// are made to get status.
+// The log file is read and the newest progress record retrieved. The data is formatted
+// as JSON before being returned to the AJAX caller (at the bottom of this file)
+//
+// Arguments received here:
+// logfilename = Passed to installation script to tell it how to name the log file we will parse
+// next_log_line = Send log file entries that come after this line number
+//
+// JSON items returned
+// log:
+// exitcode:
+// data:{current:, total}
+//
+// Todo:
+// Respect next_log_line and append log to output window rather than writing it
+
+
+if ($_REQUEST['ajax']) {
+ $response = "";
+ $code = 0;
+
+ // Check to see if our process is still running
+ $pidfile = $g['varrun_path'] . '/' . $g['product_name'] . '-upgrade.pid';
+ $running = "running";
+
+ // When we do a reinstallall, it is technically possible that we might catch the system in-between
+ // packages, hence the de-bounce here
+ if (!isvalidpid($pidfile)) {
+ usleep(100000);
+ if (!isvalidpid($pidfile)) {
+ $running = "stopped";
+ // The log files may not be complete when the process terminates so we need wait until we see the
+ // exit status (__RC=x)
+ waitfor_string_in_file($_REQUEST['logfilename'] . '.txt', "__RC=", 10);
+ filter_configure();
+ send_event("service restart packages");
+ }
+ }
+
+ $pidarray = array('pid' => $running);
+
+ // Process log file -----------------------------------------------------------------------------------------------
+ $logfile = @fopen($_REQUEST['logfilename'] . '.txt', "r");
+
+ if ($logfile != FALSE) {
+ $resparray = array();
+ $statusarray = array();
+
+ // Log file is read a line at a time so that we can detect/modify certain entries
+ while (($logline = fgets($logfile)) !== false) {
+ // Check for return codes and replace with suitable strings
+ if (strpos($logline, "_RC=") != false) {
+ $code = str_replace("__RC=", "", $logline);
+
+ if ($code == 0) {
+ $logline = gettext("Success") . "\n";
+ } else {
+ $logline = gettext("Failed") . "\n";
+ }
+
+ $response .= $logline;
+ $statusarray = array('exitstatus' => $code);
+ } else {
+ $response .= htmlspecialchars($logline);
+ }
+ }
+
+ fclose($logfile);
+ $resparray['log'] = $response;
+ } else {
+ $resparray['log'] = "not_ready";
+ print(json_encode($resparray));
+ exit;
+ }
+
+ // Process progress file ------------------------------------------------------------------------------------------
+ $progress = "";
+ $progarray = array();
+
+ $JSONfile = @fopen($_REQUEST['logfilename'] . '.json', "r");
+
+ if ($JSONfile != FALSE) {
+ while (($logline = fgets($JSONfile)) !== false) {
+ if (!feof($JSONfile) && (strpos($logline, 'INFO_PROGRESS_TICK') !== false)) {
+ if (strpos($logline, '}}') !== false) {
+ $progress = $logline;
+ }
+ }
+ }
+
+ fclose($JSONfile);
+
+ if (strlen($progress) > 0) {
+ $progarray = json_decode($progress, true);
+ }
+ }
+
+ // Glob all the arrays we have made together, and convert to JSON
+ print(json_encode($resparray + $pidarray + $statusarray + $progarray));
+ exit;
+}
+
+function waitfor_string_in_file($filename, $string, $timeout) {
+ $start = $now = time();
+
+ while (($now - $start) < $timeout) {
+ $testfile = @fopen($filename, "r");
+
+ if ($testfile != FALSE) {
+ while (($line = fgets($testfile)) !== false) {
+ if (strpos($line, $string) !== false) {
+ fclose($testfile);
+ return(true);
+ }
+ }
+
+ fclose($testfile);
+ }
+
+ usleep(100000);
+ $now = time();
+ }
+
+ return(false);
+}
+
+$headline = "<br />";
if ($_POST) {
if (empty($_POST['id']) && $_POST['mode'] != 'reinstallall') {
@@ -65,41 +214,62 @@ if ($_POST) {
header("Location: pkg_mgr_installed.php");
return;
}
-} else if ($_GET) {
+} else if ($_GET && !$_GET['id']) {
+ if (empty($_GET['pkg']) && ($_GET['mode'] != 'reinstallall')) {
+ header("Location: pkg_mgr_installed.php");
+ return;
+ }
+
switch ($_GET['mode']) {
case 'reinstallall':
- case 'showlog':
- break;
- case 'installedinfo':
- case 'reinstallxml':
+ $headline = gettext("Reinstall all packages");
case 'reinstallpkg':
- case 'delete':
- if (empty($_GET['pkg'])) {
- header("Location: pkg_mgr_installed.php");
- return;
+ if ($_GET['from'] && $_GET['from']) {
+ $headline = gettext("Upgrade package");
+ } else {
+ $headline = gettext("Reinstall package");
}
+
+ break;
+ case 'delete':
+ $headline = gettext("Remove package");
break;
default:
- if (empty($_GET['id'])) {
- header("Location: pkg_mgr_installed.php");
- return;
- }
+ $headline = gettext("Install package");
break;
}
}
-$pgtitle = array(gettext("System"),gettext("Package Manager"),gettext("Install Package"));
-include("head.inc");
+if ($_GET && $_GET['id'] == "firmware") {
+ $firmwareupdate = true;
+ $firmwareversion = get_system_pkg_version();
+ $headline = gettext("System update") ;
+}
$tab_array = array();
-$tab_array[] = array(gettext("Available packages"), false, "pkg_mgr.php");
-$tab_array[] = array(gettext("Installed packages"), false, "pkg_mgr_installed.php");
-$tab_array[] = array(gettext("Package Installer"), true, "");
+
+if ($firmwareupdate) {
+ $pgtitle = array(gettext("System"), gettext("Update"), $headline);
+ $tab_array[] = array(gettext("System Update"), true, "");
+ $tab_array[] = array(gettext("Update Settings"), false, "system_update_settings.php");
+} else {
+ $pgtitle = array(gettext("System"), gettext("Package Manager"), $headline);
+ $tab_array[] = array(gettext("Available Packages"), false, "pkg_mgr.php");
+ $tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
+ $tab_array[] = array(gettext("Package Installer"), true, "");
+}
+
+include("head.inc");
display_top_tabs($tab_array);
+
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
+
?>
<form action="pkg_mgr_install.php" method="post" class="form-horizontal">
- <h2>Add / remove package</h2>
-<?php if ((empty($_GET['mode']) && $_GET['id']) || (!empty($_GET['mode']) && (!empty($_GET['pkg']) || $_GET['mode'] == 'reinstallall') && ($_GET['mode'] != 'installedinfo' && $_GET['mode'] != 'showlog'))):
+<!-- <h2><?=$headline?></h2> -->
+<?php if (($POST['complete'] != "true") && (empty($_GET['mode']) && $_GET['id']) || (!empty($_GET['mode']) && (!empty($_GET['pkg']) || $_GET['mode'] == 'reinstallall'))):
if (empty($_GET['mode']) && $_GET['id']) {
$pkgname = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['id'], ENT_QUOTES | ENT_HTML401));
$pkgmode = 'installed';
@@ -111,178 +281,383 @@ display_top_tabs($tab_array);
}
switch ($pkgmode) {
- case 'reinstallall':
- $pkgname = 'All packages';
- $pkgtxt = 'reinstalled';
- break;
- case 'reinstallxml':
- $pkg_gui_xml_text = " GUI XML components";
case 'reinstallpkg':
$pkgtxt = 'reinstalled';
break;
case 'delete':
- $pkgtxt = 'deleted';
+ $pkgtxt = 'removed';
break;
default:
$pkgtxt = $pkgmode;
break;
}
?>
+ <br />
<div class="panel panel-default">
+ <div class="panel-heading">
+<?php
+ if ($pkgmode == 'reinstallall') {
+?>
+ <?=gettext("All packages will be reinstalled.");?>
+<?php
+ } else if ($_GET['from'] && $_GET['from']) {
+?>
+ Package: <b><?=$pkgname;?></b> will be upgraded from <b><?=$_GET['from']?></b> to <b><?=$_GET['to']?></b>.
+<?php
+ } else if ($firmwareupdate) {
+?>
+ <?=$g['product_name']?> <?=gettext(" system update")?>
+<?php
+ } else {
+?>
+ Package: <b><?=$pkgname;?></b> will be <?=$pkgtxt;?>.
+<?php
+ }
+?>
+ </div>
<div class="panel-body">
- <div class="content">
- <p>Package: <b><?=$pkgname;?></b> will be <?=$pkgtxt;?>.</p>
+ <br />
+ <input type="hidden" name="mode" value="<?=$pkgmode;?>" />
+<?php
+ if ($firmwareupdate) {
+?>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">
+ <?=gettext("Current base system")?>
+ </label>
+ <div class="col-sm-10">
+ <?=$firmwareversion['installed_version']?>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-sm-2 control-label">
+ <?=gettext("Latest base system")?>
+ </label>
+ <div class="col-sm-10">
+ <?=$firmwareversion['version']?>
</div>
</div>
- <div class="panel-footer">
+<?php
+ if ($firmwareversion['version'] != $firmwareversion['installed_version']) {
+?>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">
+ <?=gettext("Confirm Upgrade")?>
+ </label>
+ <div class="col-sm-10">
+ <input type="hidden" name="id" value="firmware" />
+ <input type="submit" class="btn btn-success" name="pkgconfirm" id="pkgconfirm" value="Confirm"/>
+ </div>
+ </div>
+<?php
+ } else {
+?>
+ <div class="form-group">
+ <label class="col-sm-2 control-label">
+ </label>
+ <div class="col-sm-10">
+ <?=($firmwareversion) ? gettext("System is up to date") : ""?>
+ </div>
+ </div>
+<?php
+ }
+ } else {
+?>
<input type="hidden" name="id" value="<?=$pkgname;?>" />
- <input type="hidden" name="mode" value="<?=$pkgmode;?>" />
<input type="submit" class="btn btn-success" name="pkgconfirm" id="pkgconfirm" value="Confirm"/>
- <input type="submit" class="btn btn-default" name="pkgcancel" id="pkgcancel" value="Cancel"/>
+<?php
+ }
+ ?>
</div>
</div>
-<?php endif;?>
+<?php endif;
+
+if ($firmwareupdate && !$firmwareversion) {
+ print_info_box(gettext("Unable to retrieve system versions"), danger);
+}
-<?php if (!empty($_POST['id']) || $_GET['mode'] == 'showlog' || ($_GET['mode'] == 'installedinfo' && !empty($_GET['pkg']))):?>
+if ($_POST['mode'] == 'delete') {
+ $modetxt = gettext("removal");
+} else if (($_POST['mode'] == 'reinstallpkg') || ($_POST['mode'] == 'reinstallall')) {
+ $modetxt = gettext("reinstallation");
+} else {
+ $modetxt = gettext("installation");
+}
+
+if (!empty($_POST['id']) || $_POST['mode'] == "reinstallall"):
+ // What if the user navigates away from this page and then come back via his/her "Back" button?
+ $pidfile = $g['varrun_path'] . '/' . $g['product_name'] . '-upgrade.pid';
+
+ if (isvalidpid($pidfile)) {
+ $start_polling = true;
+ }
+?>
+ <input type="hidden" name="id" value="<?=htmlspecialchars($_POST['id'])?>" />
+ <input type="hidden" name="mode" value="<?=htmlspecialchars($_POST['mode'])?>" />
+ <input type="hidden" name="completed" value="true" />
+
+ <div id="countdown" class="text-center"></div>
+
+ <div class="progress" style="display: none;">
+ <div id="progressbar" class="progress-bar progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width: 1%"></div>
+ </div>
+ <br />
<div class="panel panel-default">
<div class="panel-heading">
- <h4 id="status"><?=gettext("Beginning package installation.")?></h4>
+<?php if ($firmwareupdate) {
+?>
+ <h2 class="panel-title" id="status"><?=gettext("Updating system")?></h2>
+<?php } else {
+?>
+ <h2 class="panel-title" id="status"><?=gettext("Package") . " " . $modetxt?></h2>
+ <?php } ?>
</div>
<div class="panel-body">
- <textarea rows="15" class="form-control" id="output"></textarea>
-<!--
- <div class="progress">
- <div id="progressbar" class="progress-bar progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100" style="width: 1%"><span class="sr-only">1% Complete</span></div>
- </div>
--->
+ <textarea rows="15" class="form-control" id="output" name="output"><?=$_POST['output']?></textarea>
</div>
</div>
+
+ <div id="final" class="alert" role="alert" style=":display: none;"></div>
+
<?php endif?>
</form>
+
<?php
ob_flush();
-if ($_GET) {
- $pkgname = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_GET['pkg'], ENT_QUOTES | ENT_HTML401));
- switch ($_GET['mode']) {
- case 'showlog':
- if (strpos($pkgname, ".")) {
- update_output_window(gettext("Something is wrong on the request."));
- } else if (file_exists("/tmp/pkg_mgr_{$pkgname}.log")) {
- update_output_window(@file_get_contents("/tmp/pkg_mgr_{$pkgname}.log"));
- } else {
- update_output_window(gettext("Log was not retrievable."));
- }
- break;
- case 'installedinfo':
- if (file_exists("/tmp/{$pkgname}.info")) {
- $status = @file_get_contents("/tmp/{$pkgname}.info");
- update_status("{$pkgname} " . gettext("installation completed."));
- update_output_window($status);
- } else {
- update_output_window(sprintf(gettext("Could not find %s."), $pkgname));
- }
- break;
- default:
- break;
- }
-} else if ($_POST) {
+if ($_POST) {
$pkgid = str_replace(array("<", ">", ";", "&", "'", '"', '.', '/'), "", htmlspecialchars_decode($_POST['id'], ENT_QUOTES | ENT_HTML401));
+}
- /* All other cases make changes, so mount rw fs */
- conf_mount_rw();
+if ($_POST && ($_POST['completed'] != "true")) {
/* Write out configuration to create a backup prior to pkg install. */
write_config(gettext("Creating restore point before package installation."));
+ $progbar = true;
+ $upgrade_script = "/usr/local/sbin/{$g['product_name']}-upgrade -y -l {$g['tmp_path']}/webgui-log.txt -p {$g['tmp_path']}/webgui-log.sock";
+
switch ($_POST['mode']) {
case 'delete':
- uninstall_package($pkgid);
- update_status(gettext("Package deleted."));
- $static_output .= "\n" . gettext("Package deleted.");
- update_output_window($static_output);
- filter_configure();
- break;
- case 'reinstallxml':
-// pkg_fetch_config_file($pkgid);
-// pkg_fetch_additional_files($pkgid);
- break;
- case 'reinstallpkg':
- delete_package_xml($pkgid);
- if (install_package($pkgid) != 0) {
- update_status(gettext("Package reinstallation failed."));
- $static_output .= "\n" . gettext("Package reinstallation failed.");
- update_output_window($static_output);
- } else {
- update_status(gettext("Package reinstalled."));
- $static_output .= "\n" . gettext("Package reinstalled.");
- update_output_window($static_output);
- filter_configure();
- }
- @file_put_contents("/tmp/{$pkgid}.info", $static_output);
- $pkgid = htmlspecialchars($pkgid);
- echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$pkgid}\";</script>";
- send_event("service restart packages");
+ mwexec_bg("{$upgrade_script} -r {$pkgid}");
+ $start_polling = true;
break;
+
case 'reinstallall':
if (is_array($config['installedpackages']) && is_array($config['installedpackages']['package'])) {
- $todo = array();
- foreach ($config['installedpackages']['package'] as $package) {
- $todo[] = array('name' => $package['name'], 'version' => $package['version']);
- }
- foreach ($todo as $pkgtodo) {
- $static_output = "";
- if ($pkgtodo['name']) {
- update_output_window($static_output);
- uninstall_package($pkgtodo['name']);
- install_package($pkgtodo['name']);
- }
- }
- update_status(gettext("All packages reinstalled."));
- $static_output .= "\n" . gettext("All packages reinstalled.");
- update_output_window($static_output);
- filter_configure();
- send_event("service restart packages");
- } else {
- update_output_window(gettext("No packages are installed."));
+ $progbar = false; // We don't show the progress bar for reinstallall. It would be far too confusing
+ mwexec_bg("{$upgrade_script} -i ALL_PACKAGES -f");
+ $start_polling = true;
}
+
break;
+ case 'reinstallpkg':
+ mwexec_bg("{$upgrade_script} -i {$pkgid} -f");
+ $start_polling = true;
+ break;
+
case 'installed':
default:
- $status = install_package($pkgid);
- if ($status != 0) {
- update_status(gettext("Installation of") . " {$pkgid} " . gettext("FAILED! "));
- $static_output .= "\n" . gettext("Installation halted.");
- update_output_window($static_output);
+ if ($pkgid == 'firmware') {
+ mwexec_bg("{$upgrade_script}");
} else {
- $status_a = gettext(sprintf("Installation of %s completed.", $pkgid));
- update_status($status_a);
- $status = get_after_install_info($pkgid);
- if ($status) {
- $static_output .= "\n" . gettext("Installation completed.") . "\n{$pkgid} " . gettext("setup instructions") . ":\n{$status}";
- } else {
- $static_output .= "\n" . gettext("Installation completed. Please check to make sure that the package is configured from the respective menu then start the package.");
- }
-
- @file_put_contents("/tmp/{$pkgid}.info", $static_output);
- echo "<script type='text/javascript'>document.location=\"pkg_mgr_install.php?mode=installedinfo&pkg={$pkgid}\";</script>";
+ mwexec_bg("{$upgrade_script} -i {$pkgid}");
}
- filter_configure();
+ $start_polling = true;
break;
}
+}
+
+// $_POST['completed'] just means that we are refreshing the page to update any new menu items
+// that were installed
+if ($_POST && $_POST['completed'] == "true"):
+ if ($pkgid == 'firmware'):
+?>
+<script>
+//<![CDATA[
+events.push(function() {
+ time = "<?=$guitimeout?>";
+ startCountdown();
+});
+//]]>
+</script>
+<?php
+ endif;
+endif;
+
+?>
+
+<script>
+//<![CDATA[
+// Update the progress indicator
+// transition = true allows the bar to move at default speed, false = instantaneous
+function setProgress(barName, percent, transition) {
+ $('.progress').show()
+ if (!transition) {
+ $('#' + barName).css('transition', 'width 0s ease-in-out');
+ }
+
+ $('#' + barName).css('width', percent + '%').attr('aria-valuenow', percent);
+}
+
+// Display a success banner
+function show_success() {
+ $('#final').removeClass("alert-info").addClass("alert-success");
+ if ("<?=$_POST['mode']?>" != "reinstallall") {
+ if ("<?=$pkgid?>" == "firmware") {
+ $('#final').html("<b>" + "System update" + " " + "<?=gettext(' successfully completed')?>");
+ } else {
+ $('#final').html("<b>" + "<?=$pkgid?>" + " </b>" + "<?=$modetxt?>" + " " + "<?=gettext(' successfully completed')?>");
+ }
+ } else {
+ $('#final').html("<?=gettext('Reinstallation of all packages successfully completed')?>");
+ }
+
+ $('#final').show();
+}
- // Delete all temporary package tarballs and staging areas.
- unlink_if_exists("/tmp/apkg_*");
- rmdir_recursive("/var/tmp/instmp*");
+// Display a failure banner
+function show_failure() {
+ $('#final').addClass("alert-danger");
+ if ("<?=$_POST['mode']?>" != "reinstallall") {
+ $('#final').html("<?=$pkgid?>" + " " + "<?=$modetxt?>" + " " + "<?=gettext(' failed!')?>");
+ } else {
+ $('#final').html("<?=gettext('Reinstallation of all packages failed')?>");
+ }
+ $('#final').show();
+}
- // close log
- if ($fd_log) {
- fclose($fd_log);
+// Ask the user to wait a bit
+function show_info() {
+ $('#final').addClass("alert-info");
+ if ("<?=$_POST['mode']?>" != "reinstallall") {
+ $('#final').html("Please wait while the " + "<?=$modetxt?>" + " of " + "<?=$pkgid?>" + " " + "completes." + "<br />" +
+ "<?=gettext("(Some packages may take several minutes!)")?>");
+ } else {
+ $('#final').html("Please wait while the reinstallation of all packages completes." + "<br />" +
+ "<?=gettext("(Some packages may take several minutes!)")?>");
}
+ $('#final').show();
+}
+
+function getLogsStatus() {
+ var ajaxRequest;
+ var repeat;
+ var progress;
+
+ repeat = true;
+
+ ajaxRequest = $.ajax({
+ url: "pkg_mgr_install.php",
+ type: "post",
+ data: { ajax: "ajax",
+ logfilename: "<?=$g['tmp_path'];?>/webgui-log",
+ next_log_line: "0"
+ }
+ });
+
+ // Deal with the results of the above ajax call
+ ajaxRequest.done(function (response, textStatus, jqXHR) {
+ var json = new Object;
+
+ json = jQuery.parseJSON(response);
+
+ if (json.log != "not ready") {
+ // Write the log file to the "output" textarea
+ $('#output').html(json.log);
+ scrollToBottom();
- /* Restore to read only fs */
- conf_mount_ro();
+ // Update the progress bar
+ progress = 0;
+
+ if ("<?=$progbar?>") {
+ if (json.data) {
+ /*
+ * XXX: There appears to be a bug in pkg that can cause "total"
+ * to be reported as zero
+ *
+ * https://github.com/freebsd/pkg/issues/1336
+ */
+ if (json.data.total > 0) {
+ setProgress('progressbar', ((json.data.current * 100) / json.data.total), true);
+ }
+
+ progress = json.data.total - json.data.current
+ if (progress < 0) {
+ progress = 0;
+ }
+
+ }
+ }
+ // Now we need to determine if the installation/removal was successful, and tell the user. Not as easy as it sounds :)
+ if ((json.pid == "stopped") && (progress == 0) && (json.exitstatus == 0)) {
+ show_success();
+ repeat = false;
+ $('form').submit();
+ }
+
+ if ((json.pid == "stopped") && ((progress != 0) || (json.exitstatus != 0))) {
+ show_failure();
+ repeat = false;
+ }
+ // ToDo: There are more end conditions we need to catch
+ }
+
+ // And maybe do it again
+ if (repeat)
+ setTimeout(getLogsStatus, 500);
+ });
+}
+
+function scrollToBottom() {
+ $('#output').scrollTop($('#output')[0].scrollHeight);
+}
+
+var timeoutmsg = '<h4>Rebooting<br />Page will automatically reload in ';
+var time = 0;
+
+function checkonline() {
+ $.ajax({
+ url : "/index.php", // or other resource
+ type : "HEAD"
+ })
+ .done(function() {
+ window.location="/index.php";
+ });
+}
+
+function startCountdown() {
+ setInterval(function() {
+ if (time > 0) {
+ $('#countdown').html(timeoutmsg + time + ' seconds.</h4>');
+ time--;
+ } else {
+ time = "<?=$guiretry?>";
+ timeoutmsg = '<h4>Not yet ready<br />Retrying in another ';
+ checkonline();
+ }
+ }, 1000);
}
-include('foot.inc')?> \ No newline at end of file
+events.push(function() {
+ if ("<?=$start_polling?>") {
+ setTimeout(getLogsStatus, 1000);
+ show_info();
+ }
+
+ // If we are just re-drawing the page after a successful install/remove/reinstall,
+ // we only meed to re-populate the progress indicator and the status banner
+ if ("<?=$_POST['completed']?>" == "true") {
+ setProgress('progressbar', 100, false);
+ show_success();
+ setTimeout(scrollToBottom, 200);
+ }
+
+});
+//]]>
+</script>
+
+<?php
+include('foot.inc');
diff --git a/src/usr/local/www/pkg_mgr_installed.php b/src/usr/local/www/pkg_mgr_installed.php
index 79f7f7a..30e8047 100644
--- a/src/usr/local/www/pkg_mgr_installed.php
+++ b/src/usr/local/www/pkg_mgr_installed.php
@@ -1,39 +1,61 @@
<?php
-/* $Id$ */
/*
pkg_mgr_installed.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2004-2012 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: pkgs
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-packagemanager-installed
-##|*NAME=System: Package Manager: Installed page
+##|*NAME=System: Package Manager: Installed
##|*DESCR=Allow access to the 'System: Package Manager: Installed' page.
##|*MATCH=pkg_mgr_installed.php*
##|-PRIV
@@ -41,13 +63,6 @@
require_once("guiconfig.inc");
require_once("pkg-utils.inc");
-$timezone = $config['system']['timezone'];
-if (!$timezone) {
- $timezone = "Etc/UTC";
-}
-
-date_default_timezone_set($timezone);
-
/* if upgrade in progress, alert user */
if (is_subsystem_dirty('packagelock')) {
$pgtitle = array(gettext("System"), gettext("Package Manager"));
@@ -57,126 +72,152 @@ if (is_subsystem_dirty('packagelock')) {
exit;
}
+$pgtitle = array(gettext("System"), gettext("Package Manager"), gettext("Installed Packages"));
include("head.inc");
-if(is_array($config['installedpackages']['package'])) {
- foreach($config['installedpackages']['package'] as $instpkg) {
- $tocheck[] = $instpkg['name'];
- }
-
- $currentvers = get_pkg_info($tocheck, array('version', 'xmlver', 'pkginfolink', 'descr'));
-}
-$closehead = false;
-$pgtitle = array(gettext("System"), gettext("Package Manager"));
-
-/* Print package server mismatch warning. See https://redmine.pfsense.org/issues/484 */
-if (!verify_all_package_servers())
- print_info_box(package_server_mismatch_message());
-
-/* Print package server SSL warning. See https://redmine.pfsense.org/issues/484 */
-if (check_package_server_ssl() === false)
- print_info_box(package_server_ssl_failure_message());
-
$tab_array = array();
$tab_array[] = array(gettext("Available Packages"), false, "pkg_mgr.php");
-// $tab_array[] = array("{$g['product_version']} " . gettext("packages"), false, "pkg_mgr.php");
-// $tab_array[] = array("Packages for any platform", false, "pkg_mgr.php?ver=none");
-// $tab_array[] = array("Packages for a different platform", $requested_version == "other" ? true : false, "pkg_mgr.php?ver=other");
$tab_array[] = array(gettext("Installed Packages"), true, "pkg_mgr_installed.php");
display_top_tabs($tab_array);
-if(!is_array($config['installedpackages']['package'])):?>
+$installed_packages = array();
+$package_list = get_pkg_info();
+foreach ($package_list as $pkg) {
+ if (!isset($pkg['installed']) && !isset($pkg['broken'])) {
+ continue;
+ }
+ $installed_packages[] = $pkg;
+}
+
+if (empty($installed_packages)):?>
<div class="alert alert-warning">
<?=gettext("There are no packages currently installed.")?>
</div>
-<?php else: ?>
- <div class="table-responsive">
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th><span class="sr-only"><?=gettext("Status")?></span></th>
- <th><?=gettext("Name")?></th>
- <th><?=gettext("Category")?></th>
- <th><?=gettext("Version")?></th>
- <th><?=gettext("Description")?></th>
- </tr>
- </thead>
- <tbody>
+<?php else:?>
+ <div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('Installed Packages')?></h2></div>
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed">
+ <thead>
+ <tr>
+ <th><!-- Status icon --></th>
+ <th><?=gettext("Name")?></th>
+ <th><?=gettext("Category")?></th>
+ <th><?=gettext("Version")?></th>
+ <th><?=gettext("Description")?></th>
+ <th><?=gettext("Actions")?></th>
+ </tr>
+ </thead>
+ <tbody>
<?php
- $instpkgs = array();
- foreach($config['installedpackages']['package'] as $instpkg) {
- $instpkgs[] = $instpkg['name'];
- }
- natcasesort($instpkgs);
-
- foreach ($instpkgs as $index => $pkgname):
- $pkg = $config['installedpackages']['package'][$index];
- if(!$pkg['name'])
+ foreach ($installed_packages as $pkg):
+ if (!$pkg['name']) {
continue;
+ }
- $full_name = $g['pkg_prefix'] . get_package_internal_name($pkg);
-
- // get history/changelog git dir
- $commit_dir=explode("/",$pkg['config_file']);
- $changeloglink ="https://github.com/pfsense/pfsense-packages/commits/master/config/".$commit_dir[(count($commit_dir)-2)];
#check package version
- $latest_package = $currentvers[$pkg['name']]['version'];
- if ($latest_package) {
- // we're running a newer version of the package
- if(strcmp($pkg['version'], $latest_package) > 0) {
- $status = 'Newer then available ('. $latest_package .')';
- $statusicon = 'exclamation';
- }
- // we're running an older version of the package
- if(strcmp($pkg['version'], $latest_package) < 0) {
- $status = 'Upgrade available to '.$latest_package;
- $statusicon = 'plus';
- }
- // we're running the current version
- if(!strcmp($pkg['version'], $latest_package)) {
+ $txtcolor = "";
+ $upgradeavail = false;
+ $missing = false;
+ $vergetstr = "";
+
+ if (isset($pkg['broken'])) {
+ // package is configured, but does not exist in the system
+ $txtcolor = "text-danger";
+ $missing = true;
+ $status = 'Package is configured, but not installed!';
+ } else if (isset($pkg['installed_version']) && isset($pkg['version'])) {
+ $version_compare = pkg_version_compare($pkg['installed_version'], $pkg['version']);
+
+ if ($version_compare == '>') {
+ // we're running a newer version of the package
+ $status = 'Newer than available ('. $pkg['version'] .')';
+ } else if ($version_compare == '<') {
+ // we're running an older version of the package
+ $status = 'Upgrade available to '.$pkg['version'];
+ $txtcolor = "text-warning";
+ $upgradeavail = true;
+ $vergetstr = '&amp;from=' . $pkg['installed_version'] . '&amp;to=' . $pkg['version'];
+ } else if ($version_compare == '=') {
+ // we're running the current version
$status = 'Up-to-date';
- $statusicon = 'ok';
+ } else {
+ $status = 'Error comparing version';
}
- $pkgdescr = $currentvers[$pkg['name']]['descr'];
} else {
// unknown available package version
$status = 'Unknown';
$statusicon = 'question';
- $pkgdescr = $pkg['descr'];
}
?>
<tr>
<td>
- <i title="<?=$status?>" class="icon icon-<?=$statusicon?>-sign"></i>
+<?php if ($upgradeavail):?>
+ <a title="<?=$status?>" href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=<?=$pkg['name']?><?=$vergetstr?>" class="fa fa-refresh"></a>
+<?php elseif ($missing):?>
+ <span class="text-danger"><i title="<?=$status?>" class="fa fa-exclamation"></i></span>
+<?php else:?>
+ <i title="<?=$status?>" class="fa fa-check"></i>
+<?php endif;?>
</td>
<td>
- <?=$pkg['name']?>
+ <span class="<?=$txtcolor?>"><?=$pkg['shortname']?></span>
</td>
<td>
- <?=$pkg['category']?>
+ <?=implode(" ", $pkg['categories'])?>
</td>
<td>
<?php if (!$g['disablepackagehistory']):?>
- <a target="_blank" title="<?=gettext("View changelog")?>" href="<?=htmlspecialchars($changeloglink)?>">
+ <a target="_blank" title="<?=gettext("View changelog")?>" href="<?=htmlspecialchars($pkg['changeloglink'])?>">
<?php endif;?>
- <?=htmlspecialchars($pkg['version'])?>
+ <?=htmlspecialchars($pkg['installed_version'])?>
+<?php if (!$g['disablepackagehistory']):?>
</a>
+<?php endif;?>
</td>
<td>
- <?=$pkgdescr?>
+ <?=$pkg['desc']?>
+<?php if (is_array($pkg['deps']) && count($pkg['deps'])):?>
+ <br /><br /><?= gettext("Package Dependencies")?>:<ul>
+ <?php foreach ($pkg['deps'] as $pdep):?>
+ <a target="_blank" href="https://freshports.org/<?=$pdep['origin']?>" class="fa fa-globe"><small>&nbsp;<?= basename($pdep['origin']) . '-' . $pdep['version']?></small></a>&emsp;
+ <?php endforeach;?></ul>
+<?php endif;?>
</td>
<td>
- <a href="pkg_mgr_install.php?mode=delete&amp;pkg=<?=$full_name?>" class="btn btn-danger">remove</a>
- <a href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=<?=$full_name?>" class="btn btn-info">reinstall</a>
- <a href="pkg_mgr_install.php?mode=reinstallxml&amp;pkg=<?=$full_name?>" class="btn btn-info"><?=gettext("reinstall GUI")?></a>
-<?php if(!$g['disablepackageinfo'] && $pkg['pkginfolink'] && $pkg['pkginfolink'] != $pkg['website']):?>
- <a target="_blank" title="<?=gettext("View more inforation")?>" href="<?=htmlspecialchars($pkg['pkginfolink'])?>" class="btn btn-default">info</a>
+ <div class="row">
+ <a title="<?=gettext("Remove")?>" href="pkg_mgr_install.php?mode=delete&amp;pkg=<?=$pkg['name']?>" class="fa fa-trash"></a>
+<?php if ($upgradeavail):?>
+ <a title="<?=gettext("Update")?>" href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=<?=$pkg['name']?><?=$vergetstr?>" class="fa fa-refresh"></a>
+<?php else:?>
+ <a title="<?=gettext("Reinstall")?>" href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=<?=$pkg['name']?>" class="fa fa-retweet"></a>
+<?php endif;?>
+
+<?php if (!isset($g['disablepackageinfo']) && $pkg['www'] != 'UNKNOWN'):?>
+ <a target="_blank" title="<?=gettext("View more information")?>" href="<?=htmlspecialchars($pkg['www'])?>" class="fa fa-info"></a>
<?php endif;?>
+ </div>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
+</div>
+<br />
+<div class="text-center">
+ <p>
+ <i class="fa fa-refresh"></i> = Update &nbsp;
+ <i class="fa fa-check"></i> = Current &nbsp;
+ </p>
+ <p>
+ <i class="fa fa-trash"></i> = Remove &nbsp;
+ <i class="fa fa-info"></i> = Information &nbsp;
+ <i class="fa fa-retweet"></i> = Reinstall
+ </p>
+ <p><span class="text-warning"><?=gettext("Newer version available")?></span></p>
+ <p><span class="text-danger"><?=gettext("Package is configured but not (fully) installed")?></span></p>
+</div>
+
<?php endif; ?>
<?php include("foot.inc")?>
diff --git a/src/usr/local/www/pkg_mgr_settings.php b/src/usr/local/www/pkg_mgr_settings.php
deleted file mode 100644
index f44b0be..0000000
--- a/src/usr/local/www/pkg_mgr_settings.php
+++ /dev/null
@@ -1,114 +0,0 @@
-<?php
-/* $Id$ */
-/*
- pkg_mgr_settings.php
- part of pfSense
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Jim Pingle <jimp@pfsense.org>
- Copyright (C) 2004-2010 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2005 Colin Smith
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: pkgs
-*/
-
-##|+PRIV
-##|*IDENT=page-pkg-mgr-settings
-##|*NAME=Packages: Settings page
-##|*DESCR=Allow access to the 'Packages: Settings' page.
-##|*MATCH=pkg_mgr_settings.php*
-##|-PRIV
-
-ini_set('max_execution_time', '0');
-
-require_once("globals.inc");
-require_once("guiconfig.inc");
-require_once("pkg-utils.inc");
-
-if ($_POST) {
- if (!$input_errors) {
- if ($_POST['alturlenable'] == "yes") {
- $config['system']['altpkgrepo']['enable'] = true;
- $config['system']['altpkgrepo']['xmlrpcbaseurl'] = $_POST['pkgrepourl'];
- } else {
- unset($config['system']['altpkgrepo']['enable']);
- }
- write_config();
- }
-
- write_config();
-}
-
-$curcfg = $config['system']['altpkgrepo'];
-$closehead = false;
-$pgtitle = array(gettext("System"), gettext("Package Settings"));
-include("head.inc");
-
-// Print package server mismatch warning. See https://redmine.pfsense.org/issues/484
-if (!verify_all_package_servers())
- print_info_box(package_server_mismatch_message());
-
-// Print package server SSL warning. See https://redmine.pfsense.org/issues/484
-if (check_package_server_ssl() === false)
- print_info_box(package_server_ssl_failure_message());
-
-if ($savemsg)
- print_info_box($savemsg);
-
-$tab_array = array();
-$tab_array[] = array(sprintf(gettext("%s packages"), $g['product_version']), false, "pkg_mgr.php");
-$tab_array[] = array(gettext("Installed Packages"), false, "pkg_mgr_installed.php");
-$tab_array[] = array(gettext("Package Settings"), true, "pkg_mgr_settings.php");
-display_top_tabs($tab_array);
-
-print_info_box(gettext('This page allows an alternate package repository to be configured, primarily for temporary use as a testing mechanism.' .
- 'The contents of unofficial packages servers cannot be verified and may contain malicious files.' .
- 'The package server settings should remain at their default values to ensure that verifiable and trusted packages are recevied.' .
- 'A warning is printed on the Dashboard and in the package manager when an unofficial package server is in use.'), 'default');
-
-require_once('classes/Form.class.php');
-
-$form = new Form();
-
-$section = new Form_Section('Alternate package repository');
-
-$section->addInput(new Form_Checkbox(
- 'alturlenable',
- 'Enable Alternate',
- 'Use a non-official server for packages',
- $curcfg['enable']
-))->toggles('.form-group:not(:first-child)');
-
-$section->addInput(new Form_Input(
- 'pkgrepourl',
- 'Package Repository URL',
- 'text',
- $curcfg['xmlrpcbaseurl'] ? $curcfg['xmlrpcbaseurl'] : $g['']
-))->setHelp(sprintf("This is where %s will check for packages when the",$g['product_name']) .
- '<a href="pkg_mgr.php">' . ' ' . 'System: Packages' . ' </a>' . 'page is viewed.');
-
-$form->add($section);
-print($form);
-
-include("foot.inc");
diff --git a/src/usr/local/www/restart_httpd.php b/src/usr/local/www/restart_httpd.php
index 2f59bbf..394eed8 100644
--- a/src/usr/local/www/restart_httpd.php
+++ b/src/usr/local/www/restart_httpd.php
@@ -1,42 +1,63 @@
<?php
-/* $Id$ */
/*
restart_httpd.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2005 Bill Marquette <bill.marquette@gmail.com>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /bin/chmod
- pfSense_MODULE: pkgs
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-diagnostics-restart-httpd
-##|*NAME=Diagnostics: Restart HTTPD : System page
-##|*DESCR=Allow access to the 'Diagnostics: Restart HTTPD: System' page.
+##|*NAME=Diagnostics: Restart Web Server Daemon
+##|*DESCR=Allow access to the 'Diagnostics: Restart Web Server Daemon' page.
##|*MATCH=restart_httpd.php*
##|-PRIV
@@ -46,7 +67,6 @@ $pgtitle = array(gettext("Restarting httpd"));
include("head.inc");
?>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<form>
<?php include("fbegin.inc"); ?>
@@ -64,5 +84,5 @@ include("head.inc");
<?=gettext("Done");?>.<br />
<?php
-include("fend.inc");
+include("foot.inc");
?>
diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php
index fb90c8c..5289cf1 100644
--- a/src/usr/local/www/services_captiveportal.php
+++ b/src/usr/local/www/services_captiveportal.php
@@ -1,40 +1,64 @@
<?php
/*
services_captiveportal.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal
-##|*NAME=Services: Captive portal page
+##|*NAME=Services: Captive portal
##|*DESCR=Allow access to the 'Services: Captive portal' page.
##|*MATCH=services_captiveportal.php*
##|-PRIV
@@ -69,7 +93,7 @@ if (!is_array($config['captiveportal'])) {
}
$a_cp =& $config['captiveportal'];
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']);
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("Configuration"));
$shortcut_section = "captiveportal";
if ($_GET['act'] == "viewhtml") {
@@ -274,16 +298,16 @@ if ($_POST) {
}
if ($_POST['timeout'] > $deftime) {
- $input_errors[] = gettext("Hard timeout must be less or equal Default lease time set on DHCP Server");
+ $input_errors[] = gettext("Hard timeout must be less than or equal to the Default lease time set on DHCP Server");
}
}
}
}
-
+
if ($_POST['idletimeout'] && (!is_numeric($_POST['idletimeout']) || ($_POST['idletimeout'] < 1))) {
$input_errors[] = gettext("The idle timeout must be at least 1 minute.");
}
-
+
if ($_POST['freelogins_count'] && (!is_numeric($_POST['freelogins_count']))) {
$input_errors[] = gettext("The pass-through credit count must be a number or left blank.");
} else if ($_POST['freelogins_count'] && is_numeric($_POST['freelogins_count']) && ($_POST['freelogins_count'] >= 1)) {
@@ -291,47 +315,47 @@ if ($_POST) {
$input_errors[] = gettext("The waiting period to restore pass-through credits must be above 0 hours.");
}
}
-
+
if (($_POST['radiusip'] && !is_ipaddr($_POST['radiusip']))) {
$input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip']);
}
-
+
if (($_POST['radiusip2'] && !is_ipaddr($_POST['radiusip2']))) {
$input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip2']);
}
-
+
if (($_POST['radiusip3'] && !is_ipaddr($_POST['radiusip3']))) {
$input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip3']);
}
-
+
if (($_POST['radiusip4'] && !is_ipaddr($_POST['radiusip4']))) {
$input_errors[] = sprintf(gettext("A valid IP address must be specified. [%s]"), $_POST['radiusip4']);
}
-
+
if (($_POST['radiusport'] && !is_port($_POST['radiusport']))) {
$input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport']);
}
-
+
if (($_POST['radiusport2'] && !is_port($_POST['radiusport2']))) {
$input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport2']);
}
-
+
if (($_POST['radiusport3'] && !is_port($_POST['radiusport3']))) {
$input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport3']);
}
-
+
if (($_POST['radiusport4'] && !is_port($_POST['radiusport4']))) {
$input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusport4']);
}
-
+
if (($_POST['radiusacctport'] && !is_port($_POST['radiusacctport']))) {
$input_errors[] = sprintf(gettext("A valid port number must be specified. [%s]"), $_POST['radiusacctport']);
}
-
+
if ($_POST['maxproc'] && (!is_numeric($_POST['maxproc']) || ($_POST['maxproc'] < 4) || ($_POST['maxproc'] > 100))) {
$input_errors[] = gettext("The maximum number of concurrent connections per client IP address may not be larger than the global maximum.");
}
-
+
if (trim($_POST['radiusnasid']) !== "" && !preg_match("/^[\x21-\x7e]{3,253}$/i", trim($_POST['radiusnasid']))) {
$input_errors[] = gettext("The NAS-Identifier must be 3-253 characters long and should only contain ASCII characters.");
}
@@ -502,8 +526,9 @@ function build_radiusnas_list() {
$snip = long2ip32($start+$i);
$list[$snip] = $sn['descr'] . ' - ' . $snip;
}
- } else
+ } else {
$list[$sn['subnet']] = $sn['descr'] . ' - ' . $sn['subnet'];
+ }
}
}
@@ -515,32 +540,32 @@ function build_cert_list() {
$list = array();
- foreach($a_cert as $cert)
+ foreach ($a_cert as $cert) {
$list[$cert['refid']] = $cert['descr'];
+ }
return($list);
}
-$closehead = false;
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
-$tab_array[] = array(gettext("Captive portal(s)"), true, "services_captiveportal.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Configuration"), true, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
-$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('Captive Portal Configuration');
@@ -567,7 +592,7 @@ $section->addInput(new Form_Input(
$pconfig['maxprocperip'],
['min' => '0', 'max' => '100']
))->setHelp('Limits the number of concurrent connections to the captive portal HTTP(S) server. This does not set how many users can be logged in ' .
- 'to the captive portal, but rather how many connections a single IP can establish to the portal web server.');
+ 'to the captive portal, but rather how many connections a single IP can establish to the portal web server.');
$section->addInput(new Form_Input(
'idletimeout',
@@ -681,7 +706,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Input(
'bwdefaultup',
- 'Default download (Kbit/s)',
+ 'Default upload (Kbit/s)',
'number',
$pconfig['bwdefaultup']
))->setHelp('If this option is set, the captive portal will restrict each user who logs in to the specified default bandwidth. ' .
@@ -758,7 +783,7 @@ $group->add(new Form_Checkbox(
null,
'MSCHAPv2',
$pconfig['radius_protocol'] == 'MSCHAPv2',
- 'SCHAPv2'
+ 'MSCHAPv2'
))->displayasRadio();
$section->add($group);
@@ -808,10 +833,10 @@ $group->add(new Form_Input(
))->setHelp('RADIUS port. Leave blank for default (1812)');
$group->add(new Form_Input(
- 'radiuskey3',
+ 'radiuskey2',
null,
'text',
- $pconfig['radiuskey3']
+ $pconfig['radiuskey2']
))->setHelp('RADIUS shared secret. Leave blank to not use a shared secret (not recommended)');
$section->add($group);
@@ -824,23 +849,23 @@ $section->addClass('Secondary');
$group = new Form_Group('Primary RADIUS server');
$group->add(new Form_IpAddress(
- 'radiusip4',
+ 'radiusip3',
null,
- $pconfig['radiusip4']
+ $pconfig['radiusip3']
));
$group->add(new Form_Input(
- 'radiusport4',
+ 'radiusport3',
null,
'number',
- $pconfig['radiusport4']
+ $pconfig['radiusport3']
));
$group->add(new Form_Input(
- 'radiuskey4',
+ 'radiuskey3',
null,
'text',
- $pconfig['radiuskey4']
+ $pconfig['radiuskey3']
));
$section->add($group);
@@ -848,23 +873,23 @@ $section->add($group);
$group = new Form_Group('Secondary RADIUS server');
$group->add(new Form_IpAddress(
- 'radiusip',
+ 'radiusip4',
null,
- $pconfig['radiusip']
+ $pconfig['radiusip4']
))->setHelp('IP address of the RADIUS server to authenticate against.');
$group->add(new Form_Input(
- 'radiusport',
+ 'radiusport4',
null,
'number',
- $pconfig['radiusport']
+ $pconfig['radiusport4']
))->setHelp('RADIUS port. Leave blank for default (1812)');
$group->add(new Form_Input(
- 'radiuskey',
+ 'radiuskey4',
null,
'text',
- $pconfig['radiuskey']
+ $pconfig['radiuskey4']
))->setHelp('RADIUS shared secret. Leave blank to not use a shared secret (not recommended)');
$section->add($group);
@@ -899,7 +924,7 @@ $group->add(new Form_Checkbox(
$group->add(new Form_Checkbox(
'reauthenticateacct',
null,
- 'Stop/stop Accounting',
+ 'Stop/start Accounting',
$pconfig['reauthenticateacct'] == 'stopstart'
))->displayasRadio();
@@ -1015,7 +1040,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Select(
'certref',
- 'SSL Certigicate',
+ 'SSL Certificate',
$pconfig['certref'],
build_cert_list()
))->setHelp('If no certificates are defined, you may define one here: ' . '<a href="system_certmanager.php">System &gt; Cert Manager</a>');
@@ -1096,7 +1121,7 @@ if ($pconfig['page']['errtext']) {
$section->addInput(new Form_Button(
'btndownload',
- 'Restore default portal page',
+ 'Restore default error page',
'?zone=' . $cpzone . '&amp;act=delerrhtml'
))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs');
}
@@ -1123,7 +1148,7 @@ if ($pconfig['page']['logouttext']) {
$section->addInput(new Form_Button(
'btndownload',
- 'Restore default portal page',
+ 'Restore default logout page',
'?zone=' . $cpzone . '&amp;act=dellogouthtml'
))->removeClass('btn-primary')->addClass('btn btn-danger btn-xs');
}
@@ -1145,7 +1170,7 @@ print_info_box(gettext('Warning:' . '<br />' . 'Don\'t forget to enable the DHCP
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// ------- Show/hide sections based on checkbox settings --------------------------------------
function hideSections(hide) {
diff --git a/src/usr/local/www/services_captiveportal_filemanager.php b/src/usr/local/www/services_captiveportal_filemanager.php
index 1984cba..9ef63c8 100644
--- a/src/usr/local/www/services_captiveportal_filemanager.php
+++ b/src/usr/local/www/services_captiveportal_filemanager.php
@@ -1,41 +1,66 @@
<?php
/*
services_captiveportal_filemanager.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2005-2006 Jonathan De Graeve (jonathan.de.graeve@imelda.be)
- and Paul Taylor (paultaylor@winn-dixie.com).
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005-2006 Jonathan De Graeve (jonathan.de.graeve@imelda.be)
+ * and Paul Taylor (paultaylor@winn-dixie.com)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-filemanager
-##|*NAME=Services: Captive portal: File Manager page
+##|*NAME=Services: Captive portal: File Manager
##|*DESCR=Allow access to the 'Services: Captive portal: File Manager' page.
##|*MATCH=services_captiveportal_filemanager.php*
##|-PRIV
@@ -71,7 +96,7 @@ if (!is_array($config['captiveportal'])) {
}
$a_cp =& $config['captiveportal'];
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']);
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("File Manager"));
$shortcut_section = "captiveportal";
if (!is_array($a_cp[$cpzone]['element'])) {
@@ -139,20 +164,19 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
-$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
-$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), true, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
-require_once('classes/Form.class.php');
-
if ($_GET['act'] == 'add') {
$form = new Form(new Form_Button(
@@ -207,14 +231,14 @@ if (is_array($a_cp[$cpzone]['element'])):
<td><?=htmlspecialchars($element['name'])?></td>
<td><?=format_bytes($element['size'])?></td>
<td>
- <a href="services_captiveportal_filemanager.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">Delete</a>
+ <a class="fa fa-trash" title="<?=gettext("Delete file")?>" href="services_captiveportal_filemanager.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
$i++;
endforeach;
- if($total_size > 0) :
+ if ($total_size > 0) :
?>
<tr>
<th>
@@ -236,16 +260,18 @@ endif;
?>
<nav class="action-buttons">
- <button id="btnnotes" class="btn btn-default">Show Notes</button>
<?php if (!$_GET['act'] == 'add'): ?>
- <a href="services_captiveportal_filemanager.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success">Add</a>
+ <a href="services_captiveportal_filemanager.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
<?php endif; ?>
</nav>
<?php
// The notes displayed on the page are large, the page content comparitively small. A "Note" button
// is provided so that you only see the notes if you ask for them
?>
-<div class="help-block panel panel-default">
+<div id="infoblock" class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">Notes</h2></div>
<div class="panel-body">
<?=gettext("Any files that you upload here with the filename prefix of captiveportal- will " .
@@ -253,38 +279,12 @@ endif;
"You may reference them directly from your portal page HTML code using relative paths. " .
"Example: you've uploaded an image with the name 'captiveportal-test.jpg' using the " .
"file manager. Then you can include it in your portal page like this:")?><br /><br />
- <pre>&lt;img src=&quot;captiveportal-test.jpg&quot; width=... height=...&gt;</pre><br /><br />
+ <pre>&lt;img src=&quot;captiveportal-test.jpg&quot; width=... height=...&gt;</pre><br />
<?=gettext("In addition, you can also upload .php files for execution. You can pass the filename " .
"to your custom page from the initial page by using text similar to:")?><br /><br />
- <pre>&lt;a href="/captiveportal-aup.php?zone=$PORTAL_ZONE$&amp;redirurl=$PORTAL_REDIRURL$"&gt;<?=gettext("Acceptable usage policy"); ?>&lt;/a&gt;</pre><br /><br />
+ <pre>&lt;a href="/captiveportal-aup.php?zone=$PORTAL_ZONE$&amp;redirurl=$PORTAL_REDIRURL$"&gt;<?=gettext("Acceptable usage policy"); ?>&lt;/a&gt;</pre><br />
<?=sprintf(gettext("The total size limit for all files is %s."), format_bytes($g['captiveportal_element_sizelimit']))?>
</div>
</div>
-
-<script>
-//<![CDATA[
-events.push(function(){
-
- var hidenotes = true;
-
- // Hides all elements of the specified class.
- function hideClass(s_class, hide) {
- if(hide)
- $('.' + s_class).hide();
- else
- $('.' + s_class).show();
- }
-
- hideClass('help-block', hidenotes);
-
- $(function () {
- $('#btnnotes').on('click', function () {
- hidenotes = !hidenotes;
- hideClass('notes', hidenotes);
- });
- });
-});
-</script>
<?php
-
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_hostname.php b/src/usr/local/www/services_captiveportal_hostname.php
index 0256fc2..c40694a 100644
--- a/src/usr/local/www/services_captiveportal_hostname.php
+++ b/src/usr/local/www/services_captiveportal_hostname.php
@@ -1,43 +1,61 @@
<?php
/*
services_captiveportal_hostname.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ipfw
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-allowedhostnames
-##|*NAME=Services: Captive portal: Allowed Hostnames page
+##|*NAME=Services: Captive portal: Allowed Hostnames
##|*DESCR=Allow access to the 'Services: Captive portal: Allowed Hostnames' page.
##|*MATCH=services_captiveportal_hostname.php*
##|-PRIV
@@ -74,7 +92,7 @@ if (isset($cpzone) && !empty($cpzone) && isset($a_cp[$cpzone]['zoneid'])) {
$cpzoneid = $a_cp[$cpzone]['zoneid'];
}
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']);
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("Allowed Hostnames"));
$shortcut_section = "captiveportal";
if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
@@ -112,11 +130,12 @@ if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
$tab_array = array();
-$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), true, "services_captiveportal_hostname.php?zone={$cpzone}");
@@ -148,8 +167,8 @@ foreach ($a_cp[$cpzone]['allowedhostname'] as $ip): ?>
<?=htmlspecialchars($ip['descr'])?>
</td>
<td>
- <a href="services_captiveportal_hostname_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i?>" class="btn btn-xs btn-info">Edit</a>
- <a href="services_captiveportal_hostname.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">Delete</a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit hostname"); ?>" href="services_captiveportal_hostname_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete hostname")?>" href="services_captiveportal_hostname.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -157,22 +176,30 @@ $i++;
endforeach; ?>
<tbody>
</table>
- <?=$directionicons['to'] . ' = ' . sprintf(gettext('All connections %sto%s the hostname are allowed'), '<u>','</u>') . ', '?>
- <?=$directionicons['from'] . ' = ' . sprintf(gettext('All connections %sfrom%s the hostname are allowed'), '<u>','</u>') . ', '?>
- <?=$directionicons['both'] . ' = ' . sprintf(gettext('All connections %sto or from%s are allowed'), '<u>','</u>')?>
+ <?=$directionicons['to'] . ' = ' . sprintf(gettext('All connections %sto%s the hostname are allowed'), '<u>', '</u>') . ', '?>
+ <?=$directionicons['from'] . ' = ' . sprintf(gettext('All connections %sfrom%s the hostname are allowed'), '<u>', '</u>') . ', '?>
+ <?=$directionicons['both'] . ' = ' . sprintf(gettext('All connections %sto or from%s are allowed'), '<u>', '</u>')?>
<?php
-else :
+else:
?>
</tbody>
</table>
<?php
endif;
?>
- <nav class="action-buttons">
- <a href="services_captiveportal_hostname_edit.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success">Add</a>
- </nav>
</div>
+
+<nav class="action-buttons">
+ <a href="services_captiveportal_hostname_edit.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
+
+<div id="infoblock">
+ <?=print_info_box($notestr)?>
+</div>
+
<?php
-print_info_box($notestr);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_hostname_edit.php b/src/usr/local/www/services_captiveportal_hostname_edit.php
index 8f8bbd2..5d828d1 100644
--- a/src/usr/local/www/services_captiveportal_hostname_edit.php
+++ b/src/usr/local/www/services_captiveportal_hostname_edit.php
@@ -1,43 +1,61 @@
<?php
/*
services_captiveportal_hostname_edit.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ipfw
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-editallowedhostnames
-##|*NAME=Services: Captive portal: Edit Allowed Hostnames page
+##|*NAME=Services: Captive portal: Edit Allowed Hostnames
##|*DESCR=Allow access to the 'Services: Captive portal: Edit Allowed Hostnames' page.
##|*MATCH=services_captiveportal_hostname_edit.php*
##|-PRIV
@@ -59,7 +77,7 @@ require("captiveportal.inc");
global $cpzone, $cpzoneid;
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit allowed Hostname"));
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit allowed Hostname"));
$shortcut_section = "captiveportal";
$cpzone = $_GET['zone'];
@@ -165,7 +183,7 @@ if ($_POST) {
}
function build_dir_list() {
- $dirs = array(gettext("Both"),gettext("From"),gettext("To"));
+ $dirs = array(gettext("Both"), gettext("From"), gettext("To"));
$dirlist = array();
foreach ($dirs as $dir) {
@@ -177,10 +195,9 @@ function build_dir_list() {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'Submit',
@@ -194,7 +211,7 @@ $section->addInput(new Form_Select(
'Direction',
strtolower($pconfig['dir']),
build_dir_list()
-))->setHelp('Use "From" to always allow an Hostname through the captive portal (without authentication). ' .
+))->setHelp('Use "From" to always allow a Hostname through the captive portal (without authentication). ' .
'Use "To" to allow access from all clients (even non-authenticated ones) behind the portal to this Hostname.');
$section->addInput(new Form_Input(
@@ -244,4 +261,4 @@ if (isset($id) && $a_allowedhostnames[$id]) {
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php
index bece2cb..6d8c40b 100644
--- a/src/usr/local/www/services_captiveportal_ip.php
+++ b/src/usr/local/www/services_captiveportal_ip.php
@@ -1,41 +1,65 @@
<?php
/*
services_captiveportal_ip.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ipfw
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004 Dinesh Nair <dinesh@alphaque.com>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-allowedips
-##|*NAME=Services: Captive portal: Allowed IPs page
+##|*NAME=Services: Captive portal: Allowed IPs
##|*DESCR=Allow access to the 'Services: Captive portal: Allowed IPs' page.
##|*MATCH=services_captiveportal_ip.php*
##|-PRIV
@@ -67,7 +91,7 @@ if (isset($cpzone) && !empty($cpzone) && isset($a_cp[$cpzone]['zoneid'])) {
$cpzoneid = $a_cp[$cpzone]['zoneid'];
}
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']);
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("Allowed IP Addresses"));
$shortcut_section = "captiveportal";
if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
@@ -99,18 +123,19 @@ if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid)) {
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
$tab_array = array();
-$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed IP Addresses"), true, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
display_top_tabs($tab_array, true);
-
+
?>
<div class="table-responsive">
<table class="table table-hover table-striped table-condensed">
@@ -137,8 +162,8 @@ if (is_array($a_cp[$cpzone]['allowedip'])): ?>
<?=htmlspecialchars($ip['descr'])?>
</td>
<td>
- <a href="services_captiveportal_ip_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i?>" class="btn btn-xs btn-info">Edit</a>
- <a href="services_captiveportal_ip.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">Delete</a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit IP"); ?>" href="services_captiveportal_ip_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete IP")?>" href="services_captiveportal_ip.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -147,11 +172,11 @@ if (is_array($a_cp[$cpzone]['allowedip'])): ?>
<tbody>
</table>
- <?=$directionicons['to'] . ' = ' . sprintf(gettext('All connections %sto%s the address are allowed'), '<u>','</u>') . ', '?>
- <?=$directionicons['from'] . ' = ' . sprintf(gettext('All connections %sfrom%s the address are allowed'), '<u>','</u>') . ', '?>
- <?=$directionicons['both'] . ' = ' . sprintf(gettext('All connections %sto or from%s are allowed'), '<u>','</u>')?>
+ <?=$directionicons['to'] . ' = ' . sprintf(gettext('All connections %sto%s the address are allowed'), '<u>', '</u>') . ', '?>
+ <?=$directionicons['from'] . ' = ' . sprintf(gettext('All connections %sfrom%s the address are allowed'), '<u>', '</u>') . ', '?>
+ <?=$directionicons['both'] . ' = ' . sprintf(gettext('All connections %sto or from%s are allowed'), '<u>', '</u>')?>
<?php
-else :
+else:
?>
</tbody>
</table>
@@ -161,11 +186,16 @@ endif;
</div>
<nav class="action-buttons">
- <a href="services_captiveportal_ip_edit.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success">Add</a>
+ <a href="services_captiveportal_ip_edit.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
-<?php
-print_info_box(gettext('Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. ' .
- 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'));
+<div id="infoblock">
+<?=print_info_box(gettext('Adding allowed IP addresses will allow IP access to/from these addresses through the captive portal without being taken to the portal page. ' .
+ 'This can be used for a web server serving images for the portal page or a DNS server on another network, for example.'), info)?>
+</div>
-include("foot.inc"); \ No newline at end of file
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_ip_edit.php b/src/usr/local/www/services_captiveportal_ip_edit.php
index 18c6590..379711a 100644
--- a/src/usr/local/www/services_captiveportal_ip_edit.php
+++ b/src/usr/local/www/services_captiveportal_ip_edit.php
@@ -1,43 +1,65 @@
<?php
/*
services_captiveportal_ip_edit.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2011 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/ipfw
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004 Dinesh Nair <dinesh@alphaque.com>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-editallowedips
-##|*NAME=Services: Captive portal: Edit Allowed IPs page
+##|*NAME=Services: Captive portal: Edit Allowed IPs
##|*DESCR=Allow access to the 'Services: Captive portal: Edit Allowed IPs' page.
##|*MATCH=services_captiveportal_ip_edit.php*
##|-PRIV
@@ -58,7 +80,7 @@ require_once("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit allowed IP address"));
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit allowed IP address"));
$shortcut_section = "captiveportal";
$cpzone = $_GET['zone'];
@@ -122,6 +144,14 @@ if ($_POST) {
$input_errors[] = gettext("Download speed needs to be an integer");
}
+ if ($_POST['bw_up'] && ($_POST['bw_up'] > 999999 || $_POST['bw_up'] < 1)) {
+ $input_errors[] = gettext("Upload speed must be between 1 and 999999");
+ }
+
+ if ($_POST['bw_down'] && ($_POST['bw_down'] > 999999 || $_POST['bw_down'] < 1)) {
+ $input_errors[] = gettext("Download speed must be between 1 and 999999");
+ }
+
foreach ($a_allowedips as $ipent) {
if (isset($id) && ($a_allowedips[$id]) && ($a_allowedips[$id] === $ipent)) {
continue;
@@ -196,7 +226,7 @@ if ($_POST) {
}
function build_dir_list() {
- $dirs = array(gettext("Both"),gettext("From"),gettext("To"));
+ $dirs = array(gettext("Both"), gettext("From"), gettext("To"));
$dirlist = array();
foreach ($dirs as $dir) {
@@ -208,10 +238,9 @@ function build_dir_list() {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
diff --git a/src/usr/local/www/services_captiveportal_mac.php b/src/usr/local/www/services_captiveportal_mac.php
index 3fc8b08..d9eb4be 100644
--- a/src/usr/local/www/services_captiveportal_mac.php
+++ b/src/usr/local/www/services_captiveportal_mac.php
@@ -1,40 +1,65 @@
<?php
/*
services_captiveportal_mac.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004 Dinesh Nair <dinesh@alphaque.com>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-macaddresses
-##|*NAME=Services: Captive portal: Mac Addresses page
+##|*NAME=Services: Captive portal: Mac Addresses
##|*DESCR=Allow access to the 'Services: Captive portal: Mac Addresses' page.
##|*MATCH=services_captiveportal_mac.php*
##|-PRIV
@@ -53,7 +78,6 @@ if (isset($_POST['zone'])) {
$cpzone = $_POST['zone'];
}
-
if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) {
header("Location: services_captiveportal_zones.php");
exit;
@@ -64,7 +88,7 @@ if (!is_array($config['captiveportal'])) {
}
$a_cp =& $config['captiveportal'];
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), $a_cp[$cpzone]['zone']);
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("MAC"));
$shortcut_section = "captiveportal";
$actsmbl = array('pass' => '<font color="green" size="4">&#x2714;</font>&nbsp;Pass',
@@ -160,16 +184,18 @@ if ($_GET['act'] == "del") {
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('passthrumac'))
+if (is_subsystem_dirty('passthrumac')) {
print_info_box_np(gettext("The captive portal MAC address configuration has been changed.<br />You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
-$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), true, "services_captiveportal_mac.php?zone={$cpzone}");
-$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
@@ -203,8 +229,8 @@ foreach ($a_cp[$cpzone]['passthrumac'] as $mac): ?>
<?=htmlspecialchars($mac['descr'])?>
</td>
<td>
- <a href="services_captiveportal_mac_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i?>" class="btn btn-xs btn-info">Edit</a>
- <a href="services_captiveportal_mac.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">Delete</a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit MAC address"); ?>" href="services_captiveportal_mac_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete MAC address")?>" href="services_captiveportal_mac.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -213,19 +239,24 @@ endforeach; ?>
<tbody>
</table>
<?php
-else :
+else:
?>
</tbody>
</table>
<?php
endif;
?>
- <nav class="action-buttons">
- <a href="services_captiveportal_mac_edit.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success">Add</a>
- </nav>
</div>
-<?php
-print_info_box(gettext('Adding MAC addresses as "pass" MACs allows them access through the captive portal automatically without being taken to the portal page.'));
+<nav class="action-buttons">
+ <a href="services_captiveportal_mac_edit.php?zone=<?=$cpzone?>&amp;act=add" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
+<div id="infoblock">
+ <?=print_info_box(gettext('Adding MAC addresses as "pass" MACs allows them access through the captive portal automatically without being taken to the portal page.'), info)?>
+</div>
+<?php
include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_mac_edit.php b/src/usr/local/www/services_captiveportal_mac_edit.php
index baa4d9c..762c608 100644
--- a/src/usr/local/www/services_captiveportal_mac_edit.php
+++ b/src/usr/local/www/services_captiveportal_mac_edit.php
@@ -1,40 +1,65 @@
<?php
/*
services_captiveportal_mac_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2004 Dinesh Nair <dinesh@alphaque.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004 Dinesh Nair <dinesh@alphaque.com>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-editmacaddresses
-##|*NAME=Services: Captive portal: Edit MAC Addresses page
+##|*NAME=Services: Captive portal: Edit MAC Addresses
##|*DESCR=Allow access to the 'Services: Captive portal: Edit MAC Addresses' page.
##|*MATCH=services_captiveportal_mac_edit.php*
##|-PRIV
@@ -58,7 +83,7 @@ require("captiveportal.inc");
global $cpzone;
global $cpzoneid;
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit MAC address rules"));
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit MAC address rules"));
$shortcut_section = "captiveportal";
$cpzone = $_GET['zone'];
@@ -128,6 +153,12 @@ if ($_POST) {
if ($_POST['bw_down'] && !is_numeric($_POST['bw_down'])) {
$input_errors[] = gettext("Download speed needs to be an integer");
}
+ if ($_POST['bw_up'] && ($_POST['bw_up'] > 999999 || $_POST['bw_up'] < 1)) {
+ $input_errors[] = gettext("Upload speed must be between 1 and 999999");
+ }
+ if ($_POST['bw_down'] && ($_POST['bw_down'] > 999999 || $_POST['bw_down'] < 1)) {
+ $input_errors[] = gettext("Download speed must be between 1 and 999999");
+ }
foreach ($a_passthrumacs as $macent) {
if (isset($id) && ($a_passthrumacs[$id]) && ($a_passthrumacs[$id] === $macent)) {
@@ -186,14 +217,13 @@ if ($_POST) {
// Get the MAC address
$ip = $_SERVER['REMOTE_ADDR'];
$mymac = `/usr/sbin/arp -an | grep '('{$ip}')' | head -n 1 | cut -d" " -f4`;
-$mymac = str_replace("\n","",$mymac);
+$mymac = str_replace("\n", "", $mymac);
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -270,9 +300,9 @@ $form->add($section);
print($form);
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Make the ‘Copy My MAC’ button a plain button, not a submit button
$("#btnmymac").prop('type','button');
@@ -284,4 +314,4 @@ events.push(function(){
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php
index 2191e82..100e4cc 100644
--- a/src/usr/local/www/services_captiveportal_vouchers.php
+++ b/src/usr/local/www/services_captiveportal_vouchers.php
@@ -4,8 +4,7 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2 007 Marcel Wiget <mwiget@mac.com>
+ * Copyright (c) 2007 Marcel Wiget <mwiget@mac.com>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,14 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/bin/voucher /usr/bin/openssl
- pfSense_MODULE: captiveportal
-*/
##|+PRIV
##|*IDENT=page-services-captiveportal-vouchers
-##|*NAME=Services: Captive portal Vouchers page
+##|*NAME=Services: Captive portal Vouchers
##|*DESCR=Allow access to the 'Services: Captive portal Vouchers' page.
##|*MATCH=services_captiveportal_vouchers.php*
##|-PRIV
@@ -79,8 +74,9 @@ require_once("voucher.inc");
$cpzone = $_GET['zone'];
-if (isset($_POST['zone']))
- $cpzone = $_POST['zone'];
+if (isset($_POST['zone'])) {
+ $cpzone = $_POST['zone'];
+}
if (empty($cpzone)) {
header("Location: services_captiveportal_zones.php");
@@ -112,7 +108,7 @@ if (empty($a_cp[$cpzone])) {
exit;
}
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Vouchers"), $a_cp[$cpzone]['zone']);
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), "Zone " . $a_cp[$cpzone]['zone'], gettext("Vouchers"));
$shortcut_section = "captiveportal-vouchers";
if (!is_array($config['voucher'][$cpzone]['roll'])) {
@@ -282,6 +278,9 @@ if ($_POST) {
if ($_POST['vouchersyncdbip'] && (is_ipaddr_configured($_POST['vouchersyncdbip']))) {
$input_errors[] = gettext("You cannot sync the voucher database to this host (itself).");
}
+ if ($_POST['vouchersyncpass'] != $_POST['vouchersyncpass_confirm']) {
+ $input_errors[] = gettext("Password and confirmed password must match.");
+ }
}
if (!$input_errors) {
@@ -317,15 +316,19 @@ if ($_POST) {
$newvoucher['vouchersyncdbip'] = $_POST['vouchersyncdbip'];
$newvoucher['vouchersyncport'] = $_POST['vouchersyncport'];
$newvoucher['vouchersyncusername'] = $_POST['vouchersyncusername'];
- $newvoucher['vouchersyncpass'] = $_POST['vouchersyncpass'];
+ if ($_POST['vouchersyncpass'] != DMYPWD ) {
+ $newvoucher['vouchersyncpass'] = $_POST['vouchersyncpass'];
+ } else {
+ $newvoucher['vouchersyncpass'] = $config['voucher'][$cpzone]['vouchersyncpass'];
+ }
if ($newvoucher['vouchersyncpass'] && $newvoucher['vouchersyncusername'] &&
- $newvoucher['vouchersyncport'] && $newvoucher['vouchersyncdbip']) {
+ $newvoucher['vouchersyncport'] && $newvoucher['vouchersyncdbip']) {
// Synchronize the voucher DB from the master node
require_once("xmlrpc.inc");
$protocol = "http";
if (is_array($config['system']) && is_array($config['system']['webgui']) && !empty($config['system']['webgui']['protocol']) &&
- $config['system']['webgui']['protocol'] == "https") {
+ $config['system']['webgui']['protocol'] == "https") {
$protocol = "https";
}
if ($protocol == "https" || $newvoucher['vouchersyncport'] == "443") {
@@ -421,19 +424,20 @@ EOF;
}
}
}
-$closehead = false;
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg. 'success');
+}
$tab_array = array();
-$tab_array[] = array(gettext("Captive portal(s)"), false, "services_captiveportal.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}");
$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}");
-$tab_array[] = array(gettext("Allowed IP addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
+$tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}");
$tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}");
$tab_array[] = array(gettext("Vouchers"), true, "services_captiveportal_vouchers.php?zone={$cpzone}");
$tab_array[] = array(gettext("File Manager"), false, "services_captiveportal_filemanager.php?zone={$cpzone}");
@@ -458,7 +462,7 @@ display_top_tabs($tab_array, true);
<tbody>
<?php
$i = 0;
-foreach($a_roll as $rollent):
+foreach ($a_roll as $rollent):
?>
<tr>
<td>
@@ -475,9 +479,9 @@ foreach($a_roll as $rollent):
</td>
<td>
<!-- These buttons are hidden/shown on checking the 'enable' checkbox -->
- <a href="services_captiveportal_vouchers_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i; ?>" class="btn btn-info btn-xs"><?=gettext("Edit")?></a>
- <a href="services_captiveportal_vouchers.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i; ?>" class="btn btn-danger btn-xs"><?=gettext("Delete")?></a>
- <a href="services_captiveportal_vouchers.php?zone=<?=$cpzone?>&amp;act=csv&amp;id=<?=$i; ?>" class="btn btn-success btn-xs" data-toggle="tooltip" title="Export vouchers for this roll to a .csv file""><?=gettext("Export")?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit voucher roll"); ?>" href="services_captiveportal_vouchers_edit.php?zone=<?=$cpzone?>&amp;id=<?=$i; ?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete voucher roll")?>" href="services_captiveportal_vouchers.php?zone=<?=$cpzone?>&amp;act=del&amp;id=<?=$i; ?>"></a>
+ <a class="fa fa-file-excel-o" title="<?=gettext("Export vouchers for this roll to a .csv file")?>" href="services_captiveportal_vouchers.php?zone=<?=$cpzone?>&amp;act=csv&amp;id=<?=$i; ?>"></a>
</td>
</tr>
<?php
@@ -493,13 +497,14 @@ endforeach;
if ($pconfig['enable']) : ?>
<nav class="action-buttons">
- <a href="services_captiveportal_vouchers_edit.php?zone=<?=$cpzone?>" class="btn btn-success"><?=gettext("Add Voucher")?></a>
+ <a href="services_captiveportal_vouchers_edit.php?zone=<?=$cpzone?>" class="btn btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
<?php
endif;
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('Create, generate and activate Rolls with Vouchers');
@@ -516,13 +521,13 @@ $form->add($section);
$section = new Form_Section('Create, generate and activate Rolls with Vouchers');
$section->addClass('rolledit');
-$section->addInput(new Form_TextArea(
+$section->addInput(new Form_Textarea(
'publickey',
'Voucher Public Key',
$pconfig['publickey']
))->setHelp('Paste an RSA public key (64 Bit or smaller) in PEM format here. This key is used to decrypt vouchers.');
-$section->addInput(new Form_TextArea(
+$section->addInput(new Form_Textarea(
'privatekey',
'Voucher Private Key',
$pconfig['privatekey']
@@ -607,11 +612,11 @@ $section->addInput(new Form_Input(
$pconfig['vouchersyncusername']
))->setHelp('This is the username of the master voucher nodes webConfigurator.');
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'vouchersyncpass',
'Voucher sync password',
'password',
- $pconfig['vouchersyncuserpass']
+ $pconfig['vouchersyncpass']
))->setHelp('This is the password of the master voucher nodes webConfigurator.');
$section->addInput(new Form_Input(
@@ -634,28 +639,31 @@ print($form);
<div class="rolledit">
<?php
print_info_box(gettext('Changing any Voucher parameter (apart from managing the list of Rolls) on this page will render existing vouchers useless if they were generated with different settings. ' .
- 'Specifying the Voucher Database Synchronization options will not record any other value from the other options. They will be retrieved/synced from the master.'));
+ 'Specifying the Voucher Database Synchronization options will not record any other value from the other options. They will be retrieved/synced from the master.'), info);
?>
</div>
-<script>
-events.push(function(){
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
// Hides all elements of the specified class. This will usually be a section or group
function hideClass(s_class, hide) {
- if(hide)
+ if (hide) {
$('.' + s_class).hide();
- else
+ } else {
$('.' + s_class).show();
+ }
}
function setShowHide (show) {
hideClass('rolledit', !show);
- if(show)
+ if (show) {
$('td:nth-child(5),th:nth-child(5)').show();
- else
+ } else {
$('td:nth-child(5),th:nth-child(5)').hide();
+ }
}
// Show/hide on checkbox change
@@ -667,12 +675,12 @@ events.push(function(){
setShowHide($('#enable').is(":checked"));
var generateButton = $('<a class="btn btn-xs btn-default">Generate new keys</a>');
- generateButton.on('click', function(){
+ generateButton.on('click', function() {
$.ajax({
type: 'get',
url: 'services_captiveportal_vouchers.php?generatekey=true',
dataType: 'json',
- success: function(data){
+ success: function(data) {
$('#publickey').val(data.public.replace(/\\n/g, '\n'));
$('#privatekey').val(data.private.replace(/\\n/g, '\n'));
}
@@ -680,6 +688,6 @@ events.push(function(){
});
generateButton.appendTo($('#publickey + .help-block')[0]);
});
-
+//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php
index fee3a4e..1508b5d 100644
--- a/src/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -1,39 +1,62 @@
<?php
/*
services_captiveportal_vouchers_edit.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Marcel Wiget <mwiget@mac.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-voucher-edit
-##|*NAME=Services: Captive portal Voucher Rolls page
+##|*NAME=Services: Captive portal Voucher Rolls
##|*DESCR=Allow access to the 'Services: Captive portal Edit Voucher Rolls' page.
##|*MATCH=services_captiveportal_vouchers_edit.php*
##|-PRIV
@@ -45,7 +68,7 @@ require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit Voucher Rolls"));
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit Voucher Rolls"));
$shortcut_section = "captiveportal-vouchers";
$cpzone = $_GET['zone'];
@@ -104,6 +127,9 @@ if ($_POST) {
// Look for duplicate roll #
foreach ($a_roll as $re) {
+ if (isset($id) && $a_roll[$id] && $a_roll[$id] === $re) {
+ continue;
+ }
if ($re['number'] == $_POST['number']) {
$input_errors[] = sprintf(gettext("Roll number %s already exists."), $_POST['number']);
break;
@@ -139,11 +165,11 @@ if ($_POST) {
if ($_POST['count'] != $rollent['count']) {
$rollent['count'] = $_POST['count'];
$len = ($rollent['count']>>3) + 1; // count / 8 +1
- $rollent['used'] = base64_encode(str_repeat("\000",$len)); // 4 bitmask
+ $rollent['used'] = base64_encode(str_repeat("\000", $len)); // 4 bitmask
$rollent['active'] = array();
voucher_write_used_db($rollent['number'], $rollent['used']);
voucher_write_active_db($rollent['number'], array()); // create empty DB
- voucher_log(LOG_INFO,sprintf(gettext('All %1$s vouchers from Roll %2$s marked unused'), $rollent['count'], $rollent['number']));
+ voucher_log(LOG_INFO, sprintf(gettext('All %1$s vouchers from Roll %2$s marked unused'), $rollent['count'], $rollent['number']));
} else {
// existing roll has been modified but without changing the count
// read active and used DB from ramdisk and store it in XML config
@@ -151,7 +177,7 @@ if ($_POST) {
$activent = array();
$db = array();
$active_vouchers = voucher_read_active_db($rollent['number'], $rollent['minutes']);
- foreach($active_vouchers as $voucher => $line) {
+ foreach ($active_vouchers as $voucher => $line) {
list($timestamp, $minutes) = explode(",", $line);
$activent['voucher'] = $voucher;
$activent['timestamp'] = $timestamp;
@@ -163,10 +189,11 @@ if ($_POST) {
unlock($voucherlck);
- if (isset($id) && $a_roll[$id])
+ if (isset($id) && $a_roll[$id]) {
$a_roll[$id] = $rollent;
- else
+ } else {
$a_roll[] = $rollent;
+ }
write_config();
@@ -177,13 +204,13 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -237,4 +264,4 @@ if (isset($id) && $a_roll[$id]) {
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_captiveportal_zones.php b/src/usr/local/www/services_captiveportal_zones.php
index d69577e..bcf15fc 100644
--- a/src/usr/local/www/services_captiveportal_zones.php
+++ b/src/usr/local/www/services_captiveportal_zones.php
@@ -1,36 +1,61 @@
<?php
/*
services_captiveportal_zones.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-zones
-##|*NAME=Services: Captive portal Zones page
+##|*NAME=Services: Captive portal Zones
##|*DESCR=Allow access to the 'Services: Captive portal Zones' page.
##|*MATCH=services_captiveportal_zones.php*
##|-PRIV
@@ -65,22 +90,21 @@ if ($_GET['act'] == "del" && !empty($_GET['zone'])) {
exit;
}
-$pgtitle = array(gettext("Captive Portal"), gettext("Zones"));
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Zones"));
$shortcut_section = "captiveportal";
include("head.inc");
-?>
-
-<html>
- <body>
- <form action="services_captiveportal_zones.php" method="post">
- <?php if ($savemsg) print_info_box($savemsg); ?>
- <?php if (is_subsystem_dirty('captiveportal')): ?><p>
- <?php print_info_box_np(gettext("The CaptivePortal entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));?>
- <?php endif; ?>
+if ($savemsg) {
+ print_info_box($savemsg, success);
+}
- <div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('Captive portal Zones')?></h2></div>
+if (is_subsystem_dirty('captiveportal')) {
+ print_info_box_np(gettext("The Captive Portal entry list has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
+?>
+<form action="services_captiveportal_zones.php" method="post">
+ <div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('Captive Portal Zones')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover">
<thead>
@@ -89,11 +113,11 @@ include("head.inc");
<th><?=gettext('Interfaces')?></th>
<th><?=gettext('Number of users'); ?></th>
<th><?=gettext('Description'); ?></th>
- <th><!-- Action buttons --></th>
+ <th><?=gettext('Actions'); ?></th>
</tr>
</thead>
<tbody>
-
+
<?php
foreach ($a_cp as $cpzone => $cpitem):
if (!is_array($cpitem)) {
@@ -113,8 +137,8 @@ include("head.inc");
<td><?=count(captiveportal_read_db());?></td>
<td><?=htmlspecialchars($cpitem['descr']);?>&nbsp;</td>
<td>
- <a type="button" class="btn btn-info btn-xs" href="services_captiveportal.php?zone=<?=$cpzone?>"><?=gettext('Edit')?></a>
- <a type="button" class="btn btn-danger btn-xs" href="services_captiveportal_zones.php?act=del&amp;zone=<?=$cpzone;?>"><?=gettext('Del')?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit zone"); ?>" href="services_captiveportal.php?zone=<?=$cpzone?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete zone")?>" href="services_captiveportal_zones.php?act=del&amp;zone=<?=$cpzone;?>"></a>
</td>
</tr>
<?php
@@ -123,14 +147,14 @@ include("head.inc");
</tbody>
</table>
</div>
-
- <nav class="action-buttons">
- <a href="services_captiveportal_zones_edit.php" class="btn btn-success"><?=gettext('Add')?></a>
- </nav>
-
- </div>
- </form>
- </body>
-</html>
+ </div>
+</form>
+
+<nav class="action-buttons">
+ <a href="services_captiveportal_zones_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+</nav>
<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/services_captiveportal_zones_edit.php b/src/usr/local/www/services_captiveportal_zones_edit.php
index ed0c36d..fb278bb 100644
--- a/src/usr/local/www/services_captiveportal_zones_edit.php
+++ b/src/usr/local/www/services_captiveportal_zones_edit.php
@@ -1,38 +1,61 @@
<?php
/*
services_captiveportal_zones_edit.php
- Copyright (C) 2011 Ermal Luçi
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-captiveportal-editzones
-##|*NAME=Services: Captive portal: Edit Zones page
+##|*NAME=Services: Captive portal: Edit Zones
##|*DESCR=Allow access to the 'Services: Captive portal: Edit Zones' page.
##|*MATCH=services_captiveportal_zones_edit.php*
##|-PRIV
@@ -43,7 +66,7 @@ require_once("filter.inc");
require("shaper.inc");
require("captiveportal.inc");
-$pgtitle = array(gettext("Services"), gettext("Captive portal"), gettext("Edit Zones"));
+$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Add Zone"));
$shortcut_section = "captiveportal";
if (!is_array($config['captiveportal'])) {
@@ -87,17 +110,16 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(new Form_Button(
'submit',
'Continue'
));
-$section = new Form_Section('Edit Captive Portal Zones');
+$section = new Form_Section('Add Captive Portal Zone');
$section->addInput(new Form_Input(
'zone',
@@ -113,4 +135,4 @@ $form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index 43a17c1..a30a488 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -1,12 +1,12 @@
<?php
-/* $Id$ */
/*
services_dhcp.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -55,20 +55,18 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-services-dhcpserver
-##|*NAME=Services: DHCP server page
-##|*DESCR=Allow access to the 'Services: DHCP server' page.
+##|*NAME=Services: DHCP Server
+##|*DESCR=Allow access to the 'Services: DHCP Server' page.
##|*MATCH=services_dhcp.php*
##|-PRIV
require("guiconfig.inc");
require_once("filter.inc");
+require_once('rrd.inc');
+require_once("shaper.inc");
if (!$g['services_dhcp_server_enable']) {
header("Location: /");
@@ -97,7 +95,7 @@ if (!$if || !isset($iflist[$if])) {
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
if ((is_array($config['dhcpd'][$ifent]) && !isset($config['dhcpd'][$ifent]['enable']) && (!is_ipaddrv4($oc['ipaddr']))) ||
- (!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr'])))) {
+ (!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr'])))) {
continue;
}
@@ -201,6 +199,7 @@ if (is_array($dhcpdconf)) {
$pconfig['rootpath'] = $dhcpdconf['rootpath'];
$pconfig['netmask'] = $dhcpdconf['netmask'];
$pconfig['numberoptions'] = $dhcpdconf['numberoptions'];
+ $pconfig['statsgraph'] = $dhcpdconf['statsgraph'];
}
$ifcfgip = $config['interfaces'][$if]['ipaddr'];
@@ -308,7 +307,7 @@ if (isset($_POST['submit'])) {
$input_errors[] = gettext("A valid primary domain name server IP address must be specified for the dynamic domain name.");
}
if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) ||
- ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) {
+ ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) {
$input_errors[] = gettext("You must specify both a valid domain key and key name.");
}
if ($_POST['domainsearchlist']) {
@@ -404,15 +403,14 @@ if (isset($_POST['submit'])) {
$subnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
$subnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))));
- if ((ip2ulong($_POST['range_from']) < $subnet_start) || (ip2ulong($_POST['range_from']) > $subnet_end) ||
- (ip2ulong($_POST['range_to']) < $subnet_start) || (ip2ulong($_POST['range_to']) > $subnet_end)) {
- $input_errors[] = gettext("The specified range lies outside of the current subnet.");
- }
-
if (ip2ulong($_POST['range_from']) > ip2ulong($_POST['range_to'])) {
$input_errors[] = gettext("The range is invalid (first element higher than second element).");
}
+ if (ip2ulong($_POST['range_from']) < $subnet_start || ip2ulong($_POST['range_to']) > $subnet_end) {
+ $input_errors[] = gettext("The specified range lies outside of the current subnet.");
+ }
+
if (is_numeric($pool) || ($act == "newpool")) {
$rfrom = $config['dhcpd'][$if]['range']['from'];
$rto = $config['dhcpd'][$if]['range']['to'];
@@ -428,7 +426,7 @@ if (isset($_POST['submit'])) {
}
if (is_inrange_v4($_POST['range_from'], $p['range']['from'], $p['range']['to']) ||
- is_inrange_v4($_POST['range_to'], $p['range']['from'], $p['range']['to'])) {
+ is_inrange_v4($_POST['range_to'], $p['range']['from'], $p['range']['to'])) {
$input_errors[] = gettext("The specified range must not be within the range configured on a DHCP pool for this interface.");
break;
}
@@ -447,7 +445,7 @@ if (isset($_POST['submit'])) {
continue;
}
if ((ip2ulong($map['ipaddr']) > $dynsubnet_start) &&
- (ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
+ (ip2ulong($map['ipaddr']) < $dynsubnet_end)) {
$input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
break;
}
@@ -564,6 +562,11 @@ if (isset($_POST['submit'])) {
$dhcpdconf['filename32'] = $_POST['filename32'];
$dhcpdconf['filename64'] = $_POST['filename64'];
$dhcpdconf['rootpath'] = $_POST['rootpath'];
+ unset($dhcpdconf['statsgraph']);
+ if ($_POST['statsgraph']) {
+ $dhcpdconf['statsgraph'] = $_POST['statsgraph'];
+ enable_rrd_graphing();
+ }
// Handle the custom options rowhelper
if (isset($dhcpdconf['numberoptions']['item'])) {
@@ -645,7 +648,7 @@ if ($act == "del") {
}
}
-// Build an HTML table that can be inseted into a Form_StaticText element
+// Build an HTML table that can be inserted into a Form_StaticText element
function build_pooltable() {
global $a_pools;
@@ -691,17 +694,18 @@ function build_pooltable() {
return($pooltbl);
}
-$closehead = false;
-$pgtitle = array(gettext("Services"), gettext("DHCP server"));
+$pgtitle = array(gettext("Services"), gettext("DHCP Server"));
$shortcut_section = "dhcp";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
if (isset($config['dhcrelay']['enable'])) {
print_info_box(gettext("DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface."));
@@ -709,8 +713,9 @@ if (isset($config['dhcrelay']['enable'])) {
exit;
}
-if (is_subsystem_dirty('staticmaps'))
+if (is_subsystem_dirty('staticmaps')) {
print_info_box_np(gettext("The static mapping configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
/* active tabs */
$tab_array = array();
@@ -720,7 +725,7 @@ $i = 0;
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
if ((is_array($config['dhcpd'][$ifent]) && !isset($config['dhcpd'][$ifent]['enable']) && (!is_ipaddrv4($oc['ipaddr']))) ||
- (!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr'])))) {
+ (!is_array($config['dhcpd'][$ifent]) && (!is_ipaddrv4($oc['ipaddr'])))) {
continue;
}
@@ -742,8 +747,6 @@ if ($tabscounter == 0) {
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
// This form uses a non-standard submit button name
$form = new Form(new Form_Button(
'submit',
@@ -793,10 +796,10 @@ $section->addInput(new Form_StaticText(
));
// Compose a string to display the required address ranges
-$range_from = ip2long(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
+$range_from = ip2long(gen_subnetv4($ifcfgip, $ifcfgsn));
$range_from++;
-$range_to = ip2long(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))));
+$range_to = ip2long(gen_subnetv4_max($ifcfgip, $ifcfgsn));
$range_to--;
$rangestr = long2ip32($range_from) . ' - ' . long2ip32($range_to);
@@ -884,7 +887,7 @@ $section->addInput(new Form_IpAddress(
$pconfig['wins2']
))->setPattern('[.a-zA-Z0-9_]+')->setAttribute('placeholder', 'WINS Server 2');
-for($idx=1; $idx<=4; $idx++) {
+for ($idx=1; $idx<=4; $idx++) {
$section->addInput(new Form_IpAddress(
'dns' . $idx,
($idx == 1) ? 'DNS servers':null,
@@ -946,7 +949,7 @@ if (!is_numeric($pool) && !($act == "newpool")) {
'Static ARP',
'Enable Static ARP entries',
$pconfig['staticarp']
- ))->setHelp('This option persists even if DHCP server is disabled. Only the machines listed below will be able to communicate with the firewall on this NIC.');
+ ))->setHelp('This option persists even if DHCP server is disabled. Only the machines listed below will be able to communicate with the firewall on this interface.');
$section->addInput(new Form_Checkbox(
'dhcpleaseinlocaltime',
@@ -955,6 +958,12 @@ if (!is_numeric($pool) && !($act == "newpool")) {
$pconfig['dhcpleaseinlocaltime']
))->setHelp('By default DHCP leases are displayed in UTC time. By checking this box DHCP lease time will be displayed in local time and set to the time zone selected.' .
' This will be used for all DHCP interfaces lease time');
+ $section->addInput(new Form_Checkbox(
+ 'statsgraph',
+ 'Statistics graphs',
+ 'Enable RRD statistics graphs',
+ $pconfig['statsgraph']
+ ))->setHelp('Enable this to add DHCP leases statistics to the RRD graphs. Disabled by default.');
}
// DDNS
@@ -980,7 +989,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Input(
'ddnsdomain',
'DDNS Domain',
- 'number',
+ 'text',
$pconfig['ddnsdomain']
))->setHelp('Leave blank to disable dynamic DNS registration.' . '<br />' .
'Enter the dynamic DNS domain which will be used to register client names in the DNS server.');
@@ -1047,15 +1056,15 @@ $section->addInput(new Form_StaticText(
$section->addInput(new Form_IpAddress(
'ntp1',
- 'Allow',
+ null,
$pconfig['ntp1']
-));
+))->setAttribute('placeholder', 'NTP Server 1');
$section->addInput(new Form_IpAddress(
'ntp2',
- 'Deny',
+ null,
$pconfig['ntp2']
-));
+))->setAttribute('placeholder', 'NTP Server 2');
// Advanced TFTP
$btnadv = new Form_Button(
@@ -1072,7 +1081,7 @@ $section->addInput(new Form_StaticText(
$section->addInput(new Form_IpAddress(
'tftp',
- 'Allow',
+ null,
$pconfig['tftp']
))->setHelp('Leave blank to disable. Enter a full hostname or IP for the TFTP server')->setPattern('[.a-zA-Z0-9_]+');
@@ -1175,7 +1184,7 @@ $section->addInput(new Form_StaticText(
'For a list of available options please visit this ') . '<a href="http://www.iana.org/assignments/bootp-dhcp-parameters/" target="_blank">' . gettext("URL") . '</a></div>'
));
-if(!$pconfig['numberoptions']) {
+if (!$pconfig['numberoptions']) {
$pconfig['numberoptions']['item'] = array(array('number' => '', 'type' => 'text', 'value' => ''));
}
@@ -1270,7 +1279,7 @@ if (!is_numeric($pool) && !($act == "newpool")) {
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext("DHCP Static Mappings for this interface.")?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext("DHCP Static Mappings for this interface")?></h2></div>
<div class="table-responsive">
<table class="table table-striped table-hover table-condensed">
<thead>
@@ -1294,7 +1303,7 @@ if (!is_numeric($pool) && !($act == "newpool")) {
<tr>
<td align="center" ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if)?>&amp;id=<?=$i?>';">
<?php if (isset($mapent['arp_table_static_entry'])): ?>
- <i class="icon icon-ok"></i>
+ <i class="fa fa-check"></i>
<?php endif; ?>
</td>
<td ondblclick="document.location='services_dhcp_edit.php?if=<?=htmlspecialchars($if)?>&amp;id=<?=$i?>';">
@@ -1310,8 +1319,8 @@ if (!is_numeric($pool) && !($act == "newpool")) {
<?=htmlspecialchars($mapent['descr'])?>
</td>
<td>
- <a class="btn btn-xs btn-info" href="services_dhcp_edit.php?if=<?=htmlspecialchars($if)?>&amp;id=<?=$i?>"><?=gettext('Edit')?></a>
- <a class="btn btn-xs btn-danger" href="services_dhcp.php?if=<?=htmlspecialchars($if)?>&amp;act=del&amp;id=<?=$i?>"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit static mapping')?>" href="services_dhcp_edit.php?if=<?=htmlspecialchars($if)?>&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete static mapping')?>" href="services_dhcp.php?if=<?=htmlspecialchars($if)?>&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -1322,21 +1331,23 @@ if (!is_numeric($pool) && !($act == "newpool")) {
<?php
}
?>
- <table>
+ </table>
</div>
-
- <nav class="action-buttons">
- <br />
- <a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if)?>" class="btn btn-sm btn-success"><?=gettext("Add")?></a>
- </nav>
</div>
+
+<nav class="action-buttons">
+ <a href="services_dhcp_edit.php?if=<?=htmlspecialchars($if)?>" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
<?php
}
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Show advanced DNS options ======================================================================================
var showadvdns = false;
@@ -1344,12 +1355,13 @@ events.push(function(){
function show_advdns() {
<?php
if (!$pconfig['ddnsupdate'] && empty($pconfig['ddnsdomain']) && empty($pconfig['ddnsdomainprimary']) &&
- empty($pconfig['ddnsdomainkeyname']) && empty($pconfig['ddnsdomainkey']))
+ empty($pconfig['ddnsdomainkeyname']) && empty($pconfig['ddnsdomainkey'])) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideCheckbox('ddnsupdate', !showadvdns && !hide);
hideInput('ddnsdomain', !showadvdns && !hide);
@@ -1371,12 +1383,13 @@ events.push(function(){
function show_advmac() {
<?php
- if (empty($pconfig['mac_allow']) && empty($pconfig['mac_deny']))
+ if (empty($pconfig['mac_allow']) && empty($pconfig['mac_deny'])) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideInput('mac_allow', !showadvmac && !hide);
hideInput('mac_deny', !showadvmac && !hide);
@@ -1396,12 +1409,13 @@ events.push(function(){
function show_advntp() {
<?php
- if (empty($pconfig['ntp1']) && empty($pconfig['ntp2']))
+ if (empty($pconfig['ntp1']) && empty($pconfig['ntp2'])) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideInput('ntp1', !showadvntp && !hide);
hideInput('ntp2', !showadvntp && !hide);
@@ -1421,12 +1435,13 @@ events.push(function(){
function show_advtftp() {
<?php
- if (empty($pconfig['tftp']))
+ if (empty($pconfig['tftp'])) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideInput('tftp', !showadvtftp && !hide);
hideInput('btnadvtftp', hide);
@@ -1445,12 +1460,13 @@ events.push(function(){
function show_advldap() {
<?php
- if (empty($pconfig['ldap']))
+ if (empty($pconfig['ldap'])) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideInput('ldap', !showadvldap && !hide);
hideInput('btnadvldap', hide);
@@ -1470,12 +1486,13 @@ events.push(function(){
function show_advboot() {
<?php
if (!$pconfig['netboot'] && empty($pconfig['nextserver']) && empty($pconfig['filename']) && empty($pconfig['filename32']) &&
- empty($pconfig['filename64']) && empty($pconfig['rootpath']))
+ empty($pconfig['filename64']) && empty($pconfig['rootpath'])) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideCheckbox('netboot', !showadvboot && !hide);
hideInput('nextserver', !showadvboot && !hide);
@@ -1499,13 +1516,14 @@ events.push(function(){
function show_advopts() {
<?php
- if ( empty($pconfig['numberoptions']) ||
- (empty($pconfig['numberoptions']['item'][0]['number']) && (empty($pconfig['numberoptions']['item'][0]['value']))))
+ if (empty($pconfig['numberoptions']) ||
+ (empty($pconfig['numberoptions']['item'][0]['number']) && (empty($pconfig['numberoptions']['item'][0]['value'])))) {
$hide = false;
- else
+ } else {
$hide = true;
+ }
?>
- var hide = <?php if($hide) {echo 'true';} else {echo 'false';} ?>;
+ var hide = <?php if ($hide) {echo 'true';} else {echo 'false';} ?>;
hideClass('adnlopts', !showadvopts && !hide);
hideInput('btnadvopts', hide);
@@ -1528,8 +1546,11 @@ events.push(function(){
show_advldap();
show_advboot();
show_advopts();
+
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
});
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php
index 3d54a0c..303833c 100644
--- a/src/usr/local/www/services_dhcp_edit.php
+++ b/src/usr/local/www/services_dhcp_edit.php
@@ -1,43 +1,65 @@
<?php
-/* $Id$ */
/*
services_dhcp_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/arp
- pfSense_MODULE: dhcpserver
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dhcpserver-editstaticmapping
-##|*NAME=Services: DHCP Server : Edit static mapping page
-##|*DESCR=Allow access to the 'Services: DHCP Server : Edit static mapping' page.
+##|*NAME=Services: DHCP Server: Edit static mapping
+##|*DESCR=Allow access to the 'Services: DHCP Server: Edit static mapping' page.
##|*MATCH=services_dhcp_edit.php*
##|-PRIV
@@ -62,8 +84,9 @@ require("guiconfig.inc");
$if = $_GET['if'];
-if ($_POST['if'])
+if ($_POST['if']) {
$if = $_POST['if'];
+}
if (!$if) {
header("Location: services_dhcp.php");
@@ -229,12 +252,21 @@ if ($_POST) {
}
}
- $lansubnet_start = ip2ulong(long2ip32(ip2long($ifcfgip) & gen_subnet_mask_long($ifcfgsn)));
- $lansubnet_end = ip2ulong(long2ip32(ip2long($ifcfgip) | (~gen_subnet_mask_long($ifcfgsn))));
- if ((ip2ulong($_POST['ipaddr']) < $lansubnet_start) ||
- (ip2ulong($_POST['ipaddr']) > $lansubnet_end)) {
+ $lansubnet_start = ip2ulong(gen_subnetv4($ifcfgip, $ifcfgsn));
+ $lansubnet_end = ip2ulong(gen_subnetv4_max($ifcfgip, $ifcfgsn));
+ $ipaddr_int = ip2ulong($_POST['ipaddr']);
+ if (($ipaddr_int < $lansubnet_start) ||
+ ($ipaddr_int > $lansubnet_end)) {
$input_errors[] = sprintf(gettext("The IP address must lie in the %s subnet."), $ifcfgdescr);
}
+
+ if ($ipaddr_int == $lansubnet_start) {
+ $input_errors[] = sprintf(gettext("The IP address cannot be the %s network address."), $ifcfgdescr);
+ }
+
+ if ($ipaddr_int == $lansubnet_end) {
+ $input_errors[] = sprintf(gettext("The IP address cannot be the %s broadcast address."), $ifcfgdescr);
+ }
}
if (($_POST['gateway'] && !is_ipaddrv4($_POST['gateway']))) {
@@ -376,18 +408,16 @@ if ($_POST) {
// Get our MAC address
$ip = $_SERVER['REMOTE_ADDR'];
$mymac = `/usr/sbin/arp -an | grep '('{$ip}')' | cut -d" " -f4`;
-$mymac = str_replace("\n","",$mymac);
+$mymac = str_replace("\n", "", $mymac);
-$closehead = false;
$pgtitle = array(gettext("Services"), gettext("DHCP"), gettext("Edit static mapping"));
$shortcut_section = "dhcp";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -435,7 +465,7 @@ $section->addInput(new Form_Input(
$pconfig['hostname']
))->setHelp('Name of the host, without domain part.');
-if($netboot_enabled) {
+if ($netboot_enabled) {
$section->addInput(new Form_Input(
'filename',
'Netboot filename',
@@ -660,9 +690,9 @@ $form->add($section);
print($form);
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function hideDDNS(hide) {
hideCheckbox('ddnsupdate', hide);
diff --git a/src/usr/local/www/services_dhcp_relay.php b/src/usr/local/www/services_dhcp_relay.php
index aaa9c2a..ada2eae 100644
--- a/src/usr/local/www/services_dhcp_relay.php
+++ b/src/usr/local/www/services_dhcp_relay.php
@@ -3,12 +3,11 @@
services_dhcp_relay.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 22003-2004 Justin Ellison <justin@techadvise.com>
- * Copyright (c) 22010 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2004 Justin Ellison <justin@techadvise.com>
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -54,20 +53,16 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: dhcprelay
-*/
##|+PRIV
##|*IDENT=page-services-dhcprelay
-##|*NAME=Services: DHCP Relay page
+##|*NAME=Services: DHCP Relay
##|*DESCR=Allow access to the 'Services: DHCP Relay' page.
##|*MATCH=services_dhcp_relay.php*
##|-PRIV
require("guiconfig.inc");
-require_once('classes/Form.class.php');
-
+require_once("filter.inc");
$pconfig['enable'] = isset($config['dhcrelay']['enable']);
if (empty($config['dhcrelay']['interface'])) {
@@ -105,8 +100,9 @@ if (is_array($config['dhcpd'])) {
}
if ($_POST) {
+
unset($input_errors);
-
+
$pconfig = $_POST;
/* input validation */
@@ -117,16 +113,18 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
$svrlist = '';
-
+
if ($_POST['server']) {
- foreach($_POST['server'] as $checksrv => $srv) {
- if (!is_ipaddr($srv[0]))
+ foreach ($_POST['server'] as $checksrv => $srv) {
+ if (!is_ipaddr($srv[0])) {
$input_errors[] = gettext("A valid Destination Server IP address must be specified.");
-
- if(!empty($srv[0])) { // Filter out any empties
- if(!empty($svrlist))
+ }
+
+ if (!empty($srv[0])) { // Filter out any empties
+ if (!empty($svrlist)) {
$svrlist .= ',';
-
+ }
+
$svrlist .= $srv[0];
}
}
@@ -135,23 +133,22 @@ if ($_POST) {
// Now $svrlist is a comma separated list of servers ready to save to the config system
$pconfig['server'] = $svrlist;
-
+
if (!$input_errors) {
$config['dhcrelay']['enable'] = $_POST['enable'] ? true : false;
$config['dhcrelay']['interface'] = implode(",", $_POST['interface']);
$config['dhcrelay']['agentoption'] = $_POST['agentoption'] ? true : false;
- $config['dhcrelay']['server'] = $pconfig['server'];
+ $config['dhcrelay']['server'] = $svrlist;
write_config();
$retval = 0;
$retval = services_dhcrelay_configure();
$savemsg = get_std_save_message($retval);
-
+ filter_configure();
}
}
-$closehead = false;
$pgtitle = array(gettext("Services"), gettext("DHCP Relay"));
$shortcut_section = "dhcp";
include("head.inc");
@@ -162,11 +159,13 @@ if ($dhcpd_enabled) {
exit;
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$form = new Form;
@@ -191,7 +190,6 @@ $section->addInput(new Form_Checkbox(
'agentoption',
'',
'Append circuit ID and agent ID to requests',
- 'yes',
$pconfig['agentoption']
))->setHelp(
'If this is checked, the DHCP relay will append the circuit ID (%s interface number) and the agent ID to the DHCP request.',
@@ -199,25 +197,24 @@ $section->addInput(new Form_Checkbox(
);
//Small function to prevent duplicate code
-function createDestinationServerInputGroup($value = null)
-{
+function createDestinationServerInputGroup($value = null) {
$group = new Form_Group('Destination server');
$group->add(new Form_IpAddress(
'server',
'Destination server',
$value
- ))->setWidth(4)->setHelp(
- 'This is the IP address of the server to which DHCP requests are relayed.'
- )->setIsRepeated();
-
+ ))->setWidth(4)
+ ->setHelp('This is the IP address of the server to which DHCP requests are relayed.')
+ ->setIsRepeated();
+
$group->enableDuplication(null, true); // Buttons are in-line with the input
return $group;
}
-if (!isset($pconfig['server']) || count($pconfig['server']) < 1)
+if (!isset($pconfig['server']) || count($pconfig['server']) < 1) {
$section->add(createDestinationServerInputGroup());
-else {
+} else {
foreach (explode(',', $pconfig['server']) as $server) {
$section->add(createDestinationServerInputGroup($server));
}
@@ -226,4 +223,4 @@ else {
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php
index ed0048e..7f7a6b3 100644
--- a/src/usr/local/www/services_dhcpv6.php
+++ b/src/usr/local/www/services_dhcpv6.php
@@ -1,46 +1,65 @@
<?php
-/* $Id$ */
/*
services_dhcpv6.php
- parts of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- part of pfSense (https://www.pfsense.org)
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dhcpv6server
-##|*NAME=Services: DHCPv6 server page
+##|*NAME=Services: DHCPv6 server
##|*DESCR=Allow access to the 'Services: DHCPv6 server' page.
##|*MATCH=services_dhcpv6.php*
##|-PRIV
@@ -82,7 +101,7 @@ if (!$if || !isset($iflist[$if])) {
$oc = $config['interfaces'][$ifent];
if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
- (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
+ (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
continue;
}
$if = $ifent;
@@ -141,7 +160,7 @@ $dhcrelaycfg = $config['dhcrelay6'];
if (is_array($dhcrelaycfg)) {
foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) {
if (isset($dhcrelayifconf['enable']) && isset($iflist[$dhcrelayif]) &&
- (!link_interface_to_bridge($dhcrelayif))) {
+ (!link_interface_to_bridge($dhcrelayif))) {
$dhcrelay_enabled = true;
}
}
@@ -191,9 +210,9 @@ if ($_POST) {
$input_errors[] = gettext("A valid IPv6 address must be specified for the gateway.");
}
if (($_POST['dns1'] && !is_ipaddrv6($_POST['dns1'])) ||
- ($_POST['dns2'] && !is_ipaddrv6($_POST['dns2'])) ||
- ($_POST['dns3'] && !is_ipaddrv6($_POST['dns3'])) ||
- ($_POST['dns4'] && !is_ipaddrv6($_POST['dns4']))) {
+ ($_POST['dns2'] && !is_ipaddrv6($_POST['dns2'])) ||
+ ($_POST['dns3'] && !is_ipaddrv6($_POST['dns3'])) ||
+ ($_POST['dns4'] && !is_ipaddrv6($_POST['dns4']))) {
$input_errors[] = gettext("A valid IPv6 address must be specified for each of the DNS servers.");
}
@@ -210,7 +229,7 @@ if ($_POST) {
$input_errors[] = gettext("A valid primary domain name server IPv4 address must be specified for the dynamic domain name.");
}
if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) ||
- ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) {
+ ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) {
$input_errors[] = gettext("You must specify both a valid domain key and key name.");
}
if ($_POST['domainsearchlist']) {
@@ -262,7 +281,7 @@ if ($_POST) {
if (is_ipaddrv6($ifcfgip)) {
if ((!is_inrange_v6($_POST['range_from'], $subnet_start, $subnet_end)) ||
- (!is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) {
+ (!is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) {
$input_errors[] = gettext("The specified range lies outside of the current subnet.");
}
}
@@ -289,7 +308,7 @@ if ($_POST) {
continue;
}
if ((inet_pton($map['ipaddrv6']) > $dynsubnet_start) &&
- (inet_pton($map['ipaddrv6']) < $dynsubnet_end)) {
+ (inet_pton($map['ipaddrv6']) < $dynsubnet_end)) {
$input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings."));
break;
}
@@ -418,33 +437,35 @@ if ($_GET['act'] == "del") {
}
// Delete a row in the options table
-if($_GET['act'] == "delopt") {
+if ($_GET['act'] == "delopt") {
$idx = $_GET['id'];
- if($pconfig['numberoptions'] && is_array($pconfig['numberoptions']['item'][$idx])) {
+ if ($pconfig['numberoptions'] && is_array($pconfig['numberoptions']['item'][$idx])) {
unset($pconfig['numberoptions']['item'][$idx]);
}
}
// Add an option row
-if($_GET['act'] == "addopt") {
- if(!is_array($pconfig['numberoptions']['item']))
+if ($_GET['act'] == "addopt") {
+ if (!is_array($pconfig['numberoptions']['item'])) {
$pconfig['numberoptions']['item'] = array();
+ }
array_push($pconfig['numberoptions']['item'], array('number' => null, 'value' => null));
}
-$closehead = false;
-$pgtitle = array(gettext("Services"), gettext("DHCPv6 server"));
+$pgtitle = array(gettext("Services"), gettext("DHCPv6 Server"));
$shortcut_section = "dhcp6";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
if ($dhcrelay_enabled) {
print_info_box(gettext("DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface."), 'danger');
@@ -452,8 +473,9 @@ if ($dhcrelay_enabled) {
exit;
}
-if (is_subsystem_dirty('staticmaps'))
+if (is_subsystem_dirty('staticmaps')) {
print_info_box_np(gettext('The static mapping configuration has been changed') . '.<br />' . gettext('You must apply the changes in order for them to take effect.'));
+}
/* active tabs */
$tab_array = array();
@@ -464,14 +486,16 @@ foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
- if((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
- (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))))
+ if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
+ (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
continue;
+ }
- if ($ifent == $if)
+ if ($ifent == $if) {
$active = true;
- else
+ } else {
$active = false;
+ }
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
$tabscounter++;
@@ -480,15 +504,16 @@ foreach ($iflist as $ifent => $ifname) {
/* tack on PPPoE or PPtP servers here */
/* pppoe server */
if (is_array($config['pppoes']['pppoe'])) {
- foreach($config['pppoes']['pppoe'] as $pppoe) {
+ foreach ($config['pppoes']['pppoe'] as $pppoe) {
if ($pppoe['mode'] == "server") {
$ifent = "poes". $pppoe['pppoeid'];
$ifname = strtoupper($ifent);
- if ($ifent == $if)
+ if ($ifent == $if) {
$active = true;
- else
+ } else {
$active = false;
+ }
$tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
$tabscounter++;
@@ -502,12 +527,12 @@ if ($tabscounter == 0) {
exit;
}
+display_top_tabs($tab_array);
+
$tab_array = array();
$tab_array[] = array(gettext("DHCPv6 Server"), true, "services_dhcpv6.php?if={$if}");
$tab_array[] = array(gettext("Router Advertisements"), false, "services_router_advertisements.php?if={$if}");
-display_top_tabs($tab_array);
-
-require_once('classes/Form.class.php');
+display_top_tabs($tab_array, false, 'nav nav-tabs');
$form = new Form(new Form_Button(
'Submit',
@@ -523,7 +548,7 @@ $section->addInput(new Form_Checkbox(
$pconfig['enable']
))->toggles('.form-group:not(:first-child)');
-if(is_ipaddrv6($ifcfgip)) {
+if (is_ipaddrv6($ifcfgip)) {
$section->addInput(new Form_StaticText(
'Subnet',
@@ -541,10 +566,10 @@ if(is_ipaddrv6($ifcfgip)) {
));
}
-if($is_olsr_enabled) {
+if ($is_olsr_enabled) {
$section->addInput(new Form_Select(
'netmask',
- 'Subnetmask',
+ 'Subnet Mask',
$pconfig['netmask'],
array_combine(range(128, 1, -1), range(128, 1, -1))
));
@@ -576,19 +601,19 @@ $group->add($f2);
$section->add($group);
$f1 = new Form_Input(
- 'prefix_from',
+ 'prefixrange_from',
null,
'text',
- $pconfig['prefix_from']
+ $pconfig['prefixrange_from']
);
$f1->setHelp('To');
$f2 = new Form_Input(
- 'prefix_to',
+ 'prefixrange_to',
null,
'text',
- $pconfig['prefix_to']
+ $pconfig['prefixrange_to']
);
$f2->setHelp('From');
@@ -616,16 +641,17 @@ $section->addInput(new Form_Select(
$group = new Form_Group('DNS Servers');
-for($i=1;$i<=4; $i++) {
+for ($i=1;$i<=4; $i++) {
$group->add(new Form_input(
'dns' . $i,
null,
'text',
- $pconfig['dns' . $i]
- ))->setHelp('DNS ' . $i);
+ $pconfig['dns' . $i],
+ ['placeholder' => 'DNS ' . $i]
+ ));
}
-$group->setHelp('Leave blank to use the system default DNS servers,this interface\'s IP if DNS forwarder is enabled, or the servers configured on the "General" page.');
+$group->setHelp('Leave blank to use the system default DNS servers, this interface\'s IP if DNS forwarder is enabled, or the servers configured on the "General" page.');
$section->add($group);
$section->addInput(new Form_Input(
@@ -737,7 +763,7 @@ $group->add(new Form_Input(
$group->add(new Form_Input(
'ntp2',
- 'NTP Server 1',
+ 'NTP Server 2',
'text',
$pconfig['ntp2'],
['placeholder' => 'NTP 2']
@@ -775,7 +801,7 @@ $btnnetboot->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText(
'Network booting',
- $btnnetboot . '&nbsp;' . 'Show Netwok booting'
+ $btnnetboot . '&nbsp;' . 'Show Network booting'
));
$section->addInput(new Form_Checkbox(
@@ -801,18 +827,18 @@ $btnadnl->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText(
'Additional BOOTP/DHCP Options',
- $btnadnl . '&nbsp;' . 'Aditional BOOTP/DHCP Options'
+ $btnadnl . '&nbsp;' . 'Additional BOOTP/DHCP Options'
));
$form->add($section);
$title = 'Show Additional BOOTP/DHCP Options';
-if($pconfig['numberoptions']) {
+if ($pconfig['numberoptions']) {
$counter = 0;
$last = count($pconfig['numberoptions']['item']) - 1;
- foreach($pconfig['numberoptions']['item'] as $item) {
+ foreach ($pconfig['numberoptions']['item'] as $item) {
$group = new Form_Group(null);
$group->add(new Form_Input(
@@ -884,10 +910,10 @@ print_info_box(gettext('The DNS servers entered in ') . '<a href="system.php">'
</thead>
<tbody>
<?php
-if(is_array($a_maps)):
+if (is_array($a_maps)):
$i = 0;
foreach ($a_maps as $mapent):
- if($mapent['duid'] != "" or $mapent['ipaddrv6'] != ""):
+ if ($mapent['duid'] != "" or $mapent['ipaddrv6'] != ""):
?>
<tr>
<td>
@@ -903,8 +929,8 @@ if(is_array($a_maps)):
<?=htmlspecialchars($mapent['descr'])?>
</td>
<td>
- <a href="services_dhcpv6_edit.php?if=<?=$if?>&amp;id=<?=$i?>" class="btn btn-info btn-xs"/>Edit</a>
- <a href="services_dhcpv6.php?if=<?=$if?>&amp;act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"/>Delete</a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit static mapping')?>" href="services_dhcpv6_edit.php?if=<?=$if?>&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete static mapping')?>" href="services_dhcpv6.php?if=<?=$if?>&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -919,12 +945,15 @@ endif;
</div>
<nav class="action-buttons">
- <a href="services_dhcpv6_edit.php?if=<?=$if?>" class="btn btn-sm btn-success"/>Add</a>
+ <a href="services_dhcpv6_edit.php?if=<?=$if?>" class="btn btn-sm btn-success"/>
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function hideDDNS(hide) {
hideCheckBox('ddnsupdate', hide);
@@ -934,7 +963,7 @@ events.push(function(){
hideInput('ddnsdomainkey', hide);
}
- // Make the ‘Copy My MAC’ button a plain button, not a submit button
+ // Make the 'Copy My MAC' button a plain button, not a submit button
$("#btnmymac").prop('type','button');
// On click, copy the hidden 'mymac' text to the 'mac' input
@@ -942,7 +971,7 @@ events.push(function(){
$('#mac').val('<?=$mymac?>');
});
- // Make the ‘tftp’ button a plain button, not a submit button
+ // Make the 'tftp' button a plain button, not a submit button
$("#btntftp").prop('type','button');
// Show tftp controls
@@ -950,7 +979,7 @@ events.push(function(){
hideInput('tftp', false);
});
- // Make the ‘ntp’ button a plain button, not a submit button
+ // Make the 'ntp' button a plain button, not a submit button
$("#btnntp").prop('type','button');
// Show ntp controls
@@ -958,7 +987,7 @@ events.push(function(){
hideClass('ntpclass', false);
});
- // Make the ‘ddns’ button a plain button, not a submit button
+ // Make the 'ddns' button a plain button, not a submit button
$("#btndyndns").prop('type','button');
// Show ddns controls
@@ -966,7 +995,7 @@ events.push(function(){
hideDDNS(false);
});
- // Make the ‘ldap’ button a plain button, not a submit button
+ // Make the 'ldap' button a plain button, not a submit button
$("#btnldap").prop('type','button');
// Show ldap controls
@@ -974,7 +1003,7 @@ events.push(function(){
hideInput('ldap', false);
});
- // Make the ‘netboot’ button a plain button, not a submit button
+ // Make the 'netboot' button a plain button, not a submit button
$("#btnnetboot").prop('type','button');
// Show netboot controls
@@ -983,10 +1012,10 @@ events.push(function(){
hideCheckBox('shownetboot', false);
});
- // Make the ‘aditional options’ button a plain button, not a submit button
+ // Make the 'additional options' button a plain button, not a submit button
$("#btnadnl").prop('type','button');
- // Show aditional controls
+ // Show additional controls
$("#btnadnl").click(function() {
hideClass('adnlopt', false);
hideInput('btnaddopt', false);
@@ -1005,4 +1034,4 @@ events.push(function(){
//]]>
</script>
-<?php include('foot.inc'); \ No newline at end of file
+<?php include('foot.inc');
diff --git a/src/usr/local/www/services_dhcpv6_edit.php b/src/usr/local/www/services_dhcpv6_edit.php
index 8a75ec8..c66ea60 100644
--- a/src/usr/local/www/services_dhcpv6_edit.php
+++ b/src/usr/local/www/services_dhcpv6_edit.php
@@ -1,43 +1,65 @@
<?php
-/* $Id$ */
/*
services_dhcpv6_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2011 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/arp
- pfSense_MODULE: dhcpserver
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2011 Seth Mos <seth.mos@dds.nl>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dhcpserverv6-editstaticmapping
-##|*NAME=Services: DHCPv6 Server : Edit static mapping page
+##|*NAME=Services: DHCPv6 Server: Edit static mapping
##|*DESCR=Allow access to the 'Services: DHCPv6 Server : Edit static mapping' page.
##|*MATCH=services_dhcpv6_edit.php*
##|-PRIV
@@ -54,7 +76,7 @@ function staticmaps_sort($ifgui) {
require_once('globals.inc');
-if(!$g['services_dhcp_server_enable']) {
+if (!$g['services_dhcp_server_enable']) {
header("Location: /");
exit;
}
@@ -197,10 +219,9 @@ $shortcut_section = "dhcp6";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -218,7 +239,7 @@ $section->addInput(new Form_Input(
$section->addInput(new Form_Input(
'ipaddrv6',
- 'Server 3',
+ 'IPv6 address',
'text',
$pconfig['ipaddrv6']
))->setHelp('If an IPv6 address is entered, the address must be outside of the pool.' . '<br />' .
@@ -243,14 +264,14 @@ if($netboot_enabled) {
'filename',
'Netboot filename',
'text',
- $pconfig['remoteserver3']
+ $pconfig['filename']
))->setHelp('Name of the file that should be loaded when this host boots off of the network, overrides setting on main page.');
$section->addInput(new Form_Input(
'rootpath',
'Root path',
'text',
- $pconfig['remoteserver3']
+ $pconfig['rootpath']
))->setHelp('Enter the root-path string. This overrides setting on main page.');
}
diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php
index fe7b8ed..62a4f5b 100644
--- a/src/usr/local/www/services_dhcpv6_relay.php
+++ b/src/usr/local/www/services_dhcpv6_relay.php
@@ -1,66 +1,77 @@
<?php
/*
services_dhcpv6_relay.php
-
- Copyright (C) 2003-2004 Justin Ellison <justin@techadvise.com>.
- Copyright (C) 2010 Ermal Luçi
- Copyright (C) 2010 Seth Mos
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dhcpv6relay
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2004 Justin Ellison <justin@techadvise.com>
+ * Copyright (c) 2010 Seth Mos
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dhcpv6relay
-##|*NAME=Services: DHCPv6 Relay page
+##|*NAME=Services: DHCPv6 Relay
##|*DESCR=Allow access to the 'Services: DHCPv6 Relay' page.
##|*MATCH=services_dhcpv6_relay.php*
##|-PRIV
require("guiconfig.inc");
-require_once('classes/Form.class.php');
-
-function filterDestinationServers(array $destinationServers)
-{
- return array_unique(
- array_filter($destinationServers)
- );
-}
$pconfig['enable'] = isset($config['dhcrelay6']['enable']);
+
if (empty($config['dhcrelay6']['interface'])) {
$pconfig['interface'] = array();
} else {
$pconfig['interface'] = explode(",", $config['dhcrelay6']['interface']);
}
-$pconfig['server'] = filterDestinationServers(
- explode(',', $config['dhcrelay6']['server'])
-);
-
$pconfig['agentoption'] = isset($config['dhcrelay6']['agentoption']);
$iflist = array_intersect_key(
@@ -93,9 +104,6 @@ if ($_POST) {
unset($input_errors);
- if ($_POST['server'])
- $_POST['server'] = filterDestinationServers($_POST['server']);
-
$pconfig = $_POST;
/* input validation */
@@ -105,10 +113,22 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
+ $svrlist = '';
+
if ($_POST['server']) {
- foreach ($_POST['server'] as $srv) {
- if (!is_ipaddrv6($srv))
+ foreach ($_POST['server'] as $checksrv => $srv) {
+ if (!is_ipaddrv6($srv[0])) {
$input_errors[] = gettext("A valid Destination Server IPv6 address must be specified.");
+ }
+
+
+ if (!empty($srv[0])) { // Filter out any empties
+ if (!empty($svrlist)) {
+ $svrlist .= ',';
+ }
+
+ $svrlist .= $srv[0];
+ }
}
}
}
@@ -117,7 +137,7 @@ if ($_POST) {
$config['dhcrelay6']['enable'] = $_POST['enable'] ? true : false;
$config['dhcrelay6']['interface'] = implode(",", $_POST['interface']);
$config['dhcrelay6']['agentoption'] = $_POST['agentoption'] ? true : false;
- $config['dhcrelay6']['server'] = $_POST['server'];
+ $config['dhcrelay6']['server'] = $svrlist;
write_config();
@@ -127,23 +147,23 @@ if ($_POST) {
}
}
-$closehead = false;
$pgtitle = array(gettext("Services"), gettext("DHCPv6 Relay"));
$shortcut_section = "dhcp6";
include("head.inc");
-if ($dhcpd_enabled)
-{
+if ($dhcpd_enabled) {
echo '<div class="alert alert-danger">DHCPv6 Server is currently enabled. Cannot enable the DHCPv6 Relay service while the DHCPv6 Server is enabled on any interface.</div>';
include("foot.inc");
exit;
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
- print_info_box($savemsg);
+if ($savemsg) {
+ print_info_box($savemsg, 'success');
+}
$form = new Form;
@@ -169,34 +189,35 @@ $section->addInput(new Form_Checkbox(
'agentoption',
'',
'Append circuit ID and agent ID to requests',
- 'yes',
$pconfig['agentoption']
))->setHelp(
'If this is checked, the DHCPv6 relay will append the circuit ID (%s interface number) and the agent ID to the DHCPv6 request.',
[$g['product_name']]
);
-function createDestinationServerInputGroup($value = null)
-{
+function createDestinationServerInputGroup($value = null) {
$group = new Form_Group('Destination server');
- $group->enableDuplication();
$group->add(new Form_IpAddress(
'server',
'Destination server',
$value
- ))->setHelp(
- 'This is the IPv6 address of the server to which DHCPv6 requests are relayed.'
- )->setIsRepeated();
+ ))->setWidth(4)
+ ->setHelp('This is the IPv6 address of the server to which DHCPv6 requests are relayed.')
+ ->setIsRepeated();
+
+ $group->enableDuplication(null, true); // Buttons are in-line with the input
return $group;
}
-if (!isset($pconfig['server']) || count($pconfig['server']) < 1)
+if (!isset($pconfig['server']) || count($pconfig['server']) < 1) {
$section->add(createDestinationServerInputGroup());
-else
- foreach ($pconfig['server'] as $idx => $server)
- $section->add(createDestinationServerInputGroup($server));
+} else {
+ foreach ($pconfig['server'] as $server) {
+ $section->add(createDestinationServerInputGroup($server[0]));
+ }
+}
$form->add($section);
print $form;
diff --git a/src/usr/local/www/services_dnsmasq.php b/src/usr/local/www/services_dnsmasq.php
index ad79b18..c6f230d 100644
--- a/src/usr/local/www/services_dnsmasq.php
+++ b/src/usr/local/www/services_dnsmasq.php
@@ -1,41 +1,65 @@
<?php
-/* $Id$ */
/*
services_dnsmasq.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsforwarder
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dnsforwarder
-##|*NAME=Services: DNS Forwarder page
+##|*NAME=Services: DNS Forwarder
##|*DESCR=Allow access to the 'Services: DNS Forwarder' page.
##|*MATCH=services_dnsmasq.php*
##|-PRIV
@@ -75,55 +99,7 @@ $a_hosts = &$config['dnsmasq']['hosts'];
$a_domainOverrides = &$config['dnsmasq']['domainoverrides'];
if ($_POST) {
- $pconfig = $_POST;
- unset($input_errors);
-
- $config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false;
- $config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
- $config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
- $config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false;
- $config['dnsmasq']['strict_order'] = ($_POST['strict_order']) ? true : false;
- $config['dnsmasq']['domain_needed'] = ($_POST['domain_needed']) ? true : false;
- $config['dnsmasq']['no_private_reverse'] = ($_POST['no_private_reverse']) ? true : false;
- $config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
- $config['dnsmasq']['strictbind'] = ($_POST['strictbind']) ? true : false;
-
- if (isset($_POST['enable']) && isset($config['unbound']['enable'])) {
- if ($_POST['port'] == $config['unbound']['port']) {
- $input_errors[] = "The DNS Resolver is enabled using this port. Choose a non-conflicting port, or disable DNS Resolver.";
- }
- }
-
- if ($_POST['port']) {
- if (is_port($_POST['port'])) {
- $config['dnsmasq']['port'] = $_POST['port'];
- } else {
- $input_errors[] = gettext("You must specify a valid port number");
- }
- } else if (isset($config['dnsmasq']['port'])) {
- unset($config['dnsmasq']['port']);
- }
-
- if (is_array($_POST['interface'])) {
- $config['dnsmasq']['interface'] = implode(",", $_POST['interface']);
- } elseif (isset($config['dnsmasq']['interface'])) {
- unset($config['dnsmasq']['interface']);
- }
-
- if ($config['dnsmasq']['custom_options']) {
- $args = '';
- foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) {
- $args .= escapeshellarg("--{$c}") . " ";
- }
- exec("/usr/local/sbin/dnsmasq --test $args", $output, $rc);
- if ($rc != 0) {
- $input_errors[] = gettext("Invalid custom options");
- }
- }
-
- if (!$input_errors) {
- write_config();
-
+ if ($_POST['apply']) {
$retval = 0;
$retval = services_dnsmasq_configure();
$savemsg = get_std_save_message($retval);
@@ -138,6 +114,57 @@ if ($_POST) {
if ($retval == 0) {
clear_subsystem_dirty('hosts');
}
+ } else {
+ $pconfig = $_POST;
+ unset($input_errors);
+
+ $config['dnsmasq']['enable'] = ($_POST['enable']) ? true : false;
+ $config['dnsmasq']['regdhcp'] = ($_POST['regdhcp']) ? true : false;
+ $config['dnsmasq']['regdhcpstatic'] = ($_POST['regdhcpstatic']) ? true : false;
+ $config['dnsmasq']['dhcpfirst'] = ($_POST['dhcpfirst']) ? true : false;
+ $config['dnsmasq']['strict_order'] = ($_POST['strict_order']) ? true : false;
+ $config['dnsmasq']['domain_needed'] = ($_POST['domain_needed']) ? true : false;
+ $config['dnsmasq']['no_private_reverse'] = ($_POST['no_private_reverse']) ? true : false;
+ $config['dnsmasq']['custom_options'] = str_replace("\r\n", "\n", $_POST['custom_options']);
+ $config['dnsmasq']['strictbind'] = ($_POST['strictbind']) ? true : false;
+
+ if (isset($_POST['enable']) && isset($config['unbound']['enable'])) {
+ if ($_POST['port'] == $config['unbound']['port']) {
+ $input_errors[] = "The DNS Resolver is enabled using this port. Choose a non-conflicting port, or disable DNS Resolver.";
+ }
+ }
+
+ if ($_POST['port']) {
+ if (is_port($_POST['port'])) {
+ $config['dnsmasq']['port'] = $_POST['port'];
+ } else {
+ $input_errors[] = gettext("You must specify a valid port number");
+ }
+ } else if (isset($config['dnsmasq']['port'])) {
+ unset($config['dnsmasq']['port']);
+ }
+
+ if (is_array($_POST['interface'])) {
+ $config['dnsmasq']['interface'] = implode(",", $_POST['interface']);
+ } elseif (isset($config['dnsmasq']['interface'])) {
+ unset($config['dnsmasq']['interface']);
+ }
+
+ if ($config['dnsmasq']['custom_options']) {
+ $args = '';
+ foreach (preg_split('/\s+/', $config['dnsmasq']['custom_options']) as $c) {
+ $args .= escapeshellarg("--{$c}") . " ";
+ }
+ exec("/usr/local/sbin/dnsmasq --test $args", $output, $rc);
+ if ($rc != 0) {
+ $input_errors[] = gettext("Invalid custom options");
+ }
+ }
+
+ if (!$input_errors) {
+ write_config();
+ mark_subsystem_dirty('hosts');
+ }
}
}
@@ -150,8 +177,7 @@ if ($_GET['act'] == "del") {
header("Location: services_dnsmasq.php");
exit;
}
- }
- elseif ($_GET['type'] == 'doverride') {
+ } elseif ($_GET['type'] == 'doverride') {
if ($a_domainOverrides[$_GET['id']]) {
unset($a_domainOverrides[$_GET['id']]);
write_config();
@@ -167,14 +193,16 @@ function build_if_list() {
$iflist = array('options' => array(), 'selected' => array());
$iflist['options'][""] = "All";
- if (empty($pconfig['interface']) || empty($pconfig['interface'][0]))
+ if (empty($pconfig['interface']) || empty($pconfig['interface'][0])) {
array_push($iflist['selected'], "");
+ }
foreach ($interface_addresses as $laddr => $ldescr) {
$iflist['options'][$laddr] = htmlspecialchars($ldescr);
- if ($pconfig['interface'] && in_array($laddr, $pconfig['interface']))
+ if ($pconfig['interface'] && in_array($laddr, $pconfig['interface'])) {
array_push($iflist['selected'], $laddr);
+ }
}
unset($interface_addresses);
@@ -182,21 +210,21 @@ function build_if_list() {
return($iflist);
}
-$closehead = false;
-$pgtitle = array(gettext("Services"), gettext("DNS forwarder"));
+$pgtitle = array(gettext("Services"), gettext("DNS Forwarder"));
$shortcut_section = "forwarder";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('hosts'))
+if (is_subsystem_dirty('hosts')) {
print_info_box_np(gettext("The DNS forwarder configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -302,7 +330,7 @@ $section->addInput(new Form_Checkbox(
'rather than binding to all interfaces and discarding queries to other addresses.' . '<br /><br />' .
'This option does NOT work with IPv6. If set, dnsmasq will not bind to IPv6 addresses.');
-$section->addInput(new Form_TextArea(
+$section->addInput(new Form_Textarea(
'custom_options',
'Custom options',
$pconfig['custom_options']
@@ -322,13 +350,13 @@ print_info_box(sprintf("If the DNS forwarder is enabled, the DHCP".
" is checked. If you don't use that option (or if you use".
" a static IP address on WAN), you must manually specify at".
" least one DNS server on the %sSystem:".
- "General setup%s page.",'<a href="system.php">','</a>','<a href="system.php">','</a>'));
+ "General setup%s page.",'<a href="system.php">','</a>','<a href="system.php">','</a>'), info);
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2><?=gettext("Host Overrides")?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext("Host Overrides")?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Host")?></th>
@@ -344,10 +372,10 @@ foreach ($a_hosts as $i => $hostent):
?>
<tr>
<td>
- <?=strtolower($hostent['host'])?>
+ <?=$hostent['host']?>
</td>
<td>
- <?=strtolower($hostent['domain'])?>
+ <?=$hostent['domain']?>
</td>
<td>
<?=$hostent['ip']?>
@@ -356,8 +384,8 @@ foreach ($a_hosts as $i => $hostent):
<?=htmlspecialchars($hostent['descr'])?>
</td>
<td>
- <a href="services_dnsmasq_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_dnsmasq.php?type=host&amp;act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit host override')?>" href="services_dnsmasq_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete host override')?>" href="services_dnsmasq.php?type=host&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
@@ -367,19 +395,20 @@ foreach ($a_hosts as $i => $hostent):
?>
<tr>
<td>
- <?=strtolower($alias['host'])?>
+ <?=$alias['host']?>
</td>
<td>
- <?=strtolower($alias['domain'])?>
+ <?=$alias['domain']?>
</td>
<td>
Alias for <?=$hostent['host'] ? $hostent['host'] . '.' . $hostent['domain'] : $hostent['domain']?>
</td>
<td>
+ <i class="fa fa-angle-double-right text-info"></i>
<?=htmlspecialchars($alias['description'])?>
</td>
<td>
- <a href="services_dnsmasq_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit host override')?>" href="services_dnsmasq_edit.php?id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -393,18 +422,21 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="services_dnsmasq_edit.php" class="btn btn-sm btn-success"><?=gettext('Add')?></a>
+ <a href="services_dnsmasq_edit.php" class="btn btn-sm btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
<?php
print_info_box(gettext("Entries in this section override individual results from the forwarders.") .
- gettext("Use these for changing DNS results or for adding custom DNS records."));
+ gettext("Use these for changing DNS results or for adding custom DNS records."), info);
?>
<div class="panel panel-default">
- <div class="panel-heading"><h2><?=gettext("Domain Overrides")?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext("Domain Overrides")?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Domain")?></th>
@@ -420,7 +452,7 @@ foreach ($a_domainOverrides as $i => $doment):
?>
<tr>
<td>
- <?=strtolower($doment['domain'])?>
+ <?=$doment['domain']?>
</td>
<td>
<?=$doment['ip']?>
@@ -429,8 +461,8 @@ foreach ($a_domainOverrides as $i => $doment):
<?=htmlspecialchars($doment['descr'])?>
</td>
<td>
- <a href="services_dnsmasq_domainoverride_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_dnsmasq.php?act=del&amp;type=doverride&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit domain override')?>" href="services_dnsmasq_domainoverride_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete domain override')?>" href="services_dnsmasq.php?act=del&amp;type=doverride&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -442,11 +474,26 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="services_dnsmasq_domainoverride_edit.php" class="btn btn-sm btn-success"><?=gettext('Add')?></a>
+ <a href="services_dnsmasq_domainoverride_edit.php" class="btn btn-sm btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ // On clicking the "Apply" button, submit the main form, not the little form the button lives in
+// $('[name=apply]').prop('type', 'button');
+
+// $('[name=apply]').click(function() {
+// $('form:last').submit();
+// });
+// });
+//]]>
+</script>
<?php
print_info_box(gettext("Entries in this area override an entire domain, and subdomains, by specifying an".
- " authoritative DNS server to be queried for that domain."));
+ " authoritative DNS server to be queried for that domain."), info);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
index c7fdc67..b230a4b 100644
--- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -1,40 +1,65 @@
<?php
/*
services_dnsmasq_domainoverride_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2005 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsforwarder
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2005 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dnsforwarder-editdomainoverride
-##|*NAME=Services: DNS Forwarder: Edit Domain Override page
+##|*NAME=Services: DNS Forwarder: Edit Domain Override
##|*DESCR=Allow access to the 'Services: DNS Forwarder: Edit Domain Override' page.
##|*MATCH=services_dnsmasq_domainoverride_edit.php*
##|-PRIV
@@ -67,46 +92,46 @@ if (isset($id) && $a_domainOverrides[$id]) {
}
if ($_POST) {
- unset($input_errors);
- $pconfig = $_POST;
+ unset($input_errors);
+ $pconfig = $_POST;
- /* input validation */
- $reqdfields = explode(" ", "domain ip");
- $reqdfieldsn = array(gettext("Domain"),gettext("IP address"));
+ /* input validation */
+ $reqdfields = explode(" ", "domain ip");
+ $reqdfieldsn = array(gettext("Domain"), gettext("IP address"));
- do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
+ do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
- function String_Begins_With($needle, $haystack) {
- return (substr($haystack, 0, strlen($needle))==$needle);
- }
+ function String_Begins_With($needle, $haystack) {
+ return (substr($haystack, 0, strlen($needle)) == $needle);
+ }
- if (String_Begins_With(_msdcs, $_POST['domain'])) {
- $subdomainstr = substr($_POST['domain'], 7);
+ if (String_Begins_With(_msdcs, $_POST['domain'])) {
+ $subdomainstr = substr($_POST['domain'], 7);
- if ($subdomainstr && !is_domain($subdomainstr)) {
- $input_errors[] = gettext("A valid domain must be specified after _msdcs.");
- }
- }
- elseif ($_POST['domain'] && !is_domain($_POST['domain'])) {
- $input_errors[] = gettext("A valid domain must be specified.");
- }
+ if ($subdomainstr && !is_domain($subdomainstr)) {
+ $input_errors[] = gettext("A valid domain must be specified after _msdcs.");
+ }
+ } elseif ($_POST['domain'] && !is_domain($_POST['domain'])) {
+ $input_errors[] = gettext("A valid domain must be specified.");
+ }
- if ($_POST['ip'] && !is_ipaddr($_POST['ip']) && ($_POST['ip'] != '#') && ($_POST['ip'] != '!')) {
- $input_errors[] = gettext("A valid IP address must be specified, or # for an exclusion or ! to not forward at all.");
- }
+ if ($_POST['ip'] && !is_ipaddr($_POST['ip']) && ($_POST['ip'] != '#') && ($_POST['ip'] != '!')) {
+ $input_errors[] = gettext("A valid IP address must be specified, or # for an exclusion or ! to not forward at all.");
+ }
- if ($_POST['dnssrcip'] && !in_array($_POST['dnssrcip'], get_configured_ip_addresses())) {
- $input_errors[] = gettext("An interface IP address must be specified for the DNS query source.");
- }
+ if ($_POST['dnssrcip'] && !in_array($_POST['dnssrcip'], get_configured_ip_addresses())) {
+ $input_errors[] = gettext("An interface IP address must be specified for the DNS query source.");
+ }
- if (!$input_errors) {
+ if (!$input_errors) {
$doment = array();
$doment['domain'] = $_POST['domain'];
- if (empty($_POST['dnssrcip']))
+ if (empty($_POST['dnssrcip'])) {
$doment['ip'] = $_POST['ip'];
- else
- $doment['ip'] = $_POST['ip'] . "@" . $_POST['dnssrcip'];
+ } else {
+ $doment['ip'] = $_POST['ip'] . "@" . $_POST['dnssrcip'];
+ }
$doment['descr'] = $_POST['descr'];
@@ -125,14 +150,13 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Services"), gettext("DNS forwarder"), gettext("Edit Domain Override"));
+$pgtitle = array(gettext("Services"), gettext("DNS Forwarder"), gettext("Edit Domain Override"));
$shortcut_section = "forwarder";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -180,4 +204,4 @@ if (isset($id) && $a_domainOverrides[$id]) {
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php
index ec3e468..8bc1ac4 100644
--- a/src/usr/local/www/services_dnsmasq_edit.php
+++ b/src/usr/local/www/services_dnsmasq_edit.php
@@ -1,41 +1,65 @@
<?php
-/* $Id$ */
/*
services_dnsmasq_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsforwarder
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dnsforwarder-edithost
-##|*NAME=Services: DNS Forwarder: Edit host page
+##|*NAME=Services: DNS Forwarder: Edit host
##|*DESCR=Allow access to the 'Services: DNS Forwarder: Edit host' page.
##|*MATCH=services_dnsmasq_edit.php*
##|-PRIV
@@ -56,8 +80,9 @@ function hosts_sort() {
require("guiconfig.inc");
-if (!is_array($config['dnsmasq']['hosts']))
+if (!is_array($config['dnsmasq']['hosts'])) {
$config['dnsmasq']['hosts'] = array();
+}
$a_hosts = &$config['dnsmasq']['hosts'];
@@ -106,47 +131,47 @@ if ($_POST) {
/* collect aliases */
$aliases = array();
- foreach ($_POST as $key => $value) {
- $entry = '';
- if (!substr_compare('aliashost', $key, 0, 9)) {
- $entry = substr($key, 9);
- $field = 'host';
- }
- elseif (!substr_compare('aliasdomain', $key, 0, 11)) {
- $entry = substr($key, 11);
- $field = 'domain';
- }
- elseif (!substr_compare('aliasdescription', $key, 0, 16)) {
- $entry = substr($key, 16);
- $field = 'description';
- }
- if (ctype_digit($entry)) {
- $aliases[$entry][$field] = $value;
+
+ if (!empty($_POST['aliashost0'])) {
+ foreach ($_POST as $key => $value) {
+ $entry = '';
+ if (!substr_compare('aliashost', $key, 0, 9)) {
+ $entry = substr($key, 9);
+ $field = 'host';
+ } elseif (!substr_compare('aliasdomain', $key, 0, 11)) {
+ $entry = substr($key, 11);
+ $field = 'domain';
+ } elseif (!substr_compare('aliasdescription', $key, 0, 16)) {
+ $entry = substr($key, 16);
+ $field = 'description';
+ }
+ if (ctype_digit($entry)) {
+ $aliases[$entry][$field] = $value;
+ }
}
- }
- $pconfig['aliases']['item'] = $aliases;
-
- /* validate aliases */
- foreach ($aliases as $idx => $alias) {
- $aliasreqdfields = array('aliasdomain' . $idx);
- $aliasreqdfieldsn = array(gettext("Alias Domain"));
-
- do_input_validation($_POST, $aliasreqdfields, $aliasreqdfieldsn, $input_errors);
- if ($alias['host']) {
- if (!is_hostname($alias['host'])) {
- $input_errors[] = gettext("Hostnames in an alias list can only contain the characters A-Z, 0-9 and '-'. They may not start or end with '-'.");
- } else {
- if (!is_unqualified_hostname($alias['host'])) {
- $input_errors[] = gettext("A valid alias hostname is specified, but the domain name part should be omitted");
+ $pconfig['aliases']['item'] = $aliases;
+
+ /* validate aliases */
+ foreach ($aliases as $idx => $alias) {
+ $aliasreqdfields = array('aliasdomain' . $idx);
+ $aliasreqdfieldsn = array(gettext("Alias Domain"));
+
+ do_input_validation($_POST, $aliasreqdfields, $aliasreqdfieldsn, $input_errors);
+ if ($alias['host']) {
+ if (!is_hostname($alias['host'])) {
+ $input_errors[] = gettext("Hostnames in an alias list can only contain the characters A-Z, 0-9 and '-'. They may not start or end with '-'.");
+ } else {
+ if (!is_unqualified_hostname($alias['host'])) {
+ $input_errors[] = gettext("A valid alias hostname is specified, but the domain name part should be omitted");
+ }
}
}
- }
- if (($alias['domain'] && !is_domain($alias['domain']))) {
- $input_errors[] = gettext("A valid domain must be specified in alias list.");
+ if (($alias['domain'] && !is_domain($alias['domain']))) {
+ $input_errors[] = gettext("A valid domain must be specified in alias list.");
+ }
}
}
-
/* check for overlaps */
foreach ($a_hosts as $hostent) {
if (isset($id) && ($a_hosts[$id]) && ($a_hosts[$id] === $hostent)) {
@@ -187,34 +212,34 @@ if ($_POST) {
}
// Delete a row in the options table
-if($_GET['act'] == "delopt") {
+if ($_GET['act'] == "delopt") {
$idx = $_GET['id'];
- if($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) {
+ if ($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) {
unset($pconfig['aliases']['item'][$idx]);
}
}
// Add an option row
-if($_GET['act'] == "addopt") {
- if(!is_array($pconfig['aliases']['item']))
+if ($_GET['act'] == "addopt") {
+ if (!is_array($pconfig['aliases']['item'])) {
$pconfig['aliases']['item'] = array();
-
+ }
+
array_push($pconfig['aliases']['item'], array('host' => null, 'domain' => null, 'description' => null));
}
-$pgtitle = array(gettext("Services"),gettext("DNS forwarder"),gettext("Edit host"));
+$pgtitle = array(gettext("Services"), gettext("DNS Forwarder"), gettext("Edit Host Override"));
$shortcut_section = "forwarder";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
-$section = new Form_Section('Domain override options');
+$section = new Form_Section('Host override options');
$section->addInput(new Form_Input(
'host',
@@ -259,12 +284,17 @@ $form->add($section);
$section = new Form_Section('Additional names for this host');
-if( $pconfig['aliases']['item']) {
+if (!$pconfig['aliases']['item']) {
+ $pconfig['aliases']['item'] = array('host' => "");
+}
+
+if ($pconfig['aliases']['item']) {
$counter = 0;
$last = count($pconfig['aliases']['item']) - 1;
- foreach($pconfig['aliases']['item'] as $item) {
+ foreach ($pconfig['aliases']['item'] as $item) {
$group = new Form_Group(null);
+ $group->addClass('repeatable');
$group->add(new Form_Input(
'aliashost' . $counter,
@@ -278,7 +308,7 @@ if( $pconfig['aliases']['item']) {
null,
'text',
$item['domain']
- ))->setHelp($counter == $last ? 'Value':null);
+ ))->setHelp($counter == $last ? 'Domain':null);
$group->add(new Form_Input(
'aliasdescription' . $counter,
@@ -287,30 +317,24 @@ if( $pconfig['aliases']['item']) {
$item['description']
))->setHelp($counter == $last ? 'Description':null);
- $btn = new Form_Button(
- 'btn' . $counter,
- 'Delete',
- 'services_dnsmasq_edit.php?act=delopt' . '&id=' . $counter
- );
+ $group->add(new Form_Button(
+ 'deleterow' . $counter,
+ 'Delete'
+ ))->removeClass('btn-primary')->addClass('btn-warning');
- $btn->removeClass('btn-primary')->addClass('btn-danger btn-sm');
- $group->add($btn);
$section->add($group);
$counter++;
}
}
-$btnaddopt = new Form_Button(
- 'btnaddopt',
- 'Add Option',
- 'services_dnsmasq_edit.php?act=addopt'
-);
-
-$btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm');
-
-$section->addInput($btnaddopt);
+$form->addGlobal(new Form_Button(
+ 'addrow',
+ 'Add host name',
+ null,
+ 'fa-plus'
+))->removeClass('btn-primary')->addClass('btn-success addbtn');
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_dyndns.php b/src/usr/local/www/services_dyndns.php
index c605241..234f5f9 100644
--- a/src/usr/local/www/services_dyndns.php
+++ b/src/usr/local/www/services_dyndns.php
@@ -1,41 +1,61 @@
<?php
-/* $Id$ */
/*
services_dyndns.php
-
- Copyright (C) 2008 Ermal Luçi
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/host
- pfSense_MODULE: dyndns
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dynamicdnsclients
-##|*NAME=Services: Dynamic DNS clients page
+##|*NAME=Services: Dynamic DNS clients
##|*DESCR=Allow access to the 'Services: Dynamic DNS clients' page.
##|*MATCH=services_dyndns.php*
##|-PRIV
@@ -58,16 +78,29 @@ if ($_GET['act'] == "del") {
header("Location: services_dyndns.php");
exit;
-}
+} else if ($_GET['act'] == "toggle") {
+ if ($a_dyndns[$_GET['id']]) {
+ if (isset($a_dyndns[$_GET['id']]['enable'])) {
+ unset($a_dyndns[$_GET['id']]['enable']);
+ } else {
+ $a_dyndns[$_GET['id']]['enable'] = true;
+ }
+ write_config();
+ services_dyndns_configure();
-$pgtitle = array(gettext("Services"), gettext("Dynamic DNS clients"));
+ header("Location: services_dyndns.php");
+ exit;
+ }
+}
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS"), gettext("Dynamic DNS Clients"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
-$tab_array[] = array(gettext("DynDns"), true, "services_dyndns.php");
+$tab_array[] = array(gettext("Dynamic DNS"), true, "services_dyndns.php");
$tab_array[] = array(gettext("RFC 2136"), false, "services_rfc2136.php");
display_top_tabs($tab_array);
?>
@@ -81,7 +114,7 @@ display_top_tabs($tab_array);
<th><?=gettext("Hostname")?></th>
<th><?=gettext("Cached IP")?></th>
<th><?=gettext("Description")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
@@ -89,7 +122,7 @@ display_top_tabs($tab_array);
$i = 0;
foreach ($a_dyndns as $dyndns):
?>
- <tr<?=!isset($dyndns['enable'])?' class="disabled""':''?>>
+ <tr<?=!isset($dyndns['enable'])?' class="disabled"':''?>>
<td>
<?php
$iflist = get_configured_interface_with_descr();
@@ -138,25 +171,27 @@ foreach ($a_dyndns as $dyndns):
$cached_ip_s = explode(":", file_get_contents($filename));
$cached_ip = $cached_ip_s[0];
- if ($ipaddr != $cached_ip)
- print('<font color="red">');
- else
- print('<font color="green">');
+ if ($ipaddr != $cached_ip) {
+ print('<span class="text-danger">');
+ } else {
+ print('<span class="text-success">');
+ }
print(htmlspecialchars($cached_ip));
- print('</font>');
+ print('</span>');
} else if (file_exists($filename_v6)) {
$ipv6addr = get_interface_ipv6($dyndns['interface']);
$cached_ipv6_s = explode("|", file_get_contents($filename_v6));
$cached_ipv6 = $cached_ipv6_s[0];
- if ($ipv6addr != $cached_ipv6)
- print('<font color="red">');
- else
- print('<font color="green">');
+ if ($ipv6addr != $cached_ipv6) {
+ print('<span class="text-danger">');
+ } else {
+ print('<span class="text-success">');
+ }
print(htmlspecialchars($cached_ipv6));
- print('</font>');
+ print('</span>');
} else {
print('N/A');
}
@@ -168,8 +203,16 @@ foreach ($a_dyndns as $dyndns):
?>
</td>
<td>
- <a href="services_dyndns_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_dyndns.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit service')?>" href="services_dyndns_edit.php?id=<?=$i?>"></a>
+<?php if (isset($dyndns['enable'])) {
+?>
+ <a class="fa fa-ban" title="<?=gettext('Disable service')?>" href="?act=toggle&amp;id=<?=$i?>"></a>
+<?php } else {
+?>
+ <a class="fa fa-check-square-o" title="<?=gettext('Enable service')?>" href="?act=toggle&amp;id=<?=$i?>"></a>
+<?php }
+?>
+ <a class="fa fa-trash" title="<?=gettext('Delete service')?>" href="services_dyndns.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -182,12 +225,16 @@ foreach ($a_dyndns as $dyndns):
</form>
<nav class="action-buttons">
- <a href="services_dyndns_edit.php" class="btn btn-sm btn-success"><?=gettext('Add')?></a>
+ <a href="services_dyndns_edit.php" class="btn btn-sm btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
-<?php
-
-print_info_box(gettext("IP addresses appearing in green are up to date with Dynamic DNS provider. " .
- "You can force an update for an IP address on the edit page for that service."));
+<div>
+ <?=gettext('IP addresses appearing in <span class="text-success">green</span> are up to date with Dynamic DNS provider. ')?>
+ <?=gettext('You can force an update for an IP address on the edit page for that service.')?>
+</div>
-include("foot.inc"); \ No newline at end of file
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/services_dyndns_edit.php b/src/usr/local/www/services_dyndns_edit.php
index d391dbc..e28dc3e 100644
--- a/src/usr/local/www/services_dyndns_edit.php
+++ b/src/usr/local/www/services_dyndns_edit.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
services_dyndns_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: dyndns
-*/
##|+PRIV
##|*IDENT=page-services-dynamicdnsclient
-##|*NAME=Services: Dynamic DNS client page
+##|*NAME=Services: Dynamic DNS client
##|*DESCR=Allow access to the 'Services: Dynamic DNS client' page.
##|*MATCH=services_dyndns_edit.php*
##|-PRIV
@@ -142,6 +136,10 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
+ if ($_POST['passwordfld'] != $_POST['passwordfld_confirm']) {
+ $input_errors[] = gettext("Password and confirmed password must match.");
+ }
+
if (isset($_POST['host']) && in_array("host", $reqdfields)) {
/* Namecheap can have a @. in hostname */
if ($pconfig['type'] == "namecheap" && substr($_POST['host'], 0, 2) == '@.') {
@@ -169,14 +167,18 @@ if ($_POST) {
$dyndns = array();
$dyndns['type'] = $_POST['type'];
$dyndns['username'] = $_POST['username'];
- $dyndns['password'] = $_POST['passwordfld'];
+ if ($_POST['passwordfld'] != DMYPWD) {
+ $dyndns['password'] = $_POST['passwordfld'];
+ } else {
+ $dyndns['password'] = $a_dyndns[$id]['password'];;
+ }
$dyndns['host'] = $_POST['host'];
$dyndns['mx'] = $_POST['mx'];
$dyndns['wildcard'] = $_POST['wildcard'] ? true : false;
$dyndns['verboselog'] = $_POST['verboselog'] ? true : false;
$dyndns['curl_ipresolve_v4'] = $_POST['curl_ipresolve_v4'] ? true : false;
$dyndns['curl_ssl_verifypeer'] = $_POST['curl_ssl_verifypeer'] ? true : false;
- /* In this place enable means disabled */
+ // In this place enable means disabled
if ($_POST['enable']) {
unset($dyndns['enable']);
} else {
@@ -223,8 +225,9 @@ function build_type_list() {
$vals = explode(" ", DYNDNS_PROVIDER_VALUES);
$typelist = array();
- for ($j = 0; $j < count($vals); $j++)
+ for ($j = 0; $j < count($vals); $j++) {
$typelist[$vals[$j]] = htmlspecialchars($types[$j]);
+ }
return($typelist);
}
@@ -234,31 +237,33 @@ function build_if_list() {
$iflist = get_configured_interface_with_descr();
- foreach ($iflist as $if => $ifdesc)
+ foreach ($iflist as $if => $ifdesc) {
$list[$if] = $ifdesc;
+ }
unset($iflist);
$grouplist = return_gateway_groups_array();
- foreach ($grouplist as $name => $group)
+ foreach ($grouplist as $name => $group) {
$list[$name] = 'GW Group ' . $name;
+ }
unset($grouplist);
return($list);
}
-$pgtitle = array(gettext("Services"),gettext("Dynamic DNS client"));
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS"), gettext("Dynamic DNS Client"), gettext("Edit"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
-
-require_once('classes/Form.class.php');
+}
$form = new Form;
@@ -292,7 +297,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'requestif',
'Interface to send update from',
- $pconfig['request'],
+ $pconfig['requestif'],
$interfacelist
))->setHelp('This is almost always the same as the Interface to Monitor. ');
@@ -352,7 +357,7 @@ $section->addInput(new Form_Input(
'GleSYS: Enter your API user.' . '<br />' .
'For Custom Entries, Username and Password represent HTTP Authentication username and passwords.');
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'passwordfld',
'Password',
'password',
@@ -421,12 +426,12 @@ print($form);
// Certain input elements are hidden/shown based on the service type in the following script
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function setVisible(service) {
- switch(service) {
+ switch (service) {
case "custom" :
case "custom-v6" :
hideInput('resultmatch', false);
@@ -471,15 +476,15 @@ events.push(function(){
// When the 'Service type" selector is changed, we show/hide certain elements
$('#type').on('change', function() {
- setVisible( this.value );
+ setVisible(this.value);
});
// ---------- On initial page load ------------------------------------------------------------
-
+
setVisible($('#type').val());
});
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_igmpproxy.php b/src/usr/local/www/services_igmpproxy.php
index 2953337..7face46 100644
--- a/src/usr/local/www/services_igmpproxy.php
+++ b/src/usr/local/www/services_igmpproxy.php
@@ -1,46 +1,65 @@
<?php
-/* $Id$ */
/*
services_igmpproxy.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Ermal Luçi
- Copyright (C) 2004 Scott Ullrich
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: igmpproxy
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-igmpproxy
-##|*NAME=Services: Igmpproxy page
-##|*DESCR=Allow access to the 'Services: Igmpproxy' page.
+##|*NAME=Services: IGMP Proxy
+##|*DESCR=Allow access to the 'Services: IGMP Proxy' page.
##|*MATCH=services_igmpproxy.php*
##|-PRIV
@@ -82,11 +101,13 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Services"), gettext("IGMP Proxy"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('igmpproxy'))
+if (is_subsystem_dirty('igmpproxy')) {
print_info_box_np(gettext('The IGMP entry list has been changed.' . '<br />' . 'You must apply the changes in order for them to take effect.'));
+}
?>
<form action="services_igmpproxy.php" method="post">
@@ -98,7 +119,7 @@ if (is_subsystem_dirty('igmpproxy'))
<th><?=gettext("Type")?></th>
<th><?=gettext("Values")?></th>
<th><?=gettext("Description")?></th>
- <th</th>
+ <th></th>
</tr>
</thead>
<tbody>
@@ -118,7 +139,7 @@ foreach ($a_igmpproxy as $igmpentry):
$addresses = implode(", ", array_slice(explode(" ", $igmpentry['address']), 0, 10));
print($addresses);
- if(count($addresses) < 10) {
+ if (count($addresses) < 10) {
print(' ');
} else {
print('...');
@@ -129,8 +150,8 @@ foreach ($a_igmpproxy as $igmpentry):
<?=htmlspecialchars($igmpentry['descr'])?>&nbsp;
</td>
<td>
- <a href="services_igmpproxy_edit.php?id=<?=$i?>" class="btn btn-info btn-xs"><?=gettext('Edit')?></a>
- <a href="services_igmpproxy.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit IGMP entry')?>" href="services_igmpproxy_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete IGMP entry')?>" href="services_igmpproxy.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -140,17 +161,22 @@ endforeach;
</tbody>
</table>
</div>
-
- <nav class="action-buttons">
- <input id="submit" name="submit" type="submit" class="btn btn-primary" value="<?=gettext("Save")?>" />
- <a href="services_igmpproxy_edit.php" class="btn btn-success"><?=gettext('Add')?></a>
- </nav>
-
</form>
+<nav class="action-buttons">
+ <button id="submit" name="submit" type="submit" class="btn btn-primary btn-sm" value="<?=gettext("Save")?>">
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
+ <a href="services_igmpproxy_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+</nav>
+
+<div id="infoblock">
+<?=print_info_box(gettext('Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. ' .
+ 'Only one "upstream" interface can be configured.'), info)?>
+</div>
<?php
-
-print_info_box(gettext('Please add the interface for upstream, the allowed subnets, and the downstream interfaces you would like the proxy to allow. ' .
- 'Only one "upstream" interface can be configured.'));
-
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_igmpproxy_edit.php b/src/usr/local/www/services_igmpproxy_edit.php
index 7f3e6f0..371b85a 100644
--- a/src/usr/local/www/services_igmpproxy_edit.php
+++ b/src/usr/local/www/services_igmpproxy_edit.php
@@ -1,49 +1,69 @@
<?php
-/* $Id$ */
/*
services_igmpproxy_edit.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009 Ermal Luçi
- Copyright (C) 2004 Scott Ullrich
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: igmpproxy
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-igmpproxy-edit
-##|*NAME=Firewall: Igmpproxy: Edit page
-##|*DESCR=Allow access to the 'Services: Igmpproxy: Edit' page.
+##|*NAME=Services: IGMP Proxy: Edit
+##|*DESCR=Allow access to the 'Services: IGMP Proxy: Edit' page.
##|*MATCH=services_igmpproxy_edit.php*
##|-PRIV
-$pgtitle = array(gettext("Firewall"), gettext("IGMP Proxy"), gettext("Edit"));
+$pgtitle = array(gettext("Services"), gettext("IGMP Proxy"), gettext("Edit"));
require("guiconfig.inc");
@@ -69,27 +89,6 @@ if (isset($id) && $a_igmpproxy[$id]) {
$pconfig['descr'] = html_entity_decode($a_igmpproxy[$id]['descr']);
}
-// Add a row to the network table
-if($_GET['act'] && $_GET['act'] == 'addrow')
- $pconfig['address'] .= '/32';
-
-// Remove a row from the network table
-if($_GET['act'] && $_GET['act'] == 'delrow') {
- $row = $_GET['row'];
-
- $addresses = explode(" ", $pconfig['address']);
-
- $pconfig['address'] = "";
-
- $idx = 0;
- foreach($addresses as $address) {
- if($idx != $row)
- $pconfig['address'] .= ($idx > 0 ? ' ':null) . $address;
-
- $idx++;
- }
-}
-
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
@@ -99,6 +98,7 @@ if ($_POST) {
if (isset($id) && $id == $pid) {
continue;
}
+
if ($proxyentry['type'] == "upstream" && $proxyentry['ifname'] != $_POST['interface']) {
$input_errors[] = gettext("Only one 'upstream' interface can be configured.");
}
@@ -111,16 +111,19 @@ if ($_POST) {
$igmpentry['type'] = $_POST['type'];
$address = "";
$isfirst = 0;
+
/* item is a normal igmpentry type */
- for ($x = 0; $x < 4999; $x++) {
- if ($_POST["address{$x}"] <> "") {
- if ($isfirst > 0) {
- $address .= " ";
- }
- $address .= $_POST["address{$x}"];
- $address .= "/" . $_POST["address_subnet{$x}"];
- $isfirst++;
+ $x = 0;
+ while ($_POST["address{$x}"]) {
+
+ if ($isfirst > 0) {
+ $address .= " ";
}
+
+ $address .= $_POST["address{$x}"];
+ $address .= "/" . $_POST["address_subnet{$x}"];
+ $isfirst++;
+ $x++;
}
if (!$input_errors) {
@@ -148,12 +151,11 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require_once('classes/Form.class.php');
-
-// These two inputs appear inthe original file. Don't know what they are for
+// These two inputs appear in the original file. Don't know what they are for
// but they are here just in case.
$h1 = new Form_Input(
@@ -177,8 +179,9 @@ $section = new Form_Section('IGMP Proxy Edit');
$optionlist = array();
$iflist = get_configured_interface_with_descr();
-foreach ($iflist as $ifnam => $ifdescr)
+foreach ($iflist as $ifnam => $ifdescr) {
$optionlist[$ifnam] = $ifdescr;
+}
$section->addInput(new Form_Select(
'ifname',
@@ -201,7 +204,7 @@ $section->addInput(new Form_Select(
['upstream' => gettext('Upstream Interface'), 'downstream' => gettext('Downstream Interface')]
))->setHelp('The upstream network interface is the outgoing interface which is responsible for communicating to available multicast data sources .' .
'There can only be one upstream interface.' . '<br />' .
- 'Downstream network interfaces are the distribution interfaces to the destination networks, where multicast clients can join groups and '.
+ 'Downstream network interfaces are the distribution interfaces to the destination networks, where multicast clients can join groups and '.
'receive multicast data. One or more downstream interfaces must be configured.');
$section->addInput(new Form_Input(
@@ -212,7 +215,7 @@ $section->addInput(new Form_Input(
))->setHelp('Defines the TTL threshold for the network interface. Packets with a lower TTL than the threshold value will be ignored. ' .
'This setting is optional, and by default the threshold is 1.');
-if (isset($id) && $a_igmpproxy[$id]){
+if (isset($id) && $a_igmpproxy[$id]) {
$section->addInput(new Form_Input(
'id',
null,
@@ -224,68 +227,54 @@ if (isset($id) && $a_igmpproxy[$id]){
$counter = 0;
$address = $pconfig['address'];
-if ($address != "") {
- $item = explode(" ", $address);
- $rows = count($item) -1;
- foreach($item as $ww) {
- $address = $item[$counter];
- $address_subnet = "";
- $item2 = explode("/", $address);
- foreach($item2 as $current) {
- if($item2[1] != "") {
- $address = $item2[0];
- $address_subnet = $item2[1];
- }
+//if ($address == "") {
+// $address = "/";
+//}
+
+$item = explode(" ", $address);
+$rows = count($item) -1;
+
+foreach ($item as $ww) {
+ $address = $item[$counter];
+ $address_subnet = "";
+ $item2 = explode("/", $address);
+
+ foreach ($item2 as $current) {
+ if ($item2[1] != "") {
+ $address = $item2[0];
+ $address_subnet = $item2[1];
}
- $item4 = $item3[$counter];
- $tracker = $counter;
-
- $group = new Form_group($tracker == 0? 'Network':null);
-
- $group->add(new Form_Input(
- 'address' . $tracker,
- null,
- 'text',
- $address,
- ['placeholder' => 'Address']
- ))->sethelp($tracker == $rows ? 'Network':null);
-
- $group->add(new Form_Select(
- 'ifname',
- 'Interface',
- $address_subnet,
- array_combine(range(32, 1, -1), range(32, 1, -1))
- ))->sethelp($tracker == $rows ? 'CIDR':null);;
-
- $btndel = new Form_Button (
- 'removerow',
- 'Remove',
- 'services_igmpproxy_edit.php?act=delrow&row=' . $tracker
- );
-
- $btndel->removeClass('btn-primary')->addClass('btn-danger btn-sm');
- $group->add($btndel);
-
- $counter++;
- $section->add($group);
- } // end foreach
-} // end if
-
-$btnadd = new Form_Button (
- 'addrow',
- 'Add Network',
- 'services_igmpproxy_edit.php?act=addrow'
- );
-
-$btnadd->removeClass('btn-primary')->addClass('btn-success btn-sm');
-
-$section->addInput(new Form_StaticText(
- null,
- $btnadd . ' (Save after each Add or Delete)'
-));
+ }
+
+ $item4 = $item3[$counter];
+ $tracker = $counter;
+
+ $group = new Form_group($tracker == 0? 'Networks':null);
+ $group->addClass("repeatable");
+
+ $group->add(new Form_IpAddress(
+ 'address' . $tracker,
+ null,
+ $address,
+ ['placeholder' => 'Address']
+ ))->sethelp($tracker == $rows ? 'Network/CIDR':null)->addMask('address_subnet' . $tracker, $address_subnet)->setWidth(4)->setPattern('[0-9, a-z, A-Z and .');
+
+ $group->add(new Form_Button(
+ 'deleterow' . $counter,
+ 'Delete'
+ ))->removeClass('btn-primary')->addClass('btn-warning');
+
+ $counter++;
+ $section->add($group);
+} // end foreach
+
+$section->addInput(new Form_Button(
+ 'addrow',
+ 'Add network'
+))->removeClass('btn-primary')->addClass('btn-success addbtn');
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_ntpd.php b/src/usr/local/www/services_ntpd.php
index 36af8b7..0600045 100644
--- a/src/usr/local/www/services_ntpd.php
+++ b/src/usr/local/www/services_ntpd.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2013 Dagorlad
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -54,9 +53,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: ntpd
-*/
##|+PRIV
##|*IDENT=page-services-ntpd
@@ -76,7 +72,7 @@ if (!is_array($config['ntpd'])) {
if (empty($config['ntpd']['interface'])) {
if (is_array($config['installedpackages']['openntpd']) && is_array($config['installedpackages']['openntpd']['config']) &&
- is_array($config['installedpackages']['openntpd']['config'][0]) && !empty($config['installedpackages']['openntpd']['config'][0]['interface'])) {
+ is_array($config['installedpackages']['openntpd']['config'][0]) && !empty($config['installedpackages']['openntpd']['config'][0]['interface'])) {
$pconfig['interface'] = explode(",", $config['installedpackages']['openntpd']['config'][0]['interface']);
unset($config['installedpackages']['openntpd']);
write_config("Upgraded settings from openttpd");
@@ -108,7 +104,7 @@ if ($_POST) {
unset($config['ntpd']['noselect']);
$timeservers = '';
- for ($i = 0; $i < 10; $i++) {
+ for ($i = 0; $i < NUMTIMESERVERS; $i++) {
$tserver = trim($_POST["server{$i}"]);
if (!empty($tserver)) {
$timeservers .= "{$tserver} ";
@@ -262,21 +258,22 @@ function build_interface_list() {
return($iflist);
}
-$closehead = false;
$pconfig = &$config['ntpd'];
if (empty($pconfig['interface'])) {
$pconfig['interface'] = array();
} else {
$pconfig['interface'] = explode(",", $pconfig['interface']);
}
-$pgtitle = array(gettext("Services"), gettext("NTP"));
+$pgtitle = array(gettext("Services"), gettext("NTP"), gettext("NTP"));
$shortcut_section = "ntp";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
+}
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("NTP"), true, "services_ntpd.php");
@@ -284,8 +281,6 @@ $tab_array[] = array(gettext("Serial GPS"), false, "services_ntpd_gps.php");
$tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form;
$section = new Form_Section('NTP server configuration');
@@ -302,8 +297,8 @@ $section->addInput(new Form_Select(
'Selecting no interfaces will listen on all interfaces with a wildcard.' . '<br />' .
'Selecting all interfaces will explicitly listen on only the interfaces/IPs specified.');
-$maxrows = 3;
-$timeservers = explode( ' ', $config['system']['timeservers']);
+$timeservers = explode(' ', $config['system']['timeservers']);
+$maxrows = max(count($timeservers), 1);
for ($counter=0; $counter < $maxrows; $counter++) {
$group = new Form_Group($counter == 0 ? 'Time servers':'');
$group->addClass('repeatable');
@@ -501,15 +496,16 @@ print($form);
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
// If this variable is declared, any help text will not be deleted when rows are added
// IOW the help text will appear on every row
retainhelp = true;
</script>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Make the ‘clear’ button a plain button, not a submit button
$('#btnadvstats').prop('type','button');
@@ -554,8 +550,11 @@ events.push(function(){
hideCheckbox('notrap', true);
hideInput('leaptext', true);
hideInput('leapfile', true);
+
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
});
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_ntpd_gps.php b/src/usr/local/www/services_ntpd_gps.php
index 16b0b68..fc60424 100644
--- a/src/usr/local/www/services_ntpd_gps.php
+++ b/src/usr/local/www/services_ntpd_gps.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
services_ntpd_gps.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2013 Dagorlad
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,14 +53,11 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: ntpd_gps
-*/
##|+PRIV
##|*IDENT=page-services-ntpd-gps
-##|*NAME=Services: NTP Serial GPS page
-##|*DESCR=Allow access to the 'Services: NTP Serial GPS' page..
+##|*NAME=Services: NTP Serial GPS
+##|*DESCR=Allow access to the 'Services: NTP Serial GPS' page.
##|*MATCH=services_ntpd_gps.php*
##|-PRIV
@@ -213,20 +208,21 @@ function build_nmea_list() {
$nmealist['options'][4] = 'GLL';
$nmealist['options'][8] = 'ZDA or ZDG';
- if(!$pconfig['nmea'])
+ if (!$pconfig['nmea']) {
array_push($nmealist['selected'], 0);
+ }
- foreach($nmealist['options'] as $val => $opt) {
- if($pconfig['nmea'] & $val)
+ foreach ($nmealist['options'] as $val => $opt) {
+ if ($pconfig['nmea'] & $val) {
array_push($nmealist['selected'], $val);
+ }
}
return($nmealist);
}
-$closehead = false;
$pconfig = &$config['ntpd']['gps'];
-$pgtitle = array(gettext("Services"), gettext("NTP GPS"));
+$pgtitle = array(gettext("Services"), gettext("NTP"), gettext("Serial GPS"));
$shortcut_section = "ntp";
include("head.inc");
@@ -236,8 +232,6 @@ $tab_array[] = array(gettext("Serial GPS"), true, "services_ntpd_gps.php");
$tab_array[] = array(gettext("PPS"), false, "services_ntpd_pps.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form;
$section = new Form_Section('NTP Serial GPS Configuration');
@@ -258,9 +252,9 @@ $section->addInput(new Form_Select(
'GPS',
$pconfig['type'],
array_combine($gpstypes, $gpstypes)
-))->setHelp('This option allows you to select a predefined configuration.' .
+))->setHelp('This option allows you to select a predefined configuration. ' .
'Default is the configuration of pfSense 2.1 and earlier (not recommended). Select Generic if your GPS is not listed.' . '<br /><br />' .
- 'The perdefined configurations assume your GPS has already been set to NMEA mode.');
+ 'The predefined configurations assume your GPS has already been set to NMEA mode.');
$serialports = glob("/dev/cua?[0-9]{,.[0-9]}", GLOB_BRACE);
@@ -268,7 +262,7 @@ if (!empty($serialports)) {
$splist = array();
foreach ($serialports as $port) {
- $shortport = substr($port,5);
+ $shortport = substr($port, 5);
$splist[$shortport] = $shortport;
}
@@ -276,7 +270,7 @@ if (!empty($serialports)) {
'gpsport',
'Serial port',
$pconfig['port'],
- $splist
+ $splist
))->setHelp('All serial ports are listed, be sure to pick the port with the GPS attached. ');
$section->addInput(new Form_Select(
@@ -329,7 +323,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Checkbox(
'gpsselect',
null,
- 'NTP should not use this clock, it will be displayed for reference only(default: disabled).',
+ 'NTP should not use this clock, it will be displayed for reference only (default: disabled).',
$pconfig['noselect']
));
@@ -429,15 +423,15 @@ print($form);
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function NMEAChecksum(cmd) {
// Compute the checksum by XORing all the character values in the string.
var checksum = 0;
- for(var i = 0; i < cmd.length; i++) {
+ for (var i = 0; i < cmd.length; i++) {
checksum = checksum ^ cmd.charCodeAt(i);
}
// Convert it to hexadecimal (base-16, upper case, most significant byte first).
@@ -552,4 +546,4 @@ events.push(function(){
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_ntpd_pps.php b/src/usr/local/www/services_ntpd_pps.php
index 8cd740d..98c1b37 100644
--- a/src/usr/local/www/services_ntpd_pps.php
+++ b/src/usr/local/www/services_ntpd_pps.php
@@ -1,41 +1,63 @@
<?php
-/* $Id$ */
/*
services_ntpd_pps.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2013 Dagorlad
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: ntpd_pps
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2013 Dagorlad
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-ntpd-pps
-##|*NAME=Services: NTP PPS page
-##|*DESCR=Allow access to the 'Services: NTP PPS' page..
+##|*NAME=Services: NTP PPS
+##|*DESCR=Allow access to the 'Services: NTP PPS' page.
##|*MATCH=services_ntpd_pps.php*
##|-PRIV
@@ -111,15 +133,17 @@ if ($_POST) {
$pconfig = &$config['ntpd']['pps'];
-$pgtitle = array(gettext("Services"), gettext("NTP PPS"));
+$pgtitle = array(gettext("Services"), gettext("NTP"), gettext("PPS"));
$shortcut_section = "ntp";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-if ($savemsg)
+}
+
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("NTP"), false, "services_ntpd.php");
@@ -127,18 +151,16 @@ $tab_array[] = array(gettext("Serial GPS"), false, "services_ntpd_gps.php");
$tab_array[] = array(gettext("PPS"), true, "services_ntpd_pps.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
-$form = new Form;
+$form = new Form;
$section = new Form_Section('NTP Serial PPS Configuration');
$section->addInput(new Form_StaticText(
'Notes',
- 'Devices with a Pulse Per Second output such as radios that receive a time signal from DCF77 (DE), JJY (JP), MSF (GB) or WWVB (US) may be used as a PPS reference for NTP.' .
- 'A serial GPS may also be used, but the serial GPS driver would usually be the better option. ' .
+ 'Devices with a Pulse Per Second output such as radios that receive a time signal from DCF77 (DE), JJY (JP), MSF (GB) or WWVB (US) may be used as a PPS reference for NTP. ' .
+ 'A serial GPS may also be used, but the serial GPS driver would usually be the better option. ' .
'A PPS signal only provides a reference to the change of a second, so at least one other source to number the seconds is required.' . '<br /><br />' .
- 'At least 3 additional time sources should be configured under ' .
+ 'At least 3 additional time sources should be configured under ' .
'<a href="services_ntpd.php">' . 'Services > NTP' . '</a>' . ' to reliably supply the time of each PPS pulse.'
));
@@ -146,12 +168,12 @@ $serialports = glob("/dev/cua?[0-9]{,.[0-9]}", GLOB_BRACE);
if (!empty($serialports)) {
$splist = array();
-
+
foreach ($serialports as $port) {
- $shortport = substr($port,5);
+ $shortport = substr($port, 5);
$splist[$shortport] = $shortport;
}
-
+
$section->addInput(new Form_Select(
'ppsport',
'Serial port',
@@ -206,4 +228,4 @@ $section->addInput(new Form_Input(
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_pppoe.php b/src/usr/local/www/services_pppoe.php
new file mode 100644
index 0000000..109520b
--- /dev/null
+++ b/src/usr/local/www/services_pppoe.php
@@ -0,0 +1,179 @@
+<?php
+/*
+ services_pppoe.php
+*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-services-pppoeserver
+##|*NAME=Services: PPPoE Server
+##|*DESCR=Allow access to the 'Services: PPPoE Server' page.
+##|*MATCH=services_pppoe.php*
+##|-PRIV
+
+require_once("guiconfig.inc");
+require_once("filter.inc");
+require_once("vpn.inc");
+
+if (!is_array($config['pppoes']['pppoe'])) {
+ $config['pppoes']['pppoe'] = array();
+}
+
+$a_pppoes = &$config['pppoes']['pppoe'];
+
+if ($_POST) {
+ $pconfig = $_POST;
+
+ if ($_POST['apply']) {
+ if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) {
+ $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.vpn_pppoe.apply"));
+ foreach ($toapplylist as $pppoeid) {
+ if (!is_numeric($pppoeid)) {
+ continue;
+ }
+ if (is_array($config['pppoes']['pppoe'])) {
+ foreach ($config['pppoes']['pppoe'] as $pppoe) {
+ if ($pppoe['pppoeid'] == $pppoeid) {
+ vpn_pppoe_configure($pppoe);
+ break;
+ }
+ }
+ }
+ }
+ @unlink("{$g['tmp_path']}/.vpn_pppoe.apply");
+ }
+ $retval = 0;
+ $retval |= filter_configure();
+ $savemsg = get_std_save_message($retval);
+ clear_subsystem_dirty('vpnpppoe');
+ }
+}
+
+if ($_GET['act'] == "del") {
+ if ($a_pppoes[$_GET['id']]) {
+ if ("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid") {
+ killbypid("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid");
+ }
+ if (is_dir("{$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'])) {
+ mwexec("/bin/rm -r {$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid']);
+ }
+ unset($a_pppoes[$_GET['id']]);
+ write_config();
+ header("Location: services_pppoe.php");
+ exit;
+ }
+}
+
+$pgtitle = array(gettext("Services"), gettext("PPPoE Server"));
+$shortcut_section = "pppoes";
+include("head.inc");
+
+if ($savemsg) {
+ print_info_box($savemsg, 'success');
+}
+
+if (is_subsystem_dirty('vpnpppoe')) {
+ print_info_box_np(gettext('The PPPoE entry list has been changed') . '.<br />' . gettext('You must apply the changes in order for them to take effect.'));
+}
+?>
+
+<div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed">
+ <thead>
+ <tr>
+ <th><?=gettext("Interface")?></th>
+ <th><?=gettext("Local IP")?></th>
+ <th><?=gettext("Number of users")?></th>
+ <th><?=gettext("Description")?></th>
+ <th><!-- Action buttons --></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+$i = 0;
+foreach ($a_pppoes as $pppoe):
+?>
+ <tr>
+ <td>
+ <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($pppoe['interface']))?>
+ </td>
+ <td>
+ <?=htmlspecialchars($pppoe['localip'])?>
+ </td>
+ <td>
+ <?=htmlspecialchars($pppoe['n_pppoe_units'])?>
+ </td>
+ <td>
+ <?=htmlspecialchars($pppoe['descr'])?>
+ </td>
+ <td>
+ <a class="fa fa-pencil" title="<?=gettext('Edit PPPoE instance')?>" href="services_pppoe_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete PPPoE instance')?>" href="services_pppoe.php?act=del&amp;id=<?=$i?>"></a>
+ </td>
+ </tr>
+<?php
+ $i++;
+endforeach;
+?>
+ </tbody>
+ </table>
+</div>
+
+<nav class="action-buttons">
+ <a href="services_pppoe_edit.php" class="btn btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
+
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/vpn_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php
index d6540a5..2392733 100644
--- a/src/usr/local/www/vpn_pppoe_edit.php
+++ b/src/usr/local/www/services_pppoe_edit.php
@@ -1,10 +1,9 @@
<?php
/*
- vpn_pppoe_edit.php
+ services_pppoe_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -56,9 +55,9 @@
##|+PRIV
##|*IDENT=page-services-pppoeserver-edit
-##|*NAME=Services: PPPoE Server: Edit page
+##|*NAME=Services: PPPoE Server: Edit
##|*DESCR=Allow access to the 'Services: PPPoE Server: Edit' page.
-##|*MATCH=vpn_pppoe_edit.php*
+##|*MATCH=services_pppoe_edit.php*
##|-PRIV
require("guiconfig.inc");
@@ -89,8 +88,8 @@ $a_pppoes = &$config['pppoes']['pppoe'];
if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
-
-if (isset($_POST['id']) && is_numericint($_POST['id']))
+}
+if (isset($_POST['id']) && is_numericint($_POST['id'])) {
$id = $_POST['id'];
}
@@ -163,7 +162,7 @@ if ($_POST) {
$subnet_start = ip2ulong($_POST['remoteip']);
$subnet_end = ip2ulong($_POST['remoteip']) + $_POST['pppoe_subnet'] - 1;
if ((ip2ulong($_POST['localip']) >= $subnet_start) &&
- (ip2ulong($_POST['localip']) <= $subnet_end)) {
+ (ip2ulong($_POST['localip']) <= $subnet_end)) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip($_POST['interface'])) {
@@ -207,7 +206,9 @@ if ($_POST) {
$pppoecfg['radius']['server'] = array();
$pppoecfg['radius']['server']['ip'] = $_POST['radiusserver'];
- $pppoecfg['radius']['server']['secret'] = $_POST['radiussecret'];
+ if ($_POST['radiussecret'] != DMYPWD) {
+ $pppoecfg['radius']['server']['secret'] = $_POST['radiussecret'];
+ }
$pppoecfg['radius']['server']['port'] = $_POST['radiusserverport'];
$pppoecfg['radius']['server']['acctport'] = $_POST['radiusserveracctport'];
}
@@ -216,7 +217,9 @@ if ($_POST) {
$pppoecfg['radius']['server2'] = array();
$pppoecfg['radius']['server2']['ip'] = $_POST['radiusserver2'];
- $pppoecfg['radius']['server2']['secret2'] = $_POST['radiussecret2'];
+ if ($_POST['radiussecret2'] != DMYPWD) {
+ $pppoecfg['radius']['server2']['secret2'] = $_POST['radiussecret2'];
+ }
$pppoecfg['radius']['server2']['port'] = $_POST['radiusserver2port'];
$pppoecfg['radius']['server2']['acctport'] = $_POST['radiusserver2acctport'];
}
@@ -283,7 +286,7 @@ if ($_POST) {
write_config();
mark_subsystem_dirty('vpnpppoe');
file_put_contents("{$g['tmp_path']}/.vpn_pppoe.apply", serialize($toapplylist));
- header("Location: vpn_pppoe.php");
+ header("Location: services_pppoe.php");
exit;
}
}
@@ -293,23 +296,24 @@ function build_interface_list() {
$interfaces = get_configured_interface_with_descr();
- foreach ($interfaces as $iface => $ifacename)
+ foreach ($interfaces as $iface => $ifacename) {
$list[$iface] = $ifacename;
+ }
return($list);
}
-$pgtitle = array(gettext("Services"),gettext("PPPoE Server"), gettext("Edit"));
+$pgtitle = array(gettext("Services"), gettext("PPPoE Server"), gettext("Edit"));
$shortcut_section = "pppoes";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -434,7 +438,7 @@ $group->add(new Form_Input(
null,
'text',
$pconfig['radiusserverport']
-))->setHelp('Authentication port ');
+))->setHelp('Authentication port');
$group->add(new Form_Input(
'radiusserveracctport',
@@ -447,7 +451,7 @@ $group->setHelp('Standard ports are 1812 (authentication) and 1813 (accounting)'
$section->add($group);
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'radiussecret',
'RADIUS primary shared secret',
'password',
@@ -467,7 +471,7 @@ $group->add(new Form_Input(
null,
'text',
$pconfig['radiusserver2port']
-))->setHelp('Authentication port ');
+))->setHelp('Authentication port');
$group->add(new Form_Input(
'radiusserver2acctport',
@@ -480,7 +484,7 @@ $group->setHelp('Standard ports are 1812 (authentication) and 1813 (accounting)'
$section->add($group);
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'radiussecret2',
'RADIUS secondary shared secret',
'password',
@@ -495,15 +499,16 @@ $usernames = $pconfig['username'];
//DEBUG
//$usernames = 'sbeaver:TXlQYXNzd2Q=:192.168.1.1 smith:TXlQYXNzd2Q=:192.168.2.1 sjones:TXlQYXNzd2Q=:192.168.3.1 salpha:TXlQYXNzd2Q=:192.168.4.1';
-if($usernames == "")
+if ($usernames == "") {
$usernames = '::';
+}
-if ($usernames != ""){
+if ($usernames != "") {
$item = explode(" ", $usernames);
$numrows = count($item) -1;
- foreach($item as $ww) {
+ foreach ($item as $ww) {
$wws = explode(":", $ww);
$user = $wws[0];
$passwd = base64_decode($wws[1]);
@@ -556,7 +561,7 @@ $section->addInput(new Form_StaticText(
));
// Hidden fields
-if(isset($id)) {
+if (isset($id)) {
$section->addInput(new Form_Input(
'id',
null,
@@ -580,15 +585,16 @@ print($form);
print_info_box(gettext('Don\'t forget to add a firewall rule to permit traffic from PPPoE clients'));
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// show/hide radius server controls
function hide_radius(hide) {
disableInput('radacct_enable', hide);
disableInput('radiusserver', hide);
disableInput('radiussecret', hide);
+ disableInput('radiussecret_confirm', hide);
disableInput('radiusserverport', hide);
disableInput('radiusserveracctport', hide);
disableInput('radiusissueips', hide);
@@ -603,6 +609,7 @@ events.push(function(){
function hide_radius2(hide) {
disableInput('radiusserver2', hide);
disableInput('radiussecret2', hide);
+ disableInput('radiussecret2_confirm', hide);
disableInput('radiusserver2port', hide);
disableInput('radiusserver2acctport', hide);
}
@@ -610,10 +617,11 @@ events.push(function(){
// When the RADIUS checkbox is clicked . .
$('#radiusenable').click(function () {
hide_radius(!$('#radiusenable').prop('checked'));
- if(!$('#radiusenable').prop('checked'))
+ if (!$('#radiusenable').prop('checked')) {
hide_radius2(true);
- else
+ } else {
hide_radius2(!$('#radiussecenable').prop('checked'));
+ }
});
// When the 'Use backup RADIUS' checkbox is clicked . .
@@ -625,8 +633,11 @@ events.push(function(){
hide_radius2(!$('#radiussecenable').prop('checked'));
hide_radius(!$('#radiusenable').prop('checked'));
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+
});
//]]>
</script>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_rfc2136.php b/src/usr/local/www/services_rfc2136.php
index a73880a..3a01332 100644
--- a/src/usr/local/www/services_rfc2136.php
+++ b/src/usr/local/www/services_rfc2136.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
services_rfc2136.php
-
- Copyright (C) 2008 Ermal Luçi
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsupdate
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-rfc2136clients
-##|*NAME=Services: RFC 2136 clients page
-##|*DESCR=Allow access to the 'Services: RFC 2136 clients' page.
+##|*NAME=Services: RFC 2136 Clients
+##|*DESCR=Allow access to the 'Services: RFC 2136 Clients' page.
##|*MATCH=services_rfc2136.php*
##|-PRIV
@@ -54,18 +75,31 @@ if ($_GET['act'] == "del") {
header("Location: services_rfc2136.php");
exit;
+} else if ($_GET['act'] == "toggle") {
+ if ($a_rfc2136[$_GET['id']]) {
+ if (isset($a_rfc2136[$_GET['id']]['enable'])) {
+ unset($a_rfc2136[$_GET['id']]['enable']);
+ } else {
+ $a_rfc2136[$_GET['id']]['enable'] = true;
+ }
+ write_config();
+
+ header("Location: services_rfc2136.php");
+ exit;
+ }
}
-$pgtitle = array(gettext("Services"), gettext("RFC 2136 clients"));
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS"), gettext("RFC 2136 Clients"));
include("head.inc");
$tab_array = array();
-$tab_array[] = array(gettext("DynDns"), false, "services_dyndns.php");
+$tab_array[] = array(gettext("Dynamic DNS"), false, "services_dyndns.php");
$tab_array[] = array(gettext("RFC 2136"), true, "services_rfc2136.php");
display_top_tabs($tab_array);
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
?>
<form action="services_rfc2136.php" method="post" name="iform" id="iform">
@@ -90,7 +124,7 @@ $iflist = get_configured_interface_with_descr();
$i = 0;
foreach ($a_rfc2136 as $rfc2136):
?>
- <tr <?=(isset($rfc2136['enable']) ? '' : 'class="disabled"')?>">
+ <tr<?=(isset($rfc2136['enable']) ? '' : ' class="disabled"')?>>
<td>
<?php
foreach ($iflist as $if => $ifdesc) {
@@ -113,21 +147,23 @@ foreach ($a_rfc2136 as $rfc2136):
if (file_exists($filename)) {
print('IPv4: ');
- if (isset($rfc2136['usepublicip']))
+ if (isset($rfc2136['usepublicip'])) {
$ipaddr = dyndnsCheckIP($rfc2136['interface']);
- else
+ } else {
$ipaddr = get_interface_ip($rfc2136['interface']);
+ }
$cached_ip_s = explode("|", file_get_contents($filename));
$cached_ip = $cached_ip_s[0];
- if ($ipaddr != $cached_ip)
- print('<font color="red">');
- else
- print('<font color="green">');
+ if ($ipaddr != $cached_ip) {
+ print('<span class="text-danger">');
+ } else {
+ print('<span class="text-success">');
+ }
- print(tmlspecialchars($cached_ip));
- print('</font>');
+ print(htmlspecialchars($cached_ip));
+ print('</span>');
} else {
print('IPv4: N/A');
}
@@ -140,27 +176,36 @@ foreach ($a_rfc2136 as $rfc2136):
$cached_ip_s = explode("|", file_get_contents("{$filename}.ipv6"));
$cached_ip = $cached_ip_s[0];
- if ($ipaddr != $cached_ip)
- print('<font color="red">');
- else
- print('<font color="green">');
+ if ($ipaddr != $cached_ip) {
+ print('<span class="text-danger">');
+ } else {
+ print('<span class="text-success">');
+ }
print(htmlspecialchars($cached_ip));
- print('</font>');
+ print('</span>');
} else {
print('IPv6: N/A');
}
?>
- </td>
- <td>
- <?=htmlspecialchars($rfc2136['descr'])?>
- </td>
- <td>
- <a href="services_rfc2136_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_rfc2136.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
- </td>
- </tr>
+ </td>
+ <td>
+ <?=htmlspecialchars($rfc2136['descr'])?>
+ </td>
+ <td>
+ <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="services_rfc2136_edit.php?id=<?=$i?>"></a>
+ <?php if (isset($rfc2136['enable'])) {
+ ?>
+ <a class="fa fa-ban" title="<?=gettext('Disable client')?>" href="?act=toggle&amp;id=<?=$i?>"></a>
+ <?php } else {
+ ?>
+ <a class="fa fa-check-square-o" title="<?=gettext('Enable client')?>" href="?act=toggle&amp;id=<?=$i?>"></a>
+ <?php }
+ ?>
+ <a class="fa fa-trash" title="<?=gettext('Delete client')?>" href="services_rfc2136.php?act=del&amp;id=<?=$i?>"></a>
+ </td>
+ </tr>
<?php
$i++;
endforeach; ?>
@@ -171,8 +216,11 @@ endforeach; ?>
</form>
<nav class="action-buttons">
- <a href="services_rfc2136_edit.php" class="btn btn-sm btn-success"><?=gettext('Add')?></a>
+ <a href="services_rfc2136_edit.php" class="btn btn-sm btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_rfc2136_edit.php b/src/usr/local/www/services_rfc2136_edit.php
index 2949632..88da96f 100644
--- a/src/usr/local/www/services_rfc2136_edit.php
+++ b/src/usr/local/www/services_rfc2136_edit.php
@@ -1,36 +1,64 @@
<?php
-/* $Id$ */
/*
services_rfc2136_edit.php
-
- Copyright (C) 2008 Ermal Luçi
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsupdate
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-services-rfc2136edit
+##|*NAME=Services: RFC 2136 Client: Edit
+##|*DESCR=Allow access to the 'Services: RFC 2136 Client: Edit' page.
+##|*MATCH=services_rfc2136.php*
+##|-PRIV
require("guiconfig.inc");
@@ -129,16 +157,16 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Services"), gettext("RFC 2136 client"), gettext("Edit"));
+$pgtitle = array(gettext("Services"), gettext("Dynamic DNS"), gettext("RFC 2136 Client"), gettext("Edit"));
include("head.inc");
-require_once('classes/Form.class.php');
-
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
$form = new Form;
@@ -154,13 +182,14 @@ $section->addInput(new Form_Checkbox(
$optionlist = array();
$iflist = get_configured_interface_with_descr();
-foreach ($iflist as $ifnam => $ifdescr)
+foreach ($iflist as $ifnam => $ifdescr) {
$optionlist[$ifnam] = $ifdescr;
+}
$section->addInput(new Form_Select(
- 'ifname',
+ 'interface',
'Interface',
- $pconfig['ifname'],
+ $pconfig['interface'],
$optionlist
));
@@ -191,23 +220,23 @@ $group->add(new Form_Checkbox(
'keytype',
'Key Type',
'Zone',
- ($pconfig['keytype']=='zone'),
+ ($pconfig['keytype'] == 'zone'),
'zone'
))->displayAsRadio();
-$group->add($input = new Form_Checkbox(
+$group->add(new Form_Checkbox(
'keytype',
'Key Type',
'Host',
- ($pconfig['keytype']=='host'),
+ ($pconfig['keytype'] == 'host'),
'host'
))->displayAsRadio();
-$group->add($input = new Form_Checkbox(
+$group->add(new Form_Checkbox(
'keytype',
'Key Type',
'User',
- ($pconfig['keytype']=='user'),
+ ($pconfig['keytype'] == 'user'),
'user'
))->displayAsRadio();
@@ -247,23 +276,23 @@ $group->add(new Form_Checkbox(
'recordtype',
'Record Type',
'A (IPv4)',
- ($pconfig['keytype']=='A'),
+ ($pconfig['recordtype'] == 'A'),
'A'
))->displayAsRadio();
-$group->add($input = new Form_Checkbox(
+$group->add(new Form_Checkbox(
'recordtype',
'Record Type',
'AAAA (IPv6)',
- ($pconfig['keytype']=='AAAA'),
+ ($pconfig['recordtype'] == 'AAAA'),
'AAAA'
))->displayAsRadio();
-$group->add($input = new Form_Checkbox(
+$group->add(new Form_Checkbox(
'recordtype',
'Record Type',
'Both',
- ($pconfig['keytype']=='both'),
+ ($pconfig['recordtype'] == 'both'),
'both'
))->displayAsRadio();
@@ -276,7 +305,7 @@ $section->addInput(new Form_Input(
$pconfig['descr']
))->setHelp('You may enter a description here for your reference (not parsed).');
-if (isset($id) && $a_rfc2136[$id]){
+if (isset($id) && $a_rfc2136[$id]) {
$section->addInput(new Form_Input(
'id',
null,
@@ -292,4 +321,4 @@ print_info_box(sprintf('You must configure a DNS server in %sSystem: ' .
'General setup %sor allow the DNS server list to be overridden ' .
'by DHCP/PPP on WAN for dynamic DNS updates to work.','<a href="system.php">', '</a>'));
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php
index 8c001f9..1693b4a 100644
--- a/src/usr/local/www/services_router_advertisements.php
+++ b/src/usr/local/www/services_router_advertisements.php
@@ -1,13 +1,14 @@
<?php
-/* $Id$ */
/*
services_router_advertisements.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -55,14 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-services-router-advertisements
-##|*NAME=Services: Router advertisementspage
+##|*NAME=Services: Router Advertisements
##|*DESCR=Allow access to the 'Services: Router Advertisements' page.
##|*MATCH=services_router_advertisements.php*
##|-PRIV
@@ -106,7 +103,7 @@ if (!$if || !isset($iflist[$if])) {
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
- (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
+ (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
continue;
}
$if = $ifent;
@@ -123,7 +120,7 @@ if (is_array($config['dhcpdv6'][$if])) {
}
$pconfig['rainterface'] = $config['dhcpdv6'][$if]['rainterface'];
$pconfig['radomainsearchlist'] = $config['dhcpdv6'][$if]['radomainsearchlist'];
- list($pconfig['radns1'], $pconfig['radns2'], $pconfig['radns3'], $pconfig['radns4']) = $config['dhcpdv6'][$if]['radnsserver'];
+ list($pconfig['radns1'], $pconfig['radns2'], $pconfig['radns3']) = $config['dhcpdv6'][$if]['radnsserver'];
$pconfig['rasamednsasdhcp6'] = isset($config['dhcpdv6'][$if]['rasamednsasdhcp6']);
$pconfig['subnets'] = $config['dhcpdv6'][$if]['subnets']['item'];
@@ -178,7 +175,7 @@ if ($_POST) {
}
}
- if (($_POST['radns1'] && !is_ipaddrv6($_POST['radns1'])) || ($_POST['radns2'] && !is_ipaddrv6($_POST['radns2'])) || ($_POST['radns3'] && !is_ipaddrv6($_POST['radns3'])) || ($_POST['radns4'] && !is_ipaddrv6($_POST['radns4']))) {
+ if (($_POST['radns1'] && !is_ipaddrv6($_POST['radns1'])) || ($_POST['radns2'] && !is_ipaddrv6($_POST['radns2'])) || ($_POST['radns3'] && !is_ipaddrv6($_POST['radns3']))) {
$input_errors[] = gettext("A valid IPv6 address must be specified for each of the DNS servers.");
}
if ($_POST['radomainsearchlist']) {
@@ -211,9 +208,6 @@ if ($_POST) {
if ($_POST['radns3']) {
$config['dhcpdv6'][$if]['radnsserver'][] = $_POST['radns3'];
}
- if ($_POST['radns4']) {
- $config['dhcpdv6'][$if]['radnsserver'][] = $_POST['radns4'];
- }
$config['dhcpdv6'][$if]['rasamednsasdhcp6'] = ($_POST['rasamednsasdhcp6']) ? true : false;
@@ -229,15 +223,17 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("Services"), gettext("Router advertisements"));
+$pgtitle = array(gettext("Services"), gettext("Router Advertisements"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
/* active tabs */
$tab_array = array();
@@ -247,7 +243,7 @@ foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
// We need at least one interface configured with a NON-LOCAL IPv6 static address. fd80:8dba:82e1::/64 fits the bill
if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) ||
- (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
+ (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) {
continue;
}
@@ -257,7 +253,7 @@ foreach ($iflist as $ifent => $ifname) {
$active = false;
}
- $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}");
+ $tab_array[] = array($ifname, $active, "services_router_advertisements.php?if={$ifent}");
$tabscounter++;
}
@@ -271,9 +267,7 @@ display_top_tabs($tab_array);
$tab_array = array();
$tab_array[] = array(gettext("DHCPv6 Server"), false, "services_dhcpv6.php?if={$if}");
$tab_array[] = array(gettext("Router Advertisements"), true, "services_router_advertisements.php?if={$if}");
-display_top_tabs($tab_array);
-
-require_once('classes/Form.class.php');
+display_top_tabs($tab_array, false, 'nav nav-tabs');
$form = new Form(new Form_Button(
'Submit',
@@ -332,8 +326,9 @@ $section->addInput(new Form_StaticText(
));
-if(empty($pconfig['subnets']))
+if (empty($pconfig['subnets'])) {
$pconfig['subnets'] = array('0' => '/128');
+}
$counter = 0;
$numrows = count($pconfig['subnets']) - 1;
@@ -372,12 +367,12 @@ $form->add($section);
$section = new Form_Section('DNS Configuration');
-for($idx=1; $idx<=4; $idx++) {
+for ($idx=1; $idx<=3; $idx++) {
$section->addInput(new Form_IpAddress(
'radns' . $idx,
'Server ' . $idx,
$pconfig['radns' . $idx]
- ))->setPattern('[0-9, a-z, A-Z and .')->setHelp(($idx < 4) ? '':'Leave blank to use the system default DNS servers - this interface\'s IP if DNS Forwarder or Resolver is enabled, otherwise the servers configured on the General page');
+ ))->setPattern('[0-9, a-z, A-Z and .')->setHelp(($idx < 3) ? '':'Leave blank to use the system default DNS servers - this interface\'s IP if DNS Forwarder or Resolver is enabled, otherwise the servers configured on the General page');
}
$section->addInput(new Form_Input(
@@ -406,14 +401,16 @@ $form->add($section);
print($form);
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network", "openvpn", "urltable"))) ?>;
- $('#radns1, #radns2, #radns3, #radns4').autocomplete({
+ $('#radns1, #radns2, #radns3').autocomplete({
source: addressarray
});
@@ -421,4 +418,4 @@ events.push(function(){
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_snmp.php b/src/usr/local/www/services_snmp.php
index 3494add..58e1b44 100644
--- a/src/usr/local/www/services_snmp.php
+++ b/src/usr/local/www/services_snmp.php
@@ -1,44 +1,64 @@
<?php
-/* $Id$ */
/*
services_snmp.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- part of pfSense
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: snmp
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-snmp
-##|*NAME=Services: SNMP page
+##|*NAME=Services: SNMP
##|*DESCR=Allow access to the 'Services: SNMP' page.
##|*MATCH=services_snmp.php*
##|-PRIV
@@ -187,19 +207,18 @@ function build_iplist() {
return($iplist);
}
-$closehead = false;
$pgtitle = array(gettext("Services"), gettext("SNMP"));
$shortcut_section = "snmp";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -259,10 +278,11 @@ $form->add($section);
$section = new Form_Section('SNMP Trap settings');
-if($pconfig['trapenable'])
+if ($pconfig['trapenable']) {
$section->addClass('toggle-traps', 'in');
-else
+} else {
$section->addClass('toggle-traps', 'collapse');
+}
$section->addInput(new Form_Input(
'trapserver',
@@ -354,13 +374,36 @@ print($form);
//<![CDATA[
// hostres requires mibii so we force that here
-events.push(function(){
- $('#hostres').change(function(){
- if($('#hostres').is(':checked'))
- $('#mibii').attr('checked', 'checked');
+events.push(function() {
+
+ noMibii = false;
+
+ $('#junk').hide();
+ hostresChange();
+
+ function hostresChange() {
+ if ($('#hostres').prop('checked')) {
+ $('#mibii').prop('checked', true);
+ noMibii = true;
+ } else {
+ noMibii = false;
+ }
+ }
+
+ $('#hostres').change(function() {
+ hostresChange();
+ });
+
+
+ $('#mibii').change(function() {
+ if (noMibii) {
+ $('#mibii').prop('checked', 'true');
+ }
});
+
+ $('[name=btntoggleall]').hide();
});
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php
index 3545379..6ee8d0f 100644
--- a/src/usr/local/www/services_unbound.php
+++ b/src/usr/local/www/services_unbound.php
@@ -1,40 +1,62 @@
<?php
-/* $Id$ */
/*
services_unbound.php
- part of the pfSense project (https://www.pfsense.org)
- Copyright (C) 2014 Warren Baker (warren@pfsense.org)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsresolver
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2014 Warren Baker (warren@pfsense.org)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
-##|*IDENT=page-services-unbound
-##|*NAME=Services: DNS Resolver page
+##|*IDENT=page-services-dnsresolver
+##|*NAME=Services: DNS Resolver
##|*DESCR=Allow access to the 'Services: DNS Resolver' page.
##|*MATCH=services_unbound.php*
##|-PRIV
@@ -49,56 +71,56 @@ if (!is_array($config['unbound'])) {
$a_unboundcfg =& $config['unbound'];
-if (!is_array($config['unbound']['hosts'])) {
- $config['unbound']['hosts'] = array();
+if (!is_array($a_unboundcfg['hosts'])) {
+ $a_unboundcfg['hosts'] = array();
}
-$a_hosts =& $config['unbound']['hosts'];
+$a_hosts =& $a_unboundcfg['hosts'];
-if (!is_array($config['unbound']['domainoverrides'])) {
- $config['unbound']['domainoverrides'] = array();
+if (!is_array($a_unboundcfg['domainoverrides'])) {
+ $a_unboundcfg['domainoverrides'] = array();
}
-$a_domainOverrides = &$config['unbound']['domainoverrides'];
+$a_domainOverrides = &$a_unboundcfg['domainoverrides'];
-if (isset($config['unbound']['enable'])) {
+if (isset($a_unboundcfg['enable'])) {
$pconfig['enable'] = true;
}
-if (isset($config['unbound']['dnssec'])) {
+if (isset($a_unboundcfg['dnssec'])) {
$pconfig['dnssec'] = true;
}
-if (isset($config['unbound']['forwarding'])) {
+if (isset($a_unboundcfg['forwarding'])) {
$pconfig['forwarding'] = true;
}
-if (isset($config['unbound']['regdhcp'])) {
+if (isset($a_unboundcfg['regdhcp'])) {
$pconfig['regdhcp'] = true;
}
-if (isset($config['unbound']['regdhcpstatic'])) {
+if (isset($a_unboundcfg['regdhcpstatic'])) {
$pconfig['regdhcpstatic'] = true;
}
-if (isset($config['unbound']['txtsupport'])) {
- $pconfig['txtsupport'] = true;
-}
-$pconfig['port'] = $config['unbound']['port'];
-$pconfig['custom_options'] = base64_decode($config['unbound']['custom_options']);
+$pconfig['port'] = $a_unboundcfg['port'];
+$pconfig['custom_options'] = base64_decode($a_unboundcfg['custom_options']);
-if (empty($config['unbound']['active_interface'])) {
+if (empty($a_unboundcfg['active_interface'])) {
$pconfig['active_interface'] = array();
} else {
- $pconfig['active_interface'] = explode(",", $config['unbound']['active_interface']);
+ $pconfig['active_interface'] = explode(",", $a_unboundcfg['active_interface']);
}
-if (empty($config['unbound']['outgoing_interface'])) {
+if (empty($a_unboundcfg['outgoing_interface'])) {
$pconfig['outgoing_interface'] = array();
} else {
- $pconfig['outgoing_interface'] = explode(",", $config['unbound']['outgoing_interface']);
+ $pconfig['outgoing_interface'] = explode(",", $a_unboundcfg['outgoing_interface']);
}
-if ($_POST) {
- $pconfig = $_POST;
- unset($input_errors);
+if (empty($a_unboundcfg['system_domain_local_zone_type'])) {
+ $pconfig['system_domain_local_zone_type'] = "transparent";
+} else {
+ $pconfig['system_domain_local_zone_type'] = $a_unboundcfg['system_domain_local_zone_type'];
+}
+if ($_POST) {
if ($_POST['apply']) {
$retval = services_unbound_configure();
$savemsg = get_std_save_message($retval);
@@ -110,76 +132,77 @@ if ($_POST) {
/* Start or restart dhcpleases when it's necessary */
system_dhcpleases_configure();
} else {
- if (isset($_POST['enable']) && isset($config['dnsmasq']['enable'])) {
- if ($_POST['port'] == $config['dnsmasq']['port']) {
+ $pconfig = $_POST;
+ unset($input_errors);
+
+ if (isset($pconfig['enable']) && isset($config['dnsmasq']['enable'])) {
+ if ($pconfig['port'] == $config['dnsmasq']['port']) {
$input_errors[] = "The DNS Forwarder is enabled using this port. Choose a non-conflicting port, or disable the DNS Forwarder.";
}
}
- if (empty($_POST['active_interface'])) {
+ if (empty($pconfig['active_interface'])) {
$input_errors[] = "One or more Network Interfaces must be selected for binding.";
- } else if (!isset($config['system']['dnslocalhost']) && (!in_array("lo0", $_POST['active_interface']) && !in_array("all", $_POST['active_interface']))) {
+ } else if (!isset($config['system']['dnslocalhost']) && (!in_array("lo0", $pconfig['active_interface']) && !in_array("all", $pconfig['active_interface']))) {
$input_errors[] = "This system is configured to use the DNS Resolver as its DNS server, so Localhost or All must be selected in Network Interfaces.";
}
- if (empty($_POST['outgoing_interface'])) {
+ if (empty($pconfig['outgoing_interface'])) {
$input_errors[] = "One or more Outgoing Network Interfaces must be selected.";
}
- if ($_POST['port']) {
- if (is_port($_POST['port'])) {
- $a_unboundcfg['port'] = $_POST['port'];
- } else {
- $input_errors[] = gettext("You must specify a valid port number.");
- }
- } else if (isset($config['unbound']['port'])) {
- unset($config['unbound']['port']);
+ if (empty($pconfig['system_domain_local_zone_type'])) {
+ $input_errors[] = "A System Domain Local-Zone Type must be selected.";
}
- if (isset($_POST['enable'])) {
- $a_unboundcfg['enable'] = true;
- } else {
- unset($a_unboundcfg['enable']);
- }
- if (isset($_POST['dnssec'])) {
- $a_unboundcfg['dnssec'] = true;
- } else {
- unset($a_unboundcfg['dnssec']);
- }
- if (isset($_POST['forwarding'])) {
- $a_unboundcfg['forwarding'] = true;
- } else {
- unset($a_unboundcfg['forwarding']);
+ if ($pconfig['port'] && !is_port($pconfig['port'])) {
+ $input_errors[] = gettext("You must specify a valid port number.");
}
- if (isset($_POST['regdhcp'])) {
- $a_unboundcfg['regdhcp'] = true;
- } else {
- unset($a_unboundcfg['regdhcp']);
- }
- if (isset($_POST['regdhcpstatic'])) {
- $a_unboundcfg['regdhcpstatic'] = true;
- } else {
- unset($a_unboundcfg['regdhcpstatic']);
- }
- if (isset($_POST['txtsupport'])) {
- $a_unboundcfg['txtsupport'] = true;
- } else {
- unset($a_unboundcfg['txtsupport']);
+
+ if (is_array($pconfig['active_interface']) && !empty($pconfig['active_interface'])) {
+ $display_active_interface = $pconfig['active_interface'];
+ $pconfig['active_interface'] = implode(",", $pconfig['active_interface']);
}
- if (is_array($_POST['active_interface']) && !empty($_POST['active_interface'])) {
- $a_unboundcfg['active_interface'] = implode(",", $_POST['active_interface']);
+
+ $display_custom_options = $pconfig['custom_options'];
+ $pconfig['custom_options'] = base64_encode(str_replace("\r\n", "\n", $pconfig['custom_options']));
+
+ if (is_array($pconfig['outgoing_interface']) && !empty($pconfig['outgoing_interface'])) {
+ $display_outgoing_interface = $pconfig['outgoing_interface'];
+ $pconfig['outgoing_interface'] = implode(",", $pconfig['outgoing_interface']);
}
- if (is_array($_POST['outgoing_interface']) && !empty($_POST['outgoing_interface'])) {
- $a_unboundcfg['outgoing_interface'] = implode(",", $_POST['outgoing_interface']);
+ if (isset($pconfig['system_domain_local_zone_type']) && !empty($pconfig['system_domain_local_zone_type'])) {
+ $display_system_domain_local_zone_type = $pconfig['system_domain_local_zone_type'];
+ $pconfig['system_domain_local_zone_type'] = $pconfig['system_domain_local_zone_type'];
}
- $a_unboundcfg['custom_options'] = base64_encode(str_replace("\r\n", "\n", $_POST['custom_options']));
+ $test_output = array();
+ if (test_unbound_config($pconfig, $test_output)) {
+ $input_errors[] = gettext("The generated config file cannot be parsed by unbound. Please correct the following errors:");
+ $input_errors = array_merge($input_errors, $test_output);
+ }
if (!$input_errors) {
+ $a_unboundcfg['enable'] = isset($pconfig['enable']);
+ $a_unboundcfg['port'] = $pconfig['port'];
+ $a_unboundcfg['dnssec'] = isset($pconfig['dnssec']);
+ $a_unboundcfg['forwarding'] = isset($pconfig['forwarding']);
+ $a_unboundcfg['regdhcp'] = isset($pconfig['regdhcp']);
+ $a_unboundcfg['regdhcpstatic'] = isset($pconfig['regdhcpstatic']);
+ $a_unboundcfg['active_interface'] = $pconfig['active_interface'];
+ $a_unboundcfg['outgoing_interface'] = $pconfig['outgoing_interface'];
+ $a_unboundcfg['system_domain_local_zone_type'] = $pconfig['system_domain_local_zone_type'];
+ $a_unboundcfg['custom_options'] = $pconfig['custom_options'];
+
write_config("DNS Resolver configured.");
mark_subsystem_dirty('unbound');
}
+
+ $pconfig['active_interface'] = $display_active_interface;
+ $pconfig['outgoing_interface'] = $display_outgoing_interface;
+ $pconfig['system_domain_local_zone_type'] = $display_system_domain_local_zone_type;
+ $pconfig['custom_options'] = $display_custom_options;
}
}
@@ -203,19 +226,21 @@ if ($_GET['act'] == "del") {
}
}
-function build_if_list() {
+function build_if_list($selectedifs) {
$interface_addresses = get_possible_listen_ips(true);
$iflist = array('options' => array(), 'selected' => array());
$iflist['options']['all'] = "All";
- if (empty($pconfig['interface']) || empty($pconfig['interface'][0]))
+ if (empty($selectedifs) || empty($selectedifs[0]) || in_array("all", $selectedifs)) {
array_push($iflist['selected'], "all");
+ }
foreach ($interface_addresses as $laddr => $ldescr) {
$iflist['options'][$laddr] = htmlspecialchars($ldescr);
- if ($pconfig['interface'] && in_array($laddr, $pconfig['interface']))
+ if ($selectedifs && in_array($laddr, $selectedifs)) {
array_push($iflist['selected'], $laddr);
+ }
}
unset($interface_addresses);
@@ -223,17 +248,22 @@ function build_if_list() {
return($iflist);
}
-$closehead = false;
-$pgtitle = array(gettext("Services"), gettext("DNS Resolver"));
+$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("General"));
$shortcut_section = "resolver";
include_once("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
+
+if (is_subsystem_dirty('unbound')) {
+ print_info_box_np(gettext("The configuration of the DNS Resolver has been changed. You must apply changes for them to take effect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("General settings"), true, "services_unbound.php");
@@ -241,8 +271,6 @@ $tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_adva
$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
display_top_tabs($tab_array, true);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('General DNS Resolver Options');
@@ -257,28 +285,40 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Input(
'port',
'Listen Port',
- 'text',
- $pconfig['port']
+ 'number',
+ $pconfig['port'],
+ ['placeholder' => '53']
))->setHelp('The port used for responding to DNS queries. It should normally be left blank unless another service needs to bind to TCP/UDP port 53.');
-$iflist = build_if_list();
+$activeiflist = build_if_list($pconfig['active_interface']);
$section->addInput(new Form_Select(
'active_interface',
'Network Interfaces',
- $iflist['selected'],
- $iflist['options'],
+ $activeiflist['selected'],
+ $activeiflist['options'],
true
-))->setHelp('Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. ' .
+))->addClass('general')->setHelp('Interface IPs used by the DNS Resolver for responding to queries from clients. If an interface has both IPv4 and IPv6 IPs, both are used. Queries to other interface IPs not selected below are discarded. ' .
'The default behavior is to respond to queries on every available IPv4 and IPv6 address.');
+$outiflist = build_if_list($pconfig['outgoing_interface']);
+
$section->addInput(new Form_Select(
'outgoing_interface',
'Outgoing Network Interfaces',
- $iflist['selected'],
- $iflist['options'],
+ $outiflist['selected'],
+ $outiflist['options'],
true
-))->setHelp('Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.');
+))->addClass('general')->setHelp('Utilize different network interface(s) that the DNS Resolver will use to send queries to authoritative servers and receive their replies. By default all interfaces are used.');
+
+$unbound_local_zone_types = array("deny" => gettext("Deny"), "refuse" => gettext("Refuse"), "static" => gettext("Static"), "transparent" => gettext("Transparent"), "typetransparent" => gettext("Type Transparent"), "redirect" => gettext("Redirect"), "inform" => gettext("Inform"), "inform_deny" => gettext("Inform Deny"), "nodefault" => gettext("No Default"));
+
+$section->addInput(new Form_Select(
+ 'system_domain_local_zone_type',
+ 'System Domain Local Zone Type',
+ $pconfig['system_domain_local_zone_type'],
+ $unbound_local_zone_types
+))->setHelp('The local-zone type used for the pfSense system domain (System | General Setup | Domain). Transparent is the default. Local-Zone type descriptions are available in the unbound.conf(5) manual pages.');
$section->addInput(new Form_Checkbox(
'dnssec',
@@ -312,26 +352,19 @@ $section->addInput(new Form_Checkbox(
'resolved. You should also set the domain in %s'.
'System: General setup%s to the proper value.','<a href="system.php">','</a>'));
-$section->addInput(new Form_Checkbox(
- 'txtsupport',
- 'TXT Comment Support',
- 'Register DHCP static mappings in the DNS Resolver',
- $pconfig['txtsupport']
-))->setHelp('Any descriptions associated with Host entries and DHCP Static mappings will create a corresponding TXT record.');
-
$btnadvdns = new Form_Button(
'btnadvdns',
- 'Advanced'
+ 'Custom options'
);
$btnadvdns->removeClass('btn-primary')->addClass('btn-default btn-sm');
$section->addInput(new Form_StaticText(
- 'Advanced',
- $btnadvdns . '&nbsp;' . 'Show advanced optionss'
+ 'Custom options',
+ $btnadvdns . '&nbsp;' . 'Show custom options'
));
-$section->addInput(new Form_TextArea (
+$section->addInput(new Form_Textarea (
'custom_options',
'Custom options',
$pconfig['custom_options']
@@ -339,54 +372,45 @@ $section->addInput(new Form_TextArea (
$form->add($section);
print($form);
-
-print_info_box(sprintf(gettext("If the DNS Resolver is enabled, the DHCP".
-" service (if enabled) will automatically serve the LAN IP".
-" address as a DNS server to DHCP clients so they will use".
-" the DNS Resolver. If Forwarding, is enabled, the DNS Resolver will use the DNS servers".
-" entered in %sSystem: General setup%s".
-" or those obtained via DHCP or PPP on WAN if the &quot;Allow".
-" DNS server list to be overridden by DHCP/PPP on WAN&quot;".
-" is checked."),'<a href="system.php">','</a>'));
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
- // If the enable checkbox is not checked, disable the next three checkboxes
- function disableDHCP() {
+ // If the enable checkbox is not checked, hide all inputs
+ function hideGeneral() {
var hide = ! $('#enable').prop('checked');
- disableInput('port', hide);
- disableInput('active_interface', hide);
- disableInput('outgoing_interface', hide);
- disableInput('regdhcpstatic', hide);
- disableInput('dnssec', hide);
- disableInput('forwarding', hide);
- disableInput('regdhcp', hide);
- disableInput('regdhcpstatic', hide);
- disableInput('txtsupport', hide);
- disableInput('btnadvdns', hide);
+ hideMultiClass('general', hide);
+ hideInput('port', hide);
+ hideSelect('system_domain_local_zone_type', hide);
+ hideCheckbox('dnssec', hide);
+ hideCheckbox('forwarding', hide);
+ hideCheckbox('regdhcp', hide);
+ hideCheckbox('regdhcpstatic', hide);
+ hideInput('btnadvdns', hide);
}
- // Make the ‘aditional options’ button a plain button, not a submit button
+ // Make the 'additional options' button a plain button, not a submit button
$("#btnadvdns").prop('type','button');
- // Un-hide aditional controls
+ // Un-hide additional controls
$("#btnadvdns").click(function() {
hideInput('custom_options', false);
-
});
- // When 'enable' is clicked, diable/enable the following three checkboxes
+ // When 'enable' is clicked, disable/enable the following hide inputs
$('#enable').click(function() {
- disableDHCP();
+ hideGeneral();
});
// On initial load
- hideInput('custom_options', true);
- disableDHCP();
+ if ($('#custom_options').val().length == 0) {
+ hideInput('custom_options', true);
+ }
+
+ hideGeneral();
});
//]]>
@@ -395,7 +419,7 @@ events.push(function(){
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Host Overrides")?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Host")?></th>
@@ -412,20 +436,20 @@ foreach ($a_hosts as $hostent):
?>
<tr>
<td>
- <?=strtolower($hostent['host'])?>
+ <?=$hostent['host']?>
</td>
<td>
- <?=strtolower($hostent['domain'])?>
+ <?=$hostent['domain']?>
</td>
<td>
- <?=$hostent['ip']?>&nbsp;
+ <?=$hostent['ip']?>
</td>
<td>
<?=htmlspecialchars($hostent['descr'])?>
</td>
<td>
- <a href="services_unbound_host_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_unbound.php?type=host&amp;act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit host override')?>" href="services_unbound_host_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete host override')?>" href="services_unbound.php?type=host&amp;act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
@@ -435,19 +459,20 @@ foreach ($a_hosts as $hostent):
?>
<tr>
<td>
- <?=strtolower($alias['host'])?>
+ <?=$alias['host']?>
</td>
<td>
- <?=strtolower($alias['domain'])?>
+ <?=$alias['domain']?>
</td>
<td>
Alias for <?=$hostent['host'] ? $hostent['host'] . '.' . $hostent['domain'] : $hostent['domain']?>
</td>
<td>
+ <i class="fa fa-angle-double-right text-info"></i>
<?=htmlspecialchars($alias['description'])?>
</td>
<td>
- <a href="services_unbound_host_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
+ <a a class="fa fa-pencil" title="<?=gettext('Edit host override')?>" href="services_unbound_host_edit.php?id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -462,13 +487,16 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="services_unbound_host_edit.php" class="btn btn-sm btn-success"><?=gettext('Add')?></a>
+ <a href="services_unbound_host_edit.php" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Domain Overrides")?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Domain")?></th>
@@ -485,7 +513,7 @@ foreach ($a_domainOverrides as $doment):
?>
<tr>
<td>
- <?=strtolower($doment['domain'])?>&nbsp;
+ <?=$doment['domain']?>&nbsp;
</td>
<td>
<?=$doment['ip']?>&nbsp;
@@ -494,8 +522,8 @@ foreach ($a_domainOverrides as $doment):
<?=htmlspecialchars($doment['descr'])?>&nbsp;
</td>
<td>
- <a href="services_unbound_domainoverride_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="services_unbound.php?act=del&amp;type=doverride&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit domain override')?>" href="services_unbound_domainoverride_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete domain override')?>" href="services_unbound.php?act=del&amp;type=doverride&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -508,6 +536,21 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="services_unbound_domainoverride_edit.php" class="btn btn-sm btn-success"><?=gettext('Add')?></a>
+ <a href="services_unbound_domainoverride_edit.php" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
+
+<div id="infoblock">
+ <?=print_info_box(sprintf(gettext("If the DNS Resolver is enabled, the DHCP".
+ " service (if enabled) will automatically serve the LAN IP".
+ " address as a DNS server to DHCP clients so they will use".
+ " the DNS Resolver. If Forwarding is enabled, the DNS Resolver will use the DNS servers".
+ " entered in %sSystem: General setup%s".
+ " or those obtained via DHCP or PPP on WAN if &quot;Allow".
+ " DNS server list to be overridden by DHCP/PPP on WAN&quot;".
+ " is checked."), '<a href="system.php">', '</a>'), info)?>
+</div>
+
<?php include("foot.inc");
diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php
index a9d1076..bc8a7ab 100644
--- a/src/usr/local/www/services_unbound_acls.php
+++ b/src/usr/local/www/services_unbound_acls.php
@@ -1,34 +1,65 @@
<?php
-/* $Id$ */
/*
services_unbound_acls.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2011 Warren Baker <warren@decoy.co.za>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2011 Warren Baker <warren@decoy.co.za>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-services-dnsresolver-acls
+##|*NAME=Services: DNS Resolver: Access Lists
+##|*DESCR=Allow access to the 'Services: DNS Resolver: Access Lists' page.
+##|*MATCH=services_unbound_acls.php*
+##|-PRIV
require("guiconfig.inc");
require("unbound.inc");
@@ -78,12 +109,14 @@ if ($act == "edit") {
}
}
-if(!is_array($networkacl))
+if (!is_array($networkacl)) {
$networkacl = array();
+}
// Add a row to the networks table
-if($act == 'new')
+if ($act == 'new') {
$networkacl = array('0' => array('acl_network' => '', 'mask' => '', 'description' => ''));
+}
if ($_POST) {
unset($input_errors);
@@ -91,8 +124,8 @@ if ($_POST) {
$deleting = false;
// Delete a row from the networks table
- for($idx = 0; $idx<50; $idx++) {
- if($pconfig['dlt' . $idx] == 'Delete') {
+ for ($idx = 0; $idx < 50; $idx++) {
+ if ($pconfig['dlt' . $idx] == 'Delete') {
unset($networkacl[$idx]);
$deleting = true;
break;
@@ -102,9 +135,10 @@ if ($_POST) {
if ($_POST['apply']) {
$retval = services_unbound_configure();
$savemsg = get_std_save_message($retval);
- if ($retval == 0)
+ if ($retval == 0) {
clear_subsystem_dirty('unbound');
- } else if(!$deleting) {
+ }
+ } else if (!$deleting) {
// input validation - only allow 50 entries in a single ACL
for ($x = 0; $x < 50; $x++) {
@@ -166,35 +200,35 @@ if ($_POST) {
}
$actionHelp =
- '<strong><font color="green">Deny:</font></strong> Stops queries from hosts within the netblock defined below.' . '<br />' .
- '<strong><font color="green">Refuse:</font></strong> Stops queries from hosts within the netblock defined below, but sends a DNS rcode REFUSED error message back to the client.' . '<br />' .
- '<strong><font color="green">Allow:</font></strong> Allow queries from hosts within the netblock defined below.' . '<br />' .
- '<strong><font color="green">Allow Snoop:</font></strong> Allow recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for your administrative host.';
+ '<span class="text-success"><strong>Deny:</strong></span> Stops queries from hosts within the netblock defined below.' . '<br />' .
+ '<span class="text-success"><strong>Refuse:</strong></span> Stops queries from hosts within the netblock defined below, but sends a DNS rcode REFUSED error message back to the client.' . '<br />' .
+ '<span class="text-success"><strong>Allow:</strong></span> Allow queries from hosts within the netblock defined below.' . '<br />' .
+ '<span class="text-success"><strong>Allow Snoop:</strong></span> Allow recursive and nonrecursive access from hosts within the netblock defined below. Used for cache snooping and ideally should only be configured for your administrative host.';
-$closehead = false;
-$pgtitle = "Services: DNS Resolver: Access Lists";
+$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Access Lists"));
$shortcut_section = "resolver";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('unbound'))
+if (is_subsystem_dirty('unbound')) {
print_info_box_np(gettext("The configuration of the DNS Resolver, has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
-$tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php");
+$tab_array[] = array(gettext("General settings"), false, "/services_unbound.php");
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
$tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php");
display_top_tabs($tab_array, true);
-require_once('classes/Form.class.php');
-
-if($act=="new" || $act=="edit") {
+if ($act == "new" || $act == "edit") {
$form = new Form();
@@ -216,16 +250,16 @@ if($act=="new" || $act=="edit") {
$section->addInput(new Form_Input(
'aclname',
- 'Access LIst name',
+ 'Access List name',
'text',
$pconfig['aclname']
))->setHelp('Provide an Access List name.');
$section->addInput(new Form_Select(
- 'aclaction',
- 'Action',
- strtolower($pconfig['aclaction']),
- array('allow' => 'Allow','deny' => 'Deny','refuse' => 'Refuse','allow snoop' => 'Allow Snoop')
+ 'aclaction',
+ 'Action',
+ strtolower($pconfig['aclaction']),
+ array('allow' => 'Allow', 'deny' => 'Deny', 'refuse' => 'Refuse', 'allow snoop' => 'Allow Snoop')
))->setHelp($actionHelp);
$section->addInput(new Form_Input(
@@ -238,7 +272,7 @@ if($act=="new" || $act=="edit") {
$numrows = count($networkacl) - 1;
$counter = 0;
- foreach($networkacl as $item) {
+ foreach ($networkacl as $item) {
$network = $item['acl_network'];
$cidr = $item['mask'];
$description = $item['description'];
@@ -276,27 +310,26 @@ if($act=="new" || $act=="edit") {
$form->add($section);
print($form);
-}
-else // NOT 'edit' or 'add'
-{
+} else {
+ // NOT 'edit' or 'add'
?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Access Lists to control access to the DNS Resolver')?></h2></div>
<div class="panel-body">
<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
- <th><?=gettext("Access List Name"); ?></th>
- <th><?=gettext("Action"); ?></th>
- <th><?=gettext("Description"); ?></th>
- <th>&nbsp;</th>
+ <th><?=gettext("Access List Name")?></th>
+ <th><?=gettext("Action")?></th>
+ <th><?=gettext("Description")?></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
<?php
$i = 0;
- foreach($a_acls as $acl):
+ foreach ($a_acls as $acl):
?>
<tr ondblclick="document.location='services_unbound_acls.php?act=edit&amp;id=<?=$i?>'">
<td>
@@ -309,8 +342,8 @@ else // NOT 'edit' or 'add'
<?=htmlspecialchars($acl['description'])?>
</td>
<td>
- <a href="services_unbound_acls.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-info" >Edit</a>
- <a href="services_unbound_acls.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">Delete</a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit ACL')?>" href="services_unbound_acls.php?act=edit&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete ACL')?>" href="services_unbound_acls.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -320,11 +353,24 @@ else // NOT 'edit' or 'add'
</tbody>
</table>
</div>
- <nav class="action-buttons">
- <a href="services_unbound_acls.php?act=new" class="btn btn-sm btn-success">Add</a>
- </nav>
</div>
</div>
+
+<nav class="action-buttons">
+ <a href="services_unbound_acls.php?act=new" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
+
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+});
+//]]>
+</script>
<?php
}
diff --git a/src/usr/local/www/services_unbound_advanced.php b/src/usr/local/www/services_unbound_advanced.php
index 4afca92..b4af8a0 100644
--- a/src/usr/local/www/services_unbound_advanced.php
+++ b/src/usr/local/www/services_unbound_advanced.php
@@ -1,14 +1,13 @@
<?php
-/* $Id$ */
/*
services_unbound_advanced.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 22015 Warren Baker (warren@percol8.co.za)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2015 Warren Baker (warren@percol8.co.za)
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -54,15 +53,12 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: dnsresolver
-*/
##|+PRIV
-##|*IDENT=page-services-unbound
-##|*NAME=Services: DNS Resolver Advanced page
-##|*DESCR=Allow access to the 'Services: DNS Resolver Advanced' page.
-##|*MATCH=services_unbound.php*
+##|*IDENT=page-services-dnsresolver-advanced
+##|*NAME=Services: DNS Resolver: Advanced
+##|*DESCR=Allow access to the 'Services: DNS Resolver: Advanced' page.
+##|*MATCH=services_unbound_advanced.php*
##|-PRIV
require_once("guiconfig.inc");
@@ -114,9 +110,6 @@ if (isset($config['unbound']['use_caps'])) {
}
if ($_POST) {
- unset($input_errors);
- $pconfig = $_POST;
-
if ($_POST['apply']) {
$retval = services_unbound_configure();
$savemsg = get_std_save_message($retval);
@@ -124,13 +117,16 @@ if ($_POST) {
clear_subsystem_dirty('unbound');
}
} else {
+ unset($input_errors);
+ $pconfig = $_POST;
+
if (isset($_POST['msgcachesize']) && !in_array($_POST['msgcachesize'], array('4', '10', '20', '50', '100', '250', '512'), true)) {
$input_errors[] = "A valid value for Message Cache Size must be specified.";
}
if (isset($_POST['outgoing_num_tcp']) && !in_array($_POST['outgoing_num_tcp'], array('0', '10', '20', '30', '40', '50'), true)) {
$input_errors[] = "A valid value must be specified for Outgoing TCP Buffers.";
}
- if (isset($_POST['outgoing_num_tcp']) && !in_array($_POST['incoming_num_tcp'], array('0', '10', '20', '30', '40', '50'), true)) {
+ if (isset($_POST['incoming_num_tcp']) && !in_array($_POST['incoming_num_tcp'], array('0', '10', '20', '30', '40', '50'), true)) {
$input_errors[] = "A valid value must be specified for Incoming TCP Buffers.";
}
if (isset($_POST['edns_buffer_size']) && !in_array($_POST['edns_buffer_size'], array('512', '1480', '4096'), true)) {
@@ -222,19 +218,28 @@ if ($_POST) {
}
}
-$closehead = false;
$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Advanced"));
$shortcut_section = "resolver";
include_once("head.inc");
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, 'success');
+}
+
+if (is_subsystem_dirty('unbound')) {
+ print_info_box_np(gettext("The configuration of the DNS Resolver has been changed. You must apply changes for them to take effect."));
+}
+
$tab_array = array();
$tab_array[] = array(gettext("General settings"), false, "services_unbound.php");
$tab_array[] = array(gettext("Advanced settings"), true, "services_unbound_advanced.php");
$tab_array[] = array(gettext("Access Lists"), false, "/services_unbound_acls.php");
display_top_tabs($tab_array, true);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('Advanced Resolver Options');
@@ -263,7 +268,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Checkbox(
'prefetchkey',
'Prefetch DNS Key Support',
- 'DNSKEYs are fetched earlier in the validation process when a Delegation signer is encountered',
+ 'DNSKEYs are fetched earlier in the validation process when a Delegation signer is encountered',
$pconfig['prefetchkey']
))->setHelp('This helps lower the latency of requests but does utilize a little more CPU. See: <a href="http://en.wikipedia.org/wiki/List_of_DNS_record_types">Wikipedia</a>');
@@ -293,7 +298,7 @@ $section->addInput(new Form_Select(
'Incoming TCP Buffers',
$pconfig['incoming_num_tcp'],
array_combine(array("0", "10", "20", "30", "50", "50"), array("0", "10", "20", "30", "50", "50"))
-))->setHelp('The number of outgoing TCP buffers to allocate per thread. The default value is 10. If 0 is selected then no TCP queries, to authoritative servers, are done.');
+))->setHelp('The number of incoming TCP buffers to allocate per thread. The default value is 10. If 0 is selected then no TCP queries, to authoritative servers, are done.');
$section->addInput(new Form_Select(
'edns_buffer_size',
@@ -370,7 +375,7 @@ $section->addInput(new Form_Checkbox(
'disable_auto_added_access_control',
'Disable auto-added access control',
'disable the automatically-added access control entries',
- $pconfig['hdisable_auto_added_access_control']
+ $pconfig['disable_auto_added_access_control']
))->setHelp('By default, IPv4 and IPv6 networks residing on internal interfaces of this system are permitted. ' .
'Allowed networks must be manually configured on the Access Lists tab if the auto-added entries are disabled.');
@@ -384,4 +389,4 @@ $section->addInput(new Form_Checkbox(
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php
index 5c2bedd..01d4cad 100644
--- a/src/usr/local/www/services_unbound_domainoverride_edit.php
+++ b/src/usr/local/www/services_unbound_domainoverride_edit.php
@@ -1,50 +1,75 @@
<?php
/*
services_unbound_domainoverride_edit.php
- part of the pfSense project (https://www.pfsense.org)
- Copyright (C) 2014 Warren Baker (warren@decoy.co.za)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Copyright (C) 2003-2005 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsresolver
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2014 Warren Baker (warren@decoy.co.za)
+ * Copyright (c) 2003-2005 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dnsresolver-editdomainoverride
-##|*NAME=Services: DNS Resolver: Edit Domain Override page
+##|*NAME=Services: DNS Resolver: Edit Domain Override
##|*DESCR=Allow access to the 'Services: DNS Resolver: Edit Domain Override' page.
##|*MATCH=services_unbound_domainoverride_edit.php*
##|-PRIV
require("guiconfig.inc");
-if (!is_array($config['unbound']['domainoverrides']))
+if (!is_array($config['unbound']['domainoverrides'])) {
$config['unbound']['domainoverrides'] = array();
+}
$a_domainOverrides = &$config['unbound']['domainoverrides'];
@@ -121,8 +146,6 @@ $pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Edit Dom
$shortcut_section = "resolver";
include("head.inc");
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('Domain Override');
diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php
index 42ce9ae..6f87318 100644
--- a/src/usr/local/www/services_unbound_host_edit.php
+++ b/src/usr/local/www/services_unbound_host_edit.php
@@ -1,43 +1,66 @@
<?php
-/* $Id$ */
/*
services_unbound_host_edit.php
- part of the pfSense project (https://www.pfsense.org)
- Copyright (C) 2014 Warren Baker (warren@decoy.co.za)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Copyright (C) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: dnsresolver
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2014 Warren Baker (warren@decoy.co.za)
+ * Copyright (c) 2003-2004 Bob Zoller <bob@kludgebox.com> and Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-dnsresolver-edithost
-##|*NAME=Services: DNS Resolver: Edit host page
+##|*NAME=Services: DNS Resolver: Edit host
##|*DESCR=Allow access to the 'Services: DNS Resolver: Edit host' page.
##|*MATCH=services_unbound_host_edit.php*
##|-PRIV
@@ -80,7 +103,6 @@ if (isset($id) && $a_hosts[$id]) {
}
if ($_POST) {
-
unset($input_errors);
$pconfig = $_POST;
@@ -110,43 +132,45 @@ if ($_POST) {
/* collect aliases */
$aliases = array();
- foreach ($_POST as $key => $value) {
- $entry = '';
- if (!substr_compare('aliashost', $key, 0, 9)) {
- $entry = substr($key, 9);
- $field = 'host';
- } elseif (!substr_compare('aliasdomain', $key, 0, 11)) {
- $entry = substr($key, 11);
- $field = 'domain';
- } elseif (!substr_compare('aliasdescription', $key, 0, 16)) {
- $entry = substr($key, 16);
- $field = 'description';
- }
- if (ctype_digit($entry)) {
- $aliases[$entry][$field] = $value;
+ if (!empty($_POST['aliashost0'])) {
+ foreach ($_POST as $key => $value) {
+ $entry = '';
+ if (!substr_compare('aliashost', $key, 0, 9)) {
+ $entry = substr($key, 9);
+ $field = 'host';
+ } elseif (!substr_compare('aliasdomain', $key, 0, 11)) {
+ $entry = substr($key, 11);
+ $field = 'domain';
+ } elseif (!substr_compare('aliasdescription', $key, 0, 16)) {
+ $entry = substr($key, 16);
+ $field = 'description';
+ }
+ if (ctype_digit($entry)) {
+ $aliases[$entry][$field] = $value;
+ }
}
- }
- $pconfig['aliases']['item'] = $aliases;
+ $pconfig['aliases']['item'] = $aliases;
- /* validate aliases */
- foreach ($aliases as $idx => $alias) {
- $aliasreqdfields = array('aliasdomain' . $idx);
- $aliasreqdfieldsn = array(gettext("Alias Domain"));
+ /* validate aliases */
+ foreach ($aliases as $idx => $alias) {
+ $aliasreqdfields = array('aliasdomain' . $idx);
+ $aliasreqdfieldsn = array(gettext("Alias Domain"));
- do_input_validation($_POST, $aliasreqdfields, $aliasreqdfieldsn, $input_errors);
+ do_input_validation($_POST, $aliasreqdfields, $aliasreqdfieldsn, $input_errors);
- if ($alias['host']) {
- if (!is_hostname($alias['host'])) {
- $input_errors[] = gettext("Hostnames in an alias list can only contain the characters A-Z, 0-9 and '-'. They may not start or end with '-'.");
- } else {
- if (!is_unqualified_hostname($alias['host'])) {
- $input_errors[] = gettext("A valid alias hostname is specified, but the domain name part should be omitted");
+ if ($alias['host']) {
+ if (!is_hostname($alias['host'])) {
+ $input_errors[] = gettext("Hostnames in an alias list can only contain the characters A-Z, 0-9 and '-'. They may not start or end with '-'.");
+ } else {
+ if (!is_unqualified_hostname($alias['host'])) {
+ $input_errors[] = gettext("A valid alias hostname is specified, but the domain name part should be omitted");
+ }
}
}
- }
- if (($alias['domain'] && !is_domain($alias['domain']))) {
- $input_errors[] = gettext("A valid domain must be specified in alias list.");
+ if (($alias['domain'] && !is_domain($alias['domain']))) {
+ $input_errors[] = gettext("A valid domain must be specified in alias list.");
+ }
}
}
@@ -189,31 +213,34 @@ if ($_POST) {
}
// Delete a row in the options table
-if($_GET['act'] == "delopt") {
+if ($_GET['act'] == "delopt") {
$idx = $_GET['id'];
- if($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) {
+ if ($pconfig['aliases'] && is_array($pconfig['aliases']['item'][$idx])) {
unset($pconfig['aliases']['item'][$idx]);
}
}
// Add an option row
-if($_GET['act'] == "addopt") {
- if(!is_array($pconfig['aliases']['item']))
+if ($_GET['act'] == "addopt") {
+ if (!is_array($pconfig['aliases']['item'])) {
$pconfig['aliases']['item'] = array();
+ }
array_push($pconfig['aliases']['item'], array('host' => null, 'domain' => null, 'description' => null));
}
-$pgtitle = array(gettext("Services"),gettext("DNS Resolver"),gettext("Edit host"));
+$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Edit Host Override"));
$shortcut_section = "resolver";
include("head.inc");
-require_once('classes/Form.class.php');
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
$form = new Form();
-$section = new Form_Section('Edit DNS Rersolver Entry');
+$section = new Form_Section('Host override options');
$section->addInput(new Form_Input(
'host',
@@ -258,12 +285,17 @@ $form->add($section);
$section = new Form_Section('Additional names for this host');
-if( $pconfig['aliases']['item']) {
+if (!$pconfig['aliases']['item']) {
+ $pconfig['aliases']['item'] = array('host' => "");
+}
+
+if ($pconfig['aliases']['item']) {
$counter = 0;
$last = count($pconfig['aliases']['item']) - 1;
- foreach($pconfig['aliases']['item'] as $item) {
+ foreach ($pconfig['aliases']['item'] as $item) {
$group = new Form_Group(null);
+ $group->addClass('repeatable');
$group->add(new Form_Input(
'aliashost' . $counter,
@@ -277,7 +309,7 @@ if( $pconfig['aliases']['item']) {
null,
'text',
$item['domain']
- ))->setHelp($counter == $last ? 'Value':null);
+ ))->setHelp($counter == $last ? 'Domain':null);
$group->add(new Form_Input(
'aliasdescription' . $counter,
@@ -286,30 +318,24 @@ if( $pconfig['aliases']['item']) {
$item['description']
))->setHelp($counter == $last ? 'Description':null);
- $btn = new Form_Button(
- 'btn' . $counter,
- 'Delete',
- 'services_unbound_host_edit.php?act=delopt' . '&id=' . $counter
- );
+ $group->add(new Form_Button(
+ 'deleterow' . $counter,
+ 'Delete'
+ ))->removeClass('btn-primary')->addClass('btn-warning');
- $btn->removeClass('btn-primary')->addClass('btn-danger btn-sm');
- $group->add($btn);
$section->add($group);
$counter++;
}
}
-$btnaddopt = new Form_Button(
- 'btnaddopt',
- 'Add Option',
- 'services_unbound_host_edit.php?act=addopt'
-);
-
-$btnaddopt->removeClass('btn-primary')->addClass('btn-success btn-sm');
-
-$section->addInput($btnaddopt);
+$form->addGlobal(new Form_Button(
+ 'addrow',
+ 'Add host name',
+ null,
+ 'fa-plus'
+))->removeClass('btn-primary')->addClass('btn-success addbtn');
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php
index 37b46b6..8d91c19 100644
--- a/src/usr/local/www/services_wol.php
+++ b/src/usr/local/www/services_wol.php
@@ -1,55 +1,75 @@
<?php
-/* $Id$ */
/*
services_wol.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/bin/wol
- pfSense_MODULE: wol
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-wakeonlan
-##|*NAME=Services: Wake on LAN page
+##|*NAME=Services: Wake on LAN
##|*DESCR=Allow access to the 'Services: Wake on LAN' page.
##|*MATCH=services_wol.php*
##|-PRIV
require("guiconfig.inc");
-require_once('classes/Form.class.php');
-
if (!is_array($config['wol']['wolentry'])) {
$config['wol']['wolentry'] = array();
}
$a_wol = &$config['wol']['wolentry'];
-if($_GET['wakeall'] != "") {
+if ($_GET['wakeall'] != "") {
$i = 0;
$savemsg = "";
foreach ($a_wol as $wolent) {
@@ -65,7 +85,7 @@ if($_GET['wakeall'] != "") {
if (!mwexec("/usr/local/bin/wol -i {$bcip} {$mac}")) {
$savemsg .= sprintf(gettext('Sent magic packet to %1$s (%2$s)%3$s'), $mac, $description, ".<br />");
} else {
- $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully%5$s'), '<a href="/diag_logs.php">', '</a>', $description, $mac, ".<br />");
+ $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s (%4$s) did not complete successfully%5$s'), '<a href="/status_logs.php">', '</a>', $description, $mac, ".<br />");
}
}
}
@@ -104,7 +124,7 @@ if ($_POST || $_GET['mac']) {
if (!mwexec("/usr/local/bin/wol -i {$bcip} " . escapeshellarg($mac))) {
$savemsg .= sprintf(gettext("Sent magic packet to %s."), $mac);
} else {
- $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'), '<a href="/diag_logs.php">', '</a>', $mac, ".<br />");
+ $savemsg .= sprintf(gettext('Please check the %1$ssystem log%2$s, the wol command for %3$s did not complete successfully%4$s'), '<a href="/status_logs.php">', '</a>', $mac, ".<br />");
}
}
}
@@ -122,18 +142,20 @@ if ($_GET['act'] == "del") {
$pgtitle = array(gettext("Services"), gettext("Wake on LAN"));
include("head.inc");
-print_info_box(gettext('This service can be used to wake up (power on) computers by sending special') . ' "' . gettext('Magic Packets') . '"<br />' .
+print_info_box(gettext('This service can be used to wake up (power on) computers by sending special') . ' "' . gettext('Magic Packets') . '"<br />' .
gettext('The NIC in the computer that is to be woken up must support Wake on LAN and must be properly configured (WOL cable, BIOS settings).'));
?>
<?php
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
$form = new Form('Send');
@@ -187,12 +209,8 @@ print $form;
<?=htmlspecialchars($wolent['descr']);?>
</td>
<td>
- <a class="btn btn-xs btn-primary" href="services_wol_edit.php?id=<?=$i?>">
- edit
- </a>
- <a class="btn btn-xs btn-danger" href="services_wol.php?act=del&amp;id=<?=$i?>">
- delete
- </a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit device')?>" href="services_wol_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete device')?>" href="services_wol.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php endforeach?>
@@ -213,4 +231,4 @@ print $form;
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/services_wol_edit.php b/src/usr/local/www/services_wol_edit.php
index 97aff7f..0bbcda3 100644
--- a/src/usr/local/www/services_wol_edit.php
+++ b/src/usr/local/www/services_wol_edit.php
@@ -1,41 +1,64 @@
<?php
-/* $Id$ */
/*
services_wol_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: wol
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-services-wakeonlan-edit
-##|*NAME=Services: Wake on LAN: Edit page
+##|*NAME=Services: Wake on LAN: Edit
##|*DESCR=Allow access to the 'Services: Wake on LAN: Edit' page.
##|*MATCH=services_wol_edit.php*
##|-PRIV
@@ -51,8 +74,6 @@ function wol_sort() {
}
require("guiconfig.inc");
-require_once('classes/Form.class.php');
-
if (!is_array($config['wol']['wolentry'])) {
$config['wol']['wolentry'] = array();
}
@@ -116,8 +137,9 @@ if ($_POST) {
$pgtitle = array(gettext("Services"), gettext("Wake on LAN"), gettext("Edit"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$form = new Form;
@@ -156,4 +178,4 @@ $section->addInput(new Form_Input(
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/shortcuts.inc b/src/usr/local/www/shortcuts.inc
index 397f351..7e86f66 100644
--- a/src/usr/local/www/shortcuts.inc
+++ b/src/usr/local/www/shortcuts.inc
@@ -1,38 +1,57 @@
<?php
-/* $Id$ */
/*
- Copyright (C) 2012 Jim Pingle
- All rights reserved.
-
- Copyright (C) 2007, 2008 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-
-*/
-
-/*
- pfSense_MODULE: system
+ shortcuts.inc
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
// On the page, add in like so:
// $shortcut_section = "relayd";
@@ -102,7 +121,7 @@ function get_shortcut_main_link($shortcut_section, $addspace = true, $service =
break;
}
if (!empty($link) && ($_SERVER['REQUEST_URI'] != "/{$link}")) {
- return "{$space}<a href=\"{$link}\" title=\"" . gettext("Main page for this section") . "\"><i class=\"icon-large icon-plus-sign\"></i></a>";
+ return "{$space}<a href=\"{$link}\" title=\"" . gettext("Related settings") . "\"><i class=\"fa fa-sliders\"></i></a>";
}
}
@@ -130,7 +149,7 @@ function get_shortcut_status_link($shortcut_section, $addspace = true, $service
break;
}
if (!empty($link)) {
- return "{$space}<a href=\"{$link}\" title=\"" . gettext("Status of items on this page") . "\"><i class=\"icon-large icon-cog\"></i></a>";
+ return "{$space}<a href=\"{$link}\" title=\"" . gettext("Related status") . "\"><i class=\"fa fa-cog\"></i></a>";
}
}
@@ -138,7 +157,7 @@ function get_shortcut_log_link($shortcut_section, $addspace = true) {
global $g, $shortcuts;
$space = ($addspace) ? "&nbsp;" : "" ;
if (!empty($shortcut_section) && !empty($shortcuts[$shortcut_section]['log'])) {
- return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Log entries for items on this page") . "\"><i class=\"icon-large icon-list-alt\"></i></a>";
+ return "{$space}<a href=\"{$shortcuts[$shortcut_section]['log']}\" title=\"" . gettext("Related log entries") . "\"><i class=\"fa fa-list-alt\"></i></a>";
}
}
@@ -160,70 +179,70 @@ if (is_dir("/usr/local/pkg/shortcuts")) {
$shortcuts['relayd'] = array();
$shortcuts['relayd']['main'] = "load_balancer_pool.php";
-$shortcuts['relayd']['log'] = "diag_logs.php?logfile=relayd";
+$shortcuts['relayd']['log'] = "status_logs.php?logfile=relayd";
$shortcuts['relayd']['status'] = "status_lb_pool.php";
$shortcuts['relayd']['service'] = "relayd";
$shortcuts['relayd-virtualservers'] = array();
$shortcuts['relayd-virtualservers']['main'] = "load_balancer_virtual_server.php";
-$shortcuts['relayd-virtualservers']['log'] = "diag_logs.php?logfile=relayd";
+$shortcuts['relayd-virtualservers']['log'] = "status_logs.php?logfile=relayd";
$shortcuts['relayd-virtualservers']['status'] = "status_lb_vs.php";
$shortcuts['relayd-virtualservers']['service'] = "relayd";
$shortcuts['captiveportal'] = array();
$shortcuts['captiveportal']['main'] = "services_captiveportal_zones.php";
-$shortcuts['captiveportal']['log'] = "diag_logs.php?logfile=auth";
+$shortcuts['captiveportal']['log'] = "status_logs.php?logfile=portalauth";
$shortcuts['captiveportal']['status'] = "status_captiveportal.php";
$shortcuts['captiveportal']['service'] = "captiveportal";
$shortcuts['captiveportal-vouchers'] = array();
-$shortcuts['captiveportal-vouchers']['log'] = "diag_logs.php?logfile=auth";
+$shortcuts['captiveportal-vouchers']['log'] = "status_logs.php?logfile=auth";
$shortcuts['captiveportal-vouchers']['status'] = "status_captiveportal_vouchers.php";
$shortcuts['captiveportal-vouchers']['service'] = "captiveportal";
$shortcuts['dhcp'] = array();
$shortcuts['dhcp']['main'] = "services_dhcp.php";
-$shortcuts['dhcp']['log'] = "diag_logs.php?logfile=dhcp";
+$shortcuts['dhcp']['log'] = "status_logs.php?logfile=dhcpd";
$shortcuts['dhcp']['status'] = "status_dhcp_leases.php";
$shortcuts['dhcp']['service'] = "dhcpd";
$shortcuts['dhcp6'] = array();
$shortcuts['dhcp6']['main'] = "services_dhcpv6.php";
-$shortcuts['dhcp6']['log'] = "diag_logs.php?logfile=dhcp";
+$shortcuts['dhcp6']['log'] = "status_logs.php?logfile=dhcp";
$shortcuts['dhcp6']['status'] = "status_dhcpv6_leases.php";
$shortcuts['ipsec'] = array();
$shortcuts['ipsec']['main'] = "vpn_ipsec.php";
-$shortcuts['ipsec']['log'] = "diag_logs.php?logfile=ipsec";
-$shortcuts['ipsec']['status'] = "diag_ipsec.php";
+$shortcuts['ipsec']['log'] = "status_logs.php?logfile=ipsec";
+$shortcuts['ipsec']['status'] = "status_ipsec.php";
$shortcuts['ipsec']['service'] = "ipsec";
$shortcuts['openvpn'] = array();
$shortcuts['openvpn']['main'] = "vpn_openvpn_server.php";
-$shortcuts['openvpn']['log'] = "diag_logs.php?logfile=openvpn";
+$shortcuts['openvpn']['log'] = "status_logs.php?logfile=openvpn";
$shortcuts['openvpn']['status'] = "status_openvpn.php";
$shortcuts['openvpn']['service'] = "openvpn";
$shortcuts['firewall'] = array();
$shortcuts['firewall']['main'] = "firewall_rules.php";
-$shortcuts['firewall']['log'] = "diag_logs_filter.php";
+$shortcuts['firewall']['log'] = "status_logs_filter.php";
$shortcuts['firewall']['status'] = "status_filter_reload.php";
$shortcuts['routing'] = array();
$shortcuts['routing']['main'] = "system_routes.php";
-$shortcuts['routing']['log'] = "diag_logs.php?logfile=routing";
+$shortcuts['routing']['log'] = "status_logs.php?logfile=routing";
$shortcuts['routing']['status'] = "diag_routes.php";
$shortcuts['gateways'] = array();
$shortcuts['gateways']['main'] = "system_gateways.php";
-$shortcuts['gateways']['log'] = "diag_logs.php?logfile=gateways";
+$shortcuts['gateways']['log'] = "status_logs.php?logfile=gateways";
$shortcuts['gateways']['status'] = "status_gateways.php";
-$shortcuts['gateways']['service'] = "apinger";
+$shortcuts['gateways']['service'] = "dpinger";
$shortcuts['gateway-groups'] = array();
$shortcuts['gateway-groups']['main'] = "system_gateway_groups.php";
-$shortcuts['gateway-groups']['log'] = "diag_logs.php?logfile=gateways";
+$shortcuts['gateway-groups']['log'] = "status_logs.php?logfile=gateways";
$shortcuts['gateway-groups']['status'] = "status_gateway_groups.php";
$shortcuts['interfaces'] = array();
@@ -240,36 +259,36 @@ $shortcuts['trafficshaper-limiters']['status'] = "diag_limiter_info.php";
$shortcuts['forwarder'] = array();
$shortcuts['forwarder']['main'] = "services_dnsmasq.php";
-$shortcuts['forwarder']['log'] = "diag_logs.php?logfile=resolver";
+$shortcuts['forwarder']['log'] = "status_logs.php?logfile=resolver";
$shortcuts['forwarder']['service'] = "dnsmasq";
$shortcuts['resolver'] = array();
$shortcuts['resolver']['main'] = "services_unbound.php";
-$shortcuts['resolver']['log'] = "diag_logs.php?logfile=resolver";
+$shortcuts['resolver']['log'] = "status_logs.php?logfile=resolver";
$shortcuts['resolver']['service'] = "unbound";
$shortcuts['wireless'] = array();
$shortcuts['wireless']['main'] = "interfaces_wireless.php";
-$shortcuts['wireless']['log'] = "diag_logs.php?logfile=wireless";
+$shortcuts['wireless']['log'] = "status_logs.php?logfile=wireless";
$shortcuts['wireless']['status'] = "status_wireless.php";
$shortcuts['ntp'] = array();
$shortcuts['ntp']['main'] = "services_ntpd.php";
-$shortcuts['ntp']['log'] = "diag_logs.php?logfile=ntpd";
+$shortcuts['ntp']['log'] = "status_logs.php?logfile=ntpd";
$shortcuts['ntp']['status'] = "status_ntpd.php";
$shortcuts['ntp']['service'] = "ntpd";
$shortcuts['pptps'] = array();
$shortcuts['pptps']['main'] = "vpn_pptp.php";
-$shortcuts['pptps']['log'] = "diag_logs_vpn.php";
+$shortcuts['pptps']['log'] = "status_logs_vpn.php";
$shortcuts['pppoes'] = array();
-$shortcuts['pppoes']['main'] = "vpn_pppoe.php";
-$shortcuts['pppoes']['log'] = "diag_logs_vpn.php?vpntype=poes";
+$shortcuts['pppoes']['main'] = "services_pppoe.php";
+$shortcuts['pppoes']['log'] = "status_logs_vpn.php?vpntype=poes";
$shortcuts['l2tps'] = array();
$shortcuts['l2tps']['main'] = "vpn_l2tp.php";
-$shortcuts['l2tps']['log'] = "diag_logs_vpn.php?vpntype=l2tp";
+$shortcuts['l2tps']['log'] = "status_logs_vpn.php?vpntype=l2tp";
$shortcuts['carp'] = array();
$shortcuts['carp']['main'] = "system_hasync.php";
diff --git a/src/usr/local/www/sortable/LICENSE b/src/usr/local/www/sortable/LICENSE
new file mode 100755
index 0000000..e19dfc9
--- /dev/null
+++ b/src/usr/local/www/sortable/LICENSE
@@ -0,0 +1,19 @@
+Copyright (C) 2013 Adam Schwartz, http://adamschwartz.co
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE. \ No newline at end of file
diff --git a/src/usr/local/www/sortable/sortable-theme-bootstrap.css b/src/usr/local/www/sortable/sortable-theme-bootstrap.css
new file mode 100755
index 0000000..99cf6c9
--- /dev/null
+++ b/src/usr/local/www/sortable/sortable-theme-bootstrap.css
@@ -0,0 +1,90 @@
+/* line 2, ../sass/_sortable.sass */
+table[data-sortable] {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+/* line 6, ../sass/_sortable.sass */
+table[data-sortable] th {
+ vertical-align: bottom;
+ font-weight: bold;
+}
+/* line 10, ../sass/_sortable.sass */
+table[data-sortable] th, table[data-sortable] td {
+ text-align: left;
+ padding: 10px;
+}
+/* line 14, ../sass/_sortable.sass */
+table[data-sortable] th:not([data-sortable="false"]) {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -o-user-select: none;
+ user-select: none;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+ -webkit-touch-callout: none;
+ cursor: pointer;
+}
+/* line 26, ../sass/_sortable.sass */
+table[data-sortable] th:after {
+ content: "";
+ visibility: hidden;
+ display: inline-block;
+ vertical-align: inherit;
+ height: 0;
+ width: 0;
+ border-width: 5px;
+ border-style: solid;
+ border-color: transparent;
+ margin-right: 1px;
+ margin-left: 10px;
+ float: middle;
+}
+/* line 40, ../sass/_sortable.sass */
+table[data-sortable] th[data-sorted="true"]:after {
+ visibility: visible;
+}
+/* line 43, ../sass/_sortable.sass */
+table[data-sortable] th[data-sorted-direction="descending"]:after {
+ border-top-color: inherit;
+ margin-top: 8px;
+}
+/* line 47, ../sass/_sortable.sass */
+table[data-sortable] th[data-sorted-direction="ascending"]:after {
+ border-bottom-color: inherit;
+ margin-top: 3px;
+}
+
+/* line 5, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 20px;
+ color: #333333;
+ background: white;
+}
+/* line 12, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap thead th {
+ border-bottom: 2px solid #e0e0e0;
+}
+/* line 15, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap tbody td {
+ border-top: 1px solid #e0e0e0;
+}
+/* line 18, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap th[data-sorted="true"] {
+ color: #3a87ad;
+ background: #ffffff;
+ border-bottom-color: #bce8f1;
+}
+/* line 23, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap th[data-sorted="true"][data-sorted-direction="descending"]:after {
+ border-top-color: #3a87ad;
+}
+/* line 26, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap th[data-sorted="true"][data-sorted-direction="ascending"]:after {
+ border-bottom-color: #3a87ad;
+}
+/* line 31, ../sass/sortable-theme-bootstrap.sass */
+table[data-sortable].sortable-theme-bootstrap.sortable-theme-bootstrap-striped tbody > tr:nth-child(odd) > td {
+ background-color: #f9f9f9;
+}
diff --git a/src/usr/local/www/sortable/sortable.js b/src/usr/local/www/sortable/sortable.js
new file mode 100755
index 0000000..031d6f7
--- /dev/null
+++ b/src/usr/local/www/sortable/sortable.js
@@ -0,0 +1,381 @@
+(function() {
+ var SELECTOR, addEventListener, clickEvents, numberRegExp, sortable, touchDevice, trimRegExp;
+
+ SELECTOR = 'table[data-sortable]';
+
+ numberRegExp = /^-?[£$¤]?[\d,.]+%?$/;
+
+ trimRegExp = /^\s+|\s+$/g;
+
+ clickEvents = ['click'];
+
+ touchDevice = 'ontouchstart' in document.documentElement;
+
+ if (touchDevice) {
+ clickEvents.push('touchstart');
+ }
+
+ addEventListener = function(el, event, handler) {
+ if (el.addEventListener != null) {
+ return el.addEventListener(event, handler, false);
+ } else {
+ return el.attachEvent("on" + event, handler);
+ }
+ };
+
+ sortable = {
+ init: function(options) {
+ var table, tables, _i, _len, _results;
+ if (options == null) {
+ options = {};
+ }
+
+ if (options.selector == null) {
+ options.selector = SELECTOR;
+ }
+
+ tables = document.querySelectorAll(options.selector);
+ _results = [];
+
+ for (_i = 0, _len = tables.length; _i < _len; _i++) {
+ table = tables[_i];
+ _results.push(sortable.initTable(table));
+ }
+
+ return _results;
+ },
+
+ initTable: function(table) {
+ var i, th, ths, _i, _len, _ref;
+
+ if (((_ref = table.tHead) != null ? _ref.rows.length : void 0) !== 1) {
+ return;
+ }
+
+ if (table.getAttribute('data-sortable-initialized') === 'true') {
+ return;
+ }
+
+ table.setAttribute('data-sortable-initialized', 'true');
+ ths = table.querySelectorAll('th');
+
+ for (i = _i = 0, _len = ths.length; _i < _len; i = ++_i) {
+ th = ths[i];
+
+ if (th.getAttribute('data-sortable') !== 'false') {
+ sortable.setupClickableTH(table, th, i);
+ }
+ }
+
+ return table;
+ },
+
+ setupClickableTH: function(table, th, i) {
+ var eventName, onClick, type, _i, _len, _results;
+ type = sortable.getColumnType(table, i);
+ onClick = function(e) {
+ var compare, item, newSortedDirection, position, row, rowArray, sorted, sortedDirection, tBody, ths, value, _compare, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref, _ref1;
+
+ if (e.handled !== true) {
+ e.handled = true;
+ } else {
+ return false;
+ }
+
+ sorted = this.getAttribute('data-sorted') === 'true';
+ sortedDirection = this.getAttribute('data-sorted-direction');
+
+ if (sorted) {
+ newSortedDirection = sortedDirection === 'ascending' ? 'descending' : 'ascending';
+ } else {
+ newSortedDirection = type.defaultSortDirection;
+ }
+
+ ths = this.parentNode.querySelectorAll('th');
+
+ for (_i = 0, _len = ths.length; _i < _len; _i++) {
+ th = ths[_i];
+ th.setAttribute('data-sorted', 'false');
+ th.removeAttribute('data-sorted-direction');
+ }
+
+ this.setAttribute('data-sorted', 'true');
+ this.setAttribute('data-sorted-direction', newSortedDirection);
+ tBody = table.tBodies[0];
+ rowArray = [];
+
+ if (!sorted) {
+ if (type.compare != null) {
+ _compare = type.compare;
+ } else {
+ _compare = function(a, b) {
+ return b - a;
+ };
+ }
+
+ compare = function(a, b) {
+ if (a[0] === b[0]) {
+ return a[2] - b[2];
+ }
+
+ if (type.reverse) {
+ return _compare(b[0], a[0]);
+ } else {
+ return _compare(a[0], b[0]);
+ }
+ };
+
+ _ref = tBody.rows;
+
+ for (position = _j = 0, _len1 = _ref.length; _j < _len1; position = ++_j) {
+ row = _ref[position];
+ value = sortable.getNodeValue(row.cells[i]);
+
+ if (type.comparator != null) {
+ value = type.comparator(value);
+ }
+
+ rowArray.push([value, row, position]);
+ }
+
+ rowArray.sort(compare);
+
+ for (_k = 0, _len2 = rowArray.length; _k < _len2; _k++) {
+ row = rowArray[_k];
+ tBody.appendChild(row[1]);
+ }
+ } else {
+ _ref1 = tBody.rows;
+
+ for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {
+ item = _ref1[_l];
+ rowArray.push(item);
+ }
+
+ rowArray.reverse();
+
+ for (_m = 0, _len4 = rowArray.length; _m < _len4; _m++) {
+ row = rowArray[_m];
+ tBody.appendChild(row);
+ }
+ }
+
+ if (typeof window['CustomEvent'] === 'function') {
+ return typeof table.dispatchEvent === "function" ? table.dispatchEvent(new CustomEvent('Sortable.sorted', {
+ bubbles: true
+ })) : void 0;
+ }
+ };
+
+ _results = [];
+
+ for (_i = 0, _len = clickEvents.length; _i < _len; _i++) {
+ eventName = clickEvents[_i];
+ _results.push(addEventListener(th, eventName, onClick));
+ }
+
+ return _results;
+ },
+
+ getColumnType: function(table, i) {
+ var row, specified, text, type, _i, _j, _len, _len1, _ref, _ref1, _ref2;
+ specified = (_ref = table.querySelectorAll('th')[i]) != null ? _ref.getAttribute('data-sortable-type') : void 0;
+
+ if (specified != null) {
+ return sortable.typesObject[specified];
+ }
+
+ _ref1 = table.tBodies[0].rows;
+
+ for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
+ row = _ref1[_i];
+ text = sortable.getNodeValue(row.cells[i]);
+ _ref2 = sortable.types;
+
+ for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
+ type = _ref2[_j];
+ if (type.match(text)) {
+ return type;
+ }
+ }
+ }
+
+ return sortable.typesObject.alpha;
+ },
+
+ getNodeValue: function(node) {
+ var dataValue;
+
+ if (!node) {
+ return '';
+ }
+
+ dataValue = node.getAttribute('data-value');
+ if (dataValue !== null) {
+ return dataValue;
+ }
+
+ if (typeof node.innerText !== 'undefined') {
+ return node.innerText.replace(trimRegExp, '');
+ }
+
+ return node.textContent.replace(trimRegExp, '');
+ },
+
+ setupTypes: function(types) {
+ var type, _i, _len, _results;
+ sortable.types = types;
+ sortable.typesObject = {};
+ _results = [];
+
+ for (_i = 0, _len = types.length; _i < _len; _i++) {
+ type = types[_i];
+ _results.push(sortable.typesObject[type.name] = type);
+ }
+
+ return _results;
+ }
+ };
+
+ // ip type needs to go first to prevent 'numeric" from catching it
+ // 3 dots = IPv4
+ // 2 colons = IPv6
+ // Crude but sufficient here
+ sortable.setupTypes([
+ {
+ name: 'ip',
+ defaultSortDirection: 'ascending',
+ match: function(a) {
+ v4 = a.split(".").length;
+ v6 = a.split(":").length;
+ return ((v4 == 4) || (v6 > 2));
+ },
+ compare: function(a, b) {
+ a = padip(a);
+ b = padip(b);
+ return ((a < b) ? -1 : ((a > b) ? 1 : 0));
+ }
+ }, {
+ name: 'numeric',
+ defaultSortDirection: 'descending',
+
+ match: function(a) {
+ return a.match(numberRegExp);
+ },
+
+ comparator: function(a) {
+ return parseFloat(a.replace(/[^0-9.-]/g, ''), 10) || 0;
+ }
+ }, {
+ name: 'date',
+ defaultSortDirection: 'ascending',
+ reverse: true,
+ match: function(a) {
+ return !isNaN(Date.parse(a));
+ },
+
+ comparator: function(a) {
+ return Date.parse(a) || 0;
+ }
+ }, {
+ name: 'alpha',
+ defaultSortDirection: 'ascending',
+ match: function() {
+ return true;
+ },
+
+ compare: function(a, b) {
+ return a.localeCompare(b);
+ }
+ }
+ ]);
+
+ setTimeout(sortable.init, 0);
+
+ if (typeof define === 'function' && define.amd) {
+ define(function() {
+ return sortable;
+ });
+ } else if (typeof exports !== 'undefined') {
+ module.exports = sortable;
+ } else {
+ window.Sortable = sortable;
+ }
+}).call(this);
+
+// pad function is based on work by Dominique Fournier
+// https://www.datatables.net/plug-ins/sorting/ip-address
+function padip ( a ) {
+ var i, item;
+ var m = a.split("."),
+ n = a.split(":"),
+ x = "",
+ xa = "";
+
+ if (m.length == 4) {
+ // IPV4
+ for(i = 0; i < m.length; i++) {
+ item = m[i];
+
+ if(item.length == 1) {
+ x += "00" + item;
+ }
+ else if(item.length == 2) {
+ x += "0" + item;
+ }
+ else {
+ x += item;
+ }
+ }
+ } else if (n.length > 0) {
+ // IPV6
+ var count = 0;
+ for(i = 0; i < n.length; i++) {
+ item = n[i];
+
+ if (i > 0) {
+ xa += ":";
+ }
+
+ if(item.length === 0) {
+ count += 0;
+ }
+ else if(item.length == 1) {
+ xa += "000" + item;
+ count += 4;
+ }
+ else if(item.length == 2) {
+ xa += "00" + item;
+ count += 4;
+ }
+ else if(item.length == 3) {
+ xa += "0" + item;
+ count += 4;
+ }
+ else {
+ xa += item;
+ count += 4;
+ }
+ }
+
+ // Padding the ::
+ n = xa.split(":");
+ var paddDone = 0;
+
+ for (i = 0; i < n.length; i++) {
+ item = n[i];
+
+ if (item.length === 0 && paddDone === 0) {
+ for (var padding = 0 ; padding < (32-count) ; padding++) {
+ x += "0";
+ paddDone = 1;
+ }
+ }
+ else {
+ x += item;
+ }
+ }
+ }
+
+ return x;
+} \ No newline at end of file
diff --git a/src/usr/local/www/stats.php b/src/usr/local/www/stats.php
index 6f34673..41dc6e4 100644
--- a/src/usr/local/www/stats.php
+++ b/src/usr/local/www/stats.php
@@ -1,39 +1,57 @@
<?php
/*
- $Id$
- part of pfSense (https://www.pfsense.org)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ stats.php
*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-cpuutilization
-##|*NAME=Diagnostics: CPU Utilization page
-##|*DESCR=Allow access to the 'Diagnostics: CPU Utilization' page.
-##|*MATCH=stats.php*
-##|-PRIV
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
require_once("guiconfig.inc");
require_once("includes/functions.inc.php");
diff --git a/src/usr/local/www/status.php b/src/usr/local/www/status.php
index 18cc450..06fa756 100755
--- a/src/usr/local/www/status.php
+++ b/src/usr/local/www/status.php
@@ -1,5 +1,7 @@
<?php
-/* $Id$ */
+/*
+ status.php
+*/
/* Run various commands and collect their output into HTML tables.
* Jim McBeath <jimmc@macrovision.com> Nov 2003
*
@@ -7,40 +9,63 @@
* (modified for pfSense by Scott Ullrich geekgod@pfsense.com)
*
*/
-/*
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/vmstat /usr/bin/netstat /sbin/dmesg /sbin/mount /sbin/setkey /usr/local/sbin/pftop
- pfSense_BUILDER_BINARIES: /sbin/pfctl /sbin/sysctl /usr/bin/top /usr/bin/netstat /sbin/pfctl /sbin/ifconfig
- pfSense_MODULE: support
-*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-hidden-detailedstatus
-##|*NAME=Hidden: Detailed Status page
+##|*NAME=Hidden: Detailed Status
##|*DESCR=Allow access to the 'Hidden: Detailed Status' page.
##|*MATCH=status.php*
##|-PRIV
@@ -70,9 +95,9 @@ function doCmdT($title, $command) {
echo "\n<a name=\"" . str_replace($rubbish, '', $title) . "\" id=\"" . str_replace($rubbish, '', $title) . "\"></a>\n";
print('<div class="panel panel-default">');
- print( '<div class="panel-heading">' . $title . '</div>');
- print( '<div class="panel-body">');
- print( '<pre>');
+ print('<div class="panel-heading">' . $title . '</div>');
+ print('<div class="panel-body">');
+ print('<pre>');
if ($command == "dumpconfigxml") {
$ofd = @fopen("{$output_path}/config-sanitized.xml", "w");
@@ -118,8 +143,8 @@ function doCmdT($title, $command) {
fclose($ofd);
}
- print( '</pre>');
- print( '</div>');
+ print('</pre>');
+ print('</div>');
print('</div>');
}
@@ -138,13 +163,13 @@ function listCmds() {
$rubbish = array('|', '-', '/', '.', ' '); /* fixes the <a> tag to be W3C compliant */
print('<div class="panel panel-default">');
- print( '<div class="panel-heading">' . gettext("System status on ") . $currentDate . '</div>');
- print( '<div class="panel-body">');
- print( ' <div class="content">');
+ print('<div class="panel-heading">' . gettext("System status on ") . $currentDate . '</div>');
+ print('<div class="panel-body">');
+ print(' <div class="content">');
print("\n<p>" . gettext("This status page includes the following information") . ":\n");
print("<ul>\n");
- for ($i = 0; isset($commands[$i]); $i++ ) {
- print("\t<li><strong><a href=\"#" . str_replace($rubbish,'',$commands[$i][0]) . "\">" . $commands[$i][0] . "</a></strong></li>\n");
+ for ($i = 0; isset($commands[$i]); $i++) {
+ print("\t<li><strong><a href=\"#" . str_replace($rubbish, '', $commands[$i][0]) . "\">" . $commands[$i][0] . "</a></strong></li>\n");
}
print("</ul>\n");
@@ -166,56 +191,57 @@ global $g, $config;
/* Set up all of the commands we want to execute. */
/* System stats/info */
-defCmdT("System uptime","/usr/bin/uptime");
-defCmdT("Interfaces","/sbin/ifconfig -a");
-defCmdT("Interface Statistics","/usr/bin/netstat -ni");
+defCmdT("System uptime", "/usr/bin/uptime");
+defCmdT("Interfaces", "/sbin/ifconfig -a");
+defCmdT("Interface Statistics", "/usr/bin/netstat -nWi");
defCmdT("Top Process Info", "/usr/bin/top | /usr/bin/head -n5");
-defCmdT("Processes","/bin/ps xauww");
+defCmdT("Processes", "/bin/ps xauww");
defCmdT("Mounted Filesystems", "/sbin/mount");
-defCmdT("Free Disk Space","/bin/df -hi");
-defCmdT("Routing tables","/usr/bin/netstat -nWr");
-defCmdT("Mbuf Usage","/usr/bin/netstat -mb");
+defCmdT("Free Disk Space", "/bin/df -hi");
+defCmdT("Routing tables", "/usr/bin/netstat -nWr");
+defCmdT("Mbuf Usage", "/usr/bin/netstat -mb");
defCmdT("VMStat", "/usr/bin/vmstat -afimsz");
defCmdT("Sockets", "/usr/bin/sockstat");
/* Firewall rules and info */
-defCmdT("Generated Ruleset","/bin/cat {$g['tmp_path']}/rules.debug");
-defCmdT("Generated Ruleset Limiters","/bin/cat {$g['tmp_path']}/rules.limiter");
-defCmdT("Generated Ruleset Limits","/bin/cat {$g['tmp_path']}/rules.limits");
+defCmdT("Generated Ruleset", "/bin/cat {$g['tmp_path']}/rules.debug");
+defCmdT("Generated Ruleset Limiters", "/bin/cat {$g['tmp_path']}/rules.limiter");
+defCmdT("Generated Ruleset Limits", "/bin/cat {$g['tmp_path']}/rules.limits");
defCmdT("pf NAT Rules", "/sbin/pfctl -vvsn");
defCmdT("pf Firewall Rules", "/sbin/pfctl -vvsr");
-defCmdT("pf Tables","/sbin/pfctl -vs Tables");
-defCmdT("pf State Table Contents", "/sbin/pfctl -ss");
+defCmdT("pf Tables", "/sbin/pfctl -vs Tables");
+defCmdT("pf State Table Contents", "/sbin/pfctl -vvss");
defCmdT("pf Info", "/sbin/pfctl -si");
defCmdT("pf Show All", "/sbin/pfctl -sa");
-defCmdT("pf Queues","/sbin/pfctl -s queue -v");
-defCmdT("pf OSFP","/sbin/pfctl -s osfp");
-defCmdT("pfsync stats","/usr/bin/netstat -s -ppfsync");
-defCmdT("pftop Default","/usr/local/sbin/pftop -a -b");
-defCmdT("pftop Long","/usr/local/sbin/pftop -w 150 -a -b -v long");
-defCmdT("pftop Queue","/usr/local/sbin/pftop -w 150 -a -b -v queue");
-defCmdT("pftop Rules","/usr/local/sbin/pftop -w 150 -a -b -v rules");
-defCmdT("pftop Size","/usr/local/sbin/pftop -w 150 -a -b -v size");
-defCmdT("pftop Speed","/usr/local/sbin/pftop -w 150 -a -b -v speed");
+defCmdT("pf Queues", "/sbin/pfctl -s queue -v");
+defCmdT("pf OSFP", "/sbin/pfctl -s osfp");
+defCmdT("pfsync stats", "/usr/bin/netstat -s -ppfsync");
+defCmdT("pftop Default", "/usr/local/sbin/pftop -a -b");
+defCmdT("pftop Long", "/usr/local/sbin/pftop -w 150 -a -b -v long");
+defCmdT("pftop Queue", "/usr/local/sbin/pftop -w 150 -a -b -v queue");
+defCmdT("pftop Rules", "/usr/local/sbin/pftop -w 150 -a -b -v rules");
+defCmdT("pftop Size", "/usr/local/sbin/pftop -w 150 -a -b -v size");
+defCmdT("pftop Speed", "/usr/local/sbin/pftop -w 150 -a -b -v speed");
if (isset($config['captiveportal']) && is_array($config['captiveportal'])) {
foreach ($config['captiveportal'] as $cpZone => $cpdata) {
- if (isset($cpdata['enable']))
+ if (isset($cpdata['enable'])) {
defCmdT("IPFW rules for {$cpdata['zone']}", "/sbin/ipfw -x " . escapeshellarg($cpdata['zoneid']) . " show");
+ }
}
}
/* Configuration Files */
defCmdT("Contents of var run", "/bin/ls /var/run");
defCmdT("Contents of conf", "/bin/ls /conf");
-defCmdT("config.xml","dumpconfigxml");
-defCmdT("resolv.conf","/bin/cat /etc/resolv.conf");
-defCmdT("DHCP Configuration","/bin/cat /var/dhcpd/etc/dhcpd.conf");
-defCmdT("DHCPv6 Configuration","/bin/cat /var/dhcpd/etc/dhcpdv6.conf");
-defCmdT("strongSwan config","/bin/cat /var/etc/ipsec/strongswan.conf");
-defCmdT("IPsec config","/bin/cat /var/etc/ipsec/ipsec.conf");
-defCmdT("IPsec Status","/usr/local/sbin/ipsec statusall");
-defCmdT("SPD","/sbin/setkey -DP");
-defCmdT("SAD","/sbin/setkey -D");
+defCmdT("config.xml", "dumpconfigxml");
+defCmdT("resolv.conf", "/bin/cat /etc/resolv.conf");
+defCmdT("DHCP Configuration", "/bin/cat /var/dhcpd/etc/dhcpd.conf");
+defCmdT("DHCPv6 Configuration", "/bin/cat /var/dhcpd/etc/dhcpdv6.conf");
+defCmdT("strongSwan config", "/bin/cat /var/etc/ipsec/strongswan.conf");
+defCmdT("IPsec config", "/bin/cat /var/etc/ipsec/ipsec.conf");
+defCmdT("IPsec Status", "/usr/local/sbin/ipsec statusall");
+defCmdT("SPD", "/sbin/setkey -DP");
+defCmdT("SAD", "/sbin/setkey -D");
if (file_exists("/cf/conf/upgrade_log.txt")) {
defCmdT("Upgrade Log", "/bin/cat /cf/conf/upgrade_log.txt");
}
@@ -225,30 +251,31 @@ if (file_exists("/boot/loader.conf")) {
if (file_exists("/boot/loader.conf.local")) {
defCmdT("Loader Configuration (Local)", "/bin/cat /boot/loader.conf.local");
}
-if (file_exists("/var/run/apinger.status")) {
- defCmdT("Gateway Status", "/bin/cat /var/run/apinger.status");
-}
-if (file_exists("/var/etc/apinger.conf")) {
- defCmdT("Gateway Monitoring Config", "/bin/cat /var/etc/apinger.conf");
-}
if (file_exists("/var/etc/filterdns.conf")) {
defCmdT("Filter DNS Daemon Config", "/bin/cat /var/etc/filterdns.conf");
}
-if(isset($config['system']['usefifolog'])) {
- defCmdT("last 500 system log entries","/usr/sbin/fifolog_reader /var/log/system.log 2>&1 | tail -n 500");
- defCmdT("last 50 filter log entries","/usr/sbin/fifolog_reader /var/log/filter.log 2>&1 | tail -n 50");
- defCmdT("last 100 IPsec log entries","/usr/sbin/fifolog_reader /var/log/ipsec.log 2>&1 | tail -n 100");
-} else {
- defCmdT("last 500 system log entries","/usr/local/sbin/clog /var/log/system.log 2>&1 | tail -n 500");
- defCmdT("last 50 filter log entries","/usr/local/sbin/clog /var/log/filter.log 2>&1 | tail -n 50");
- defCmdT("last 100 IPsec log entries","/usr/local/sbin/clog /var/log/ipsec.log 2>&1 | tail -n 100");
-}
+defCmdT("last 1000 system log entries", "/usr/local/sbin/clog /var/log/system.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 DHCP log entries", "/usr/local/sbin/clog /var/log/dhcpd.log 2>&1 | tail -n 1000");
+defCmdT("last 500 filter log entries", "/usr/local/sbin/clog /var/log/filter.log 2>&1 | tail -n 500");
+defCmdT("last 1000 gateways log entries", "/usr/local/sbin/clog /var/log/gateways.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 IPsec log entries", "/usr/local/sbin/clog /var/log/ipsec.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 L2TP log entries", "/usr/local/sbin/clog /var/log/l2tps.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 NTP log entries", "/usr/local/sbin/clog /var/log/ntpd.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 OpenVPN log entries", "/usr/local/sbin/clog /var/log/openvpn.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 Captive Portal auth log entries", "/usr/local/sbin/clog /var/log/portalauth.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 PPP log entries", "/usr/local/sbin/clog /var/log/poes.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 relayd log entries", "/usr/local/sbin/clog /var/log/relayd.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 resolver log entries", "/usr/local/sbin/clog /var/log/resolver.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 routing log entries", "/usr/local/sbin/clog /var/log/routing.log 2>&1 | tail -n 1000");
+defCmdT("last 1000 wireless log entries", "/usr/local/sbin/clog /var/log/wireless.log 2>&1 | tail -n 1000");
if (file_exists("/tmp/PHP_errors.log")) {
defCmdT("PHP Error Log", "/bin/cat /tmp/PHP_errors.log");
}
-defCmdT("System Message Buffer","/sbin/dmesg -a");
-defCmdT("System Message Buffer (Boot)","/bin/cat /var/log/dmesg.boot");
-defCmdT("sysctl values","/sbin/sysctl -a");
+defCmdT("System Message Buffer", "/sbin/dmesg -a");
+defCmdT("System Message Buffer (Boot)", "/bin/cat /var/log/dmesg.boot");
+defCmdT("sysctl values", "/sbin/sysctl -a");
+defCmdT("Kernel Environment", "/bin/kenv");
+defCmdT("Installed OS Packages", "/usr/sbin/pkg info");
exec("/bin/date", $dateOutput, $dateStatus);
$currentDate = $dateOutput[0];
@@ -265,4 +292,14 @@ print_info_box(gettext("Make sure all sensitive information is removed! (Passwor
listCmds();
execCmds();
-include("foot.inc"); \ No newline at end of file
+print(gettext("Saving output to archive..."));
+
+if (is_dir($output_path)) {
+ mwexec("/usr/bin/tar czpf " . escapeshellarg($output_file) . " -C " . escapeshellarg(dirname($output_path)) . " " . escapeshellarg(basename($output_path)));
+ unlink_if_exists("{$output_path}/*");
+ @rmdir($output_path);
+}
+
+print(gettext("Done."));
+
+include("foot.inc");
diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php
index 5a4c89a..c497ab8 100644
--- a/src/usr/local/www/status_captiveportal.php
+++ b/src/usr/local/www/status_captiveportal.php
@@ -1,12 +1,12 @@
<?php
-/* $Id$ */
/*
status_captiveportal.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -55,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: captiveportal
-*/
##|+PRIV
##|*IDENT=page-status-captiveportal
-##|*NAME=Status: Captive portal page
+##|*NAME=Status: Captive portal
##|*DESCR=Allow access to the 'Status: Captive portal' page.
##|*MATCH=status_captiveportal.php*
##|-PRIV
@@ -78,9 +75,6 @@ if (isset($_POST['zone'])) {
}
-$pgtitle = array(gettext("Status: Captive portal"));
-$shortcut_section = "captiveportal";
-
if (!is_array($config['captiveportal'])) {
$config['captiveportal'] = array();
}
@@ -105,10 +99,6 @@ if ($_GET['act'] == "del" && !empty($cpzone) && isset($cpzoneid) && isset($_GET[
exit;
}
-include("head.inc");
-
-flush();
-
function clientcmp($a, $b) {
global $order;
return strcmp($a[$order], $b[$order]);
@@ -133,6 +123,11 @@ if (!empty($cpzone)) {
}
}
+$pgtitle = array(gettext("Status"), gettext("Captive portal"));
+$shortcut_section = "captiveportal";
+
+include("head.inc");
+
if (!empty($cpzone) && isset($config['voucher'][$cpzone]['enable'])):
$tab_array = array();
$tab_array[] = array(gettext("Active Users"), true, "status_captiveportal.php?zone=" . htmlspecialchars($cpzone));
@@ -146,8 +141,6 @@ endif;
// Load MAC-Manufacturer table
$mac_man = load_mac_manufacturer_table();
-require_once('classes/Form.class.php');
-
if (count($a_cp) > 1) {
$form = new Form(false);
@@ -155,8 +148,9 @@ if (count($a_cp) > 1) {
$zonelist = array("" => 'None');
- foreach ($a_cp as $cpkey => $cp)
+ foreach ($a_cp as $cpkey => $cp) {
$zonelist[$cpkey] = $cp['zone'];
+ }
$section->addInput(new Form_Select(
'zone',
@@ -169,17 +163,14 @@ if (count($a_cp) > 1) {
print($form);
}
-?>
+
+if (!empty($cpzone)): ?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status (")?><?=$a_cp[$cpzone]['zone']?>)</h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover table-condensed">
-
-<?php
-if (!empty($cpzone)): ?>
-
<tr>
<th>
<a href="?zone=<?=htmlspecialchars($cpzone)?>&amp;order=ip&amp;showact=<?=htmlspecialchars($_GET['showact'])?>"><?=gettext("IP address")?></a>
@@ -218,7 +209,7 @@ if (!empty($cpzone)): ?>
if (!empty($mac)) {
$mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]);
print htmlentities($mac);
- if(isset($mac_man[$mac_hi])) {
+ if (isset($mac_man[$mac_hi])) {
print "<br /><font size=\"-2\"><i>{$mac_man[$mac_hi]}</i></font>";
}
}
@@ -235,8 +226,11 @@ if (!empty($cpzone)): ?>
</td>
<td>
<?php
- if ($last_act != 0)
- echo htmlspecialchars(date("m/d/Y H:i:s", $last_act))?>
+ if ($last_act != 0) {
+ echo htmlspecialchars(date("m/d/Y H:i:s", $last_act));
+ }
+?>
+
</td>
<?php
else:
@@ -253,10 +247,26 @@ if (!empty($cpzone)): ?>
</tr>
<?php
endforeach;
+?>
+ </table>
+ </div>
+</div>
+<?php
+else:
+ // If no zones have been defined . .
+?>
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status")?></h2></div>
+ <div class="panel-body"><br />
+<?php
+ print_info_box(gettext("No captive portal zones have been configured. You may add new zones here: ") . '<a href="services_captiveportal_zones.php">' . 'Services->Captive portal' . '</a>');
+?>
+ </div>
+</div>
+<?php
endif;
?>
-</table>
<form action="status_captiveportal.php" method="get" style="margin: 14px;">
<input type="hidden" name="order" value="<?=htmlspecialchars($_GET['order'])?>" />
diff --git a/src/usr/local/www/status_captiveportal_expire.php b/src/usr/local/www/status_captiveportal_expire.php
index c9009fb..27d99ca 100644
--- a/src/usr/local/www/status_captiveportal_expire.php
+++ b/src/usr/local/www/status_captiveportal_expire.php
@@ -1,39 +1,63 @@
<?php
/*
- Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
+ status_captiveportal_expire.php
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Marcel Wiget <mwiget@mac.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-captiveportal-expire
-##|*NAME=Status: Captive portal Expire Vouchers page
-##|*DESCR=Allow access to the 'Status: Captive portal Expire Vouchers' page.
+##|*NAME=Status: Captive Portal: Expire Vouchers
+##|*DESCR=Allow access to the 'Status: Captive Portal: Expire Vouchers' page.
##|*MATCH=status_captiveportal_expire.php*
##|-PRIV
@@ -71,8 +95,6 @@ $tab_array[] = array(gettext("Test Vouchers"), false, "status_captiveportal_test
$tab_array[] = array(gettext("Expire Vouchers"), true, "status_captiveportal_expire.php?zone={$cpzone}");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form;
$section = new Form_Section('Expire Vouchers');
@@ -95,11 +117,12 @@ print($form);
if ($_POST) {
if ($_POST['vouchers']) {
- if(voucher_expire($_POST['vouchers']))
+ if (voucher_expire($_POST['vouchers'])) {
print_info_box(gettext('Voucher successfully marked'), 'success');
- else
+ } else {
print_info_box(gettext('Error: Voucher could not be processed'), 'danger');
+ }
}
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/status_captiveportal_test.php b/src/usr/local/www/status_captiveportal_test.php
index 64e74f4..227669d 100644
--- a/src/usr/local/www/status_captiveportal_test.php
+++ b/src/usr/local/www/status_captiveportal_test.php
@@ -1,39 +1,63 @@
<?php
/*
status_captiveportal_test.php
- Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Marcel Wiget <mwiget@mac.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-captiveportal-test
-##|*NAME=Status: Captive portal test Vouchers page
-##|*DESCR=Allow access to the 'Status: Captive portal Test Vouchers' page.
+##|*NAME=Status: Captive Portal: Test Vouchers
+##|*DESCR=Allow access to the 'Status: Captive Portal: Test Vouchers' page.
##|*MATCH=status_captiveportal_test.php*
##|-PRIV
@@ -72,8 +96,6 @@ $tab_array[] = array(gettext("Test Vouchers"), true, "status_captiveportal_test.
$tab_array[] = array(gettext("Expire Vouchers"), false, "status_captiveportal_expire.php?zone={$cpzone}");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form;
$section = new Form_Section('Test Vouchers');
@@ -101,9 +123,9 @@ if ($_POST) {
foreach ($test_results as $result) {
if (strpos($result, " good ") || strpos($result, " granted ")) {
- $output .= '<font color="green">' . htmlspecialchars($result) . '</font>' . '<br />';
+ $output .= '<span class="text-success">' . htmlspecialchars($result) . '</span>' . '<br />';
} else {
- $output .= '<font color="red">' . htmlspecialchars($result) . '</font>' . '<br />';
+ $output .= '<span class="text-danger">' . htmlspecialchars($result) . '</span>' . '<br />';
}
}
diff --git a/src/usr/local/www/status_captiveportal_voucher_rolls.php b/src/usr/local/www/status_captiveportal_voucher_rolls.php
index f7f3ac9..2d8f2f3 100644
--- a/src/usr/local/www/status_captiveportal_voucher_rolls.php
+++ b/src/usr/local/www/status_captiveportal_voucher_rolls.php
@@ -1,39 +1,62 @@
<?php
/*
status_captiveportal_voucher_rolls.php
-
- Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Marcel Wiget <mwiget@mac.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-captiveportal-voucher-rolls
-##|*NAME=Status: Captive portal Voucher Rolls page
+##|*NAME=Status: Captive portal Voucher Rolls
##|*DESCR=Allow access to the 'Status: Captive portal Voucher Rolls' page.
##|*MATCH=status_captiveportal_voucher_rolls.php*
##|-PRIV
@@ -96,9 +119,9 @@ display_top_tabs($tab_array);
<?php
$voucherlck = lock("vouche{$cpzone}r");
$i = 0;
- foreach($a_roll as $rollent):
+ foreach ($a_roll as $rollent):
$used = voucher_used_count($rollent['number']);
- $active = count(voucher_read_active_db($rollent['number']),$rollent['minutes']);
+ $active = count(voucher_read_active_db($rollent['number']), $rollent['minutes']);
$ready = $rollent['count'] - $used;
/* used also count active vouchers, remove them */
$used = $used - $active;
@@ -134,4 +157,4 @@ display_top_tabs($tab_array);
</tbody>
</table>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/status_captiveportal_vouchers.php b/src/usr/local/www/status_captiveportal_vouchers.php
index 8ff5c20..95a3c42 100644
--- a/src/usr/local/www/status_captiveportal_vouchers.php
+++ b/src/usr/local/www/status_captiveportal_vouchers.php
@@ -1,38 +1,62 @@
<?php
/*
status_captiveportal_vouchers.php
- Copyright (C) 2007 Marcel Wiget <mwiget@mac.com>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: captiveportal
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Marcel Wiget <mwiget@mac.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-captiveportal-vouchers
-##|*NAME=Status: Captive portal Vouchers page
+##|*NAME=Status: Captive portal Vouchers
##|*DESCR=Allow access to the 'Status: Captive portal Vouchers' page.
##|*MATCH=status_captiveportal_vouchers.php*
##|-PRIV
@@ -143,4 +167,4 @@ endforeach;
</table>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/carp_status.php b/src/usr/local/www/status_carp.php
index e70e3c2..07dde06 100644
--- a/src/usr/local/www/carp_status.php
+++ b/src/usr/local/www/status_carp.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
- carp_status.php
+ status_carp.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -57,23 +55,14 @@
##|+PRIV
##|*IDENT=page-status-carp
-##|*NAME=Status: CARP page
+##|*NAME=Status: CARP
##|*DESCR=Allow access to the 'Status: CARP' page.
-##|*MATCH=carp_status.php*
+##|*MATCH=status_carp.php*
##|-PRIV
-/*
- pfSense_MODULE: carp
-*/
-
require_once("guiconfig.inc");
require_once("globals.inc");
-function gentitle_pkg($pgname) {
- global $config;
- return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname;
-}
-
unset($interface_arr_cache);
unset($carp_interface_count_cache);
unset($interface_ip_arr_cache);
@@ -90,13 +79,10 @@ if ($_POST['disablecarp'] != "") {
set_single_sysctl('net.inet.carp.allow', '0');
if (is_array($config['virtualip']['vip'])) {
$viparr = &$config['virtualip']['vip'];
- $found_dhcpdv6 = false;
foreach ($viparr as $vip) {
- $carp_iface = "{$vip['interface']}_vip{$vip['vhid']}";
switch ($vip['mode']) {
case "carp":
interface_vip_bring_down($vip);
- interface_ipalias_cleanup($carp_iface);
/*
* Reconfigure radvd when necessary
@@ -104,7 +90,8 @@ if ($_POST['disablecarp'] != "") {
*/
if (isset($config['dhcpdv6']) && is_array($config['dhcpdv6'])) {
foreach ($config['dhcpdv6'] as $dhcpv6if => $dhcpv6ifconf) {
- if ($dhcpv6ifconf['rainterface'] != $carp_iface) {
+ if ($dhcpv6if !== $vip['interface'] ||
+ $dhcpv6ifconf['ramode'] === "disabled") {
continue;
}
@@ -156,8 +143,9 @@ $pgtitle = array(gettext("Status"), gettext("CARP"));
$shortcut_section = "carp";
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$carpcount = 0;
if (is_array($config['virtualip']['vip'])) {
@@ -178,26 +166,26 @@ if (is_array($config['virtualip']['vip'])) {
<?php
if ($carpcount == 0) {
print_info_box(gettext('No CARP interfaces have been defined.') . '<br />' .
- '<a href="system_hasync.php" class="alert-link">' .
+ '<a href="system_hasync.php" class="alert-link">' .
gettext("You can configure high availability sync settings here") .
'</a>');
-} else
-{
+} else {
?>
-<form action="carp_status.php" method="post">
+<form action="status_carp.php" method="post">
<?php
- if($status > 0)
+ if ($status > 0) {
$carp_enabled = true;
- else
+ } else {
$carp_enabled = false;
-
- // SAdly this needs to be here so that it is inside the form
+ }
+
+ // Sadly this needs to be here so that it is inside the form
if ($carp_detected_problems > 0) {
print_info_box(
gettext("CARP has detected a problem and this unit has been demoted to BACKUP status.") . "<br/>" .
gettext("Check the link status on all interfaces with configured CARP VIPs.") . "<br/>" .
gettext("Search the") .
- " <a href=\"/diag_logs.php?filtertext=carp%3A+demoted+by\">" .
+ " <a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">" .
gettext("system log") .
"</a> " .
gettext("for CARP demotion-related events.") . "<br/><br/>" .
@@ -210,13 +198,13 @@ if ($carpcount == 0) {
?>
<input type="submit" class="btn btn-warning" name="disablecarp" value="<?=($carp_enabled ? gettext("Temporarily Disable CARP") : gettext("Enable CARP"))?>" />
<input type="submit" class="btn btn-info" name="carp_maintenancemode" id="carp_maintenancemode" value="<?=(isset($config["virtualip_carp_maintenancemode"]) ? gettext("Leave Persistent CARP Maintenance Mode") : gettext("Enter Persistent CARP Maintenance Mode"))?>" />
-
+
<br /><br />
-
+
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('OpenVPN Servers')?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('CARP Interfaces')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-condensed table-hover sortable-theme-bootstrap " data-sortable>
<thead>
<tr>
<th><?=gettext("CARP Interface")?></th>
@@ -230,28 +218,28 @@ if ($carpcount == 0) {
if ($carp['mode'] != "carp") {
continue;
}
-
+
$ipaddress = $carp['subnet'];
$vhid = $carp['vhid'];
- $status = get_carp_interface_status("{$carp['interface']}_vip{$carp['vhid']}");
-
- if($carp_enabled == false) {
- $icon = 'remove-sign';
+ $status = get_carp_interface_status("_vip{$carp['uniqid']}");
+
+ if ($carp_enabled == false) {
+ $icon = 'times-circle';
$status = "DISABLED";
} else {
if ($status == "MASTER") {
- $icon = 'ok-sign';
+ $icon = 'check-circle';
} else if ($status == "BACKUP") {
- $icon = 'ok-circle';
+ $icon = 'check-circle-o';
} else if ($status == "INIT") {
- $icon = 'question-sign';
+ $icon = 'question-circle';
}
}
?>
<tr>
<td><?=convert_friendly_interface_to_friendly_descr($carp['interface'])?>@<?=$vhid?></td>
<td><?=$ipaddress?></td>
- <td><i class="icon icon-<?=$icon?>"></i>&nbsp;<?=$status?></td>
+ <td><i class="fa fa-<?=$icon?>"></i>&nbsp;<?=$status?></td>
</tr>
<?php }?>
</tbody>
diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php
index eb1a7dd..60fa055 100644
--- a/src/usr/local/www/status_dhcp_leases.php
+++ b/src/usr/local/www/status_dhcp_leases.php
@@ -1,11 +1,12 @@
<?php
-/* $Id$ */
/*
status_dhcp_leases.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,14 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/awk /bin/cat /usr/sbin/arp /usr/bin/wc /usr/bin/grep
- pfSense_MODULE: dhcpserver
-*/
##|+PRIV
##|*IDENT=page-status-dhcpleases
-##|*NAME=Status: DHCP leases page
+##|*NAME=Status: DHCP leases
##|*DESCR=Allow access to the 'Status: DHCP leases' page.
##|*MATCH=status_dhcp_leases.php*
##|-PRIV
@@ -304,7 +301,7 @@ if (count($pools) > 0) {
foreach ($config['interfaces'] as $ifname => $ifarr) {
if (is_array($config['dhcpd'][$ifname]) &&
- is_array($config['dhcpd'][$ifname]['staticmap'])) {
+ is_array($config['dhcpd'][$ifname]['staticmap'])) {
$staticmap_array_index = 0;
foreach ($config['dhcpd'][$ifname]['staticmap'] as $static) {
$slease = array();
@@ -334,7 +331,7 @@ if (count($pools) > 0) {
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Pool status')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Failover Group")?></a></th>
@@ -365,7 +362,7 @@ if (count($pools) > 0) {
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Leases')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><!-- icon --></th>
@@ -384,23 +381,26 @@ $dhcp_leases_subnet_counter = array(); //array to sum up # of leases / subnet
$iflist = get_configured_interface_with_descr(); //get interface descr for # of leases
foreach ($leases as $data):
- if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1)
+ if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1) {
continue;
+ }
- if ($data['act'] == 'active')
- $icon = 'icon-ok-circle';
- elseif ($data['act'] == 'expired')
- $icon = 'icon-ban-circle';
- else
- $icon = 'icon-remove-circle';
+ if ($data['act'] == 'active') {
+ $icon = 'fa-check-circle-o';
+ } elseif ($data['act'] == 'expired') {
+ $icon = 'fa-ban';
+ } else {
+ $icon = 'fa-times-circle-o';
+ }
$lip = ip2ulong($data['ip']);
if ($data['act'] != "static") {
$dlsc=0;
foreach ($config['dhcpd'] as $dhcpif => $dhcpifconf) {
- if (!is_array($dhcpifconf['range']))
+ if (!is_array($dhcpifconf['range'])) {
continue;
+ }
if (($lip >= ip2ulong($dhcpifconf['range']['from'])) && ($lip <= ip2ulong($dhcpifconf['range']['to']))) {
$data['if'] = $dhcpif;
$dhcp_leases_subnet_counter[$dlsc]['dhcpif'] = $dhcpif;
@@ -418,12 +418,12 @@ foreach ($leases as $data):
$mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]);
?>
<tr>
- <td><i class="icon <?=$icon?>"></i></td>
+ <td><i class="fa <?=$icon?>"></i></td>
<td><?=$data['ip']?></td>
<td>
<?=$mac?>
- <? if(isset($mac_man[$mac_hi])):?>
+ <? if (isset($mac_man[$mac_hi])):?>
(<?=$mac_man[$mac_hi]?>)
<?endif?>
</td>
@@ -439,27 +439,17 @@ foreach ($leases as $data):
<td><?=$data['act']?></td>
<td>
<? if ($data['type'] == "dynamic"): ?>
- <a class="btn btn-xs btn-primary" href="services_dhcp_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;hostname=<?=htmlspecialchars($data['hostname'])?>">
- <?=gettext("add static mapping")?>
- </a>
+ <a class="fa fa-plus-square-o" title="<?=gettext("Add static mapping")?>" href="services_dhcp_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;hostname=<?=htmlspecialchars($data['hostname'])?>"></a>
<? else: ?>
- <a class="btn btn-xs btn-primary" href="services_dhcp_edit.php?if=<?=$data['if']?>&amp;id=<?=$data['staticmap_array_index']?>">
- <?=gettext("edit static mapping")?>
- </a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit static mapping')?>" href="services_dhcp_edit.php?if=<?=$data['if']?>&amp;id=<?=$data['staticmap_array_index']?>"></a>
<? endif; ?>
- <a class="btn btn-xs btn-success" href="services_wol_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;descr=<?=htmlentities($data['hostname'])?>">
- add WOL mapping
- </a>
+ <a class="fa fa-plus-square" title="<?=gettext("Add WOL mapping")?>" href="services_wol_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;descr=<?=htmlentities($data['hostname'])?>"></a>
<? if ($data['online'] != "online"):?>
- <a class="btn btn-xs btn-warning" href="services_wol.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>">
- send WOL packet
- </a>
+ <a class="fa fa-power-off" title="<?=gettext("Send WOL packet")?>" href="services_wol.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>"></a>
<? endif; ?>
<? if ($data['type'] == "dynamic" && $data['online'] != "online"):?>
- <a class="btn btn-xs btn-danger" href="status_dhcp_leases.php?deleteip=<?=$data['ip']?>&amp;all=<?=intval($_GET['all'])?>">
- delete lease
- </a>
+ <a class="fa fa-trash" title="<?=gettext('Delete lease')?>" href="status_dhcp_leases.php?deleteip=<?=$data['ip']?>&amp;all=<?=intval($_GET['all'])?>"></a>
<? endif?>
</td>
<? endforeach; ?>
@@ -472,7 +462,7 @@ foreach ($leases as $data):
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Leases in use')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Interface")?></th>
diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php
index 925f2da..e557906 100644
--- a/src/usr/local/www/status_dhcpv6_leases.php
+++ b/src/usr/local/www/status_dhcpv6_leases.php
@@ -1,46 +1,65 @@
<?php
-/* $Id$ */
/*
status_dhcpv6_leases.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2011 Seth Mos
- Copyright (C) 2004-2009 Scott Ullrich
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/awk /bin/cat /usr/sbin/ndp /usr/bin/wc /usr/bin/grep
- pfSense_MODULE: dhcpserver
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2011 Seth Mos
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-dhcpv6leases
-##|*NAME=Status: DHCPv6 leases page
+##|*NAME=Status: DHCPv6 leases
##|*DESCR=Allow access to the 'Status: DHCPv6 leases' page.
##|*MATCH=status_dhcpv6_leases.php*
##|-PRIV
@@ -308,11 +327,11 @@ while ($i < $leases_count) {
$f = $f+2;
break;
case "client-hostname":
- if($data[$f+1] != "") {
- $entry['hostname'] = preg_replace('/"/','',$data[$f+1]);
+ if ($data[$f+1] != "") {
+ $entry['hostname'] = preg_replace('/"/', '', $data[$f+1]);
} else {
$hostname = gethostbyaddr($entry['ip']);
- if($hostname != "") {
+ if ($hostname != "") {
$entry['hostname'] = $hostname;
}
}
@@ -381,7 +400,7 @@ if (count($pools) > 0) {
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Pool status')?></h2></div>
<div class="panel-body">
- <table class="table">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Failover Group")?></a></th>
@@ -409,14 +428,15 @@ if (count($pools) > 0) {
/* only print pool status when we have one */
}
-if (empty($leases))
+if (empty($leases)) {
print '<div class="alert alert-warning" role="alert">'. gettext("No leases file found. Is the DHCP server active?") .'</div>';
+}
?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Leases')?></h2></div>
<div class="panel-body">
- <table class="table">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><!-- icon --></th>
@@ -434,19 +454,21 @@ if (empty($leases))
<tbody>
<?php
foreach ($leases as $data):
- if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1)
+ if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1) {
continue;
+ }
- if ($data['act'] == 'active')
- $icon = 'icon-ok-circle';
- elseif ($data['act'] == 'expired')
- $icon = 'icon-ban-circle';
- else
- $icon = 'icon-remove-circle';
+ if ($data['act'] == 'active') {
+ $icon = 'fa-check-circle-o';
+ } elseif ($data['act'] == 'expired') {
+ $icon = 'fa-ban';
+ } else {
+ $icon = 'fa-times-circle-o';
+ }
if ($data['act'] == "static") {
foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) {
- if(is_array($dhcpifconf['staticmap'])) {
+ if (is_array($dhcpifconf['staticmap'])) {
foreach ($dhcpifconf['staticmap'] as $staticent) {
if ($data['ip'] == $staticent['ipaddr']) {
$data['if'] = $dhcpif;
@@ -455,8 +477,9 @@ foreach ($leases as $data):
}
}
/* exit as soon as we have an interface */
- if ($data['if'] != "")
+ if ($data['if'] != "") {
break;
+ }
}
} else {
$data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip']));
@@ -466,14 +489,14 @@ foreach ($leases as $data):
$mac_hi = strtoupper($mac[0] . $mac[1] . $mac[3] . $mac[4] . $mac[6] . $mac[7]);
?>
<tr>
- <td><i class="icon <?=$icon?>"></i></td>
+ <td><i class="fa <?=$icon?>"></i></td>
<td><?=$data['ip']?></td>
<td><?=$data['iaid']?></td>
<td><?=$data['duid']?></td>
<td>
<?=$mac?>
- <? if(isset($mac_man[$mac_hi])):?>
+ <? if (isset($mac_man[$mac_hi])):?>
(<?=$mac_man[$mac_hi]?>)
<?endif?>
</td>
@@ -489,19 +512,11 @@ foreach ($leases as $data):
<td><?=$data['act']?></td>
<td>
<? if ($data['type'] == "dynamic"): ?>
- <a class="btn btn-xs btn-primary" href="services_dhcpv6_edit.php?if=<?=$data['if']?>&amp;duid=<?=$data['duid']?>&amp;hostname=<?=htmlspecialchars($data['hostname'])?>">
- <?=gettext("add static mapping")?>
- </a>
+ <a <a class="fa fa-plus-square-o" title="<?=gettext("Add static mapping")?>" href="services_dhcpv6_edit.php?if=<?=$data['if']?>&amp;duid=<?=$data['duid']?>&amp;hostname=<?=htmlspecialchars($data['hostname'])?>"></a>
<? endif; ?>
-
- <a class="btn btn-xs btn-success" href="services_wol_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;descr=<?=htmlentities($data['hostname'])?>">
- add WOL mapping
- </a>
-
+ <a class="fa fa-plus-square" title="<?=gettext("Add WOL mapping")?>" href="services_wol_edit.php?if=<?=$data['if']?>&amp;mac=<?=$data['mac']?>&amp;descr=<?=htmlentities($data['hostname'])?>"></a>
<? if ($data['type'] == "dynamic" && $data['online'] != "online"):?>
- <a class="btn btn-xs btn-danger" href="status_dhcpv6_leases.php?deleteip=<?=$data['ip']?>&amp;all=<?=intval($_GET['all'])?>">
- delete lease
- </a>
+ <a class="fa fa-trash" title="<?=gettext('Delete lease')?>" href="status_dhcpv6_leases.php?deleteip=<?=$data['ip']?>&amp;all=<?=intval($_GET['all'])?>"></a>
<? endif?>
</td>
<? endforeach; ?>
@@ -514,7 +529,7 @@ foreach ($leases as $data):
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('Delegated Prefixes')?></h2></div>
<div class="panel-body">
- <table class="table">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("IPv6 Prefix")?></th>
@@ -528,19 +543,21 @@ foreach ($leases as $data):
<tbody>
<?php
foreach ($prefixes as $data):
- if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1)
+ if ($data['act'] != "active" && $data['act'] != "static" && $_GET['all'] != 1) {
continue;
+ }
- if ($data['act'] == 'active')
- $icon = 'icon-ok-circle';
- elseif ($data['act'] == 'expired')
- $icon = 'icon-ban-circle';
- else
- $icon = 'icon-remove-circle';
+ if ($data['act'] == 'active') {
+ $icon = 'fa-check-circle-o';
+ } elseif ($data['act'] == 'expired') {
+ $icon = 'fa-ban';
+ } else {
+ $icon = 'fa-times-circle-o';
+ }
if ($data['act'] == "static") {
foreach ($config['dhcpdv6'] as $dhcpif => $dhcpifconf) {
- if(is_array($dhcpifconf['staticmap'])) {
+ if (is_array($dhcpifconf['staticmap'])) {
foreach ($dhcpifconf['staticmap'] as $staticent) {
if ($data['ip'] == $staticent['ipaddr']) {
$data['if'] = $dhcpif;
@@ -549,8 +566,9 @@ foreach ($prefixes as $data):
}
}
/* exit as soon as we have an interface */
- if ($data['if'] != "")
+ if ($data['if'] != "") {
break;
+ }
}
} else {
$data['if'] = convert_real_interface_to_friendly_interface_name(guess_interface_from_ip($data['ip']));
@@ -561,7 +579,7 @@ foreach ($prefixes as $data):
}
?>
<tr>
- <td><i class="icon <?=$icon?>"></i></td>
+ <td><i class="fa <?=$icon?>"></i></td>
<td>
<?=$data['prefix']?>
<? if ($mappings[$data['iaid'] . $data['duid']]): ?>
@@ -592,4 +610,4 @@ foreach ($prefixes as $data):
<a class="btn btn-default" href="status_dhcpv6_leases.php?all=1"><?=gettext("Show all configured leases")?></a>
<?php endif;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/status_filter_reload.php b/src/usr/local/www/status_filter_reload.php
index d839e7e..9a9596b 100644
--- a/src/usr/local/www/status_filter_reload.php
+++ b/src/usr/local/www/status_filter_reload.php
@@ -1,39 +1,61 @@
<?php
-/* $Id$ */
/*
status_filter_reload.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2006 Scott Ullrich
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: filter
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-filterreloadstatus
-##|*NAME=Status: Filter Reload Status page
+##|*NAME=Status: Filter Reload Status
##|*DESCR=Allow access to the 'Status: Filter Reload Status' page.
##|*MATCH=status_filter_reload.php*
##|-PRIV
@@ -42,7 +64,7 @@ require_once("globals.inc");
require_once("guiconfig.inc");
require_once("functions.inc");
-$pgtitle = array(gettext("Status"), gettext("Filter Reload Status"));
+$pgtitle = array(gettext("Status"), gettext("Filter Reload"));
$shortcut_section = "firewall";
if (file_exists("{$g['varrun_path']}/filter_reload_status")) {
@@ -111,12 +133,12 @@ function update_data(obj) {
result_text = result_text.replace("\n", "");
result_text = result_text.replace("\r", "");
if (result_text) {
- jQuery('#status').html('<img src="/themes/<?=$g['theme']?>/images/misc/loader.gif" alt="loader" /> ' + result_text + '...');
+ jQuery('#status').html(result_text + '...');
} else {
- jQuery('#status').html('<img src="/themes/<?=$g['theme']?>/images/misc/loader.gif" alt="loader" /> Obtaining filter status...');
+ jQuery('#status').html('Obtaining filter status...');
}
if (result_text == "Initializing") {
- jQuery('#status').html('<img src="/themes/<?=$g['theme'];?>/images/misc/loader.gif" alt="loader" /> Initializing...');
+ jQuery('#status').html('Initializing...');
} else if (result_text == "Done") {
jQuery('#status').effect('highlight');
jQuery('#status').html('Done. The filter rules have been reloaded.');
diff --git a/src/usr/local/www/status_gateway_groups.php b/src/usr/local/www/status_gateway_groups.php
index fa57d66..b88c7cd 100755
--- a/src/usr/local/www/status_gateway_groups.php
+++ b/src/usr/local/www/status_gateway_groups.php
@@ -1,41 +1,65 @@
<?php
-/* $Id$ */
/*
status_gateway_groups.php
- part of pfSense (https://www.pfsense.org)
-
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-gatewaygroups
-##|*NAME=Status: Gateway Groups page
+##|*NAME=Status: Gateway Groups
##|*DESCR=Allow access to the 'Status: Gateway Groups' page.
##|*MATCH=status_gateway_groups.php*
##|-PRIV
@@ -89,7 +113,7 @@ display_top_tabs($tab_array);
<?php
/* process which priorities we have */
$priorities = array();
- foreach($gateway_group['item'] as $item) {
+ foreach ($gateway_group['item'] as $item) {
$itemsplit = explode("|", $item);
$priorities[$itemsplit[1]] = true;
}
@@ -100,7 +124,7 @@ display_top_tabs($tab_array);
<tr>
<?php
// Make a column for each tier
- foreach($priorities as $number => $tier) {
+ foreach ($priorities as $number => $tier) {
echo "<th>" . sprintf(gettext("Tier %s"), $number) . "</th>";
}
?>
@@ -110,23 +134,23 @@ display_top_tabs($tab_array);
<?php
/* inverse gateway group to gateway priority */
$priority_arr = array();
- foreach($gateway_group['item'] as $item) {
+ foreach ($gateway_group['item'] as $item) {
$itemsplit = explode("|", $item);
$priority_arr[$itemsplit[1]][] = $itemsplit[0];
}
ksort($priority_arr);
$p = 1;
- foreach($priority_arr as $number => $tier) {
+ foreach ($priority_arr as $number => $tier) {
/* for each priority process the gateways */
- foreach($tier as $member) {
+ foreach ($tier as $member) {
/* we always have $priority_count fields */
?>
<tr>
<?php
$c = 1;
- while($c <= $priority_count) {
+ while ($c <= $priority_count) {
$monitor = lookup_gateway_monitor_ip_by_name($member);
- if($p == $c) {
+ if ($p == $c) {
$status = $gateways_status[$monitor]['status'];
if (stristr($status, "down")) {
$online = gettext("Offline");
@@ -145,11 +169,12 @@ display_top_tabs($tab_array);
$bgcolor = LIGHTBLUE;
}
- if(!COLOR)
+ if (!COLOR) {
$bgcolor = WHITE;
+ }
?>
<td bgcolor="<?=$bgcolor?>">
- <?=htmlspecialchars($member);?>,<br /><?=$online?>
+ <?=htmlspecialchars($member);?>,<br/><?=$online?>
</td>
<?php
diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php
index 71d25d2..97c0051 100644
--- a/src/usr/local/www/status_gateways.php
+++ b/src/usr/local/www/status_gateways.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
status_gateways.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-gateways
-##|*NAME=Status: Gateways page
+##|*NAME=Status: Gateways
##|*DESCR=Allow access to the 'Status: Gateways' page.
##|*MATCH=status_gateways.php*
##|-PRIV
@@ -68,7 +89,7 @@ display_top_tabs($tab_array);
?>
<div class="table-responsive">
- <table class="table table-hover table-compact table-striped">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Name"); ?></th>
@@ -85,33 +106,36 @@ display_top_tabs($tab_array);
?>
<tr>
<td>
- <?=$gateway['name'];?>
+ <?=htmlspecialchars($gateway['name']);?>
</td>
<td>
<?php echo lookup_gateway_ip_by_name($gname);?>
</td>
<td>
-<?php if ($gateways_status[$gname])
+<?php
+ if ($gateways_status[$gname]) {
echo $gateways_status[$gname]['monitorip'];
- else
- echo $gateway['monitorip'];
+ } else {
+ echo htmlspecialchars($gateway['monitorip']);
+ }
?>
</td>
<td>
-<?php if ($gateways_status[$gname])
- echo $gateways_status[$gname]['delay'];
- else
- echo gettext("Pending");
+<?php
+ if ($gateways_status[$gname]) {
+ echo $gateways_status[$gname]['delay'];
+ } else {
+ echo gettext("Pending");
+ }
?>
- <?php $counter++; ?>
</td>
<td>
-<?php if ($gateways_status[$gname])
+<?php
+ if ($gateways_status[$gname]) {
echo $gateways_status[$gname]['loss'];
- else
+ } else {
echo gettext("Pending");
-
- $counter++;
+ }
?>
</td>
<?php
@@ -143,19 +167,20 @@ display_top_tabs($tab_array);
$lastchange = $gateways_status[$gname]['lastcheck'];
- if(!COLOR)
+ if (!COLOR) {
$bgcolor = WHITE;
+ }
?>
<td bgcolor="<?=$bgcolor?>">
<strong><?=$online?></strong> <?php
- if(!empty($lastchange)) { ?>
+ if (!empty($lastchange)) { ?>
<br /><i>Last checked <?=$lastchange?></i>
<?php } ?>
</td>
<td>
- <?=$gateway['descr']; ?>
+ <?=htmlspecialchars($gateway['descr']); ?>
</td>
</tr>
<?php } ?> <!-- End-of-foreach -->
diff --git a/src/usr/local/www/status_graph.php b/src/usr/local/www/status_graph.php
index 30fa6ad..39ea7f0 100644
--- a/src/usr/local/www/status_graph.php
+++ b/src/usr/local/www/status_graph.php
@@ -1,44 +1,64 @@
<?php
-/* $Id$ */
/*
status_graph.php
- Part of pfSense
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2004 Scott Ullrich
- All rights reserved.
-
- Originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-trafficgraph
-##|*NAME=Status: Traffic Graph page
+##|*NAME=Status: Traffic Graph
##|*DESCR=Allow access to the 'Status: Traffic Graph' page.
##|*MATCH=status_graph.php*
##|*MATCH=bandwidth_by_ip.php*
@@ -47,6 +67,7 @@
##|-PRIV
require("guiconfig.inc");
+require_once("ipsec.inc");
if ($_POST['width']) {
$width = $_POST['width'];
@@ -62,9 +83,10 @@ if ($_POST['height']) {
// Get configured interface list
$ifdescrs = get_configured_interface_with_descr();
-if (isset($config['ipsec']['enable'])) {
+if (ipsec_enabled()) {
$ifdescrs['enc0'] = "IPsec";
}
+
foreach (array('server', 'client') as $mode) {
if (is_array($config['openvpn']["openvpn-{$mode}"])) {
foreach ($config['openvpn']["openvpn-{$mode}"] as $id => $setting) {
@@ -125,12 +147,10 @@ function iflist() {
return($iflist);
}
-$pgtitle = array(gettext("Status"),gettext("Traffic Graph"));
+$pgtitle = array(gettext("Status"), gettext("Traffic Graph"));
include("head.inc");
-require_once('classes/Form.class.php');
-
$form = new Form(false);
$form->addClass('auto-submit');
@@ -183,9 +203,10 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
-function updateBandwidth(){
+function updateBandwidth() {
$.ajax(
'/bandwidth_by_ip.php',
{
@@ -197,7 +218,7 @@ function updateBandwidth(){
$('#top10-hosts').empty();
//parse top ten bandwidth abuser hosts
- for (var y=0; y<10; y++){
+ for (var y=0; y<10; y++) {
if ((y < hosts_split.length) && (hosts_split[y] != "") && (hosts_split[y] != "no info")) {
hostinfo = hosts_split[y].split(";");
@@ -212,20 +233,21 @@ function updateBandwidth(){
});
}
-events.push(function(){
- $('form.auto-submit').on('change', function(){
+events.push(function() {
+ $('form.auto-submit').on('change', function() {
$(this).submit();
});
- setInterval('updateBandwidth()', 1000);
+ setInterval('updateBandwidth()', 3000);
updateBandwidth();
});
+//]]>
</script>
<?php
/* link the ipsec interface magically */
-if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enable'])) {
+if (ipsec_enabled()) {
$ifdescrs['enc0'] = "IPsec";
}
@@ -248,7 +270,7 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enabl
<table class="table table-striped table-condensed">
<thead>
<tr>
- <th><?=(($curhostipformat=="") ? gettext("Host IP") : gettext("Host Name or IP")); ?></th>
+ <th><?=(($curhostipformat == "") ? gettext("Host IP") : gettext("Host Name or IP")); ?></th>
<th><?=gettext("Bandwidth In"); ?></th>
<th><?=gettext("Bandwidth Out"); ?></th>
</tr>
@@ -260,4 +282,4 @@ if (isset($config['ipsec']['enable']) || isset($config['ipsec']['client']['enabl
</div>
</div>
</div>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/status_graph_cpu.php b/src/usr/local/www/status_graph_cpu.php
index 43c37e0..4581b19 100644
--- a/src/usr/local/www/status_graph_cpu.php
+++ b/src/usr/local/www/status_graph_cpu.php
@@ -1,40 +1,64 @@
<?php
/*
- $Id$
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: system
+ status_graph_cpu.php
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-cpuload
-##|*NAME=Status: CPU load page
+##|*NAME=Status: CPU load
##|*DESCR=Allow access to the 'Status: CPU load' page.
##|*MATCH=status_graph_cpu.php*
##|-PRIV
@@ -59,4 +83,4 @@ $pgtitle = gettext("Status: CPU Graph");
</div>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/status_interfaces.php b/src/usr/local/www/status_interfaces.php
index d507ac5..ad1042c 100644
--- a/src/usr/local/www/status_interfaces.php
+++ b/src/usr/local/www/status_interfaces.php
@@ -1,11 +1,12 @@
<?php
-/* $Id$ */
/*
status_interfaces.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,13 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: interfaces
-*/
##|+PRIV
##|*IDENT=page-status-interfaces
-##|*NAME=Status: Interfaces page
+##|*NAME=Status: Interfaces
##|*DESCR=Allow access to the 'Status: Interfaces' page.
##|*MATCH=status_interfaces.php*
##|-PRIV
@@ -89,7 +87,7 @@ $formtemplate = '<form name="%s" action="status_interfaces.php" method="post">'
// Display a term/definition pair
function showDef($show, $term, $def) {
- if($show) {
+ if ($show) {
print('<dt>' . $term . '</dt>');
print('<dd>' . htmlspecialchars($def) . '</dd>');
}
@@ -99,15 +97,15 @@ function showDef($show, $term, $def) {
function showDefBtn($show, $term, $def, $ifval, $btnlbl) {
global $formtemplate;
- if($show) {
+ if ($show) {
print('<dt>' . $term . '</dt>');
print('<dd>');
- printf($formtemplate, $term, $ifvalue, $show, htmlspecialchars($def) . ' ', $btnlbl);
+ printf($formtemplate, $term, $ifval, $show, htmlspecialchars($def) . ' ', $btnlbl);
print('</dd>');
}
}
-$pgtitle = array(gettext("Status"),gettext("Interfaces"));
+$pgtitle = array(gettext("Status"), gettext("Interfaces"));
$shortcut_section = "interfaces";
include("head.inc");
@@ -159,7 +157,7 @@ foreach ($ifdescrs as $ifdescr => $ifname):
if ($ifdescr == "wan" && file_exists("{$g['varetc_path']}/resolv.conf")) {
$dns_servers = get_dns_servers();
$dnscnt = 0;
- foreach($dns_servers as $dns) {
+ foreach ($dns_servers as $dns) {
showDef(true, $dnscnt == 0 ? gettext('ISP DNS servers'):'', $dns);
$dnscnt++;
}
@@ -169,22 +167,22 @@ foreach ($ifdescrs as $ifdescr => $ifname):
showDef($ifinfo['mtu'], gettext("MTU"), $ifinfo['mtu']);
showDef($ifinfo['media'], gettext("Media"), $ifinfo['media']);
showDef($ifinfo['laggproto'], gettext("LAGG Protocol"), $ifinfo['laggproto']);
- showDef($ifinfo['laggport'],gettext("LAGG Ports"),$laggport);
- showDef($ifinfo['channel'],gettext("Channel"),$ifinfo['channel']);
- showDef($ifinfo['ssid'],gettext("SSID"),$ifinfo['ssid']);
- showDef($ifinfo['bssid'],gettext("BSSID"),$ifinfo['bssid']);
- showDef($ifinfo['rate'],gettext("Rate"),$ifinfo['rate']);
- showDef($ifinfo['rssi'],gettext("RSSI"),$ifinfo['rssi']);
- showDef(true,gettext("In/out packets"),$ifinfo['inpkts'] . '/' . $ifinfo['outpkts']);
- showDef(true,gettext("In/out packets (pass)"),$ifinfo['inpktspass'] . "/" . $ifinfo['outpktspass']);
- showDef(true,gettext("In/out packets (block)"),$ifinfo['inpktsblock'] . "/" . $ifinfo['outpktsblock']);
- showDef(isset($ifinfo['inerrs']),gettext("In/out errors"),$ifinfo['inerrs'] . "/" . $ifinfo['outerrs']);
- showDef(isset($ifinfo['collisions']),gettext("Collisions"),$ifinfo['collisions']);
+ showDef($ifinfo['laggport'], gettext("LAGG Ports"), $laggport);
+ showDef($ifinfo['channel'], gettext("Channel"), $ifinfo['channel']);
+ showDef($ifinfo['ssid'], gettext("SSID"), $ifinfo['ssid']);
+ showDef($ifinfo['bssid'], gettext("BSSID"), $ifinfo['bssid']);
+ showDef($ifinfo['rate'], gettext("Rate"), $ifinfo['rate']);
+ showDef($ifinfo['rssi'], gettext("RSSI"), $ifinfo['rssi']);
+ showDef(true, gettext("In/out packets"), $ifinfo['inpkts'] . '/' . $ifinfo['outpkts']);
+ showDef(true, gettext("In/out packets (pass)"), $ifinfo['inpktspass'] . "/" . $ifinfo['outpktspass']);
+ showDef(true, gettext("In/out packets (block)"), $ifinfo['inpktsblock'] . "/" . $ifinfo['outpktsblock']);
+ showDef(isset($ifinfo['inerrs']), gettext("In/out errors"), $ifinfo['inerrs'] . "/" . $ifinfo['outerrs']);
+ showDef(isset($ifinfo['collisions']), gettext("Collisions"), $ifinfo['collisions']);
} // e-o-if ($ifinfo['status'] != "down")
showDef($ifinfo['bridge'], gettext('Bridge (') . $ifinfo['bridgeint'] . ')', $ifinfo['bridge']);
- if(file_exists("/usr/bin/vmstat")) {
+ if (file_exists("/usr/bin/vmstat")) {
$real_interface = "";
$interrupt_total = "";
$interrupt_sec = "";
@@ -192,7 +190,7 @@ foreach ($ifdescrs as $ifdescr => $ifname):
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $3 }'`;
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
- if(strstr($interrupt_total, "hci")) {
+ if (strstr($interrupt_total, "hci")) {
$interrupt_total = `vmstat -i | grep $real_interface | awk '{ print $4 }'`;
$interrupt_sec = `vmstat -i | grep $real_interface | awk '{ print $5 }'`;
}
diff --git a/src/usr/local/www/diag_ipsec.php b/src/usr/local/www/status_ipsec.php
index fc4be5c..5ef2c45 100644
--- a/src/usr/local/www/diag_ipsec.php
+++ b/src/usr/local/www/status_ipsec.php
@@ -1,14 +1,16 @@
<?php
-/* $Id$ */
/*
- diag_ipsec.php
+ status_ipsec.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * portions Copyright (c) 2008 Shrew Soft Inc <mgrooms@shrew.net>.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Parts of this code originally based on vpn_ipsec_sad.php from m0n0wall,
+ * Copyright (c) 2003-2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +18,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,21 +57,17 @@
*
*/
-/*
- pfSense_MODULE: ipsec
-*/
-
##|+PRIV
##|*IDENT=page-status-ipsec
-##|*NAME=Status: IPsec page
+##|*NAME=Status: IPsec
##|*DESCR=Allow access to the 'Status: IPsec' page.
-##|*MATCH=diag_ipsec.php*
+##|*MATCH=status_ipsec.php*
##|-PRIV
global $g;
-$pgtitle = array(gettext("Status"), gettext("IPsec"));
+$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("Overview"));
$shortcut_section = "ipsec";
require("guiconfig.inc");
@@ -115,21 +113,20 @@ if (!is_array($config['ipsec']['phase1'])) {
$a_phase1 = &$config['ipsec']['phase1'];
-$status = ipsec_smp_dump_status();
+$status = ipsec_list_sa();
$tab_array = array();
-$tab_array[] = array(gettext("Overview"), true, "diag_ipsec.php");
-$tab_array[] = array(gettext("Leases"), false, "diag_ipsec_leases.php");
-$tab_array[] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
-$tab_array[] = array(gettext("SPD"), false, "diag_ipsec_spd.php");
-$tab_array[] = array(gettext("Logs"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("Overview"), true, "status_ipsec.php");
+$tab_array[] = array(gettext("Leases"), false, "status_ipsec_leases.php");
+$tab_array[] = array(gettext("SAD"), false, "status_ipsec_sad.php");
+$tab_array[] = array(gettext("SPD"), false, "status_ipsec_spd.php");
display_top_tabs($tab_array);
?>
<div class="panel panel-default">
- <div class="panel-heading">IPSec status</div>
+ <div class="panel-heading">IPsec status</div>
<div class="panel-body table responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Description")?></th>
@@ -148,23 +145,16 @@ display_top_tabs($tab_array);
<?php
$ipsecconnected = array();
-if (is_array($status['query']) && is_array($status['query']['ikesalist']) && is_array($status['query']['ikesalist']['ikesa'])):
- foreach ($status['query']['ikesalist']['ikesa'] as $ikeid => $ikesa):
- $con_id = substr($ikesa['peerconfig'], 3);
-
+if (is_array($status)) {
+ foreach ($status as $ikeid => $ikesa) {
+ $con_id = substr($ikeid, 3);
+
if ($ikesa['version'] == 1) {
$ph1idx = substr($con_id, 0, strrpos(substr($con_id, 0, -1), '00'));
$ipsecconnected[$ph1idx] = $ph1idx;
} else {
$ipsecconnected[$con_id] = $ph1idx = $con_id;
}
-
- if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ikesa['id']))
- $icon = "pass";
- elseif (!isset($config['ipsec']['enable']))
- $icon = "block";
- else
- $icon = "reject";
?>
<tr>
<td>
@@ -172,133 +162,136 @@ if (is_array($status['query']) && is_array($status['query']['ikesalist']) && is_
</td>
<td>
<?php
- if (!is_array($ikesa['local']))
- echo gettext("Unknown");
- else {
- if (!empty($ikesa['local']['identification'])) {
- if ($ikesa['local']['identification'] == '%any')
- print(gettext('Any identifier'));
- else
- print(htmlspecialchars($ikesa['local']['identification']));
- } else
- print(gettext("Unknown"));
- }
-
- if (ipsec_phase1_status($status['query']['ikesalist']['ikesa'], $ikesa['id'])) {
- $icon = "pass";
- } elseif (!isset($config['ipsec']['enable'])) {
- $icon = "block";
+ if (!empty($ikesa['local-id'])) {
+ if ($ikesa['local-id'] == '%any') {
+ print(gettext('Any identifier'));
} else {
- $icon = "reject";
+ print(htmlspecialchars($ikesa['local-id']));
}
+ } else {
+ print(gettext("Unknown"));
+ }
+
?>
</td>
<td>
<?php
- if (!is_array($ikesa['local']))
- print(gettext("Unknown"));
- else {
- if (!empty($ikesa['local']['address']))
- print(htmlspecialchars($ikesa['local']['address']) . '<br/>' . gettext('Port: ') . htmlspecialchars($ikesa['local']['port']));
- else
- print(gettext("Unknown"));
- if ($ikesa['local']['port'] == '4500')
- print(" NAT-T");
- }
+ if (!empty($ikesa['local-host'])) {
+ print(htmlspecialchars($ikesa['local-host']));
+ } else {
+ print(gettext("Unknown"));
+ }
+ /*
+ * XXX: local-nat-t was defined by pfSense
+ * When strongswan team accepted the change, they changed it to
+ * nat-local. Keep both for a while and remove local-nat-t in
+ * the future
+ */
+ if (isset($ikesa['local-nat-t']) || isset($ikesa['nat-local'])) {
+ print(" NAT-T");
+ }
?>
- </td>
+ </td>
<td>
<?php
- if (!is_array($ikesa['remote']))
+ $identity = "";
+ if (!empty($ikesa['remote-id'])) {
+ if ($ikesa['remote-id'] == '%any') {
+ $identity = 'Any identifier';
+ } else {
+ $identity = htmlspecialchars($ikesa['remote']['identification']);
+ }
+ }
+ if (!empty($ikesa['remote-xauth-id'])) {
+ echo htmlspecialchars($ikesa['remote-xauth-id']);
+ echo "<br/>{$identity}";
+ } elseif (!empty($ikesa['remote-eap-id'])) {
+ echo htmlspecialchars($ikesa['remote-eap-id']);
+ echo "<br/>{$identity}";
+ } else {
+ if (empty($identity)) {
print(gettext("Unknown"));
- else {
- $identity = "";
- if (!empty($ikesa['remote']['identification'])) {
- if ($ikesa['remote']['identification'] == '%any')
- $identity = 'Any identifier';
- else
- $identity = htmlspecialchars($ikesa['remote']['identification']);
- }
-
- if (is_array($ikesa['remote']['auth']) && !empty($ikesa['remote']['auth'][0]['identity'])) {
- print(htmlspecialchars($ikesa['remote']['auth'][0]['identity']));
- print('<br/>' . $identity);
- } else {
- if (empty($identity))
- print(gettext("Unknown"));
- else
- print($identity);
- }
+ } else {
+ print($identity);
}
+ }
?>
</td>
<td>
<?php
- if (!is_array($ikesa['remote']))
- print(gettext("Unknown"));
- else {
- if (!empty($ikesa['remote']['address']))
- print(htmlspecialchars($ikesa['remote']['address']) . '<br/>' . gettext('Port: ') . htmlspecialchars($ikesa['remote']['port']));
- else
- print(gettext("Unknown"));
- if ($ikesa['remote']['port'] == '4500')
- print(" NAT-T");
- }
+ if (!empty($ikesa['remote-host'])) {
+ print(htmlspecialchars($ikesa['remote-host']));
+ } else {
+ print(gettext("Unknown"));
+ }
+ /*
+ * XXX: remote-nat-t was defined by pfSense
+ * When strongswan team accepted the change, they changed it to
+ * nat-remote. Keep both for a while and remove remote-nat-t in
+ * the future
+ */
+ if (isset($ikesa['remote-nat-t']) || isset($ikesa['nat-remote'])) {
+ print(" NAT-T");
+ }
?>
</td>
<td>
IKEv<?=htmlspecialchars($ikesa['version'])?>
<br/>
- <?=htmlspecialchars($ikesa['role'])?>
+<?php
+ if ($ikesa['initiator'] == 'yes') {
+ print("initiator");
+ } else {
+ print("responder");
+ }
+?>
</td>
<td>
- <?=htmlspecialchars($ikesa['reauth']);?>
+ <?=htmlspecialchars($ikesa['reauth-time']) . gettext(" seconds (") . convert_seconds_to_hms($ikesa['reauth-time']) . ")";?>
</td>
<td>
- <?=htmlspecialchars($ikesa['encalg'])?>
+ <?=htmlspecialchars($ikesa['encr-alg'])?>
<br/>
- <?=htmlspecialchars($ikesa['intalg'])?>
+ <?=htmlspecialchars($ikesa['integ-alg'])?>
<br/>
- <?=htmlspecialchars($ikesa['prfalg'])?>
+ <?=htmlspecialchars($ikesa['prf-alg'])?>
<br/>
- <?=htmlspecialchars($ikesa['dhgroup'])?>
+ <?=htmlspecialchars($ikesa['dh-group'])?>
</td>
<td>
<?php
- if ($ikesa['status'] == 'established')
- print('<span style="color:green">');
- else
- print('<span>');
+ if ($ikesa['state'] == 'ESTABLISHED') {
+ print('<span style="color:green">');
+ } else {
+ print('<span>');
+ }
?>
- <?=ucfirst(htmlspecialchars($ikesa['status']))?>
- <br/><?=htmlspecialchars($ikesa['established'])?>
+ <?=ucfirst(htmlspecialchars($ikesa['state']))?>
+ <br/><?=htmlspecialchars($ikesa['established']) . gettext(" seconds (" . convert_seconds_to_hms($ikesa['established']) . ") ago")?>
</span>
</td>
<td >
<?php
- if ($icon != "pass"):
+ if ($ikesa['state'] != 'ESTABLISHED') {
?>
- <a href="diag_ipsec.php?act=connect&amp;ikeid=<?=$con_id; ?>" class="btn btn-xs btn-success" data-toggle="tooltip" title="Connect VPN" >
+ <a href="status_ipsec.php?act=connect&amp;ikeid=<?=$con_id; ?>" class="btn btn-xs btn-success" data-toggle="tooltip" title="Connect VPN" >
<?=gettext("Connect VPN")?>
</a>
<?php
- else:
+ } else {
?>
- <a href="diag_ipsec.php?act=ikedisconnect&amp;ikeid=<?=$con_id; ?>" class="btn btn-xs btn-danger" data-toggle="tooltip" title="Disconnect VPN">
+ <a href="status_ipsec.php?act=ikedisconnect&amp;ikeid=<?=$con_id; ?>" class="btn btn-xs btn-danger" data-toggle="tooltip" title="Disconnect VPN">
<?=gettext("Disconnect")?>
</a><br />
- <a href="diag_ipsec.php?act=ikedisconnect&amp;ikeid=<?=$con_id; ?>&amp;ikesaid=<?=$ikesa['id']; ?>" class="btn btn-xs btn-warning" data-toggle="tooltip" title="Disconnect VPN connection">
- <?=gettext("Disconnect")?>
- </a>
<?php
- endif;
+ }
?>
</td>
</tr>
<tr>
<td colspan = 10>
<?php
- if (is_array($ikesa['childsalist'])):
+ if (is_array($ikesa['child-sas']) && (count($ikesa['child-sas']) > 0)) {
?>
<div id="btnchildsa-<?=$ikeid?>">
<a type="button" onclick="show_childsa('childsa-<?=$ikeid?>','btnchildsa-<?=$ikeid?>');" class="btn btn-sm btn-default" />
@@ -320,83 +313,89 @@ if (is_array($status['query']) && is_array($status['query']['ikesalist']) && is_
</thead>
<tbody>
<?php
- if (is_array($ikesa['childsalist']['childsa'])):
- foreach ($ikesa['childsalist']['childsa'] as $childsa):
+ foreach ($ikesa['child-sas'] as $childid => $childsa) {
?>
<tr>
<td>
<?php
- if (is_array($childsa['local']) &&
- is_array($childsa['local']['networks']) &&
- is_array($childsa['local']['networks']['network']))
- foreach ($childsa['local']['networks']['network'] as $lnets)
+ if (is_array($childsa['local-ts'])) {
+ foreach ($childsa['local-ts'] as $lnets) {
print(htmlspecialchars(ipsec_fixup_network($lnets)) . "<br />");
- else
+ }
+ } else {
print(gettext("Unknown"));
+ }
?>
</td>
<td>
<?php
- if (is_array($childsa['local']))
- print(gettext("Local: ") . htmlspecialchars($childsa['local']['spi']));
-
- if (is_array($childsa['remote']))
- print('<br/>' . gettext('Remote: ') . htmlspecialchars($childsa['remote']['spi']));
+ if (isset($childsa['spi-in'])) {
+ print(gettext("Local: ") . htmlspecialchars($childsa['spi-in']));
+ }
+
+ if (isset($childsa['spi-out'])) {
+ print('<br/>' . gettext('Remote: ') . htmlspecialchars($childsa['spi-out']));
+ }
?>
</td>
<td>
<?php
- if (is_array($childsa['remote']) &&
- is_array($childsa['remote']['networks']) &&
- is_array($childsa['remote']['networks']['network']))
- foreach ($childsa['remote']['networks']['network'] as $rnets)
+ if (is_array($childsa['remote-ts'])) {
+ foreach ($childsa['remote-ts'] as $rnets) {
print(htmlspecialchars(ipsec_fixup_network($rnets)) . '<br />');
- else
+ }
+ } else {
print(gettext("Unknown"));
+ }
?>
</td>
<td>
<?php
- print(gettext("Rekey: ") . htmlspecialchars($childsa['rekey']));
- print('<br/>' . gettext('Life: ') . htmlspecialchars($childsa['lifetime']));
- print('<br/>' . gettext('Install: ') .htmlspecialchars($childsa['installtime']));
+ print(gettext("Rekey: ") . htmlspecialchars($childsa['rekey-time']) . gettext(" seconds (") . convert_seconds_to_hms($childsa['rekey-time']) . ")");
+ print('<br/>' . gettext('Life: ') . htmlspecialchars($childsa['life-time']) . gettext(" seconds (") . convert_seconds_to_hms($childsa['life-time']) . ")");
+ print('<br/>' . gettext('Install: ') .htmlspecialchars($childsa['install-time']) . gettext(" seconds (") . convert_seconds_to_hms($childsa['install-time']) . ")");
?>
</td>
<td>
<?php
- print(htmlspecialchars($childsa['encalg']) . '<br/>');
- print(htmlspecialchars($childsa['intalg']) . '<br/>');
-
- if (!empty($childsa['prfalg']))
- print(htmlspecialchars($childsa['prfalg']) . '<br/>');
-
- if (!empty($childsa['dhgroup']))
- print(htmlspecialchars($childsa['dhgroup']) . '<br/>');
-
- if (!empty($childsa['esn']))
+ print(htmlspecialchars($childsa['encr-alg']) . '<br/>');
+ print(htmlspecialchars($childsa['integ-alg']) . '<br/>');
+
+ if (!empty($childsa['prf-alg'])) {
+ print(htmlspecialchars($childsa['prf-alg']) . '<br/>');
+ }
+ if (!empty($childsa['dh-group'])) {
+ print(htmlspecialchars($childsa['dh-group']) . '<br/>');
+ }
+ if (!empty($childsa['esn'])) {
print(htmlspecialchars($childsa['esn']) . '<br/>');
-
- print(gettext("IPComp: ") . htmlspecialchars($childsa['ipcomp']));
+ }
+
+ print(gettext("IPComp: "));
+ if (!empty($childsa['cpi-in']) || !empty($childsa['cpi-out'])) {
+ print(htmlspecialchars($childsa['cpi-in']) . " " . htmlspecialchars($childsa['cpi-out']));
+ } else {
+ print(gettext('none'));
+ }
?>
</td>
<td>
<?php
- print(gettext("Bytes-In: ") . htmlspecialchars($childsa['bytesin']) . '<br/>');
- print(gettext("Packets-In: ") . htmlspecialchars($childsa['packetsin']) . '<br/>');
- print(gettext("Bytes-Out: ") . htmlspecialchars($childsa['bytesout']) . '<br/>');
- print(gettext("Packets-Out: ") . htmlspecialchars($childsa['packetsout']) . '<br/>');
+ print(gettext("Bytes-In: ") . htmlspecialchars(number_format($childsa['bytes-in'])) . ' (' . htmlspecialchars(format_bytes($childsa['bytes-in'])) . ')<br/>');
+ print(gettext("Packets-In: ") . htmlspecialchars(number_format($childsa['packets-in'])) . '<br/>');
+ print(gettext("Bytes-Out: ") . htmlspecialchars(number_format($childsa['bytes-out'])) . ' (' . htmlspecialchars(format_bytes($childsa['bytes-out'])) . ')<br/>');
+ print(gettext("Packets-Out: ") . htmlspecialchars(number_format($childsa['packets-out'])) . '<br/>');
?>
</td>
<td>
- <a href="diag_ipsec.php?act=childdisconnect&amp;ikeid=<?=$con_id; ?>&amp;ikesaid=<?=$childsa['reqid']; ?>" class="btn btn-xs btn-warning" data-toggle="tooltip" title="<?=gettext('Disconnect Child SA')?>">
+ <a href="status_ipsec.php?act=childdisconnect&amp;ikeid=<?=$con_id; ?>&amp;ikesaid=<?=$childsa['uniqueid']; ?>" class="btn btn-xs btn-warning" data-toggle="tooltip" title="<?=gettext('Disconnect Child SA')?>">
<?=gettext("Disconnect")?>
</a>
</td>
</tr>
<?php
- endforeach;
- endif;
+ }
?>
</tbody>
@@ -404,21 +403,24 @@ if (is_array($status['query']) && is_array($status['query']['ikesalist']) && is_
</td>
</tr>
<?php
- endif;
+ }
unset($con_id);
- endforeach;
-endif;
+ }
+
+}
$rgmap = array();
-foreach ($a_phase1 as $ph1ent):
- if (isset($ph1ent['disabled']))
+foreach ($a_phase1 as $ph1ent) {
+ if (isset($ph1ent['disabled'])) {
continue;
-
+ }
+
$rgmap[$ph1ent['remote-gateway']] = $ph1ent['remote-gateway'];
-
- if ($ipsecconnected[$ph1ent['ikeid']])
+
+ if ($ipsecconnected[$ph1ent['ikeid']]) {
continue;
+ }
?>
<tr>
<td>
@@ -429,38 +431,42 @@ foreach ($a_phase1 as $ph1ent):
<td>
<?php
list ($myid_type, $myid_data) = ipsec_find_id($ph1ent, "local");
- if (empty($myid_data))
+ if (empty($myid_data)) {
print(gettext("Unknown"));
- else
+ } else {
print(htmlspecialchars($myid_data));
+ }
?>
</td>
<td>
<?php
$ph1src = ipsec_get_phase1_src($ph1ent);
-
- if (empty($ph1src))
+
+ if (empty($ph1src)) {
print(gettext("Unknown"));
- else
+ } else {
print(htmlspecialchars($ph1src));
+ }
?>
</td>
<td>
<?php
list ($peerid_type, $peerid_data) = ipsec_find_id($ph1ent, "peer", $rgmap);
- if (empty($peerid_data))
+ if (empty($peerid_data)) {
print(gettext("Unknown"));
- else
+ } else {
print(htmlspecialchars($peerid_data));
+ }
?>
</td>
<td>
<?php
$ph1src = ipsec_get_phase1_dst($ph1ent);
- if (empty($ph1src))
+ if (empty($ph1src)) {
print(gettext("Unknown"));
- else
+ } else {
print(htmlspecialchars($ph1src));
+ }
?>
</td>
<td>
@@ -470,7 +476,7 @@ foreach ($a_phase1 as $ph1ent):
<td>
</td>
<?php
- if (isset($ph1ent['mobile'])):
+ if (isset($ph1ent['mobile'])) {
?>
<td>
<?=gettext("Awaiting connections")?>
@@ -478,24 +484,22 @@ foreach ($a_phase1 as $ph1ent):
<td>
</td>
<?php
- else:
+ } else {
?>
<td>
<?=gettext("Disconnected")?>
</td>
<td >
- <a href="diag_ipsec.php?act=connect&amp;ikeid=<?=$ph1ent['ikeid']; ?>" class="btn btn-xs btn-success">
+ <a href="status_ipsec.php?act=connect&amp;ikeid=<?=$ph1ent['ikeid']; ?>" class="btn btn-xs btn-success">
<?=gettext("Connect VPN")?>
</a>
</td>
<?php
- endif;
+ }
?>
- <td>
- </td>
</tr>
<?php
-endforeach;
+}
unset($ipsecconnected, $phase1, $rgmap);
?>
</tbody>
diff --git a/src/usr/local/www/diag_ipsec_leases.php b/src/usr/local/www/status_ipsec_leases.php
index 1331ebe..155f274 100644
--- a/src/usr/local/www/diag_ipsec_leases.php
+++ b/src/usr/local/www/status_ipsec_leases.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
- diag_ipsec_leases.php
+ status_ipsec_leases.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2014 Ermal Luçi
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,16 +53,11 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/sbin/ipsec
- pfSense_MODULE: ipsec
-*/
-
##|+PRIV
##|*IDENT=page-status-ipsec-leases
-##|*NAME=Status: IPsec: Leases page
+##|*NAME=Status: IPsec: Leases
##|*DESCR=Allow access to the 'Status: IPsec: Leases' page.
-##|*MATCH=diag_ipsec_leases.php*
+##|*MATCH=status_ipsec_leases.php*
##|-PRIV
define(DEBUG, true); // Force dummy data for testing. Setting up a pFSense box to get real data is far too hard!
@@ -79,17 +72,16 @@ include("head.inc");
$mobile = ipsec_dump_mobile();
$tab_array = array();
-$tab_array[] = array(gettext("Overview"), false, "diag_ipsec.php");
-$tab_array[] = array(gettext("Leases"), true, "diag_ipsec_leases.php");
-$tab_array[] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
-$tab_array[] = array(gettext("SPD"), false, "diag_ipsec_spd.php");
-$tab_array[] = array(gettext("Logs"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("Overview"), false, "status_ipsec.php");
+$tab_array[] = array(gettext("Leases"), true, "status_ipsec_leases.php");
+$tab_array[] = array(gettext("SAD"), false, "status_ipsec_sad.php");
+$tab_array[] = array(gettext("SPD"), false, "status_ipsec_spd.php");
display_top_tabs($tab_array);
if (isset($mobile['pool']) && is_array($mobile['pool'])) {
?>
<div class="table-responsive">
- <table class="table table-hover table-condensed">
+ <table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Pool")?></th>
@@ -144,8 +136,7 @@ if (isset($mobile['pool']) && is_array($mobile['pool'])) {
<?php
}
- }
- else {
+ } else {
?>
<td colspan="3" class="warning"><?=gettext('No leases from this pool yet.')?></td>
</tr>
@@ -157,9 +148,9 @@ if (isset($mobile['pool']) && is_array($mobile['pool'])) {
</table>
</div>
<?php
-}
-else
+} else {
print_info_box(gettext('No IPsec pools.'));
+}
print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>');
diff --git a/src/usr/local/www/diag_ipsec_sad.php b/src/usr/local/www/status_ipsec_sad.php
index 288c509..bbc9698 100644
--- a/src/usr/local/www/diag_ipsec_sad.php
+++ b/src/usr/local/www/status_ipsec_sad.php
@@ -1,14 +1,15 @@
<?php
-/* $Id$ */
/*
- diag_ipsec_sad.php
+ status_ipsec_sad.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-2009 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,16 +56,11 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/setkey
- pfSense_MODULE: ipsec
-*/
-
##|+PRIV
##|*IDENT=page-status-ipsec-sad
-##|*NAME=Status: IPsec: SAD page
+##|*NAME=Status: IPsec: SAD
##|*DESCR=Allow access to the 'Status: IPsec: SAD' page.
-##|*MATCH=diag_ipsec_sad.php*
+##|*MATCH=status_ipsec_sad.php*
##|-PRIV
require("guiconfig.inc");
@@ -87,11 +83,10 @@ if ($_GET['act'] == "del") {
}
$tab_array = array();
-$tab_array[] = array(gettext("Overview"), false, "diag_ipsec.php");
-$tab_array[] = array(gettext("Leases"), false, "diag_ipsec_leases.php");
-$tab_array[] = array(gettext("SAD"), true, "diag_ipsec_sad.php");
-$tab_array[] = array(gettext("SPD"), false, "diag_ipsec_spd.php");
-$tab_array[] = array(gettext("Logs"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("Overview"), false, "status_ipsec.php");
+$tab_array[] = array(gettext("Leases"), false, "status_ipsec_leases.php");
+$tab_array[] = array(gettext("SAD"), true, "status_ipsec_sad.php");
+$tab_array[] = array(gettext("SPD"), false, "status_ipsec_spd.php");
display_top_tabs($tab_array);
if (count($sad)) {
@@ -140,7 +135,7 @@ if (count($sad)) {
$args .= "&amp;proto=" . rawurlencode($sa['proto']);
$args .= "&amp;spi=" . rawurlencode("0x" . $sa['spi']);
?>
- <a class="btn btn-xs btn-danger" href="diag_ipsec_sad.php?act=del&amp;<?=$args?>">Delete</a>
+ <a class="btn btn-xs btn-danger" href="status_ipsec_sad.php?act=del&amp;<?=$args?>">Delete</a>
</td>
</tr>
@@ -150,10 +145,10 @@ if (count($sad)) {
</table>
</div>
<?php
- }
-else
+} else {
print_info_box(gettext('No IPsec security associations.'));
+}
print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>');
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_ipsec_spd.php b/src/usr/local/www/status_ipsec_spd.php
index ef14523..56a9acf 100644
--- a/src/usr/local/www/diag_ipsec_spd.php
+++ b/src/usr/local/www/status_ipsec_spd.php
@@ -1,14 +1,15 @@
<?php
-/* $Id$ */
/*
- diag_ipsec_spd.php
+ status_ipsec_spd.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-2009 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +17,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,19 +56,13 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/setkey
- pfSense_MODULE: ipsec
-*/
-
##|+PRIV
##|*IDENT=page-status-ipsec-spd
-##|*NAME=Status: IPsec: SPD page
+##|*NAME=Status: IPsec: SPD
##|*DESCR=Allow access to the 'Status: IPsec: SPD' page.
-##|*MATCH=diag_ipsec_spd.php*
+##|*MATCH=status_ipsec_spd.php*
##|-PRIV
-define(DEBUG, true);
define(RIGHTARROW, '&#x25ba;');
define(LEFTARROW, '&#x25c0;');
@@ -78,25 +73,19 @@ $pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SPD"));
$shortcut_section = "ipsec";
include("head.inc");
-if (DEBUG) { // Dummy data for testing. REMOVE for production
- $spd = array ( 0 => array ( 'srcid' => '172.27.0.0/16', 'dstid' => '172.21.2.0/24', 'dir' => 'in' , 'proto' => 'esp', 'dst' => '184.57.8.247', 'src' => '208.123.73.7', 'reqid' => 'nique:1' ),
- 1 => array ( 'srcid' => '172.21.2.0/24', 'dstid' => '172.27.0.0/16', 'dir' => 'out', 'proto' => 'esp', 'dst' => '208.123.73.7', 'src' => '184.57.8.247', 'reqid' => 'nique:1' ) );
-}
-else
- $spd = ipsec_dump_spd();
+$spd = ipsec_dump_spd();
$tab_array = array();
-$tab_array[0] = array(gettext("Overview"), false, "diag_ipsec.php");
-$tab_array[1] = array(gettext("Leases"), false, "diag_ipsec_leases.php");
-$tab_array[2] = array(gettext("SAD"), false, "diag_ipsec_sad.php");
-$tab_array[3] = array(gettext("SPD"), true, "diag_ipsec_spd.php");
-$tab_array[4] = array(gettext("Logs"), false, "diag_logs.php?logfile=ipsec");
+$tab_array[0] = array(gettext("Overview"), false, "status_ipsec.php");
+$tab_array[1] = array(gettext("Leases"), false, "status_ipsec_leases.php");
+$tab_array[2] = array(gettext("SAD"), false, "status_ipsec_sad.php");
+$tab_array[3] = array(gettext("SPD"), true, "status_ipsec_spd.php");
display_top_tabs($tab_array);
if (count($spd)) {
?>
<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-condensed table-hover sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?= gettext("Source"); ?></th>
@@ -110,10 +99,11 @@ if (count($spd)) {
<tbody>
<?php
foreach ($spd as $sp) {
- if ($sp['dir'] == 'in')
+ if ($sp['dir'] == 'in') {
$dirstr = LEFTARROW . ' Inbound';
- else
+ } else {
$dirstr = RIGHTARROW . ' Outbound';
+ }
?>
<tr>
<td>
@@ -139,11 +129,10 @@ if (count($spd)) {
</table>
</div>
<?php
- } // e-o-if (count($spd))
-else {
+} else {
print_info_box(gettext('No IPsec security policies configured.'));
}
print_info_box(gettext('You can configure your IPsec subsystem by clicking ') . '<a href="vpn_ipsec.php">' . gettext("here.") . '</a>');
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/status_lb_pool.php b/src/usr/local/www/status_lb_pool.php
index c4407ae..d9917f8 100644
--- a/src/usr/local/www/status_lb_pool.php
+++ b/src/usr/local/www/status_lb_pool.php
@@ -1,41 +1,65 @@
<?php
-/* $Id$ */
/*
status_lb_pool.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-loadbalancer-pool
-##|*NAME=Status: Load Balancer: Pool page
+##|*NAME=Status: Load Balancer: Pool
##|*DESCR=Allow access to the 'Status: Load Balancer: Pool' page.
##|*MATCH=status_lb_pool.php*
##|-PRIV
@@ -63,13 +87,14 @@ $lb_logfile = "{$g['varlog_path']}/relayd.log";
$nentries = $config['syslog']['nentries'];
-if (!$nentries)
+if (!$nentries) {
$nentries = 50;
+}
$now = time();
$year = date("Y");
-$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Pool"));
+$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Pools"));
$shortcut_section = "relayd";
include("head.inc");
@@ -119,8 +144,9 @@ if ($_POST) {
}
}
-if (is_subsystem_dirty('loadbalancer'))
+if (is_subsystem_dirty('loadbalancer')) {
print_info_box_np('The load balancer configuration has been changed You must apply the changes in order for them to take effect.');
+}
/* active tabs */
$tab_array = array();
@@ -135,7 +161,7 @@ $rowsprinted = 0;
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">Load Balancer Pools</h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Name")?></th>
@@ -156,7 +182,7 @@ foreach ($a_pool as $pool):
</td>
<td>
<?php
- switch($pool['mode']) {
+ switch ($pool['mode']) {
case "loadbalance":
echo "Load balancing";
break;
@@ -190,11 +216,11 @@ foreach ($a_pool as $pool):
asort($pool_hosts);
foreach ((array) $pool_hosts as $server) {
- if($server['ip']['addr']!="") {
+ if ($server['ip']['addr'] != "") {
switch ($server['ip']['state']) {
case 'up':
$bgcolor = LIGHTGREEN; // lightgreen
- $checked = "checked=\"checked\"";
+ $checked = "checked";
break;
case 'disabled':
$bgcolor = WHITE;
@@ -202,7 +228,7 @@ foreach ($a_pool as $pool):
break;
default:
$bgcolor = LIGHTCORAL; // lightcoral
- $checked = "checked=\"checked\"";
+ $checked = "checked";
}
?>
<tr>
@@ -218,8 +244,9 @@ foreach ($a_pool as $pool):
print("<td bgcolor=\"{$bgcolor}\">&nbsp;{$server['ip']['addr']}:{$pool['port']}&nbsp;</td><td bgcolor=\"{$bgcolor}\">&nbsp;");
- if($server['ip']['avail'])
+ if ($server['ip']['avail']) {
print(" ({$server['ip']['avail']}) ");
+ }
?>
</td>
</tr>
@@ -241,17 +268,25 @@ endforeach;
?>
</tbody>
</table>
+ </div>
+ </div>
+</form>
+
<?php
-if($rowsprinted > 0) {
+if ($rowsprinted > 0) {
?>
<nav class="action-buttons">
- <input name="Submit" type="submit" class="btn btn-primary" value="<?= gettext("Save"); ?>" />
- <input name="Reset" type="reset" class="btn btn-danger" value="<?= gettext("Reset"); ?>" />
+ <button name="Submit" type="submit" class="btn btn-primary btn-sm" value="<?= gettext("Save"); ?>" >
+ <i class="fa fa-save icon-embed-btn"></i>
+ <?=gettext("Save")?>
+ </button>
+
+ <button name="Reset" type="reset" class="btn btn-danger btn-sm" value="<?= gettext("Reset"); ?>">
+ <i class="fa fa-undo icon-embed-btn"></i>
+ <?=gettext("Reset")?>
+ </button>
</nav>
<?php
}
-?>
- </div>
- </div>
-</form>
-<?php include("foot.inc"); \ No newline at end of file
+
+include("foot.inc");
diff --git a/src/usr/local/www/status_lb_vs.php b/src/usr/local/www/status_lb_vs.php
index 6e54730..4bfe8c3 100644
--- a/src/usr/local/www/status_lb_vs.php
+++ b/src/usr/local/www/status_lb_vs.php
@@ -1,42 +1,62 @@
<?php
-/* $Id$ */
/*
status_lb_vs.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/sbin/relayctl
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-loadbalancer-virtualserver
-##|*NAME=Status: Load Balancer: Virtual Server page
+##|*NAME=Status: Load Balancer: Virtual Server
##|*DESCR=Allow access to the 'Status: Load Balancer: Virtual Server' page.
##|*MATCH=status_lb_vs.php*
##|-PRIV
@@ -61,7 +81,7 @@ $a_vs = &$config['load_balancer']['virtual_server'];
$a_pool = &$config['load_balancer']['lbpool'];
$rdr_a = get_lb_redirects();
-$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Virtual Server"));
+$pgtitle = array(gettext("Status"), gettext("Load Balancer"), gettext("Virtual Servers"));
include("head.inc");
/* active tabs */
@@ -70,19 +90,22 @@ $tab_array[] = array(gettext("Pools"), false, "status_lb_pool.php");
$tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php");
display_top_tabs($tab_array);
-if(empty($a_vs))
+if (empty($a_vs)) {
print('<div class="alert alert-danger">No load balancers have been configured!</div>');
-else {
+} else {
?>
- <div class="table-responsive"></div>
- <table class="table table-striped table-hover table-condensed">
+<div class="table-responsive"></div>
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
+ <thead>
<tr>
- <td><?=gettext("Name"); ?></td>
- <td><?=gettext("Address"); ?></td>
- <td><?=gettext("Servers"); ?></td>
- <td><?=gettext("Status"); ?></td>
- <td><?=gettext("Description"); ?></td>
+ <th><?=gettext("Name"); ?></th>
+ <th><?=gettext("Address"); ?></th>
+ <th><?=gettext("Servers"); ?></th>
+ <th><?=gettext("Status"); ?></th>
+ <th><?=gettext("Description"); ?></th>
</tr>
+ </thead>
+ <tbody>
<?php
$i = 0;
foreach ($a_vs as $vsent): ?>
@@ -121,23 +144,30 @@ else {
$rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?';
}
- if(!COLOR)
+ if (!COLOR) {
$bgcolor = WHITE;
+ }
?>
<td bgcolor="<?=$bgcolor?>">
<?=$rdr_a[$vsent['name']]['status']?>
- </td>
- <td>
+
+<?php
+ if (!empty($rdr_a[$vsent['name']]['total'])) {
+?>
+ Total Sessions: <?=$rdr_a[$vsent['name']]['total']?><br>/>
<?php
- if (!empty($rdr_a[$vsent['name']]['total'])) { ?>
- Total Sessions: <?=$rdr_a[$vsent['name']]['total']?><br>/><?php
}
- if (!empty($rdr_a[$vsent['name']]['last'])) { ?>
- Last: <?=$rdr_a[$vsent['name']]['last']?><br>/><?php
+ if (!empty($rdr_a[$vsent['name']]['last'])) {
+?>
+ Last: <?=$rdr_a[$vsent['name']]['last']?><br>/>
+<?php
}
- if (!empty($rdr_a[$vsent['name']]['average'])) { ?>
- Average: <?=$rdr_a[$vsent['name']]['average']?><?php
- } ?>
+ if (!empty($rdr_a[$vsent['name']]['average'])) {
+?>
+ Average: <?=$rdr_a[$vsent['name']]['average']?>
+<?php
+ }
+?>
</td>
<td>
<?=htmlspecialchars($vsent['descr'])?>
@@ -145,9 +175,10 @@ else {
</tr>
<?php $i++; endforeach; ?>
- </table>
- </div>
+ </tbody>
+ </table>
+</div>
<?php }
-include("foot.inc"); ?> \ No newline at end of file
+include("foot.inc"); ?>
diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php
new file mode 100755
index 0000000..4a1ff52
--- /dev/null
+++ b/src/usr/local/www/status_logs.php
@@ -0,0 +1,681 @@
+<?php
+/*
+ status_logs.php
+*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-diagnostics-logs-system
+##|*NAME=Status: Logs: System
+##|*DESCR=Allow access to the 'Status: System Logs: General' page.
+##|*MATCH=status_logs.php
+##|-PRIV
+
+require("guiconfig.inc");
+require_once("filter_log.inc");
+
+/*
+Build a list of allowed log files so we can reject others to prevent the page
+from acting on unauthorized files.
+*/
+$allowed_logs = array(
+ "system" => array("name" => "General",
+ "shortcut" => ""),
+ "dhcpd" => array("name" => "DHCP",
+ "shortcut" => "dhcp"),
+ "portalauth" => array("name" => "Captive Portal Authentication",
+ "shortcut" => "captiveportal"),
+ "ipsec" => array("name" => "IPsec",
+ "shortcut" => "ipsec"),
+ "ppp" => array("name" => "PPP",
+ "shortcut" => ""),
+ "relayd" => array("name" => "Load Balancer",
+ "shortcut" => "relayd"),
+ "openvpn" => array("name" => "OpenVPN",
+ "shortcut" => "openvpn"),
+ "ntpd" => array("name" => "NTPd",
+ "shortcut" => "ntp"),
+ "gateways" => array("name" => "Gateways",
+ "shortcut" => "gateways"),
+ "routing" => array("name" => "Routing",
+ "shortcut" => "routing"),
+ "resolver" => array("name" => "DNS Resolver",
+ "shortcut" => "resolver"),
+ "wireless" => array("name" => "Wireless",
+ "shortcut" => "wireless"),
+);
+
+// The logs to display are specified in a GET argument. Default to 'system' logs
+if (!$_GET['logfile']) {
+ $logfile = 'system';
+} else {
+ $logfile = $_GET['logfile'];
+ if (!array_key_exists($logfile, $allowed_logs)) {
+ /* Do not let someone attempt to load an unauthorized log. */
+ $logfile = 'system';
+ }
+}
+
+$system_logfile = "{$g['varlog_path']}/" . basename($logfile) . ".log";
+
+
+function getGETPOSTsettingvalue($settingname, $default) {
+ $settingvalue = $default;
+ if ($_GET[$settingname]) {
+ $settingvalue = $_GET[$settingname];
+ }
+ if ($_POST[$settingname]) {
+ $settingvalue = $_POST[$settingname];
+ }
+ return $settingvalue;
+}
+
+
+$filtersubmit = getGETPOSTsettingvalue('filtersubmit', null);
+
+if ($filtersubmit) {
+ $filter_active = true;
+ $filtertext = getGETPOSTsettingvalue('filtertext', "");
+ $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
+}
+
+$filterlogentries_submit = getGETPOSTsettingvalue('filterlogentries_submit', null);
+
+if ($filterlogentries_submit) {
+ $filter_active = true;
+ $filterfieldsarray = array();
+
+ $filterfieldsarray['time'] = getGETPOSTsettingvalue('filterlogentries_time', null);
+ $filterfieldsarray['process'] = getGETPOSTsettingvalue('filterlogentries_process', null);
+ $filterfieldsarray['pid'] = getGETPOSTsettingvalue('filterlogentries_pid', null);
+ $filterfieldsarray['message'] = getGETPOSTsettingvalue('filterlogentries_message', null);
+ $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
+}
+
+
+# Manage Log - Code
+
+$specific_log = basename($logfile) . '_settings';
+
+# All
+$pconfig['cronorder'] = $config['syslog'][$specific_log]['cronorder'];
+$pconfig['nentries'] = $config['syslog'][$specific_log]['nentries'];
+$pconfig['logfilesize'] = $config['syslog'][$specific_log]['logfilesize'];
+$pconfig['format'] = $config['syslog'][$specific_log]['format'];
+
+# System General (main) Specific
+$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']);
+
+$save_settings = getGETPOSTsettingvalue('save_settings', null);
+
+if ($save_settings) {
+
+ # All
+ $cronorder = getGETPOSTsettingvalue('cronorder', null);
+ $nentries = getGETPOSTsettingvalue('nentries', null);
+ $logfilesize = getGETPOSTsettingvalue('logfilesize', null);
+ $format = getGETPOSTsettingvalue('format', null);
+
+ # System General (main) Specific
+ $loglighttpd = getGETPOSTsettingvalue('loglighttpd', null);
+
+ unset($input_errors);
+ $pconfig = $_POST;
+
+ /* input validation */
+ # All
+ if (isset($nentries) && (strlen($nentries) > 0)) {
+ if (!is_numeric($nentries) || ($nentries < 5) || ($nentries > 2000)) {
+ $input_errors[] = gettext("Number of log entries to show must be between 5 and 2000.");
+ }
+ }
+
+ if (isset($logfilesize) && (strlen($logfilesize) > 0)) {
+ if (!is_numeric($logfilesize) || ($logfilesize < 100000)) {
+ $input_errors[] = gettext("Log file size must be numeric and greater than or equal to 100000.");
+ }
+ }
+
+ if (!$input_errors) {
+
+ # Clear out the specific log settings and leave only the applied settings to override the general logging options (global) settings.
+ unset($config['syslog'][$specific_log]);
+
+ # All
+ if ($cronorder != '') { # if not using the general logging options setting (global)
+ $config['syslog'][$specific_log]['cronorder'] = $cronorder;
+ }
+
+ if (isset($nentries) && (strlen($nentries) > 0)) {
+ $config['syslog'][$specific_log]['nentries'] = (int)$nentries;
+ }
+
+ if (isset($logfilesize) && (strlen($logfilesize) > 0)) {
+ $config['syslog'][$specific_log]['logfilesize'] = (int)$logfilesize;
+ }
+
+ if ($format != '') { # if not using the general logging options setting (global)
+ $config['syslog'][$specific_log]['format'] = $format;
+ }
+
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ $oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
+ $config['syslog']['nologlighttpd'] = $loglighttpd ? false : true;
+
+ if ($oldnologlighttpd !== $config['syslog']['nologlighttpd']) {
+ $logging_changed = $lighttpd_logging_changed = true;
+ }
+ }
+
+
+ // If any of the logging settings were changed then backup and sync (standard write_config). Otherwise only write config (don't backup, don't sync).
+ if ($logging_changed) {
+ write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false);
+ $retval = 0;
+ $retval = system_syslogd_start();
+ } else {
+ write_config($desc = "Log Display Settings Saved (no backup, no sync): " . gettext($allowed_logs[$logfile]["name"]), $backup = false, $write_config_only = true);
+ }
+
+ $savemsg = gettext("The changes have been applied successfully.");
+
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ if ($lighttpd_logging_changed) {
+ ob_flush();
+ flush();
+ log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
+ send_event("service restart webgui");
+ $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
+ }
+ }
+ }
+}
+
+
+# Formatted/Raw Display
+if ($config['syslog'][$specific_log]['format'] == 'formatted') {
+ $rawfilter = false;
+} else if ($config['syslog'][$specific_log]['format'] == 'raw') {
+ $rawfilter = true;
+} else { # Use the general logging options setting (global).
+ $rawfilter = isset($config['syslog']['rawfilter']);
+}
+
+
+isset($config['syslog'][$specific_log]['nentries']) ? $nentries = $config['syslog'][$specific_log]['nentries'] : $nentries = $config['syslog']['nentries'];
+
+# Override Display Quantity
+if ($filterlogentries_qty) {
+ $nentries = $filterlogentries_qty;
+}
+
+if (!$nentries || !is_numeric($nentries)) {
+ $nentries = 50;
+}
+
+if ($_POST['clear']) {
+ clear_log_file($system_logfile);
+}
+
+if ($filtertext) {
+ $filtertextmeta="?filtertext=$filtertext";
+}
+
+/* Setup shortcuts if they exist */
+
+if (!empty($allowed_logs[$logfile]["shortcut"])) {
+ $shortcut_section = $allowed_logs[$logfile]["shortcut"];
+}
+
+$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"]));
+include("head.inc");
+
+if (!$input_errors && $savemsg) {
+ print_info_box($savemsg);
+ $manage_log_active = false;
+}
+
+$tab_array = array();
+$tab_array[] = array(gettext("System"), ($logfile == 'system'), "status_logs.php");
+$tab_array[] = array(gettext("Firewall"), false, "status_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), ($logfile == 'dhcpd'), "status_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), ($logfile == 'portalauth'), "status_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), ($logfile == 'ipsec'), "status_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), ($logfile == 'ppp'), "status_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "status_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), ($logfile == 'relayd'), "status_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), ($logfile == 'openvpn'), "status_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), ($logfile == 'ntpd'), "status_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "status_logs_settings.php");
+display_top_tabs($tab_array);
+
+$tab_array = array();
+if (in_array($logfile, array('system', 'gateways', 'routing', 'resolver', 'wireless'))) {
+ $tab_array[] = array(gettext("General"), ($logfile == 'system'), "/status_logs.php");
+ $tab_array[] = array(gettext("Gateways"), ($logfile == 'gateways'), "/status_logs.php?logfile=gateways");
+ $tab_array[] = array(gettext("Routing"), ($logfile == 'routing'), "/status_logs.php?logfile=routing");
+ $tab_array[] = array(gettext("Resolver"), ($logfile == 'resolver'), "/status_logs.php?logfile=resolver");
+ $tab_array[] = array(gettext("Wireless"), ($logfile == 'wireless'), "/status_logs.php?logfile=wireless");
+ display_top_tabs($tab_array, false, 'nav nav-tabs');
+}
+
+if ($filter_active) {
+ $filter_state = SEC_OPEN;
+} else {
+ $filter_state = SEC_CLOSED;
+}
+
+if (!$rawfilter) { // Advanced log filter form
+ $form = new Form(false);
+
+ $section = new Form_Section('Advanced Log Filter', 'adv-filter-panel', COLLAPSIBLE|$filter_state);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_time',
+ null,
+ 'text',
+ $filterfieldsarray['time']
+ ))->setWidth(3)->setHelp('Time');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_process',
+ null,
+ 'text',
+ $filterfieldsarray['process']
+ ))->setWidth(2)->setHelp('Process');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_pid',
+ null,
+ 'text',
+ $filterfieldsarray['pid']
+ ))->setWidth(2)->setHelp('PID');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_qty',
+ null,
+ 'number',
+ $filterlogentries_qty,
+ ['placeholder' => $nentries]
+ ))->setWidth(2)->setHelp('Quantity');
+
+ $section->add($group);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_message',
+ null,
+ 'text',
+ $filterfieldsarray['message']
+ ))->setWidth(7)->setHelp('Message');
+
+ $btnsubmit = new Form_Button(
+ 'filterlogentries_submit',
+ ' ' . gettext('Apply Filter'),
+ null,
+ 'fa-filter'
+ );
+} else { // Simple log filter form
+ $form = new Form(false);
+
+ $section = new Form_Section('Log Filter', 'basic-filter-panel', COLLAPSIBLE|$filter_state);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Input(
+ 'filtertext',
+ null,
+ 'text',
+ $filtertext
+ ))->setWidth(6)->setHelp('Filter Expression');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_qty',
+ null,
+ 'number',
+ $filterlogentries_qty,
+ ['placeholder' => $nentries]
+ ))->setWidth(2)->setHelp('Quantity');
+
+ $btnsubmit = new Form_Button(
+ 'filtersubmit',
+ ' ' . gettext('Apply Filter'),
+ null,
+ 'fa-filter'
+ );
+}
+
+$btnsubmit->removeClass('btn-primary')->addClass('btn-success')->addClass('btn-sm');
+
+$group->add(new Form_StaticText(
+ '',
+ $btnsubmit
+));
+
+$group->setHelp('<a target="_blank" href="http://www.php.net/manual/en/book.pcre.php">' . gettext('Regular expression reference') . '</a> ' . gettext('Precede with exclamation (!) to exclude match.'));
+$section->add($group);
+$form->add($section);
+print $form;
+
+// Now the forms are complete we can draw the log table and its controls
+if (!$rawfilter) {
+ if ($filterlogentries_submit) {
+ $filterlog = conv_log_filter($system_logfile, $nentries, $nentries + 100, $filterfieldsarray);
+ } else {
+ $filterlog = conv_log_filter($system_logfile, $nentries, $nentries + 100, $filtertext);
+ }
+?>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h2 class="panel-title">
+<?php
+ if ((!$filtertext) && (!$filterfieldsarray)) {
+ printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("%d matched %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ }
+
+ printf(" (" . gettext("Maximum %d") . ")", $nentries);
+?>
+ </h2>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
+ <thead>
+ <tr class="text-nowrap">
+ <th><?=gettext("Time")?></th>
+ <th><?=gettext("Process")?></th>
+ <th><?=gettext("PID")?></th>
+ <th style="width:100%"><?=gettext("Message")?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ foreach ($filterlog as $filterent) {
+?>
+ <tr class="text-nowrap">
+ <td>
+ <?=htmlspecialchars($filterent['time'])?>
+ </td>
+ <td>
+ <?=htmlspecialchars($filterent['process'])?>
+ </td>
+ <td>
+ <?=htmlspecialchars($filterent['pid'])?>
+ </td>
+ <td style="word-wrap:break-word; word-break:break-all; white-space:normal">
+ <?=htmlspecialchars($filterent['message'])?>
+ </td>
+ </tr>
+<?php
+ } // e-o-foreach
+?>
+ </tbody>
+ </table>
+<?php
+ if (count($filterlog) == 0) {
+ print_info_box(gettext('No logs to display'));
+ }
+?>
+ </div>
+ </div>
+</div>
+<?php
+} else {
+?>
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div>
+ <div class="table table-responsive">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
+ <thead>
+ <tr class="text-nowrap">
+ <th><?=gettext("Time")?></th>
+ <th style="width:100%"><?=gettext("Message")?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ if (($logfile == 'resolver') || ($logfile == 'system')) {
+ $inverse = array("ppp");
+ } else {
+ $inverse = null;
+ }
+
+ if ($filtertext) {
+ $rows = dump_clog($system_logfile, $nentries, true, array("$filtertext"), $inverse);
+ } else {
+ $rows = dump_clog($system_logfile, $nentries, true, array(), $inverse);
+ }
+?>
+ </tbody>
+ </table>
+<?php
+ if ($rows == 0) {
+ print_info_box(gettext('No logs to display'));
+ }
+?>
+ </div>
+</div>
+<?php
+}
+?>
+
+<?php
+# Manage Log - Section/Form
+
+if ($input_errors) {
+ print_input_errors($input_errors);
+ $manage_log_active = true;
+}
+
+if ($manage_log_active) {
+ $manage_log_state = SEC_OPEN;
+} else {
+ $manage_log_state = SEC_CLOSED;
+}
+
+$form = new Form(false);
+
+$section = new Form_Section(gettext('Manage') . ' ' . gettext($allowed_logs[$logfile]["name"]) . ' ' . gettext('Log'), 'log-manager-panel', COLLAPSIBLE|$manage_log_state);
+
+$section->addInput(new Form_StaticText(
+ '',
+ 'These settings override the "General Logging Options" settings.'
+));
+
+
+# All
+$group = new Form_Group('Forward/Reverse Display');
+
+$group->add(new Form_Checkbox(
+ 'cronorder',
+ null,
+ 'Forward',
+ ($pconfig['cronorder'] == 'forward') ? true : false,
+ 'forward'
+))->displayAsRadio()->setHelp('(newest at bottom)');
+
+$group->add(new Form_Checkbox(
+ 'cronorder',
+ null,
+ 'Reverse',
+ ($pconfig['cronorder'] == 'reverse') ? true : false,
+ 'reverse'
+))->displayAsRadio()->setHelp('(newest at top)');
+
+$group->add(new Form_Checkbox(
+ 'cronorder',
+ null,
+ 'General Logging Options Setting',
+ ($pconfig['cronorder'] == '') ? true : false,
+ ''
+))->displayAsRadio();
+
+$group->setHelp('Show log entries in forward or reverse order.');
+$section->add($group);
+
+$group = new Form_Group('GUI Log Entries');
+
+# Use the general logging options setting (global) as placeholder.
+$group->add(new Form_Input(
+ 'nentries',
+ 'GUI Log Entries',
+ 'number',
+ $pconfig['nentries'],
+ ['min' => 5, 'max' => 2000, 'placeholder' => $config['syslog']['nentries']]
+))->setWidth(2);
+
+$group->setHelp('This is the number of log entries displayed in the GUI. It does not affect how many entries are contained in the log.');
+$section->add($group);
+
+$group = new Form_Group('Log file size (Bytes)');
+
+# Use the general logging options setting (global) as placeholder.
+$group->add(new Form_Input(
+ 'logfilesize',
+ 'Log file size (Bytes)',
+ 'number',
+ $pconfig['logfilesize'],
+ ['min' => 100000, 'placeholder' => $config['syslog']['logfilesize'] ? $config['syslog']['logfilesize'] : "511488"]
+))->setWidth(2);
+$group->setHelp("The log is held in a constant-size circular log file. This field controls how large the log file is, and thus how many entries may exist inside the log. The default is approximately 500KB." .
+ '<br /><br />' .
+ "NOTE: The log size is changed the next time it is cleared. To immediately change the log size, first save the options to set the size, then clear the log using the \"Clear Log\" action below. ");
+$section->add($group);
+
+$group = new Form_Group('Formatted/Raw Display');
+
+$group->add(new Form_Checkbox(
+ 'format',
+ null,
+ 'Formatted',
+ ($pconfig['format'] == 'formatted') ? true : false,
+ 'formatted'
+))->displayAsRadio();
+
+$group->add(new Form_Checkbox(
+ 'format',
+ null,
+ 'Raw',
+ ($pconfig['format'] == 'raw') ? true : false,
+ 'raw'
+))->displayAsRadio();
+
+$group->add(new Form_Checkbox(
+ 'format',
+ null,
+ 'General Logging Options Setting',
+ ($pconfig['format'] == '') ? true : false,
+ ''
+))->displayAsRadio();
+
+$group->setHelp('Show the log entries as formatted or raw output as generated by the service. The raw output will reveal more detailed information, but it is more difficult to read.');
+$section->add($group);
+
+
+# System General (main) Specific
+if ($logfile == 'system') {
+ $section->addInput(new Form_Checkbox(
+ 'loglighttpd',
+ 'Web Server Log',
+ 'Log errors from the web server process',
+ $pconfig['loglighttpd']
+ ))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the system log.');
+}
+
+
+$group = new Form_Group('Action');
+
+$btnsavesettings = new Form_Button(
+ 'save_settings',
+ gettext('Save'),
+ null
+);
+
+$btnsavesettings->addClass('btn-sm');
+
+$group->add(new Form_StaticText(
+ '',
+ $btnsavesettings
+))->setHelp('Saves changed settings.');
+
+
+$btnclear = new Form_Button(
+ 'clear',
+ ' ' . gettext('Clear log'),
+ null,
+ 'fa-trash'
+);
+
+$btnclear->removeClass('btn-primary')->addClass('btn-danger')->addClass('btn-sm');
+
+$group->add(new Form_StaticText(
+ '',
+ $btnclear
+))->setHelp('Clears local log file and reinitializes it as an empty log. Save any settings changes first.');
+
+$section->add($group);
+$form->add($section);
+print $form;
+?>
+
+<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php
new file mode 100644
index 0000000..132c76b
--- /dev/null
+++ b/src/usr/local/www/status_logs_filter.php
@@ -0,0 +1,1059 @@
+<?php
+/*
+ status_logs_filter.php
+*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-diagnostics-logs-firewall
+##|*NAME=Status: Logs: Firewall
+##|*DESCR=Allow access to the 'Status: Logs: Firewall' page.
+##|*MATCH=status_logs_filter.php*
+##|-PRIV
+
+require("guiconfig.inc");
+require_once("ipsec.inc");
+require_once("filter_log.inc");
+
+# --- AJAX RESOLVE ---
+if (isset($_POST['resolve'])) {
+ $ip = strtolower($_POST['resolve']);
+ $res = (is_ipaddr($ip) ? gethostbyaddr($ip) : '');
+
+ if ($res && $res != $ip) {
+ $response = array('resolve_ip' => $ip, 'resolve_text' => $res);
+ } else {
+ $response = array('resolve_ip' => $ip, 'resolve_text' => gettext("Cannot resolve"));
+ }
+
+ echo json_encode(str_replace("\\", "\\\\", $response)); // single escape chars can break JSON decode
+ exit;
+}
+
+/*
+Build a list of allowed log files so we can reject others to prevent the page
+from acting on unauthorized files.
+*/
+$allowed_logs = array(
+ "filter" => array("name" => "Firewall",
+ "shortcut" => "filter"),
+);
+
+// The logs to display are specified in a GET argument. Default to 'system' logs
+if (!$_GET['logfile']) {
+ $logfile = 'filter';
+} else {
+ $logfile = $_GET['logfile'];
+ if (!array_key_exists($logfile, $allowed_logs)) {
+ /* Do not let someone attempt to load an unauthorized log. */
+ $logfile = 'filter';
+ }
+}
+
+$filter_logfile = "{$g['varlog_path']}/" . basename($logfile) . ".log";
+
+function getGETPOSTsettingvalue($settingname, $default) {
+ $settingvalue = $default;
+ if ($_GET[$settingname]) {
+ $settingvalue = $_GET[$settingname];
+ }
+ if ($_POST[$settingname]) {
+ $settingvalue = $_POST[$settingname];
+ }
+ return $settingvalue;
+}
+
+$rulenum = getGETPOSTsettingvalue('getrulenum', null);
+
+if ($rulenum) {
+ list($rulenum, $tracker, $type) = explode(',', $rulenum);
+ $rule = find_rule_by_number($rulenum, $tracker, $type);
+ echo gettext("The rule that triggered this action is") . ":\n\n{$rule}";
+ exit;
+}
+
+$filtersubmit = getGETPOSTsettingvalue('filtersubmit', null);
+
+if ($filtersubmit) {
+ $filter_active = true;
+ $interfacefilter = getGETPOSTsettingvalue('interface', null);
+ $filtertext = getGETPOSTsettingvalue('filtertext', "");
+ $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
+}
+
+$filterlogentries_submit = getGETPOSTsettingvalue('filterlogentries_submit', null);
+
+if ($filterlogentries_submit) {
+ $filter_active = true;
+ $filterfieldsarray = array();
+
+ $actpass = getGETPOSTsettingvalue('actpass', null);
+ $actblock = getGETPOSTsettingvalue('actblock', null);
+ $filterfieldsarray['act'] = str_replace(" ", " ", trim($actpass . " " . $actblock));
+ $filterfieldsarray['act'] = $filterfieldsarray['act'] != "" ? $filterfieldsarray['act'] : 'All';
+ $filterfieldsarray['time'] = getGETPOSTsettingvalue('filterlogentries_time', null);
+ $filterfieldsarray['interface'] = getGETPOSTsettingvalue('filterlogentries_interfaces', null);
+ $filterfieldsarray['srcip'] = getGETPOSTsettingvalue('filterlogentries_sourceipaddress', null);
+ $filterfieldsarray['srcport'] = getGETPOSTsettingvalue('filterlogentries_sourceport', null);
+ $filterfieldsarray['dstip'] = getGETPOSTsettingvalue('filterlogentries_destinationipaddress', null);
+ $filterfieldsarray['dstport'] = getGETPOSTsettingvalue('filterlogentries_destinationport', null);
+ $filterfieldsarray['proto'] = getGETPOSTsettingvalue('filterlogentries_protocol', null);
+ $filterfieldsarray['tcpflags'] = getGETPOSTsettingvalue('filterlogentries_protocolflags', null);
+ $filterlogentries_qty = getGETPOSTsettingvalue('filterlogentries_qty', null);
+}
+
+# Manage Log - Code
+
+$specific_log = basename($logfile) . '_settings';
+
+# All
+$pconfig['cronorder'] = $config['syslog'][$specific_log]['cronorder'];
+$pconfig['nentries'] = $config['syslog'][$specific_log]['nentries'];
+$pconfig['logfilesize'] = $config['syslog'][$specific_log]['logfilesize'];
+$pconfig['format'] = $config['syslog'][$specific_log]['format'];
+
+# System General (main) Specific
+$pconfig['loglighttpd'] = !isset($config['syslog']['nologlighttpd']);
+
+# Firewall Specific
+$pconfig['logdefaultblock'] = !isset($config['syslog']['nologdefaultblock']);
+$pconfig['logdefaultpass'] = isset($config['syslog']['nologdefaultpass']);
+$pconfig['logbogons'] = !isset($config['syslog']['nologbogons']);
+$pconfig['logprivatenets'] = !isset($config['syslog']['nologprivatenets']);
+$pconfig['filterdescriptions'] = $config['syslog']['filterdescriptions'];
+
+$save_settings = getGETPOSTsettingvalue('save_settings', null);
+
+if ($save_settings) {
+
+ # All
+ $cronorder = getGETPOSTsettingvalue('cronorder', null);
+ $nentries = getGETPOSTsettingvalue('nentries', null);
+ $logfilesize = getGETPOSTsettingvalue('logfilesize', null);
+ $format = getGETPOSTsettingvalue('format', null);
+
+ # System General (main) Specific
+ $loglighttpd = getGETPOSTsettingvalue('loglighttpd', null);
+
+ # Firewall Specific
+ $logdefaultblock = getGETPOSTsettingvalue('logdefaultblock', null);
+ $logdefaultpass = getGETPOSTsettingvalue('logdefaultpass', null);
+ $logbogons = getGETPOSTsettingvalue('logbogons', null);
+ $logprivatenets = getGETPOSTsettingvalue('logprivatenets', null);
+ $filterdescriptions = getGETPOSTsettingvalue('filterdescriptions', null);
+
+ unset($input_errors);
+ $pconfig = $_POST;
+
+ /* input validation */
+ if (isset($nentries) && (strlen($nentries) > 0)) {
+ if (!is_numeric($nentries) || ($nentries < 5) || ($nentries > 2000)) {
+ $input_errors[] = gettext("Number of log entries to show must be between 5 and 2000.");
+ }
+ }
+
+ if (isset($logfilesize) && (strlen($logfilesize) > 0)) {
+ if (!is_numeric($logfilesize) || ($logfilesize < 100000)) {
+ $input_errors[] = gettext("Log file size must be numeric and greater than or equal to 100000.");
+ }
+ }
+
+ if (!$input_errors) {
+
+ # Clear out the specific log settings and leave only the applied settings to override the general logging options (global) settings.
+ unset($config['syslog'][$specific_log]);
+
+ # All
+ if ($cronorder != '') { # if not using the general logging options setting (global)
+ $config['syslog'][$specific_log]['cronorder'] = $cronorder;
+ }
+
+ if (isset($nentries) && (strlen($nentries) > 0)) {
+ $config['syslog'][$specific_log]['nentries'] = (int)$nentries;
+ }
+
+ if (isset($logfilesize) && (strlen($logfilesize) > 0)) {
+ $config['syslog'][$specific_log]['logfilesize'] = (int)$logfilesize;
+ }
+
+ if ($format != '') { # if not using the general logging options setting (global)
+ $config['syslog'][$specific_log]['format'] = $format;
+ }
+
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ $oldnologlighttpd = isset($config['syslog']['nologlighttpd']);
+ $config['syslog']['nologlighttpd'] = $loglighttpd ? false : true;
+
+ if ($oldnologlighttpd !== $config['syslog']['nologlighttpd']) {
+ $logging_changed = $lighttpd_logging_changed = true;
+ }
+ }
+
+ # Firewall Specific
+ if ($logfile == 'filter') {
+ $oldnologdefaultblock = isset($config['syslog']['nologdefaultblock']);
+ $oldnologdefaultpass = isset($config['syslog']['nologdefaultpass']);
+ $oldnologbogons = isset($config['syslog']['nologbogons']);
+ $oldnologprivatenets = isset($config['syslog']['nologprivatenets']);
+
+ $config['syslog']['nologdefaultblock'] = $logdefaultblock ? false : true;
+ $config['syslog']['nologdefaultpass'] = $logdefaultpass ? true : false;
+ $config['syslog']['nologbogons'] = $logbogons ? false : true;
+ $config['syslog']['nologprivatenets'] = $logprivatenets ? false : true;
+
+ if (is_numeric($filterdescriptions) && $filterdescriptions > 0) {
+ $config['syslog']['filterdescriptions'] = $filterdescriptions;
+ } else {
+ unset($config['syslog']['filterdescriptions']);
+ }
+
+ if (
+ ($oldnologdefaultblock !== $config['syslog']['nologdefaultblock']) ||
+ ($oldnologdefaultpass !== $config['syslog']['nologdefaultpass']) ||
+ ($oldnologbogons !== $config['syslog']['nologbogons']) ||
+ ($oldnologprivatenets !== $config['syslog']['nologprivatenets'])) {
+ $logging_changed = $firewall_logging_changed = true;
+ }
+ }
+
+
+ // If any of the logging settings were changed then backup and sync (standard write_config). Otherwise only write config (don't backup, don't sync).
+ if ($logging_changed) {
+ write_config($desc = "Log Display Settings Saved: " . gettext($allowed_logs[$logfile]["name"]), $backup = true, $write_config_only = false);
+ $retval = 0;
+ $retval = system_syslogd_start();
+ } else {
+ write_config($desc = "Log Display Settings Saved (no backup, no sync): " . gettext($allowed_logs[$logfile]["name"]), $backup = false, $write_config_only = true);
+ }
+
+ $savemsg = gettext("The changes have been applied successfully.");
+
+ # System General (main) Specific
+ if ($logfile == 'system') {
+ if ($lighttpd_logging_changed) {
+ ob_flush();
+ flush();
+ log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
+ send_event("service restart webgui");
+ $savemsg .= "<br />" . gettext("WebGUI process is restarting.");
+ }
+ }
+
+ # Firewall Specific
+ if ($logfile == 'filter') {
+ if ($firewall_logging_changed) {
+ require_once("filter.inc");
+ $retval |= filter_configure();
+ filter_pflog_start(true);
+
+ $savemsg = get_std_save_message($retval);
+ }
+ }
+ }
+}
+
+
+# Formatted/Raw Display
+if ($config['syslog'][$specific_log]['format'] == 'formatted') {
+ $rawfilter = false;
+} else if ($config['syslog'][$specific_log]['format'] == 'raw') {
+ $rawfilter = true;
+} else { # Use the general logging options setting (global).
+ $rawfilter = isset($config['syslog']['rawfilter']);
+}
+
+
+isset($config['syslog'][$specific_log]['nentries']) ? $nentries = $config['syslog'][$specific_log]['nentries'] : $nentries = $config['syslog']['nentries'];
+
+# Override Display Quantity
+if ($filterlogentries_qty) {
+ $nentries = $filterlogentries_qty;
+}
+
+if (!$nentries || !is_numeric($nentries)) {
+ $nentries = 50;
+}
+
+if ($_POST['clear']) {
+ clear_log_file($filter_logfile);
+}
+
+/* Setup shortcuts if they exist */
+
+if (!empty($allowed_logs[$logfile]["shortcut"])) {
+ $shortcut_section = $allowed_logs[$logfile]["shortcut"];
+}
+
+$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"]));
+include("head.inc");
+
+if (!$input_errors && $savemsg) {
+ print_info_box($savemsg);
+ $manage_log_active = false;
+}
+
+
+function build_if_list() {
+ $iflist = get_configured_interface_with_descr(false, true);
+ //$iflist = get_interface_list();
+ // Allow extending of the firewall edit interfaces
+ pfSense_handle_custom_code("/usr/local/pkg/firewall_nat/pre_interfaces_edit");
+ foreach ($iflist as $if => $ifdesc) {
+ $interfaces[$if] = $ifdesc;
+ }
+
+ if ($config['l2tp']['mode'] == "server") {
+ $interfaces['l2tp'] = "L2TP VPN";
+ }
+
+ if (is_pppoe_server_enabled() && have_ruleint_access("pppoe")) {
+ $interfaces['pppoe'] = "PPPoE Server";
+ }
+
+ /* add ipsec interfaces */
+ if (ipsec_enabled()) {
+ $interfaces["enc0"] = "IPsec";
+ }
+
+ /* add openvpn/tun interfaces */
+ if ($config['openvpn']["openvpn-server"] || $config['openvpn']["openvpn-client"]) {
+ $interfaces["openvpn"] = "OpenVPN";
+ }
+
+ return($interfaces);
+}
+
+$Include_Act = explode(",", str_replace(" ", ",", $filterfieldsarray['act']));
+
+if ($filterfieldsarray['interface'] == "All") {
+ $interface = "";
+}
+
+$tab_array = array();
+$tab_array[] = array(gettext("System"), ($logfile == 'system'), "status_logs.php");
+$tab_array[] = array(gettext("Firewall"), ($logfile == 'filter'), "status_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), ($logfile == 'dhcpd'), "status_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), ($logfile == 'portalauth'), "status_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), ($logfile == 'ipsec'), "status_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), ($logfile == 'ppp'), "status_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "status_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), ($logfile == 'relayd'), "status_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), ($logfile == 'openvpn'), "status_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), ($logfile == 'ntpd'), "status_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "status_logs_settings.php");
+display_top_tabs($tab_array);
+
+$tab_array = array();
+$tab_array[] = array(gettext("Normal View"), true, "/status_logs_filter.php");
+$tab_array[] = array(gettext("Dynamic View"), false, "/status_logs_filter_dynamic.php");
+$tab_array[] = array(gettext("Summary View"), false, "/status_logs_filter_summary.php");
+display_top_tabs($tab_array, false, 'nav nav-tabs');
+
+if ($filter_active) {
+ $filter_state = SEC_OPEN;
+} else {
+ $filter_state = SEC_CLOSED;
+}
+
+if (!$rawfilter) { // Advanced log filter form
+ $form = new Form(false);
+
+ $section = new Form_Section('Advanced Log Filter', 'adv-filter-panel', COLLAPSIBLE|$filter_state);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_sourceipaddress',
+ null,
+ 'text',
+ $filterfieldsarray['srcip']
+ ))->setHelp('Source IP Address');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_destinationipaddress',
+ null,
+ 'text',
+ $filterfieldsarray['dstip']
+ ))->setHelp('Destination IP Address');
+
+ $section->add($group);
+ $group = new Form_Group('');
+
+ $group->add(new Form_Checkbox(
+ 'actpass',
+ null,
+ 'Pass',
+ in_arrayi('Pass', $Include_Act),
+ 'Pass'
+ ))->setWidth(1);
+
+ $group->add(new Form_Input(
+ 'filterlogentries_time',
+ null,
+ 'text',
+ $filterfieldsarray['time']
+ ))->setWidth(3)->setHelp('Time');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_sourceport',
+ null,
+ 'text',
+ $filterfieldsarray['srcport']
+ ))->setWidth(2)->setHelp('Source Port');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_protocol',
+ null,
+ 'text',
+ $filterfieldsarray['proto']
+ ))->setWidth(2)->setHelp('Protocol');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_qty',
+ null,
+ 'number',
+ $filterlogentries_qty,
+ ['placeholder' => $nentries]
+ ))->setWidth(2)->setHelp('Quantity');
+
+ $section->add($group);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Checkbox(
+ 'actblock',
+ null,
+ 'Block',
+ in_arrayi('Block', $Include_Act),
+ 'Block'
+ ))->setWidth(1);
+
+ $group->add(new Form_Input(
+ 'filterlogentries_interfaces',
+ null,
+ 'text',
+ $filterfieldsarray['interface']
+ ))->setWidth(2)->setHelp('Interface');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_destinationport',
+ null,
+ 'text',
+ $filterfieldsarray['dstport']
+ ))->setWidth(2)->setHelp('Destination Port');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_protocolflags',
+ null,
+ 'text',
+ $filterfieldsarray['tcpflags']
+ ))->setWidth(2)->setHelp('Protocol Flags');
+
+ $btnsubmit = new Form_Button(
+ 'filterlogentries_submit',
+ ' ' . gettext('Apply Filter'),
+ null,
+ 'fa-filter'
+ );
+} else { // Simple log filter form
+ $form = new Form(false);
+
+ $section = new Form_Section('Log Filter', 'basic-filter-panel', COLLAPSIBLE|$filter_state);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Select(
+ 'interface',
+ null,
+ $interfacefilter,
+ build_if_list()
+ ))->setWidth(2)->setHelp('Interface');
+
+ $group->add(new Form_Input(
+ 'filterlogentries_qty',
+ null,
+ 'number',
+ $filterlogentries_qty,
+ ['placeholder' => $nentries]
+ ))->setWidth(2)->setHelp('Quantity');
+
+ $section->add($group);
+
+ $group = new Form_Group('');
+
+ $group->add(new Form_Input(
+ 'filtertext',
+ null,
+ 'text',
+ $filtertext
+ ))->setWidth(6)->setHelp('Filter Expression');
+
+ $btnsubmit = new Form_Button(
+ 'filtersubmit',
+ ' ' . gettext('Apply Filter'),
+ null,
+ 'fa-filter'
+ );
+}
+
+$btnsubmit->removeClass('btn-primary')->addClass('btn-success')->addClass('btn-sm');
+
+$group->add(new Form_StaticText(
+ '',
+ $btnsubmit
+));
+
+$group->setHelp('<a target="_blank" href="http://www.php.net/manual/en/book.pcre.php">' . gettext('Regular expression reference') . '</a> ' . gettext('Precede with exclamation (!) to exclude match.'));
+$section->add($group);
+$form->add($section);
+print($form);
+
+// Now the forms are complete we can draw the log table and its controls
+if (!$rawfilter) {
+ $iflist = get_configured_interface_with_descr(false, true);
+
+ if ($iflist[$interfacefilter]) {
+ $interfacefilter = $iflist[$interfacefilter];
+ }
+
+ if ($filterlogentries_submit) {
+ $filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filterfieldsarray);
+ } else {
+ $filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100, $filtertext, $interfacefilter);
+ }
+?>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h2 class="panel-title">
+<?php
+ if ((!$filtertext) && (!$filterfieldsarray)) {
+ printf(gettext("Last %d %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ } else {
+ printf(gettext("%d matched %s log entries."), count($filterlog), gettext($allowed_logs[$logfile]["name"]));
+ }
+
+ printf(" (" . gettext("Maximum %d") . ")", $nentries);
+?>
+ </h2>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
+ <thead>
+ <tr class="text-nowrap">
+ <th><?=gettext("Act")?></th>
+ <th><?=gettext("Time")?></th>
+ <th><?=gettext("IF")?></th>
+<?php
+ if ($config['syslog']['filterdescriptions'] === "1") {
+?>
+ <th style="width:100%">
+ <?=gettext("Rule")?>
+ </th>
+<?php
+ }
+?>
+ <th><?=gettext("Source")?></th>
+ <th><?=gettext("Destination")?></th>
+ <th><?=gettext("Proto")?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ if ($config['syslog']['filterdescriptions']) {
+ buffer_rules_load();
+ }
+
+ foreach ($filterlog as $filterent) {
+?>
+ <tr class="text-nowrap">
+ <td>
+<?php
+ if ($filterent['act'] == "block") {
+ $icon_act = "fa-times text-danger";
+ } else {
+ $icon_act = "fa-check text-success";
+ }
+
+ if ($filterent['count']) {
+ $margin_left = '0em';
+ } else {
+ $margin_left = '0.4em';
+ }
+?>
+ <i style="margin-left:<?php echo $margin_left;?>" class="fa <?php echo $icon_act;?> icon-pointer" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" onclick="javascript:getURL('status_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"></i>
+<?php
+ if ($filterent['count']) {
+ echo $filterent['count'];
+ }
+?>
+ </td>
+ <td>
+ <?=htmlspecialchars($filterent['time'])?>
+ </td>
+ <td>
+<?php
+ if ($filterent['direction'] == "out") {
+ print('&#x25ba;' . ' ');
+ }
+?>
+ <?=htmlspecialchars($filterent['interface'])?>
+ </td>
+<?php
+ if ($config['syslog']['filterdescriptions'] === "1") {
+?>
+ <td style="white-space:normal;">
+ <?=find_rule_by_number_buffer($filterent['rulenum'], $filterent['tracker'], $filterent['act'])?>
+ </td>
+<?php
+ }
+
+ $int = strtolower($filterent['interface']);
+ $proto = strtolower($filterent['proto']);
+
+ if ($filterent['version'] == '6') {
+ $ipproto = "inet6";
+ $filterent['srcip'] = "[{$filterent['srcip']}]";
+ $filterent['dstip'] = "[{$filterent['dstip']}]";
+ } else {
+ $ipproto = "inet";
+ }
+
+ $srcstr = $filterent['srcip'] . get_port_with_service($filterent['srcport'], $proto);
+ $src_htmlclass = str_replace(array('.', ':'), '-', $filterent['srcip']);
+ $dststr = $filterent['dstip'] . get_port_with_service($filterent['dstport'], $proto);
+ $dst_htmlclass = str_replace(array('.', ':'), '-', $filterent['dstip']);
+?>
+ <td class="text-nowrap">
+ <i class="fa fa-info icon-pointer icon-primary" onclick="javascript:resolve_with_ajax('<?="{$filterent['srcip']}"; ?>');" title="<?=gettext("Click to resolve")?>">
+ </i>
+
+ <a class="fa fa-minus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=block&amp;int={$int}&amp;src={$filterent['srcip']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Add to Block List")?>" onclick="return confirm('<?=gettext("Do you really want to add this BLOCK rule?")?>')">
+ </a>
+
+ <?=$srcstr . '<span class="RESOLVE-' . $src_htmlclass . '"></span>'?>
+ </td>
+ <td class="text-nowrap">
+ <i class="fa fa-info icon-pointer icon-primary; ICON-<?= $dst_htmlclass; ?>" onclick="javascript:resolve_with_ajax('<?="{$filterent['dstip']}"; ?>');" title="<?=gettext("Click to resolve")?>">
+ </i>
+
+ <a class="fa fa-plus-square-o icon-pointer icon-primary" href="easyrule.php?<?="action=pass&amp;int={$int}&amp;proto={$proto}&amp;src={$filterent['srcip']}&amp;dst={$filterent['dstip']}&amp;dstport={$filterent['dstport']}&amp;ipproto={$ipproto}"; ?>" title="<?=gettext("Easy Rule: Pass this traffic")?>" onclick="return confirm('<?=gettext("Do you really want to add this PASS rule?")?>')">
+ </a>
+ <?=$dststr . '<span class="RESOLVE-' . $dst_htmlclass . '"></span>'?>
+ </td>
+<?php
+ if ($filterent['proto'] == "TCP") {
+ $filterent['proto'] .= ":{$filterent['tcpflags']}";
+ }
+?>
+ <td>
+ <?=htmlspecialchars($filterent['proto'])?>
+ </td>
+ </tr>
+<?php
+ if (isset($config['syslog']['filterdescriptions']) && $config['syslog']['filterdescriptions'] === "2") {
+?>
+ <tr>
+ <td colspan="2" />
+ <td colspan="4"><?=find_rule_by_number_buffer($filterent['rulenum'], $filterent['tracker'], $filterent['act'])?></td>
+ </tr>
+<?php
+ }
+ } // e-o-foreach
+ buffer_rules_clear();
+?>
+ </tbody>
+ </table>
+<?php
+ if (count($filterlog) == 0) {
+ print_info_box(gettext('No logs to display'));
+ }
+?>
+ </div>
+ </div>
+</div>
+
+<?php
+} else {
+?>
+<div class="panel panel-default">
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext("Last ")?><?=$nentries?> <?=gettext($allowed_logs[$logfile]["name"])?><?=gettext(" log entries")?></h2></div>
+ <div class="table table-responsive">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
+ <thead>
+ <tr class="text-nowrap">
+ <th><?=gettext("Time")?></th>
+ <th style="width:100%"><?=gettext("Message")?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ if ($filtertext) {
+ $rows = dump_clog($filter_logfile, $nentries, true, array("$filtertext"));
+ } else {
+ $rows = dump_clog($filter_logfile, $nentries, true, array());
+ }
+?>
+ </tbody>
+ </table>
+<?php
+ if ($rows == 0) {
+ print_info_box(gettext('No logs to display'));
+ }
+?>
+ </div>
+</div>
+<?php
+}
+?>
+
+<div id="infoblock">
+
+<?php
+
+print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' .
+ gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR' . '<br />' .
+ '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve');
+
+?>
+</div>
+
+<?php
+# Manage Log - Section/Form
+
+if ($input_errors) {
+ print_input_errors($input_errors);
+ $manage_log_active = true;
+}
+
+if ($manage_log_active) {
+ $manage_log_state = SEC_OPEN;
+} else {
+ $manage_log_state = SEC_CLOSED;
+}
+
+$form = new Form(false);
+
+$section = new Form_Section(gettext('Manage') . ' ' . gettext($allowed_logs[$logfile]["name"]) . ' ' . gettext('Log'), 'log-manager-panel', COLLAPSIBLE|$manage_log_state);
+
+$section->addInput(new Form_StaticText(
+ '',
+ 'These settings override the "General Logging Options" settings.'
+));
+
+
+# All
+$group = new Form_Group('Forward/Reverse Display');
+
+$group->add(new Form_Checkbox(
+ 'cronorder',
+ null,
+ 'Forward',
+ ($pconfig['cronorder'] == 'forward') ? true : false,
+ 'forward'
+))->displayAsRadio()->setHelp('(newest at bottom)');
+
+$group->add(new Form_Checkbox(
+ 'cronorder',
+ null,
+ 'Reverse',
+ ($pconfig['cronorder'] == 'reverse') ? true : false,
+ 'reverse'
+))->displayAsRadio()->setHelp('(newest at top)');
+
+$group->add(new Form_Checkbox(
+ 'cronorder',
+ null,
+ 'General Logging Options Setting',
+ ($pconfig['cronorder'] == '') ? true : false,
+ ''
+))->displayAsRadio();
+
+$group->setHelp('Show log entries in forward or reverse order.');
+$section->add($group);
+
+$group = new Form_Group('GUI Log Entries');
+
+# Use the general logging options setting (global) as placeholder.
+$group->add(new Form_Input(
+ 'nentries',
+ 'GUI Log Entries',
+ 'number',
+ $pconfig['nentries'],
+ ['min' => 5, 'max' => 2000, 'placeholder' => $config['syslog']['nentries']]
+))->setWidth(2);
+
+$group->setHelp('This is the number of log entries displayed in the GUI. It does not affect how many entries are contained in the log.');
+$section->add($group);
+
+$group = new Form_Group('Log file size (Bytes)');
+
+# Use the general logging options setting (global) as placeholder.
+$group->add(new Form_Input(
+ 'logfilesize',
+ 'Log file size (Bytes)',
+ 'number',
+ $pconfig['logfilesize'],
+ ['min' => 100000, 'placeholder' => $config['syslog']['logfilesize'] ? $config['syslog']['logfilesize'] : "511488"]
+))->setWidth(2);
+$group->setHelp("The log is held in a constant-size circular log file. This field controls how large the log file is, and thus how many entries may exist inside the log. The default is approximately 500KB." .
+ '<br /><br />' .
+ "NOTE: The log size is changed the next time it is cleared. To immediately change the log size, first save the options to set the size, then clear the log using the \"Clear Log\" action below. ");
+$section->add($group);
+
+$group = new Form_Group('Formatted/Raw Display');
+
+$group->add(new Form_Checkbox(
+ 'format',
+ null,
+ 'Formatted',
+ ($pconfig['format'] == 'formatted') ? true : false,
+ 'formatted'
+))->displayAsRadio();
+
+$group->add(new Form_Checkbox(
+ 'format',
+ null,
+ 'Raw',
+ ($pconfig['format'] == 'raw') ? true : false,
+ 'raw'
+))->displayAsRadio();
+
+$group->add(new Form_Checkbox(
+ 'format',
+ null,
+ 'General Logging Options Setting',
+ ($pconfig['format'] == '') ? true : false,
+ ''
+))->displayAsRadio();
+
+$group->setHelp('Show the log entries as formatted or raw output as generated by the service. The raw output will reveal more detailed information, but it is more difficult to read.');
+$section->add($group);
+
+
+# System General (main) Specific
+if ($logfile == 'system') {
+ $section->addInput(new Form_Checkbox(
+ 'loglighttpd',
+ 'Web Server Log',
+ 'Log errors from the web server process',
+ $pconfig['loglighttpd']
+ ))->setHelp('If this is checked, errors from the lighttpd web server process for the GUI or Captive Portal will appear in the system log.');
+}
+
+
+# Firewall Specific
+if ($logfile == 'filter') {
+$section->addInput(new Form_Checkbox(
+ 'logdefaultblock',
+ 'Log firewall default blocks',
+ 'Log packets matched from the default block rules in the ruleset',
+ $pconfig['logdefaultblock']
+))->setHelp('Packets that are blocked by the implicit default block rule will not be logged if this option is unchecked. Per-rule logging options are still respected.');
+
+$section->addInput(new Form_Checkbox(
+ 'logdefaultpass',
+ null,
+ 'Log packets matched from the default pass rules put in the ruleset',
+ $pconfig['logdefaultpass']
+))->setHelp('Packets that are allowed by the implicit default pass rule will be logged if this option is checked. Per-rule logging options are still respected. ');
+
+$section->addInput(new Form_Checkbox(
+ 'logbogons',
+ null,
+ 'Log packets blocked by \'Block Bogon Networks\' rules',
+ $pconfig['logbogons']
+));
+
+$section->addInput(new Form_Checkbox(
+ 'logprivatenets',
+ null,
+ 'Log packets blocked by \'Block Private Networks\' rules',
+ $pconfig['logprivatenets']
+));
+
+$section->addInput(new Form_Select(
+ 'filterdescriptions',
+ 'Where to show rule descriptions',
+ !isset($pconfig['filterdescriptions']) ? '0':$pconfig['filterdescriptions'],
+ array(
+ '0' => 'Dont load descriptions',
+ '1' => 'Display as column',
+ '2' => 'Display as second row'
+ )
+))->setHelp('Show the applied rule description below or in the firewall log rows' . '<br />' .
+ 'Displaying rule descriptions for all lines in the log might affect performance with large rule sets');
+}
+
+
+$group = new Form_Group('Action');
+
+$btnsavesettings = new Form_Button(
+ 'save_settings',
+ gettext('Save'),
+ null
+);
+
+$btnsavesettings->addClass('btn-sm');
+
+$group->add(new Form_StaticText(
+ '',
+ $btnsavesettings
+))->setHelp('Saves changed settings.');
+
+
+$btnclear = new Form_Button(
+ 'clear',
+ ' ' . gettext('Clear log'),
+ null,
+ 'fa-trash'
+);
+
+$btnclear->removeClass('btn-primary')->addClass('btn-danger')->addClass('btn-sm');
+
+$group->add(new Form_StaticText(
+ '',
+ $btnclear
+))->setHelp('Clears local log file and reinitializes it as an empty log. Save any settings changes first.');
+
+$section->add($group);
+$form->add($section);
+print $form;
+?>
+
+
+<!-- AJAXY STUFF -->
+<script type="text/javascript">
+//<![CDATA[
+function outputrule(req) {
+ alert(req.content);
+}
+
+function resolve_with_ajax(ip_to_resolve) {
+ var url = "/status_logs_filter.php";
+
+ $.ajax(
+ url,
+ {
+ method: 'post',
+ dataType: 'json',
+ data: {
+ resolve: ip_to_resolve,
+ },
+ complete: resolve_ip_callback
+ });
+
+}
+
+function resolve_ip_callback(transport) {
+ var response = $.parseJSON(transport.responseText);
+ var resolve_class = htmlspecialchars(response.resolve_ip.replace(/[.:]/g, '-'));
+ var resolve_text = '<small><br />' + htmlspecialchars(response.resolve_text) + '<\/small>';
+
+ jQuery('span.RESOLVE-' + resolve_class).html(resolve_text);
+}
+
+// From http://stackoverflow.com/questions/5499078/fastest-method-to-escape-html-tags-as-html-entities
+function htmlspecialchars(str) {
+ return str.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&apos;');
+}
+
+if (typeof getURL == 'undefined') {
+ getURL = function(url, callback) {
+ if (!url)
+ throw 'No URL for getURL';
+ try {
+ if (typeof callback.operationComplete == 'function')
+ callback = callback.operationComplete;
+ } catch (e) {}
+ if (typeof callback != 'function')
+ throw 'No callback function for getURL';
+ var http_request = null;
+ if (typeof XMLHttpRequest != 'undefined') {
+ http_request = new XMLHttpRequest();
+ }
+ else if (typeof ActiveXObject != 'undefined') {
+ try {
+ http_request = new ActiveXObject('Msxml2.XMLHTTP');
+ } catch (e) {
+ try {
+ http_request = new ActiveXObject('Microsoft.XMLHTTP');
+ } catch (e) {}
+ }
+ }
+ if (!http_request)
+ throw 'Both getURL and XMLHttpRequest are undefined';
+ http_request.onreadystatechange = function() {
+ if (http_request.readyState == 4) {
+ callback( { success : true,
+ content : http_request.responseText,
+ contentType : http_request.getResponseHeader("Content-Type") } );
+ }
+ };
+ http_request.open('GET', url, true);
+ http_request.send(null);
+ };
+}
+
+events.push(function() {
+ $('.fa').tooltip();
+});
+//]]>
+</script>
+
+<?php include("foot.inc");
+?>
diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php
new file mode 100755
index 0000000..07b8fee
--- /dev/null
+++ b/src/usr/local/www/status_logs_filter_dynamic.php
@@ -0,0 +1,446 @@
+<?php
+/*
+ status_logs_filter_dynamic.php
+*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-diagnostics-logs-firewall-dynamic
+##|*NAME=Status: System Logs: Firewall (Dynamic View)
+##|*DESCR=Allow access to the 'Status: System Logs: Firewall (Dynamic View)' page
+##|*MATCH=status_logs_filter_dynamic.php*
+##|-PRIV
+
+require("guiconfig.inc");
+require_once("filter_log.inc");
+
+$filter_logfile = "{$g['varlog_path']}/filter.log";
+
+/* Hardcode this. AJAX doesn't do so well with large numbers */
+$nentries = 50;
+
+/* AJAX related routines */
+handle_ajax($nentries, $nentries + 20);
+
+if ($_POST['clear']) {
+ clear_log_file($filter_logfile);
+}
+
+$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 100);
+
+$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall"), gettext("Dynamic View"));
+$shortcut_section = "firewall";
+include("head.inc");
+
+?>
+
+<script type="text/javascript">
+//<![CDATA[
+ lastsawtime = '<?=time(); ?>;';
+ var lines = Array();
+ var timer;
+ var updateDelay = 25500;
+ var isBusy = false;
+ var isPaused = false;
+ var nentries = <?=$nentries; ?>;
+<?php
+ if (isset($config['syslog']['reverse'])) {
+ echo "var isReverse = true;\n";
+ } else {
+ echo "var isReverse = false;\n";
+ }
+?>
+ /* Called by the AJAX updater */
+ function format_log_line(row) {
+ if (row[8] == '6') {
+ srcIP = '[' + row[3] + ']';
+ dstIP = '[' + row[5] + ']';
+ } else {
+ srcIP = row[3];
+ dstIP = row[5];
+ }
+
+ if (row[4] == '') {
+ srcPort = '';
+ } else {
+ srcPort = ':' + row[4];
+ }
+ if (row[6] == '') {
+ dstPort = '';
+ } else {
+ dstPort = ':' + row[6];
+ }
+
+ var line =
+ '<td>' + row[0] + '</td>' +
+ '<td>' + row[1] + '</td>' +
+ '<td>' + row[2] + '</td>' +
+ '<td>' + srcIP + srcPort + '</td>' +
+ '<td>' + dstIP + dstPort + '</td>' +
+ '<td>' + row[7] + '</td>';
+
+ return line;
+ }
+
+if (typeof getURL == 'undefined') {
+ getURL = function(url, callback) {
+ if (!url)
+ throw 'No URL for getURL';
+ try {
+ if (typeof callback.operationComplete == 'function')
+ callback = callback.operationComplete;
+ } catch (e) {}
+ if (typeof callback != 'function')
+ throw 'No callback function for getURL';
+ var http_request = null;
+ if (typeof XMLHttpRequest != 'undefined') {
+ http_request = new XMLHttpRequest();
+ }
+ else if (typeof ActiveXObject != 'undefined') {
+ try {
+ http_request = new ActiveXObject('Msxml2.XMLHTTP');
+ } catch (e) {
+ try {
+ http_request = new ActiveXObject('Microsoft.XMLHTTP');
+ } catch (e) {}
+ }
+ }
+ if (!http_request)
+ throw 'Both getURL and XMLHttpRequest are undefined';
+ http_request.onreadystatechange = function() {
+ if (http_request.readyState == 4) {
+ callback( { success : true,
+ content : http_request.responseText,
+ contentType : http_request.getResponseHeader("Content-Type") } );
+ }
+ };
+ http_request.open('GET', url, true);
+ http_request.send(null);
+ };
+}
+
+function outputrule(req) {
+ alert(req.content);
+}
+
+function fetch_new_rules() {
+ if (isPaused) {
+ return;
+ }
+ if (isBusy) {
+ return;
+ }
+ isBusy = true;
+ getURL('status_logs_filter_dynamic.php?lastsawtime=' + lastsawtime, fetch_new_rules_callback);
+}
+
+function fetch_new_rules_callback(callback_data) {
+ if (isPaused) {
+ return;
+ }
+
+ var data_split;
+ var new_data_to_add = Array();
+ var data = callback_data.content;
+
+ data_split = data.split("\n");
+
+ for (var x=0; x<data_split.length-1; x++) {
+ /* loop through rows */
+ row_split = data_split[x].split("||");
+ lastsawtime = row_split[9];
+
+ var tmp = format_log_line(row_split);
+
+ if (!(tmp)) {
+ continue;
+ }
+
+ new_data_to_add[new_data_to_add.length] = tmp;
+ }
+
+ update_table_rows(new_data_to_add);
+ isBusy = false;
+}
+
+function in_arrayi(needle, haystack) {
+ var i = haystack.length;
+ while (i--) {
+ if (haystack[i].toLowerCase() === needle.toLowerCase()) {
+ return true;
+ }
+ }
+ return false;
+}
+
+function update_table_rows(data) {
+ if (isPaused) {
+ return;
+ }
+
+ var isIE = navigator.appName.indexOf('Microsoft') != -1;
+ var isSafari = navigator.userAgent.indexOf('Safari') != -1;
+ var isOpera = navigator.userAgent.indexOf('Opera') != -1;
+ var showanim = 1;
+
+ if (isIE) {
+ showanim = 0;
+ }
+
+ var startat = data.length - nentries;
+
+ if (startat < 0) {
+ startat = 0;
+ }
+
+ data = data.slice(startat, data.length);
+
+ var rows = jQuery('#filter-log-entries>tr');
+
+ // Number of rows to move by
+ var move = rows.length + data.length - nentries;
+
+ if (move < 0) {
+ move = 0;
+ }
+
+ if (isReverse == false) {
+ for (var i = move; i < rows.length; i++) {
+ jQuery(rows[i - move]).html(jQuery(rows[i]).html());
+ }
+
+ var tbody = jQuery('#filter-log-entries');
+
+ for (var i = 0; i < data.length; i++) {
+ var rowIndex = rows.length - move + i;
+ if (rowIndex < rows.length) {
+ jQuery(rows[rowIndex]).html(data[i]);
+ } else {
+ jQuery(tbody).append('<tr>' + data[i] + '</tr>');
+ }
+ }
+ } else {
+ for (var i = rows.length - 1; i >= move; i--) {
+ jQuery(rows[i]).html(jQuery(rows[i - move]).html());
+ }
+
+ var tbody = jQuery('#filter-log-entries');
+
+ for (var i = 0; i < data.length; i++) {
+ var rowIndex = move - 1 - i;
+ if (rowIndex >= 0) {
+ jQuery(rows[rowIndex]).html(data[i]);
+ } else {
+ jQuery(tbody).prepend('<tr>' + data[i] + '</tr>');
+ }
+ }
+ }
+
+ // Much easier to go through each of the rows once they've all be added.
+ rows = jQuery('#filter-log-entries>tr');
+ for (var i = 0; i < rows.length; i++) {
+ rows[i].className = i % 2 == 0 ? 'listMRodd' : 'listMReven';
+ }
+
+ $('.fa').tooltip();
+}
+
+function toggle_pause() {
+ if (isPaused) {
+ isPaused = false;
+ fetch_new_rules();
+ } else {
+ isPaused = true;
+ }
+}
+/* start local AJAX engine */
+if (typeof updateDelay != 'undefined') {
+ timer = setInterval('fetch_new_rules()', updateDelay);
+}
+
+function toggleListDescriptions() {
+ var ss = document.styleSheets;
+ for (var i=0; i<ss.length; i++) {
+ var rules = ss[i].cssRules || ss[i].rules;
+ for (var j=0; j<rules.length; j++) {
+ if (rules[j].selectorText === ".listMRDescriptionL" || rules[j].selectorText === ".listMRDescriptionR") {
+ rules[j].style.display = rules[j].style.display === "none" ? "table-cell" : "none";
+ }
+ }
+ }
+}
+
+//]]>
+</script>
+
+<?php
+$tab_array = array();
+$tab_array[] = array(gettext("System"), false, "status_logs.php");
+$tab_array[] = array(gettext("Firewall"), true, "status_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "status_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "status_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "status_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "status_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "status_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "status_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "status_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "status_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "status_logs_settings.php");
+display_top_tabs($tab_array);
+
+$tab_array = array();
+$tab_array[] = array(gettext("Normal View"), false, "/status_logs_filter.php");
+$tab_array[] = array(gettext("Dynamic View"), true, "/status_logs_filter_dynamic.php");
+$tab_array[] = array(gettext("Summary View"), false, "/status_logs_filter_summary.php");
+display_top_tabs($tab_array, false, 'nav nav-tabs');
+?>
+
+<div class="panel panel-default">
+ <div class="panel-heading">
+ <h2 class="panel-title">
+ <?=gettext('Last ') . $nentries . gettext(' records. ') . gettext('Pause ')?><input type="checkbox" onclick="javascript:toggle_pause();" />
+ </h2>
+ </div>
+ <div class="panel-body">
+ <div class="table-responsive">
+ <table class="table table-striped table-hover table-condensed">
+ <thead>
+ <tr>
+ <th><?=gettext("Act")?></th>
+ <th><?=gettext("Time")?></th>
+ <th><?=gettext("IF")?></th>
+ <th><?=gettext("Source")?></th>
+ <th><?=gettext("Destination")?></th>
+ <th><?=gettext("Proto")?></th>
+ </tr>
+ </thead>
+ <tbody id="filter-log-entries">
+<?php
+ $rowIndex = 0;
+ $tcpcnt = 0;
+
+ foreach ($filterlog as $filterent) {
+ $evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd";
+ $rowIndex++;
+ if ($filterent['version'] == '6') {
+ $srcIP = "[" . htmlspecialchars($filterent['srcip']) . "]";
+ $dstIP = "[" . htmlspecialchars($filterent['dstip']) . "]";
+ } else {
+ $srcIP = htmlspecialchars($filterent['srcip']);
+ $dstIP = htmlspecialchars($filterent['dstip']);
+ }
+
+ if ($filterent['srcport']) {
+ $srcPort = ":" . htmlspecialchars($filterent['srcport']);
+ } else {
+ $srcPort = "";
+ }
+
+ if ($filterent['dstport']) {
+ $dstPort = ":" . htmlspecialchars($filterent['dstport']);
+ } else {
+ $dstPort = "";
+ }
+?>
+ <tr>
+ <td>
+<?php
+ if ($filterent['act'] == "block") {
+ $icon_act = "fa-times text-danger";
+ } else {
+ $icon_act = "fa-check text-success";
+ }
+?>
+ <i class="fa <?php echo $icon_act;?> icon-pointer" title="<?php echo $filterent['act'] .'/'. $filterent['tracker'];?>" onclick="javascript:getURL('status_logs_filter.php?getrulenum=<?="{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"></i>
+ </td>
+ <td><?=htmlspecialchars($filterent['time'])?></td>
+ <td><?=htmlspecialchars($filterent['interface'])?></td>
+ <td><?=$srcIP . $srcPort?></td>
+ <td><?=$dstIP . $dstPort?></td>
+<?php
+ if ($filterent['proto'] == "TCP") {
+ $filterent['proto'] .= ":{$filterent['tcpflags']}";
+ $tcpcnt++;
+ }
+?>
+ <td><?=htmlspecialchars($filterent['proto'])?></td>
+ </tr>
+<?php
+ } // e-o-foreach()
+?>
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
+<?php
+
+if ($tcpcnt > 0) {
+ print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' .
+ gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR');
+}
+?>
+
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ $(document).ready(function() {
+ $('.fa').tooltip();
+ });
+});
+//]]>
+</script>
+
+<?php include("foot.inc");
diff --git a/src/usr/local/www/diag_logs_filter_summary.php b/src/usr/local/www/status_logs_filter_summary.php
index 7a83b95..ebb4db0 100644
--- a/src/usr/local/www/diag_logs_filter_summary.php
+++ b/src/usr/local/www/status_logs_filter_summary.php
@@ -1,13 +1,12 @@
<?php
/*
- diag_logs_filter_summary.php
+ status_logs_filter_summary.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2009 Jim Pingle (jpingle@gmail.com)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -15,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -36,7 +35,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -54,13 +53,13 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: filter
-*/
+##|+PRIV
+##|*IDENT=page-diagnostics-logs-firewall-summary
+##|*NAME=Status: System Logs: Firewall Log Summary
+##|*DESCR=Allow access to the 'Status: System Logs: Firewall Log Summary' page
+##|*MATCH=status_logs_filter_summary.php*
+##|-PRIV
-$pgtitle = gettext("Status").": ".gettext("System logs").": ".gettext("Firewall Log Summary");
-$shortcut_section = "firewall";
require_once("guiconfig.inc");
include_once("filter_log.inc");
@@ -121,8 +120,9 @@ function stat_block($summary, $stat, $num) {
}
}
- if (!is_ipaddr($outstr))
+ if (!is_ipaddr($outstr)) {
print('<tr><td>' . $outstr . '</td><td>' . $summary[$stat][$k[$i]] . '</td><td></td></tr>');
+ }
}
}
$leftover = $gotlines - $total;
@@ -138,7 +138,8 @@ function stat_block($summary, $stat, $num) {
function pie_block($summary, $stat, $num, $chartnum) {
global $fields, $segcolors, $gotlines, $numcolors;
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
var pie = new d3pie("pieChart<?=$chartnum?>", {
"header": {
"title": {
@@ -177,8 +178,9 @@ var pie = new d3pie("pieChart<?=$chartnum?>", {
if ($k[$i]) {
$total += $summary[$stat][$k[$i]];
$numentries++;
- if ($i > 0)
+ if ($i > 0) {
print(",\r\n");
+ }
print("{");
print('"label": "' . $k[$i] . '", "value": ');
@@ -242,6 +244,7 @@ var pie = new d3pie("pieChart<?=$chartnum?>", {
},
"callbacks": {}
});
+//]]>
</script>
<?php
}
@@ -266,30 +269,33 @@ foreach ($filterlog as $fe) {
}
}
+$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Firewall"), gettext("Summary View"));
+$shortcut_section = "firewall";
include("head.inc");
$tab_array = array();
-$tab_array[] = array(gettext("System"), false, "diag_logs.php");
-$tab_array[] = array(gettext("Firewall"), true, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
-$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
-$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+$tab_array[] = array(gettext("System"), false, "status_logs.php");
+$tab_array[] = array(gettext("Firewall"), true, "status_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "status_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "status_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "status_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "status_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "status_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "status_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "status_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "status_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "status_logs_settings.php");
display_top_tabs($tab_array);
$tab_array = array();
-$tab_array[] = array(gettext("Normal View"), false, "/diag_logs_filter.php");
-$tab_array[] = array(gettext("Dynamic View"), false, "/diag_logs_filter_dynamic.php");
-$tab_array[] = array(gettext("Summary View"), true, "/diag_logs_filter_summary.php");
+$tab_array[] = array(gettext("Normal View"), false, "/status_logs_filter.php");
+$tab_array[] = array(gettext("Dynamic View"), false, "/status_logs_filter_dynamic.php");
+$tab_array[] = array(gettext("Summary View"), true, "/status_logs_filter_summary.php");
display_top_tabs($tab_array, false, 'nav nav-tabs');
-$infomsg = sprintf('This is a firewall log summary, of the last %1$s lines of the firewall log (Max %2$s).', $gotlines, $lines);
-print_info_box($infomsg);
+print("<br />");
+$infomsg = sprintf('This is a summary of the last %1$s lines of the firewall log (Max %2$s).', $gotlines, $lines);
+print_info_box($infomsg, info);
?>
<script src="d3pie/d3pie.min.js"></script>
@@ -315,4 +321,4 @@ foreach (array_keys($fields) as $field) {
<?php
}
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/diag_logs_settings.php b/src/usr/local/www/status_logs_settings.php
index c27d2d9..8fa193a 100644
--- a/src/usr/local/www/diag_logs_settings.php
+++ b/src/usr/local/www/status_logs_settings.php
@@ -1,11 +1,12 @@
<?php
-/* $Id$ */
/*
- diag_logs_settings.php
+ status_logs_settings.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004-9 Scott Ullrich
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -37,7 +38,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -55,15 +56,11 @@
*
*/
-/*
- pfSense_MODULE: system
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-logs-settings
-##|*NAME=Diagnostics: Logs: Settings page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: Settings' page.
-##|*MATCH=diag_logs_settings.php*
+##|*NAME=Status: Logs: Settings
+##|*DESCR=Allow access to the 'Status: Logs: Settings' page.
+##|*MATCH=status_logs_settings.php*
##|-PRIV
require("guiconfig.inc");
@@ -82,7 +79,7 @@ $pconfig['filter'] = isset($config['syslog']['filter']);
$pconfig['dhcp'] = isset($config['syslog']['dhcp']);
$pconfig['portalauth'] = isset($config['syslog']['portalauth']);
$pconfig['vpn'] = isset($config['syslog']['vpn']);
-$pconfig['apinger'] = isset($config['syslog']['apinger']);
+$pconfig['dpinger'] = isset($config['syslog']['dpinger']);
$pconfig['relayd'] = isset($config['syslog']['relayd']);
$pconfig['hostapd'] = isset($config['syslog']['hostapd']);
$pconfig['logall'] = isset($config['syslog']['logall']);
@@ -110,7 +107,7 @@ function is_valid_syslog_server($target) {
}
if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
- clear_all_log_files();
+ clear_all_log_files(true);
$savemsg .= gettext("The log files have been reset.");
} elseif ($_POST) {
unset($input_errors);
@@ -155,7 +152,7 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
$config['syslog']['dhcp'] = $_POST['dhcp'] ? true : false;
$config['syslog']['portalauth'] = $_POST['portalauth'] ? true : false;
$config['syslog']['vpn'] = $_POST['vpn'] ? true : false;
- $config['syslog']['apinger'] = $_POST['apinger'] ? true : false;
+ $config['syslog']['dpinger'] = $_POST['dpinger'] ? true : false;
$config['syslog']['relayd'] = $_POST['relayd'] ? true : false;
$config['syslog']['hostapd'] = $_POST['hostapd'] ? true : false;
$config['syslog']['logall'] = $_POST['logall'] ? true : false;
@@ -189,9 +186,9 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
$retval = 0;
$retval = system_syslogd_start();
if (($oldnologdefaultblock !== isset($config['syslog']['nologdefaultblock'])) ||
- ($oldnologdefaultpass !== isset($config['syslog']['nologdefaultpass'])) ||
- ($oldnologbogons !== isset($config['syslog']['nologbogons'])) ||
- ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets']))) {
+ ($oldnologdefaultpass !== isset($config['syslog']['nologdefaultpass'])) ||
+ ($oldnologbogons !== isset($config['syslog']['nologbogons'])) ||
+ ($oldnologprivatenets !== isset($config['syslog']['nologprivatenets']))) {
$retval |= filter_configure();
}
@@ -220,30 +217,29 @@ $logfilesizeHelp = gettext("Logs are held in constant-size circular log files. T
gettext(" Remaining disk space for log files: ") . exec("/bin/df -h /var/log | /usr/bin/awk '{print $4;}'");
$remoteloghelp = gettext("This option will allow the logging daemon to bind to a single IP address, rather than all IP addresses.") .
- gettext("If you pick a single IP, remote syslog severs must all be of that IP type. If you wish to mix IPv4 and IPv6 remote syslog servers, you must bind to all interfaces.") .
+ gettext("If you pick a single IP, remote syslog servers must all be of that IP type. If you wish to mix IPv4 and IPv6 remote syslog servers, you must bind to all interfaces.") .
"<br /><br />" .
gettext("NOTE: If an IP address cannot be located on the chosen interface, the daemon will bind to all addresses.");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-else if ($savemsg)
+} else if ($savemsg) {
print_info_box($savemsg);
+}
$tab_array = array();
-$tab_array[] = array(gettext("System"), false, "diag_logs.php");
-$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
-$tab_array[] = array(gettext("VPN"), false, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
-$tab_array[] = array(gettext("Settings"), true, "diag_logs_settings.php");
+$tab_array[] = array(gettext("System"), false, "status_logs.php");
+$tab_array[] = array(gettext("Firewall"), false, "status_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "status_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "status_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "status_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "status_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), false, "status_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "status_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "status_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "status_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), true, "status_logs_settings.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form(new Form_Button(
'Submit',
gettext("Save")
@@ -279,14 +275,14 @@ $section->addInput(new Form_Checkbox(
'Log firewall default blocks',
'Log packets matched from the default block rules in the ruleset',
$pconfig['logdefaultblock']
-))->setHelp('Packets that are blocked by the implicit default block rule will not be logged if you uncheck this option. Per-rule logging options are still respected.');
+))->setHelp('Log packets that are <strong>blocked</strong> by the implicit default block rule. - Per-rule logging options are still respected.');
$section->addInput(new Form_Checkbox(
'logdefaultpass',
null,
'Log packets matched from the default pass rules put in the ruleset',
$pconfig['logdefaultpass']
-))->setHelp('Packets that are allowed by the implicit default pass rule will be logged if you check this option. Per-rule logging options are still respected. ');
+))->setHelp('Log packets that are <strong>allowed</strong> by the implicit default pass rule. - Per-rule logging options are still respected. ');
$section->addInput(new Form_Checkbox(
'logbogons',
@@ -312,7 +308,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Checkbox(
'rawfilter',
'Raw Logs',
- 'Show raw filter logs)',
+ 'Show raw filter logs',
$pconfig['rawfilter']
))->setHelp(gettext('If this is checked, filter logs are shown as generated by the packet filter, without any formatting. This will reveal more detailed information, but it is more difficult to read'));
@@ -442,10 +438,10 @@ $group->add(new Form_MultiCheckbox(
));
$group->add(new Form_MultiCheckbox(
- 'apinger',
+ 'dpinger',
null,
'Gateway Monitor events',
- $pconfig['apinger']
+ $pconfig['dpinger']
));
$group->add(new Form_MultiCheckbox(
@@ -462,14 +458,6 @@ $group->add(new Form_MultiCheckbox(
$pconfig['hostapd']
));
-// Ugly hack to prevent the "Toggle all" button from being automatically created
-$group->add(new Form_MultiCheckbox(
- 'notoggleall',
- null,
- 'No toggle all',
- $pconfig['hostapd']
-))->displayAsRadio();
-
$group->setHelp('Syslog sends UDP datagrams to port 514 on the specified remote '.
'syslog server, unless another port is specified. Be sure to set syslogd on '.
'the remote server to accept syslog messages from pfSense.');
@@ -480,11 +468,12 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
- hideMultiCheckbox('notoggleall', true);
+ // We don't want to see the automatically generated "Toggle all" button
+ $('[name=btntoggleall]').hide();
// ---------- Click checkbox handlers ---------------------------------------------------------
@@ -496,7 +485,6 @@ events.push(function(){
hideClass('remotelogging', !this.checked);
hideSelect('sourceip', !this.checked);
hideSelect('ipproto', !this.checked);
- hideMultiCheckbox('notoggleall', true);
});
function disableEverything() {
@@ -507,7 +495,7 @@ events.push(function(){
disableInput('dhcp', hide);
disableInput('portalauth', hide);
disableInput('vpn', hide);
- disableInput('apinger', hide);
+ disableInput('dpinger', hide);
disableInput('relayd', hide);
disableInput('hostapd', hide);
}
diff --git a/src/usr/local/www/diag_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php
index 4394080..a1335e7 100755..100644
--- a/src/usr/local/www/diag_logs_vpn.php
+++ b/src/usr/local/www/status_logs_vpn.php
@@ -1,15 +1,16 @@
#!/usr/local/bin/php
<?php
/*
- diag_logs_vpn.php
+ status_logs_vpn.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2003-2006 Manuel Kasper <mk@neon1.net>
- * part of m0n0wall (http://m0n0.ch/wall)
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +18,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -38,7 +39,7 @@
*
* "This product includes software developed by the pfSense Project
* for use in the pfSense software distribution (http://www.pfsense.org/).
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
@@ -56,16 +57,11 @@
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/sbin/fifolog_reader /usr/local/sbin/clog
- pfSense_MODULE: vpn
-*/
-
##|+PRIV
##|*IDENT=page-diagnostics-logs-pptpvpn
-##|*NAME=Diagnostics: Logs: VPN page
-##|*DESCR=Allow access to the 'Diagnostics: Logs: VPN' page.
-##|*MATCH=diag_logs_vpn.php*
+##|*NAME=Status: Logs: VPN
+##|*DESCR=Allow access to the 'Status: Logs: VPN' page.
+##|*MATCH=status_logs_vpn.php*
##|-PRIV
@@ -118,11 +114,7 @@ function dump_clog_vpn($logfile, $tail) {
$logarr = "";
- if (isset($config['system']['usefifolog'])) {
- exec("/usr/sbin/fifolog_reader " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
- } else {
- exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
- }
+ exec("/usr/local/sbin/clog " . escapeshellarg($logfile) . " | tail {$sor} -n " . $tail, $logarr);
$rows = 0;
foreach ($logarr as $logent) {
@@ -136,9 +128,9 @@ function dump_clog_vpn($logfile, $tail) {
echo "<td>" . htmlspecialchars(join(" ", array_slice($logent, 0, 3))) . "</td>\n";
if ($llent[0] == "login") {
- echo "<td class=\"listr\"><img src=\"/themes/{$g['theme']}/images/icons/icon_in.gif\" width=\"11\" height=\"11\" title=\"login\" alt=\"in\" /></td>\n";
+ echo "<td><i class=\"fa fa-arrow-left\" alt=\"in\"></i></td>\n";
} else {
- echo "<td class=\"listr\"><img src=\"/themes/{$g['theme']}/images/icons/icon_out.gif\" width=\"11\" height=\"11\" title=\"logout\" alt=\"out\" /></td>\n";
+ echo "<td><i class=\"fa fa-arrow-right\" alt=\"out\"></i></td>\n";
}
echo "<td>" . htmlspecialchars($llent[3]) . "</td>\n";
@@ -151,32 +143,32 @@ function dump_clog_vpn($logfile, $tail) {
include("head.inc");
$tab_array = array();
-$tab_array[] = array(gettext("System"), false, "diag_logs.php");
-$tab_array[] = array(gettext("Firewall"), false, "diag_logs_filter.php");
-$tab_array[] = array(gettext("DHCP"), false, "diag_logs.php?logfile=dhcpd");
-$tab_array[] = array(gettext("Portal Auth"), false, "diag_logs.php?logfile=portalauth");
-$tab_array[] = array(gettext("IPsec"), false, "diag_logs.php?logfile=ipsec");
-$tab_array[] = array(gettext("PPP"), false, "diag_logs.php?logfile=ppp");
-$tab_array[] = array(gettext("VPN"), true, "diag_logs_vpn.php");
-$tab_array[] = array(gettext("Load Balancer"), false, "diag_logs.php?logfile=relayd");
-$tab_array[] = array(gettext("OpenVPN"), false, "diag_logs.php?logfile=openvpn");
-$tab_array[] = array(gettext("NTP"), false, "diag_logs.php?logfile=ntpd");
-$tab_array[] = array(gettext("Settings"), false, "diag_logs_settings.php");
+$tab_array[] = array(gettext("System"), false, "status_logs.php");
+$tab_array[] = array(gettext("Firewall"), false, "status_logs_filter.php");
+$tab_array[] = array(gettext("DHCP"), false, "status_logs.php?logfile=dhcpd");
+$tab_array[] = array(gettext("Portal Auth"), false, "status_logs.php?logfile=portalauth");
+$tab_array[] = array(gettext("IPsec"), false, "status_logs.php?logfile=ipsec");
+$tab_array[] = array(gettext("PPP"), false, "status_logs.php?logfile=ppp");
+$tab_array[] = array(gettext("VPN"), true, "status_logs_vpn.php");
+$tab_array[] = array(gettext("Load Balancer"), false, "status_logs.php?logfile=relayd");
+$tab_array[] = array(gettext("OpenVPN"), false, "status_logs.php?logfile=openvpn");
+$tab_array[] = array(gettext("NTP"), false, "status_logs.php?logfile=ntpd");
+$tab_array[] = array(gettext("Settings"), false, "status_logs_settings.php");
display_top_tabs($tab_array);
$tab_array = array();
$tab_array[] = array(gettext("PPPoE Logins"),
(($vpntype == "poes") && ($mode != "raw")),
- "/diag_logs_vpn.php?vpntype=poes");
+ "/status_logs_vpn.php?vpntype=poes");
$tab_array[] = array(gettext("PPPoE Raw"),
(($vpntype == "poes") && ($mode == "raw")),
- "/diag_logs_vpn.php?vpntype=poes&amp;mode=raw");
+ "/status_logs_vpn.php?vpntype=poes&amp;mode=raw");
$tab_array[] = array(gettext("L2TP Logins"),
(($vpntype == "l2tp") && ($mode != "raw")),
- "/diag_logs_vpn.php?vpntype=l2tp");
+ "/status_logs_vpn.php?vpntype=l2tp");
$tab_array[] = array(gettext("L2TP Raw"),
(($vpntype == "l2tp") && ($mode == "raw")),
- "/diag_logs_vpn.php?vpntype=l2tp&amp;mode=raw");
+ "/status_logs_vpn.php?vpntype=l2tp&amp;mode=raw");
display_top_tabs($tab_array, false, 'nav nav-tabs');
?>
@@ -201,32 +193,33 @@ display_top_tabs($tab_array, false, 'nav nav-tabs');
<?php
$rows = dump_clog_vpn("/var/log/vpn.log", $nentries); // dump_clog_vpn provides all the need <td></td>/<tr></tr> tags
?>
- </tbody>
- </table>
+ </tbody>
+ </table>
<?php
- if ($rows == 0)
+ if ($rows == 0) {
print_info_box('No logs to display');
+ }
?>
</div>
<?php
- }
- else {
+ } else {
?>
<pre>
<?php
- if (dump_clog_no_table("/var/log/{$logname}.log", $nentries) == 0)
+ if (dump_clog_no_table("/var/log/{$logname}.log", $nentries) == 0) {
print('No logs to display');
+ }
?>
</pre>
<?php
}
?>
+ <form action="status_logs_vpn.php" method="post">
+ <input type="hidden" name="vpntype" id="vpntype" value="<?=$vpntype?>" />
+ <input type="hidden" name="mode" id="mode" value="<?=$mode?>" />
+ <input name="clear" type="submit" class="btn btn-danger" value="<?=gettext("Clear log")?>" />
+ </form>
<p>
- <form action="diag_logs_vpn.php" method="post">
- <input type="hidden" name="vpntype" id="vpntype" value="<?=$vpntype?>" />
- <input type="hidden" name="mode" id="mode" value="<?=$mode?>" />
- <input name="clear" type="submit" class="btn btn-danger" value="<?=gettext("Clear log")?>" />
- </form>
</p>
</div>
</div>
diff --git a/src/usr/local/www/status_ntpd.php b/src/usr/local/www/status_ntpd.php
index bf00ced..2f07e4a 100644
--- a/src/usr/local/www/status_ntpd.php
+++ b/src/usr/local/www/status_ntpd.php
@@ -1,43 +1,65 @@
<?php
-/* $Id$ */
/*
status_ntpd.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2013 Dagorlad
- Copyright (C) 2012 Jim Pingle
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/sbin/ntpd /usr/local/sbin/ntpq
- pfSense_MODULE: ntpd
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2013 Dagorlad
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-ntp
-##|*NAME=Status: NTP page
+##|*NAME=Status: NTP
##|*DESCR=Allow access to the 'Status: NTP' page.
##|*MATCH=status_ntpd.php*
##|-PRIV
@@ -170,7 +192,7 @@ include("head.inc");
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title">Network Time Protocol Status</h2></div>
<div class="panel-body">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Status"); ?></th>
@@ -301,4 +323,4 @@ if (($gps_ok) && ($gps_lat) && ($gps_lon)):
<?php endif;
-include("foot.inc"); ?> \ No newline at end of file
+include("foot.inc"); ?>
diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php
index b11eb5e..bc7e266 100644
--- a/src/usr/local/www/status_openvpn.php
+++ b/src/usr/local/www/status_openvpn.php
@@ -1,44 +1,62 @@
<?php
/*
status_openvpn.php
-
- Copyright (C) 2005 Scott Ullrich, Colin Smith
- Copyright (C) 2008 Shrew Soft Inc.
- Copyright (C) 2010 Jim Pingle
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- AJAX bits borrowed from diag_dump_states.php
-
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: openvpn
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-openvpn
-##|*NAME=Status: OpenVPN page
+##|*NAME=Status: OpenVPN
##|*DESCR=Allow access to the 'Status: OpenVPN' page.
##|*MATCH=status_openvpn.php*
##|-PRIV
@@ -52,12 +70,12 @@ require_once("shortcuts.inc");
require_once("service-utils.inc");
/* Handle AJAX */
-if($_GET['action']) {
- if($_GET['action'] == "kill") {
+if ($_GET['action']) {
+ if ($_GET['action'] == "kill") {
$port = $_GET['port'];
$remipp = $_GET['remipp'];
if (!empty($port) and !empty($remipp)) {
- $retval = kill_client($port, $remipp);
+ $retval = openvpn_kill_client($port, $remipp);
echo htmlentities("|{$port}|{$remipp}|{$retval}|");
} else {
echo gettext("invalid input");
@@ -66,43 +84,6 @@ if($_GET['action']) {
}
}
-
-function kill_client($port, $remipp) {
- global $g;
-
- //$tcpsrv = "tcp://127.0.0.1:{$port}";
- $tcpsrv = "unix://{$g['varetc_path']}/openvpn/{$port}.sock";
- $errval = null;
- $errstr = null;
-
- /* open a tcp connection to the management port of each server */
- $fp = @stream_socket_client($tcpsrv, $errval, $errstr, 1);
- $killed = -1;
- if ($fp) {
- stream_set_timeout($fp, 1);
- fputs($fp, "kill {$remipp}\n");
- while (!feof($fp)) {
- $line = fgets($fp, 1024);
-
- $info = stream_get_meta_data($fp);
- if ($info['timed_out']) {
- break;
- }
-
- /* parse header list line */
- if (strpos($line, "INFO:") !== false) {
- continue;
- }
- if (strpos($line, "SUCCESS") !== false) {
- $killed = 0;
- }
- break;
- }
- fclose($fp);
- }
- return $killed;
-}
-
$servers = openvpn_get_active_servers();
$sk_servers = openvpn_get_active_servers("p2p");
$clients = openvpn_get_active_clients();
@@ -131,7 +112,7 @@ include("head.inc"); ?>
function killComplete(req) {
var values = req.responseText.split("|");
- if(values[3] != "0") {
+ if (values[3] != "0") {
alert('<?=gettext("An error occurred.");?>' + ' (' + values[3] + ')');
return;
}
@@ -151,7 +132,7 @@ include("head.inc"); ?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=htmlspecialchars($server['name']);?> <?=gettext('Client connections')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Common Name")?></th>
@@ -160,10 +141,11 @@ include("head.inc"); ?>
<th><?=gettext("Connected Since"); ?></th>
<th><?=gettext("Bytes Sent")?></th>
<th><?=gettext("Bytes Received")?></th>
+ <th><!-- Icons --></th>
</tr>
</thead>
<tbody>
-
+
<?php
foreach ($server['conns'] as $conn):
?>
@@ -179,7 +161,7 @@ include("head.inc"); ?>
onclick="killClient('<?php echo $server['mgmt']; ?>', '<?php echo $conn['remote_host']; ?>');" style="cursor:pointer;"
id="<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>"
title="<?php echo gettext("Kill client connection from") . " " . $conn['remote_host']; ?>">
- <i class="icon icon-remove"></i>
+ <i class="fa fa-times"></i>
</a>
</td>
</tr>
@@ -189,7 +171,7 @@ include("head.inc"); ?>
</tbody>
<tfoot>
<tr>
- <td>
+ <td colspan="2">
<table>
<tr>
<td>
@@ -200,6 +182,8 @@ include("head.inc"); ?>
</tr>
</table>
</td>
+ <td colspan="5">
+ </td>
</tr>
</tfoot>
</table>
@@ -212,10 +196,10 @@ include("head.inc"); ?>
<input type="button" onClick="show_routes('tabroute-<?= $i ?>','shroutebut-<?= $i ?>')" value="<?php echo gettext("Show Routing Table"); ?>" /> - <?= gettext("Display OpenVPN's internal routing table for this server.") ?>
<br /><br />
</div>
-<div class="panel panel-default">
+<div class="panel panel-default" id="tabroute-<?=$i?>" style="display: none;">
<div class="panel-heading"><h2 class="panel-title"><?=htmlspecialchars($server['name']);?> <?=gettext("Routing Table"); ?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Common Name"); ?></th>
@@ -223,7 +207,7 @@ include("head.inc"); ?>
<th><?=gettext("Target Network"); ?></th>
<th><?=gettext("Last Used"); ?></th>
</tr>
- </thead>
+ </thead>
<tbody>
<?php
@@ -241,7 +225,7 @@ include("head.inc"); ?>
</tbody>
<tfoot>
<tr>
- <td><?= gettext("An IP address followed by C indicates a host currently connected through the VPN.") ?></td>
+ <td colspan="4"><?= gettext("An IP address followed by C indicates a host currently connected through the VPN.") ?></td>
</tr>
</tfoot>
</table>
@@ -263,10 +247,11 @@ include("head.inc"); ?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Peer to Peer Server Instance Statistics"); ?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
- <tr>
+ <tr>
<th><?=gettext("Name"); ?></th>
+ <th><?=gettext("Status"); ?></th>
<th><?=gettext("Connected Since"); ?></th>
<th><?=gettext("Virtual Addr"); ?></th>
<th><?=gettext("Remote Host"); ?></th>
@@ -318,9 +303,9 @@ include("head.inc"); ?>
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Client Instance Statistics"); ?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
- <tr>
+ <tr>
<th><?=gettext("Name"); ?></th>
<th><?=gettext("Status"); ?></th>
<th><?=gettext("Connected Since"); ?></th>
@@ -362,9 +347,9 @@ include("head.inc"); ?>
</tbody>
</table>
</div>
-</div>
+ </div>
-<?php
+<?php
}
if ($DisplayNote) {
@@ -376,15 +361,17 @@ if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) {
}
?>
</form>
-<?php include("fend.inc"); ?>
+
+<?php include("foot.inc"); ?>
+
<script type="text/javascript">
//<![CDATA[
+
function show_routes(id, buttonid) {
document.getElementById(buttonid).innerHTML='';
aodiv = document.getElementById(id);
aodiv.style.display = "block";
}
+
//]]>
</script>
-</body>
-</html>
diff --git a/src/usr/local/www/diag_pkglogs.php b/src/usr/local/www/status_pkglogs.php
index 4bafa87..991a56a 100755
--- a/src/usr/local/www/diag_pkglogs.php
+++ b/src/usr/local/www/status_pkglogs.php
@@ -1,15 +1,13 @@
<?php
/*
- $Id$
-
- diag_pkglogs.php
+ status_pkglogs.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
* Copyright (c) 2005 Colin Smith
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -17,12 +15,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -66,16 +64,11 @@
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/netstat
- pfSense_MODULE: pkgs
-*/
-
##|+PRIV
##|*IDENT=page-status-packagelogs
-##|*NAME=Status: Package logs page
+##|*NAME=Status: Package logs
##|*DESCR=Allow access to the 'Status: Package logs' page.
-##|*MATCH=diag_pkglogs.php*
+##|*MATCH=status_pkglogs.php*
##|-PRIV
require("guiconfig.inc");
@@ -117,14 +110,15 @@ if ($pkgwithlogging == false) {
$tab_array = array();
foreach ($config['installedpackages']['package'] as $package) {
if (is_array($package['logging'])) {
- if (!($logtab = $package['logging']['logtab']))
+ if (!($logtab = $package['logging']['logtab'])) {
$logtab = $package['name'];
+ }
if ($apkg == $package['name']) {
$curtab = $logtab;
- $tab_array[] = array(sprintf(gettext("%s"), $logtab), true, "diag_pkglogs.php?pkg=".$package['name']);
+ $tab_array[] = array(sprintf(gettext("%s"), $logtab), true, "status_pkglogs.php?pkg=".$package['name']);
} else {
- $tab_array[] = array(sprintf(gettext("%s"), $logtab), false, "diag_pkglogs.php?pkg=".$package['name']);
+ $tab_array[] = array(sprintf(gettext("%s"), $logtab), false, "status_pkglogs.php?pkg=".$package['name']);
}
}
}
@@ -145,4 +139,4 @@ if ($pkgwithlogging == false) {
<?php }
-include("foot.inc"); ?> \ No newline at end of file
+include("foot.inc"); ?>
diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php
index 022cd59..c67cf93 100644
--- a/src/usr/local/www/status_queues.php
+++ b/src/usr/local/www/status_queues.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
status_queues.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/pfctl
- pfSense_MODULE: shaper
-*/
##|+PRIV
##|*IDENT=page-status-trafficshaper-queues
-##|*NAME=Status: Traffic shaper: Queues page
+##|*NAME=Status: Traffic shaper: Queues
##|*DESCR=Allow access to the 'Status: Traffic shaper: Queues' page.
##|*MATCH=status_queues.php*
##|-PRIV
@@ -152,7 +146,6 @@ $pgtitle = array(gettext("Status"), gettext("Traffic shaper"), gettext("Queues")
$shortcut_section = "trafficshaper";
include("head.inc");
?>
-<body>
<script src="/jquery/jquery-1.11.2.min.js"></script>
<?php
if (!is_array($config['shaper']['queue']) || count($config['shaper']['queue']) < 1) {
@@ -224,7 +217,7 @@ else: ?>
?>
</div>
</div>
-</br>
+<br/>
<?php
@@ -268,38 +261,36 @@ function processQueues($altqstats, $level, $parent_name) {
}
}
if ($prev_if != $q['interface']) {
- echo "<tr><td><b>Interface ". htmlspecialchars(convert_real_interface_to_friendly_descr($q['interface'])) . "</b></td></tr>";
+ echo "<tr><td colspan=\"8\"><b>Interface " . htmlspecialchars(convert_real_interface_to_friendly_descr($q['interface'])) . "</b></td></tr>\n";
$prev_if = $q['interface'];
}
?>
<tr class="<?php echo $parent_name?>">
- <td bgcolor="#<?php echo $row_background?>" style="padding-left: <?php echo $level * 20?>px;">
- <font color="#000000">
- <?
- if (is_array($q['queue'])) {
- echo "<a href=\"#\" onclick=\"StatsShowHide('queuerow{$q['name']}{$q['interface']}');return false\">+/-</a> ";
- }
- if (strstr($q['name'], "root_")) {
- echo "<a href=\"firewall_shaper.php?interface={$if_name}&amp;queue={$if_name}&amp;action=show\">Root queue</a>";
- } else {
- echo "<a href=\"firewall_shaper.php?interface={$if_name}&amp;queue={$q['name']}&amp;action=show\">" . htmlspecialchars($q['name']) . "</a>";
- }
- ?>
- </font>
+ <td style="background-color:#<?php echo $row_background?>;padding-left:<?php echo $level * 20?>px;">
+ <?php
+ if (is_array($q['queue'])) {
+ echo "<a href=\"#\" onclick=\"StatsShowHide('queuerow{$q['name']}{$q['interface']}');return false\">+/-</a>";
+ }
+ if (strstr($q['name'], "root_")) {
+ echo "<a href=\"firewall_shaper.php?interface={$if_name}&amp;queue={$if_name}&amp;action=show\">Root queue</a>";
+ } else {
+ echo "<a href=\"firewall_shaper.php?interface={$if_name}&amp;queue={$q['name']}&amp;action=show\">" . htmlspecialchars($q['name']) . "</a>";
+ }
+ ?>
</td>
<?php
$cpuUsage = 0;
- echo "<td bgcolor=\"#{$row_background}\">";
- echo "<div class='progress' style='height: 7px;width: 170px;'>
- <div class='progress-bar' role='progressbar' name='queue{$q['name']}{$q['interface']}width' id='queue{$q['name']}{$q['interface']}width' aria-valuenow='70' aria-valuemin='0' aria-valuemax='100' style='width: ". ($cpuUsage*100) ."%;'></div>
+ echo "<td style=\"background-color:#{$row_background}\" >";
+ echo "<div class=\"progress\" style=\"height: 7px;width: 170px;\">
+ <div class=\"progress-bar\" role=\"progressbar\" id=\"queue{$q['name']}{$q['interface']}width\" aria-valuenow=\"70\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: " . ($cpuUsage*100) . "%;\"></div>
</div>";
- echo " </td>";
- echo "<td bgcolor=\"#{$row_background}\"><input style='border: 0px solid white; background-color:#{$row_background}; color:#000000;width:70px;text-align:right;' size='10' name='queue{$q['name']}{$q['interface']}pps' id='queue{$q['name']}{$q['interface']}pps' value='(" . gettext("Loading") . ")' align='left' /></td>";
- echo "<td bgcolor=\"#{$row_background}\"><input style='border: 0px solid white; background-color:#{$row_background}; color:#000000;width:80px;text-align:right;' size='10' name='queue{$q['name']}{$q['interface']}bps' id='queue{$q['name']}{$q['interface']}bps' value='' align='right' /></td>";
- echo "<td bgcolor=\"#{$row_background}\"><input style='border: 0px solid white; background-color:#{$row_background}; color:#000000;width:70px;text-align:right;' size='10' name='queue{$q['name']}{$q['interface']}borrows' id='queue{$q['name']}{$q['interface']}borrows' value='' align='right' /></td>";
- echo "<td bgcolor=\"#{$row_background}\"><input style='border: 0px solid white; background-color:#{$row_background}; color:#000000;width:70px;text-align:right;' size='10' name='queue{$q['name']}{$q['interface']}suspends' id='queue{$q['name']}{$q['interface']}suspends' value='' align='right' /></td>";
- echo "<td bgcolor=\"#{$row_background}\"><input style='border: 0px solid white; background-color:#{$row_background}; color:#000000;width:70px;text-align:right;' size='10' name='queue{$q['name']}{$q['interface']}drops' id='queue{$q['name']}{$q['interface']}drops' value='' align='right' /></td>";
- echo "<td bgcolor=\"#{$row_background}\"><input style='border: 0px solid white; background-color:#{$row_background}; color:#000000;width:70px;text-align:right;' size='10' name='queue{$q['name']}{$q['interface']}length' id='queue{$q['name']}{$q['interface']}length' value='' align='right' /></td>";
+ echo "</td>";
+ echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}pps\" id=\"queue{$q['name']}{$q['interface']}pps\" value=\"(" . gettext("Loading") . ")\" /></td>";
+ echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:80px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}bps\" id=\"queue{$q['name']}{$q['interface']}bps\" value=\"\" /></td>";
+ echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}borrows\" id=\"queue{$q['name']}{$q['interface']}borrows\" value=\"\" /></td>";
+ echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}suspends\" id=\"queue{$q['name']}{$q['interface']}suspends\" value=\"\" /></td>";
+ echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}drops\" id=\"queue{$q['name']}{$q['interface']}drops\" value=\"\" /></td>";
+ echo "<td style=\"background-color:#{$row_background}\"><input style=\"border:0;width:70px;text-align:right;\" size=\"10\" name=\"queue{$q['name']}{$q['interface']}length\" id=\"queue{$q['name']}{$q['interface']}length\" value=\"\" /></td>";
?>
</tr>
<?php
diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php
index da61f9b..11a45d0 100644
--- a/src/usr/local/www/status_rrd_graph.php
+++ b/src/usr/local/www/status_rrd_graph.php
@@ -1,42 +1,65 @@
<?php
-/* $Id$ */
/*
status_rrd_graph.php
- Part of pfSense
- Copyright (C) 2007 Seth Mos <seth.mos@dds.nl>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: system
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Seth Mos <seth.mos@dds.nl>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-rrdgraphs
-##|*NAME=Status: RRD Graphs page
+##|*NAME=Status: RRD Graphs
##|*DESCR=Allow access to the 'Status: RRD Graphs' page.
##|*MATCH=status_rrd_graph.php*
+##|*MATCH=status_rrd_graph_img.php*
##|-PRIV
require("guiconfig.inc");
@@ -45,7 +68,6 @@ require("shaper.inc");
require_once("rrd.inc");
unset($input_errors);
-
/* if the rrd graphs are not enabled redirect to settings page */
if (!isset($config['rrd']['enable'])) {
header("Location: status_rrd_graph_settings.php");
@@ -71,10 +93,11 @@ if ($_POST['cat']) {
$curcat = htmlspecialchars($_POST['cat']);
}
-if ($_GET['zone'])
+if ($_GET['zone']) {
$curzone = $_GET['zone'];
-else
+} else {
$curzone = '';
+}
if ($_POST['period']) {
$curperiod = $_POST['period'];
@@ -89,7 +112,7 @@ if ($_POST['period']) {
if ($_POST['style']) {
$curstyle = $_POST['style'];
} else {
- if(! empty($config['rrd']['style'])) {
+ if (!empty($config['rrd']['style'])) {
$curstyle = $config['rrd']['style'];
} else {
$curstyle = "absolute";
@@ -99,7 +122,7 @@ if ($_POST['style']) {
if ($_POST['option']) {
$curoption = $_POST['option'];
} else {
- switch($curcat) {
+ switch ($curcat) {
case "system":
$curoption = "processor";
break;
@@ -145,6 +168,15 @@ if ($_POST['option']) {
continue 2;
}
}
+ case "dhcpd":
+ foreach ($databases as $database) {
+ if (preg_match("/[-]dhcpd\.rrd/i", $database)) {
+ /* pick off the 1st database we find that matches the dhcpd graph */
+ $name = explode("-", $database);
+ $curoption = "$name[0]";
+ continue 2;
+ }
+ }
case "captiveportal":
$curoption = "allgraphs";
break;
@@ -245,6 +277,10 @@ foreach ($databases as $database) {
if (stristr($database, "ntpd") && isset($config['ntpd']['statsgraph'])) {
$ntpd = true;
}
+ if (stristr($database, "-dhcpd") && is_array($config['dhcpd'])) {
+ $dhcpd = true;
+ }
+
}
/* append the existing array to the header */
$ui_databases = array_merge($dbheader, $databases);
@@ -261,9 +297,7 @@ $graph_length = array(
"year" => 31622400,
"fouryear" => 126230400);
-$pgtitle = array(gettext("Status"), gettext("RRD Graphs"));
-
-$closehead = false;
+$pgtitle = array(gettext("Status"), gettext("RRD Graphs"), gettext(ucfirst($curcat)." Graphs"));
/* Load all CP zones */
if ($captiveportal && is_array($config['captiveportal'])) {
@@ -387,7 +421,7 @@ function get_dates($curperiod, $graph) {
}
function make_tabs() {
- global $curcat;
+ global $curcat, $queues, $wireless, $cellular, $vpnusers, $captiveportal, $dhcpd, $ntpd;
$tab_array = array();
$tab_array[] = array(gettext("System"), ($curcat == "system"), "status_rrd_graph.php?cat=system");
@@ -395,29 +429,34 @@ function make_tabs() {
$tab_array[] = array(gettext("Packets"), ($curcat == "packets"), "status_rrd_graph.php?cat=packets");
$tab_array[] = array(gettext("Quality"), ($curcat == "quality"), "status_rrd_graph.php?cat=quality");
- if($queues) {
+
+ if ($queues) {
$tab_array[] = array(gettext("Queues"), ($curcat == "queues"), "status_rrd_graph.php?cat=queues");
$tab_array[] = array(gettext("QueueDrops"), ($curcat == "queuedrops"), "status_rrd_graph.php?cat=queuedrops");
}
- if($wireless) {
+ if ($wireless) {
$tab_array[] = array(gettext("Wireless"), ($curcat == "wireless"), "status_rrd_graph.php?cat=wireless");
}
- if($cellular) {
+ if ($cellular) {
$tab_array[] = array(gettext("Cellular"), ($curcat == "cellular"), "status_rrd_graph.php?cat=cellular");
}
- if($vpnusers) {
+ if ($vpnusers) {
$tab_array[] = array(gettext("VPN"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers");
}
- if($captiveportal) {
+ if ($captiveportal) {
$tab_array[] = array(gettext("Captive Portal"), ($curcat == "captiveportal"), "status_rrd_graph.php?cat=captiveportal");
}
- if(isset($config['ntpd']['statsgraph'])) {
- $tab_array[] = array("NTP", ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd");
+ if ($ntpd) {
+ $tab_array[] = array("NTPD", ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd");
+ }
+
+ if ($dhcpd) {
+ $tab_array[] = array(gettext("DHCP Server"), ($curcat == "dhcpd"), "status_rrd_graph.php?cat=dhcpd");
}
$tab_array[] = array(gettext("Custom"), ($curcat == "custom"), "status_rrd_graph.php?cat=custom");
@@ -432,7 +471,7 @@ function build_options() {
$optionslist = array();
- if($curcat == "custom") {
+ if ($curcat == "custom") {
foreach ($custom_databases as $db => $database) {
$optionc = explode("-", $database);
$friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc[0]));
@@ -448,17 +487,19 @@ function build_options() {
}
foreach ($ui_databases as $db => $database) {
- if(! preg_match("/($curcat)/i", $database))
+ if (!preg_match("/($curcat)/i", $database)) {
continue;
+ }
- if (($curcat == "captiveportal") && !empty($curzone) && !preg_match("/captiveportal-{$curzone}/i", $database))
+ if (($curcat == "captiveportal") && !empty($curzone) && !preg_match("/captiveportal-{$curzone}/i", $database)) {
continue;
+ }
$optionc = explode("-", $database);
$search = array("-", ".rrd", $optionc);
$replace = array(" :: ", "", $friendly);
- switch($curcat) {
+ switch ($curcat) {
case "captiveportal":
$optionc = str_replace($search, $replace, $optionc[2]);
$prettyprint = ucwords(str_replace($search, $replace, $optionc));
@@ -473,7 +514,7 @@ function build_options() {
/* Deduce an interface if possible and use the description */
$optionc = "$optionc[0]";
$friendly = convert_friendly_interface_to_friendly_descr(strtolower($optionc));
- if(empty($friendly)) {
+ if (empty($friendly)) {
$friendly = $optionc;
}
$search = array("-", ".rrd", $optionc);
@@ -490,10 +531,9 @@ include("head.inc");
display_top_tabs(make_tabs());
-if ($input_errors && count($input_errors))
+if ($input_errors && count($input_errors)) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form(false);
@@ -522,12 +562,13 @@ $group->add(new Form_Select(
$periods
))->setHelp('Period');
-if($curcat == 'custom')
+if ($curcat == 'custom') {
$group->setHelp('Any changes to these option may not take affect until the next auto-refresh.');
+}
$section->add($group);
-if($curcat == 'custom') {
+if ($curcat == 'custom') {
$section->addInput(new Form_Input(
'cat',
null,
@@ -556,8 +597,9 @@ if($curcat == 'custom') {
$end_fmt
))->setHelp('End');
- if($curcat != 'custom')
+ if ($curcat != 'custom') {
$group->setHelp('Any changes to these option may not take affect until the next auto-refresh');
+ }
$section->add($group);
@@ -566,12 +608,12 @@ if($curcat == 'custom') {
$curdatabase = $curoption;
$graph = "custom-$curdatabase";
- if(in_array($curdatabase, $custom_databases)) {
+ if (in_array($curdatabase, $custom_databases)) {
$id = "{$graph}-{$curoption}-{$curdatabase}";
$id = preg_replace('/\./', '_', $id);
?>
<div class="panel panel-default">
- <img align="center" name="<?=$id?>" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end={<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
+ <img align="center" name="<?=$id?>" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end=<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
</div>
<?php
@@ -580,33 +622,36 @@ if($curcat == 'custom') {
$form->add($section);
print($form);
- foreach($graphs as $graph) {
+ foreach ($graphs as $graph) {
/* check which databases are valid for our category */
- foreach($ui_databases as $curdatabase) {
- if(! preg_match("/($curcat)/i", $curdatabase))
+ foreach ($ui_databases as $curdatabase) {
+ if (!preg_match("/($curcat)/i", $curdatabase)) {
continue;
+ }
- if (($curcat == "captiveportal") && !empty($curzone) && !preg_match("/captiveportal-{$curzone}/i", $curdatabase))
+ if (($curcat == "captiveportal") && !empty($curzone) && !preg_match("/captiveportal-{$curzone}/i", $curdatabase)) {
continue;
+ }
$optionc = explode("-", $curdatabase);
$search = array("-", ".rrd", $optionc);
$replace = array(" :: ", "", $friendly);
- switch($curoption) {
+ switch ($curoption) {
case "outbound":
/* make sure we do not show the placeholder databases in the outbound view */
- if((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
+ if ((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
continue 2;
}
/* only show interfaces with a gateway */
$optionc = "$optionc[0]";
- if(!interface_has_gateway($optionc)) {
- if(!isset($gateways_arr)) {
- if(preg_match("/quality/i", $curdatabase))
+ if (!interface_has_gateway($optionc)) {
+ if (!isset($gateways_arr)) {
+ if (preg_match("/quality/i", $curdatabase)) {
$gateways_arr = return_gateways_array();
- else
+ } else {
$gateways_arr = array();
+ }
}
$found_gateway = false;
foreach ($gateways_arr as $gw) {
@@ -615,29 +660,29 @@ if($curcat == 'custom') {
break;
}
}
- if(!$found_gateway) {
+ if (!$found_gateway) {
continue 2;
}
}
- if(! preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
continue 2;
}
break;
case "allgraphs":
/* make sure we do not show the placeholder databases in the all view */
- if((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
+ if ((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
continue 2;
}
break;
default:
/* just use the name here */
- if(! preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
continue 2;
}
}
- if(in_array($curdatabase, $ui_databases)) {
+ if (in_array($curdatabase, $ui_databases)) {
$id = "{$graph}-{$curoption}-{$curdatabase}";
$id = preg_replace('/\./', '_', $id);
@@ -646,7 +691,7 @@ if($curcat == 'custom') {
$end = $dates['end'];
?>
<div class="panel panel-default" align="center">
- <img name="<?=$id?>" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end={<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
+ <img name="<?=$id?>" id="<?=$id?>" alt="<?=$prettydb?> Graph" src="status_rrd_graph_img.php?start=<?=$start?>&amp;end=<?=$end?>&amp;database=<?=$curdatabase?>&amp;style=<?=$curstyle?>&amp;graph=<?=$graph?>" />
</div>
<?php
}
@@ -662,29 +707,31 @@ if($curcat == 'custom') {
//alert('updating');
var randomid = Math.floor(Math.random()*11);
<?php
- foreach($graphs as $graph) {
+ foreach ($graphs as $graph) {
/* check which databases are valid for our category */
- foreach($ui_databases as $curdatabase) {
- if(! stristr($curdatabase, $curcat)) {
+ foreach ($ui_databases as $curdatabase) {
+ if (!stristr($curdatabase, $curcat)) {
continue;
}
$optionc = explode("-", $curdatabase);
$search = array("-", ".rrd", $optionc);
$replace = array(" :: ", "", $friendly);
- switch($curoption) {
+ switch ($curoption) {
case "outbound":
/* make sure we do not show the placeholder databases in the outbound view */
- if((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
+ if ((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
continue 2;
}
/* only show interfaces with a gateway */
$optionc = "$optionc[0]";
- if(!interface_has_gateway($optionc)) {
- if(!isset($gateways_arr))
- if(preg_match("/quality/i", $curdatabase))
+ if (!interface_has_gateway($optionc)) {
+ if (!isset($gateways_arr)) {
+ if (preg_match("/quality/i", $curdatabase)) {
$gateways_arr = return_gateways_array();
- else
+ } else {
$gateways_arr = array();
+ }
+ }
$found_gateway = false;
foreach ($gateways_arr as $gw) {
if ($gw['name'] == $optionc) {
@@ -692,29 +739,29 @@ if($curcat == 'custom') {
break;
}
}
- if(!$found_gateway) {
+ if (!$found_gateway) {
continue 2;
}
}
- if(! preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$optionc-|-$optionc\\.)/i", $curdatabase)) {
continue 2;
}
break;
case "allgraphs":
/* make sure we do not show the placeholder databases in the all view */
- if((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
+ if ((stristr($curdatabase, "outbound")) || (stristr($curdatabase, "allgraphs"))) {
continue 2;
}
break;
default:
/* just use the name here */
- if(! preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
+ if (!preg_match("/(^$curoption-|-$curoption\\.)/i", $curdatabase)) {
continue 2;
}
}
$dates = get_dates($curperiod, $graph);
$start = $dates['start'];
- if($curperiod == "current") {
+ if ($curperiod == "current") {
$end = $dates['end'];
}
/* generate update events utilizing jQuery('') feature */
@@ -734,12 +781,12 @@ if($curcat == 'custom') {
<script>
//<![CDATA[
-events.push(function(){
- $('#option, #style, #period').on('change', function(){
+events.push(function() {
+ $('#option, #style, #period').on('change', function() {
$(this).parents('form').submit();
});
});
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/status_rrd_graph_img.php b/src/usr/local/www/status_rrd_graph_img.php
index 13faf49..9d203c3 100644
--- a/src/usr/local/www/status_rrd_graph_img.php
+++ b/src/usr/local/www/status_rrd_graph_img.php
@@ -5,7 +5,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2009 Seth Mos <seth.mos@dds.nl>
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,10 +54,6 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/rm /usr/local/bin/rrdtool
- pfSense_MODULE: system
-*/
require_once("globals.inc");
require_once("guiconfig.inc");
@@ -227,8 +222,7 @@ if ($altq_list_queues[$curif]) {
$speedlimit = ($upstream + $downstream);
-/* Set default colors explicitly, the theme can then override them below.
- This prevents missing colors in themes from crashing the graphs. */
+/* Set default colors explicitly.*/
/* Traffic Outbound Out-P-4, Out-B-4, Out-P-6, Out-B-6 */
$colortrafficup = array('666666', 'CCCCCC', '2217AA', '625AE7');
@@ -287,16 +281,7 @@ $colorntpd = array('0080FF', '00E344', 'FF0000', '000000');
/* Captive Portal Concurrent Concurrent Users */
$colorcaptiveportalusers = array('990000');
-/* select theme colors if the include file exists
- Note: Themes are no longer used in pfSense 2.3.x so don't try this any more
-
-$rrdcolors = "{$g['www_path']}/themes/{$g['theme']}/rrdcolors.inc.php";
-if (file_exists($rrdcolors)) {
- include($rrdcolors);
-} else {
- log_error(sprintf(gettext("rrdcolors.inc.php for theme %s does not exist, using defaults!"), $g['theme']));
-}
-*/
+$colordhcpd = array('990000', '0000FF', '000000');
switch ($curstyle) {
case "absolute":
@@ -1247,9 +1232,41 @@ if ((strstr($curdatabase, "-traffic.rrd")) && (file_exists("$rrddbpath$curdataba
$graphcmd .= "GPRINT:\"wander:LAST:%7.2lf %S \" ";
$graphcmd .= "COMMENT:\"\\n\" ";
$graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" ";
+} elseif ((strstr($curdatabase, "-dhcpd.rrd")) && (file_exists("$rrddbpath$curdatabase"))) {
+ /* define graphcmd for dhcpd stats */
+ $graphcmd = "$rrdtool graph $rrdtmppath$curdatabase-$curgraph.png ";
+ $graphcmd .= "--start $start --end $end --step $step ";
+ $graphcmd .= "--vertical-label \"DHCP Leases\" ";
+ $graphcmd .= "--color SHADEA#eeeeee --color SHADEB#eeeeee ";
+ $graphcmd .= "--title \"" . php_uname('n') . " - {$prettydb} - {$hperiod} - {$havg} average\" ";
+ $graphcmd .= "--height 200 --width 620 ";
+ $graphcmd .= "DEF:\"$curif-leases=$rrddbpath$curdatabase:leases:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-staticleases=$rrddbpath$curdatabase:staticleases:AVERAGE:step=$step\" ";
+ $graphcmd .= "DEF:\"$curif-dhcprange=$rrddbpath$curdatabase:dhcprange:AVERAGE:step=$step\" ";
+ $graphcmd .= "AREA:\"$curif-leases#{$colordhcpd[0]}:Active Leases\" ";
+ $graphcmd .= "LINE2:\"$curif-staticleases#{$colordhcpd[1]}:Static Leases\" ";
+ $graphcmd .= "LINE1:\"$curif-dhcprange#{$colordhcpd[2]}:DHCP Range\" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t\t current\t\t average\t\tmaximum\\n\" ";
+ $graphcmd .= "COMMENT:\"Active Leases\t\" ";
+ $graphcmd .= "GPRINT:\"$curif-leases:LAST:%8.0lf \" ";
+ $graphcmd .= "GPRINT:\"$curif-leases:AVERAGE:%8.0lf \" ";
+ $graphcmd .= "GPRINT:\"$curif-leases:MAX:%8.0lf \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"Static Leases\t\" ";
+ $graphcmd .= "GPRINT:\"$curif-staticleases:LAST:%8.0lf \" ";
+ $graphcmd .= "GPRINT:\"$curif-staticleases:AVERAGE:%8.0lf \" ";
+ $graphcmd .= "GPRINT:\"$curif-staticleases:MAX:%8.0lf \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"DHCP Range\t\t\" ";
+ $graphcmd .= "GPRINT:\"$curif-dhcprange:LAST:%8.0lf \" ";
+ $graphcmd .= "GPRINT:\"$curif-dhcprange:AVERAGE:%8.0lf \" ";
+ $graphcmd .= "GPRINT:\"$curif-dhcprange:MAX:%8.0lf \" ";
+ $graphcmd .= "COMMENT:\"\\n\" ";
+ $graphcmd .= "COMMENT:\"\t\t\t\t\t\t\t\t\t\t\t\t\t" . strftime('%b %d %H\:%M\:%S %Y') . "\" ";
} else {
$data = false;
- log_error(sprintf(gettext("Sorry we do not have data to graph for %s"),$curdatabase));
+ log_error(sprintf(gettext("Sorry we do not have data to graph for %s"), $curdatabase));
}
/* check modification time to see if we need to generate image */
@@ -1291,8 +1308,8 @@ if (($graphcmdreturn <> 0) || (!$data)) {
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, no-store, must-revalidate");
header("Pragma: no-cache");
- $file= "/usr/local/www/themes/{$g['theme']}/images/misc/rrd_error.png";
- readfile($file);
+ $input_errors[] = gettext("There has been an error in rendering the graph. Please check your system logs.");
+ print_input_errors($input_errors);
} else {
$file = "$rrdtmppath$curdatabase-$curgraph.png";
if (file_exists("$file")) {
diff --git a/src/usr/local/www/status_rrd_graph_settings.php b/src/usr/local/www/status_rrd_graph_settings.php
index f43c3f5..7262c98 100644
--- a/src/usr/local/www/status_rrd_graph_settings.php
+++ b/src/usr/local/www/status_rrd_graph_settings.php
@@ -1,12 +1,10 @@
<?php
-/* $Id$ */
/*
status_rrd_graph_settings.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2007 Seth Mos <seth.mos@dds.nl>
+ * Copyright (c) 2007 Seth Mos <seth.mos@dds.nl>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -55,15 +53,11 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/find
- pfSense_MODULE: system
-*/
##|+PRIV
##|*IDENT=page-status-rrdgraph-settings
-##|*NAME=Status: RRD Graphs settings page
-##|*DESCR=Allow access to the 'Status: RRD Graphs: settings' page.
+##|*NAME=Status: RRD Graphs: Settings
+##|*DESCR=Allow access to the 'Status: RRD Graphs: Settings' page.
##|*MATCH=status_rrd_graph_settings.php*
##|-PRIV
@@ -98,7 +92,6 @@ $periods = array("absolute" => gettext("Absolute Timespans"),
if ($_POST['ResetRRD']) {
mwexec('/bin/rm /var/db/rrd/*');
enable_rrd_graphing();
- setup_gateways_monitor();
$savemsg = "RRD data has been cleared. New RRD files have been generated.";
} elseif ($_POST) {
unset($input_errors);
@@ -139,9 +132,15 @@ foreach ($databases as $database) {
if (stristr($database, "captiveportal-") && is_array($config['captiveportal'])) {
$captiveportal = true;
}
+ if (stristr($database, "ntpd") && isset($config['ntpd']['statsgraph'])) {
+ $ntpd = true;
+ }
+ if (stristr($database, "-dhcpd") && is_array($config['dhcpd'])) {
+ $dhcpd = true;
+ }
}
-$pgtitle = array(gettext("Status"), gettext("RRD Graphs"));
+$pgtitle = array(gettext("Status"), gettext("RRD Graphs"), gettext("Settings"));
include("head.inc");
$tab_array[] = array(gettext("System"), ($curcat == "system"), "status_rrd_graph.php?cat=system");
@@ -149,38 +148,47 @@ $tab_array[] = array(gettext("Traffic"), ($curcat == "traffic"), "status_rrd_gra
$tab_array[] = array(gettext("Packets"), ($curcat == "packets"), "status_rrd_graph.php?cat=packets");
$tab_array[] = array(gettext("Quality"), ($curcat == "quality"), "status_rrd_graph.php?cat=quality");
-if($queues) {
+if ($queues) {
$tab_array[] = array(gettext("Queues"), ($curcat == "queues"), "status_rrd_graph.php?cat=queues");
$tab_array[] = array(gettext("QueueDrops"), ($curcat == "queuedrops"), "status_rrd_graph.php?cat=queuedrops");
}
-if($wireless)
+if ($wireless) {
$tab_array[] = array(gettext("Wireless"), ($curcat == "wireless"), "status_rrd_graph.php?cat=wireless");
+}
-if($cellular)
+if ($cellular) {
$tab_array[] = array(gettext("Cellular"), ($curcat == "cellular"), "status_rrd_graph.php?cat=cellular");
+}
-if($vpnusers)
+if ($vpnusers) {
$tab_array[] = array(gettext("VPN"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers");
+}
-if($captiveportal)
+if ($captiveportal) {
$tab_array[] = array(gettext("Captive Portal"), ($curcat == "captiveportal"), "status_rrd_graph.php?cat=captiveportal");
+}
+
+if ($ntpd) {
+ $tab_array[] = array(gettext("NTPD"), ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd");
+}
-if(isset($config['ntpd']['statsgraph']))
- $tab_array[] = array(gettext("NTP"), ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd");
+if ($dhcpd) {
+ $tab_array[] = array(gettext("DHCP Server"), ($curcat == "dhcpd"), "status_rrd_graph.php?cat=dhcpd");
+}
$tab_array[] = array(gettext("Custom"), ($curcat == "custom"), "status_rrd_graph.php?cat=custom");
$tab_array[] = array(gettext("Settings"), ($curcat == "settings"), "status_rrd_graph_settings.php");
display_top_tabs($tab_array);
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
-
-require_once('classes/Form.class.php');
+}
$form = new Form;
@@ -223,4 +231,4 @@ $form->addGlobal(new Form_Button(
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/status_services.php b/src/usr/local/www/status_services.php
index 49481a5..a944696 100755
--- a/src/usr/local/www/status_services.php
+++ b/src/usr/local/www/status_services.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -53,14 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /usr/local/sbin/openvpn /usr/bin/killall /bin/ps
- pfSense_MODULE: services
-*/
##|+PRIV
##|*IDENT=page-status-services
-##|*NAME=Status: Services page
+##|*NAME=Status: Services
##|*DESCR=Allow access to the 'Status: Services' page.
##|*MATCH=status_services.php*
##|-PRIV
@@ -71,8 +66,9 @@ require_once("shortcuts.inc");
// Leave GET enabled in case any other pages use it.
// ToDo: Check other pages and remove GET completely
-if(!$_GET && $_POST)
+if (!$_GET && $_POST) {
$_GET = $_POST;
+}
$service_name = '';
if (isset($_GET['service'])) {
@@ -104,8 +100,9 @@ if ($_GET['batch']) {
$pgtitle = array(gettext("Status"), gettext("Services"));
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$services = get_services();
@@ -123,7 +120,7 @@ if (count($services) > 0) {
<div class="panel-body panel-default">
<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Service")?></th>
@@ -137,9 +134,10 @@ if (count($services) > 0) {
uasort($services, "service_name_compare");
- foreach($services as $service) {
- if (empty($service['name']))
+ foreach ($services as $service) {
+ if (empty($service['name'])) {
continue;
+ }
if (empty($service['description'])) {
$service['description'] = get_pkg_descr($service['name']);
@@ -163,7 +161,7 @@ if (count($services) > 0) {
}
?>
<td>
- <?=$running ? '<font color="green">Running</font>':'<font color="red">Stopped</font>'?>
+ <?=$running ? '<span class="text-success">Running</span>':'<span class="text-danger">Stopped</span>'?>
</td>
<td>
<?=get_service_control_links($service)?>
@@ -192,9 +190,9 @@ if (count($services) > 0) {
print_info_box(gettext("No services found"), 'danger');
}
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// If a restart button is clicked, populate the hidden inputs and submit the form (via POST)
$('[id^=restartservice-]').click(function(event) {
$('#mode').val('restartservice');
diff --git a/src/usr/local/www/status_upnp.php b/src/usr/local/www/status_upnp.php
index abf53dc..bab17eb 100644
--- a/src/usr/local/www/status_upnp.php
+++ b/src/usr/local/www/status_upnp.php
@@ -1,42 +1,62 @@
<?php
-/* $Id$ */
/*
status_upnp.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /sbin/pfctl
- pfSense_MODULE: upnp
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-status-upnpstatus
-##|*NAME=Status: UPnP Status page
+##|*NAME=Status: UPnP Status
##|*DESCR=Allow access to the 'Status: UPnP Status' page.
##|*MATCH=status_upnp.php*
##|-PRIV
@@ -53,16 +73,18 @@ if ($_POST) {
$rdr_entries = array();
exec("/sbin/pfctl -aminiupnpd -sn", $rdr_entries, $pf_ret);
-$pgtitle = array(gettext("Status"),gettext("UPnP &amp; NAT-PMP Status"));
+$pgtitle = array(gettext("Status"), gettext("UPnP &amp; NAT-PMP"));
$shortcut_section = "upnp";
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if(!$config['installedpackages'] || !$config['installedpackages']['miniupnpd']['config'][0]['iface_array'] ||
- !$config['installedpackages']['miniupnpd']['config'][0]['enable']) {
+if (!$config['installedpackages'] ||
+ !$config['installedpackages']['miniupnpd']['config'][0]['iface_array'] ||
+ !$config['installedpackages']['miniupnpd']['config'][0]['enable']) {
print_info_box('UPnP is currently disabled.', 'danger');
include("foot.inc");
@@ -73,7 +95,7 @@ if(!$config['installedpackages'] || !$config['installedpackages']['miniupnpd']['
<div class="panel-body panel-default">
<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Port")?></th>
@@ -123,10 +145,13 @@ foreach ($rdr_entries as $rdr_entry) {
</div>
<form action="status_upnp.php" method="post">
<nav class="action-buttons">
- <input class="btn btn-danger" type="submit" name="clear" id="clear" value="<?=gettext("Clear all sessions")?>" />
+ <button class="btn btn-danger btn-sm" type="submit" name="clear" id="clear" value="<?=gettext("Clear all sessions")?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Clear all sessions")?>
+ </button>
</nav>
</form>
</div>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/status_wireless.php b/src/usr/local/www/status_wireless.php
index 798cc5d..dfe3659 100644
--- a/src/usr/local/www/status_wireless.php
+++ b/src/usr/local/www/status_wireless.php
@@ -1,38 +1,61 @@
<?php
/*
status_wireless.php
- Copyright (C) 2004 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: interfaces
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-diagnostics-wirelessstatus
-##|*NAME=Status: Wireless page
+##|*NAME=Status: Wireless
##|*DESCR=Allow access to the 'Status: Wireless' page.
##|*MATCH=status_wireless.php*
##|-PRIV
@@ -46,13 +69,13 @@ include("head.inc");
$if = $_POST['if'];
-if($_GET['if'] != "")
+if ($_GET['if'] != "") {
$if = $_GET['if'];
+}
$ciflist = get_configured_interface_with_descr();
if (empty($if)) {
- /* Find the first interface
- that is wireless */
+ /* Find the first interface that is wireless */
foreach ($ciflist as $interface => $ifdescr) {
if (is_interface_wireless(get_real_interface($interface))) {
$if = $interface;
@@ -63,11 +86,12 @@ if (empty($if)) {
$tab_array = array();
-foreach($ciflist as $interface => $ifdescr) {
+foreach ($ciflist as $interface => $ifdescr) {
if (is_interface_wireless(get_real_interface($interface))) {
$enabled = false;
- if($if == $interface)
+ if ($if == $interface) {
$enabled = true;
+ }
$tab_array[] = array(gettext("Status") . " ({$ifdescr})", $enabled, "status_wireless.php?if={$interface}");
}
@@ -75,13 +99,14 @@ foreach($ciflist as $interface => $ifdescr) {
$rwlif = get_real_interface($if);
-if($_POST['rescanwifi'] != "") {
+if ($_POST['rescanwifi'] != "") {
mwexec_bg("/sbin/ifconfig {$rwlif} scan 2>&1");
$savemsg = gettext("Rescan has been initiated in the background. Refresh this page in 10 seconds to see the results.");
}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
display_top_tabs($tab_array);
?>
@@ -90,7 +115,7 @@ display_top_tabs($tab_array);
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Nearby access points or ad-hoc peers")?></h2></div>
<div class="panel-body">
<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th>SSID</th>
@@ -159,19 +184,19 @@ display_top_tabs($tab_array);
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Associated or ad-hoc peers")?></h2></div>
<div class="panel-body">
<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
- <th>ADDR</font></th>
- <th>AID</font></th>
- <th>CHAN</font></th>
- <th>RATE</font></th>
- <th>RSSI</font></th>
- <th>IDLE</font></th>
- <th>TXSEQ</font></th>
- <th>RXSEQ</font></th>
- <th>CAPS</font></th>
- <th>ERP</font></th>
+ <th>ADDR</th>
+ <th>AID</th>
+ <th>CHAN</th>
+ <th>RATE</th>
+ <th>RSSI</th>
+ <th>IDLE</th>
+ <th>TXSEQ</th>
+ <th>RXSEQ</th>
+ <th>CAPS</th>
+ <th>ERP</th>
</tr>
</thead>
<tbody>
@@ -183,13 +208,13 @@ display_top_tabs($tab_array);
$counter=0;
- foreach($states as $state) {
+ foreach ($states as $state) {
$split = preg_split("/[ ]+/i", $state);
?>
<tr>
<?php
/* Split the rest by using spaces for this line using the 2nd part */
- for($idx=0; $idx<10; $idx++) {
+ for ($idx=0; $idx<10; $idx++) {
?>
<td>
<?=$split[$idx]?>
@@ -210,14 +235,17 @@ display_top_tabs($tab_array);
<form action="status_wireless.php" method="post">
<nav class="action-buttons">
- <input type="hidden" name="if" id="if" value="<?=htmlspecialchars($if)?>">
- <input type="submit" class="btn btn-success" name="rescanwifi" id="rescanwifi" value="Rescan">
+ <input type="hidden" name="if" id="if" value="<?=htmlspecialchars($if)?>" />
+ <button type="submit" class="btn btn-success" name="rescanwifi" id="rescanwifi" value="Rescan">
+ <i class="fa fa-undo icon-embed-btn"></i>
+ <?=gettext("Rescan")?>
+ </button>
</nav>
</form>
<?php
print_info_box('<b>Flags:</b> A = authorized, E = Extended Rate (802.11g), P = Power saving mode<br />' .
'<b>Capabilities:</b> E = ESS (infrastructure mode), I = IBSS (ad-hoc mode), P = privacy (WEP/TKIP/AES), ' .
- 'S = Short preamble, s = Short slot time');
+ 'S = Short preamble, s = Short slot time', info);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php
index 4827d18..8f0bd11 100644
--- a/src/usr/local/www/system.php
+++ b/src/usr/local/www/system.php
@@ -1,13 +1,12 @@
<?php
-/* $Id$ */
/*
system.php
- part of m0n0wall (http://m0n0.ch/wall)
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -56,14 +55,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES: /bin/kill /usr/bin/tar
- pfSense_MODULE: system
-*/
##|+PRIV
##|*IDENT=page-system-generalsetup
-##|*NAME=System: General Setup page
+##|*NAME=System: General Setup
##|*DESCR=Allow access to the 'System: General Setup' page.
##|*MATCH=system.php*
##|-PRIV
@@ -80,6 +75,11 @@ list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $
$arr_gateways = return_gateways_array();
+// set default colmns to two if unset
+if (!isset($config['system']['webgui']['dashboardcolumns'])) {
+ $config['system']['webgui']['dashboardcolumns'] = 2;
+}
+
$pconfig['dns1gw'] = $config['system']['dns1gw'];
$pconfig['dns2gw'] = $config['system']['dns2gw'];
$pconfig['dns3gw'] = $config['system']['dns3gw'];
@@ -87,19 +87,22 @@ $pconfig['dns4gw'] = $config['system']['dns4gw'];
$pconfig['dnsallowoverride'] = isset($config['system']['dnsallowoverride']);
$pconfig['timezone'] = $config['system']['timezone'];
-$pconfig['timeupdateinterval'] = $config['system']['time-update-interval'];
$pconfig['timeservers'] = $config['system']['timeservers'];
-$pconfig['theme'] = $config['system']['theme'];
$pconfig['language'] = $config['system']['language'];
-
+$pconfig['webguicss'] = $config['system']['webgui']['webguicss'];
+$pconfig['webguifixedmenu'] = $config['system']['webgui']['webguifixedmenu'];
+$pconfig['dashboardcolumns'] = $config['system']['webgui']['dashboardcolumns'];
+$pconfig['webguileftcolumnhyper'] = isset($config['system']['webgui']['webguileftcolumnhyper']);
$pconfig['dnslocalhost'] = isset($config['system']['dnslocalhost']);
-if (!isset($pconfig['timeupdateinterval'])) {
- $pconfig['timeupdateinterval'] = 300;
-}
if (!$pconfig['timezone']) {
- $pconfig['timezone'] = "Etc/UTC";
+ if (isset($g['default_timezone']) && !empty($g['default_timezone'])) {
+ $pconfig['timezone'] = $g['default_timezone'];
+ } else {
+ $pconfig['timezone'] = "Etc/UTC";
+ }
}
+
if (!$pconfig['timeservers']) {
$pconfig['timeservers'] = "pool.ntp.org";
}
@@ -138,6 +141,24 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
+ if ($_POST['webguicss']) {
+ $config['system']['webgui']['webguicss'] = $_POST['webguicss'];
+ } else {
+ unset($config['system']['webgui']['webguicss']);
+ }
+
+ if ($_POST['webguifixedmenu']) {
+ $config['system']['webgui']['webguifixedmenu'] = $_POST['webguifixedmenu'];
+ } else {
+ unset($config['system']['webgui']['webguifixedmenu']);
+ }
+
+ if ($_POST['dashboardcolumns']) {
+ $config['system']['webgui']['dashboardcolumns'] = $_POST['dashboardcolumns'];
+ } else {
+ unset($config['system']['webgui']['dashboardcolumns']);
+ }
+
if ($_POST['hostname']) {
if (!is_hostname($_POST['hostname'])) {
$input_errors[] = gettext("The hostname can only contain the characters A-Z, 0-9 and '-'. It may not start or end with '-'.");
@@ -191,10 +212,6 @@ if ($_POST) {
}
}
- $t = (int)$_POST['timeupdateinterval'];
- if (($t < 0) || (($t > 0) && ($t < 6)) || ($t > 1440)) {
- $input_errors[] = gettext("The time update interval must be either 0 (disabled) or between 6 and 1440.");
- }
# it's easy to have a little too much whitespace in the field, clean it up for the user before processing.
$_POST['timeservers'] = preg_replace('/[[:blank:]]+/', ' ', $_POST['timeservers']);
$_POST['timeservers'] = trim($_POST['timeservers']);
@@ -209,17 +226,14 @@ if ($_POST) {
update_if_changed("domain", $config['system']['domain'], $_POST['domain']);
update_if_changed("timezone", $config['system']['timezone'], $_POST['timezone']);
update_if_changed("NTP servers", $config['system']['timeservers'], strtolower($_POST['timeservers']));
- update_if_changed("NTP update interval", $config['system']['time-update-interval'], $_POST['timeupdateinterval']);
if ($_POST['language'] && $_POST['language'] != $config['system']['language']) {
$config['system']['language'] = $_POST['language'];
set_language($config['system']['language']);
}
- /* pfSense themes */
- if (!$g['disablethemeselection']) {
- update_if_changed("System Theme", $config['theme'], $_POST['theme']);
- }
+ unset($config['system']['webgui']['webguileftcolumnhyper']);
+ $config['system']['webgui']['webguileftcolumnhyper'] = $_POST['webguileftcolumnhyper'] ? true : false;
/* XXX - billm: these still need updating after figuring out how to check if they actually changed */
$olddnsservers = $config['system']['dnsserver'];
@@ -288,10 +302,8 @@ if ($_POST) {
// Remove the route. Later calls will add the correct new route if needed.
if (is_ipaddrv4($olddnsservers[$dnscounter-1])) {
mwexec("/sbin/route delete " . escapeshellarg($olddnsservers[$dnscounter-1]));
- } else {
- if (is_ipaddrv6($olddnsservers[$dnscounter-1])) {
- mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter-1]));
- }
+ } else if (is_ipaddrv6($olddnsservers[$dnscounter-1])) {
+ mwexec("/sbin/route delete -inet6 " . escapeshellarg($olddnsservers[$dnscounter-1]));
}
}
}
@@ -328,15 +340,17 @@ if ($_POST) {
$pgtitle = array(gettext("System"), gettext("General Setup"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
- print_info_box($savemsg);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, success);
+}
?>
<div id="container">
<?php
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('System');
$section->addInput(new Form_Input(
@@ -359,8 +373,7 @@ $form->add($section);
$section = new Form_Section('DNS server settings');
-for ($i=1; $i<5; $i++)
-{
+for ($i=1; $i<5; $i++) {
// if (!isset($pconfig['dns'.$i]))
// continue;
@@ -379,12 +392,12 @@ for ($i=1; $i<5; $i++)
if ($multiwan) {
$options = array('none' => 'none');
- foreach($arr_gateways as $gwname => $gwitem) {
- if((is_ipaddrv4(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv6($gwitem['gateway'])))) {
+ foreach ($arr_gateways as $gwname => $gwitem) {
+ if ((is_ipaddrv4(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv6($gwitem['gateway'])))) {
continue;
}
- if((is_ipaddrv6(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv4($gwitem['gateway'])))) {
+ if ((is_ipaddrv6(lookup_gateway_ip_by_name($pconfig[$dnsgw])) && (is_ipaddrv4($gwitem['gateway'])))) {
continue;
}
@@ -393,7 +406,7 @@ for ($i=1; $i<5; $i++)
$group->add(new Form_Select(
'dns' . $i . 'gw',
- 'Gateway',
+ null,
$pconfig['dns' . $i . 'gw'],
$options
))->setHelp(($i == 4) ? 'Gateway':null);;
@@ -402,8 +415,9 @@ for ($i=1; $i<5; $i++)
"When using multiple WAN connections there should be at least one unique DNS server per gateway.";
}
- if($i == 4)
+ if ($i == 4) {
$group->setHelp($help);
+ }
$section->add($group);
}
@@ -453,6 +467,57 @@ $section->addInput(new Form_Select(
$form->add($section);
-print $form;
+$csslist = array();
+$css = glob("/usr/local/www/bootstrap/css/*.css");
+foreach ($css as $file) {
+ $file = basename($file);
+ if (substr($file, 0, 9) !== 'bootstrap') {
+ $csslist[$file] = pathinfo($file, PATHINFO_FILENAME);
+ }
+}
+
+asort($csslist);
+
+if (!isset($pconfig['webguicss']) || !isset($csslist[$pconfig['webguicss']])) {
+ $pconfig['webguicss'] = "pfSense.css";
+}
+
+$section = new Form_Section('Web Configurator');
+
+$section->addInput(new Form_Select(
+ 'webguicss',
+ 'Theme',
+ $pconfig['webguicss'],
+ $csslist
+))->setHelp('Choose an alternative css file (if installed) to change the appearance of the Web configurator. css files are located in /usr/local/www/bootstrap/css');
+
+$section->addInput(new Form_Select(
+ 'webguifixedmenu',
+ 'Top Navigation',
+ $pconfig['webguifixedmenu'],
+ ["" => "Scrolls with page", "fixed" => "Fixed (Remains visible at top of page)"]
+))->setHelp("The fixed option is intended for large screens only.");
+
+$section->addInput(new Form_Input(
+ 'dashboardcolumns',
+ 'Dashboard Columns',
+ 'number',
+ $pconfig['dashboardcolumns'],
+ [min => 1, max => 4]
+))->setHelp('<span class="badge" title="This feature is in BETA">BETA</span>');
+$section->addInput(new Form_Checkbox(
+ 'webguileftcolumnhyper',
+ 'Left Column Labels',
+ 'Active',
+ $pconfig['webguileftcolumnhyper']
+))->setHelp('If selected, clicking a label in the left column will select/toggle the first item of the group.<br /><span class="badge" title="This feature is in BETA">BETA</span>');
+
+$form->add($section);
+
+print $form;
+?>
+</div>
+<?php
include("foot.inc");
+?>
diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php
index 91c7f98..257f4e8 100644
--- a/src/usr/local/www/system_advanced_admin.php
+++ b/src/usr/local/www/system_advanced_admin.php
@@ -1,41 +1,61 @@
<?php
-/* $Id$ */
/*
system_advanced_admin.php
- part of pfSense
- Copyright (C) 2005-2010 Scott Ullrich
- Copyright (C) 2008 Shrew Soft Inc
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/killall
- pfSense_MODULE: system
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-advanced-admin
@@ -126,23 +146,34 @@ if ($_POST) {
if (update_if_changed("webgui protocol", $config['system']['webgui']['protocol'], $_POST['webguiproto'])) {
$restart_webgui = true;
}
+
if (update_if_changed("webgui port", $config['system']['webgui']['port'], $_POST['webguiport'])) {
$restart_webgui = true;
}
+
if (update_if_changed("webgui certificate", $config['system']['webgui']['ssl-certref'], $_POST['ssl-certref'])) {
$restart_webgui = true;
}
+
if (update_if_changed("webgui max processes", $config['system']['webgui']['max_procs'], $_POST['max_procs'])) {
$restart_webgui = true;
}
+ // Restart the webgui only if this actually changed
if ($_POST['webgui-redirect'] == "yes") {
+ if ($config['system']['webgui']['disablehttpredirect'] != true) {
+ $restart_webgui = true;
+ }
+
$config['system']['webgui']['disablehttpredirect'] = true;
- $restart_webgui = true;
} else {
+ if ($config['system']['webgui']['disablehttpredirect'] == true) {
+ $restart_webgui = true;
+ }
+
unset($config['system']['webgui']['disablehttpredirect']);
- $restart_webgui = true;
}
+
if ($_POST['webgui-login-messages'] == "yes") {
$config['system']['webgui']['quietlogin'] = true;
} else {
@@ -231,8 +262,8 @@ if ($_POST) {
}
if (($sshd_enabled != $config['system']['enablesshd']) ||
- ($sshd_keyonly != $config['system']['sshdkeyonly']) ||
- ($sshd_port != $config['system']['ssh']['port'])) {
+ ($sshd_keyonly != $config['system']['sshdkeyonly']) ||
+ ($sshd_port != $config['system']['ssh']['port'])) {
$restart_sshd = true;
}
@@ -282,14 +313,16 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("System"), gettext("Advanced: Admin Access"));
+$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Admin Access"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Admin Access"), true, "system_advanced_admin.php");
@@ -302,7 +335,6 @@ display_top_tabs($tab_array);
?><div id="container"><?php
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('WebConfigurator');
$group = new Form_Group('Protocol');
@@ -311,7 +343,7 @@ $group->add(new Form_Checkbox(
'webguiproto',
'Protocol',
'HTTP',
- ($pconfig['webguiproto']=='http'),
+ ($pconfig['webguiproto'] == 'http'),
'http'
))->displayAsRadio();
@@ -319,7 +351,7 @@ $group->add(new Form_Checkbox(
'webguiproto',
'Protocol',
'HTTPS',
- ($pconfig['webguiproto']=='https'),
+ ($pconfig['webguiproto'] == 'https'),
'https'
))->displayAsRadio();
@@ -330,8 +362,9 @@ $group->setHelp($certs_available ? '':'No Certificates have been defined. You mu
$section->add($group);
$values = array();
-foreach($a_cert as $cert)
+foreach ($a_cert as $cert) {
$values[ $cert['refid'] ] = $cert['descr'];
+}
$section->addInput($input = new Form_Select(
'ssl-certref',
@@ -387,10 +420,11 @@ $section->addInput(new Form_Checkbox(
))->setHelp('When this is checked, successful logins to the webConfigurator will '.
'not be logged.');
-if ($config['interfaces']['lan'])
+if ($config['interfaces']['lan']) {
$lockout_interface = "LAN";
-else
+} else {
$lockout_interface = "WAN";
+}
$section->addInput(new Form_Checkbox(
'noantilockout',
@@ -411,7 +445,7 @@ $section->addInput(new Form_Checkbox(
'Disable DNS Rebinding Checks',
$pconfig['nodnsrebindcheck']
))->setHelp('When this is unchecked, your system is protected against <a '.
- 'href=\"http://en.wikipedia.org/wiki/DNS_rebinding\">DNS Rebinding attacks</a>. '.
+ 'href="http://en.wikipedia.org/wiki/DNS_rebinding">DNS Rebinding attacks</a>. '.
'This blocks private IP responses from your configured DNS servers. Check this '.
'box to disable this protection if it interferes with webConfigurator access or '.
'name resolution in your environment.');
@@ -474,8 +508,7 @@ $section->addInput(new Form_Input(
))->setHelp('Note: Leave this blank for the default of 22.');
-if (!$g['enableserial_force'] && ($g['platform'] == $g['product_name'] || $g['platform'] == "cdrom"))
-{
+if (!$g['enableserial_force'] && ($g['platform'] == $g['product_name'] || $g['platform'] == "cdrom")) {
$form->add($section);
$section = new Form_Section('Serial Communications');
@@ -486,14 +519,14 @@ if (!$g['enableserial_force'] && ($g['platform'] == $g['product_name'] || $g['pl
isset($pconfig['enableserial'])
))->setHelp('Note: This will redirect the console output and messages to '.
'the serial port. You can still access the console menu from the internal video '.
- 'card/keyboard. A<b>null modem</b>serial cable or adapter is required to use the '.
+ 'card/keyboard. A <b>null modem</b> serial cable or adapter is required to use the '.
'serial console.');
$section->addInput(new Form_Select(
'serialspeed',
'Serial Speed',
$pconfig['serialspeed'],
- array(115200, 57600, 38400, 19200, 14400, 9600)
+ array_combine(array(115200, 57600, 38400, 19200, 14400, 9600), array(115200, 57600, 38400, 19200, 14400, 9600))
))->setHelp('Allows selection of different speeds for the serial console port.');
$section->addInput(new Form_Select(
@@ -523,9 +556,10 @@ $form->add($section);
print $form;
?>
-<script>
+</div>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// ---------- On initial page load ------------------------------------------------------------
@@ -533,7 +567,7 @@ events.push(function(){
// ---------- Click checkbox handlers ---------------------------------------------------------
- $('[id=webguiproto]').click(function () {
+ $('[name=webguiproto]').click(function () {
hideInput('ssl-certref', $('input[name=webguiproto]:checked').val() == 'http');
});
});
@@ -543,11 +577,11 @@ events.push(function(){
<?php
include("foot.inc");
-if ($restart_webgui)
+if ($restart_webgui) {
echo "<meta http-equiv=\"refresh\" content=\"20;url={$url}\" />";
+}
-if ($restart_sshd)
-{
+if ($restart_sshd) {
killbyname("sshd");
log_error(gettext("secure shell configuration has changed. Stopping sshd."));
@@ -557,10 +591,10 @@ if ($restart_sshd)
}
}
-if ($restart_webgui)
-{
+if ($restart_webgui) {
ob_flush();
flush();
log_error(gettext("webConfigurator configuration has changed. Restarting webConfigurator."));
send_event("service restart webgui");
}
+?> \ No newline at end of file
diff --git a/src/usr/local/www/system_advanced_firewall.php b/src/usr/local/www/system_advanced_firewall.php
index e1ba2e5..518b59e 100644
--- a/src/usr/local/www/system_advanced_firewall.php
+++ b/src/usr/local/www/system_advanced_firewall.php
@@ -1,13 +1,14 @@
<?php
-/* $Id$ */
/*
system_advanced_firewall.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -55,13 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: system
-*/
##|+PRIV
##|*IDENT=page-system-advanced-firewall
-##|*NAME=System: Advanced: Firewall and NAT page
+##|*NAME=System: Advanced: Firewall and NAT
##|*DESCR=Allow access to the 'System: Advanced: Firewall and NAT' page.
##|*MATCH=system_advanced_firewall.php*
##|-PRIV
@@ -387,7 +385,7 @@ if ($_POST) {
// Kill filterdns when value changes, filter_configure() will restart it
if (($old_aliasesresolveinterval != $config['system']['aliasesresolveinterval']) &&
- isvalidpid("{$g['varrun_path']}/filterdns.pid")) {
+ isvalidpid("{$g['varrun_path']}/filterdns.pid")) {
killbypid("{$g['varrun_path']}/filterdns.pid");
}
@@ -401,13 +399,15 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("System"), gettext("Advanced: Firewall and NAT"));
+$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Firewall and NAT"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
+}
+if ($savemsg) {
print_info_box($savemsg);
+}
$tab_array = array();
$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
@@ -420,7 +420,6 @@ display_top_tabs($tab_array);
?><div id="container"><?php
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Firewall Advanced');
@@ -430,14 +429,14 @@ $section->addInput(new Form_Checkbox(
'Clear invalid DF bits instead of dropping the packets',
isset($config['system']['scrubnodf'])
))->setHelp('This allows for communications with hosts that generate fragmented '.
- 'packets with the don"t fragment (DF) bit set. Linux NFS is known to do this. '.
- 'This will cause the filter to not drop such packets but instead clear the don"t '.
+ 'packets with the don\'t fragment (DF) bit set. Linux NFS is known to do this. '.
+ 'This will cause the filter to not drop such packets but instead clear the don\'t '.
'fragment bit.');
$section->addInput(new Form_Checkbox(
'scrubrnid',
'IP Random id generation',
- 'Insert a stronger id into IP header of packets passing through the filter.',
+ 'Insert a stronger ID into IP header of packets passing through the filter.',
isset($config['system']['scrubrnid'])
))->setHelp('Replaces the IP identification field of packets with random values to '.
'compensate for operating systems that use predictable values. This option only '.
@@ -522,7 +521,7 @@ $section->addInput(new Form_Input(
'default. On your system the default size is: %d',
[pfsense_default_table_entries_size()]);
-$section->addINput(new Form_Input(
+$section->addInput(new Form_Input(
'maximumfrags',
'Firewall Maximum Fragment Entries',
'text',
@@ -602,16 +601,16 @@ $section->addInput(new Form_Select(
$form->add($section);
-if (count($config['interfaces']) > 1)
-{
+if (count($config['interfaces']) > 1) {
$section = new Form_Section('Network Address Translation');
- if (isset($config['system']['disablenatreflection']))
+ if (isset($config['system']['disablenatreflection'])) {
$value = 'disable';
- elseif (!isset($config['system']['enablenatreflectionpurenat']))
+ } elseif (!isset($config['system']['enablenatreflectionpurenat'])) {
$value = 'proxy';
- else
+ } else {
$value = 'purenat';
+ }
$section->addInput(new Form_Select(
'natreflection',
@@ -622,7 +621,7 @@ if (count($config['interfaces']) > 1)
'proxy' => 'NAT + proxy',
'purenat' => 'Pure NAT',
)
- ))->setHelp('<ul><li>The pure NAT mode uses a set of NAT rules to direct '.
+ ))->setHelp('</span><ul class="help-block"><li>The pure NAT mode uses a set of NAT rules to direct '.
'packets to the target of the port forward. It has better scalability, '.
'but it must be possible to accurately determine the interface and '.
'gateway IP used for communication with the target at the time the '.
@@ -635,7 +634,7 @@ if (count($config['interfaces']) > 1)
'the time the rules are loaded. Reflection rules are not created for '.
'ranges larger than 500 ports and will not be used for more than 1000 '.
'ports total between all port forwards. Only TCP and UDP protocols are '.
- 'supported.</li></ul>Individual rules may be configured to override '.
+ 'supported.</li></ul><span class="help-block">Individual rules may be configured to override '.
'this system setting on a per-rule basis.');
$section->addInput(new Form_Input(
@@ -679,91 +678,79 @@ if (count($config['interfaces']) > 1)
$form->add($section);
}
-$section = new Form_Section('State Timeouts');
+$section = new Form_Section('State Timeouts in seconds. (Leave blank for default)');
-$group = new Form_Group('TCP Timeouts');
-$tcpTimeouts = array('First', 'Opening', 'Established', 'Closing', 'FIN', 'closed');
-foreach ($tcpTimeouts as $name)
-{
- $group->add(new Form_Input(
- 'tcp'. strtolower($name) .'timeout',
+$tcpTimeouts = array('First', 'Opening', 'Established', 'Closing', 'FIN Wait', 'Closed');
+foreach ($tcpTimeouts as $name) {
+ $keyname = 'tcp'. strtolower(str_replace(" ", "", $name)) .'timeout';
+ $section->addInput(new Form_Input(
+ $keyname,
'TCP '. $name,
'number',
- $config['system']['tcp'. strtolower($name) .'timeout']
- ))->setHelp('Enter value for TCP '. $name .' timeout in seconds. Leave blank for '.
- 'default (recommended).');
+ $config['system'][$keyname]
+ ));
}
-$section->add($group);
-
-$group = new Form_Group('UDP Timeouts');
$udpTimeouts = array('First', 'Single', 'Multiple');
-foreach ($udpTimeouts as $name)
-{
- $group->add(new Form_Input(
- 'udp'. strtolower($name) .'timeout',
+foreach ($udpTimeouts as $name) {
+ $keyname = 'udp'. strtolower(str_replace(" ", "", $name)) .'timeout';
+ $section->addInput(new Form_Input(
+ $keyname,
'UDP '. $name,
'number',
- $config['system']['udo'. strtolower($name) .'timeout']
- ))->setHelp('Enter value for UDP '. $name .' timeout in seconds. Leave blank for '.
- 'default (recommended).');
+ $config['system'][$keyname]
+ ));
}
-$section->add($group);
-
-$group = new Form_Group('ICMP Timeouts');
-$udpTimeouts = array('First', 'Error');
-foreach ($udpTimeouts as $name)
-{
- $group->add(new Form_Input(
- 'icmp'. strtolower($name) .'timeout',
- 'UDP '. $name,
+$icmpTimeouts = array('First', 'Error');
+foreach ($icmpTimeouts as $name) {
+ $keyname = 'icmp'. strtolower(str_replace(" ", "", $name)) .'timeout';
+ $section->addInput(new Form_Input(
+ $keyname,
+ 'ICMP '. $name,
'number',
- $config['system']['icmp'. strtolower($name) .'timeout']
- ))->setHelp('Enter value for ICMP '. $name .' timeout in seconds. Leave blank for '.
- 'default (recommended).');
+ $config['system'][$keyname]
+ ));
}
-$section->add($group);
-
-$group = new Form_Group('Other Timeouts');
-foreach ($udpTimeouts as $name)
-{
- $group->add(new Form_Input(
- 'other'. strtolower($name) .'timeout',
+$otherTimeouts = array('First', 'Single', 'Multiple');
+foreach ($otherTimeouts as $name) {
+ $keyname = 'other'. strtolower(str_replace(" ", "", $name)) .'timeout';
+ $section->addInput(new Form_Input(
+ $keyname,
'Other '. $name,
'number',
- $config['system']['other'. strtolower($name) .'timeout']
- ))->setHelp('Enter value for ICMP '. $name .' timeout in seconds. Leave blank for '.
- 'default (recommended).');
+ $config['system'][$keyname]
+ ));
}
-$section->add($group);
+$form->add($section);
print $form;
-?>
-<script>
+?></div>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Change help text based on the selector value
function setHelpText(id, text) {
$('#' + id).parent().parent('div').find('span').html(text);
}
function setOptText(val) {
- var htext = '<font color="green">';
+ var htext = '<span class="text-success">';
- if(val == 'normal')
+ if (val == 'normal') {
htext += 'The default optimization algorithm';
- else if (val == 'high-latency')
+ } else if (val == 'high-latency') {
htext += 'Used for eg. satellite links. Expires idle connections later than default';
- else if (val == 'aggressive')
+ } else if (val == 'aggressive') {
htext += 'Expires idle connections quicker. More efficient use of CPU and memory but can drop legitimate idle connections';
- else if (val == 'conservative')
+ } else if (val == 'conservative') {
htext += 'Tries to avoid dropping any legitimate idle connections at the expense of increased memory usage and CPU utilization';
+ }
- htext += '</font>';
+ htext += '</span>';
setHelpText('optimization', htext);
}
@@ -774,10 +761,11 @@ events.push(function(){
});
// ---------- On initial page load ------------------------------------------------------------
-
+
setOptText($('#optimization').val())
});
//]]>
</script>
<?php
include("foot.inc");
+?> \ No newline at end of file
diff --git a/src/usr/local/www/system_advanced_misc.php b/src/usr/local/www/system_advanced_misc.php
index 5fcdef0..862e049 100644
--- a/src/usr/local/www/system_advanced_misc.php
+++ b/src/usr/local/www/system_advanced_misc.php
@@ -1,13 +1,14 @@
<?php
-/* $Id$ */
/*
system_advanced_misc.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -55,13 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: system
-*/
##|+PRIV
##|*IDENT=page-system-advanced-misc
-##|*NAME=System: Advanced: Miscellaneous page
+##|*NAME=System: Advanced: Miscellaneous
##|*DESCR=Allow access to the 'System: Advanced: Miscellaneous' page.
##|*MATCH=system_advanced_misc.php*
##|-PRIV
@@ -87,12 +85,10 @@ $pconfig['thermal_hardware'] = $config['system']['thermal_hardware'];
$pconfig['schedule_states'] = isset($config['system']['schedule_states']);
$pconfig['kill_states'] = isset($config['system']['kill_states']);
$pconfig['skip_rules_gw_down'] = isset($config['system']['skip_rules_gw_down']);
-$pconfig['apinger_debug'] = isset($config['system']['apinger_debug']);
$pconfig['use_mfs_tmpvar'] = isset($config['system']['use_mfs_tmpvar']);
$pconfig['use_mfs_tmp_size'] = $config['system']['use_mfs_tmp_size'];
$pconfig['use_mfs_var_size'] = $config['system']['use_mfs_var_size'];
-$pconfig['pkg_nochecksig'] = isset($config['system']['pkg_nochecksig']);
-$pconfig['host_uuid'] = !isset($config['system']['host_uuid']);
+$pconfig['do_not_send_host_uuid'] = isset($config['system']['do_not_send_host_uuid']);
$pconfig['powerd_ac_mode'] = "hadp";
if (!empty($config['system']['powerd_ac_mode'])) {
@@ -153,6 +149,10 @@ if ($_POST) {
$input_errors[] = gettext("The proxy username contains invalid characters.");
}
+ if($_POST['proxypass'] != $_POST['proxypass_confirm']) {
+ $input_errors[] = gettext("Proxy password and confirmation must match.");
+ }
+
if (!$input_errors) {
if ($_POST['harddiskstandby'] <> "") {
@@ -181,7 +181,9 @@ if ($_POST) {
}
if ($_POST['proxypass'] <> "") {
- $config['system']['proxypass'] = $_POST['proxypass'];
+ if ($_POST['proxypass'] != DMYPWD) {
+ $config['system']['proxypass'] = $_POST['proxypass'];
+ }
} else {
unset($config['system']['proxypass']);
}
@@ -215,10 +217,10 @@ if ($_POST) {
unset($config['system']['pkg_nochecksig']);
}
- if ($_POST['host_uuid'] == "yes") {
- unset($config['system']['host_uuid']);
+ if ($_POST['do_not_send_host_uuid'] == "yes") {
+ $config['system']['do_not_send_host_uuid'] = true;
} else {
- $config['system']['host_uuid'] = true;
+ unset($config['system']['do_not_send_host_uuid']);
}
if ($_POST['powerd_enable'] == "yes") {
@@ -261,19 +263,6 @@ if ($_POST) {
unset($config['system']['skip_rules_gw_down']);
}
- $need_apinger_restart = false;
- if ($_POST['apinger_debug'] == "yes") {
- if (!isset($config['system']['apinger_debug'])) {
- $need_apinger_restart = true;
- }
- $config['system']['apinger_debug'] = true;
- } else {
- if (isset($config['system']['apinger_debug'])) {
- $need_apinger_restart = true;
- }
- unset($config['system']['apinger_debug']);
- }
-
if ($_POST['use_mfs_tmpvar'] == "yes") {
$config['system']['use_mfs_tmpvar'] = true;
} else {
@@ -309,19 +298,19 @@ if ($_POST) {
if ($need_relayd_restart) {
relayd_configure();
}
- if ($need_apinger_restart) {
- setup_gateways_monitor();
- }
}
}
-$pgtitle = array(gettext("System"), gettext("Advanced: Miscellaneous"));
+$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Miscellaneous"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
- print_info_box($savemsg);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, success);
+}
$tab_array = array();
$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
@@ -332,9 +321,6 @@ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.
$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
-?><div id="container"><?php
-
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Proxy support');
@@ -361,7 +347,7 @@ $section->addInput(new Form_Input(
))->setHelp('Username for authentication to proxy server. Optional, '.
'leave blank to not use authentication.');
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'proxypass',
'Proxy Password',
'password',
@@ -521,14 +507,6 @@ $section->addInput(new Form_Checkbox(
'down, the rule is created omitting the gateway. This option overrides that '.
'behavior by omitting the entire rule instead.');
-$section->addInput(new Form_Checkbox(
- 'apinger_debug',
- 'Gateway monitoring logging',
- 'Enable debug logging',
- $pconfig['apinger_debug']
-))->setHelp('Enable this setting to log debug information from the gateway '.
- 'monitoring process to the system logs.');
-
$form->add($section);
$section = new Form_Section('RAM Disk Settings (Reboot to Apply Changes)');
@@ -581,17 +559,35 @@ $section->addInput(new Form_Input(
'frequent the backup, the more writes will happen to your media.');
$form->add($section);
-$section = new Form_Section('Package settings');
+
+if ($g['platform'] == "pfSense") {
+ $section = new Form_Section('Hardware settings');
+
+ $opts = array(0.5, 1, 2, 3, 4, 5, 7.5, 10, 15, 20, 30, 60);
+ $vals = array( 6, 12, 24, 36, 48, 60, 90, 120, 180, 240, 241, 242);
+
+ $section->addInput(new Form_Select(
+ 'harddiskstandby',
+ 'Hard disk standby time',
+ $pconfig['harddiskstandby'],
+ ['' => gettext("Always on")] + array_combine($opts, $vals)
+ ))->setHelp("Puts the hard disk into standby mode when the selected number of minutes has elapsed since the last access." . "<br />" .
+ "<strong> Do not set this for CF cards.</strong>");
+
+ $form->add($section);
+}
+
+$section = new Form_Section('Installation Feedback');
$section->addInput(new Form_Checkbox(
- 'pkg_nochecksig',
- 'Package signature',
- 'Disable check package signature',
- $pconfig['pkg_nochecksig']
-))->setHelp('Enable this option to allow pfSense to install any package without '.
- 'checking its signature.');
+ 'do_not_send_host_uuid',
+ 'Host UUID',
+ 'Do NOT send HOST UUID with user agent',
+ $pconfig['do_not_send_host_uuid']
+))->setHelp('Enable this option to not send HOST UUID to pfSense as part of User-Agent header.');
$form->add($section);
+
print $form;
include("foot.inc");
diff --git a/src/usr/local/www/system_advanced_network.php b/src/usr/local/www/system_advanced_network.php
index 443241a..32dfe8e 100644
--- a/src/usr/local/www/system_advanced_network.php
+++ b/src/usr/local/www/system_advanced_network.php
@@ -1,43 +1,65 @@
<?php
/*
system_advanced_network.php
- part of pfSense
- Copyright (C) 2005-2007 Scott Ullrich
- Copyright (C) 2008 Shrew Soft Inc
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: system
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-advanced-network
-##|*NAME=System: Advanced: Network page
+##|*NAME=System: Advanced: Networking
##|*DESCR=Allow access to the 'System: Advanced: Networking' page.
##|*MATCH=system_advanced_network.php*
##|-PRIV
@@ -146,13 +168,15 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("System"), gettext("Advanced: Networking"));
+$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Networking"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
+}
+if ($savemsg) {
print_info_box($savemsg);
+}
$tab_array = array();
$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
@@ -163,9 +187,6 @@ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.
$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
-?><div id="container"><?php
-
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('IPv6 Options');
@@ -260,18 +281,17 @@ $section->addInput(new Form_Checkbox(
))->setHelp('This option will suppress ARP log messages when multiple interfaces '.
'reside on the same broadcast domain');
-if (get_freebsd_version() == 8)
-{
+if (get_freebsd_version() == 8) {
$section->addInput(new Form_Checkbox(
'flowtable',
'Enable flowtable support',
$pconfig['flowtable']
))->setHelp('Enables infrastructure for caching flows as a means of accelerating '.
- 'L3 and L2 lookupsas well as providing stateful load balancing when used with '.
+ 'L3 and L2 lookups as well as providing stateful load balancing when used with '.
'RADIX_MPATH.');
}
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php
index 581b3ce..99bec31 100644
--- a/src/usr/local/www/system_advanced_notifications.php
+++ b/src/usr/local/www/system_advanced_notifications.php
@@ -1,14 +1,12 @@
<?php
-/* $Id$ */
/*
system_advanced_notifications.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@@ -16,12 +14,12 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
- * distribution.
+ * distribution.
*
- * 3. All advertising materials mentioning features or use of this software
+ * 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgment:
* "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
* 4. The names "pfSense" and "pfSense Project" must not be used to
* endorse or promote products derived from this software without
@@ -54,13 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: system
-*/
##|+PRIV
##|*IDENT=page-system-advanced-notifications
-##|*NAME=System: Advanced: Notifications page
+##|*NAME=System: Advanced: Notifications
##|*DESCR=Allow access to the 'System: Advanced: Notifications' page.
##|*MATCH=system_advanced_notifications.php*
##|-PRIV
@@ -131,7 +126,14 @@ if ($_POST) {
// Growl
$config['notifications']['growl']['ipaddress'] = $_POST['ipaddress'];
- $config['notifications']['growl']['password'] = $_POST['password'];
+ if ($_POST['password'] != DMYPWD) {
+ if ($_POST['password'] == $_POST['password_confirm']) {
+ $config['notifications']['growl']['password'] = $_POST['password'];
+ } else {
+ $input_errors[] = gettext("Growl passwords must match");
+ }
+ }
+
$config['notifications']['growl']['name'] = $_POST['name'];
$config['notifications']['growl']['notification_name'] = $_POST['notification_name'];
@@ -158,7 +160,15 @@ if ($_POST) {
$config['notifications']['smtp']['notifyemailaddress'] = $_POST['smtpnotifyemailaddress'];
$config['notifications']['smtp']['username'] = $_POST['smtpusername'];
- $config['notifications']['smtp']['password'] = $_POST['smtppassword'];
+
+ if ($_POST['smtppassword'] != DMYPWD) {
+ if ($_POST['smtppassword'] == $_POST['smtppassword_confirm']) {
+ $config['notifications']['smtp']['password'] = $_POST['smtppassword'];
+ } else {
+ $input_errors[] = gettext("SMTP passwords must match");
+ }
+ }
+
$config['notifications']['smtp']['authentication_mechanism'] = $_POST['smtpauthmech'];
$config['notifications']['smtp']['fromaddress'] = $_POST['smtpfromaddress'];
@@ -175,24 +185,26 @@ if ($_POST) {
unset($config['system']['disablebeep']);
}
- write_config();
-
- pfSenseHeader("system_advanced_notifications.php");
- return;
+ if (!$input_errors) {
+ write_config();
+
+ pfSenseHeader("system_advanced_notifications.php");
+ return;
+ }
}
if (isset($_POST['test-growl'])) {
// Send test message via growl
if ($config['notifications']['growl']['ipaddress'] &&
- $config['notifications']['growl']['password'] = $_POST['password']) {
+ $config['notifications']['growl']['password'] = $_POST['password']) {
unlink_if_exists($g['vardb_path'] . "/growlnotices_lastmsg.txt");
register_via_growl();
notify_via_growl(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true);
}
}
- if (isset($_POST['test-smtp'])) {
+ if (isset($_POST['test-smtp'])) {
// Send test message via smtp
if (file_exists("/var/db/notices_lastmsg.txt")) {
unlink("/var/db/notices_lastmsg.txt");
@@ -201,14 +213,16 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("System"), gettext("Advanced: Notifications"));
+$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("Notifications"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
@@ -219,8 +233,6 @@ $tab_array[] = array(gettext("System Tunables"), false, "system_advanced_sysctl.
$tab_array[] = array(gettext("Notifications"), true, "system_advanced_notifications.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form;
$section = new Form_Section('Growl');
@@ -258,7 +270,7 @@ $section->addInput(new Form_Input(
))->setHelp('This is the IP address that you would like to send growl '.
'notifications to.');
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'password',
'Password',
'text',
@@ -342,12 +354,19 @@ $section->addInput(new Form_Input(
['autocomplete' => 'off']
))->setHelp('Enter the e-mail address username for SMTP authentication.');
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'smtppassword',
'Notification E-Mail auth password',
'password',
$pconfig['smtppassword']
-))->setHelp('Enter the e-mail address password for SMTP authentication.');
+))->setHelp('Enter the e-mail account password for SMTP authentication.');
+
+$section->addInput(new Form_Select(
+ 'smtpauthmech',
+ 'Notification E-Mail auth mechanism',
+ $pconfig['smtpauthmech'],
+ $smtp_authentication_mechanisms
+))->setHelp('Select the authentication mechanism used by the SMTP server. Most work with PLAIN, some servers like Exchange or Office365 might require LOGIN. ');
$section->addInput(new Form_Input(
'test-smtp',
@@ -355,7 +374,7 @@ $section->addInput(new Form_Input(
'submit',
'Test SMTP settings'
))->addClass('btn-info')->setHelp('A test notification will be sent even if the service is '.
- 'marked as disabled.');
+ 'marked as disabled. The last SAVED values will be used, not necessarily the values entered here.');
$form->add($section);
@@ -372,4 +391,4 @@ $section->addInput(new Form_Checkbox(
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_advanced_sysctl.php b/src/usr/local/www/system_advanced_sysctl.php
index 7ea1938..bc49a63 100644
--- a/src/usr/local/www/system_advanced_sysctl.php
+++ b/src/usr/local/www/system_advanced_sysctl.php
@@ -1,13 +1,14 @@
<?php
-/* $Id$ */
/*
system_advanced_sysctl.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -55,13 +56,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: system
-*/
##|+PRIV
##|*IDENT=page-system-advanced-sysctl
-##|*NAME=System: Advanced: Tunables page
+##|*NAME=System: Advanced: Tunables
##|*DESCR=Allow access to the 'System: Advanced: Tunables' page.
##|*MATCH=system_advanced_sysctl.php*
##|-PRIV
@@ -95,12 +93,14 @@ if ($act == "edit") {
$pconfig['tunable'] = $a_tunable[$id]['tunable'];
$pconfig['value'] = $a_tunable[$id]['value'];
$pconfig['descr'] = $a_tunable[$id]['descr'];
+
} else if (isset($tunables[$id])) {
$pconfig['tunable'] = $tunables[$id]['tunable'];
$pconfig['value'] = $tunables[$id]['value'];
$pconfig['descr'] = $tunables[$id]['descr'];
}
}
+
if ($act == "del") {
if ($a_tunable[$id]) {
/* if this is an AJAX caller then handle via JSON */
@@ -108,6 +108,7 @@ if ($act == "del") {
input_errors2Ajax($input_errors);
exit;
}
+
if (!$input_errors) {
unset($a_tunable[$id]);
write_config();
@@ -139,34 +140,43 @@ if ($_POST) {
$tunableent = array();
- $tunableent['tunable'] = $_POST['tunable'];
- $tunableent['value'] = $_POST['value'];
- $tunableent['descr'] = $_POST['descr'];
-
- if (isset($id) && isset($a_tunable[$id])) {
- $a_tunable[$id] = $tunableent;
+ if (!$_POST['tunable'] || !isset($_POST['value'])) {
+ $input_errors[] = gettext("Both a name and a value must be specified.");
+ } else if (!ctype_alnum($_POST['value'])) {
+ $input_errors[] = gettext("The value may contain alphanumeric characters only.");
} else {
- $a_tunable[] = $tunableent;
- }
+ $tunableent['tunable'] = htmlspecialchars($_POST['tunable']);
+ $tunableent['value'] = htmlspecialchars($_POST['value']);
+ $tunableent['descr'] = strip_tags($_POST['descr']);
- mark_subsystem_dirty('sysctl');
- write_config();
- pfSenseHeader("system_advanced_sysctl.php");
- exit;
+ if (isset($id) && isset($a_tunable[$id])) {
+ $a_tunable[$id] = $tunableent;
+ } else {
+ $a_tunable[] = $tunableent;
+ }
+
+ mark_subsystem_dirty('sysctl');
+ write_config();
+ pfSenseHeader("system_advanced_sysctl.php");
+ exit;
+ }
}
}
-$pgtitle = array(gettext("System"), gettext("Advanced: System Tunables"));
+$pgtitle = array(gettext("System"), gettext("Advanced"), gettext("System Tunables"));
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-if ($savemsg)
+}
+
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('sysctl') && ($act != "edit" ))
+if (is_subsystem_dirty('sysctl') && ($act != "edit" )) {
print_info_box_np(gettext("The firewall tunables have changed. You must apply the configuration for them to take affect."));
+}
$tab_array = array();
$tab_array[] = array(gettext("Admin Access"), false, "system_advanced_admin.php");
@@ -177,7 +187,7 @@ $tab_array[] = array(gettext("System Tunables"), true, "system_advanced_sysctl.p
$tab_array[] = array(gettext("Notifications"), false, "system_advanced_notifications.php");
display_top_tabs($tab_array);
-if ($act != "edit" ): ?>
+if ($act != "edit"): ?>
<div class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title"><?=gettext('System Tunables'); ?></h2>
@@ -194,20 +204,26 @@ if ($act != "edit" ): ?>
<th><a class="btn btn-xs btn-primary" href="system_advanced_sysctl.php?act=edit"><?=gettext('New'); ?></a></th>
</tr>
</thead>
- <?php foreach ($tunables as $i => $tunable):
- if (!isset($tunable['modified']))
- $i = $tunable['tunable']; ?>
+ <?php
+ foreach ($tunables as $i => $tunable):
+ if (!isset($tunable['modified'])) {
+ $i = $tunable['tunable'];
+ }
+ ?>
<tr>
<td><?=$tunable['tunable']; ?></td>
<td><?=$tunable['descr']; ?></td>
<td><?=$tunable['value']; ?>
- <?php if($tunable['value'] == "default")
- echo "(" . get_default_sysctl_value($tunable['tunable']) . ")"; ?>
+ <?php
+ if ($tunable['value'] == "default") {
+ echo "(" . get_default_sysctl_value($tunable['tunable']) . ")";
+ }
+ ?>
</td>
<td>
- <a class="btn btn-xs btn-primary" href="system_advanced_sysctl.php?act=edit&amp;id=<?=$i;?>"><?=gettext('Edit'); ?></a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit tunable"); ?>" href="system_advanced_sysctl.php?act=edit&amp;id=<?=$i;?>"></a>
<?php if (isset($tunable['modified'])): ?>
- <a class="btn btn-xs btn-danger" href="system_advanced_sysctl.php?act=del&amp;id=<?=$i;?>"><?=gettext('Delete/Reset'); ?></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete/Reset tunable")?>" href="system_advanced_sysctl.php?act=del&amp;id=<?=$i;?>"></a>
<?php endif; ?>
</td>
</tr>
@@ -221,7 +237,6 @@ if ($act != "edit" ): ?>
</div>
<?php else:
- require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Edit Tunable');
@@ -233,17 +248,17 @@ if ($act != "edit" ): ?>
))->setWidth(4);
$section->addInput(new Form_Input(
- 'descr',
- 'Description',
+ 'value',
+ 'Value',
'text',
- $pconfig['descr']
+ $pconfig['value']
))->setWidth(4);
$section->addInput(new Form_Input(
- 'value',
- 'Value',
+ 'descr',
+ 'Description',
'text',
- $pconfig['value']
+ $pconfig['descr']
))->setWidth(4);
if (isset($id) && $a_tunable[$id]) {
@@ -261,4 +276,4 @@ if ($act != "edit" ): ?>
endif;
-include("fend.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php
index 7b9c6fa..9238e66 100644
--- a/src/usr/local/www/system_authservers.php
+++ b/src/usr/local/www/system_authservers.php
@@ -4,9 +4,7 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc.
- * Copyright (c) 2010 Ermal Luçi
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -55,9 +53,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: auth
-*/
##|+PRIV
##|*IDENT=page-system-authservers
@@ -69,7 +64,7 @@
require("guiconfig.inc");
require_once("auth.inc");
-$pgtitle = array(gettext("System"), gettext("Authentication Servers"));
+$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Authentication Servers"));
$shortcut_section = "authentication";
if (is_numericint($_GET['id'])) {
@@ -401,13 +396,13 @@ if (!($act == "new" || $act == "edit" || $input_errors))
{
?>
<div class="table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Server Name")?></th>
<th><?=gettext("Type")?></th>
<th><?=gettext("Host Name")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
@@ -418,8 +413,8 @@ if (!($act == "new" || $act == "edit" || $input_errors))
<td><?=htmlspecialchars($server['host'])?></td>
<td>
<?php if ($i < (count($a_server) - 1)): ?>
- <a href="system_authservers.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-primary">edit</a>
- <a href="system_authservers.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">delete</a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit server"); ?>" href="system_authservers.php?act=edit&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext("Delete server")?>" href="system_authservers.php?act=del&amp;id=<?=$i?>"></a>
<?php endif?>
</td>
</tr>
@@ -429,14 +424,16 @@ if (!($act == "new" || $act == "edit" || $input_errors))
</div>
<nav class="action-buttons">
- <a href="?act=new" class="btn btn-success">add new</a>
+ <a href="?act=new" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
<?php
include("foot.inc");
exit;
}
-require_once('classes/Form.class.php');
$form = new Form;
$form->setAction('system_authservers.php?act=edit');
@@ -748,7 +745,7 @@ if (isset($id) && $a_server[$id])
$form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
events.push(function(){
function select_clicked() {
@@ -824,7 +821,7 @@ events.push(function(){
}
// ---------- On initial page load ------------------------------------------------------------
-
+
<?php if ($act != 'edit') : ?>
ldap_tmplchange();
<?php endif; ?>
@@ -852,7 +849,7 @@ events.push(function(){
}
?>
// ---------- Click checkbox handlers ---------------------------------------------------------
-
+
$('#ldap_tmpltype').on('change', function() {
ldap_tmplchange();
});
diff --git a/src/usr/local/www/system_camanager.php b/src/usr/local/www/system_camanager.php
index 30f06c7..8092f36 100644
--- a/src/usr/local/www/system_camanager.php
+++ b/src/usr/local/www/system_camanager.php
@@ -1,35 +1,58 @@
<?php
/*
system_camanager.php
-
- Copyright (C) 2008 Shrew Soft Inc.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: certificate_manager
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-camanager
@@ -49,7 +72,7 @@ $ca_methods = array(
$ca_keylens = array("512", "1024", "2048", "4096");
$openssl_digest_algs = array("sha1", "sha224", "sha256", "sha384", "sha512");
-$pgtitle = array(gettext("System"), gettext("Certificate Authority Manager"));
+$pgtitle = array(gettext("System"), gettext("Certificate Manager"), gettext("CAs"));
if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
@@ -294,8 +317,7 @@ if ($_POST) {
array_push($input_errors, "openssl library returns: " . $ssl_err);
}
}
- }
- else if ($pconfig['method'] == "intermediate") {
+ } else if ($pconfig['method'] == "intermediate") {
$dn = array(
'countryName' => $pconfig['dn_country'],
'stateOrProvinceName' => $pconfig['dn_state'],
@@ -330,19 +352,21 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
// Load valid country codes
$dn_cc = array();
-if (file_exists("/etc/ca_countries")){
+if (file_exists("/etc/ca_countries")) {
$dn_cc_file=file("/etc/ca_countries");
- foreach($dn_cc_file as $line) {
+ foreach ($dn_cc_file as $line) {
if (preg_match('/^(\S*)\s(.*)$/', $line, $matches)) {
- $dn_cc[$matches[1]] = $matches[1];
+ $dn_cc[$matches[1]] = $matches[1];
}
}
}
@@ -353,8 +377,7 @@ $tab_array[] = array(gettext("Certificates"), false, "system_certmanager.php");
$tab_array[] = array(gettext("Certificate Revocation"), false, "system_crlmanager.php");
display_top_tabs($tab_array);
-if (!($act == "new" || $act == "edit" || $act == gettext("Save") || $input_errors))
-{
+if (!($act == "new" || $act == "edit" || $act == gettext("Save") || $input_errors)) {
?>
<div class="table-responsive">
<table class="table table-striped table-hover">
@@ -365,7 +388,7 @@ if (!($act == "new" || $act == "edit" || $act == gettext("Save") || $input_error
<th><?=gettext("Issuer")?></th>
<th><?=gettext("Certificates")?></th>
<th><?=gettext("Distinguished Name")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
@@ -375,28 +398,34 @@ foreach ($a_ca as $i => $ca):
$subj = cert_get_subject($ca['crt']);
$issuer = cert_get_issuer($ca['crt']);
list($startdate, $enddate) = cert_get_dates($ca['crt']);
- if ($subj == $issuer)
+ if ($subj == $issuer) {
$issuer_name = gettext("self-signed");
- else
+ } else {
$issuer_name = gettext("external");
+ }
$subj = htmlspecialchars($subj);
$issuer = htmlspecialchars($issuer);
$certcount = 0;
$issuer_ca = lookup_ca($ca['caref']);
- if ($issuer_ca)
+ if ($issuer_ca) {
$issuer_name = $issuer_ca['descr'];
+ }
// TODO : Need gray certificate icon
$internal = (!!$ca['prv']);
- foreach ($a_cert as $cert)
- if ($cert['caref'] == $ca['refid'])
+ foreach ($a_cert as $cert) {
+ if ($cert['caref'] == $ca['refid']) {
$certcount++;
+ }
+ }
- foreach ($a_ca as $cert)
- if ($cert['caref'] == $ca['refid'])
+ foreach ($a_ca as $cert) {
+ if ($cert['caref'] == $ca['refid']) {
$certcount++;
+ }
+ }
?>
<tr>
<td><?=$name?></td>
@@ -411,39 +440,33 @@ foreach ($a_ca as $i => $ca):
</small>
</td>
<td>
- <a href="system_camanager.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-primary">
- <?=gettext("edit")?>
- </a>
- <a href="system_camanager.php?act=exp&amp;id=<?=$i?>" class="btn btn-xs btn-default">
- <?=gettext("export cert")?>
- </a>
- <?php if ($ca['prv']): ?>
- <a href="system_camanager.php?act=expkey&amp;id=<?=$i?>" class="btn btn-xs btn-default">
- <?=gettext("export private key")?>
- </a>
- <?php endif?>
- <a href="system_camanager.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">
- <?=gettext("delete")?>
- </a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit")?>" href="system_camanager.php?act=edit&amp;id=<?=$i?>"></a>
+ <a class="fa fa-sign-in" title="<?=gettext("Export")?>" href="system_camanager.php?act=exp&amp;id=<?=$i?>"></a>
+ <?php if ($ca['prv']): ?>
+ <a class="fa fa-key" title="<?=gettext("Export key")?>" href="system_camanager.php?act=expkey&amp;id=<?=$i?>"></a>
+ <?php endif?>
+ <a class="fa fa-trash" title="<?=gettext("Delete")?>" href="system_camanager.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
+</div>
<nav class="action-buttons">
- <a href="?act=new" class="btn btn-success">add new</a>
+ <a href="?act=new" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
<?
include("foot.inc");
exit;
}
-require_once('classes/Form.class.php');
$form = new Form;
//$form->setAction('system_camanager.php?act=edit');
-if (isset($id) && $a_ca[$id])
-{
+if (isset($id) && $a_ca[$id]) {
$form->addGlobal(new Form_Input(
'id',
null,
@@ -452,8 +475,7 @@ if (isset($id) && $a_ca[$id])
));
}
-if ($act == "edit")
-{
+if ($act == "edit") {
$form->addGlobal(new Form_Input(
'refid',
null,
@@ -471,8 +493,7 @@ $section->addInput(new Form_Input(
$pconfig['descr']
));
-if (!isset($id) || $act == "edit")
-{
+if (!isset($id) || $act == "edit") {
$section->addInput(new Form_Select(
'method',
'Method',
@@ -514,10 +535,10 @@ $section = new Form_Section('Internal Certificate Authority');
$section->addClass('toggle-internal', 'toggle-intermediate', 'collapse');
$allCas = array();
-foreach ($a_ca as $ca)
-{
- if (!$ca['prv'])
+foreach ($a_ca as $ca) {
+ if (!$ca['prv']) {
continue;
+ }
$allCas[ $ca['refid'] ] = $ca['descr'];
}
@@ -612,4 +633,5 @@ foreach ($a_ca as $ca) {
}
}
-include('foot.inc'); \ No newline at end of file
+include('foot.inc');
+?> \ No newline at end of file
diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php
index 60d18aa..9fa7e51 100644
--- a/src/usr/local/www/system_certmanager.php
+++ b/src/usr/local/www/system_certmanager.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc.
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -54,9 +53,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: certificate_manager
-*/
##|+PRIV
##|*IDENT=page-system-certmanager
@@ -83,7 +79,7 @@ $cert_types = array(
$altname_types = array("DNS", "IP", "email", "URI");
$openssl_digest_algs = array("sha1", "sha224", "sha256", "sha384", "sha512");
-$pgtitle = array(gettext("System"), gettext("Certificate Manager"));
+$pgtitle = array(gettext("System"), gettext("Certificate Manager"), gettext("Certificates"));
if (is_numericint($_GET['userid'])) {
$userid = $_GET['userid'];
@@ -175,6 +171,24 @@ if ($act == "exp") {
exit;
}
+if ($act == "req") {
+
+ if (!$a_cert[$id]) {
+ pfSenseHeader("system_certmanager.php");
+ exit;
+ }
+
+ $exp_name = urlencode("{$a_cert[$id]['descr']}.req");
+ $exp_data = base64_decode($a_cert[$id]['csr']);
+ $exp_size = strlen($exp_data);
+
+ header("Content-Type: application/octet-stream");
+ header("Content-Disposition: attachment; filename={$exp_name}");
+ header("Content-Length: $exp_size");
+ echo $exp_data;
+ exit;
+}
+
if ($act == "key") {
if (!$a_cert[$id]) {
@@ -223,7 +237,6 @@ if ($act == "p12") {
}
if ($act == "csr") {
-
if (!$a_cert[$id]) {
pfSenseHeader("system_certmanager.php");
exit;
@@ -234,9 +247,8 @@ if ($act == "csr") {
}
if ($_POST) {
-
// This is just the blank altername name that is added for display purposes. We don't want to validate/save it
- if($_POST['altname_value0'] == "") {
+ if ($_POST['altname_value0'] == "") {
unset($_POST['altname_type0']);
unset($_POST['altname_value0']);
}
@@ -305,8 +317,7 @@ if ($_POST) {
if (!substr_compare('altname_type', $key, 0, 12)) {
$entry = substr($key, 12);
$field = 'type';
- }
- elseif (!substr_compare('altname_value', $key, 0, 13)) {
+ } elseif (!substr_compare('altname_value', $key, 0, 13)) {
$entry = substr($key, 13);
$field = 'value';
}
@@ -456,6 +467,7 @@ if ($_POST) {
}
$dn['subjectAltName'] = implode(",", $altnames_tmp);
}
+
if (!csr_generate($cert, $pconfig['csr_keylen'], $dn, $pconfig['csr_digest_alg'])) {
while ($ssl_err = openssl_error_string()) {
$input_errors = array();
@@ -494,8 +506,8 @@ if ($_POST) {
/* input validation */
$reqdfields = explode(" ", "descr cert");
$reqdfieldsn = array(
- gettext("Descriptive name"),
- gettext("Final Certificate data"));
+ gettext("Descriptive name"),
+ gettext("Final Certificate data"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
@@ -549,11 +561,13 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("CAs"), false, "system_camanager.php");
@@ -563,144 +577,24 @@ display_top_tabs($tab_array);
// Load valid country codes
$dn_cc = array();
-if (file_exists("/etc/ca_countries")){
+if (file_exists("/etc/ca_countries")) {
$dn_cc_file=file("/etc/ca_countries");
- foreach($dn_cc_file as $line) {
+ foreach ($dn_cc_file as $line) {
if (preg_match('/^(\S*)\s(.*)$/', $line, $matches)) {
$dn_cc[$matches[1]] = $matches[1];
}
}
}
-if (!($act == "new" || (($_POST['save'] == gettext("Save")) && $input_errors)))
-{
-?>
-<div class="table-responsive">
-<table class="table table-striped table-hover">
- <thead>
- <tr>
- <th><?=gettext("Name")?></th>
- <th><?=gettext("Issuer")?></th>
- <th><?=gettext("Distinguished Name")?></th>
- <th><?=gettext("In Use")?></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
-<?php
-foreach($a_cert as $i => $cert):
- $name = htmlspecialchars($cert['descr']);
-
- if ($cert['crt']) {
- $subj = cert_get_subject($cert['crt']);
- $issuer = cert_get_issuer($cert['crt']);
- $purpose = cert_get_purpose($cert['crt']);
- list($startdate, $enddate) = cert_get_dates($cert['crt']);
-
- if ($subj==$issuer)
- $caname = '<i>'. gettext("self-signed") .'</i>';
- else
- $caname = '<i>'. gettext("external").'</i>';
-
- $subj = htmlspecialchars($subj);
- }
-
- if ($cert['csr']) {
- $subj = htmlspecialchars(csr_get_subject($cert['csr']));
- $caname = "<em>" . gettext("external - signature pending") . "</em>";
- }
-
- $ca = lookup_ca($cert['caref']);
- if ($ca)
- $caname = $ca['descr'];
-?>
- <tr>
- <td>
- <?=$name?><br />
- <?php if ($cert['type']): ?>
- <i><?=$cert_types[$cert['type']]?></i><br />
- <?php endif?>
- <?php if (is_array($purpose)): ?>
- CA: <b><?=$purpose['ca']?></b>, Server: <b><?=$purpose['server']?></b>
- <?php endif?>
- </td>
- <td><?=$caname?></td>
- <td>
- <?=$subj?>
- <br />
- <small>
- <?=gettext("Valid From")?>: <b><?=$startdate ?></b><br /><?=gettext("Valid Until")?>: <b><?=$enddate ?></b>
- </small>
- </td>
- <td>
- <?php if (is_cert_revoked($cert)): ?>
- <i>Revoked </i>
- <?php endif?>
- <?php if (is_webgui_cert($cert['refid'])): ?>
- webConfigurator
- <?php endif?>
- <?php if (is_user_cert($cert['refid'])): ?>
- User Cert
- <?php endif?>
- <?php if (is_openvpn_server_cert($cert['refid'])): ?>
- OpenVPN Server
- <?php endif?>
- <?php if (is_openvpn_client_cert($cert['refid'])): ?>
- OpenVPN Client
- <?php endif?>
- <?php if (is_ipsec_cert($cert['refid'])): ?>
- IPsec Tunnel
- <?php endif?>
- <?php if (is_captiveportal_cert($cert['refid'])): ?>
- Captive Portal
- <?php endif?>
- </td>
- <td>
- <a href="system_certmanager.php?act=exp&amp;id=<?=$i?>" class="btn btn-xs btn-default">
- <?=gettext("export")?>
- </a>
- <a href="system_certmanager.php?act=key&amp;id=<?=$i?>" class="btn btn-xs btn-default">
- <?=gettext("export key")?>
- </a>
- <a href="system_certmanager.php?act=p12&amp;id=<?=$i?>" class="btn btn-xs btn-default">
- <?=gettext("export p12")?>
- </a>
- <?php if (!cert_in_use($cert['refid'])): ?>
- <a href="system_certmanager.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">
- <?=gettext("delete")?>
- </a>
- <?php endif?>
- <?php if ($cert['csr']): ?>
- <a href="system_certmanager.php?act=csr&amp;id=<?=$i?>" class="btn btn-xs btn-default">
- <?=gettext("update csr")?>
- </a>
- <?php endif?>
- </td>
- </tr>
-<?php endforeach; ?>
- </tbody>
-</table>
-</div>
-
-<nav class="action-buttons">
- <a href="?act=new" class="btn btn-success">add new</a>
-</nav>
-<?
- include("foot.inc");
- exit;
-}
-
-require_once('classes/Form.class.php');
+if ($act == "new" || (($_POST['save'] == gettext("Save")) && $input_errors)) {
$form = new Form;
-if ($act == "csr" || (($_POST['save'] == gettext("Update")) && $input_errors))
-{
+if ($act == "csr" || (($_POST['save'] == gettext("Update")) && $input_errors)) {
$form->setAction('system_certmanager.php?act=csr');
$section = new Form_Section('Complete Signing Request');
- if (isset($id) && $a_cert[$id])
- {
+ if (isset($id) && $a_cert[$id]) {
$form->addGlobal(new Form_Input(
'id',
null,
@@ -726,7 +620,7 @@ if ($act == "csr" || (($_POST['save'] == gettext("Update")) && $input_errors))
$section->addInput(new Form_Textarea(
'cert',
'Final certificate data',
- $pconfig["cert"]
+ $pconfig['cert']
))->setHelp('Paste the certificate received from your certificate authority here.');
$form->add($section);
@@ -738,8 +632,7 @@ if ($act == "csr" || (($_POST['save'] == gettext("Update")) && $input_errors))
$form->setAction('system_certmanager.php?act=edit');
-if (isset($userid) && $a_user)
-{
+if (isset($userid) && $a_user) {
$form->addGlobal(new Form_Input(
'userid',
null,
@@ -748,8 +641,7 @@ if (isset($userid) && $a_user)
));
}
-if (isset($id) && $a_cert[$id])
-{
+if (isset($id) && $a_cert[$id]) {
$form->addGlobal(new Form_Input(
'id',
null,
@@ -760,8 +652,7 @@ if (isset($id) && $a_cert[$id])
$section = new Form_Section('Add a new certificate');
-if (!isset($id))
-{
+if (!isset($id)) {
$section->addInput(new Form_Select(
'method',
'Method',
@@ -797,22 +688,19 @@ $form->add($section);
$section = new Form_Section('Internal Certificate');
$section->addClass('toggle-internal collapse');
-if (!$internal_ca_count)
-{
+if (!$internal_ca_count) {
$section->addInput(new Form_StaticText(
'Certificate authority',
gettext('No internal Certificate Authorities have been defined. You must ').
'<a href="system_camanager.php?act=new&amp;method=internal"> '. gettext(" create") .'</a>'.
gettext(' an internal CA before creating an internal certificate.')
));
-}
-else
-{
+} else {
$allCas = array();
- foreach ($a_ca as $ca)
- {
- if (!$ca['prv'])
- continue;
+ foreach ($a_ca as $ca) {
+ if (!$ca['prv']) {
+ continue;
+ }
$allCas[ $ca['refid'] ] = $ca['descr'];
}
@@ -902,8 +790,7 @@ $section->addInput(new Form_Input(
['placeholder' => 'e.g. www.example.com']
));
-if (empty($pconfig['altnames']['item']))
-{
+if (empty($pconfig['altnames']['item'])) {
$pconfig['altnames']['item'] = array(
array('type' => null, 'value' => null)
);
@@ -960,21 +847,21 @@ $section->addInput(new Form_Select(
'csr_keylen',
'Key length',
$pconfig['csr_keylen'],
- $cert_keylens
+ array_combine($cert_keylens, $cert_keylens)
));
$section->addInput(new Form_Select(
'csr_digest_alg',
'Digest Algorithm',
$pconfig['csr_digest_alg'],
- $openssl_digest_algs
+ array_combine($openssl_digest_algs, $openssl_digest_algs)
))->setHelp('NOTE: It is recommended to use an algorithm stronger than '.
'SHA1 when possible');
$section->addInput(new Form_Select(
- 'dn_country',
+ 'csr_dn_country',
'Country Code',
- $pconfig['dn_country'],
+ $pconfig['csr_dn_country'],
$dn_cc
));
@@ -1025,19 +912,23 @@ $section->addClass('toggle-existing collapse');
$existCerts = array();
foreach ($config['cert'] as $cert) {
- if(is_array($config['system']['user'][$userid]['cert'])) { // Could be MIA!
- if (isset($userid) && in_array($cert['refid'], $config['system']['user'][$userid]['cert']))
+ if (is_array($config['system']['user'][$userid]['cert'])) { // Could be MIA!
+ if (isset($userid) && in_array($cert['refid'], $config['system']['user'][$userid]['cert'])) {
continue;
+ }
}
$ca = lookup_ca($cert['caref']);
- if ($ca)
+ if ($ca) {
$cert['descr'] .= " (CA: {$ca['descr']})";
+ }
- if (cert_in_use($cert['refid']))
+ if (cert_in_use($cert['refid'])) {
$cert['descr'] .= " <i>In Use</i>";
- if (is_cert_revoked($cert))
+ }
+ if (is_cert_revoked($cert)) {
$cert['descr'] .= " <b>Revoked</b>";
+ }
$existCerts[ $cert['refid'] ] = $cert['descr'];
}
@@ -1053,10 +944,176 @@ $section->addInput(new Form_Select(
$form->add($section);
print $form;
+} else if ($act == "csr" || (($_POST['save'] == gettext("Update")) && $input_errors)) {
+ $form = new Form(new Form_Button(
+ 'save',
+ 'Update'
+ ));
+
+ $section = new Form_Section("Complete signing request for " . $pconfig['descr']);
+
+ $section->addInput(new Form_Input(
+ 'descr',
+ 'Descriptive name',
+ 'text',
+ $pconfig['descr']
+ ));
+
+ $section->addInput(new Form_Textarea(
+ 'csr',
+ 'Signing request data',
+ $pconfig['csr']
+ ))->setReadonly()
+ ->setWidth(7)
+ ->setHelp('Copy the certificate signing data from here and forward it to your certificate authority for signing.');
+
+ $section->addInput(new Form_Textarea(
+ 'cert',
+ 'Final certificate data',
+ $pconfig['cert']
+ ))->setWidth(7)
+ ->setHelp('Paste the certificate received from your certificate authority here.');
+
+ if (isset($id) && $a_cert[$id]) {
+ $section->addInput(new Form_Input(
+ 'id',
+ null,
+ 'hidden',
+ $id
+ ));
+
+ $section->addInput(new Form_Input(
+ 'act',
+ null,
+ 'hidden',
+ 'csr'
+ ));
+ }
+
+ $form->add($section);
+ print($form);
+} else {
+?>
+<div class="table-responsive">
+<table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th><?=gettext("Name")?></th>
+ <th><?=gettext("Issuer")?></th>
+ <th><?=gettext("Distinguished Name")?></th>
+ <th><?=gettext("In Use")?></th>
+ <th class="col-sm-2"><?=gettext("Actions")?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+foreach ($a_cert as $i => $cert):
+ $name = htmlspecialchars($cert['descr']);
+
+ if ($cert['crt']) {
+ $subj = cert_get_subject($cert['crt']);
+ $issuer = cert_get_issuer($cert['crt']);
+ $purpose = cert_get_purpose($cert['crt']);
+ list($startdate, $enddate) = cert_get_dates($cert['crt']);
+
+ if ($subj == $issuer) {
+ $caname = '<i>'. gettext("self-signed") .'</i>';
+ } else {
+ $caname = '<i>'. gettext("external").'</i>';
+ }
+
+ $subj = htmlspecialchars($subj);
+ }
+
+ if ($cert['csr']) {
+ $subj = htmlspecialchars(csr_get_subject($cert['csr']));
+ $caname = "<em>" . gettext("external - signature pending") . "</em>";
+ }
+
+ $ca = lookup_ca($cert['caref']);
+ if ($ca) {
+ $caname = $ca['descr'];
+ }
?>
-<script>
+ <tr>
+ <td>
+ <?=$name?><br />
+ <?php if ($cert['type']): ?>
+ <i><?=$cert_types[$cert['type']]?></i><br />
+ <?php endif?>
+ <?php if (is_array($purpose)): ?>
+ CA: <b><?=$purpose['ca']?></b>, Server: <b><?=$purpose['server']?></b>
+ <?php endif?>
+ </td>
+ <td><?=$caname?></td>
+ <td>
+ <?=$subj?>
+ <?php if (!$cert['csr']): ?>
+ <br />
+ <small>
+ <?=gettext("Valid From")?>: <b><?=$startdate ?></b><br /><?=gettext("Valid Until")?>: <b><?=$enddate ?></b>
+ </small>
+ <?php endif?>
+ </td>
+ <td>
+ <?php if (is_cert_revoked($cert)): ?>
+ <i>Revoked </i>
+ <?php endif?>
+ <?php if (is_webgui_cert($cert['refid'])): ?>
+ webConfigurator
+ <?php endif?>
+ <?php if (is_user_cert($cert['refid'])): ?>
+ User Cert
+ <?php endif?>
+ <?php if (is_openvpn_server_cert($cert['refid'])): ?>
+ OpenVPN Server
+ <?php endif?>
+ <?php if (is_openvpn_client_cert($cert['refid'])): ?>
+ OpenVPN Client
+ <?php endif?>
+ <?php if (is_ipsec_cert($cert['refid'])): ?>
+ IPsec Tunnel
+ <?php endif?>
+ <?php if (is_captiveportal_cert($cert['refid'])): ?>
+ Captive Portal
+ <?php endif?>
+ </td>
+ <td>
+ <?php if (!$cert['csr']): ?>
+ <a href="system_certmanager.php?act=exp&amp;id=<?=$i?>" class="fa fa-sign-in" title="<?=gettext("Export Certificate")?>"></a>
+ <a href="system_certmanager.php?act=key&amp;id=<?=$i?>" class="fa fa-key" title="<?=gettext("Export Key")?>"></a>
+ <a href="system_certmanager.php?act=p12&amp;id=<?=$i?>" class="fa fa-key" title="<?=gettext("Export P12")?>"> P12</a>
+ <?php else: ?>
+ <a href="system_certmanager.php?act=csr&amp;id=<?=$i?>" class="fa fa-pencil" title="<?=gettext("Update CSR")?>"></a>
+ <a href="system_certmanager.php?act=req&amp;id=<?=$i?>" class="fa fa-sign-in" title="<?=gettext("Export Request")?>"></a>
+ <a href="system_certmanager.php?act=key&amp;id=<?=$i?>" class="fa fa-key" title="<?=gettext("Export Key")?>"></a>
+ <?php endif?>
+ <?php if (!cert_in_use($cert['refid'])): ?>
+ <a href="system_certmanager.php?act=del&amp;id=<?=$i?>" class="fa fa-trash" title="<?=gettext("Delete")?>"></a>
+ <?php endif?>
+ </td>
+ </tr>
+<?php endforeach; ?>
+ </tbody>
+</table>
+</div>
+
+<nav class="action-buttons">
+ <a href="?act=new" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+</nav>
+<?
+ include("foot.inc");
+ exit;
+}
+
+
+?>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
<?php if ($internal_ca_count): ?>
function internalca_change() {
@@ -1087,7 +1144,7 @@ events.push(function(){
}
// ---------- Click checkbox handlers ---------------------------------------------------------
-
+
$('#caref').on('change', function() {
internalca_change();
});
@@ -1096,6 +1153,9 @@ events.push(function(){
internalca_change();
+ // Suppress "Delete row" button if there are fewer than two rows
+ checkLastRow();
+
<?php endif; ?>
diff --git a/src/usr/local/www/system_crlmanager.php b/src/usr/local/www/system_crlmanager.php
index 4b19103..e2ef21e 100644
--- a/src/usr/local/www/system_crlmanager.php
+++ b/src/usr/local/www/system_crlmanager.php
@@ -4,8 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2010 Jim Pingle
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,9 +52,6 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: certificate_manager
-*/
##|+PRIV
##|*IDENT=page-system-crlmanager
@@ -72,7 +67,7 @@ require_once("vpn.inc");
global $openssl_crl_status;
-$pgtitle = array(gettext("System"), gettext("Certificate Revocation List Manager"));
+$pgtitle = array(gettext("System"), gettext("Certificate Manager"), gettext("Certificate Revocation Lists"));
$crl_methods = array(
"internal" => gettext("Create an internal Certificate Revocation List"),
@@ -329,9 +324,10 @@ function build_method_list() {
$list = array();
- foreach($crl_methods as $method => $desc) {
- if (($_GET['importonly'] == "yes") && ($method != "existing"))
+ foreach ($crl_methods as $method => $desc) {
+ if (($_GET['importonly'] == "yes") && ($method != "existing")) {
continue;
+ }
$list[$method] = $desc;
}
@@ -344,8 +340,9 @@ function build_ca_list() {
$list = array();
- foreach($a_ca as $ca)
+ foreach ($a_ca as $ca) {
$list[$ca['refid']] = $ca['descr'];
+ }
return($list);
}
@@ -355,17 +352,20 @@ function build_cacert_list() {
$list = array();
- foreach($ca_certs as $cert)
+ foreach($ca_certs as $cert) {
$list[$cert['refid']] = $cert['descr'];
+ }
return($list);
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'sucess');
+}
$tab_array = array();
$tab_array[] = array(gettext("CAs"), false, "system_camanager.php");
@@ -373,8 +373,6 @@ $tab_array[] = array(gettext("Certificates"), false, "system_certmanager.php");
$tab_array[] = array(gettext("Certificate Revocation"), true, "system_crlmanager.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
if ($act == "new" || $act == gettext("Save") || $input_errors) {
if (!isset($id)) {
$form = new Form();
@@ -496,9 +494,9 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Currently Revoked Certificates for CRL") . ': ' . $crl['descr']?></h2></div>
<div class="panel-body table-responsive">
<?php
- if (!is_array($crl['cert']) || (count($crl['cert']) == 0))
+ if (!is_array($crl['cert']) || (count($crl['cert']) == 0)) {
print_info_box(gettext("No Certificates Found for this CRL."), 'danger');
- else {
+ } else {
?>
<table class="table table-striped table-hover table-condensed">
<thead>
@@ -511,7 +509,7 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
</thead>
<tbody>
<?php
- foreach($crl['cert'] as $i => $cert):
+ foreach ($crl['cert'] as $i => $cert):
$name = htmlspecialchars($cert['descr']);
?>
<tr>
@@ -526,7 +524,7 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
</td>
<td class="list">
<a href="system_crlmanager.php?act=delcert&amp;id=<?=$crl['refid']; ?>&amp;certref=<?=$cert['refid']; ?>" onclick="return confirm('<?=gettext("Do you really want to delete this Certificate from the CRL?")?>')">
- <i class="icon-large icon-remove-sign" title="<?=gettext("Delete this certificate from the CRL ")?>" alt="<?=gettext("Delete this certificate from the CRL ")?>"></i>
+ <i class="fa fa-times-circle" title="<?=gettext("Delete this certificate from the CRL ")?>" alt="<?=gettext("Delete this certificate from the CRL ")?>"></i>
</a>
</td>
</tr>
@@ -535,66 +533,71 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
?>
</tbody>
</table>
-<?php } ?>
+<?php
+ }
+?>
</div>
</div>
<?php
$ca_certs = array();
- foreach($a_cert as $cert)
- if ($cert['caref'] == $crl['caref'])
+ foreach ($a_cert as $cert) {
+ if ($cert['caref'] == $crl['caref']) {
$ca_certs[] = $cert;
+ }
+ }
- if (count($ca_certs) == 0)
+ if (count($ca_certs) == 0) {
print_info_box(gettext("No Certificates Found for this CA."), 'danger');
- else
+ } else {
+ $section = new Form_Section('Choose a certificate to revoke');
+ $group = new Form_Group(null);
- $section = new Form_Section('Choose a certificate to revoke');
- $group = new Form_Group(null);
+ $group->add(new Form_Select(
+ 'certref',
+ null,
+ $pconfig['certref'],
+ build_cacert_list()
+ ))->setWidth(4)->setHelp('Certificate');
- $group->add(new Form_Select(
- 'certref',
- null,
- $pconfig['certref'],
- build_cacert_list()
- ))->setWidth(4)->setHelp('Certificate');
+ $group->add(new Form_Select(
+ 'crlreason',
+ null,
+ -1,
+ $openssl_crl_status
+ ))->setHelp('Reason');
- $group->add(new Form_Select(
- 'crlreason',
- null,
- -1,
- $openssl_crl_status
- ))->setHelp('Reason');
+ $group->add(new Form_Button(
+ 'submit',
+ 'Add'
+ ))->removeClass('btn-primary')->addClass('btn-success btn-sm');
- $group->add(new Form_Button(
- 'submit',
- 'Add'
- ))->removeClass('btn-primary')->addClass('btn-success btn-sm');
+ $section->add($group);
- $section->add($group);
+ $section->addInput(new Form_Input(
+ 'id',
+ null,
+ 'hidden',
+ $crl['refid']
+ ));
- $section->addInput(new Form_Input(
- 'id',
- null,
- 'hidden',
- $crl['refid']
- ));
+ $section->addInput(new Form_Input(
+ 'act',
+ null,
+ 'hidden',
+ 'addcert'
+ ));
- $section->addInput(new Form_Input(
- 'act',
- null,
- 'hidden',
- 'addcert'
- ));
+ $section->addInput(new Form_Input(
+ 'crlref',
+ null,
+ 'hidden',
+ $crl['refid']
+ ));
- $section->addInput(new Form_Input(
- 'crlref',
- null,
- 'hidden',
- $crl['refid']
- ));
+ $form->add($section);
+ }
- $form->add($section);
print($form);
} else {
?>
@@ -614,20 +617,21 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
</thead>
<tbody>
<?php
- $caimg = "/themes/{$g['theme']}/images/icons/icon_frmfld_cert.png";
// Map CRLs to CAs in one pass
$ca_crl_map = array();
- foreach($a_crl as $crl)
+ foreach ($a_crl as $crl) {
$ca_crl_map[$crl['caref']][] = $crl['refid'];
+ }
$i = 0;
- foreach($a_ca as $ca):
+ foreach ($a_ca as $ca):
$name = htmlspecialchars($ca['descr']);
- if($ca['prv']) {
+ if ($ca['prv']) {
$cainternal = "YES";
- } else
+ } else {
$cainternal = "NO";
+ }
?>
<tr>
<td colspan="4">
@@ -635,22 +639,25 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
</td>
<td>
<?php
- if ($cainternal == "YES"): ?>
+ if ($cainternal == "YES"):
+?>
<a href="system_crlmanager.php?act=new&amp;caref=<?=$ca['refid']; ?>" class="btn btn-xs btn-success">
<?=gettext("Add or Import CRL")?>
</a>
<?php
- else: ?>
+ else:
+?>
<a href="system_crlmanager.php?act=new&amp;caref=<?=$ca['refid']; ?>&amp;importonly=yes" class="btn btn-xs btn-success">
<?=gettext("Add or Import CRL")?>
</a>
<?php
- endif; ?>
+ endif;
+?>
</td>
</tr>
<?php
if (is_array($ca_crl_map[$ca['refid']])):
- foreach($ca_crl_map[$ca['refid']] as $crl):
+ foreach ($ca_crl_map[$ca['refid']] as $crl):
$tmpcrl = lookup_crl($crl);
$internal = is_crl_internal($tmpcrl);
$inuse = crl_in_use($tmpcrl['refid']);
@@ -670,17 +677,20 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
<?=gettext("Edit CRL")?>
</a>
<?php
- else: ?>
+ else:
+?>
<a href="system_crlmanager.php?act=editimported&amp;id=<?=$tmpcrl['refid']?>" class="btn btn-xs btn-info">
<?=gettext("Edit CRL")?>
</a>
<?php endif;
- if (!$inuse): ?>
+ if (!$inuse):
+?>
<a href="system_crlmanager.php?act=del&amp;id=<?=$tmpcrl['refid']?>" class="btn btn-xs btn-danger">
<?=gettext("Delete CRL")?>
</a>
<?php
- endif; ?>
+ endif;
+?>
</td>
</tr>
<?php
@@ -702,14 +712,15 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) {
<script>
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Hides all elements of the specified class. This will usually be a section or group
function hideClass(s_class, hide) {
- if(hide)
+ if (hide) {
$('.' + s_class).hide();
- else
+ } else {
$('.' + s_class).show();
+ }
}
// When the 'method" selector is changed, we show/hide certain sections
diff --git a/src/usr/local/www/system_firmware.php b/src/usr/local/www/system_firmware.php
deleted file mode 100644
index b211a5c..0000000
--- a/src/usr/local/www/system_firmware.php
+++ /dev/null
@@ -1,331 +0,0 @@
-<?php
-/* $Id$ */
-/*
- system_firmware.php
- Copyright (C) 2008 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/tar
- pfSense_MODULE: firmware
-*/
-
-##|+PRIV
-##|*IDENT=page-system-firmware-manualupdate
-##|*NAME=System: Firmware: Manual Update page
-##|*DESCR=Allow access to the 'System: Firmware: Manual Update' page.
-##|*MATCH=system_firmware.php*
-##|-PRIV
-
-$d_isfwfile = 1;
-$nocsrf = true;
-
-require_once("globals.inc");
-require_once("functions.inc");
-require_once("guiconfig.inc");
-require_once("xmlrpc_client.inc");
-
-$curcfg = $config['system']['firmware'];
-
-/* Allow additional execution time 0 = no limit. */
-ini_set('max_execution_time', '9999');
-ini_set('max_input_time', '9999');
-
-function file_is_for_platform($filename, $ul_name) {
- global $g;
- if ($g['platform'] == "nanobsd") {
- if (stristr($ul_name, "nanobsd")) {
- return true;
- } else {
- return false;
- }
- }
- $_gb = exec("/usr/bin/tar xzf $filename -C /tmp/ etc/platform");
- unset($_gb);
- if (!file_exists("/tmp/etc/platform")) {
- return false;
- }
- $upgrade_is_for_platform = trim(file_get_contents("/tmp/etc/platform", " \n\t\r"));
- if ($g['platform'] == $upgrade_is_for_platform) {
- @unlink("/tmp/etc/platform");
- return true;
- }
- return false;
-}
-
-function file_upload_error_message($error_code) {
- switch ($error_code) {
- case UPLOAD_ERR_INI_SIZE:
- return gettext('The uploaded file exceeds the upload_max_filesize directive in php.ini');
- case UPLOAD_ERR_FORM_SIZE:
- return gettext('The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form');
- case UPLOAD_ERR_PARTIAL:
- return gettext('The uploaded file was only partially uploaded');
- case UPLOAD_ERR_NO_FILE:
- return gettext('No file was uploaded');
- case UPLOAD_ERR_NO_TMP_DIR:
- return gettext('Missing a temporary folder');
- case UPLOAD_ERR_CANT_WRITE:
- return gettext('Failed to write file to disk');
- case UPLOAD_ERR_EXTENSION:
- return gettext('File upload stopped by extension');
- default:
- return gettext('Unknown upload error');
- }
-}
-
-/* if upgrade in progress, alert user */
-if (is_subsystem_dirty('firmwarelock')) {
- $pgtitle = array(gettext("System"), gettext("Firmware"), gettext("Manual Update"));
- include("head.inc");
- include("fbegin.inc");
- print_info_box(gettext("An upgrade is currently in progress. The firewall will reboot when the operation is complete.") . "<p><img src='/themes/{$g['theme']}/images/icons/icon_fw-update.gif' alt='update' /></p>");
- include("foot.inc");
- exit;
-}
-
-if ($_POST['backupbeforeupgrade']) {
- touch("/tmp/perform_full_backup.txt");
-}
-
-/* Handle manual upgrade */
-if ($_POST && !is_subsystem_dirty('firmwarelock')) {
-
- unset($input_errors);
- unset($sig_warning);
-
- if (stristr($_POST['Submit'], gettext("Enable"))) {
- $mode = "enable";
- } else if (stristr($_POST['Submit'], gettext("Disable"))) {
- $mode = "disable";
- } else if (stristr($_POST['Submit'], gettext("Upgrade")) || $_POST['sig_override']) {
- $mode = "upgrade";
- } else if ($_POST['sig_no']) {
- if (file_exists("{$g['upload_path']}/firmware.tgz")) {
- unlink("{$g['upload_path']}/firmware.tgz");
- }
- }
- if ($mode) {
- if ($mode == "enable") {
- conf_mount_rw();
- mark_subsystem_dirty('firmware');
- } else if ($mode == "disable") {
- conf_mount_ro();
- clear_subsystem_dirty('firmware');
- } else if ($mode == "upgrade") {
- if ($_FILES['ulfile']['error']) {
- $errortext = "(" . file_upload_error_message($_FILES['ulfile']['error']) . ")";
- }
- if (is_uploaded_file($_FILES['ulfile']['tmp_name'])) {
- /* verify firmware image(s) */
- if (file_is_for_platform($_FILES['ulfile']['tmp_name'], $_FILES['ulfile']['name']) == false && !$_POST['sig_override']) {
- $input_errors[] = gettext("The uploaded image file is not for this platform.");
- } else if (!file_exists($_FILES['ulfile']['tmp_name'])) {
- /* probably out of memory for the MFS */
- $input_errors[] = gettext("Image upload failed (out of memory?)");
- mwexec("/etc/rc.firmware disable");
- clear_subsystem_dirty('firmware');
- } else {
- /* move the image so PHP won't delete it */
- rename($_FILES['ulfile']['tmp_name'], "{$g['upload_path']}/firmware.tgz");
-
- /* check digital signature */
- $sigchk = verify_digital_signature("{$g['upload_path']}/firmware.tgz");
-
- if ($sigchk == 1) {
- $sig_warning = gettext("The digital signature on this image is invalid.");
- } else if ($sigchk == 2 && !isset($config['system']['firmware']['allowinvalidsig'])) {
- $sig_warning = gettext("This image is not digitally signed.");
- } else if (($sigchk >= 3)) {
- $sig_warning = gettext("There has been an error verifying the signature on this image.");
- }
-
- if (!verify_gzip_file("{$g['upload_path']}/firmware.tgz")) {
- $input_errors[] = gettext("The image file is corrupt.");
- unlink("{$g['upload_path']}/firmware.tgz");
- }
- }
- }
-
- run_plugins("/usr/local/pkg/firmware_upgrade");
-
- /* Check for input errors, firmware locks, warnings, then check for firmware if sig_override is set */
- if (!$input_errors && !is_subsystem_dirty('firmwarelock') && (!$sig_warning || $_POST['sig_override'])) {
- if (file_exists("{$g['upload_path']}/firmware.tgz")) {
- /* fire up the update script in the background */
- mark_subsystem_dirty('firmwarelock');
- $savemsg = gettext("The firmware is now being updated. The firewall will reboot automatically.");
- if (stristr($_FILES['ulfile']['name'], "nanobsd") or $_POST['isnano'] == "yes") {
- mwexec_bg("/etc/rc.firmware pfSenseNanoBSDupgrade {$g['upload_path']}/firmware.tgz");
- } else {
- if ($g['platform'] == "nanobsd") {
- $whichone = "pfSenseNanoBSDupgrade";
- } else {
- $whichone = "pfSenseupgrade";
- }
- mwexec_bg("/etc/rc.firmware {$whichone} {$g['upload_path']}/firmware.tgz");
- unset($whichone);
- }
- } else {
- $savemsg = sprintf(gettext("Firmware image missing or other error, please try again %s."), $errortext);
- }
- }
- }
- }
-}
-
-$pgtitle = array(gettext("System"), gettext("Firmware"));
-include("head.inc");
-
-if ($input_errors)
- print_input_errors($input_errors);
-
-if ($savemsg)
- print_info_box($savemsg);
-
-if ($fwinfo != "")
- print_info_box($fwinfo);
-
-$tab_array = array();
-$tab_array[] = array(gettext("Manual Update"), true, "system_firmware.php");
-$tab_array[] = array(gettext("Auto Update"), false, "system_firmware_check.php");
-$tab_array[] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
-if($g['hidedownloadbackup'] == false)
- $tab_array[] = array(gettext("Restore Full Backup"), false, "system_firmware_restorefullbackup.php");
-
-display_top_tabs($tab_array);
-
-// For a simple yes/no we can use an HTML form
-if ($sig_warning && !$input_errors) {
- $sig_warning = gettext("The image you uploaded " .
- "is not an official/supported image and may lead to unexpected behavior or security " .
- "compromises. Only install images that come from sources that you trust, and make sure ".
- "that the image has not been tampered with.") . "<br /><br />".
- gettext("Do you want to install this image anyway (on your own risk)?");
-
- print_info_box($sig_warning);
-?>
- <form action="system_firmware.php" method="post" enctype="multipart/form-data">
- <input name="sig_override" type="submit" class="btn btn-danger" id="sig_override" value=" <?=gettext("Yes");?> " />
- <input name="sig_no" type="submit" class="btn btn-default" id="sig_no" value=" <?=gettext("No"); ?> " />
- </form>
-<?php
-
-} else {
- // This is where the work gets done so Forms.classes will be used from this point
- if (!is_subsystem_dirty('firmwarelock')) {
- require_once('classes/Form.class.php');
-
- if (!is_subsystem_dirty('rebootreq')) {
- // Provide a button to enable firmware upgrades. Upgrades should be disabled on initial page load
- if (!is_subsystem_dirty('firmware') || !$_POST || $_POST['save']) {
- $enablebtn = new Form_Button(
- 'Submit',
- 'Enable firmware upload'
- );
-
- $enablebtn->addClass('btn-warning');
- $form = new Form($enablebtn);
- $section = new Form_Section('Invoke ' . $g['product_name'] .' Manual Upgrade');
- $section->addInput(new Form_StaticText('Enable', 'Click the "Enable firmware upload" button below to begin.'));
- }
- else {
- // Upgrades are now enabled
- $form = new Form('Disable firmware upload');
-
- $form->setMultipartEncoding();
-
- $section = new Form_Section('Perform ' . $g['product_name'] .' Manual Upgrade');
-
- if (!session_id())
- $upload_id = uniqid();
- else
- $upload_id = session_id();
-
- $section->addInput(new Form_Input(
- 'UPLOAD_IDENTIFIER',
- '',
- 'hidden',
- $upload_id
- ));
-
- if(stristr($_FILES['ulfile']['name'],"nanobsd")) {
- $section->addInput(new Form_Input(
- 'isnano',
- '',
- 'hidden',
- 'yes'
- ));
- }
-
- if ($g['platform'] == "nanobsd")
- $type = "*.img.gz";
- else
- $type = "*.tgz";
-
- $filepicker = new Form_Input(
- 'ulfile',
- 'File to upload (' . $type . ')',
- 'file',
- ''
- );
-
- $section->addInput($filepicker)->setHelp('Choose the file you wish to upload');
-
- if ($g['hidebackupbeforeupgrade'] === false) {
- $section->addInput(new Form_Checkbox(
- 'backupbeforeupgrade',
- Backup,
- 'Perform a full backup prior to upgrade',
- false
- ));
- }
-
- $section->addInput(new Form_Button(
- 'submit',
- 'Upgrade firmware'
- ))->addClass('btn-danger btn-sm')->setHelp('Click the "Upgrade firmware" button above to start the upgrade process');
- }
-
- $form->add($section);
- print($form);
- }
- }
- else {
- print_info_box('<strong>' . gettext("You must reboot the system before you can upgrade the firmware.") . '</strong>');
- }
-
- if (is_subsystem_dirty('firmware') && !is_subsystem_dirty('firmwarelock')) {
- print_info_box('<strong>' . gettext("DO NOT ") . '</strong>' . gettext('abort the firmware upgrade once it ' .
- 'has started. The firewall will reboot automatically after ' .
- 'storing the new firmware. The configuration will be maintained.'));
- }
-}
-
-include("foot.inc"); ?> \ No newline at end of file
diff --git a/src/usr/local/www/system_firmware_auto.php b/src/usr/local/www/system_firmware_auto.php
deleted file mode 100755
index 015ff07..0000000
--- a/src/usr/local/www/system_firmware_auto.php
+++ /dev/null
@@ -1,273 +0,0 @@
-<?php
-/* $Id$ */
-/*
- system_firmware_auto.php
- Copyright (C) 2005 Scott Ullrich
- Copyright (C) 2008 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Based originally on system_firmware.php
- (C)2003-2004 Manuel Kasper
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/tar /usr/bin/nohup /bin/cat /sbin/sha256
- pfSense_MODULE: firmware
-*/
-
-##|+PRIV
-##|*IDENT=page-system-firmware-checkforupdate
-##|*NAME=System: Firmware: Check For Update page
-##|*DESCR=Allow access to the 'System: Firmware: Check For Update' page.
-##|*MATCH=system_firmware_auto.php*
-##|-PRIV
-
-$nocsrf = true;
-
-require("guiconfig.inc");
-require_once("pfsense-utils.inc");
-
-$curcfg = $config['system']['firmware'];
-
-if (isset($curcfg['alturl']['enable'])) {
- $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
-} else {
- $updater_url = $g['update_url'];
-}
-
-if ($_POST['backupbeforeupgrade']) {
- touch("/tmp/perform_full_backup.txt");
-}
-
-$closehead = false;
-$pgtitle = array(gettext("Diagnostics"), gettext("Firmware"), gettext("Auto Update"));
-include("head.inc");
-
-$tab_array = array();
-$tab_array[] = array(gettext("Manual Update"), false, "system_firmware.php");
-$tab_array[] = array(gettext("Auto Update"), true, "system_firmware_check.php");
-$tab_array[] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
-if($g['hidedownloadbackup'] == false)
- $tab_array[] = array(gettext("Restore Full Backup"), false, "system_firmware_restorefullbackup.php");
-
-display_top_tabs($tab_array);
-?>
-
-
-<div id="statusheading" name="statusheading" class="panel panel-default">
- <div class="panel-heading" id="status" name="status"><?=gettext("Beginning firmware upgrade")?></div>
- <div id='output' name='output' class="panel-body"></div>
-</div>
-
-
-<?php
-include("foot.inc"); ?>
-
-<?php
-
-panel_heading_text(gettext("Downloading current version information") . "...");
-panel_heading_class('info');
-
-$nanosize = "";
-if ($g['platform'] == "nanobsd") {
- if (!isset($g['enableserial_force'])) {
- $nanosize = "-nanobsd-vga-";
- } else {
- $nanosize = "-nanobsd-";
- }
-
- $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt")));
-}
-
-@unlink("/tmp/{$g['product_name']}_version");
-download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version");
-$latest_version = str_replace("\n", "", @file_get_contents("/tmp/{$g['product_name']}_version"));
-if (!$latest_version) {
- update_output_window(gettext("Unable to check for updates."));
- require("foot.inc");
- exit;
-} else {
- $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));
- $latest_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
- $latest_version_pfsense = strtotime($latest_version);
- if(!$latest_version) {
- panel_heading_class('danger');
- panel_heading_text(gettext('Version check'));
- update_output_window(gettext("Unable to check for updates."));
- require("foot.inc");
- exit;
- } else {
- if (pfs_version_compare($current_installed_buildtime, $g['product_version'], $latest_version) == -1) {
- panel_heading_text(gettext("Downloading updates") . '...');
- panel_heading_class('info');
-
- conf_mount_rw();
- if ($g['platform'] == "nanobsd") {
- $update_filename = "latest{$nanosize}.img.gz";
- } else {
- $update_filename = "latest.tgz";
- }
-
- $status = download_file_with_progress_bar("{$updater_url}/{$update_filename}", "{$g['upload_path']}/latest.tgz", "read_body_firmware");
- $status = download_file_with_progress_bar("{$updater_url}/{$update_filename}.sha256", "{$g['upload_path']}/latest.tgz.sha256");
- conf_mount_ro();
- update_output_window("{$g['product_name']} " . gettext("download complete."));
- } else {
- panel_heading_class('success');
- panel_heading_text(gettext('Version check complete'));
- update_output_window(gettext("You are on the latest version."));
- require("foot.inc");
- exit;
- }
- }
-}
-
-/* launch external upgrade helper */
-$external_upgrade_helper_text = "/etc/rc.firmware ";
-
-if ($g['platform'] == "nanobsd") {
- $external_upgrade_helper_text .= "pfSenseNanoBSDupgrade ";
-} else {
- $external_upgrade_helper_text .= "pfSenseupgrade ";
-}
-
-$external_upgrade_helper_text .= "{$g['upload_path']}/latest.tgz";
-
-$downloaded_latest_tgz_sha256 = str_replace("\n", "", `/sbin/sha256 -q {$g['upload_path']}/latest.tgz`);
-$upgrade_latest_tgz_sha256 = str_replace("\n", "", `/bin/cat {$g['upload_path']}/latest.tgz.sha256 | awk '{ print $4 }'`);
-
-$sigchk = 0;
-
-if (!isset($curcfg['alturl']['enable'])) {
- $sigchk = verify_digital_signature("{$g['upload_path']}/latest.tgz");
-}
-
-$exitstatus = 0;
-if ($sigchk == 1) {
- $sig_warning = gettext("The digital signature on this image is invalid.");
- $exitstatus = 1;
-} else if ($sigchk == 2) {
- $sig_warning = gettext("This image is not digitally signed.");
- if (!isset($config['system']['firmware']['allowinvalidsig'])) {
- $exitstatus = 1;
- }
-} else if (($sigchk >= 3)) {
- $sig_warning = gettext("There has been an error verifying the signature on this image.");
- $exitstatus = 1;
-}
-
-if ($exitstatus) {
- panel_heading_text($sig_warning);
- panel_heading_class('danger');
-
- update_output_window(gettext("Update cannot continue. You can disable this check on the Updater Settings tab."));
- require("foot.inc");
- exit;
-} else if ($sigchk == 2) {
- panel_heading_text(gettext('Upgrade in progress...'));
- panel_heading_class('info');
-
- update_output_window("\n" . gettext("Upgrade Image does not contain a signature but the system has been configured to allow unsigned images. One moment please...") . "\n");
-}
-
-if (!verify_gzip_file("{$g['upload_path']}/latest.tgz")) {
- panel_heading_text(gettext("The image file is corrupt."));
- panel_heading_class('danger');
-
- update_output_window(gettext("Update cannot continue"));
- if (file_exists("{$g['upload_path']}/latest.tgz")) {
- conf_mount_rw();
- unlink("{$g['upload_path']}/latest.tgz");
- conf_mount_ro();
- }
- require("foot.inc");
- exit;
-}
-
-if($downloaded_latest_tgz_sha256 <> $upgrade_latest_tgz_sha256) {
- panel_heading_text(gettext("Downloading complete but sha256 does not match."));
- panel_heading_class('danger');
-
- update_output_window(gettext("Auto upgrade aborted.") . " \n\n" . gettext("Downloaded SHA256") . ": " . $downloaded_latest_tgz_sha256 . "\n\n" . gettext("Needed SHA256") . ": " . $upgrade_latest_tgz_sha256);
-} else {
- update_output_window($g['product_name'] . " " . gettext("is now upgrading.") . "\\n\\n" . gettext("The firewall will reboot once the operation is completed."));
- mwexec_bg($external_upgrade_helper_text);
-}
-
-/*
- Helper functions
-*/
-
-function read_body_firmware($ch, $string) {
- global $g, $fout, $file_size, $downloaded, $counter, $version, $latest_version;
- $length = strlen($string);
- $downloaded += intval($length);
- $downloadProgress = round(100 * (1 - $downloaded / $file_size), 0);
- $downloadProgress = 100 - $downloadProgress;
- $a = $file_size;
- $b = $downloaded;
- $c = $downloadProgress;
- $text = " " . gettext("Auto Update Download Status") . "\\n";
- $text .= "----------------------------------------------------\\n";
- $text .= " " . gettext("Current Version") . " : {$g['product_version']}\\n";
- $text .= " " . gettext("Latest Version") . " : {$latest_version}\\n";
- $text .= " " . gettext("File size") . " : {$a}\\n";
- $text .= " " . gettext("Downloaded") . " : {$b}\\n";
- $text .= " " . gettext("Percent") . " : {$c}%\\n";
- $text .= "----------------------------------------------------\\n";
- $counter++;
- if ($counter > 150) {
- update_output_window($text);
- update_progress_bar($downloadProgress);
- $counter = 0;
- }
- fwrite($fout, $string);
- return $length;
-}
-
-// Update the text in the panel-heading
-function panel_heading_text($text) {
-?>
- <script>
- events.push(function(){
- $('#status').html('<?=$text?>');
- });
- </script>
-<?php
-}
-
-// Update the class of the message panel so that it's color changes
-// Use danger, success, info, warning, default etc
-function panel_heading_class($newclass = 'default') {
-?>
- <script>
- events.push(function(){
- $('#statusheading').removeClass().addClass('panel panel-' + '<?=$newclass?>');
- });
- </script>
-<?php
-}
-
-?>
-
diff --git a/src/usr/local/www/system_firmware_check.php b/src/usr/local/www/system_firmware_check.php
deleted file mode 100644
index a908af1..0000000
--- a/src/usr/local/www/system_firmware_check.php
+++ /dev/null
@@ -1,181 +0,0 @@
-<?php
-/* $Id$ */
-/*
- system_firmware_check.php
- Copyright (C) 2008 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: firmware
-*/
-
-##|+PRIV
-##|*IDENT=page-system-firmware-autoupdate
-##|*NAME=System: Firmware: Auto Update page
-##|*DESCR=Allow access to the 'System: Firmware: Auto Update' page.
-##|*MATCH=system_firmware_check.php*
-##|-PRIV
-
-$d_isfwfile = 1;
-require("guiconfig.inc");
-require_once("pfsense-utils.inc");
-
-$curcfg = $config['system']['firmware'];
-$pgtitle = array(gettext("System"), gettext("Firmware"), gettext("Auto Update"));
-include("head.inc");
-
-$tab_array = array();
-$tab_array[] = array(gettext("Manual Update"), false, "system_firmware.php");
-$tab_array[] = array(gettext("Auto Update"), true, "system_firmware_check.php");
-$tab_array[] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
-if($g['hidedownloadbackup'] == false)
- $tab_array[] = array(gettext("Restore Full Backup"), false, "system_firmware_restorefullbackup.php");
-display_top_tabs($tab_array);
-?>
-
-<form action="system_firmware_auto.php" method="post">
- <div id="statusheading" class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('Update progress')?></h2></div>
- <div class="panel-body" name="output" id="output"></div>
- </div>
-
- <div id="backupdiv" style="visibility:hidden">
- <?php if ($g['hidebackupbeforeupgrade'] === false): ?>
- <br /><input type="checkbox" name="backupbeforeupgrade" id="backupbeforeupgrade" /><?=gettext("Perform full backup prior to upgrade")?>
- <?php endif; ?>
- </div>
- <br />
- <input id='invokeupgrade' class="btn btn-warning" style='visibility:hidden' type="submit" value="<?=gettext("Invoke Auto Upgrade"); ?>" />
-
-<?php
-
-/* Define necessary variables. */
-if (isset($curcfg['alturl']['enable'])) {
- $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
-} else {
- $updater_url = $g['update_url'];
-}
-$needs_system_upgrade = false;
-$static_text .= gettext("Downloading new version information...");
-
-$nanosize = "";
-if ($g['platform'] == "nanobsd") {
- if (!isset($g['enableserial_force'])) {
- $nanosize = "-nanobsd-vga-";
- } else {
- $nanosize = "-nanobsd-";
- }
-
- $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt")));
-}
-
-if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true) {
- $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
-}
-$static_text .= gettext("done") . "\\n";
-if (!$remote_version) {
- $static_text .= gettext("Unable to check for updates.") . "\\n";
- if (isset($curcfg['alturl']['enable'])) {
- $static_text .= gettext("Could not contact custom update server.") . "\\n";
- } else {
- $static_text .= sprintf(gettext('Could not contact %1$s update server %2$s%3$s'), $g['product_name'], $updater_url, "\\n");
- }
-} else {
- $static_text .= gettext("Obtaining current version information...");
- panel_text($static_text);
-
- $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));
-
- $static_text .= "done<br />";
- panel_text($static_text);
-
- if (pfs_version_compare($current_installed_buildtime, $g['product_version'], $remote_version) == -1) {
- $needs_system_upgrade = true;
- } else {
- $static_text .= "<br />" . gettext("You are on the latest version.") . "<br />";
- panel_text($static_text);
- panel_heading_class('success');
- }
-}
-
-update_output_window($static_text);
-if ($needs_system_upgrade == false) {
- print("</form>");
- require("foot.inc");
-
- exit;
-}
-?>
-<script>
- events.push(function(){
- $('#invokeupgrade').css('visibility','visible');
- $('#backupdiv').css('visibility','visible');
- });
-</script>
-<?php
-
-$txt = gettext("A new version is now available") . "<br />";
-$txt .= gettext("Current version") .": ". $g['product_version'] . "<br />";
-if ($g['platform'] == "nanobsd") {
- $txt .= " " . gettext("NanoBSD Size") . " : " . trim(file_get_contents("/etc/nanosize.txt")) . "<br />";
-}
-$txt .= " " . gettext("Built On") .": ". $current_installed_buildtime . "<br />";
-$txt .= " " . gettext("New version") .": ". htmlspecialchars($remote_version, ENT_QUOTES | ENT_HTML401). "<br /><br />";
-$txt .= " " . gettext("Update source") .": ". $updater_url . "<br />";
-panel_text($txt);
-panel_heading_class('info');
-?>
-
-</form>
-<?php
-
-// Update the class of the message panel so that it's color changes
-// Use danger, success, info, warning, default etc
-function panel_heading_class($newclass = 'default') {
-?>
- <script>
- events.push(function(){
- $('#statusheading').removeClass().addClass('panel panel-' + '<?=$newclass?>');
- });
- </script>
-<?php
-}
-
-// Update the text in the panel-heading
-function panel_text($text) {
-?>
- <script>
- events.push(function(){
- $('#output').html('<?=$text?>');
- });
- </script>
-<?php
-}
-
-include("foot.inc");
diff --git a/src/usr/local/www/system_firmware_restorefullbackup.php b/src/usr/local/www/system_firmware_restorefullbackup.php
deleted file mode 100644
index 54ba297..0000000
--- a/src/usr/local/www/system_firmware_restorefullbackup.php
+++ /dev/null
@@ -1,229 +0,0 @@
-<?php
-/* $Id$ */
-/*
- system_firmware_restorefullbackup.php
- Copyright (C) 2011 Scott Ullrich
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- originally part of m0n0wall (http://m0n0.ch/wall)
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-
-/*
- pfSense_BUILDER_BINARIES: /etc/rc.restore_full_backup
- pfSense_MODULE: backup
-*/
-
-##|+PRIV
-##|*IDENT=page-diagnostics-restore-full-backup
-##|*NAME=Diagnostics: Restore full backup
-##|*DESCR=Allow access to the 'Diagnostics: Restore Full Backup' page.
-##|*MATCH=system_firmware_restorefullbackup.php
-##|-PRIV
-
-// Don't really restore or reboot while testing. Should be 'false' for production of course
-define(DEBUG, false);
-
-/* Allow additional execution time 0 = no limit. */
-ini_set('max_execution_time', '0');
-ini_set('max_input_time', '0');
-
-require_once("functions.inc");
-require("guiconfig.inc");
-require_once("filter.inc");
-require_once("shaper.inc");
-
-if ($_POST['overwriteconfigxml']) {
- touch("/tmp/do_not_restore_config.xml");
-}
-
-if ($_GET['backupnow']) {
- mwexec_bg("/etc/rc.create_full_backup");
-}
-
-if($_POST['downloadbackup']) {
- $filename = basename($_POST['downloadbackup']);
-
- if(DEBUG)
- print_info_box('DEBUG: Simulating download of ' . htmlspecialchars($filename));
- else {
- $path = "/root/{$filename}";
- if(file_exists($path)) {
- session_write_close();
- ob_end_clean();
- session_cache_limiter('public');
- //$fd = fopen("/root/{$filename}", "rb");
- $filesize = filesize("/root/{$filename}");
- header("Cache-Control: ");
- header("Pragma: ");
- header("Content-Type: application/octet-stream");
- header("Content-Length: " .(string)(filesize($path)) );
- header('Content-Disposition: attachment; filename="'.$filename.'"');
- header("Content-Transfer-Encoding: binary\n");
- if($file = fopen("/root/{$filename}", 'rb')){
- while( (!feof($file)) && (connection_status()==0) ){
- print(fread($file, 1024*8));
- flush();
- }
- fclose($file);
- }
-
- exit;
- }
- }
-}
-else if ($_POST['deletefile']) {
- $filename = basename($_POST['deletefile']);
- if(DEBUG)
- print_info_box('DEBUG: Simulating deletion of ' . htmlspecialchars($filename));
- else {
- if(file_exists("/root/{$filename}") && (preg_match("/pfSense-full-backup-\d+-\d+\.tgz/", $filename) == 1)) {
- unlink("/root/" . $filename);
- $savemsg = htmlspecialchars($filename) . " " . gettext("has been deleted.");
- } else {
- $savemsg = htmlspecialchars($filename) . " " . gettext("has not been been deleted (invalid backup file or file does not exist).");
- }
- }
-}
-else if ($_POST['restorefile']) {
- $filename = basename($_POST['restorefile']);
- if(DEBUG)
- print_info_box('DEBUG: Restoration of ' . $filename . ' simulated');
- else {
- if(file_exists("/root/{$filename}") && (preg_match("/pfSense-full-backup-\d+-\d+\.tgz/", $filename) == 1)) {
- mwexec_bg("/etc/rc.restore_full_backup /root/" . escapeshellcmd($filename));
- $savemsg = gettext("The firewall is currently restoring") . " " . htmlspecialchars($filename);
- } else {
- $savemsg = htmlspecialchars($filename) . " " . gettext("has not been been restored (invalid backup file or file does not exist).");
- }
- }
-}
-
-$pgtitle = array(gettext("Diagnostics"), gettext("Restore full backup"));
-include("head.inc");
-
-if ($input_errors)
- print_input_errors($input_errors);
-
-if ($savemsg)
- print_info_box($savemsg);
-
-if (is_subsystem_dirty('restore')) {
- ?>
- <form action="reboot.php" method="post">
- <input name="Submit" type="hidden" value="Yes" />
-<?php print_info_box(gettext("The firewall configuration has been changed. The firewall is now rebooting.")) ?>
- </form>
-<?php
-}
-?>
-
-<?php
-$tab_array = array();
-$tab_array[] = array(gettext("Manual Update"), false, "system_firmware.php");
-$tab_array[] = array(gettext("Auto Update"), false, "system_firmware_check.php");
-$tab_array[] = array(gettext("Updater Settings"), false, "system_firmware_settings.php");
-if($g['hidedownloadbackup'] == false)
- $tab_array[] = array(gettext("Restore Full Backup"), true, "system_firmware_restorefullbackup.php");
-
-display_top_tabs($tab_array);
-?>
-
-<form action="system_firmware_restorefullbackup.php" method="post">
- <div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('Available backup files')?></h2></div>
- <div class="panel-body">
- <div class="table-responsive">
- <table class="table table-hover table-striped table-condensed">
- <thead>
- <tr>
- <th><?=gettext("File to restore")?></th>
- <th><?=gettext("Date") ?></th>
- <th><?=gettext("Size") ?></th>
- <th><?=gettext("Action")?></th>
- </tr>
- </thead>
- <tbody>
-<?php
- $home = getcwd();
- chdir("/root");
- $available_restore_files = glob("pfSense-full-backup-*");
- $counter = 0;
- foreach($available_restore_files as $arf) {
- $counter++;
- $size = exec("gzip -l /root/$arf | grep -v compressed | awk '{ print $2 }'");
-?>
- <tr>
- <td>
- <input type="radio" class="radio-inline" name="restorefile" value="<?=$arf?>" /> <?=$arf?>
- </td>
- <td>
- <?=date ("F d Y H:i:s", filemtime($arf))?>
- </td>
- <td>
- <?=format_bytes($size)?>
- </td>
- <td>
- <button class="btn btn-xs btn-danger" type="submit" name="deletefile" value="<?=$arf?>" title="Delete backup file">Delete</button>
- <button class="btn btn-xs btn-default" type="submit" name="downloadbackup" value="<?=$arf?>" title="Download backup file">Download</button>
- </td>
- </tr>
-<?php
- } // e-o-foreach backup file
-
- chdir($home); // Je me souvien
-?>
- </tbody>
- </table>
- </div>
- </div>
- </div>
-<?php
- if($counter == 0)
- print_info_box(gettext("Could not locate any previous backups."));
- else {
-?>
- <p><input type="checkbox" name="overwriteconfigxml" id="overwriteconfigxml" checked="checked"/> <?=gettext(" When checked, DO NOT restore the config.xml file."); ?></p>
- <p><button name="Restore" type="submit" class="btn btn-danger" id="restore" value="<?=gettext("Restore")?>"><?=gettext("Restore")?></button></p>
-<?php
- }
-?>
-</form>
-
-<script type="text/javascript">
-//<![CDATA[
-encrypt_change();
-decrypt_change();
-//]]>
-</script>
-
-<?php
-
-if (is_subsystem_dirty('restore')) {
- system_reboot();
-}
-
-include("foot.inc");?> \ No newline at end of file
diff --git a/src/usr/local/www/system_firmware_settings.php b/src/usr/local/www/system_firmware_settings.php
deleted file mode 100644
index e9f576c..0000000
--- a/src/usr/local/www/system_firmware_settings.php
+++ /dev/null
@@ -1,260 +0,0 @@
-<?php
-/* $Id$ */
-/*
- system_firmware_settings.php
- part of pfSense
- Copyright (C) 2005 Colin Smith
- Copyright (C) 2008 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/fetch
- pfSense_MODULE: firmware
-*/
-
-##|+PRIV
-##|*IDENT=page-system-firmware-settings
-##|*NAME=System: Firmware: Settings page
-##|*DESCR=Allow access to the 'System: Firmware: Settings' page.
-##|*MATCH=system_firmware_settings.php*
-##|-PRIV
-
-require("guiconfig.inc");
-
-if ($_POST) {
- unset($input_errors);
-
- /* input validation */
- if (($_POST['alturlenable'] == "yes") && (empty($_POST['firmwareurl']))) {
- $input_errors[] = gettext("A Firmware Auto Update Base URL must be specified when \"Use an unofficial server for firmware upgrades\" is enabled.");
- }
-
- if (!$input_errors) {
- if ($_POST['alturlenable'] == "yes") {
- $config['system']['firmware']['alturl']['enable'] = true;
- $config['system']['firmware']['alturl']['firmwareurl'] = $_POST['firmwareurl'];
- } else {
- unset($config['system']['firmware']['alturl']['enable']);
- unset($config['system']['firmware']['alturl']['firmwareurl']);
- unset($config['system']['firmware']['alturl']);
- unset($config['system']['firmware']);
- }
- if ($_POST['allowinvalidsig'] == "yes") {
- $config['system']['firmware']['allowinvalidsig'] = true;
- } else {
- unset($config['system']['firmware']['allowinvalidsig']);
- }
-
- if ($_POST['disablecheck'] == "yes") {
- $config['system']['firmware']['disablecheck'] = true;
- } else {
- unset($config['system']['firmware']['disablecheck']);
- }
-
- if ($_POST['synconupgrade'] == "yes") {
- $config['system']['gitsync']['synconupgrade'] = true;
- } else {
- unset($config['system']['gitsync']['synconupgrade']);
- }
- $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl'];
- $config['system']['gitsync']['branch'] = $_POST['branch'];
-
- write_config();
- }
-}
-
-$curcfg = $config['system']['firmware'];
-$gitcfg = $config['system']['gitsync'];
-
-$pgtitle = array(gettext("System"), gettext("Firmware"), gettext("Settings"));
-$closehead = false;
-
-exec("/usr/bin/fetch -q -o {$g['tmp_path']}/manifest \"{$g['update_manifest']}\"");
-if (file_exists("{$g['tmp_path']}/manifest")) {
- $preset_urls_split = explode("\n", file_get_contents("{$g['tmp_path']}/manifest"));
-}
-
-include("head.inc");
-
-if ($input_errors)
- print_input_errors($input_errors);
-
-if ($savemsg)
- print_info_box($savemsg, 'success');
-
-$tab_array = array();
-$tab_array[] = array(gettext("Manual Update"), false, "system_firmware.php");
-$tab_array[] = array(gettext("Auto Update"), false, "system_firmware_check.php");
-$tab_array[] = array(gettext("Updater Settings"), true, "system_firmware_settings.php");
-
-if($g['hidedownloadbackup'] == false)
- $tab_array[] = array(gettext("Restore Full Backup"), false, "system_firmware_restorefullbackup.php");
-
-display_top_tabs($tab_array);
-
-require_once('classes/Form.class.php');
-
-$form = new Form();
-
-$section = new Form_Section('Firmware Branch');
-
-if(is_array($preset_urls_split)) {
- $urllist = array();
-
- foreach($preset_urls_split as $pus) {
- $pus_text = explode("\t", $pus);
- if (empty($pus_text[0]))
- continue;
- if (stristr($pus_text[0], php_uname("m")) !== false) {
- $yourarch = " (Current architecture)";
- $choice = $pus_text[1];
- } else {
- $yourarch = "";
- }
-
- $urllist[$pus_text[1]] = $pus_text[0] . $yourarch;
- }
-
- $section->addInput(new Form_Select(
- 'preseturls',
- 'Default Auto Update URLs',
- $choice,
- $urllist
- ))->setHelp('Entries denoted by "Current architecture" match the architecture of your current installation, ' .
- 'such as %s. Changing architectures during an upgrade is not recommended, and may require a manual reboot after the update completes.', [php_uname("m")]);
-
- $form->add($section);
-}
-
-$section = new Form_Section('Firmware Auto Update URL');
-
-$section->addInput(new Form_Checkbox(
- 'alturlenable',
- 'Unofficial',
- 'Allow the use of an "unofficial" server for firmware upgrades',
- isset($curcfg['alturl']['enable'])
- ));
-
-$section->addInput(new Form_Input(
- 'firmwareurl',
- 'Base URL',
- 'text'
- ))->setHelp('This is where %s will check for newer firmware versions when the <a href="system_firmware_check.php">' .
- 'System: Firmware: Auto Update</a> page is viewed', [$g['product_name']]);
-
-$form->add($section);
-
-$section = new Form_Section('Updates');
-
-$section->addInput(new Form_Checkbox(
- 'allowinvalidsig',
- 'Unsigned images',
- 'Allow auto-update firmware images with a missing or invalid digital signature to be used',
- isset($curcfg['allowinvalidsig'])
- ));
-
-$section->addInput(new Form_Checkbox(
- 'disablecheck',
- 'Dashboard check',
- 'Disable the automatic dashboard auto-update check',
- isset($curcfg['disablecheck'])
- ));
-
-$form->add($section);
-
-if(file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) {
- $section = new Form_Section('GitSync');
-
- $section->addInput(new Form_Checkbox(
- 'synconupgrade',
- 'Auto sync on update',
- 'After updating, sync with the following repository/branch before reboot',
- isset($gitcfg['synconupgrade'])
- ))->setHelp('After updating, sync with the following repository/branch before reboot');
-
- if(is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
- exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url", $output_str);
- if(is_array($output_str) && !empty($output_str[0]))
- $lastrepositoryurl = $output_str[0];
- unset($output_str);
- }
-
- $section->addInput(new Form_Input(
- 'repositoryurl',
- 'Repository URL',
- 'text',
- ($gitcfg['repositoryurl'] ? $gitcfg['repositoryurl'] : '')
- ))->setHelp('The most recently used repository was %s. This repository will be used if the field is left blank.', [$lastrepositoryurl]);
-
- if(is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
- exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git branch", $output_str);
- if(is_array($output_str)) {
- foreach($output_str as $output_line) {
- if(strstr($output_line, '* ')) {
- $lastbranch = substr($output_line, 2);
- break;
- }
- }
- unset($output_str);
- }
- unset($output_str);
- }
-
- $section->addInput(new Form_Input(
- 'branch',
- 'Branch name',
- 'text',
- ($gitcfg['branch'] ? $gitcfg['branch'] : '')
- ))->setHelp('The most recently used branch was "%s". (Usually the branch name is master)' .
- '<br />Note: Sync will not be performed if a branch is not specified', [$lastbranch]);
-
- $form->add($section);
-} // e-o-if(file_exista()
-
-print($form);
-?>
-
-<script>
-// Update firmwareurl from preseturls
-function update_firmwareurl() {
- var pre = document.getElementById("preseturls");
- var preVal = pre.options[pre.selectedIndex].value;
- var firm = document.getElementById("firmwareurl");
- firm.value = preVal;
-}
-
-// Call it when preseturls changes
-events.push(function(){
- $('#preseturls').on('change', function(){
- update_firmwareurl();
- })
-});
-
-// And call it on page load
-update_firmwareurl();
-
-</script>
-<?php
-
-include("foot.inc");
diff --git a/src/usr/local/www/system_gateway_groups.php b/src/usr/local/www/system_gateway_groups.php
index 7abe04c..1ccf60f 100644
--- a/src/usr/local/www/system_gateway_groups.php
+++ b/src/usr/local/www/system_gateway_groups.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
system_gateway_groups.php
- part of pfSense (https://www.pfsense.org)
-
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-gatewaygroups
-##|*NAME=System: Gateway Groups page
+##|*NAME=System: Gateway Groups
##|*DESCR=Allow access to the 'System: Gateway Groups' page.
##|*MATCH=system_gateway_groups.php*
##|-PRIV
@@ -100,21 +121,23 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = array(gettext("System"), gettext("Gateway Groups"));
+$pgtitle = array(gettext("System"), gettext("Routing"), gettext("Gateway Groups"));
$shortcut_section = "gateway-groups";
include("head.inc");
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
-if (is_subsystem_dirty('staticroutes'))
+if (is_subsystem_dirty('staticroutes')) {
print_info_box_np(sprintf(gettext("The gateway configuration has been changed.%sYou must apply the changes in order for them to take effect."), "<br />"));
+}
$tab_array = array();
$tab_array[] = array(gettext("Gateways"), false, "system_gateways.php");
-$tab_array[] = array(gettext("Routes"), false, "system_routes.php");
-$tab_array[] = array(gettext("Groups"), true, "system_gateway_groups.php");
+$tab_array[] = array(gettext("Static Routes"), false, "system_routes.php");
+$tab_array[] = array(gettext("Gateway Groups"), true, "system_gateway_groups.php");
display_top_tabs($tab_array);
?>
@@ -126,7 +149,7 @@ display_top_tabs($tab_array);
<th><?=gettext("Gateways")?></th>
<th><?=gettext("Priority")?></th>
<th><?=gettext("Description")?></th>
- <th><!-- Action Buttons --></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
@@ -140,7 +163,7 @@ foreach ($a_gateway_groups as $gateway_group):
</td>
<td>
<?php
- foreach($gateway_group['item'] as $item) {
+ foreach ($gateway_group['item'] as $item) {
$itemsplit = explode("|", $item);
print(htmlspecialchars(strtoupper($itemsplit[0])) . "<br />\n");
}
@@ -148,7 +171,7 @@ foreach ($a_gateway_groups as $gateway_group):
</td>
<td>
<?php
- foreach($gateway_group['item'] as $item) {
+ foreach ($gateway_group['item'] as $item) {
$itemsplit = explode("|", $item);
print("Tier ". htmlspecialchars($itemsplit[1]) . "<br />\n");
}
@@ -158,9 +181,9 @@ foreach ($a_gateway_groups as $gateway_group):
<?=htmlspecialchars($gateway_group['descr'])?>
</td>
<td>
- <a href="system_gateway_groups_edit.php?id=<?=$i?>" class="btn btn-xs btn-success"><?=gettext('Edit')?></a>
- <a href="system_gateway_groups_edit.php?dup=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Duplicate')?></a>
- <a href="system_gateway_groups.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger" ><?=gettext('Delete')?></a>
+ <a href="system_gateway_groups_edit.php?id=<?=$i?>" class="fa fa-pencil" title="<?=gettext('Edit')?>"></a>
+ <a href="system_gateway_groups_edit.php?dup=<?=$i?>" class="fa fa-clone" title="<?=gettext('Copy')?>"></a>
+ <a href="system_gateway_groups.php?act=del&amp;id=<?=$i?>" class="fa fa-trash" title="<?=gettext('Delete')?>"></a>
</td>
</tr>
<?php
@@ -172,12 +195,16 @@ endforeach;
</div>
<nav class="action-buttons">
- <a href="system_gateway_groups_edit.php" class="btn btn-default"><?=gettext('Add')?></a>
+ <a href="system_gateway_groups_edit.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
</nav>
-<?php
- print_info_box(gettext('Remember to use these Gateway Groups in firewall rules in order to enable load balancing, failover, ' .
+<div id="infoblock">
+ <?=print_info_box(gettext('Remember to use these Gateway Groups in firewall rules in order to enable load balancing, failover, ' .
'or policy-based routing.' . '<br />' .
- 'Without rules directing traffic into the Gateway Groups, they will not be used.'));
-
-include("foot.inc"); \ No newline at end of file
+ 'Without rules directing traffic into the Gateway Groups, they will not be used.'), info)?>
+</div>
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/system_gateway_groups_edit.php b/src/usr/local/www/system_gateway_groups_edit.php
index 79a9ece..4b0e1e6 100644
--- a/src/usr/local/www/system_gateway_groups_edit.php
+++ b/src/usr/local/www/system_gateway_groups_edit.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
system_gateway_groups_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,13 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-system-gateways-editgatewaygroups
-##|*NAME=System: Gateways: Edit Gateway Groups page
+##|*NAME=System: Gateways: Edit Gateway Groups
##|*DESCR=Allow access to the 'System: Gateways: Edit Gateway Groups' page.
##|*MATCH=system_gateway_groups_edit.php*
##|-PRIV
@@ -70,8 +65,9 @@ require("guiconfig.inc");
require_once("ipsec.inc");
require_once("vpn.inc");
-if (!is_array($config['gateways']['gateway_group']))
+if (!is_array($config['gateways']['gateway_group'])) {
$config['gateways']['gateway_group'] = array();
+}
$a_gateway_groups = &$config['gateways']['gateway_group'];
$a_gateways = return_gateways_array();
@@ -181,7 +177,7 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("System"), gettext("Gateways"), gettext("Edit gateway group"));
+$pgtitle = array(gettext("System"), gettext("Routing"), gettext("Gateway Groups"), gettext("Edit"));
$shortcut_section = "gateway-groups";
function build_gateway_protocol_map (&$a_gateways) {
@@ -198,11 +194,13 @@ function build_carp_list() {
$list = array('address' => gettext('Interface Address'));
- foreach($carplist as $vip => $address) {
- if(($gateway['ipprotocol'] == "inet") && (!is_ipaddrv4($address)))
+ foreach ($carplist as $vip => $address) {
+ if (($gateway['ipprotocol'] == "inet") && (!is_ipaddrv4($address))) {
continue;
- if(($gateway['ipprotocol'] == "inet6") && (!is_ipaddrv6($address)))
+ }
+ if (($gateway['ipprotocol'] == "inet6") && (!is_ipaddrv6($address))) {
continue;
+ }
$list[$vip] = "$vip - $address";
}
@@ -217,10 +215,9 @@ $gateway_array = array_keys($a_gateways);
$protocol_array = array_values($gateway_protocol);
$protocol_array = array_values(array_unique($gateway_protocol));
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-
-require_once('classes/Form.class.php');
+}
$form = new Form();
@@ -238,11 +235,11 @@ $carplist = get_configured_carp_interface_list($interface);
$row = 0;
$numrows = count($a_gateways) - 1;
-foreach($a_gateways as $gwname => $gateway) {
- if(!empty($pconfig['item'])) {
+foreach ($a_gateways as $gwname => $gateway) {
+ if (!empty($pconfig['item'])) {
$af = explode("|", $pconfig['item'][0]);
$family = $a_gateways[$af[0]]['ipprotocol'];
- if($gateway['ipprotocol'] != $family) {
+ if ($gateway['ipprotocol'] != $family) {
$rows++;
continue;
}
@@ -250,9 +247,9 @@ foreach($a_gateways as $gwname => $gateway) {
$interface = $gateway['friendlyiface'];
- foreach((array)$pconfig['item'] as $item) {
+ foreach ((array)$pconfig['item'] as $item) {
$itemsplit = explode("|", $item);
- if($itemsplit[0] == $gwname) {
+ if ($itemsplit[0] == $gwname) {
$selected = $itemsplit[1];
break;
} else {
@@ -362,28 +359,29 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Hides all elements of the specified class. This will usually be a section or group
function hideClass(s_class, hide) {
- if(hide)
+ if (hide) {
$('.' + s_class).hide();
- else
+ } else {
$('.' + s_class).show();
+ }
}
// On changing a Tier selector on any row, find which protocol it uses (class)
// and disable the opposite
$('.row').on('change', function() {
// If user selects 'Never', unhide all rows
- if($(this).find(":selected").index() == 0) {
+ if ($(this).find(":selected").index() == 0) {
hideClass('inet', false);
hideClass('inet6', false);
- }
- else { // Otherwise hide the rows that are ont of 'this' protocol
- if($(this).hasClass('inet6'))
+ } else { // Otherwise hide the rows that are not of 'this' protocol
+ if ($(this).hasClass('inet6')) {
hideClass('inet', true);
- else
+ } else {
hideClass('inet6', true);
+ }
}
});
});
@@ -391,4 +389,4 @@ events.push(function(){
</script>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_gateways.php b/src/usr/local/www/system_gateways.php
index c524b37..0a6905f 100644
--- a/src/usr/local/www/system_gateways.php
+++ b/src/usr/local/www/system_gateways.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
system_gateways.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -55,13 +53,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-system-gateways
-##|*NAME=System: Gateways page
+##|*NAME=System: Gateways
##|*DESCR=Allow access to the 'System: Gateways' page.
##|*MATCH=system_gateways.php*
##|-PRIV
@@ -157,11 +152,20 @@ function delete_gateway_item($id) {
return;
}
+ /* NOTE: Cleanup static routes for the interface route if any */
+ if (!empty($a_gateways[$id]) && is_ipaddr($a_gateways[$id]['gateway']) &&
+ $gateway['gateway'] != $a_gateways[$id]['gateway'] &&
+ isset($a_gateways[$id]["nonlocalgateway"])) {
+ $realif = get_real_interface($a_gateways[$id]['interface']);
+ $inet = (!is_ipaddrv4($a_gateways[$id]['gateway']) ? "-inet6" : "-inet");
+ $cmd = "/sbin/route delete $inet " . escapeshellarg($a_gateways[$id]['gateway']) . " -iface " . escapeshellarg($realif);
+ mwexec($cmd);
+ }
/* NOTE: Cleanup static routes for the monitor ip if any */
if (!empty($a_gateways[$id]['monitor']) &&
- $a_gateways[$id]['monitor'] != "dynamic" &&
- is_ipaddr($a_gateways[$id]['monitor']) &&
- $a_gateways[$id]['gateway'] != $a_gateways[$id]['monitor']) {
+ $a_gateways[$id]['monitor'] != "dynamic" &&
+ is_ipaddr($a_gateways[$id]['monitor']) &&
+ $a_gateways[$id]['gateway'] != $a_gateways[$id]['monitor']) {
if (is_ipaddrv4($a_gateways[$id]['monitor'])) {
mwexec("/sbin/route delete " . escapeshellarg($a_gateways[$id]['monitor']));
} else {
@@ -237,23 +241,26 @@ if (isset($_POST['del_x'])) {
}
}
-$pgtitle = array(gettext("System"), gettext("Gateways"));
+$pgtitle = array(gettext("System"), gettext("Routing"), gettext("Gateways"));
$shortcut_section = "gateways";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
+}
+if ($savemsg) {
print_info_box($savemsg, 'success');
-
-if (is_subsystem_dirty('staticroutes'))
+}
+
+if (is_subsystem_dirty('staticroutes')) {
print_info_box_np(gettext("The gateway configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[0] = array(gettext("Gateways"), true, "system_gateways.php");
-$tab_array[1] = array(gettext("Routes"), false, "system_routes.php");
-$tab_array[2] = array(gettext("Groups"), false, "system_gateway_groups.php");
+$tab_array[1] = array(gettext("Static Routes"), false, "system_routes.php");
+$tab_array[2] = array(gettext("Gateway Groups"), false, "system_gateway_groups.php");
display_top_tabs($tab_array);
?>
@@ -266,38 +273,41 @@ display_top_tabs($tab_array);
<th><?=gettext("Gateway")?></th>
<th><?=gettext("Monitor IP")?></th>
<th><?=gettext("Description")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($a_gateways as $i => $gateway):
- if (isset($gateway['inactive']))
- $icon = 'icon-remove-circle';
- elseif (isset($gateway['disabled']))
- $icon = 'icon-ban-circle';
- else
- $icon = 'icon-ok-circle';
-
- if (isset($gateway['inactive']))
+ if (isset($gateway['inactive'])) {
+ $icon = 'fa-times-circle-o';
+ } elseif (isset($gateway['disabled'])) {
+ $icon = 'fa-ban';
+ } else {
+ $icon = 'fa-check-circle-o';
+ }
+
+ if (isset($gateway['inactive'])) {
$title = gettext("This gateway is inactive because interface is missing");
- else
+ } else {
$title = '';
+ }
?>
- <tr<?=($icon != 'icon-ok-circle')? ' class="disabled"' : ''?>>
- <td title="<?=$title?>"><i class="icon <?=$icon?>"></i></td>
+ <tr<?=($icon != 'fa-check-circle-o')? ' class="disabled"' : ''?>>
+ <td title="<?=$title?>"><i class="fa <?=$icon?>"></i></td>
<td>
- <?=$gateway['name']?>
+ <?=htmlspecialchars($gateway['name'])?>
<?php
- if (isset($gateway['defaultgw']))
+ if (isset($gateway['defaultgw'])) {
echo " <strong>(default)</strong>";
+ }
?>
</td>
<td>
<?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($gateway['friendlyiface']))?>
</td>
<td>
- <?=$gateway['gateway']?>
+ <?=htmlspecialchars($gateway['gateway'])?>
</td>
<td>
<?=htmlspecialchars($gateway['monitor'])?>
@@ -306,19 +316,20 @@ foreach ($a_gateways as $i => $gateway):
<?=htmlspecialchars($gateway['descr'])?>
</td>
<td>
- <a class="btn btn-xs btn-primary" href="system_gateways_edit.php?id=<?=$i?>">
- edit
- </a>
- <a class="btn btn-xs btn-default" href="system_gateways_edit.php?dup=<?=$i?>">
- copy
- </a>
+ <a href="system_gateways_edit.php?id=<?=$i?>" class="fa fa-pencil" title="<?=gettext('Edit');?>"></a>
+ <a href="system_gateways_edit.php?dup=<?=$i?>" class="fa fa-clone" title="<?=gettext('Copy')?>"></a>
+
<? if (is_numeric($gateway['attribute'])): ?>
- <a class="btn btn-xs btn-danger" href="system_gateways.php?act=del&amp;id=<?=$i?>">
- delete
- </a>
- <a class="btn btn-xs btn-default" href="?act=toggle&amp;id=<?=$i?>">
- toggle
- </a>
+ <?php if (isset($gateway['disabled'])) {
+ ?>
+ <a href="?act=toggle&amp;id=<?=$i?>" class="fa fa-check-square-o" title="<?=gettext('Enable')?>"></a>
+ <?php } else {
+ ?>
+ <a href="?act=toggle&amp;id=<?=$i?>" class="fa fa-ban" title="<?=gettext('Disable')?>"></a>
+ <?php }
+ ?>
+ <a href="system_gateways.php?act=del&amp;id=<?=$i?>" class="fa fa-trash" title="<?=gettext('Delete')?>"></a>
+
<? endif?>
</td>
</tr>
@@ -328,9 +339,10 @@ foreach ($a_gateways as $i => $gateway):
<nav class="action-buttons">
<a href="system_gateways_edit.php" role="button" class="btn btn-success">
- <?=gettext("Add new gateway");?>
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add");?>
</a>
</nav>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_gateways_edit.php b/src/usr/local/www/system_gateways_edit.php
index d433c3e..7c71408 100644
--- a/src/usr/local/www/system_gateways_edit.php
+++ b/src/usr/local/www/system_gateways_edit.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
system_gateways_edit.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -54,13 +52,10 @@
* ====================================================================
*
*/
-/*
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-system-gateways-editgateway
-##|*NAME=System: Gateways: Edit Gateway page
+##|*NAME=System: Gateways: Edit Gateway
##|*DESCR=Allow access to the 'System: Gateways: Edit Gateway' page.
##|*MATCH=system_gateways_edit.php*
##|-PRIV
@@ -86,7 +81,7 @@ if (!is_array($config['gateways']['gateway_item'])) {
}
$a_gateway_item = &$config['gateways']['gateway_item'];
-$apinger_default = return_apinger_defaults();
+$dpinger_default = return_dpinger_defaults();
if (is_numericint($_GET['id'])) {
$id = $_GET['id'];
@@ -104,12 +99,9 @@ if (isset($id) && $a_gateways[$id]) {
$pconfig['name'] = $a_gateways[$id]['name'];
$pconfig['weight'] = $a_gateways[$id]['weight'];
$pconfig['interval'] = $a_gateways[$id]['interval'];
- $pconfig['avg_delay_samples'] = $a_gateways[$id]['avg_delay_samples'];
- $pconfig['avg_delay_samples_calculated'] = isset($a_gateways[$id]['avg_delay_samples_calculated']);
- $pconfig['avg_loss_samples'] = $a_gateways[$id]['avg_loss_samples'];
- $pconfig['avg_loss_samples_calculated'] = isset($a_gateways[$id]['avg_loss_samples_calculated']);
- $pconfig['avg_loss_delay_samples'] = $a_gateways[$id]['avg_loss_delay_samples'];
- $pconfig['avg_loss_delay_samples_calculated'] = isset($a_gateways[$id]['avg_loss_delay_samples_calculated']);
+ $pconfig['loss_interval'] = $a_gateways[$id]['loss_interval'];
+ $pconfig['alert_interval'] = $a_gateways[$id]['alert_interval'];
+ $pconfig['time_period'] = $a_gateways[$id]['time_period'];
$pconfig['interface'] = $a_gateways[$id]['interface'];
$pconfig['friendlyiface'] = $a_gateways[$id]['friendlyiface'];
$pconfig['ipprotocol'] = $a_gateways[$id]['ipprotocol'];
@@ -123,9 +115,9 @@ if (isset($id) && $a_gateways[$id]) {
$pconfig['latencyhigh'] = $a_gateways[$id]['latencyhigh'];
$pconfig['losslow'] = $a_gateways[$id]['losslow'];
$pconfig['losshigh'] = $a_gateways[$id]['losshigh'];
- $pconfig['down'] = $a_gateways[$id]['down'];
$pconfig['monitor'] = $a_gateways[$id]['monitor'];
$pconfig['monitor_disable'] = isset($a_gateways[$id]['monitor_disable']);
+ $pconfig['nonlocalgateway'] = isset($a_gateways[$id]['nonlocalgateway']);
$pconfig['descr'] = $a_gateways[$id]['descr'];
$pconfig['attribute'] = $a_gateways[$id]['attribute'];
$pconfig['disabled'] = isset($a_gateways[$id]['disabled']);
@@ -192,7 +184,7 @@ if ($_POST) {
$parent_sn = get_interface_subnet($_POST['interface']);
if (empty($parent_ip) || empty($parent_sn)) {
$input_errors[] = gettext("Cannot add IPv4 Gateway Address because no IPv4 address could be found on the interface.");
- } else {
+ } elseif (!isset($_POST["nonlocalgateway"])) {
$subnets = array(gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn);
$vips = link_interface_to_vips($_POST['interface']);
if (is_array($vips)) {
@@ -223,7 +215,7 @@ if ($_POST) {
$parent_sn = get_interface_subnetv6($_POST['interface']);
if (empty($parent_ip) || empty($parent_sn)) {
$input_errors[] = gettext("Cannot add IPv6 Gateway Address because no IPv6 address could be found on the interface.");
- } else {
+ } elseif (!isset($_POST["nonlocalgateway"])) {
$subnets = array(gen_subnetv6($parent_ip, $parent_sn) . "/" . $parent_sn);
$vips = link_interface_to_vips($_POST['interface']);
if (is_array($vips)) {
@@ -313,169 +305,190 @@ if ($_POST) {
}
}
- /* input validation of apinger advanced parameters */
+ /* input validation of dpinger advanced parameters */
if ($_POST['latencylow']) {
if (!is_numeric($_POST['latencylow'])) {
$input_errors[] = gettext("The low latency threshold needs to be a numeric value.");
- } else {
- if ($_POST['latencylow'] < 1) {
- $input_errors[] = gettext("The low latency threshold needs to be positive.");
- }
+ } else if ($_POST['latencylow'] < 1) {
+ $input_errors[] = gettext("The low latency threshold needs to be positive.");
}
}
if ($_POST['latencyhigh']) {
if (!is_numeric($_POST['latencyhigh'])) {
$input_errors[] = gettext("The high latency threshold needs to be a numeric value.");
- } else {
- if ($_POST['latencyhigh'] < 1) {
- $input_errors[] = gettext("The high latency threshold needs to be positive.");
- }
+ } else if ($_POST['latencyhigh'] < 1) {
+ $input_errors[] = gettext("The high latency threshold needs to be positive.");
}
}
if ($_POST['losslow']) {
if (!is_numeric($_POST['losslow'])) {
$input_errors[] = gettext("The low Packet Loss threshold needs to be a numeric value.");
- } else {
- if ($_POST['losslow'] < 1) {
- $input_errors[] = gettext("The low Packet Loss threshold needs to be positive.");
- }
- if ($_POST['losslow'] >= 100) {
- $input_errors[] = gettext("The low Packet Loss threshold needs to be less than 100.");
- }
+ } else if ($_POST['losslow'] < 1) {
+ $input_errors[] = gettext("The low Packet Loss threshold needs to be positive.");
+ } else if ($_POST['losslow'] >= 100) {
+ $input_errors[] = gettext("The low Packet Loss threshold needs to be less than 100.");
}
}
if ($_POST['losshigh']) {
if (!is_numeric($_POST['losshigh'])) {
$input_errors[] = gettext("The high Packet Loss threshold needs to be a numeric value.");
- } else {
- if ($_POST['losshigh'] < 1) {
- $input_errors[] = gettext("The high Packet Loss threshold needs to be positive.");
- }
- if ($_POST['losshigh'] > 100) {
- $input_errors[] = gettext("The high Packet Loss threshold needs to be 100 or less.");
- }
+ } else if ($_POST['losshigh'] < 1) {
+ $input_errors[] = gettext("The high Packet Loss threshold needs to be positive.");
+ } else if ($_POST['losshigh'] > 100) {
+ $input_errors[] = gettext("The high Packet Loss threshold needs to be 100 or less.");
}
}
if (($_POST['latencylow']) && ($_POST['latencyhigh'])) {
- if ((is_numeric($_POST['latencylow'])) && (is_numeric($_POST['latencyhigh']))) {
- if (($_POST['latencylow'] > $_POST['latencyhigh'])) {
- $input_errors[] = gettext("The high latency threshold needs to be higher than the low latency threshold");
- }
- }
- } else {
- if ($_POST['latencylow']) {
- if (is_numeric($_POST['latencylow'])) {
- if ($_POST['latencylow'] > $apinger_default['latencyhigh']) {
- $input_errors[] = gettext(sprintf("The low latency threshold needs to be less than the default high latency threshold (%d)", $apinger_default['latencyhigh']));
- }
- }
- }
- if ($_POST['latencyhigh']) {
- if (is_numeric($_POST['latencyhigh'])) {
- if ($_POST['latencyhigh'] < $apinger_default['latencylow']) {
- $input_errors[] = gettext(sprintf("The high latency threshold needs to be higher than the default low latency threshold (%d)", $apinger_default['latencylow']));
- }
- }
+ if ((is_numeric($_POST['latencylow'])) &&
+ (is_numeric($_POST['latencyhigh'])) &&
+ ($_POST['latencylow'] >= $_POST['latencyhigh'])) {
+ $input_errors[] = gettext(
+ "The high latency threshold needs to be higher than the low latency threshold");
+ }
+ } else if ($_POST['latencylow']) {
+ if (is_numeric($_POST['latencylow']) &&
+ ($_POST['latencylow'] >= $dpinger_default['latencyhigh'])) {
+ $input_errors[] = gettext(sprintf(
+ "The low latency threshold needs to be less than the default high latency threshold (%d)",
+ $dpinger_default['latencyhigh']));
+ }
+ } else if ($_POST['latencyhigh']) {
+ if (is_numeric($_POST['latencyhigh']) &&
+ ($_POST['latencyhigh'] <= $dpinger_default['latencylow'])) {
+ $input_errors[] = gettext(sprintf(
+ "The high latency threshold needs to be higher than the default low latency threshold (%d)",
+ $dpinger_default['latencylow']));
}
}
if (($_POST['losslow']) && ($_POST['losshigh'])) {
- if ((is_numeric($_POST['losslow'])) && (is_numeric($_POST['losshigh']))) {
- if ($_POST['losslow'] > $_POST['losshigh']) {
- $input_errors[] = gettext("The high Packet Loss threshold needs to be higher than the low Packet Loss threshold");
- }
- }
- } else {
- if ($_POST['losslow']) {
- if (is_numeric($_POST['losslow'])) {
- if ($_POST['losslow'] > $apinger_default['losshigh']) {
- $input_errors[] = gettext(sprintf("The low Packet Loss threshold needs to be less than the default high Packet Loss threshold (%d)", $apinger_default['losshigh']));
- }
- }
- }
- if ($_POST['losshigh']) {
- if (is_numeric($_POST['losshigh'])) {
- if ($_POST['losshigh'] < $apinger_default['losslow']) {
- $input_errors[] = gettext(sprintf("The high Packet Loss threshold needs to be higher than the default low Packet Loss threshold (%d)", $apinger_default['losslow']));
- }
- }
+ if ((is_numeric($_POST['losslow'])) &&
+ (is_numeric($_POST['losshigh'])) &&
+ ($_POST['losslow'] >= $_POST['losshigh'])) {
+ $input_errors[] = gettext(
+ "The high Packet Loss threshold needs to be higher than the low Packet Loss threshold");
+ }
+ } else if ($_POST['losslow']) {
+ if (is_numeric($_POST['losslow']) &&
+ ($_POST['losslow'] >= $dpinger_default['losshigh'])) {
+ $input_errors[] = gettext(sprintf(
+ "The low Packet Loss threshold needs to be less than the default high Packet Loss threshold (%d)",
+ $dpinger_default['losshigh']));
+ }
+ } else if ($_POST['losshigh']) {
+ if (is_numeric($_POST['losshigh']) &&
+ ($_POST['losshigh'] <= $dpinger_default['losslow'])) {
+ $input_errors[] = gettext(sprintf(
+ "The high Packet Loss threshold needs to be higher than the default low Packet Loss threshold (%d)",
+ $dpinger_default['losslow']));
}
}
if ($_POST['interval']) {
if (!is_numeric($_POST['interval'])) {
$input_errors[] = gettext("The probe interval needs to be a numeric value.");
- } else {
- if ($_POST['interval'] < 1) {
- $input_errors[] = gettext("The probe interval needs to be positive.");
- }
+ } else if ($_POST['interval'] < 1) {
+ $input_errors[] = gettext("The probe interval needs to be positive.");
}
}
- if ($_POST['down']) {
- if (!is_numeric($_POST['down'])) {
- $input_errors[] = gettext("The down time setting needs to be a numeric value.");
- } else {
- if ($_POST['down'] < 1) {
- $input_errors[] = gettext("The down time setting needs to be positive.");
- }
+ if ($_POST['loss_interval']) {
+ if (!is_numeric($_POST['loss_interval'])) {
+ $input_errors[] = gettext("The loss interval needs to be a numeric value.");
+ } else if ($_POST['loss_interval'] < 1) {
+ $input_errors[] = gettext("The loss interval setting needs to be positive.");
}
}
- if (($_POST['interval']) && ($_POST['down'])) {
- if ((is_numeric($_POST['interval'])) && (is_numeric($_POST['down']))) {
- if ($_POST['interval'] > $_POST['down']) {
- $input_errors[] = gettext("The probe interval needs to be less than the down time setting.");
- }
- }
- } else {
- if ($_POST['interval']) {
- if (is_numeric($_POST['interval'])) {
- if ($_POST['interval'] > $apinger_default['down']) {
- $input_errors[] = gettext(sprintf("The probe interval needs to be less than the default down time setting (%d)", $apinger_default['down']));
- }
- }
+ // If the loss interval is less than latencyhigh, then high latency could never be recorded
+ // because those high latency packets would be considered as lost. So do not allow that.
+ if (($_POST['latencyhigh']) && ($_POST['loss_interval'])) {
+ if ((is_numeric($_POST['latencyhigh'])) &&
+ (is_numeric($_POST['loss_interval'])) &&
+ ($_POST['latencyhigh'] > $_POST['loss_interval'])) {
+ $input_errors[] = gettext("The loss interval needs to be greater than or equal to the high latency threshold.");
+ }
+ } else if ($_POST['latencyhigh']) {
+ if (is_numeric($_POST['latencyhigh']) &&
+ ($_POST['latencyhigh'] > $dpinger_default['loss_interval'])) {
+ $input_errors[] = gettext(sprintf(
+ "The high latency threshold needs to be less than or equal to the default loss interval (%d)",
+ $dpinger_default['loss_interval']));
+ }
+ } else if ($_POST['loss_interval']) {
+ if (is_numeric($_POST['loss_interval']) &&
+ ($_POST['loss_interval'] < $dpinger_default['latencyhigh'])) {
+ $input_errors[] = gettext(sprintf(
+ "The loss interval needs to be greater than or equal to the default high latency threshold (%d)",
+ $dpinger_default['latencyhigh']));
}
- if ($_POST['down']) {
- if (is_numeric($_POST['down'])) {
- if ($_POST['down'] < $apinger_default['interval']) {
- $input_errors[] = gettext(sprintf("The down time setting needs to be higher than the default probe interval (%d)", $apinger_default['interval']));
- }
- }
+ }
+
+ if ($_POST['time_period']) {
+ if (!is_numeric($_POST['time_period'])) {
+ $input_errors[] = gettext("The time period over which results are averaged needs to be a numeric value.");
+ } else if ($_POST['time_period'] < 1) {
+ $input_errors[] = gettext("The time period over which results are averaged needs to be positive.");
}
}
- if ($_POST['avg_delay_samples']) {
- if (!is_numeric($_POST['avg_delay_samples'])) {
- $input_errors[] = gettext("The average delay replies qty needs to be a numeric value.");
- } else {
- if ($_POST['avg_delay_samples'] < 1) {
- $input_errors[] = gettext("The average delay replies qty needs to be positive.");
- }
+ // It would be a weird averaging algorithm if we allowed averaging over a time that covered less than 2 pings.
+ // So make sure that the averaging time period is at least 2 times the probe interval.
+ if (($_POST['interval']) && ($_POST['time_period'])) {
+ if ((is_numeric($_POST['interval'])) &&
+ (is_numeric($_POST['time_period'])) &&
+ (($_POST['interval'] * 2) > $_POST['time_period'])) {
+ $input_errors[] = gettext("The time period over which results are averaged needs to be at least twice the probe interval.");
+ }
+ } else if ($_POST['interval']) {
+ if (is_numeric($_POST['interval']) &&
+ (($_POST['interval'] * 2) > $dpinger_default['time_period'])) {
+ $input_errors[] = gettext(sprintf(
+ "The probe interval needs to be half or less than the default time period over which results are averaged (%d)",
+ $dpinger_default['time_period']));
+ }
+ } else if ($_POST['time_period']) {
+ if (is_numeric($_POST['time_period']) &&
+ ($_POST['time_period'] < ($dpinger_default['interval'] * 2))) {
+ $input_errors[] = gettext(sprintf(
+ "The time period over which results are averaged needs to be at least twice the default probe interval (%d)",
+ $dpinger_default['interval']));
}
}
- if ($_POST['avg_loss_samples']) {
- if (!is_numeric($_POST['avg_loss_samples'])) {
- $input_errors[] = gettext("The average packet loss probes qty needs to be a numeric value.");
- } else {
- if ($_POST['avg_loss_samples'] < 1) {
- $input_errors[] = gettext("The average packet loss probes qty needs to be positive.");
- }
+ if ($_POST['alert_interval']) {
+ if (!is_numeric($_POST['alert_interval'])) {
+ $input_errors[] = gettext("The alert interval needs to be a numeric value.");
+ } else if ($_POST['alert_interval'] < 1) {
+ $input_errors[] = gettext("The alert interval needs to be positive.");
}
}
- if ($_POST['avg_loss_delay_samples']) {
- if (!is_numeric($_POST['avg_loss_delay_samples'])) {
- $input_errors[] = gettext("The lost probe delay needs to be a numeric value.");
- } else {
- if ($_POST['avg_loss_delay_samples'] < 1) {
- $input_errors[] = gettext("The lost probe delay needs to be positive.");
- }
+ // There is no point recalculating the average latency and loss more often than the probe interval.
+ // So the alert interval needs to be >= probe interval.
+ if (($_POST['interval']) && ($_POST['alert_interval'])) {
+ if ((is_numeric($_POST['interval'])) &&
+ (is_numeric($_POST['alert_interval'])) &&
+ ($_POST['interval'] > $_POST['alert_interval'])) {
+ $input_errors[] = gettext("The alert interval needs to be greater than or equal to the probe interval.");
+ }
+ } else if ($_POST['interval']) {
+ if (is_numeric($_POST['interval']) &&
+ ($_POST['interval'] > $dpinger_default['alert_interval'])) {
+ $input_errors[] = gettext(sprintf(
+ "The probe interval needs to be less than or equal to the default alert interval (%d)",
+ $dpinger_default['alert_interval']));
+ }
+ } else if ($_POST['alert_interval']) {
+ if (is_numeric($_POST['alert_interval']) &&
+ ($_POST['alert_interval'] < $dpinger_default['interval'])) {
+ $input_errors[] = gettext(sprintf(
+ "The alert interval needs to be greater than or equal to the default probe interval (%d)",
+ $dpinger_default['interval']));
}
}
@@ -496,27 +509,24 @@ if ($_POST) {
$gateway['name'] = $_POST['name'];
$gateway['weight'] = $_POST['weight'];
$gateway['ipprotocol'] = $_POST['ipprotocol'];
- $gateway['interval'] = $_POST['interval'];
-
- $gateway['avg_delay_samples'] = $_POST['avg_delay_samples'];
- if ($_POST['avg_delay_samples_calculated'] == "yes" || $_POST['avg_delay_samples_calculated'] == "on") {
- $gateway['avg_delay_samples_calculated'] = true;
+ if ($_POST['interval']) {
+ $gateway['interval'] = $_POST['interval'];
}
- $gateway['avg_loss_samples'] = $_POST['avg_loss_samples'];
- if ($_POST['avg_loss_samples_calculated'] == "yes" || $_POST['avg_loss_samples_calculated'] == "on") {
- $gateway['avg_loss_samples_calculated'] = true;
+ if ($_POST['time_period']) {
+ $gateway['time_period'] = $_POST['time_period'];
}
-
- $gateway['avg_loss_delay_samples'] = $_POST['avg_loss_delay_samples'];
- if ($_POST['avg_loss_delay_samples_calculated'] == "yes" || $_POST['avg_loss_delay_samples_calculated'] == "on") {
- $gateway['avg_loss_delay_samples_calculated'] = true;
+ if ($_POST['alert_interval']) {
+ $gateway['alert_interval'] = $_POST['alert_interval'];
}
$gateway['descr'] = $_POST['descr'];
if ($_POST['monitor_disable'] == "yes") {
$gateway['monitor_disable'] = true;
}
+ if ($_POST['nonlocalgateway'] == "yes") {
+ $gateway['nonlocalgateway'] = true;
+ }
if ($_POST['force_down'] == "yes") {
$gateway['force_down'] = true;
}
@@ -524,9 +534,19 @@ if ($_POST) {
$gateway['monitor'] = $_POST['monitor'];
}
+ /* NOTE: If gateway ip is changed need to cleanup the old static interface route */
+ if ($_POST['monitor'] != "dynamic" && !empty($a_gateway_item[$realid]) && is_ipaddr($a_gateway_item[$realid]['gateway']) &&
+ $gateway['gateway'] != $a_gateway_item[$realid]['gateway'] &&
+ isset($a_gateway_item[$realid]["nonlocalgateway"])) {
+ $realif = get_real_interface($a_gateway_item[$realid]['interface']);
+ $inet = (!is_ipaddrv4($a_gateway_item[$realid]['gateway']) ? "-inet6" : "-inet");
+ $cmd = "/sbin/route delete $inet " . escapeshellarg($a_gateway_item[$realid]['gateway']) . " -iface " . escapeshellarg($realif);
+ mwexec($cmd);
+ }
+
/* NOTE: If monitor ip is changed need to cleanup the old static route */
if ($_POST['monitor'] != "dynamic" && !empty($a_gateway_item[$realid]) && is_ipaddr($a_gateway_item[$realid]['monitor']) &&
- $_POST['monitor'] != $a_gateway_item[$realid]['monitor'] && $gateway['gateway'] != $a_gateway_item[$realid]['monitor']) {
+ $_POST['monitor'] != $a_gateway_item[$realid]['monitor'] && $gateway['gateway'] != $a_gateway_item[$realid]['monitor']) {
if (is_ipaddrv4($a_gateway_item[$realid]['monitor'])) {
mwexec("/sbin/route delete " . escapeshellarg($a_gateway_item[$realid]['monitor']));
} else {
@@ -561,8 +581,8 @@ if ($_POST) {
if ($_POST['losshigh']) {
$gateway['losshigh'] = $_POST['losshigh'];
}
- if ($_POST['down']) {
- $gateway['down'] = $_POST['down'];
+ if ($_POST['loss_interval']) {
+ $gateway['loss_interval'] = $_POST['loss_interval'];
}
if (isset($_POST['disabled'])) {
@@ -608,73 +628,19 @@ if ($_POST) {
}
}
-
-$pgtitle = array(gettext("System"), gettext("Gateways"), gettext("Edit gateway"));
+$pgtitle = array(gettext("System"), gettext("Routing"), gettext("Gateways"), gettext("Edit"));
$shortcut_section = "gateways";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-?>
-<script>
-var systemGatewaysEditRecalculate = function(){
- var interval = $('#interval')[0].value;
-
- $('input[name$=_calculated]').each(function (idx, c){
- c = $(c);
- i = $(c.parents('.form-group').find('input[type=number]')[0]);
-
- c.prop('disabled', interval==0);
-
- if (interval==0)
- c.prop('checked', false);
-
- if (!c.prop('checked'))
- return i.prop('readonly', false);
-
- switch (i.attr('name'))
- {
- case 'avg_delay_samples':
- // How many replies should be used to compute average delay
- // for controlling "delay" alarms.
- // Calculate a reasonable value based on gateway probe interval and RRD 1 minute average graph step size (60).
- i.attr('value', Math.round(60 * (1/6) / Math.pow(interval, 0.333)));
- break;
-
- case 'avg_loss_samples':
- // How many probes should be used to compute average loss.
- // Calculate a reasonable value based on gateway probe interval and RRD 1 minute average graph step size (60).
- i.attr('value', Math.round(60 / interval));
- break;
-
- case 'avg_loss_delay_samples':
- // The delay (in samples) after which loss is computed
- // without this delays larger than interval would be treated as loss.
- // Calculate a reasonable value based on gateway probe interval and RRD 1 minute average graph step size (60).
- i.attr('value', Math.round(60 * (1/3) / interval));
- break;
- }
-
- i.prop('readonly', true);
- });
-};
-
-events.push(function(){
- $('#interval').on('change', systemGatewaysEditRecalculate);
- $('input[name$=_calculated]').on('change', systemGatewaysEditRecalculate);
-
- systemGatewaysEditRecalculate();
-});
-</script>
-<?php
-
-require_once('classes/Form.class.php');
$form = new Form;
/* If this is a system gateway we need this var */
-if(($pconfig['attribute'] == "system") || is_numeric($pconfig['attribute'])) {
+if (($pconfig['attribute'] == "system") || is_numeric($pconfig['attribute'])) {
$form->addGlobal(new Form_Input(
'attribute',
null,
@@ -733,12 +699,20 @@ $section->addInput(new Form_Input(
$pconfig['name']
))->setHelp('Gateway name');
-$section->addInput(new Form_Input(
+$egw = new Form_Input(
'gateway',
'Gateway',
'text',
($pconfig['dynamic'] ? 'dynamic' : $pconfig['gateway'])
-))->setHelp('Gateway IP address');
+);
+
+$egw->setHelp('Gateway IP address');
+
+if ($pconfig['dynamic']) {
+ $egw->setReadonly();
+}
+
+$section->addInput($egw);
$section->addInput(new Form_Checkbox(
'defaultgw',
@@ -785,21 +759,40 @@ $section->addInput(new Form_Input(
$pconfig['descr']
))->setHelp('You may enter a description here for your reference (not parsed).');
-$btnadvanced = new Form_Button(
- 'toggle-advanced',
- 'Advanced options'
-);
+// If any of the advanced options are non-default, we will not show the "Advanced" button
+// and will display the advanced section
+if (!(!empty($pconfig['latencylow']) || !empty($pconfig['latencyhigh']) ||
+ !empty($pconfig['losslow']) || !empty($pconfig['losshigh']) ||
+ (isset($pconfig['weight']) && $pconfig['weight'] > 1) ||
+ (isset($pconfig['interval']) && !($pconfig['interval'] == $dpinger_default['interval'])) ||
+ (isset($pconfig['loss_interval']) && !($pconfig['loss_interval'] == $dpinger_default['loss_interval'])) ||
+ (isset($pconfig['time_period']) && !($pconfig['time_period'] == $dpinger_default['time_period'])) ||
+ (isset($pconfig['alert_interval']) && !($pconfig['alert_interval'] == $dpinger_default['alert_interval'])) ||
+ (isset($pconfig['nonlocalgateway']) && $pconfig['nonlocalgateway']))) {
-$btnadvanced->toggles('.advanced-options')->setAttribute('type', 'button');
-$btnadvanced->removeClass('btn-primary')->addClass('btn-info');
+ $btnadvanced = new Form_Button(
+ 'toggle-advanced',
+ 'Advanced options'
+ );
-$section->addInput(new Form_StaticText(
- null,
- $btnadvanced
-));
+ $advdflt = true;
+
+ $btnadvanced->toggles('.advanced-options')->setAttribute('type', 'button');
+ $btnadvanced->removeClass('btn-primary')->addClass('btn-default');
+
+ $section->addInput(new Form_StaticText(
+ null,
+ $btnadvanced
+ ));
+}
$form->add($section);
$section = new Form_Section('Advanced');
+
+if (isset($advdflt)) {
+ $section->addClass('collapse');
+}
+
$section->addClass('advanced-options');
$section->addInput(new Form_Select(
@@ -815,17 +808,17 @@ $group->add(new Form_Input(
'From',
'number',
$pconfig['latencylow'],
- ['placeholder' => $apinger_default['latencylow']]
+ ['placeholder' => $dpinger_default['latencylow']]
));
$group->add(new Form_Input(
'latencyhigh',
'To',
'number',
$pconfig['latencyhigh'],
- ['placeholder' => $apinger_default['latencyhigh']]
+ ['placeholder' => $dpinger_default['latencyhigh']]
));
$group->setHelp('Low and high thresholds for latency in milliseconds.
- Default is %d/%d.', [$apinger_default['latencylow'], $apinger_default['latencyhigh']]);
+ Default is %d/%d.', [$dpinger_default['latencylow'], $dpinger_default['latencyhigh']]);
$section->add($group);
@@ -835,17 +828,17 @@ $group->add(new Form_Input(
'From',
'number',
$pconfig['losslow'],
- ['placeholder' => $apinger_default['losslow']]
+ ['placeholder' => $dpinger_default['losslow']]
));
$group->add(new Form_Input(
'losshigh',
'To',
'number',
$pconfig['losshigh'],
- ['placeholder' => $apinger_default['losshigh']]
+ ['placeholder' => $dpinger_default['losshigh']]
));
-$group->setHelp('Low and high thresholds for packet loss in milliseconds.
- Default is %d/%d.', [$apinger_default['losslow'], $apinger_default['losshigh']]);
+$group->setHelp('Low and high thresholds for packet loss in %%.
+ Default is %d/%d.', [$dpinger_default['losslow'], $dpinger_default['losshigh']]);
$section->add($group);
$section->addInput(new Form_Input(
@@ -854,108 +847,80 @@ $section->addInput(new Form_Input(
'number',
$pconfig['interval'],
[
- 'placeholder' => $apinger_default['interval'],
+ 'placeholder' => $dpinger_default['interval'],
'max' => 86400
]
-))->setHelp('How often an ICMP probe will be sent in seconds. Default is %d.'.
+))->setHelp('How often an ICMP probe will be sent in milliseconds. Default is %d. '.
'NOTE: The quality graph is averaged over seconds, not intervals, so as '.
'the probe interval is increased the accuracy of the quality graph is '.
- 'decreased.', [$apinger_default['interval']]);
+ 'decreased.', [$dpinger_default['interval']]);
$section->addInput(new Form_Input(
- 'down',
- 'Down',
- 'number',
- $pconfig['down'],
- ['placeholder' => $apinger_default['down']]
-))->setHelp('The number of seconds of failed probes before the alarm '.
- 'will fire. Default is %d.', [$apinger_default['down']]);
-
-$group = new Form_Group('Avg. Delay Replies Qty');
-$group->add(new Form_Input(
- 'avg_delay_samples',
- null,
+ 'loss_interval',
+ 'Loss Interval',
'number',
- $pconfig['avg_delay_samples'],
- [
- 'placeholder' => $apinger_default['avg_delay_samples'],
- 'max' => 100
- ]
-));
-$group->add(new Form_Checkbox(
- 'avg_delay_samples_calculated',
- null,
- 'Use calculated value.',
- $pconfig['avg_delay_samples_calculated']
-));
-$group->setHelp('How many replies should be used to compute average delay for '.
- 'controlling "delay" alarms? Default is %d.',
- [$apinger_default['avg_delay_samples']]);
-$section->add($group);
+ $pconfig['loss_interval'],
+ ['placeholder' => $dpinger_default['loss_interval']]
+))->setHelp('Time interval in milliseconds before packets are treated as lost. '.
+ 'Default is %d.', [$dpinger_default['loss_interval']]);
-$group = new Form_Group('Avg. Packet Loss Probes');
+$group = new Form_Group('Time Period');
$group->add(new Form_Input(
- 'avg_loss_samples',
+ 'time_period',
null,
'number',
- $pconfig['avg_loss_samples'],
+ $pconfig['time_period'],
[
- 'placeholder' => $apinger_default['avg_loss_samples'],
- 'max' => 1000
+ 'placeholder' => $dpinger_default['time_period']
]
));
-$group->add(new Form_Checkbox(
- 'avg_loss_samples_calculated',
- null,
- 'Use calculated value.',
- $pconfig['avg_loss_samples_calculated']
-));
-$group->setHelp('How many probes should be useds to compute average packet loss? '.
- 'Default is %d.',
- [$apinger_default['avg_loss_samples']]);
+$group->setHelp('Time period in milliseconds over which results are averaged. Default is %d.',
+ [$dpinger_default['time_period']]);
$section->add($group);
-$group = new Form_Group('Lost Probe Delay');
+$group = new Form_Group('Alert interval');
$group->add(new Form_Input(
- 'avg_loss_delay_samples',
+ 'alert_interval',
null,
'number',
- $pconfig['avg_loss_delay_samples'],
+ $pconfig['alert_interval'],
[
- 'placeholder' => $apinger_default['avg_loss_delay_samples'],
- 'max' => 200
+ 'placeholder' => $dpinger_default['alert_interval']
]
));
-$group->add(new Form_Checkbox(
- 'avg_loss_delay_samples_calculated',
- null,
- 'Use calculated value.',
- $pconfig['avg_loss_samples_calculated']
-));
-$group->setHelp('The delay (in qty of probe samples) after which loss is '.
- 'computed. Without this, delays longer than the probe interval would be '.
- 'treated as packet loss. Default is %d.',
- [$apinger_default['avg_loss_delay_samples']]);
+$group->setHelp('Time interval in milliseconds between checking for an alert condition. Default is %d.',
+ [$dpinger_default['alert_interval']]);
$section->add($group);
$section->addInput(new Form_StaticText(
'Additional information',
'<span class="help-block">'.
- gettext('The probe interval must be less than the down time, otherwise the '.
- 'gateway will seem to go down then come up again at the next probe.').
- '<br/><br/>'.
- gettext('The down time defines the length of time before the gateway is marked '.
- 'as down, but the accuracy is controlled by the probe interval. For example, '.
- 'if your down time is 40 seconds but on a 30 second probe interval, only one '.
- 'probe would have to fail before the gateway is marked down at the 40 second '.
- 'mark. By default, the gateway is considered down after 10 seconds, and the '.
- 'probe interval is 1 second, so 10 probes would have to fail before the gateway '.
- 'is marked down.').
+ gettext('The time period over which results are averaged must be at least twice ' .
+ 'the probe interval, otherwise the averaging would only "average" over a single probe.') .
+ '<br/><br/>' .
+ gettext('The alert interval must be greater than or equal to the probe interval. ' .
+ 'There is no point checking for alerts more often than probes are done.') .
+ '<br/><br/>' .
+ gettext('The loss interval must be greater than or equal to the high latency threshold. ' .
+ 'Otherwise high latency packets would always be considered as lost.') .
+ '<br/><br/>' .
+ gettext('Choose a combination of parameters to suit your needs. ' .
+ 'For example, a short probe interval will give more probes and (hopefully) ' .
+ 'a statistically more stable average. A higher loss interval will allow the ' .
+ 'system to wait longer for probes on high-latency links, and thus allow a ' .
+ 'better estimate of high-latency versus loss.').
'</span>'
));
+$section->addInput(new Form_Checkbox(
+ 'nonlocalgateway',
+ 'Use non-local gateway',
+ 'Use non-local gateway through interface specific route.',
+ $pconfig['nonlocalgateway']
+))->setHelp('This will allow use of a gateway outside of this interface\'s subnet. This is usually indicative of a configuration error, but is required for some scenarios.');
+
$form->add($section);
print $form;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php
index fbc0e43..a934ad3 100644
--- a/src/usr/local/www/system_groupmanager.php
+++ b/src/usr/local/www/system_groupmanager.php
@@ -1,56 +1,73 @@
<?php
/*
- $Id: system_groupmanager.php
- part of m0n0wall (http://m0n0.ch/wall)
- part of pfSense
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Copyright (C) 2008 Shrew Soft Inc.
- All rights reserved.
-
- Copyright (C) 2005 Paul Taylor <paultaylor@winn-dixie.com>.
- All rights reserved.
-
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: auth
+ system_groupmanager.php
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Paul Taylor <paultaylor@winn-dixie.com>
+ * Copyright (c) 2008 Shrew Soft Inc
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-groupmanager
-##|*NAME=System: Group manager page
+##|*NAME=System: Group manager
##|*DESCR=Allow access to the 'System: Group manager' page.
##|*MATCH=system_groupmanager.php*
##|-PRIV
require("guiconfig.inc");
-$pgtitle = array(gettext("System"), gettext("Group manager"));
+$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Groups"));
if (!is_array($config['system']['group'])) {
$config['system']['group'] = array();
@@ -226,7 +243,9 @@ function build_priv_table() {
$privhtml .= '<tr>';
$privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>';
+ $privhtml .= '<td><a class="fa fa-trash" title="'.gettext('Delete Privilege').'" href="system_groupmanager.php?act=delpriv&amp;groupid='.$id.'&amp;privid='.$i.'"></a></td>';
$privhtml .= '</tr>';
+
}
$privhtml .= '</tbody>';
@@ -242,10 +261,12 @@ function build_priv_table() {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
+}
+if ($savemsg) {
print_info_box($savemsg);
+}
$tab_array = array();
$tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
@@ -254,26 +275,26 @@ $tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.ph
$tab_array[] = array(gettext("Servers"), false, "system_authservers.php");
display_top_tabs($tab_array);
-if (!($_GET['act'] == "new" || $_GET['act'] == "edit"))
-{
+if (!($_GET['act'] == "new" || $_GET['act'] == "edit")) {
?>
<div class="table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Group name")?></th>
<th><?=gettext("Description")?></th>
<th><?=gettext("Member Count")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
<?php
- foreach($a_group as $i => $group):
- if ($group["name"] == "all")
+ foreach ($a_group as $i => $group):
+ if ($group["name"] == "all") {
$groupcount = count($config['system']['user']);
- else
+ } else {
$groupcount = count($group['member']);
+ }
?>
<tr>
<td>
@@ -286,9 +307,9 @@ if (!($_GET['act'] == "new" || $_GET['act'] == "edit"))
<?=$groupcount?>
</td>
<td>
- <a href="?act=edit&amp;groupid=<?=$i?>" class="btn btn-xs btn-primary">edit</a>
- <?php if($group['scope'] != "system"): ?>
- <a href="?act=delgroup&amp;groupid=<?=$i?>&amp;groupname=<?=$group['name']?>" class="btn btn-xs btn-danger">delete</a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit group"); ?>" href="?act=edit&amp;groupid=<?=$i?>"></a>
+ <?php if ($group['scope'] != "system"): ?>
+ <a class="fa fa-trash" title="<?=gettext("Delete group")?>" href="?act=delgroup&amp;groupid=<?=$i?>&amp;groupname=<?=$group['name']?>"></a>
<?php endif;?>
</td>
</tr>
@@ -300,14 +321,16 @@ if (!($_GET['act'] == "new" || $_GET['act'] == "edit"))
</div>
<nav class="action-buttons">
- <a href="?act=new" class="btn btn-success">add new</a>
+ <a href="?act=new" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
<?php
include('foot.inc');
exit;
}
-require_once('classes/Form.class.php');
$form = new Form;
$form->setAction('system_groupmanager.php?act=edit');
$form->addGlobal(new Form_Input(
@@ -335,8 +358,7 @@ if (isset($id) && $a_group[$id]){
$section = new Form_Section('Group properties');
-if ($_GET['act'] != "new")
-{
+if ($_GET['act'] != "new") {
$section->addInput(new Form_StaticText(
'Defined by',
strtoupper($pconfig['gtype'])
@@ -350,8 +372,9 @@ $section->addInput($input = new Form_Input(
$pconfig['name']
));
-if ($pconfig['gtype'] == "system")
+if ($pconfig['gtype'] == "system") {
$input->setReadonly();
+}
$section->addInput(new Form_Input(
'description',
@@ -361,8 +384,8 @@ $section->addInput(new Form_Input(
))->setHelp('Group description, for your own information only');
$form->add($section);
-if ($pconfig['gid'] != 1998) // all users group
-{
+if ($pconfig['gid'] != 1998) { // all users group
+
// ==== Group membership ==================================================
$group = new Form_Group('Group membership');
@@ -372,10 +395,11 @@ if ($pconfig['gid'] != 1998) // all users group
$usersGroups = array();
foreach ($config['system']['user'] as $user) {
- if (is_array($pconfig['members']) && in_array($user['uid'], $pconfig['members']))
+ if (is_array($pconfig['members']) && in_array($user['uid'], $pconfig['members'])) {
$usersGroups[ $user['uid'] ] = $user['name']; // Add it to the user's list
- else
+ } else {
$systemGroups[ $user['uid'] ] = $user['name']; // Add it to the 'not a member of' list
+ }
}
$group->add(new Form_Select(
@@ -413,8 +437,7 @@ if ($pconfig['gid'] != 1998) // all users group
}
-if ($_GET['act'] != "new")
-{
+if ($_GET['act'] != "new") {
$section = new Form_Section('Assigned Privileges');
$section->addInput(new Form_StaticText(
@@ -428,9 +451,9 @@ if ($_GET['act'] != "new")
print $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Select every option in the specified multiselect
function AllServers(id, selectAll) {
@@ -444,9 +467,9 @@ events.push(function(){
var len = From.length;
var option, value;
- if(len > 1) {
- for(i=0; i<len; i++) {
- if(From.eq(i).is(':selected')) {
+ if (len > 1) {
+ for (i=0; i<len; i++) {
+ if (From.eq(i).is(':selected')) {
option = From.eq(i).val();
value = From.eq(i).text();
To.append(new Option(value, option));
@@ -471,11 +494,11 @@ events.push(function(){
});
// On submit mark all the user's groups as "selected"
- $('form').submit(function(){
+ $('form').submit(function() {
AllServers($('[name="members[]"] option'), true);
});
});
//]]>
</script>
<?php
-include('foot.inc'); \ No newline at end of file
+include('foot.inc');
diff --git a/src/usr/local/www/system_groupmanager_addprivs.php b/src/usr/local/www/system_groupmanager_addprivs.php
index 1f45956..5882727 100644
--- a/src/usr/local/www/system_groupmanager_addprivs.php
+++ b/src/usr/local/www/system_groupmanager_addprivs.php
@@ -1,40 +1,65 @@
<?php
-/* $Id$ */
/*
system_groupmanager_addprivs.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2006 Daniel S. Haischt.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: auth
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2006 Daniel S. Haischt.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-groupmanager-addprivs
-##|*NAME=System: Group Manager: Add Privileges page
+##|*NAME=System: Group Manager: Add Privileges
##|*DESCR=Allow access to the 'System: Group Manager: Add Privileges' page.
##|*MATCH=system_groupmanager_addprivs.php*
##|-PRIV
@@ -55,7 +80,7 @@ function admin_groups_sort() {
require("guiconfig.inc");
-$pgtitle = array(gettext("System"), gettext("Group manager"), gettext("Add privileges"));
+$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Groups"), gettext("Add Privileges"));
if (is_numericint($_GET['groupid'])) {
$groupid = $_GET['groupid'];
@@ -128,12 +153,31 @@ if (isAjax()) {
print_info_box_np($savemsg);
}
+function build_priv_list() {
+ global $priv_list, $a_group;
+
+ $list = array();
+
+ foreach ($priv_list as $pname => $pdata) {
+ if (in_array($pname, $a_group['priv'])) {
+ continue;
+ }
+
+ $list[$pname] = $pdata;
+ }
+
+ return($list);
+}
+
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
- print_info_box($savemsg);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, success);
+}
$tab_array = array();
$tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
@@ -142,10 +186,8 @@ $tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.ph
$tab_array[] = array(gettext("Servers"), false, "system_authservers.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
$form = new Form;
-if (isset($groupid))
-{
+if (isset($groupid)) {
$form->addGlobal(new Form_Input(
'groupid',
null,
@@ -157,18 +199,57 @@ if (isset($groupid))
$section = new Form_Section('Add privileges for '. $a_group['name']);
$priv_list = array_map(function($p){ return $p['name']; }, $priv_list);
-asort($priv_list);
+asort($priv_list, SORT_STRING|SORT_FLAG_CASE);
$section->addInput(new Form_Select(
'sysprivs',
'Assigned privileges',
$a_group['priv'],
- $priv_list,
+ build_priv_list(),
true
-))->setHelp('Hold down CTRL (pc)/COMMAND (mac) key to select');
+))->addClass('multiselect')->setHelp('Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items.')->setAttribute('style', 'height:400px;');
$form->add($section);
print $form;
-include('foot.inc'); \ No newline at end of file
+?>
+<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc">Select a privilege from the list above for a description</div>
+
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+
+<?php
+
+ // Build a list of privilege descriptions
+ if (is_array($priv_list)) {
+ $id = 0;
+
+ $jdescs = "var descs = new Array();\n";
+ foreach ($priv_list as $pname => $pdata) {
+ if (in_array($pname, $a_group['priv'])) {
+ continue;
+ }
+
+ $desc = addslashes(preg_replace("/pfSense/i", $g['product_name'], $pdata));
+ $jdescs .= "descs[{$id}] = '{$desc}';\n";
+ $id++;
+ }
+
+ echo $jdescs;
+ }
+?>
+ // Set the number of options to display
+ $('.multiselect').attr("size","20");
+
+ // When the 'sysprivs" selector is clicked, we display a description
+ $('.multiselect').click(function() {
+ $('#pdesc').html('<span style="color: green;">' + descs[$(this).children('option:selected').index()] + '</span>');
+ });
+});
+//]]>
+</script>
+
+<?php
+include('foot.inc');
diff --git a/src/usr/local/www/system_hasync.php b/src/usr/local/www/system_hasync.php
index 85ba736..6104d5c 100755
--- a/src/usr/local/www/system_hasync.php
+++ b/src/usr/local/www/system_hasync.php
@@ -1,37 +1,58 @@
<?php
-/* $Id$ */
/*
system_hasync.php
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2012 Darren Embry <dse@webonastick.com>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: system
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2012 Darren Embry <dse@webonastick.com>.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-hasync
@@ -42,8 +63,9 @@
require("guiconfig.inc");
-if (!is_array($config['hasync']))
+if (!is_array($config['hasync'])) {
$config['hasync'] = array();
+}
$a_hasync = &$config['hasync'];
@@ -65,7 +87,6 @@ $checkbox_names = array(
'synchronizevirtualip',
'synchronizetrafficshaper',
'synchronizetrafficshaperlimiter',
- 'synchronizetrafficshaperlayer7',
'synchronizednsforwarder',
'synchronizecaptiveportal');
@@ -74,15 +95,25 @@ if ($_POST) {
foreach ($checkbox_names as $name) {
$a_hasync[$name] = $pconfig[$name] ? $pconfig[$name] : false;
}
- $a_hasync['pfsyncpeerip'] = $pconfig['pfsyncpeerip'];
+ $a_hasync['pfsyncpeerip'] = $pconfig['pfsyncpeerip'];
$a_hasync['pfsyncinterface'] = $pconfig['pfsyncinterface'];
$a_hasync['synchronizetoip'] = $pconfig['synchronizetoip'];
- $a_hasync['username'] = $pconfig['username'];
- $a_hasync['password'] = $pconfig['passwordfld'];
- write_config("Updated High Availability Sync configuration");
- interfaces_sync_setup();
- header("Location: system_hasync.php");
- exit();
+ $a_hasync['username'] = $pconfig['username'];
+
+ if ($pconfig['passwordfld'] == $pconfig['passwordfld_confirm']) {
+ if ($pconfig['passwordfld'] != DMYPWD) {
+ $a_hasync['password'] = $pconfig['passwordfld'];
+ }
+ } else {
+ $input_errors[] = gettext("Password and confirmation must match.");
+ }
+
+ if (!$input_errors) {
+ write_config("Updated High Availability Sync configuration");
+ interfaces_sync_setup();
+ header("Location: system_hasync.php");
+ exit();
+ }
}
foreach ($checkbox_names as $name) {
@@ -108,7 +139,9 @@ foreach ($ifaces as $ifname => $iface) {
include("head.inc");
-require_once('classes/Form.class.php');
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
$form = new Form;
@@ -127,7 +160,7 @@ $section->addInput(new Form_Checkbox(
$section->addInput(new Form_Select(
'pfsyncinterface',
- 'Synchorize Interface',
+ 'Synchronize Interface',
$pconfig['pfsyncinterface'],
$iflist
))->setHelp('If Synchronize States is enabled this interface will be used for communication.<br />' .
@@ -165,7 +198,7 @@ $section->addInput(new Form_Input(
))->setHelp('Enter the webConfigurator username of the system entered above for synchronizing your configuration.<br />' .
'Do not use the Synchronize Config to IP and username option on backup cluster members!');
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'passwordfld',
'Remote System Password',
'password',
@@ -304,16 +337,8 @@ $group->add(new Form_MultiCheckbox(
));
$group->add(new Form_MultiCheckbox(
- 'synchronizetrafficshaperlayer7',
- 'Synchronize traffic shaper (layer 7)',
- 'Traffic Shaper Layer 7 configuration ',
- ($pconfig['synchronizetrafficshaperlayer7'] === 'on'),
- 'on'
-));
-
-$group->add(new Form_MultiCheckbox(
'synchronizednsforwarder',
- 'Synchronize traffic shaper (Forwarder/Resolver)',
+ 'Synchronize DNS (Forwarder/Resolver)',
'DNS Forwarder and DNS Resolver configurations ',
($pconfig['synchronizednsforwarder'] === 'on'),
'on'
diff --git a/src/usr/local/www/system_routes.php b/src/usr/local/www/system_routes.php
index 600d872..5e5e41e 100644
--- a/src/usr/local/www/system_routes.php
+++ b/src/usr/local/www/system_routes.php
@@ -1,42 +1,64 @@
<?php
-/* $Id$ */
/*
system_routes.php
- part of m0n0wall (http://m0n0.ch/wall)
- part of pfSense
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: routing
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-staticroutes
-##|*NAME=System: Static Routes page
+##|*NAME=System: Static Routes
##|*DESCR=Allow access to the 'System: Static Routes' page.
##|*MATCH=system_routes.php*
##|-PRIV
@@ -220,22 +242,25 @@ if (isset($_POST['del_x'])) {
}
}
-$pgtitle = array(gettext("System"), gettext("Static Routes"));
+$pgtitle = array(gettext("System"), gettext("Routing"), gettext("Static Routes"));
$shortcut_section = "routing";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
+}
+if ($savemsg) {
print_info_box($savemsg);
-if (is_subsystem_dirty('staticroutes'))
+}
+if (is_subsystem_dirty('staticroutes')) {
print_info_box_np(gettext("The static route configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
$tab_array = array();
$tab_array[0] = array(gettext("Gateways"), false, "system_gateways.php");
-$tab_array[1] = array(gettext("Routes"), true, "system_routes.php");
-$tab_array[2] = array(gettext("Groups"), false, "system_gateway_groups.php");
+$tab_array[1] = array(gettext("Static Routes"), true, "system_routes.php");
+$tab_array[2] = array(gettext("Gateway Groups"), false, "system_gateway_groups.php");
display_top_tabs($tab_array);
?>
@@ -247,19 +272,20 @@ display_top_tabs($tab_array);
<th><?=gettext("Gateway")?></th>
<th><?=gettext("Interface")?></th>
<th><?=gettext("Description")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($a_routes as $i => $route):
- if (isset($route['disabled']))
- $icon = 'icon-ban-circle';
- else
- $icon = 'icon-ok-circle';
+ if (isset($route['disabled'])) {
+ $icon = 'fa-ban';
+ } else {
+ $icon = 'fa-check-circle-o';
+ }
?>
- <tr<?=($icon != 'icon-ok-circle')? ' class="disabled"' : ''?>>
- <td><i class="icon <?=$icon?>"></i></td>
+ <tr<?=($icon != 'fa-check-circle-o')? ' class="disabled"' : ''?>>
+ <td><i class="fa <?=$icon?>"></i></td>
<td>
<?=strtolower($route['network'])?>
</td>
@@ -273,31 +299,31 @@ foreach ($a_routes as $i => $route):
<?=htmlspecialchars($route['descr'])?>
</td>
<td>
- <a class="btn btn-xs btn-primary" href="system_routes_edit.php?id=<?=$i?>">
- edit
- </a>
+ <a href="system_routes_edit.php?id=<?=$i?>" class="fa fa-pencil" title="<?=gettext('Edit')?>"></a>
- <a class="btn btn-xs btn-default" href="system_routes_edit.php?dup=<?=$i?>">
- copy
- </a>
+ <a href="system_routes_edit.php?dup=<?=$i?>" class="fa fa-clone" title="<?=gettext('Copy')?>"></a>
- <a class="btn btn-xs btn-danger" href="system_routes.php?act=del&amp;id=<?=$i?>">
- delete
- </a>
+ <?php if (isset($route['disabled'])) {
+ ?>
+ <a href="?act=toggle&amp;id=<?=$i?>" class="fa fa-check-square-o" title="<?=gettext('Enable')?>"></a>
+ <?php } else {
+ ?>
+ <a href="?act=toggle&amp;id=<?=$i?>" class="fa fa-ban" title="<?=gettext('Disable')?>"></a>
+ <?php }
+ ?>
+ <a href="system_routes.php?act=del&amp;id=<?=$i?>" class="fa fa-trash" title="<?=gettext('Delete')?>"></a>
- <a class="btn btn-xs btn-default" href="?act=toggle&amp;id=<?=$i?>">
- toggle
- </a>
</td>
-<? endforeach?>
</tr>
+<? endforeach?>
</table>
<nav class="action-buttons">
- <a href="system_routes_edit.php" role="button" class="btn btn-success">
- <?=gettext("add new route")?>
+ <a href="system_routes_edit.php" role="button" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
</a>
</nav>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_routes_edit.php b/src/usr/local/www/system_routes_edit.php
index d5fb02b..0e81be8 100644
--- a/src/usr/local/www/system_routes_edit.php
+++ b/src/usr/local/www/system_routes_edit.php
@@ -3,64 +3,62 @@
system_routes_edit.php
*/
/* ====================================================================
- * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2003-2004 Manuel Kasper <mk@neon1.net>
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without modification,
- * are permitted provided that the following conditions are met:
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
*
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
*
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgment:
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
*
- * 4. The names "pfSense" and "pfSense Project" must not be used to
- * endorse or promote products derived from this software without
- * prior written permission. For written permission, please contact
- * coreteam@pfsense.org.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
*
- * 5. Products derived from this software may not be called "pfSense"
- * nor may "pfSense" appear in their names without prior written
- * permission of the Electric Sheep Fencing, LLC.
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
*
- * 6. Redistributions of any form whatsoever must retain the following
- * acknowledgment:
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
*
- * "This product includes software developed by the pfSense Project
- * for use in the pfSense software distribution (http://www.pfsense.org/).
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
*
- * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
- * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
*
- * ====================================================================
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
*
*/
-/*
- pfSense_MODULE: routing
-*/
##|+PRIV
##|*IDENT=page-system-staticroutes-editroute
-##|*NAME=System: Static Routes: Edit route page
+##|*NAME=System: Static Routes: Edit route
##|*DESCR=Allow access to the 'System: Static Routes: Edit route' page.
##|*MATCH=system_routes_edit.php*
##|-PRIV
@@ -201,17 +199,17 @@ if ($_POST) {
if (is_array($config['interfaces'])) {
foreach ($config['interfaces'] as $if) {
if (is_ipaddrv4($_POST['network']) &&
- isset($if['ipaddr']) && isset($if['subnet']) &&
- is_ipaddrv4($if['ipaddr']) && is_numeric($if['subnet']) &&
- ($_POST['network_subnet'] == $if['subnet']) &&
- (gen_subnet($_POST['network'], $_POST['network_subnet']) == gen_subnet($if['ipaddr'], $if['subnet']))) {
- $input_errors[] = sprintf(gettext("This network conflicts with address configured on interface %s."), $if['descr']);
+ isset($if['ipaddr']) && isset($if['subnet']) &&
+ is_ipaddrv4($if['ipaddr']) && is_numeric($if['subnet']) &&
+ ($_POST['network_subnet'] == $if['subnet']) &&
+ (gen_subnet($_POST['network'], $_POST['network_subnet']) == gen_subnet($if['ipaddr'], $if['subnet']))) {
+ $input_errors[] = sprintf(gettext("This network conflicts with address configured on interface %s."), $if['descr']);
} else if (is_ipaddrv6($_POST['network']) &&
- isset($if['ipaddrv6']) && isset($if['subnetv6']) &&
- is_ipaddrv6($if['ipaddrv6']) && is_numeric($if['subnetv6']) &&
- ($_POST['network_subnet'] == $if['subnetv6']) &&
- (gen_subnetv6($_POST['network'], $_POST['network_subnet']) == gen_subnetv6($if['ipaddrv6'], $if['subnetv6']))) {
- $input_errors[] = sprintf(gettext("This network conflicts with address configured on interface %s."), $if['descr']);
+ isset($if['ipaddrv6']) && isset($if['subnetv6']) &&
+ is_ipaddrv6($if['ipaddrv6']) && is_numeric($if['subnetv6']) &&
+ ($_POST['network_subnet'] == $if['subnetv6']) &&
+ (gen_subnetv6($_POST['network'], $_POST['network_subnet']) == gen_subnetv6($if['ipaddrv6'], $if['subnetv6']))) {
+ $input_errors[] = sprintf(gettext("This network conflicts with address configured on interface %s."), $if['descr']);
}
}
}
@@ -256,14 +254,14 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("System"), gettext("Static Routes"), gettext("Edit route"));
+$pgtitle = array(gettext("System"), gettext("Routing"), gettext("Static Routes"), gettext("Edit"));
$shortcut_section = "routing";
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-require_once('classes/Form.class.php');
$form = new Form;
if (isset($id) && $a_routes[$id]) {
@@ -315,9 +313,9 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// --------- Autocomplete -----------------------------------------------------------------------------------------
var addressarray = <?= json_encode(get_alias_list(array("host", "network"))) ?>;
@@ -328,4 +326,4 @@ events.push(function(){
//]]>
</script>
<?php
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_update_settings.php b/src/usr/local/www/system_update_settings.php
new file mode 100644
index 0000000..58495e6
--- /dev/null
+++ b/src/usr/local/www/system_update_settings.php
@@ -0,0 +1,241 @@
+<?php
+/*
+ system_update_settings.php
+*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Colin Smith
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-system-update-settings
+##|*NAME=System: Update: Settings
+##|*DESCR=Allow access to the 'System: Update: Settings' page.
+##|*MATCH=system_update_settings.php*
+##|-PRIV
+
+require("guiconfig.inc");
+require("pkg-utils.inc");
+
+if ($_POST) {
+ unset($input_errors);
+
+ /* input validation */
+ if (($_POST['alturlenable'] == "yes") && (empty($_POST['firmwareurl']))) {
+ $input_errors[] = gettext("A Firmware Auto Update Base URL must be specified when \"Use an unofficial server for firmware upgrades\" is enabled.");
+ }
+
+ if (!$input_errors) {
+ // Set the firmware branch, but only if we are not using it already
+ if ($_POST['fwbranch']) {
+ if (($_POST['fwbranch'] == "development") && is_pkg_installed($g['product_name'] . "-repo")) {
+ pkg_switch_repo(true);
+ } else if (($_POST['fwbranch'] == "stable") && is_pkg_installed($g['product_name'] . "-repo-devel")) {
+ pkg_switch_repo(false);
+ }
+ }
+
+ if ($_POST['disablecheck'] == "yes") {
+ $config['system']['firmware']['disablecheck'] = true;
+ } else {
+ unset($config['system']['firmware']['disablecheck']);
+ }
+
+ if ($_POST['synconupgrade'] == "yes") {
+ $config['system']['gitsync']['synconupgrade'] = true;
+ } else {
+ unset($config['system']['gitsync']['synconupgrade']);
+ }
+ $config['system']['gitsync']['repositoryurl'] = $_POST['repositoryurl'];
+ $config['system']['gitsync']['branch'] = $_POST['branch'];
+
+ write_config();
+ }
+}
+
+$curcfg = $config['system']['firmware'];
+$gitcfg = $config['system']['gitsync'];
+
+$pgtitle = array(gettext("System"), gettext("Update"), gettext("Update Settings"));
+
+exec("/usr/bin/fetch -q -o {$g['tmp_path']}/manifest \"{$g['update_manifest']}\"");
+if (file_exists("{$g['tmp_path']}/manifest")) {
+ $preset_urls_split = explode("\n", file_get_contents("{$g['tmp_path']}/manifest"));
+}
+
+include("head.inc");
+
+if ($input_errors) {
+ print_input_errors($input_errors);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, 'success');
+}
+
+$tab_array = array();
+$tab_array[] = array(gettext("System Update"), false, "pkg_mgr_install.php?id=firmware");
+$tab_array[] = array(gettext("Update Settings"), true, "system_update_settings.php");
+display_top_tabs($tab_array);
+
+$form = new Form();
+
+$section = new Form_Section('Firmware Branch');
+
+$section->addInput(new Form_Select(
+ fwbranch,
+ 'Branch',
+ (is_pkg_installed($g['product_name'] . "-repo")) ? "stable":"development",
+ ["stable" => "Stable", "development" => "Development"]
+))->setHelp('Please select the stable, or the development branch from which to update the system firmware. ' . ' <br />' .
+ 'Use of the development version is at your own risk!');
+
+$form->add($section);
+
+$section = new Form_Section('Updates');
+/*
+$section->addInput(new Form_Checkbox(
+ 'allowinvalidsig',
+ 'Unsigned images',
+ 'Allow auto-update firmware images with a missing or invalid digital signature to be used',
+ isset($curcfg['allowinvalidsig'])
+ ));
+*/
+$section->addInput(new Form_Checkbox(
+ 'disablecheck',
+ 'Dashboard check',
+ 'Disable the automatic dashboard auto-update check',
+ isset($curcfg['disablecheck'])
+ ));
+
+$form->add($section);
+
+if (file_exists("/usr/local/bin/git") && $g['platform'] == $g['product_name']) {
+ $section = new Form_Section('GitSync');
+
+ $section->addInput(new Form_Checkbox(
+ 'synconupgrade',
+ 'Auto sync on update',
+ 'After updating, sync with the following repository/branch before reboot',
+ isset($gitcfg['synconupgrade'])
+ ))->setHelp('After updating, sync with the following repository/branch before reboot');
+
+ if (is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
+ exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git config remote.origin.url", $output_str);
+ if (is_array($output_str) && !empty($output_str[0])) {
+ $lastrepositoryurl = $output_str[0];
+ }
+ unset($output_str);
+ }
+
+ $section->addInput(new Form_Input(
+ 'repositoryurl',
+ 'Repository URL',
+ 'text',
+ ($gitcfg['repositoryurl'] ? $gitcfg['repositoryurl'] : '')
+ ))->setHelp('The most recently used repository was %s. This repository will be used if the field is left blank.', [$lastrepositoryurl]);
+
+ if (is_dir("/root/pfsense/pfSenseGITREPO/pfSenseGITREPO")) {
+ exec("cd /root/pfsense/pfSenseGITREPO/pfSenseGITREPO && git branch", $output_str);
+ if (is_array($output_str)) {
+ foreach ($output_str as $output_line) {
+ if (strstr($output_line, '* ')) {
+ $lastbranch = substr($output_line, 2);
+ break;
+ }
+ }
+ unset($output_str);
+ }
+ unset($output_str);
+ }
+
+ $section->addInput(new Form_Input(
+ 'branch',
+ 'Branch name',
+ 'text',
+ ($gitcfg['branch'] ? $gitcfg['branch'] : '')
+ ))->setHelp('The most recently used branch was "%s". (Usually the branch name is master)' .
+ '<br />Note: Sync will not be performed if a branch is not specified', [$lastbranch]);
+
+ $form->add($section);
+} // e-o-if(file_exista()
+
+print($form);
+?>
+
+<script type="text/javascript">
+//<![CDATA[
+events.push(function() {
+ // Update firmwareurl from preseturls or from the saved alternate if "Unofficial" is checked
+ function update_firmwareurl() {
+ if (!$('#alturlenable').prop('checked')) {
+ $('#firmwareurl').prop('readonly', true)
+ $('#firmwareurl').val($('#preseturls').val());
+ } else {
+ $('#firmwareurl').prop('readonly', false)
+ $('#firmwareurl').val("<?=$config['system']['firmware']['alturl']['firmwareurl']?>");
+ }
+ }
+
+ // Call it when preseturls changes
+
+ $('#preseturls, #alturlenable').on('change', function() {
+ update_firmwareurl();
+ })
+
+ // And call it on page load
+ update_firmwareurl();
+});
+
+//]]>
+</script>
+<?php
+
+include("foot.inc");
diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php
index 107b9d8..c8ef99a 100644
--- a/src/usr/local/www/system_usermanager.php
+++ b/src/usr/local/www/system_usermanager.php
@@ -1,15 +1,15 @@
<?php
-/* $Id$ */
/*
system_usermanager.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2003-2005 Manuel Kasper <mk@neon1.net>
* Copyright (c) 2008 Shrew Soft Inc.
* Copyright (c) 2005 Paul Taylor <paultaylor@winn-dixie.com>
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -57,14 +57,10 @@
* ====================================================================
*
*/
-/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: auth
-*/
##|+PRIV
##|*IDENT=page-system-usermanager
-##|*NAME=System: User Manager page
+##|*NAME=System: User Manager
##|*DESCR=Allow access to the 'System: User Manager' page.
##|*MATCH=system_usermanager.php*
##|-PRIV
@@ -73,7 +69,7 @@ require("certs.inc");
require("guiconfig.inc");
// start admin user code
-$pgtitle = array(gettext("System"), gettext("User Manager"));
+$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Users"));
if (isset($_POST['userid']) && is_numericint($_POST['userid'])) {
$id = $_POST['userid'];
@@ -124,8 +120,7 @@ if ($_GET['act'] == "deluser") {
write_config();
$savemsg = gettext("User")." {$userdeleted} ".
gettext("successfully deleted")."<br />";
-}
-else if ($act == "new") {
+} else if ($act == "new") {
/*
* set this value cause the text field is read only
* and the user should not be able to mess with this
@@ -135,7 +130,7 @@ else if ($act == "new") {
$pconfig['lifetime'] = 3650;
}
-if (isset($_POST['dellall_x'])) {
+if (isset($_POST['dellall'])) {
$del_users = $_POST['delete_check'];
@@ -144,7 +139,7 @@ if (isset($_POST['dellall_x'])) {
if (isset($a_user[$userid]) && $a_user[$userid]['scope'] != "system") {
conf_mount_rw();
local_user_del($a_user[$userid]);
- conf_mount_ro();
+ conf_mount_ro();
unset($a_user[$userid]);
}
}
@@ -168,6 +163,15 @@ if ($_POST['act'] == "delcert") {
$savemsg = gettext("Certificate") . " {$certdeleted} " . gettext("association removed.") . "<br />";
}
+if ($_POST['act'] == "delprivid") {
+ $privdeleted = $priv_list[$a_user[$id]['priv'][$_POST['privid']]]['name'];
+ unset($a_user[$id]['priv'][$_POST['privid']]);
+ local_user_set($a_user[$id]);
+ write_config();
+ $_POST['act'] = "edit";
+ $savemsg = gettext("Privilege ") . $privdeleted . gettext(" removed") . "<br />";
+}
+
if ($_POST['save']) {
unset($input_errors);
$pconfig = $_POST;
@@ -270,14 +274,7 @@ if ($_POST['save']) {
}
if (!$input_errors) {
- // This used to be a separate act=delpriv
- if ($a_user[$id] && !empty($_POST['privid'])) {
- foreach ($_POST['privid'] as $i)
- unset($a_user[$id]['priv'][$i]);
- local_user_set($a_user[$id]);
- write_config();
- }
conf_mount_rw();
$userent = array();
@@ -355,7 +352,7 @@ if ($_POST['save']) {
}
/* Add user to groups so PHP can see the memberships properly or else the user's shell account does not get proper permissions (if applicable) See #5152. */
- local_user_set_groups($userent,$_POST['groups']);
+ local_user_set_groups($userent, $_POST['groups']);
local_user_set($userent);
/* Add user to groups again to ensure they are set everywhere, otherwise the user may not appear to be a member of the group. See commit:5372d26d9d25d751d16865ed9d46869d3b0ec5e1. */
local_user_set_groups($userent, $_POST['groups']);
@@ -385,12 +382,29 @@ function build_priv_table() {
$privhtml .= '</thead>';
$privhtml .= '<tbody>';
- foreach (get_user_privdesc($a_user[$id]) as $i => $priv) {
+ $i = 0;
+
+ foreach (get_user_privdesc($a_user[$id]) as $priv) {
+ $group = false;
+ if ($priv['group']) {
+ $group = $priv['group'];
+ }
+
$privhtml .= '<tr>';
$privhtml .= '<td>' . htmlspecialchars($priv['group']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['name']) . '</td>';
$privhtml .= '<td>' . htmlspecialchars($priv['descr']) . '</td>';
+ $privhtml .= '<td>';
+ if (!$group) {
+ $privhtml .= '<a class="fa fa-trash no-confirm icon-pointer" title="'.gettext('Delete Privilege').'" id="delprivid' .$i. '"></a></td>';
+ }
+
+ $privhtml .= '</td>';
$privhtml .= '</tr>';
+
+ if (!$group) {
+ $i++;
+ }
}
$privhtml .= '</tbody>';
@@ -430,8 +444,8 @@ function build_cert_table() {
$certhtml .= '<td>' . htmlspecialchars($cert['descr']) . $revokedstr . '</td>';
$certhtml .= '<td>' . htmlspecialchars($ca['descr']) . '</td>';
$certhtml .= '<td>';
- $certhtml .= '<a id="delcert' . $i .'" class="btn btn-xs btn-warning" title="';
- $certhtml .= gettext('Remove this certificate association? (Certificate will not be deleted)') . '">Delete</a>';
+ $certhtml .= '<a id="delcert' . $i .'" class="fa fa-trash no-confirm icon-pointer" title="';
+ $certhtml .= gettext('Remove this certificate association? (Certificate will not be deleted)') . '"></a>';
$certhtml .= '</td>';
$certhtml .= '</tr>';
$i++;
@@ -450,14 +464,15 @@ function build_cert_table() {
return($certhtml);
}
-$closehead = false;
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Users"), true, "system_usermanager.php");
@@ -468,9 +483,9 @@ display_top_tabs($tab_array);
if (!($act == "new" || $act == "edit" || $input_errors)) {
?>
-
+<form method="post">
<div class="table-responsive">
- <table class="table table-striped table-hover">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th>&nbsp;</th>
@@ -478,35 +493,35 @@ if (!($act == "new" || $act == "edit" || $input_errors)) {
<th><?=gettext("Full name")?></th>
<th><?=gettext("Disabled")?></th>
<th><?=gettext("Groups")?></th>
+ <th>&nbsp;</th>
</tr>
</thead>
<tbody>
- </tbody>
- <tbody>
<?php
-foreach($a_user as $i => $userent):
+foreach ($a_user as $i => $userent):
?>
<tr>
<td>
- <input type="checkbox" id="frc<?=$i?>" name="delete_check[]" value="<?=$i?>" <?=($userent['scope'] == "system" ? 'disabled="disabled"' : '')?>/>
+ <input type="checkbox" id="frc<?=$i?>" name="delete_check[]" value="<?=$i?>" <?=($userent['scope'] == "system" ? 'disabled' : '')?>/>
</td>
<td>
<?php
- if($userent['scope'] != "user")
+ if ($userent['scope'] != "user") {
$usrimg = 'eye-open';
- else
+ } else {
$usrimg = 'user';
+ }
?>
- <i class="icon icon-<?=$usrimg?>"></i>
+ <i class="fa fa-<?=$usrimg?>"></i>
<?=htmlspecialchars($userent['name'])?>
</td>
<td><?=htmlspecialchars($userent['descr'])?></td>
- <td><?php if(isset($userent['disabled'])) echo "*"?></td>
- <td><?=implode(",",local_user_get_groups($userent))?></td>
+ <td><?php if (isset($userent['disabled'])) echo "*"?></td>
+ <td><?=implode(",", local_user_get_groups($userent))?></td>
<td>
- <a href="?act=edit&amp;userid=<?=$i?>" class="btn btn-xs btn-primary">edit</a>
-<?php if($userent['scope'] != "system"): ?>
- <a href="?act=deluser&amp;userid=<?=$i?>&amp;username=<?=$userent['name']?>" class="btn btn-xs btn-danger">delete</a>
+ <a class="fa fa-pencil" title="<?=gettext("Edit user"); ?>" href="?act=edit&amp;userid=<?=$i?>"></a>
+<?php if ($userent['scope'] != "system"): ?>
+ <a class="fa fa-trash" title="<?=gettext("Delete user")?>" href="?act=deluser&amp;userid=<?=$i?>&amp;username=<?=$userent['name']?>"></a>
<?php endif; ?>
</td>
</tr>
@@ -515,23 +530,33 @@ foreach($a_user as $i => $userent):
</table>
</div>
<nav class="action-buttons">
- <a href="?act=new" class="btn btn-success">add new</a>
+ <a href="?act=new" class="btn btn-sm btn-success">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
+
+ <button type="submit" class="btn btn-sm btn-danger" name="dellall" value="dellall" title="<?=gettext('Delete selected users')?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete")?>
+ </button>
</nav>
-<p>
- <?=gettext("Additional users can be added here. User permissions for accessing " .
+</form>
+
+<div id="infoblock">
+ <?=print_info_box(gettext("Additional users can be added here. User permissions for accessing " .
"the webConfigurator can be assigned directly or inherited from group memberships. " .
"An icon that appears grey indicates that it is a system defined object. " .
- "Some system object properties can be modified but they cannot be deleted.")?>
- <br /><br />
- <?=gettext("Accounts created here are also used for other parts of the system " .
- "such as OpenVPN, IPsec, and Captive Portal.")?>
-</p>
+ "Some system object properties can be modified but they cannot be deleted.") .
+ '<br /><br />' .
+ gettext("Accounts added here are also used for other parts of the system " .
+ "such as OpenVPN, IPsec, and Captive Portal."), info)?>
+</div>
+
<?php
include("foot.inc");
exit;
}
-require_once('classes/Form.class.php');
$form = new Form;
if ($act == "new" || $act == "edit" || $input_errors):
@@ -566,7 +591,7 @@ if ($act == "new" || $act == "edit" || $input_errors):
$ro = "";
if ($pconfig['utype'] == "system") {
- $ro = "readonly=\"readonly\"";
+ $ro = "readonly";
}
$section = new Form_Section('User Properties');
@@ -597,8 +622,9 @@ if ($act == "new" || $act == "edit" || $input_errors):
$pconfig['usernamefld']
));
- if ($ro)
+ if ($ro) {
$input->setReadonly();
+ }
$form->addGlobal(new Form_Input(
'oldusername',
@@ -628,8 +654,9 @@ if ($act == "new" || $act == "edit" || $input_errors):
htmlspecialchars($pconfig['descr'])
))->setHelp('User\'s full name, for your own information only');
- if ($ro)
+ if ($ro) {
$input->setDisabled();
+ }
$section->addInput(new Form_Input(
'expires',
@@ -650,11 +677,12 @@ if ($act == "new" || $act == "edit" || $input_errors):
$usergid = [$pconfig['usernamefld']];
foreach ($config['system']['group'] as $Ggroup) {
- if($Ggroup['name'] != "all") {
- if(($act == 'edit') && $Ggroup['member'] && in_array($pconfig['uid'], $Ggroup['member']))
+ if ($Ggroup['name'] != "all") {
+ if (($act == 'edit') && $Ggroup['member'] && in_array($pconfig['uid'], $Ggroup['member'])) {
$usersGroups[ $Ggroup['name'] ] = $Ggroup['name']; // Add it to the user's list
- else
+ } else {
$systemGroups[ $Ggroup['name'] ] = $Ggroup['name']; // Add it to the 'not a member of' list
+ }
}
}
@@ -692,7 +720,7 @@ if ($act == "new" || $act == "edit" || $input_errors):
$section->add($group);
// ==== Button for adding user certificate ================================
- if($act == 'new') {
+ if ($act == 'new') {
$section->addInput(new Form_Checkbox(
'showcert',
'Certificate',
@@ -727,82 +755,59 @@ if ($act == "new" || $act == "edit" || $input_errors):
$form->add($section);
}
-else;
- $section = new Form_Section('User Certificates');
-
- foreach ((array)$a_user[$id]['cert'] as $i => $certref) {
- $cert = lookup_cert($certref);
- $ca = lookup_ca($cert['caref']);
- // We reverse name and action for readability of longer names
- $section->addInput(new Form_Checkbox(
- 'certid[]',
- 'Delete certificate',
- $cert['descr']. (is_cert_revoked($cert) ? ' <b>revoked</b>' : ''),
- false,
- $i
- ));
- }
+ // ==== Add user certificate for a new user
+ if (is_array($config['ca']) && count($config['ca']) > 0) {
+ $section = new Form_Section('Create certificate for user');
+ $section->addClass('cert-options');
- #FIXME; old ui supplied direct export links to each certificate
-
- $section->addInput(new Form_StaticText(
- null,
- new Form_Button(null, 'add certificate', 'system_certmanager.php?act=new&userid='. $id).
- new Form_Button(null, 'export certificates', 'system_certmanager.php')
- ));
+ $nonPrvCas = array();
+ foreach($config['ca'] as $ca) {
+ if (!$ca['prv']) {
+ continue;
+ }
- // ==== Add user certificate for a new user
- if (is_array($config['ca']) && count($config['ca']) > 0) {
- $section = new Form_Section('Create certificate for user');
- $section->addClass('cert-options');
+ $nonPrvCas[ $ca['refid'] ] = $ca['descr'];
+ }
- $nonPrvCas = array();
- foreach( $config['ca'] as $ca) {
- if (!$ca['prv'])
- continue;
+ if (!empty($nonPrvCas)) {
+ $section->addInput(new Form_Input(
+ 'name',
+ 'Descriptive name',
+ 'text',
+ $pconfig['name']
+ ));
- $nonPrvCas[ $ca['refid'] ] = $ca['descr'];
- }
+ $section->addInput(new Form_Select(
+ 'caref',
+ 'Certificate authority',
+ null,
+ $nonPrvCas
+ ));
- if (!empty($nonPrvCas)) {
- $section->addInput(new Form_Input(
- 'name',
- 'Descriptive name',
- 'text',
- $pconfig['name']
- ));
-
- $section->addInput(new Form_Select(
- 'caref',
- 'Certificate authority',
- null,
- $nonPrvCas
- ));
-
- $section->addInput(new Form_Select(
- 'keylen',
- 'Key length',
- 2048,
- array(
- 512 => '512 bits',
- 1024 => '1024 bits',
- 2048 => '2049 bits',
- 4096 => '4096 bits',
- )
- ));
-
- $section->addInput(new Form_Input(
- 'lifetime',
- 'Lifetime',
- 'number',
- $pconfig['lifetime']
- ));
- }
+ $section->addInput(new Form_Select(
+ 'keylen',
+ 'Key length',
+ 2048,
+ array(
+ 512 => '512 bits',
+ 1024 => '1024 bits',
+ 2048 => '2049 bits',
+ 4096 => '4096 bits',
+ )
+ ));
- $form->add($section);
+ $section->addInput(new Form_Input(
+ 'lifetime',
+ 'Lifetime',
+ 'number',
+ $pconfig['lifetime']
+ ));
}
+ $form->add($section);
+ }
+
endif;
// ==== Paste a key for the new user
$section = new Form_Section('Keys');
@@ -831,35 +836,10 @@ $form->add($section);
print $form;
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
- //---------- "Standard" show/hide functions ---------------------------------------------------
-
- // Hides all elements of the specified class.
- function hideClass(s_class, hide) {
- if(hide)
- $('.' + s_class).hide();
- else
- $('.' + s_class).show();
- }
-
- // Hides the <div> in which the specified input element lives so that the input, its label and help text are hidden
- function hideInput(id, hide) {
- if(hide)
- $('#' + id).parent().parent('div').addClass('hidden');
- else
- $('#' + id).parent().parent('div').removeClass('hidden');
- }
+events.push(function() {
- // Hides the <div> in which the specified checkbox lives so that the checkbox, its label and help text are hidden
- function hideCheckbox(id, hide) {
- if(hide)
- $('#' + id).parent().parent().parent('div').addClass('hidden');
- else
- $('#' + id).parent().parent().parent('div').removeClass('hidden');
- }
-
// Select every option in the specified multiselect
function AllServers(id, selectAll) {
for (i = 0; i < id.length; i++) {
@@ -872,11 +852,12 @@ events.push(function(){
var len = From.length;
var option;
- if(len > 0) {
- for(i=0; i<len; i++) {
- if(From.eq(i).is(':selected')) {
+ if (len > 0) {
+ for (i=0; i<len; i++) {
+ if (From.eq(i).is(':selected')) {
option = From.eq(i).val();
- To.append(new Option(option, option));
+ value = From.eq(i).text();
+ To.append(new Option(value, option));
From.eq(i).remove();
}
}
@@ -906,7 +887,7 @@ events.push(function(){
});
$('[id^=delcert]').click(function(event) {
- if(confirm(event.target.title)) {
+ if (confirm(event.target.title)) {
$('#certid').val(event.target.id.match(/\d+$/)[0]);
$('#userid').val('<?=$id;?>');
$('#act').val('delcert');
@@ -914,6 +895,16 @@ events.push(function(){
}
});
+ $('[id^=delprivid]').click(function(event) {
+ if (confirm(event.target.title)) {
+ $('#privid').val(event.target.id.match(/\d+$/)[0]);
+ $('#userid').val('<?=$id;?>');
+ $('#act').val('delprivid');
+ $('form').submit();
+ }
+ });
+
+
// ---------- On initial page load ------------------------------------------------------------
hideClass('cert-options', true);
@@ -921,12 +912,12 @@ events.push(function(){
hideCheckbox('showkey', true);
// On submit mark all the user's groups as "selected"
- $('form').submit(function(){
+ $('form').submit(function() {
AllServers($('[name="groups[]"] option'), true);
});
});
//]]>
</script>
<?php
-
-include('foot.inc'); \ No newline at end of file
+include('foot.inc');
+?> \ No newline at end of file
diff --git a/src/usr/local/www/system_usermanager_addprivs.php b/src/usr/local/www/system_usermanager_addprivs.php
index ab70655..61984bd 100644
--- a/src/usr/local/www/system_usermanager_addprivs.php
+++ b/src/usr/local/www/system_usermanager_addprivs.php
@@ -1,42 +1,62 @@
<?php
-/* $Id$ */
/*
system_usermanager_addprivs.php
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Copyright (C) 2006 Daniel S. Haischt.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: auth
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2006 Daniel S. Haischt.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-usermanager-addprivs
-##|*NAME=System: User Manager: Add Privileges page
+##|*NAME=System: User Manager: Add Privileges
##|*DESCR=Allow access to the 'System: User Manager: Add Privileges' page.
##|*MATCH=system_usermanager_addprivs.php*
##|-PRIV
@@ -47,7 +67,7 @@ function admusercmp($a, $b) {
require("guiconfig.inc");
-$pgtitle = array("System", "User manager", "Add privileges");
+$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Users"), gettext("Add Privileges"));
if (is_numericint($_GET['userid'])) {
$userid = $_GET['userid'];
@@ -68,6 +88,10 @@ if (!is_array($a_user['priv'])) {
$a_user['priv'] = array();
}
+// Make a local copy and sort it
+$spriv_list = $priv_list;
+uasort($spriv_list, admusercmp);
+
if ($_POST) {
conf_mount_rw();
@@ -113,13 +137,14 @@ if ($_POST) {
}
function build_priv_list() {
- global $priv_list, $a_user;
+ global $spriv_list, $a_user;
$list = array();
- foreach($priv_list as $pname => $pdata) {
- if (in_array($pname, $a_user['priv']))
+ foreach ($spriv_list as $pname => $pdata) {
+ if (in_array($pname, $a_user['priv'])) {
continue;
+ }
$list[$pname] = $pdata['name'];
}
@@ -134,11 +159,13 @@ if (isAjax()) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Users"), true, "system_usermanager.php");
@@ -147,19 +174,17 @@ $tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.ph
$tab_array[] = array(gettext("Servers"), false, "system_authservers.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('User privileges');
$section->addInput(new Form_Select(
'sysprivs',
- 'System',
+ 'Assigned privileges',
null,
build_priv_list(),
true
-))->addClass('multiselect')->setHelp('Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items');
+))->addClass('multiselect')->setHelp('Hold down CTRL (PC)/COMMAND (Mac) key to select multiple items')->setAttribute('style', 'height:400px;');
if (isset($userid)) {
$section->addInput(new Form_Input(
@@ -175,20 +200,20 @@ $form->add($section);
print($form);
?>
-<div class="panel panel-body alert-info" id="pdesc">Select a privilege from the list above for a description"</div>
+<div class="panel panel-body alert-info col-sm-10 col-sm-offset-2" id="pdesc">Select a privilege from the list above for a description</div>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
<?php
// Build a list of privilege descriptions
- if (is_array($priv_list)) {
+ if (is_array($spriv_list)) {
$id = 0;
$jdescs = "var descs = new Array();\n";
- foreach ($priv_list as $pname => $pdata) {
+ foreach ($spriv_list as $pname => $pdata) {
if (in_array($pname, $a_user['priv'])) {
continue;
}
@@ -205,10 +230,10 @@ events.push(function(){
// When the 'sysprivs" selector is clicked, we display a description
$('.multiselect').click(function() {
- $('#pdesc').html(descs[$(this).children('option:selected').index()]);
+ $('#pdesc').html('<span style="color: green;">' + descs[$(this).children('option:selected').index()] + '</span>');
});
});
//]]>
</script>
-<?php include("foot.inc"); \ No newline at end of file
+<?php include("foot.inc");
diff --git a/src/usr/local/www/system_usermanager_passwordmg.php b/src/usr/local/www/system_usermanager_passwordmg.php
index 43bd6eb..1d2ce05 100644
--- a/src/usr/local/www/system_usermanager_passwordmg.php
+++ b/src/usr/local/www/system_usermanager_passwordmg.php
@@ -1,39 +1,61 @@
<?php
-/* $Id$ */
/*
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2011 Ermal Luçi
system_usermanager_passwordmg.php
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES:
- pfSense_MODULE: auth
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-usermanager-passwordmg
-##|*NAME=System: User Password Manager page
+##|*NAME=System: User Password Manager
##|*DESCR=Allow access to the 'System: User Password Manager' page.
##|*MATCH=system_usermanager_passwordmg.php*
##|-PRIV
@@ -104,8 +126,6 @@ if ($islocal == false) {
exit;
}
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('Update Password');
@@ -125,4 +145,4 @@ $section->addInput(new Form_Input(
$form->add($section);
print($form);
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_usermanager_settings.php b/src/usr/local/www/system_usermanager_settings.php
index a844d78..875837e 100644
--- a/src/usr/local/www/system_usermanager_settings.php
+++ b/src/usr/local/www/system_usermanager_settings.php
@@ -1,57 +1,81 @@
<?php
-/* $Id$ */
/*
system_usermanager_settings.php
-
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2007 Bill Marquette <bill.marquette@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: auth
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Bill Marquette <bill.marquette@gmail.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-usermanager-settings
-##|*NAME=System: User Manager: settings page
-##|*DESCR=Allow access to the 'System: User Manager: settings' page.
+##|*NAME=System: User Manager: Settings
+##|*DESCR=Allow access to the 'System: User Manager: Settings' page.
##|*MATCH=system_usermanager_settings.php*
##|-PRIV
require("guiconfig.inc");
$pconfig['session_timeout'] = &$config['system']['webgui']['session_timeout'];
-$pconfig['authmode'] = &$config['system']['webgui']['authmode'];
+if (isset($config['system']['webgui']['authmode'])) {
+ $pconfig['authmode'] = &$config['system']['webgui']['authmode'];
+} else {
+ $pconfig['authmode'] = "Local Database";
+}
$pconfig['backend'] = &$config['system']['webgui']['backend'];
// Page title for main admin
-$pgtitle = array(gettext("System"), gettext("User manager settings"));
+$pgtitle = array(gettext("System"), gettext("User Manager"), gettext("Settings"));
$save_and_test = false;
+
if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
@@ -63,19 +87,22 @@ if ($_POST) {
}
}
+ if (($_POST['authmode'] == "Local Database") && $_POST['savetest']) {
+ $savemsg = gettext("Settings have been saved, but the test was not performed because it is not supported for local databases.");
+ }
+
if (!$input_errors) {
- if ($_POST['authmode'] != "local") {
+ if ($_POST['authmode'] != "Local Database") {
$authsrv = auth_get_authserver($_POST['authmode']);
if ($_POST['savetest']) {
if ($authsrv['type'] == "ldap") {
$save_and_test = true;
} else {
- $savemsg = gettext("The test was not performed because it is supported only for ldap based backends.");
+ $savemsg = gettext("Settings have been saved, but the test was not performed because it is supported only for ldap based backends.");
}
}
}
-
if (isset($_POST['session_timeout']) && $_POST['session_timeout'] != "") {
$config['system']['webgui']['session_timeout'] = intval($_POST['session_timeout']);
} else {
@@ -95,15 +122,20 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-if ($savemsg)
- print_info_box($savemsg);
+}
+
+if ($savemsg) {
+ print_info_box($savemsg, success);
+}
-if($save_and_test) {
+if ($save_and_test) {
echo "<script>\n";
+ echo "//<![CDATA[\n";
echo "myRef = window.open('system_usermanager_settings_test.php?authserver=".$pconfig['authmode']."','mywin','left=20,top=20,width=700,height=550,toolbar=1,resizable=0');\n";
echo "if (myRef==null || typeof(myRef)=='undefined') alert('" . gettext("Popup blocker detected. Action aborted.") ."');\n";
+ echo "//]]>\n";
echo "</script>\n";
}
@@ -115,10 +147,10 @@ $tab_array[] = array(gettext("Servers"), false, "system_authservers.php");
display_top_tabs($tab_array);
/* Default to pfsense backend type if none is defined */
-if(!$pconfig['backend'])
+if (!$pconfig['backend']) {
$pconfig['backend'] = "pfsense";
+}
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Settings');
@@ -127,14 +159,16 @@ $section->addInput(new Form_Input(
'session_timeout',
'Session timeout',
'number',
- $pconfig['session_timeout']
+ $pconfig['session_timeout'],
+ [min => 0]
))->setHelp('Time in minutes to expire idle management sessions. The default is 4 '.
'hours (240 minutes).Enter 0 to never expire sessions. NOTE: This is a security '.
'risk!');
$auth_servers = array();
-foreach (auth_get_authserver_list() as $auth_server)
+foreach (auth_get_authserver_list() as $auth_server) {
$auth_servers[ $auth_server['name'] ] = $auth_server['name'];
+}
$section->addInput(new Form_Select(
'authmode',
@@ -151,4 +185,4 @@ $form->addGlobal(new Form_Button(
$form->add($section);
print $form;
-include("fend.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/system_usermanager_settings_ldapacpicker.php b/src/usr/local/www/system_usermanager_settings_ldapacpicker.php
index 068142e..2543e41 100644
--- a/src/usr/local/www/system_usermanager_settings_ldapacpicker.php
+++ b/src/usr/local/www/system_usermanager_settings_ldapacpicker.php
@@ -1,36 +1,64 @@
<?php
-/* $Id$ */
/*
system_usermanager_settings_ldapacpicker.php
- part of pfSense (https://www.pfsense.org/)
- Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: auth
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+##|+PRIV
+##|*IDENT=page-system-usermanager-settings-ldappicker
+##|*NAME=System: User Manager: Settings: LDAP Picker
+##|*DESCR=Allow access to the 'System: User Manager: Settings: LDAP Picker' page.
+##|*MATCH=system_usermanager_settings_ldapacpicker.php*
+##|-PRIV
require("guiconfig.inc");
require_once("auth.inc");
@@ -55,6 +83,8 @@ if ($_GET) {
?>
<html>
<head>
+ <link rel="stylesheet" href="/bootstrap/css/pfSense.css" />
+
<STYLE type="text/css">
TABLE {
border-width: 1px 1px 1px 1px;
@@ -75,6 +105,7 @@ if ($_GET) {
</STYLE>
</head>
<script type="text/javascript">
+//<![CDATA[
function post_choices() {
var ous = <?php echo count($ous); ?>;
@@ -91,41 +122,41 @@ function post_choices() {
window.close();
-->
}
+//]]>
</script>
-<body link="#0000CC" vlink="#0000CC" alink="#0000CC" >
-<form method="post" action="system_usermanager_settings_ldapacpicker.php">
+ <body>
+ <form method="post" action="system_usermanager_settings_ldapacpicker.php">
<?php if (empty($ous)): ?>
- <p><?=gettext("Could not connect to the LDAP server. Please check your LDAP configuration.");?></p>
- <input type='button' value='<?=gettext("Close"); ?>' onClick="window.close();">
+ <p><?=gettext("Could not connect to the LDAP server. Please check your LDAP configuration.");?></p>
+ <input type='button' class="btn btn-sm btn-default" value='<?=gettext("Close"); ?>' onClick="window.close();">
<?php else: ?>
- <b><?=gettext("Please select which containers to Authenticate against:");?></b>
- <p/>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="tabnavtbl">
- <table width="100%">
+ <b><?=gettext("Please select which containers to Authenticate against:");?></b>
+ <p/>
+ <div class="table-responsive">
+ <table class="table table-hover table-striped">
+ <tbody>
<?php
if (is_array($ous)) {
foreach ($ous as $ou) {
if (in_array($ou, $authcfg['ldap_authcn'])) {
- $CHECKED=" CHECKED";
+ $CHECKED=" checked";
} else {
$CHECKED="";
}
- echo " <tr><td><input type='checkbox' value='{$ou}' id='ou' name='ou[]'{$CHECKED}> {$ou}<br /></td></tr>\n";
+ echo " <tr><td><div class='checkbox'><input type='checkbox' value='{$ou}' id='ou' name='ou[]'{$CHECKED}> {$ou}<br /></div></td></tr>\n";
}
}
?>
- </table>
- </td>
- </tr>
- </table>
- <p/>
+ </tbody>
+ </table>
+ </div>
+ <p/>
- <input type='button' value='<?=gettext("Save");?>' onClick="post_choices();">
+ <input type='button' class="btn btn-sm btn-primary" value='<?=gettext("Save");?>' onClick="post_choices();">
<?php endif; ?>
-</form>
-</body>
+ </form>
+ </body>
+ <script src="/bootstrap/js/bootstrap.min.js"></script>
</html>
diff --git a/src/usr/local/www/system_usermanager_settings_test.php b/src/usr/local/www/system_usermanager_settings_test.php
index ccb1c93..83b5d29 100755
--- a/src/usr/local/www/system_usermanager_settings_test.php
+++ b/src/usr/local/www/system_usermanager_settings_test.php
@@ -1,41 +1,62 @@
<?php
-/* $Id$ */
/*
system_usermanager_settings_test.php
- part of pfSense (https://www.pfsense.org/)
- Copyright (C) 2007 Scott Ullrich <sullrich@gmail.com>
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2014 Silvio Giunge <desenvolvimento@bluepex.com>
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: auth
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2014 Silvio Giunge <desenvolvimento@bluepex.com>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-system-usermanager-settings-testldap
-##|*NAME=System: User Manager: Settings: Test LDAP page
+##|*NAME=System: User Manager: Settings: Test LDAP
##|*DESCR=Allow access to the 'System: User Manager: Settings: Test LDAP' page.
##|*MATCH=system_usermanager_settings_test.php*
##|-PRIV
@@ -71,16 +92,16 @@ if (!$authcfg) {
echo "<tr><td>" . gettext("Attempting connection to") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>";
if (ldap_test_connection($authcfg)) {
- echo "<td><center><font color=green>OK</center></td></tr>";
+ echo "<td><span class=\"text-center text-success\">OK</span></td></tr>";
echo "<tr><td>" . gettext("Attempting bind to") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>";
if (ldap_test_bind($authcfg)) {
- echo "<td><center><font color=green>OK</center></td></tr>";
+ echo "<td><span class=\"text-center text-success\">OK</span></td></tr>";
echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>";
$ous = ldap_get_user_ous(true, $authcfg);
if (count($ous)>1) {
- echo "<td><center><font color=green>OK</center></td></tr>";
+ echo "<td><span class=\"text-center text-success\">OK</span></td></tr>";
echo "</table>";
if (is_array($ous)) {
echo "<br/>";
@@ -91,17 +112,17 @@ if (!$authcfg) {
}
}
} else {
- echo "<td><font color=red>" . gettext("failed") . "</td></tr>";
+ echo "<td><span class=\"text-alert\">" . gettext("failed") . "</span></td></tr>";
}
echo "</table><p/>";
} else {
- echo "<td><font color=red>" . gettext("failed") . "</td></tr>";
+ echo "<td><span class=\"text-alert\">" . gettext("failed") . "</span></td></tr>";
echo "</table><p/>";
}
} else {
- echo "<td><font color=red>" . gettext("failed") . "</td></tr>";
+ echo "<td><span class=\"text-alert\">" . gettext("failed") . "</span></td></tr>";
echo "</table><p/>";
}
}
@@ -114,4 +135,4 @@ if (!$authcfg) {
</div>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/usr/local/www/tree/index.html b/src/usr/local/www/tree/index.html
deleted file mode 100755
index f2c45d4..0000000
--- a/src/usr/local/www/tree/index.html
+++ /dev/null
@@ -1,228 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
-
- <head>
- <title>SilverStripe Tree Control</title>
- <link rel="stylesheet" type="text/css" media="all" href="tree.css" />
- <script type="text/javascript" src="tree.js"></script>
- <style>
- html {
- background-color: #DDD;
- }
- body {
- font-size: 80%;
- font-family: Arial, Helvetica, sans-serif;
- width: 50em;
- margin: 0 auto 3.5em auto;
- padding: 1em;
- background-color: white;
- border-left: 1px #CCC solid;
- border-right: 1px #CCC solid;
- }
- ul.tree a {
- font-size: 0.8em;
-
- }
- code {
- display: block;
- font-size: 1.2em;
- margin: 2em 5em;
- padding: 0.5em;
- border: 1px #CCC solid;
- background-color: #EEE;
- }
- #version {
- float: right;
- font-style: italic;
- margin-top: -4em;
- }
-
- dt {
- margin: 1.2em 0 0.2em 0;
- font-weight: bold;
- font-size: 1.1em
- }
- dd {
- margin: 0;
- }
- h2 {
- margin-top: 4em;
- border-bottom: 1px #CCC dotted;
- }
-
- #footer {
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 3em;
- }
- #footer div {
- margin: auto;
- width: 52em;
- height: 3em;
- background-color: #777;
- color: white;
- }
- #footer a {
- color: white;
- }
- #footer p.left {
- float: left;
- margin: 0.75em 1em;
- }
- #footer p.right {
- float: right;
- margin: 0.75em 1em;
- }
-
- </style>
- </head>
-
-<body>
-
- <h1>SilverStripe Tree Control</h1>
- <p>This tree control was put together by <a href="sam@silverstripe.com">Sam Minn&eacute;e</a> at
- <a href="http://www.silverstripe.com/blog">SilverStripe</a> in New Zealand. We've put it out there
- for everyone to enjoy. Check out <a href="http://www.silverstripe.com/blog">our blog</a> if you're
- wondering what we're up to.</p>
- <p>This file came from <a href="http://www.silverstripe.com/downloads/tree/">http://www.silverstripe.com/downloads/tree/</a>.
- If you found this file elsewhere, check out that page: we might have posted an updated version.</p>
-
- <p>
- <b>Quick-links:</b>
- <a href="#Demo">Demo</a> | <a href="#Usage">Usage</a> | <a href="#Download">Download</a> | <a href="#HowItWorks">How it Works</a>
- </p>
-
- <h2 id="Demo">Demo</h2>
- <p>Here's a basic demo of the tree control. Our styling is fairly basic, but with updated CSS and
- images you can do whatever you like. Just for fun, try changing the text size.</p>
-
- <ul class="tree">
- <li><a href="#">item 1</a>
- <ul>
- <li><a href="#">item 1.1</a></li>
- <li class="closed"><a href="#">item 1.2</a>
- <ul>
- <li><a href="#">item 1.2.1</a></li>
- <li><a href="#">item 1.2.2</a></li>
- <li><a href="#">item 1.2.3</a></li>
- </ul>
- </li>
- <li><a href="#">item 1.3</a></li>
- </ul>
- </li>
- <li><a href="#">item 2</a>
- <ul>
- <li><a href="#">item 2.1</a></li>
- <li><a href="#">item 2.2</a></li>
- <li><a href="#">item 2.3</a></li>
- </ul>
- </li>
- </ul>
-
- <h2 id="Download">Download</h2>
-
- <p><a href="../tree.zip">Download everything you need here</a> - tree.zip, 11kb</p>
-
- <h2 id="Usage">Usage</h2>
-
- <p>The first thing to do is include the appropriate JavaScript and CSS files:</p>
-
- <code>
- &lt;link rel="stylesheet" type="text/css" media="all" href="tree.css" /&gt;<br />
- &lt;script type="text/javascript" src="tree.js"&gt;&lt;/script&gt;
- </code>
-
- <p>Then, create the HTML for you tree. This is basically a nested set of bullet pointed links. The
- "tree" class at the top is what the script will look for. Note that you can make a tree ndoe closed
- to begin with by adding class="closed".</p>
-
- <p>Here's the HTML code that I inserted to create the demo tree above.</p>
-
- <code>
- &lt;ul class="tree"&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 1&lt;/a&gt;<br />
- &lt;ul&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 1.1&lt;/a&gt;&lt;/li&gt;<br />
- &lt;li class="closed"&gt;&lt;a href="#"&gt;item 1.2&lt;/a&gt;<br />
- &lt;ul&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 1.2.1&lt;/a&gt;&lt;/li&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 1.2.2&lt;/a&gt;&lt;/li&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 1.2.3&lt;/a&gt;&lt;/li&gt;<br />
- &lt;/ul&gt; <br />
- &lt;/li&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 1.3&lt;/a&gt;&lt;/li&gt;<br />
- &lt;/ul&gt; <br />
- &lt;/li&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 2&lt;/a&gt;<br />
- &lt;ul&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 2.1&lt;/a&gt;&lt;/li&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 2.2&lt;/a&gt;&lt;/li&gt;<br />
- &lt;li&gt;&lt;a href="#"&gt;item 2.3&lt;/a&gt;&lt;/li&gt;<br />
- &lt;/ul&gt; <br />
- &lt;/li&gt;<br />
- &lt;/ul&gt;
- </code>
-
- <p>Your tree is now complete!</p>
-
- <h2 id="HowItWorks">How it works</h2>
- <dl>
- <dt>Starting the script</dt>
- <dd>In simple situations, creating an auto-loading script is a simple matter of setting window.onload
- to a function. But what if there's more than one script? To this end, we created an appendLoader()
- function that will execute multiple loader functions, including a previously defined loader function</dd>
-
- <dt>Finding the tree content</dt>
- <dd>Rather than write a piece of script to define we're your tree is, we've tried to make the script
- as automatic as possible - it finds all ULs with a class name containing "tree".</dd>
-
- <dt>Augmenting the HTML</dt>
- <dd>Unfortunately, an LI containing an A isn't sufficient for doing all of the necessary tree styling.
- Rather than force people to put non-semantic HTML into their file, the script generates extra &lt;span&gt; tags.
- So, the following HTML:
-
- <code>
- &lt;li&gt;&lt;a href="#"&gt;My item&lt;/a&gt;&lt;/li&gt;
- </code>
-
- Is turned into the more ungainly, and yet more easily styled:
-
- <code>
- &lt;li&gt;&lt;span class="a"&gt;&lt;span class="b"&gt;&lt;span class="c"&gt;&lt;a href="#"&gt;My item&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
- </code>
-
- Additionally, some helper classes are applied to the &lt;li&gt; and &lt;span class="a"&gt; elements:
- <ul>
- <li>"last" is applied to the last node of any subtree.</li>
- <li>"children" is applied to any node that has children.</li>
- </ul>
- </dd>
-
- <dt>Styling it up</dt>
- <dd>Why the heck do we need 5 styling elements? Basically, because there are 5 background-images to apply:
- <ul>
- <li><b>li:</b> A repeating vertical line is shown. Nested &lt;li&gt; tags
- give us the multiple vertical lines that we need.</li>
- <li><b>span.a:</b> We overlay the vertical line with 'L' and 'T' elements as needed.</li>
- <li><b>span.b:</b> We overlay '+' or '-' signs on nodes with children.</li>
- <li><b>span.c:</b> This is needed to fix up the vertical line.</li>
- <li><b>a:</b> Finally, we apply the page icon.</li>
- </ul>
- </dd>
-
- <dt>Opening / closing nodes</dt>
- <dd>Having come this far, the "dynamic" aspect of the tree control is very trivial. We set a "closed"
- class on the &lt;li&gt; and &lt;span class="a"&gt; elements, and our CSS takes care of hiding the
- children, changing the - to a + and changing the folder icon.</dd>
- </dl>
-
- <div id="footer">
- <div>
- <p class="left"><a href="http://www.silverstripe.com/downloads/tree">SilverStripe Tree Control</a>: v0.1, 30 Oct 2005</p>
- <p class="right">Copyright &copy; 2005 <a href="http://www.silverstripe.com/blog">SilverStripe Limited</a></p>
- </div>
- </div>
- </body>
-</html>
diff --git a/src/usr/local/www/tree/tree.css b/src/usr/local/www/tree/tree.css
deleted file mode 100755
index 31b7979..0000000
--- a/src/usr/local/www/tree/tree.css
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
- * CSS for Standard tree layout
- * Copyright (C) 2005 SilverStripe Limited
- * Feel free to use this on your websites, but please leave this message in the fies
- * http://www.silverstripe.com/blog
- */
-
-ul.tree{
- width: auto;
- padding-left : 0px;
- margin-left : 0px;
-}
-
-ul.tree img{
- border : none;
-}
-
-
-ul.tree, ul.tree ul {
- padding-left: 0;
-}
-
-ul.tree ul {
- margin-left: 16px;
-
-}
-ul.tree li.closed ul {
- display: none;
-}
-
-
-ul.tree li {
- list-style: none;
- background: url(i-repeater.gif) 0 0 repeat-y;
- display: block;
- width: auto;
- /* background-color:#FFFFFF; */
-}
-
-
-
-ul.tree li.last {
- list-style: none;
- background-image: none;
-}
-
-
-
-/* Span-A: I/L/I glpyhs */
-ul.tree span.a {
- background: url(t.gif) 0 50% no-repeat;
- display: block;
-}
-ul.tree span.a.last {
- background: url(l.gif) 0 50% no-repeat;
-}
-
-/* Span-B: Plus/Minus icon */
-ul.tree span.b {
-}
-ul.tree span.a.children span.b {
- background: url(minus.gif) 0 50% no-repeat;
- cursor: pointer;
-}
-ul.tree li.closed span.a.children span.b {
- background: url(plus.gif) 0 50% no-repeat;
- cursor: pointer;
-}
-
-/* Span-C: Spacing and extending tree line below the icon */
-ul.tree span.c {
- margin-left: 16px;
-}
-ul.tree span.a.children span.c {
- background: url(i-bottom.gif) 0 50% no-repeat;
-}
-ul.tree span.a.spanClosed span.c {
- background-image: none;
-}
-
-
-/* Anchor tag: Page icon */
-ul.tree a {
- white-space: nowrap;
- overflow: hidden;
-
-/* padding: 10px 0px 10px 18px; */
- padding: 3px 0px 3px 18px;
- line-height: 16px;
-
-/* background: url(page-file.png) 0 50% no-repeat; */
- background: url(page-file.png) 0 0 no-repeat;
-}
-ul.tree span.a.children a {
- background-image: url(page-openfoldericon.png);
-}
-ul.tree span.a.children.spanClosed a {
- background-image: url(page-foldericon.png);
-}
-
-/* Unformatted tree */
-ul.tree.unformatted li {
- background-image: none;
- padding-left: 16px;
-}
-ul.tree.unformatted li li {
- background-image: none;
- padding-left: 0px;
-}
-
-/*
- * Divs, by default store vertically aligned data
- */
-
-ul.tree li div {
- float: right;
- clear: right;
- height: 1em;
- margin-top: -26px;
-}
-/* As inside DIVs should be treated normally */
-ul.tree div a {
- padding: 0;
- background-image: none;
- min-height: auto;
- height: auto;
-}
-
-ul.tree li A:link, ul.tree li A:hover, ul.tree li A:visited {
- color : #111111;
-}
-
-
-ul.tree li .over{
- background-color : pink;
-}
diff --git a/src/usr/local/www/uploadconfig.php b/src/usr/local/www/uploadconfig.php
index 35e7c55..cd2a0b7 100644
--- a/src/usr/local/www/uploadconfig.php
+++ b/src/usr/local/www/uploadconfig.php
@@ -2,37 +2,64 @@
<?php
/*
uploadconfig.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2006 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-hidden-uploadconfiguration
-##|*NAME=Hidden: Upload Configuration page
+##|*NAME=Hidden: Upload Configuration
##|*DESCR=Allow access to the 'Hidden: Upload Configuration' page.
##|*MATCH=uploadconfig.php*
##|-PRIV
diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php
index 520e0b0..d1a7546 100644
--- a/src/usr/local/www/vpn_ipsec.php
+++ b/src/usr/local/www/vpn_ipsec.php
@@ -4,8 +4,9 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- Copyright (c) 2003-2005 Manuel Kasper <mk@neon1.net>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -57,7 +58,7 @@
##|+PRIV
##|*IDENT=page-vpn-ipsec
-##|*NAME=VPN: IPsec page
+##|*NAME=VPN: IPsec
##|*DESCR=Allow access to the 'VPN: IPsec' page.
##|*MATCH=vpn_ipsec.php*
##|-PRIV
@@ -80,11 +81,9 @@ if (!is_array($config['ipsec']['phase2'])) {
$a_phase1 = &$config['ipsec']['phase1'];
$a_phase2 = &$config['ipsec']['phase2'];
-$pconfig['enable'] = isset($config['ipsec']['enable']);
-
if ($_POST) {
+
if ($_POST['apply']) {
- $retval = 0;
$retval = vpn_ipsec_configure();
/* reload the filter in the background */
filter_configure();
@@ -94,14 +93,6 @@ if ($_POST) {
clear_subsystem_dirty('ipsec');
}
}
- } else if ($_POST['submit'] == 'Save') {
- $pconfig = $_POST;
-
- $config['ipsec']['enable'] = $_POST['enable'] ? true : false;
-
- write_config();
-
- $retval = vpn_ipsec_configure();
} else if (isset($_POST['del'])) {
/* delete selected p1 entries */
if (is_array($_POST['p1entry']) && count($_POST['p1entry'])) {
@@ -259,14 +250,14 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("VPN"), gettext("IPsec"));
+$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnels"));
$shortcut_section = "ipsec";
include("head.inc");
$tab_array = array();
$tab_array[] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
-$tab_array[] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+$tab_array[] = array(gettext("Mobile Clients"), false, "vpn_ipsec_mobile.php");
$tab_array[] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
$tab_array[] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
@@ -279,30 +270,27 @@ display_top_tabs($tab_array);
print_info_box($savemsg, 'success');
}
- if ($pconfig['enable'] && is_subsystem_dirty('ipsec')) {
+ if (is_subsystem_dirty('ipsec')) {
print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
}
?>
-<form method="post">
- <input name="enable" type="checkbox" id="enable" value="yes" <?php if ($pconfig['enable']) echo "checked=\"checked\"";?> />&nbsp;&nbsp;<?=gettext("Enable IPsec")?><br /><br />
- <input name="submit" type="submit" class="btn btn-sm btn-primary" value="<?=gettext("Save"); ?>" /><br /><br />
-
+<form name="mainform" method="post">
<div class="panel panel-default">
- <div class="panel-heading"><h2 class="panel-title"><?=gettext('IPSec tunnels')?></h2></div>
+ <div class="panel-heading"><h2 class="panel-title"><?=gettext('IPsec tunnels')?></h2></div>
<div class="panel-body table-responsive">
<table class="table table-striped table-hover">
<thead>
<tr>
<th>&nbsp;</th>
<th>&nbsp;</th>
- <th><?=gettext("IKE"); ?></th>
- <th><?=gettext("Remote Gateway"); ?></th>
- <th><?=gettext("Mode"); ?></th>
- <th><?=gettext("P1 Protocol"); ?></th>
- <th><?=gettext("P1 Transforms"); ?></th>
- <th><?=gettext("P1 Description"); ?></th>
- <th></th>
+ <th><?=gettext("IKE")?></th>
+ <th><?=gettext("Remote Gateway")?></th>
+ <th><?=gettext("Mode")?></th>
+ <th><?=gettext("P1 Protocol")?></th>
+ <th><?=gettext("P1 Transforms")?></th>
+ <th><?=gettext("P1 Description")?></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody class="p1-entries">
@@ -316,58 +304,65 @@ display_top_tabs($tab_array);
$iconfn .= "_d";
}
?>
- <tr id="fr<?=$i?>" ondblclick="document.location='vpn_ipsec_phase1.php?p1index=<?=$i?>'" class="<?= $entryStatus ?>">
+ <tr id="fr<?=$i?>" onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>" ondblclick="document.location='vpn_ipsec_phase1.php?p1index=<?=$i?>'" class="<?= $entryStatus ?>">
<td>
<input type="checkbox" id="frc<?=$i?>" name="p1entry[]" value="<?=$i?>" onclick="fr_bgcolor('<?=$i?>')" />
+ <a class="fa fa-anchor" id="Xmove_<?=$i?>" title="<?=gettext("Move checked entries to here")?>"></a>
</td>
<td>
<button value="toggle_<?=$i?>" name="toggle_<?=$i?>" title="<?=gettext("click to toggle enabled/disabled status")?>" class="btn btn-xs btn-default" type="submit"><?= ($entryStatus == 'disabled' ? 'enable' : 'disable') ?></button>
</td>
<td onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>">
<?php
- if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1")
+ if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1") {
echo "V1";
- else
+ } else {
echo "V2";
+ }
?>
</td>
- <td onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>">
+ <td>
<?php
if ($ph1ent['interface']) {
$iflabels = get_configured_interface_with_descr();
$carplist = get_configured_carp_interface_list();
- foreach ($carplist as $cif => $carpip)
+ foreach ($carplist as $cif => $carpip) {
$iflabels[$cif] = $carpip." (".get_vip_descr($carpip).")";
+ }
$aliaslist = get_configured_ip_aliases_list();
- foreach ($aliaslist as $aliasip => $aliasif)
+ foreach ($aliaslist as $aliasip => $aliasif) {
$iflabels[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
+ }
$grouplist = return_gateway_groups_array();
foreach ($grouplist as $name => $group) {
- if($group[0]['vip'] != "")
+ if ($group[0]['vip'] != "") {
$vipif = $group[0]['vip'];
- else
+ } else {
$vipif = $group[0]['int'];
+ }
$iflabels[$name] = "GW Group {$name}";
}
$if = htmlspecialchars($iflabels[$ph1ent['interface']]);
- }
- else
+ } else {
$if = "WAN";
+ }
- if (!isset($ph1ent['mobile']))
+ if (!isset($ph1ent['mobile'])) {
echo $if."<br />".$ph1ent['remote-gateway'];
- else
+ } else {
echo $if."<br /><strong>" . gettext("Mobile Client") . "</strong>";
+ }
?>
- </td>
- <td onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>">
+ </td>
+ <td onclick="fr_toggle(<?=$i?>)" id="frd<?=$i?>">
<?=$spans?>
<?php
- if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1")
+ if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == "ikev1") {
echo "{$ph1ent['mode']}";
+ }
?>
<?=$spane?>
</td>
@@ -375,10 +370,11 @@ display_top_tabs($tab_array);
<?=$p1_ealgos[$ph1ent['encryption-algorithm']['name']]['name']?>
<?php
if ($ph1ent['encryption-algorithm']['keylen']) {
- if ($ph1ent['encryption-algorithm']['keylen']=="auto")
+ if ($ph1ent['encryption-algorithm']['keylen'] == "auto") {
echo " (" . gettext("auto") . ")";
- else
+ } else {
echo " ({$ph1ent['encryption-algorithm']['keylen']} " . gettext("bits") . ")";
+ }
}
?>
</td>
@@ -388,60 +384,65 @@ display_top_tabs($tab_array);
<td>
<?=htmlspecialchars($ph1ent['descr'])?>
</td>
- <td>
- <?php // TODO: add mouseover behaviour which indicates insert position when moving ?>
- <button class="btn btn-xs btn-default" type="submit" name="move_<?=$i?>" value="move_<?=$i?>"><?=gettext("Move checked entries to here")?></button>
- <a class="btn btn-xs btn-primary" href="vpn_ipsec_phase1.php?p1index=<?=$i?>" title="<?=gettext("edit phase1 entry"); ?>">edit</a>
- <button class="btn btn-xs btn-danger" type="submit" name="del_<?=$i?>" value="del_<?=$i?>" title="<?=gettext('delete phase1 entry'); ?>">delete</button>
- <?php if (!isset($ph1ent['mobile'])): ?>
- <a class="btn btn-xs btn-success" href="vpn_ipsec_phase1.php?dup=<?=$i?>" title="<?=gettext("copy phase1 entry"); ?>">copy</a>
- <?php endif; ?>
+ <td style="cursor: pointer;">
+<!-- <a class="fa fa-anchor" id="Xmove_<?=$i?>" title="<?=gettext("Move checked entries to here")?>"></a> -->
+ <button style="display: none;" class="btn btn-default btn-xs" type="submit" id="move_<?=$i?>" name="move_<?=$i?>" value="move_<?=$i?>"><?=gettext("Move checked entries to here")?></button>
+ <a class="fa fa-pencil" href="vpn_ipsec_phase1.php?p1index=<?=$i?>" title="<?=gettext("Edit phase1 entry"); ?>"></a>
+<?php if (!isset($ph1ent['mobile'])): ?>
+ <a class="fa fa-clone" href="vpn_ipsec_phase1.php?dup=<?=$i?>" title="<?=gettext("Copy phase1 entry"); ?>"></a>
+<?php endif; ?>
+ <a class="fa fa-trash no-confirm" id="Xdel_<?=$i?>" title="<?=gettext('Delete phase1 entry'); ?>"></a>
+ <button style="display: none;" class="btn btn-xs btn-warning" type="submit" id="del_<?=$i?>" name="del_<?=$i?>" value="del_<?=$i?>" title="<?=gettext('Delete phase1 entry'); ?>">delete</button>
+
</td>
</tr>
<tr class="<?= $entryStatus ?>">
<td colspan="2"></td>
<td colspan="7" class="contains-table">
<?php
- if (isset($_POST["tdph2-{$i}-visible"]))
+ if (isset($_POST["tdph2-{$i}-visible"])) {
$tdph2_visible = htmlspecialchars($_POST["tdph2-{$i}-visible"]);
- else
+ } else {
$tdph2_visible = 0;
+ }
?>
- <input type="hidden" name="tdph2-<?=$i?>-visible" id="tdph2-<?=$i?>-visible" value="<?=$tdph2_visible?>" />
- <div id="shph2but-<?=$i?>" <?=($tdph2_visible == '1' ? 'style="display:none"' : '')?>>
+ <input type="hidden" name="tdph2-<?=$i?>-visible" id="tdph2-<?=$i?>-visible" value="<?=$tdph2_visible?>" />
+ <div id="shph2but-<?=$i?>" <?=($tdph2_visible == '1' ? 'style="display:none"' : '')?>>
<?php
$phase2count=0;
foreach ($a_phase2 as $ph2ent) {
- if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
+ if ($ph2ent['ikeid'] != $ph1ent['ikeid']) {
continue;
+ }
$phase2count++;
}
$fr_prefix = "frp2{$i}";
$fr_header = $fr_prefix . "header";
?>
- <input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
- </div>
- <div id="tdph2-<?=$i?>" <?=($tdph2_visible != '1' ? 'style="display:none"' : '')?>>
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th>&nbsp;</th>
- <th>&nbsp;</th>
- <th><?=gettext("Mode"); ?></th>
- <th><?=gettext("Local Subnet"); ?></th>
- <th><?=gettext("Remote Subnet"); ?></th>
- <th><?=gettext("P2 Protocol"); ?></th>
- <th><?=gettext("P2 Transforms"); ?></th>
- <th><?=gettext("P2 Auth Methods"); ?></th>
- <th>&nbsp;</th>
- </tr>
- </thead>
- <tbody class="p2-entries">
+ <input type="button" onclick="show_phase2('tdph2-<?=$i?>','shph2but-<?=$i?>')" value="+" /> - <?php printf(gettext("Show %s Phase-2 entries"), $phase2count); ?>
+ </div>
+ <div id="tdph2-<?=$i?>" <?=($tdph2_visible != '1' ? 'style="display:none"' : '')?>>
+ <table class="table table-striped table-hover">
+ <thead>
+ <tr>
+ <th>&nbsp;</th>
+ <th>&nbsp;</th>
+ <th><?=gettext("Mode"); ?></th>
+ <th><?=gettext("Local Subnet"); ?></th>
+ <th><?=gettext("Remote Subnet"); ?></th>
+ <th><?=gettext("P2 Protocol"); ?></th>
+ <th><?=gettext("P2 Transforms"); ?></th>
+ <th><?=gettext("P2 Auth Methods"); ?></th>
+ <th><?=gettext("P2 actions")?></th>
+ </tr>
+ </thead>
+ <tbody class="p2-entries">
<?php $j = 0; foreach ($a_phase2 as $ph2index => $ph2ent): ?>
<?php
- if ($ph2ent['ikeid'] != $ph1ent['ikeid'])
+ if ($ph2ent['ikeid'] != $ph1ent['ikeid']) {
continue;
+ }
$fr_c = $fr_prefix . "c" . $j;
$fr_d = $fr_prefix . "d" . $j;
@@ -449,97 +450,81 @@ display_top_tabs($tab_array);
$iconfn = "pass";
$entryStatus = (isset($ph2ent['disabled']) || isset($ph1ent['disabled']) ? 'disabled' : 'enabled');
- if ($entryStatus == 'disabled')
+ if ($entryStatus == 'disabled') {
$iconfn .= "_d";
-
+ }
?>
- <tr id="<?=$fr_prefix . $j?>" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>'" class="<?= $entryStatus ?>">
- <td>
- <input type="checkbox" id="<?=$fr_c?>" name="p2entry[]" value="<?=$ph2index?>" onclick="fr_bgcolor('<?=$j?>', '<?=$fr_prefix?>')" />
- </td>
- <td>
- <button value="togglep2_<?=$ph2index?>" name="togglep2_<?=$ph2index?>" title="<?=gettext("click to toggle enabled/disabled status")?>" class="btn btn-xs btn-default" type="submit"><?= ($entryStatus == 'disabled'? 'enable' : 'disable') ?></button>
- </td>
- <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
- <?=$ph2ent['mode']?>
- </td>
-<?php if(($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
- <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
- <?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
- </td>
- <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
- <?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
- </td>
-<?php else: ?>
- <td colspan="2"></td>
+ <tr id="<?=$fr_prefix . $j?>" ondblclick="document.location='vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>'" class="<?= $entryStatus ?>">
+ <td>
+ <input type="checkbox" id="<?=$fr_c?>" name="p2entry[]" value="<?=$ph2index?>" onclick="fr_bgcolor('<?=$j?>', '<?=$fr_prefix?>')" />
+ <button class="fa fa-anchor button-icon" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>" title="<?=gettext("Move checked P2s here")?>"></button>
+ </td>
+ <td>
+ <button value="togglep2_<?=$ph2index?>" name="togglep2_<?=$ph2index?>" title="<?=gettext("click to toggle enabled/disabled status")?>" class="btn btn-xs btn-default" type="submit"><?= ($entryStatus == 'disabled'? 'enable' : 'disable') ?></button>
+ </td>
+ <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
+ <?=$ph2ent['mode']?>
+ </td>
+<?php if (($ph2ent['mode'] == "tunnel") or ($ph2ent['mode'] == "tunnel6")): ?>
+ <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
+ <?=ipsec_idinfo_to_text($ph2ent['localid']); ?>
+ </td>
+ <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
+ <?=ipsec_idinfo_to_text($ph2ent['remoteid']); ?>
+ </td>
+ <?php else: ?>
+ <td colspan="2"></td>
<?php endif; ?>
- <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
- <?=$p2_protos[$ph2ent['protocol']]; ?>
- </td>
- <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
+ <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
+ <?=$p2_protos[$ph2ent['protocol']]; ?>
+ </td>
+ <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?php
foreach ($ph2ent['encryption-algorithm-option'] as $k => $ph2ea) {
- if ($k)
+ if ($k) {
echo ", ";
+ }
echo $p2_ealgos[$ph2ea['name']]['name'];
if ($ph2ea['keylen']) {
- if ($ph2ea['keylen']=="auto")
+ if ($ph2ea['keylen'] == "auto") {
echo " (" . gettext("auto") . ")";
- else
+ } else {
echo " ({$ph2ea['keylen']} " . gettext("bits") . ")";
+ }
}
}
?>
- </td>
- <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
+ </td>
+ <td id="<?=$fr_d?>" onclick="fr_toggle('<?=$j?>', '<?=$fr_prefix?>')">
<?php
if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
foreach ($ph2ent['hash-algorithm-option'] as $k => $ph2ha) {
- if ($k)
+ if ($k) {
echo ", ";
+ }
echo $p2_halgos[$ph2ha];
}
}
?>
- </td>
- <td>
- <?php // TODO: add mouseover behaviour which indicates insert position when moving ?>
- <button class="btn btn-xs btn-default" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>"><?=gettext("Move checked P2s here")?></button>
- <a class="btn btn-xs btn-primary" href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>" title="<?=gettext("edit phase2 entry"); ?>">edit</a>
- <button class="btn btn-xs btn-danger" type="submit" name="delp2_<?=$ph2index?>" value="delp2_<?=$ph2index?>" title="<?=gettext('delete phase2 entry'); ?>">delete</button>
- <a class="btn btn-xs btn-success" href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']?>" title="<?=gettext("add a new Phase 2 based on this one"); ?>">copy</a>
- </td>
- </tr>
+ </td>
+ <td style="cursor: pointer;">
+<!-- <button class="fa fa-anchor button-icon" type="submit" name="movep2_<?=$j?>" value="movep2_<?=$j?>" title="<?=gettext("Move checked P2s here")?>"></button> -->
+ <a class="fa fa-pencil" href="vpn_ipsec_phase2.php?p2index=<?=$ph2ent['uniqid']?>" title="<?=gettext("Edit phase2 entry"); ?>"></a>
+ <a class="fa fa-clone" href="vpn_ipsec_phase2.php?dup=<?=$ph2ent['uniqid']?>" title="<?=gettext("Add a new Phase 2 based on this one"); ?>"></a>
+ <a class="fa fa-trash no-confirm" id="Xdelp2_<?=$i?>" title="<?=gettext('Delete phase2 entry'); ?>"></a>
+ <button style="display: none;" class="btn btn-xs btn-warning" type="submit" id="delp2_<?=$ph2index?>" name="delp2_<?=$ph2index?>" value="delp2_<?=$ph2index?>" title="<?=gettext('delete phase2 entry'); ?>">delete</button>
+ </td>
+ </tr>
<?php $j++; endforeach; ?>
- <tr>
- <td colspan="8"></td>
- <td>
-<?php
- if ($j == 0):
-?>
- <i class="icon icon-arrow-down" title="<?=gettext("move selected phase2 entries to end")?>" alt="move"></i>
-<?php
- else:
-?>
- <i class="icon icon-arrow-down" name="movep2_<?=$j?>" onmouseover="fr_insline(<?=$j?>, true, '<?=$fr_prefix?>')" onmouseout="fr_insline(<?=$j?>, false, '<?=$fr_prefix?>')" title="<?=gettext("move selected phase2 entries to end")?>" alt="move"></i>
-<?php
- endif;
-?>
- <a href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true"?>">
- <i class="icon icon-plus-sign" title="<?=gettext("add phase2 entry"); ?>" alt="add"></i>
- </a>
-<?php
- if ($j == 0):
-?>
- <i class="icon icon-remove-sign" title="<?=gettext("delete selected phase2 entries")?>" alt="delete"></i>
-<?php
- else:
-?>
- <i name="delp2" class="icon icon-remove-sign" title="<?=gettext("delete selected phase2 entries")?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected phase2 entries?")?>')"></i>
-<?php
- endif;
-?>
+ <tr>
+ <td></td>
+ <td>
+ <a class="btn btn-xs btn-success" href="vpn_ipsec_phase2.php?ikeid=<?=$ph1ent['ikeid']?><?php if (isset($ph1ent['mobile'])) echo "&amp;mobile=true"?>">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add P2")?>
+ </a>
</td>
+ <td colspan="7"></td>
</tr>
</tbody>
</table>
@@ -550,30 +535,39 @@ display_top_tabs($tab_array);
$i++;
endforeach; // $a_phase1 as $ph1ent
?>
- </tbody>
- </table>
+ </tbody>
+ </table>
+ </div>
</div>
-</div>
-<nav class="action-buttons">
-<?php if ($i !== 0): ?>
+ <nav class="action-buttons">
+<?php
+/*
+ if ($i !== 0): ?>
<input type="submit" name="move_<?=$i?>" class="btn btn-default" value="<?=gettext("move selected phase1 entries to end")?>" />
-<?php endif; ?>
- <a href="vpn_ipsec_phase1.php" class="btn btn-success"><?=gettext("add new phase1")?></a>
+<?php endif;
+*/
+?>
+ <a href="vpn_ipsec_phase1.php" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add P1")?>
+ </a>
<?php if ($i !== 0): ?>
- <input type="submit" name="del" class="btn btn-danger" value="<?=gettext("delete selected phase1 entries")?>" onclick="return confirm('<?=gettext("Do you really want to delete the selected phase1 entries?")?>')" />
+ <button type="submit" name="del" class="btn btn-danger btn-sm" value="<?=gettext("Delete selected P1s")?>">
+ <i class="fa fa-trash icon-embed-btn"></i>
+ <?=gettext("Delete P1s")?>
+ </button>
<?php endif; ?>
-</nav>
+ </nav>
</form>
-<div class="alert alert-info">
- <strong><?=gettext("Note:")?></strong><br />
- <?=gettext("You can check your IPsec status at"); ?> <a href="diag_ipsec.php"><?=gettext("Status:IPsec"); ?></a>.<br />
- <?=gettext("IPsec Debug Mode can be enabled at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.<br />
- <?=gettext("IPsec can be set to prefer older SAs at"); ?> <a href="vpn_ipsec_settings.php"><?=gettext("VPN:IPsec:Advanced Settings"); ?></a>.
+<div id="infoblock">
+ <?=print_info_box('<strong>' . gettext("Note:") . '</strong><br />' .
+ gettext("You can check your IPsec status at ") . '<a href="status_ipsec.php">' . gettext("Status:IPsec") . '</a>.<br />' .
+ gettext("IPsec Debug Mode can be enabled at ") . '<a href="vpn_ipsec_settings.php">' .gettext("VPN:IPsec:Advanced Settings") . '</a>.<br />' .
+ gettext("IPsec can be set to prefer older SAs at ") . '<a href="vpn_ipsec_settings.php">' . gettext("VPN:IPsec:Advanced Settings") . '</a>', info)?>
</div>
-<?php include("foot.inc"); ?>
<script type="text/javascript">
//<![CDATA[
function show_phase2(id, buttonid) {
@@ -584,13 +578,24 @@ function show_phase2(id, buttonid) {
}
events.push(function() {
- // Make rules sortable
- $('table tbody.p2-entries').sortable({
- cursor: 'grabbing',
- update: function(event, ui) {
- $('#order-store').removeAttr('disabled');
+ $('[id^=Xmove_]').click(function (event) {
+ $('#' + event.target.id.slice(1)).click();
+ });
+
+ $('[id^=Xdel_]').click(function (event) {
+ if (confirm("<?=gettext('Are you sure you wish to delete this P1 entry?')?>")) {
+ $('#' + event.target.id.slice(1)).click();
+ }
+ });
+
+ $('[id^=Xdelp2_]').click(function (event) {
+ if (confirm("<?=gettext('Are you sure you wish to delete this P2 entry?')?>")) {
+ $('#' + event.target.id.slice(1)).click();
}
});
});
//]]>
</script>
+
+<?php
+include("foot.inc");
diff --git a/src/usr/local/www/vpn_ipsec_keys.php b/src/usr/local/www/vpn_ipsec_keys.php
index 0a5edc3..7fcd642 100644
--- a/src/usr/local/www/vpn_ipsec_keys.php
+++ b/src/usr/local/www/vpn_ipsec_keys.php
@@ -1,34 +1,60 @@
<?php
/*
vpn_ipsec_keys.php
- part of m0n0wall (http://m0n0.ch/wall)
- part of pfSense
-
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-ipsec-listkeys
@@ -76,7 +102,7 @@ if ($_GET['act'] == "del") {
}
}
-$pgtitle = gettext("VPN: IPsec: Keys");
+$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Pre-Shared Keys"));
$shortcut_section = "ipsec";
include("head.inc");
@@ -84,17 +110,19 @@ include("head.inc");
?>
<?php
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
-if (is_subsystem_dirty('ipsec'))
- print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
+if (is_subsystem_dirty('ipsec')) {
+ print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
+}
?>
<?php
$tab_array = array();
$tab_array[0] = array(gettext("Tunnels"), false, "vpn_ipsec.php");
- $tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+ $tab_array[1] = array(gettext("Mobile Clients"), false, "vpn_ipsec_mobile.php");
$tab_array[2] = array(gettext("Pre-Shared Keys"), true, "vpn_ipsec_keys.php");
$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
@@ -116,25 +144,27 @@ if (is_subsystem_dirty('ipsec'))
<tr>
<td>
<?php
- if ($secretent['ident'] == 'allusers')
+ if ($secretent['ident'] == 'allusers') {
echo gettext("ANY USER");
- else
+ } else {
echo htmlspecialchars($secretent['ident']);
+ }
?>
</td>
<td>
<?php
- if (empty($secretent['type']))
+ if (empty($secretent['type'])) {
echo 'PSK';
- else
+ } else {
echo htmlspecialchars($secretent['type']);
+ }
?>
</td>
<td>
<?=htmlspecialchars($secretent['pre-shared-key'])?>
</td>
<td>
- <a class="btn btn-primary btn-xs" href="system_usermanager.php?act=edit&amp;userid=<?=$secretent['id']?>">edit user</a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit user')?>" href="system_usermanager.php?act=edit&amp;userid=<?=$secretent['id']?>"></a>
</td>
</tr>
<?php $i++; endforeach; ?>
@@ -146,18 +176,19 @@ if (is_subsystem_dirty('ipsec'))
</td>
<td>
<?php
- if (empty($secretent['type']))
+ if (empty($secretent['type'])) {
echo 'PSK';
- else
+ } else {
echo htmlspecialchars($secretent['type']);
+ }
?>
</td>
<td>
<?=htmlspecialchars($secretent['pre-shared-key'])?>
</td>
<td>
- <a class="btn btn-primary btn-xs" href="vpn_ipsec_keys_edit.php?id=<?=$i?>">edit key</a>
- <a class="btn btn-danger btn-xs" href="vpn_ipsec_keys.php?act=del&amp;id=<?=$i?>">delete key</a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit key')?>" href="vpn_ipsec_keys_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete key')?>" href="vpn_ipsec_keys.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php $i++; endforeach; ?>
@@ -166,12 +197,15 @@ if (is_subsystem_dirty('ipsec'))
</div>
<nav class="action-buttons">
- <a class="btn btn-success" href="vpn_ipsec_keys_edit.php"><?=gettext("add key")?></a>
+ <a class="btn btn-success btn-sm" href="vpn_ipsec_keys_edit.php">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
<div class="alert alert-info">
- <strong><?=gettext("Note"); ?>:</strong><br />
- <?=gettext("PSK for any user can be set by using an identifier of any")?>
+ <strong><?=gettext("Note"); ?>:</strong>
+ <?=gettext(" PSK for any user can be set by using an identifier of any")?>
</div>
-<?php include("foot.inc"); ?> \ No newline at end of file
+<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/vpn_ipsec_keys_edit.php b/src/usr/local/www/vpn_ipsec_keys_edit.php
index b837c34..69478da 100644
--- a/src/usr/local/www/vpn_ipsec_keys_edit.php
+++ b/src/usr/local/www/vpn_ipsec_keys_edit.php
@@ -1,34 +1,60 @@
<?php
/*
vpn_ipsec_keys_edit.php
- part of m0n0wall (http://m0n0.ch/wall)
- part of pfSense
-
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-ipsec-editkeys
@@ -126,7 +152,7 @@ if ($_POST) {
}
}
-$pgtitle = gettext("VPN: IPsec: Edit Pre-Shared Key");
+$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Pre-Shared Key"), gettext("Edit"));
$shortcut_section = "ipsec";
include("head.inc");
@@ -137,7 +163,6 @@ include("head.inc");
<?php
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Edit pre-shared-secret');
@@ -163,8 +188,7 @@ $section->addInput(new Form_Input(
$pconfig['psk']
));
-if (isset($id) && $a_secret[$id])
-{
+if (isset($id) && $a_secret[$id]) {
$form->addGlobal(new Form_Input(
'id',
false,
@@ -184,4 +208,4 @@ print $form;
<?=gettext("PSK for any user can be set by using an identifier of any")?>
</div>
-<?php include("foot.inc"); ?> \ No newline at end of file
+<?php include("foot.inc"); ?>
diff --git a/src/usr/local/www/vpn_ipsec_mobile.php b/src/usr/local/www/vpn_ipsec_mobile.php
index d0baa23..8543772 100644
--- a/src/usr/local/www/vpn_ipsec_mobile.php
+++ b/src/usr/local/www/vpn_ipsec_mobile.php
@@ -1,36 +1,65 @@
<?php
/*
vpn_ipsec_mobile.php
-
- Copyright (C) 2008 Shrew Soft Inc
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-ipsec-mobile
-##|*NAME=VPN: IPsec: Mobile page
+##|*NAME=VPN: IPsec: Mobile
##|*DESCR=Allow access to the 'VPN: IPsec: Mobile' page.
##|*MATCH=vpn_ipsec_mobile.php*
##|-PRIV
@@ -147,6 +176,11 @@ if ($_POST['save']) {
unset($input_errors);
$pconfig = $_POST;
+ foreach ($a_phase1 as $ph1ent) {
+ if (isset($ph1ent['mobile'])) {
+ $mobileph1 = $ph1ent;
+ }
+ }
/* input consolidation */
/* input validation */
@@ -222,6 +256,18 @@ if ($_POST['save']) {
}
}
+ if ($pconfig['user_source']) {
+ if (isset($mobileph1) && $mobileph1['authentication_method'] == 'eap-radius') {
+ foreach ($pconfig['user_source'] as $auth_server_name) {
+ $auth_server = auth_get_authserver($auth_server_name);
+ if (!is_array($auth_server) || ($auth_server['type'] != 'radius')) {
+ $input_errors[] = gettext("Only valid RADIUS servers may be selected as a user source when using EAP-RADIUS for authentication on the Mobile IPsec VPN.");
+ $pconfig['user_source'] = implode(',', $pconfig['user_source']);
+ }
+ }
+ }
+ }
+
if (!$input_errors) {
$client = array();
@@ -290,7 +336,7 @@ if ($_POST['save']) {
}
}
-$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile"));
+$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Clients"));
$shortcut_section = "ipsec";
include("head.inc");
@@ -323,18 +369,20 @@ include("head.inc");
function dns_domain_change() {
- if (document.iform.dns_domain_enable.checked)
+ if (document.iform.dns_domain_enable.checked) {
document.iform.dns_domain.disabled = 0;
- else
+ } else {
document.iform.dns_domain.disabled = 1;
+ }
}
function dns_split_change() {
- if (document.iform.dns_split_enable.checked)
+ if (document.iform.dns_split_enable.checked) {
document.iform.dns_split.disabled = 0;
- else
+ } else {
document.iform.dns_split.disabled = 1;
+ }
}
function dns_server_change() {
@@ -365,44 +413,51 @@ include("head.inc");
function pfs_group_change() {
- if (document.iform.pfs_group_enable.checked)
+ if (document.iform.pfs_group_enable.checked) {
document.iform.pfs_group.disabled = 0;
- else
+ } else {
document.iform.pfs_group.disabled = 1;
+ }
}
function login_banner_change() {
- if (document.iform.login_banner_enable.checked)
+ if (document.iform.login_banner_enable.checked) {
document.iform.login_banner.disabled = 0;
- else
+ } else {
document.iform.login_banner.disabled = 1;
+ }
}
//]]>
</script>
<?php
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
-if (isset($config['ipsec']['enable']) && is_subsystem_dirty('ipsec'))
+}
+if (is_subsystem_dirty('ipsec')) {
print_info_box_np(gettext("The IPsec tunnel configuration has been changed") . ".<br />" . gettext("You must apply the changes in order for them to take effect."));
-foreach ($a_phase1 as $ph1ent)
- if (isset($ph1ent['mobile']))
+}
+foreach ($a_phase1 as $ph1ent) {
+ if (isset($ph1ent['mobile'])) {
$ph1found = true;
-if ($pconfig['enable'] && !$ph1found)
- print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."),gettext("create"),gettext("Create Phase1"));
-if ($input_errors)
+ }
+}
+if ($pconfig['enable'] && !$ph1found) {
+ print_info_box_np(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."), gettext("create"), gettext("Create Phase1"));
+}
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[0] = array(gettext("Tunnels"), false, "vpn_ipsec.php");
-$tab_array[1] = array(gettext("Mobile clients"), true, "vpn_ipsec_mobile.php");
-$tab_array[2] = array(gettext("Pre-Shared Key"), false, "vpn_ipsec_keys.php");
+$tab_array[1] = array(gettext("Mobile Clients"), true, "vpn_ipsec_mobile.php");
+$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Enable IPsec Mobile Client Support');
@@ -419,8 +474,9 @@ $section = new Form_Section('Extended Authentication (Xauth)');
$authServers = array();
-foreach (auth_get_authserver_list() as $authServer)
+foreach (auth_get_authserver_list() as $authServer) {
$authServers[$authServer['name']] = $authServer['name']; // Value == name
+}
$section->addInput(new Form_Select(
'user_source',
@@ -455,8 +511,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('');
$group->addClass('toggle-pool_enable collapse');
-if (!empty($pconfig['pool_enable']))
+if (!empty($pconfig['pool_enable'])) {
$group->addClass('in');
+}
$group->add(new Form_Input(
'pool_address',
@@ -467,8 +524,9 @@ $group->add(new Form_Input(
$netBits = array();
-for ($i = 32; $i >= 0; $i--)
+for ($i = 32; $i >= 0; $i--) {
$netBits[$i] = $i;
+}
$group->add(new Form_Select(
'pool_netbits',
@@ -490,8 +548,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('');
$group->addClass('toggle-pool_enable_v6 collapse');
-if (!empty($pconfig['pool_enable_v6']))
+if (!empty($pconfig['pool_enable_v6'])) {
$group->addClass('in');
+}
$group->add(new Form_Input(
'pool_address_v6',
@@ -502,8 +561,9 @@ $group->add(new Form_Input(
$netBits = array();
-for ($i = 128; $i >= 0; $i--)
+for ($i = 128; $i >= 0; $i--) {
$netBitsv6[$i] = $i;
+}
$group->add(new Form_Select(
'pool_netbits_v6',
@@ -538,8 +598,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('');
$group->addClass('toggle-dns_domain collapse');
-if (!empty($pconfig['dns_domain_enable']))
+if (!empty($pconfig['dns_domain_enable'])) {
$group->addClass('in');
+}
$group->add(new Form_Input(
'dns_domain',
@@ -560,8 +621,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('');
$group->addClass('toggle-dns_split collapse');
-if (!empty($pconfig['dns_split_enable']))
+if (!empty($pconfig['dns_split_enable'])) {
$group->addClass('in');
+}
$group->add(new Form_Input(
'dns_split',
@@ -579,13 +641,13 @@ $section->addInput(new Form_Checkbox(
$pconfig['dns_server_enable']
))->toggles('.toggle-dns_server_enable');
-for ($i = 1; $i <= 4; $i++)
-{
+for ($i = 1; $i <= 4; $i++) {
$group = new Form_Group('Server #' . $i);
$group->addClass('toggle-dns_server_enable collapse');
- if (!empty($pconfig['dns_server_enable']))
+ if (!empty($pconfig['dns_server_enable'])) {
$group->addClass('in');
+ }
$group->add(new Form_Input(
'dns_server' . $i,
@@ -604,13 +666,13 @@ $section->addInput(new Form_Checkbox(
$pconfig['wins_server_enable']
))->toggles('.toggle-wins_server_enable');
-for ($i = 1; $i <= 2; $i++)
-{
+for ($i = 1; $i <= 2; $i++) {
$group = new Form_Group('Server #' . $i);
$group->addClass('toggle-wins_server_enable collapse');
- if (!empty($pconfig['wins_server_enable']))
+ if (!empty($pconfig['wins_server_enable'])) {
$group->addClass('in');
+ }
$group->add(new Form_Input(
'wins_server' . $i,
@@ -633,8 +695,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('Group');
$group->addClass('toggle-pfs_group collapse');
-if (!empty($pconfig['pfs_group_enable']))
+if (!empty($pconfig['pfs_group_enable'])) {
$group->addClass('in');
+}
$group->add(new Form_Select(
'pfs_group',
@@ -655,8 +718,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('');
$group->addClass('toggle-login_banner collapse');
-if (!empty($pconfig['login_banner_enable']))
+if (!empty($pconfig['login_banner_enable'])) {
$group->addClass('in');
+}
// TODO: should be a textarea
$group->add(new Form_Input(
diff --git a/src/usr/local/www/vpn_ipsec_phase1.php b/src/usr/local/www/vpn_ipsec_phase1.php
index 3770335..957fe55 100644
--- a/src/usr/local/www/vpn_ipsec_phase1.php
+++ b/src/usr/local/www/vpn_ipsec_phase1.php
@@ -4,10 +4,11 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc
- * Copyright (c) 2003-2005 Manuel Kasper <mk@neon1.net>.
- * Copyright (c) 2014 Ermal Luçi
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -58,7 +59,7 @@
##|+PRIV
##|*IDENT=page-vpn-ipsec-editphase1
-##|*NAME=VPN: IPsec: Edit Phase 1 page
+##|*NAME=VPN: IPsec: Edit Phase 1
##|*DESCR=Allow access to the 'VPN: IPsec: Edit Phase 1' page.
##|*MATCH=vpn_ipsec_phase1.php*
##|-PRIV
@@ -133,7 +134,7 @@ if (isset($p1index) && $a_phase1[$p1index]) {
$pconfig['authentication_method'] = $a_phase1[$p1index]['authentication_method'];
if (($pconfig['authentication_method'] == "pre_shared_key") ||
- ($pconfig['authentication_method'] == "xauth_psk_server")) {
+ ($pconfig['authentication_method'] == "xauth_psk_server")) {
$pconfig['pskey'] = $a_phase1[$p1index]['pre-shared-key'];
} else {
$pconfig['certref'] = $a_phase1[$p1index]['certref'];
@@ -199,10 +200,11 @@ if ($_POST) {
$method = $pconfig['authentication_method'];
// Unset ca and cert if not required to avoid storing in config
if ($method == "pre_shared_key" || $method == "xauth_psk_server") {
- unset($pconfig['caref']);
unset($pconfig['certref']);
}
-
+ if ($method != "rsasig" && $method != "xauth_rsa_server" && $method != "eap-tls") {
+ unset($pconfig['caref']);
+ }
// Only require PSK here for normal PSK tunnels (not mobile) or xauth.
// For RSA methods, require the CA/Cert.
switch ($method) {
@@ -414,6 +416,19 @@ if ($_POST) {
}
}
+ /* auth backend for mobile eap-radius VPNs should be a RADIUS server */
+ if (($pconfig['authentication_method'] == 'eap-radius') && $pconfig['mobile']) {
+ if (!empty($config['ipsec']['client']['user_source'])) {
+ $auth_server_list = explode(',', $config['ipsec']['client']['user_source']);
+ foreach ($auth_server_list as $auth_server_name) {
+ $auth_server = auth_get_authserver($auth_server_name);
+ if (!is_array($auth_server) || ($auth_server['type'] != 'radius')) {
+ $input_errors[] = gettext("A valid RADIUS server must be selected for user authentication on the Mobile Clients tab in order to set EAP-RADIUS as the authentication method.");
+ }
+ }
+ }
+ }
+
/* build our encryption algorithms array */
$pconfig['ealgo'] = array();
$pconfig['ealgo']['name'] = $_POST['ealgo'];
@@ -511,21 +526,24 @@ function build_interface_list() {
$carplist = get_configured_carp_interface_list();
- foreach ($carplist as $cif => $carpip)
- $interfaces[$cif] = $carpip." (".get_vip_descr($carpip).")";
+ foreach ($carplist as $cif => $carpip) {
+ $interfaces[$cif] = $carpip . " (" . get_vip_descr($carpip) . ")";
+ }
$aliaslist = get_configured_ip_aliases_list();
- foreach ($aliaslist as $aliasip => $aliasif)
+ foreach ($aliaslist as $aliasip => $aliasif) {
$interfaces[$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
+ }
$grouplist = return_gateway_groups_array();
foreach ($grouplist as $name => $group) {
- if($group[0]['vip'] != "")
+ if ($group[0]['vip'] != "") {
$vipif = $group[0]['vip'];
- else
+ } else {
$vipif = $group[0]['int'];
+ }
$interfaces[$name] = "GW Group {$name}";
}
@@ -539,9 +557,10 @@ function build_auth_method_list() {
$list = array();
- foreach ($p1_authentication_methods as $method_type => $method_params){
- if (!$pconfig['mobile'] && $method_params['mobile'])
+ foreach ($p1_authentication_methods as $method_type => $method_params) {
+ if (!$pconfig['mobile'] && $method_params['mobile']) {
continue;
+ }
$list[$method_type] = htmlspecialchars($method_params['name']);
}
@@ -554,8 +573,9 @@ function build_myid_list() {
$list = array();
- foreach ($my_identifier_list as $id_type => $id_params)
+ foreach ($my_identifier_list as $id_type => $id_params) {
$list[$id_type] = htmlspecialchars($id_params['desc']);
+ }
return($list);
}
@@ -565,8 +585,9 @@ function build_peerid_list() {
$list = array();
- foreach ($peer_identifier_list as $id_type => $id_params)
+ foreach ($peer_identifier_list as $id_type => $id_params) {
$list[$id_type] = htmlspecialchars($id_params['desc']);
+ }
return($list);
}
@@ -576,9 +597,10 @@ function build_cert_list() {
$list = array();
- if(is_array($config['cert'])) {
- foreach ($config['cert'] as $cert)
+ if (is_array($config['cert'])) {
+ foreach ($config['cert'] as $cert) {
$list[$cert['refid']] = $cert['descr'];
+ }
}
return($list);
@@ -589,9 +611,10 @@ function build_ca_list() {
$list = array();
- if(is_array($config['ca'])) {
- foreach ($config['ca'] as $ca)
- $list[$ca['refid']] = $ca['descr'];
+ if (is_array($config['ca'])) {
+ foreach ($config['ca'] as $ca) {
+ $list[$ca['refid']] = $ca['descr'];
+ }
}
return($list);
@@ -602,18 +625,21 @@ function build_eal_list() {
$list = array();
- if(is_array($p1_ealgos)) {
- foreach ($p1_ealgos as $algo => $algodata)
+ if (is_array($p1_ealgos)) {
+ foreach ($p1_ealgos as $algo => $algodata) {
$list[$algo] = htmlspecialchars($algodata['name']);
+ }
}
return($list);
}
if ($pconfig['mobile']) {
- $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 1"), gettext("Mobile Client"));
+ $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Client"), gettext("Edit Phase 1"));
+ $editing_mobile = true;
} else {
- $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 1"));
+ $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnel"), gettext("Edit Phase 1"));
+ $editing_mobile = false;
}
$shortcut_section = "ipsec";
@@ -625,14 +651,12 @@ if ($input_errors) {
}
$tab_array = array();
-$tab_array[] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
-$tab_array[] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+$tab_array[] = array(gettext("Tunnels"), !$editing_mobile, "vpn_ipsec.php");
+$tab_array[] = array(gettext("Mobile Clients"), $editing_mobile, "vpn_ipsec_mobile.php");
$tab_array[] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
$tab_array[] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('General Information');
@@ -734,8 +758,9 @@ $group->add(new Form_Input(
$pconfig['peerid_data']
));
-if($pconfig['mobile'])
+if ($pconfig['mobile']) {
$group->setHelp('This is known as the "group" setting on some VPN client implementations');
+}
$section->add($group);
@@ -755,7 +780,7 @@ $section->addInput(new Form_Select(
$section->addInput(new Form_Select(
'caref',
- 'My Certificate Authority',
+ 'Peer Certificate Authority',
$pconfig['caref'],
build_ca_list()
))->setHelp('Select a certificate authority previously configured in the Certificate Manager.');
@@ -895,9 +920,11 @@ print($form);
/* determine if we should init the key length */
$keyset = '';
-if (isset($pconfig['ealgo']['keylen']))
- if (is_numeric($pconfig['ealgo']['keylen']))
+if (isset($pconfig['ealgo']['keylen'])) {
+ if (is_numeric($pconfig['ealgo']['keylen'])) {
$keyset = $pconfig['ealgo']['keylen'];
+ }
+}
?>
@@ -905,7 +932,7 @@ if (isset($pconfig['ealgo']['keylen']))
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function myidsel_change() {
hideGroupInput('myid_data', ($('#myid_type').val() == 'myaddress'));
@@ -935,8 +962,15 @@ events.push(function(){
switch ($('#authentication_method').val()) {
case 'eap-mschapv2':
case 'eap-radius':
- case 'eap-tls':
case 'hybrid_rsa_server':
+ hideInput('pskey', true);
+ hideClass('peeridgroup', false);
+ hideInput('certref', false);
+ hideInput('caref', true);
+ disableInput('certref', false);
+ disableInput('caref', true);
+ break;
+ case 'eap-tls':
case 'xauth_rsa_server':
case 'rsasig':
hideInput('pskey', true);
@@ -1006,21 +1040,24 @@ events.push(function(){
?>
}
- if( bits )
+ if (bits) {
$('#ealgo_keylen').val(bits);
+ }
}
function dpdchkbox_change() {
- hide = ! $('#dpd_enable').prop('checked');
+ hide = !$('#dpd_enable').prop('checked');
hideInput('dpd_delay', hide);
hideInput('dpd_maxfail', hide);
- if(! $('#dpd_delay').val())
+ if (!$('#dpd_delay').val()) {
$('#dpd_delay').val('10')
+ }
- if(! $('#dpd_maxfail').val())
+ if (!$('#dpd_maxfail').val()) {
$('#dpd_maxfail').val('5')
+ }
}
// ---------- Monitor elements for change and call the appropriate display functions ----------
@@ -1063,8 +1100,8 @@ events.push(function(){
ealgosel_change(<?=$keyset?>);
dpdchkbox_change();
- // ---------- On initial page load ------------------------------------------------------------
-
+ // ---------- On initial page load ------------------------------------------------------------
+
hideInput('ikeid', true);
});
//]]>
diff --git a/src/usr/local/www/vpn_ipsec_phase2.php b/src/usr/local/www/vpn_ipsec_phase2.php
index c747c50..336739b 100644
--- a/src/usr/local/www/vpn_ipsec_phase2.php
+++ b/src/usr/local/www/vpn_ipsec_phase2.php
@@ -1,38 +1,65 @@
<?php
/*
vpn_ipsec_phase2.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
- Copyright (C) 2008 Shrew Soft Inc
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-ipsec-editphase2
-##|*NAME=VPN: IPsec: Edit Phase 2 page
+##|*NAME=VPN: IPsec: Edit Phase 2
##|*DESCR=Allow access to the 'VPN: IPsec: Edit Phase 2' page.
##|*MATCH=vpn_ipsec_phase2.php*
##|-PRIV
@@ -234,11 +261,13 @@ if ($_POST) {
$entered = array();
$entered['type'] = $pconfig['localid_type'];
- if (isset($pconfig['localid_address']))
+ if (isset($pconfig['localid_address'])) {
$entered['address'] = $pconfig['localid_address'];
+ }
- if (isset($pconfig['localid_netbits']))
+ if (isset($pconfig['localid_netbits'])) {
$entered['netbits'] = $pconfig['localid_netbits'];
+ }
$entered_localid_data = ipsec_idinfo_to_cidr($entered, false, $pconfig['mode']);
if ($localid_data == $entered_localid_data) {
@@ -409,9 +438,11 @@ if ($_POST) {
}
if ($pconfig['mobile']) {
- $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 2"), gettext("Mobile Client"));
+ $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Client"), gettext("Edit Phase 2"));
+ $editing_mobile = true;
} else {
- $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Edit Phase 2"));
+ $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnel"), gettext("Edit Phase 2"));
+ $editing_mobile = false;
}
$shortcut_section = "ipsec";
@@ -437,7 +468,7 @@ function pconfig_to_ealgos(& $pconfig) {
return $ealgos;
}
-function ealgos_to_pconfig(& $ealgos,& $pconfig) {
+function ealgos_to_pconfig(& $ealgos, & $pconfig) {
$pconfig['ealgos'] = array();
foreach ($ealgos as $algo_data) {
@@ -450,7 +481,7 @@ function ealgos_to_pconfig(& $ealgos,& $pconfig) {
return $ealgos;
}
-function pconfig_to_idinfo($prefix,& $pconfig) {
+function pconfig_to_idinfo($prefix, & $pconfig) {
$type = $pconfig[$prefix."id_type"];
$address = $pconfig[$prefix."id_address"];
@@ -466,7 +497,7 @@ function pconfig_to_idinfo($prefix,& $pconfig) {
}
}
-function idinfo_to_pconfig($prefix,& $idinfo,& $pconfig) {
+function idinfo_to_pconfig($prefix, & $idinfo, & $pconfig) {
switch ($idinfo['type']) {
case "address":
@@ -484,18 +515,17 @@ function idinfo_to_pconfig($prefix,& $idinfo,& $pconfig) {
}
}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
-$tab_array[0] = array(gettext("Tunnels"), true, "vpn_ipsec.php");
-$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
+$tab_array[0] = array(gettext("Tunnels"), !$editing_mobile, "vpn_ipsec.php");
+$tab_array[1] = array(gettext("Mobile Clients"), $editing_mobile, "vpn_ipsec_mobile.php");
$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
$tab_array[3] = array(gettext("Advanced Settings"), false, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form();
$section = new Form_Section('General Information');
@@ -518,8 +548,9 @@ $group = new Form_Group('Local Network');
$group->addClass('opt_localid');
$subnetarray = get_configured_interface_with_descr();
-foreach($subnetarray as $ifname => $ifdescr)
+foreach ($subnetarray as $ifname => $ifdescr) {
$subnetarray[$ifname] = $ifdescr . ' subnet';
+}
$group->add(new Form_Select(
'localid_type',
@@ -540,8 +571,9 @@ $group = new Form_Group('NAT/BINAT translation');
$group->addClass('opt_natid');
$subnetarray = get_configured_interface_with_descr();
-foreach($subnetarray as $ifname => $ifdescr)
+foreach ($subnetarray as $ifname => $ifdescr) {
$subnetarray[$ifname] = $ifdescr . ' subnet';
+}
// Tack none, address & network on the beginning
$subnetarray = array('none' => gettext('None'), 'address' => 'Address', 'network' => 'Network') + $subnetarray;
@@ -611,11 +643,11 @@ foreach ($p2_ealgos as $algo => $algodata) {
'ealgos[]',
null,
$algodata['name'],
- (is_array($pconfig['ealgos']) && in_array($algo,$pconfig['ealgos'])),
+ (is_array($pconfig['ealgos']) && in_array($algo, $pconfig['ealgos'])),
$algo
))->addClass('multi');
- if(is_array($algodata['keysel'])) {
+ if (is_array($algodata['keysel'])) {
$list = array();
$key_hi = $algodata['keysel']['hi'];
$key_lo = $algodata['keysel']['lo'];
@@ -633,8 +665,9 @@ foreach ($p2_ealgos as $algo => $algodata) {
}
- if($i == $rows)
+ if ($i == $rows) {
$group->setHelp('Use 3DES for best compatibility or if you have a hardware crypto accelerator card. Blowfish is usually the fastest in software encryption.');
+ }
$i++;
$section->add($group);
@@ -647,7 +680,7 @@ foreach ($p2_halgos as $algo => $algoname) {
'halgos[]',
null,
$algoname,
- (in_array($algo, $pconfig['halgos'])),
+ (empty($pconfig['halgos']) ? '' : in_array($algo, $pconfig['halgos'])),
$algo
))->addClass('multi');
}
@@ -659,7 +692,7 @@ $sm = (!isset($pconfig['mobile']) || !isset($a_client['pfs_group']));
$section->addInput(new Form_Select(
'pfsgroup',
'PFS key group',
- $pconfig['psgroup'],
+ $pconfig['pfsgroup'],
$sm ? $p2_pfskeygroups:array()
))->setHelp($sm ? '':'Set globally in mobile client options');
@@ -721,7 +754,7 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// ---------- On changing "Mode" ----------------------------------------------------------------------------------
function change_mode() {
@@ -752,8 +785,7 @@ events.push(function(){
if (typeof(bits) === "undefined") {
if (value === "tunnel") {
bits = 24;
- }
- else if (value === "tunnel6") {
+ } else if (value === "tunnel6") {
bits = 64;
}
}
@@ -803,8 +835,7 @@ events.push(function(){
if (typeof(bits) === "undefined") {
if (value === "tunnel") {
bits = 24;
- }
- else if (value === "tunnel6") {
+ } else if (value === "tunnel6") {
bits = 64;
}
}
@@ -859,8 +890,7 @@ events.push(function(){
if (typeof(bits) === "undefined") {
if (value === "tunnel") {
bits = 24;
- }
- else if (value === "tunnel6") {
+ } else if (value === "tunnel6") {
bits = 64;
}
}
diff --git a/src/usr/local/www/vpn_ipsec_settings.php b/src/usr/local/www/vpn_ipsec_settings.php
index ecacb20..2062716 100644
--- a/src/usr/local/www/vpn_ipsec_settings.php
+++ b/src/usr/local/www/vpn_ipsec_settings.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -56,7 +55,7 @@
##|+PRIV
##|*IDENT=page-vpn-ipsec-settings
-##|*NAME=VPN: IPsec: Settings page
+##|*NAME=VPN: IPsec: Settings
##|*DESCR=Allow access to the 'VPN: IPsec: Settings' page.
##|*MATCH=vpn_ipsec_settings.php*
##|-PRIV
@@ -68,9 +67,13 @@ require_once("shaper.inc");
require_once("ipsec.inc");
require_once("vpn.inc");
-foreach ($ipsec_loglevels as $lkey => $ldescr) {
- if (!empty($config['ipsec']["ipsec_{$lkey}"])) {
- $pconfig["ipsec_{$lkey}"] = $config['ipsec']["ipsec_{$lkey}"];
+$def_loglevel = '1';
+
+foreach (array_keys($ipsec_log_cats) as $cat) {
+ if (isset($config['ipsec']['logging'][$cat])) {
+ $pconfig[$cat] = $config['ipsec']['logging'][$cat];
+ } else {
+ $pconfig[$cat] = $def_loglevel;
}
}
@@ -89,54 +92,12 @@ if ($_POST) {
unset($input_errors);
$pconfig = $_POST;
- if (!in_array($pconfig['ipsec_dmn'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Daemon debug.";
- }
- if (!in_array($pconfig['ipsec_mgr'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for SA Manager debug.";
- }
- if (!in_array($pconfig['ipsec_ike'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for IKE SA debug.";
- }
- if (!in_array($pconfig['ipsec_chd'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for IKE Child SA debug.";
- }
- if (!in_array($pconfig['ipsec_job'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Job Processing debug.";
- }
- if (!in_array($pconfig['ipsec_cfg'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Configuration backend debug.";
- }
- if (!in_array($pconfig['ipsec_knl'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Kernel Interface debug.";
- }
- if (!in_array($pconfig['ipsec_net'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Networking debug.";
- }
- if (!in_array($pconfig['ipsec_asn'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for ASN Encoding debug.";
- }
- if (!in_array($pconfig['ipsec_enc'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Message encoding debug.";
- }
- if (!in_array($pconfig['ipsec_imc'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Integrity checker debug.";
- }
- if (!in_array($pconfig['ipsec_imv'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Integrity Verifier debug.";
- }
- if (!in_array($pconfig['ipsec_pts'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for Platform Trust Service debug.";
- }
- if (!in_array($pconfig['ipsec_tls'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for TLS Handler debug.";
- }
- if (!in_array($pconfig['ipsec_esp'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for IPsec Traffic debug.";
- }
- if (!in_array($pconfig['ipsec_lib'], array('0', '1', '2', '3', '4', '5'), true)) {
- $input_errors[] = "A valid value must be specified for StrongSwan Lib debug.";
+ foreach ($ipsec_log_cats as $cat => $desc) {
+ if (!in_array(intval($pconfig[$cat]), array_keys($ipsec_log_sevs), true)) {
+ $input_errors[] = "A valid value must be specified for {$desc} debug.";
+ }
}
+
if (isset($pconfig['maxmss'])) {
if (!is_numericint($pconfig['maxmss']) && $pconfig['maxmss'] != '') {
$input_errors[] = "An integer must be specified for Maximum MSS.";
@@ -148,13 +109,16 @@ if ($_POST) {
if (!$input_errors) {
- foreach ($ipsec_loglevels as $lkey => $ldescr) {
- if (empty($_POST["ipsec_{$lkey}"])) {
- if (isset($config['ipsec']["ipsec_{$lkey}"])) {
- unset($config['ipsec']["ipsec_{$lkey}"]);
- }
- } else {
- $config['ipsec']["ipsec_{$lkey}"] = $_POST["ipsec_{$lkey}"];
+ /* log levels aren't set initially and use default. They all
+ * get set when we save, even if it's to the default level.
+ */
+ foreach (array_keys($ipsec_log_cats) as $cat) {
+ if (!isset($pconfig[$cat])) {
+ continue;
+ }
+ if ($pconfig[$cat] != $config['ipsec']['logging'][$cat]) {
+ $config['ipsec']['logging'][$cat] = $pconfig[$cat];
+ vpn_update_daemon_loglevel($cat, $pconfig[$cat]);
}
}
@@ -202,7 +166,7 @@ if ($_POST) {
unset($config['ipsec']['makebeforebreak']);
}
- // The UI deals with "Auto-exclude LAN address" but in the back-end we work with
+ // The UI deals with "Auto-exclude LAN address" but in the back-end we work with
// noshuntlaninterfaces which is the reverse true/false logic setting - #4655
if ($_POST['autoexcludelanaddress'] == "yes") {
if (isset($config['ipsec']['noshuntlaninterfaces'])) {
@@ -251,7 +215,6 @@ if ($_POST) {
}
vpn_ipsec_configure($needsrestart);
- vpn_ipsec_configure_loglevels();
header("Location: vpn_ipsec_settings.php");
return;
@@ -268,7 +231,7 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Settings"));
+$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Advanced Settings"));
$shortcut_section = "ipsec";
include("head.inc");
@@ -289,31 +252,31 @@ function maxmss_checked(obj) {
</script>
<?php
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg);
+}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
$tab_array = array();
$tab_array[0] = array(gettext("Tunnels"), false, "vpn_ipsec.php");
-$tab_array[1] = array(gettext("Mobile clients"), false, "vpn_ipsec_mobile.php");
-$tab_array[2] = array(gettext("Pre-Shared Key"), false, "vpn_ipsec_keys.php");
+$tab_array[1] = array(gettext("Mobile Clients"), false, "vpn_ipsec_mobile.php");
+$tab_array[2] = array(gettext("Pre-Shared Keys"), false, "vpn_ipsec_keys.php");
$tab_array[3] = array(gettext("Advanced Settings"), true, "vpn_ipsec_settings.php");
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
$form = new Form;
$section = new Form_Section('Start IPsec in debug mode based on sections selected');
-foreach ($ipsec_loglevels as $lkey => $ldescr)
-{
+foreach ($ipsec_log_cats as $cat => $desc) {
$section->addInput(new Form_Select(
- 'ipsec_' . $lkey,
- $ldescr,
- $pconfig['ipsec_' . $lkey],
- array('Silent', 'Audit', 'Control', 'Diag', 'Raw', 'Highest')
+ $cat,
+ $desc,
+ $pconfig[$cat],
+ $ipsec_log_sevs
))->setWidth(2);
}
@@ -376,8 +339,9 @@ $section->addInput(new Form_Checkbox(
$group = new Form_Group('Maximum MSS');
$group->addClass('toggle-maxmss collapse');
-if (!empty($pconfig['maxmss_enable']))
+if (!empty($pconfig['maxmss_enable'])) {
$group->addClass('in');
+}
$group->add(new Form_Input(
'maxmss',
diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php
index 24b23fe..092a0ba 100644
--- a/src/usr/local/www/vpn_l2tp.php
+++ b/src/usr/local/www/vpn_l2tp.php
@@ -1,44 +1,65 @@
<?php
/*
vpn_l2tp.php
- part of pfSense
-
- Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-vpnl2tp
-##|*NAME=VPN: VPN L2TP page
-##|*DESCR=Allow access to the 'VPN: VPN L2TP' page.
+##|*NAME=VPN: L2TP
+##|*DESCR=Allow access to the 'VPN: L2TP' page.
##|*MATCH=vpn_l2tp.php*
##|-PRIV
-$pgtitle = array(gettext("VPN"), gettext("L2TP"), gettext("L2TP"));
-$shortcut_section = "l2tps";
-
require("guiconfig.inc");
require_once("vpn.inc");
@@ -54,7 +75,6 @@ $pconfig['mode'] = $l2tpcfg['mode'];
$pconfig['interface'] = $l2tpcfg['interface'];
$pconfig['l2tp_dns1'] = $l2tpcfg['dns1'];
$pconfig['l2tp_dns2'] = $l2tpcfg['dns2'];
-$pconfig['wins'] = $l2tpcfg['wins'];
$pconfig['radiusenable'] = isset($l2tpcfg['radius']['enable']);
$pconfig['radacct_enable'] = isset($l2tpcfg['radius']['accounting']);
$pconfig['radiusserver'] = $l2tpcfg['radius']['server'];
@@ -95,6 +115,14 @@ if ($_POST) {
$input_errors[] = gettext("A valid RADIUS server address must be specified.");
}
+ if ($_POST['secret'] != $_POST['secret_confirm']) {
+ $input_errors[] = gettext("Secret and confirmation must match");
+ }
+
+ if ($_POST['radiussecret'] != $_POST['radiussecret_confirm']) {
+ $input_errors[] = gettext("Secret and confirmation must match");
+ }
+
/* if this is an AJAX caller then handle via JSON */
if (isAjax() && is_array($input_errors)) {
input_errors2Ajax($input_errors);
@@ -107,7 +135,7 @@ if ($_POST) {
$subnet_end = ip2ulong($_POST['remoteip']) + $_POST['n_l2tp_units'] - 1;
if ((ip2ulong($_POST['localip']) >= $subnet_start) &&
- (ip2ulong($_POST['localip']) <= $subnet_end)) {
+ (ip2ulong($_POST['localip']) <= $subnet_end)) {
$input_errors[] = gettext("The specified server address lies in the remote subnet.");
}
if ($_POST['localip'] == get_interface_ip("lan")) {
@@ -129,15 +157,13 @@ if ($_POST) {
$l2tpcfg['mode'] = $_POST['mode'];
$l2tpcfg['interface'] = $_POST['interface'];
$l2tpcfg['n_l2tp_units'] = $_POST['n_l2tp_units'];
-
$l2tpcfg['radius']['server'] = $_POST['radiusserver'];
- $l2tpcfg['radius']['secret'] = $_POST['radiussecret'];
- $l2tpcfg['secret'] = $_POST['secret'];
+ if ($_POST['radiussecret'] != DMYPWD) {
+ $l2tpcfg['radius']['secret'] = $_POST['radiussecret'];
+ }
- if ($_POST['wins']) {
- $l2tpcfg['wins'] = $_POST['wins'];
- } else {
- unset($l2tpcfg['wins']);
+ if ($_POST['secret'] != DMYPWD) {
+ $l2tpcfg['secret'] = $_POST['secret'];
}
$l2tpcfg['paporchap'] = $_POST['paporchap'];
@@ -190,336 +216,192 @@ if ($_POST) {
}
}
+$pgtitle = array(gettext("VPN"), gettext("L2TP"), gettext("Configuration"));
+$shortcut_section = "l2tps";
include("head.inc");
-?>
-<script type="text/javascript">
-//<![CDATA[
-function get_radio_value(obj) {
- for (i = 0; i < obj.length; i++) {
- if (obj[i].checked) {
- return obj[i].value;
- }
- }
- return null;
+if ($input_errors) {
+ print_input_errors($input_errors);
}
-function enable_change(enable_over) {
- if ((get_radio_value(document.iform.mode) == "server") || enable_over) {
- document.iform.remoteip.disabled = 0;
- document.iform.localip.disabled = 0;
- document.iform.l2tp_subnet.disabled = 0;
- document.iform.radiusenable.disabled = 0;
- document.iform.radiusissueips.disabled = 0;
- document.iform.paporchap.disabled = 0;
- document.iform.interface.disabled = 0;
- document.iform.n_l2tp_units.disabled = 0;
- document.iform.secret.disabled = 0;
- document.iform.l2tp_dns1.disabled = 0;
- document.iform.l2tp_dns2.disabled = 0;
- /* fix colors */
- document.iform.remoteip.style.backgroundColor = '#FFFFFF';
- document.iform.localip.style.backgroundColor = '#FFFFFF';
- document.iform.l2tp_subnet.style.backgroundColor = '#FFFFFF';
- document.iform.radiusenable.style.backgroundColor = '#FFFFFF';
- document.iform.radiusissueips.style.backgroundColor = '#FFFFFF';
- document.iform.paporchap.style.backgroundColor = '#FFFFFF';
- document.iform.interface.style.backgroundColor = '#FFFFFF';
- document.iform.n_l2tp_units.style.backgroundColor = '#FFFFFF';
- document.iform.secret.style.backgroundColor = '#FFFFFF';
- if (document.iform.radiusenable.checked || enable_over) {
- document.iform.radacct_enable.disabled = 0;
- document.iform.radiusserver.disabled = 0;
- document.iform.radiussecret.disabled = 0;
- document.iform.radiusissueips.disabled = 0;
- /* fix colors */
- document.iform.radacct_enable.style.backgroundColor = '#FFFFFF';
- document.iform.radiusserver.style.backgroundColor = '#FFFFFF';
- document.iform.radiussecret.style.backgroundColor = '#FFFFFF';
- document.iform.radiusissueips.style.backgroundColor = '#FFFFFF';
- } else {
- document.iform.radacct_enable.disabled = 1;
- document.iform.radiusserver.disabled = 1;
- document.iform.radiussecret.disabled = 1;
- document.iform.radiusissueips.disabled = 1;
- /* fix colors */
- document.iform.radacct_enable.style.backgroundColor = '#D4D0C8';
- document.iform.radiusserver.style.backgroundColor = '#D4D0C8';
- document.iform.radiussecret.style.backgroundColor = '#D4D0C8';
- document.iform.radiusissueips.style.backgroundColor = '#D4D0C8';
- }
- } else {
- document.iform.interface.disabled = 1;
- document.iform.n_l2tp_units.disabled = 1;
- document.iform.l2tp_subnet.disabled = 1;
- document.iform.l2tp_dns1.disabled = 1;
- document.iform.l2tp_dns2.disabled = 1;
- document.iform.paporchap.disabled = 1;
- document.iform.remoteip.disabled = 1;
- document.iform.localip.disabled = 1;
- document.iform.radiusenable.disabled = 1;
- document.iform.radacct_enable.disabled = 1;
- document.iform.radiusserver.disabled = 1;
- document.iform.radiussecret.disabled = 1;
- document.iform.radiusissueips.disabled = 1;
- document.iform.secret.disabled = 1;
- /* fix colors */
- document.iform.interface.style.backgroundColor = '#D4D0C8';
- document.iform.n_l2tp_units.style.backgroundColor = '#D4D0C8';
- document.iform.l2tp_subnet.style.backgroundColor = '#D4D0C8';
- document.iform.paporchap.style.backgroundColor = '#D4D0C8';
- document.iform.remoteip.style.backgroundColor = '#D4D0C8';
- document.iform.localip.style.backgroundColor = '#D4D0C8';
- document.iform.radiusenable.style.backgroundColor = '#D4D0C8';
- document.iform.radacct_enable.style.backgroundColor = '#D4D0C8';
- document.iform.radiusserver.style.backgroundColor = '#D4D0C8';
- document.iform.radiussecret.style.backgroundColor = '#D4D0C8';
- document.iform.radiusissueips.style.backgroundColor = '#D4D0C8';
- document.iform.secret.style.backgroundColor = '#D4D0C8';
- }
+if ($savemsg) {
+ print_info_box($savemsg);
}
-//]]>
-</script>
-
-<form class="form-horizontal" action="vpn_l2tp.php" method="post" name="iform" id="iform">
-<?php if ($input_errors) print_input_errors($input_errors)?>
-<?php if ($savemsg) print_info_box($savemsg)?>
-<?php
$tab_array = array();
-$tab_array[0] = array(gettext("Configuration"), true, "vpn_l2tp.php");
-$tab_array[1] = array(gettext("Users"), false, "vpn_l2tp_users.php");
+$tab_array[] = array(gettext("Configuration"), true, "vpn_l2tp.php");
+$tab_array[] = array(gettext("Users"), false, "vpn_l2tp_users.php");
display_top_tabs($tab_array);
-?>
- <div class="panel panel-default">
- <div class="panel-heading">
- <h2 class="panel-title"><?=gettext('Enable L2TP'); ?></h2>
- </div>
-
- <div class="panel-body">
- <div class="form-group">
- <div class="col-sm-10">
- <label>
- <input name="mode" type="radio" onclick="enable_change(false)" value="off" <?php if (($pconfig['mode'] != "server") && ($pconfig['mode'] != "redir")) echo "checked=\"checked\""?> />
- <?=gettext("Off")?>
- </label>
- <label>
- <input type="radio" name="mode" value="server" onclick="enable_change(false)" <?php if ($pconfig['mode'] == "server") echo "checked=\"checked\""?> />
- <?=gettext("Enable L2TP server")?>
- </label>
- </div>
- </div>
- </div>
- </div>
-
- <div class="panel panel-default">
- <div class="panel-heading">
- <h2 class="panel-title"><?=gettext('Configuration'); ?></h2>
- </div>
-
- <div class="panel-body">
- <div class="form-group">
- <label for="interface" class="col-sm-2 control-label"><?=gettext("Interface")?></label>
- <div class="col-sm-2">
- <select class="form-control" name="interface" class="formselect" id="interface">
-<?php
+$form = new Form(new Form_Button(
+ 'Submit',
+ gettext("Save")
+));
+
+$section = new Form_Section("Enable L2TP");
+
+$section->addInput(new Form_Checkbox(
+ 'mode',
+ 'Enable',
+ 'Enable LT2P server',
+ ($pconfig['mode'] == "server"),
+ 'server'
+));
+
+$form->add($section);
+
+$iflist = array();
$interfaces = get_configured_interface_with_descr();
-foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface?>" <?php if ($iface == $pconfig['interface']) echo "selected=\"selected\""?>>
- <?=htmlspecialchars($ifacename)?>
- </option>
-<?php endforeach?>
- </select>
- </div>
- </div>
- <div class="form-group">
- <label for="localip" class="col-sm-2 control-label"><?=gettext("Server Address")?></label>
- <div class="col-sm-10">
- <?=$mandfldhtml?><input name="localip" type="text" class="form-control formfld unknown" id="localip" size="20" value="<?=htmlspecialchars($pconfig['localip'])?>" />
-
- <span class="help-block">
- <?=gettext("Enter the IP address the L2TP server should give to clients for use as their \"gateway\"")?>.
- <br />
- <?=gettext("Typically this is set to an unused IP just outside of the client range")?>.
- <br />
- <br />
- <?=gettext("NOTE: This should NOT be set to any IP address currently in use on this firewall")?>.
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="remoteip" class="col-sm-2 control-label"><?=gettext("Remote Address Range")?></label>
- <div class="col-sm-10">
- <?=$mandfldhtml?><input name="remoteip" type="text" class="form-control formfld unknown" id="remoteip" size="20" value="<?=htmlspecialchars($pconfig['remoteip'])?>" />
- <span class="help-block">
- <?=gettext("Specify the starting address for the client IP address subnet.")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="l2tp_subnet" class="col-sm-2 control-label"><?=gettext("Subnet Mask")?></label>
- <div class="col-sm-2">
- <select id="l2tp_subnet" name="l2tp_subnet" class="form-control">
-<?php
- for($x=0; $x<33; $x++) {
- if($x == $pconfig['l2tp_subnet'])
- $SELECTED = " selected=\"selected\"";
- else
- $SELECTED = "";
- echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
- }
-?>
- </select>
- <span class="help-block">
- <?=gettext("Hint:")?> 24 <?=gettext("is")?> 255.255.255.0
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="n_l2tp_units" class="col-sm-2 control-label"><?=gettext("Number of L2TP users")?></label>
- <div class="col-sm-2">
- <select id="n_l2tp_units" name="n_l2tp_units" class="form-control">
-<?php
- for($x=0; $x<255; $x++) {
- if($x == $pconfig['n_l2tp_units'])
- $SELECTED = " selected=\"selected\"";
- else
- $SELECTED = "";
- echo "<option value=\"{$x}\"{$SELECTED}>{$x}</option>\n";
- }
-?>
- </select>
- <span class="help-block">
- <?=gettext("Hint:")?> 10 <?=gettext("is ten L2TP clients")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="secret" class="col-sm-2 control-label"><?=gettext("Secret")?></label>
- <div class="col-sm-10">
- <input type="password" name="secret" id="secret" class="formfld pwd form-control" value="<?=htmlspecialchars($pconfig['secret'])?>" />
- <span class="help-block">
- <?=gettext("Specify optional secret shared between peers. Required on some devices/setups.")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="paporchap" class="col-sm-2 control-label"><?=gettext("Authentication Type")?></label>
- <div class="col-sm-2">
- <?=$mandfldhtml?><select name="paporchap" id="paporchap" class="form-control">
- <option value='chap'<?php if($pconfig['paporchap'] == "chap") echo " selected=\"selected\""?>><?=gettext("CHAP")?></option>
- <option value='pap'<?php if($pconfig['paporchap'] == "pap") echo " selected=\"selected\""?>><?=gettext("PAP")?></option>
- </select>
- <span class="help-block">
- <?=gettext("Specifies which protocol to use for authentication.")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="l2tp_dns1" class="col-sm-2 control-label"><?=gettext("L2TP DNS Servers")?></label>
- <div class="col-sm-10">
- <?=$mandfldhtml?><input name="l2tp_dns1" type="text" class="formfld unknown form-control" id="l2tp_dns1" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns1'])?>" />
- <input name="l2tp_dns2" type="text" class="formfld unknown form-control" id="l2tp_dns2" size="20" value="<?=htmlspecialchars($pconfig['l2tp_dns2'])?>" />
- <span class="help-block">
- <?=gettext("primary and secondary DNS servers assigned to L2TP clients")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="wins" class="col-sm-2 control-label"><?=gettext("WINS Server")?></label>
- <div class="col-sm-10">
- <input name="wins" class="formfld unknown form-control" id="wins" size="20" value="<?=htmlspecialchars($pconfig['wins'])?>" />
- </div>
- </div>
- </div>
- </div>
-
- <div class="panel panel-default">
- <div class="panel-heading">
- <h2 class="panel-title"><?=gettext('RADIUS'); ?></h2>
- </div>
-
- <div class="panel-body">
- <div class="form-group">
- <label for="radiusenable" class="col-sm-2 control-label"><?=gettext('RADIUS Authentication')?></label>
- <div class="col-sm-10 checkbox">
- <label>
- <input name="radiusenable" type="checkbox" id="radiusenable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radiusenable']) echo "checked=\"checked\""?> />
- <?=gettext("Use a RADIUS server for authentication")?>
- </label>
- <span class="help-block">
- <?=gettext("When set, all users will be authenticated using the RADIUS server specified below. The local user database will not be used.")?>
- </span>
- </div>
- </div>
- <div class="form-group">
- <label for="radacct_enable" class="col-sm-2 control-label"><?=gettext('RADIUS Accounting')?></label>
- <div class="col-sm-10 checkbox">
- <label>
- <input name="radacct_enable" type="checkbox" id="radacct_enable" onclick="enable_change(false)" value="yes" <?php if ($pconfig['radacct_enable']) echo "checked=\"checked\""?> />
- <?=gettext("Enable RADIUS accounting")?>
- </label>
- <span class="help-block">
- <?=gettext("Sends accounting packets to the RADIUS server.")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="radiusserver" class="col-sm-2 control-label"><?=gettext("RADIUS Server")?></label>
- <div class="col-sm-10">
- <input name="radiusserver" type="text" class="formfld unknown form-control" id="radiusserver" size="20" value="<?=htmlspecialchars($pconfig['radiusserver'])?>" />
- <span class="help-block">
- <?=gettext("Enter the IP address of the RADIUS server.")?>
- </span>
- </div>
- </div>
- <div class="form-group">
- <label for="radiussecret" class="col-sm-2 control-label"><?=gettext("RADIUS Shared Secret")?></label>
- <div class="col-sm-10">
- <input name="radiussecret" type="password" class="formfld pwd form-control" id="radiussecret" size="20" value="<?=htmlspecialchars($pconfig['radiussecret'])?>" />
- <span class="help-block">
- <?=gettext("Enter the shared secret that will be used to authenticate to the RADIUS server.")?>
- </span>
- </div>
- </div>
-
- <div class="form-group">
- <label for="radiusissueips" class="col-sm-2 control-label"><?=gettext("RADIUS Issued IPs")?></label>
- <div class="col-sm-10 checkbox">
- <label>
- <input name="radiusissueips" value="yes" type="checkbox" class="formfld" id="radiusissueips"<?php if(isset($pconfig['radiusissueips'])) echo " checked=\"checked\""?> />
- <?=gettext("Issue IP Addresses via RADIUS server.")?>
- </label>
- </div>
- </div>
- </div>
- </div>
+foreach ($interfaces as $iface => $ifacename) {
+ $iflist[$iface] = $ifacename;
+}
-<?php
- // TODO: Is it possible to detect available rules and only show warning if there are no (relevant) rules set?
+$section = new Form_Section("Configuration");
+$section->addClass('toggle-l2tp-enable');
+
+$section->addInput(new Form_Select(
+ 'interface',
+ 'Interface',
+ $pconfig['interface'],
+ $iflist
+));
+
+$section->addInput(new Form_Input(
+ 'localip',
+ 'Server address',
+ 'text',
+ $pconfig['localip']
+))->setHelp('Enter the IP address the L2TP server should give to clients for use as their "gateway". ' . '<br />' .
+ 'Typically this is set to an unused IP just outside of the client range.' . '<br /><br />' .
+ 'NOTE: This should NOT be set to any IP address currently in use on this firewall.');
+
+$section->addInput(new Form_IpAddress(
+ 'remoteip',
+ 'Remote address range',
+ $pconfig['remoteip']
+))->addMask(l2tp_subnet, $pconfig['l2tp_subnet'])
+ ->setHelp('Specify the starting address for the client IP address subnet.');
+
+$section->addInput(new Form_Input(
+ 'n_l2tp_units',
+ 'Number of L2TP users',
+ 'number',
+ $pconfig['n_l2tp_units'],
+ ['min' => 0, 'max' => 255]
+));
+
+$section->addPassword(new Form_Input(
+ 'secret',
+ 'Secret',
+ 'password',
+ $pconfig['secret']
+))->setHelp('Specify optional secret shared between peers. Required on some devices/setups.');
+
+$section->addInput(new Form_Select(
+ 'paporchap',
+ 'Authentication type',
+ $pconfig['paporchap'],
+ array(
+ 'chap' => 'CHAP',
+ 'chap-msv2' => 'MS-CHAPv2',
+ 'pap' => 'PAP'
+ )
+))->setHelp('Specifies the protocol to use for authentication.');
+
+$section->addInput(new Form_Input(
+ 'l2tp_dns1',
+ 'Primary L2TM DNS server',
+ 'text',
+ $pconfig['l2tp_dns1']
+));
+
+$section->addInput(new Form_Input(
+ 'l2tp_dns2',
+ 'Secondary L2TM DNS server',
+ 'text',
+ $pconfig['l2tp_dns2']
+));
+
+$form->add($section);
+
+$section = new Form_Section("RADIUS");
+$section->addClass('toggle-l2tp-enable');
+
+$section->addInput(new Form_Checkbox(
+ 'radiusenable',
+ 'Enable',
+ 'Use a RADIUS server for authentication',
+ $pconfig['radiusenable']
+))->setHelp('When set, all users will be authenticated using the RADIUS server specified below. The local user database will not be used.');
+
+$section->addInput(new Form_Checkbox(
+ 'radacct_enable',
+ 'Accounting',
+ 'Enable RADIUS accounting',
+ $pconfig['radacct_enable']
+))->setHelp('Sends accounting packets to the RADIUS server.');
+
+$section->addInput(new Form_IpAddress(
+ 'radiusserver',
+ 'Server',
+ $pconfig['radiusserver']
+))->setHelp('Enter the IP address of the RADIUS server.');
+
+$section->addPassword(new Form_Input(
+ 'radiussecret',
+ 'Secret',
+ 'password',
+ $pconfig['radiussecret']
+))->setHelp('Enter the shared secret that will be used to authenticate to the RADIUS server.');
+
+$section->addInput(new Form_Checkbox(
+ 'radiusissueips',
+ 'RADIUS issued IPs',
+ 'Issue IP Addresses via RADIUS server.',
+ $pconfig['radiusissueips']
+));
+
+$form->add($section);
+
+print($form);
+
+print_info_box(gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients!"), info);
?>
- <div class="alert alert-danger">
- <strong><?=gettext("Note:")?></strong> <?=gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients!")?>
- </div>
-
- <div class="col-sm-10 col-sm-offset-2">
- <input id="submit" name="Submit" type="submit" class="btn btn-primary" value="<?=gettext("Save")?>" onclick="enable_change(true)" />
- </div>
-</form>
<script type="text/javascript">
//<![CDATA[
- enable_change(false);
+events.push(function() {
+
+ function setL2TP () {
+ hide = ! $('#mode').prop('checked');
+
+ hideClass('toggle-l2tp-enable', hide);
+ }
+
+ function setRADIUS () {
+ hide = ! $('#radiusenable').prop('checked');
+
+ hideCheckbox('radacct_enable', hide);
+ hideInput('radiusserver', hide);
+ hideInput('radiussecret', hide);
+ hideCheckbox('radiusissueips', hide);
+ }
+
+ // on-click
+ $('#mode').click(function () {
+ setL2TP();
+ });
+
+ $('#radiusenable').click(function () {
+ setRADIUS();
+ });
+
+ // on-page-load
+ setRADIUS();
+ setL2TP();
+
+});
//]]>
</script>
-<?php include("foot.inc")?> \ No newline at end of file
+<?php include("foot.inc")?>
diff --git a/src/usr/local/www/vpn_l2tp_users.php b/src/usr/local/www/vpn_l2tp_users.php
index 3ec4408..101889a 100644
--- a/src/usr/local/www/vpn_l2tp_users.php
+++ b/src/usr/local/www/vpn_l2tp_users.php
@@ -1,38 +1,62 @@
<?php
/*
vpn_l2tp_users.php
- part of pfSense
-
- Copyright (C) 2005 Scott Ullrich (sullrich@gmail.com)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-vpnl2tp-users
-##|*NAME=VPN: VPN L2TP : Users page
-##|*DESCR=Allow access to the 'VPN: VPN L2TP : Users' page.
+##|*NAME=VPN: L2TP: Users
+##|*DESCR=Allow access to the 'VPN: L2TP: Users' page.
##|*MATCH=vpn_l2tp_users.php*
##|-PRIV
@@ -76,20 +100,24 @@ if ($_GET['act'] == "del") {
}
include("head.inc");
-?>
-<?php if ($savemsg) print_info_box($savemsg)?>
-<?php if (isset($config['l2tp']['radius']['enable']))
- print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used."))?>
-<?php if (is_subsystem_dirty('l2tpusers')):?><br/>
-<?php print_info_box_np(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>")?><br />
-<?php endif?>
+if ($savemsg) {
+ print_info_box($savemsg, success);
+}
-<?php
- $tab_array = array();
- $tab_array[0] = array(gettext("Configuration"), false, "vpn_l2tp.php");
- $tab_array[1] = array(gettext("Users"), true, "vpn_l2tp_users.php");
- display_top_tabs($tab_array);
+if (isset($config['l2tp']['radius']['enable'])) {
+ print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used."));
+}
+
+if (is_subsystem_dirty('l2tpusers')) {
+ print_info_box_np(gettext("The l2tp user list has been modified") . ".<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>");
+}
+
+
+$tab_array = array();
+$tab_array[] = array(gettext("Configuration"), false, "vpn_l2tp.php");
+$tab_array[] = array(gettext("Users"), true, "vpn_l2tp_users.php");
+display_top_tabs($tab_array);
?>
<div class="table-responsive">
<table class="table table-striped table-hover">
@@ -97,7 +125,7 @@ include("head.inc");
<tr>
<th><?=gettext("Username")?></th>
<th><?=gettext("IP address")?></th>
- <th></th>
+ <th><?=gettext("Actions")?></th>
</tr>
</thead>
<tbody>
@@ -107,12 +135,12 @@ include("head.inc");
<?=htmlspecialchars($secretent['name'])?>
</td>
<td>
- <?php if($secretent['ip'] == "") $secretent['ip'] = "Dynamic"?>
+ <?php if ($secretent['ip'] == "") $secretent['ip'] = "Dynamic"?>
<?=htmlspecialchars($secretent['ip'])?>&nbsp;
</td>
<td>
- <a class="btn btn-xs btn-primary" href="vpn_l2tp_users_edit.php?id=<?=$i?>"><?= gettext('edit') ?></a>
- <a class="btn btn-xs btn-danger" href="vpn_l2tp_users.php?act=del&amp;id=<?=$i?>"><?=gettext("delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit user')?>" href="vpn_l2tp_users_edit.php?id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete user')?>" href="vpn_l2tp_users.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php $i++; endforeach?>
@@ -121,8 +149,10 @@ include("head.inc");
</div>
<nav class="action-buttons">
- <a class="btn btn-success" href="vpn_l2tp_users_edit.php"><?=gettext("add user")?></a>
+ <a class="btn btn-success btn-sm" href="vpn_l2tp_users_edit.php">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
+ </a>
</nav>
-
-<?php include("foot.inc")?>
+<?php include("foot.inc");
diff --git a/src/usr/local/www/vpn_l2tp_users_edit.php b/src/usr/local/www/vpn_l2tp_users_edit.php
index c6ee99b..a0caea6 100644
--- a/src/usr/local/www/vpn_l2tp_users_edit.php
+++ b/src/usr/local/www/vpn_l2tp_users_edit.php
@@ -1,38 +1,62 @@
<?php
/*
vpn_l2tp_users_edit.php
- part of pfSense
-
- Copyright (C) 2006 Scott Ullrich (sullrich@gmail.com)
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-vpn-vpnl2tp-users-edit
-##|*NAME=VPN: VPN L2TP : Users : Edit page
-##|*DESCR=Allow access to the 'VPN: VPN L2TP : Users : Edit' page.
+##|*NAME=VPN: L2TP: Users: Edit
+##|*DESCR=Allow access to the 'VPN: L2TP: Users: Edit' page.
##|*MATCH=vpn_l2tp_users_edit.php*
##|-PRIV
@@ -97,7 +121,7 @@ if ($_POST) {
$input_errors[] = gettext("The password contains invalid characters.");
}
- if (($_POST['passwordfld']) && ($_POST['passwordfld'] != $_POST['passwordfld2'])) {
+ if (($_POST['passwordfld']) && ($_POST['passwordfld'] != $_POST['passwordfld_confirm'])) {
$input_errors[] = gettext("The passwords do not match.");
}
if (($_POST['ip'] && !is_ipaddr($_POST['ip']))) {
@@ -129,7 +153,7 @@ if ($_POST) {
$secretent['name'] = $_POST['usernamefld'];
$secretent['ip'] = $_POST['ip'];
- if ($_POST['passwordfld']) {
+ if ($_POST['passwordfld'] && ($_POST['passwordfld'] != DMYPWD)) {
$secretent['password'] = $_POST['passwordfld'];
}
@@ -151,59 +175,52 @@ if ($_POST) {
}
include("head.inc");
-?>
-<?php
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
-?>
-
-<form class="form-horizontal" action="vpn_l2tp_users_edit.php" method="post" name="iform" id="iform">
- <div class="panel panel-default">
- <div class="panel-heading">
- <h2 class="panel-title"><?=gettext('User'); ?></h2>
- </div>
-
- <div class="panel-body">
- <div class="form-group">
- <label for="usernamefld" class="col-sm-2 control-label"><?=gettext("Username")?></label>
- <div class="col-sm-10">
- <?=$mandfldhtml?><input name="usernamefld" type="text" class="formfld user form-control" id="usernamefld" size="20" value="<?=htmlspecialchars($pconfig['usernamefld'])?>" />
- </div>
- </div>
- <div class="form-group">
- <label for="passwordfld" class="col-sm-2 control-label"><?=gettext("Password")?></label>
- <div class="col-sm-10">
- <?=$mandfldhtml?><input name="passwordfld" type="password" class="formfld pwd form-control" id="passwordfld" size="20" />
- </div>
- </div>
- <div class="form-group">
- <label for="passwordfld2" class="col-sm-2 control-label"><?=gettext('Confirm')?></label>
- <div class="col-sm-10">
- <?=$mandfldhtml?><input name="passwordfld2" type="password" class="formfld pwd form-control" id="passwordfld2" size="20" />
-<?php if (isset($id) && $a_secret[$id]):?>
- <span class="help-block"><?=gettext("If you want to change the users password, enter it here twice.")?></span>
-<?php endif?>
- </div>
- </div>
- <div class="form-group">
- <label for="ip" class="col-sm-2 control-label"><?=gettext("IP address")?></label>
- <div class="col-sm-10">
- <input name="ip" type="text" class="formfld unknown form-control" id="ip" size="20" value="<?=htmlspecialchars($pconfig['ip'])?>" />
- <span class="help-block"><?=gettext("If you want the user to be assigned a specific IP address, enter it here.")?></span>
- </div>
- </div>
- </div>
- </div>
-
- <div class="col-sm-10 col-sm-offset-2">
- <input id="submit" name="Submit" type="submit" class="formbtn btn btn-primary" value="<?=gettext('Save')?>" />
- </div>
-
-<?php if (isset($id) && $a_secret[$id]):?>
- <input name="id" type="hidden" value="<?=htmlspecialchars($id)?>" />
-<?php endif?>
-</form>
+}
+
+$form = new Form();
+
+$section = new Form_Section("User");
+
+$section->addInput(new Form_Input(
+ 'usernamefld',
+ 'Username',
+ 'text',
+ $pconfig['usernamefld']
+));
+
+$pwd = new Form_Input(
+ 'passwordfld',
+ 'Password',
+ 'text',
+ $pconfig['passwordfld']
+);
+
+if (isset($id) && $a_secret[$id]) {
+ $pwd->setHelp('If you want to change the users password, enter it here.');
+}
+
+$section->addPassword($pwd);
+
+$section->addInput(new Form_IpAddress(
+ 'ip',
+ 'IP Address',
+ $pconfig['ip']
+))->setHelp('If you want the user to be assigned a specific IP address, enter it here.');
+
+$form->add($section);
+
+if (isset($id) && $a_secret[$id]) {
+ $form->addGlobal(new Form_Input(
+ 'id',
+ null,
+ 'hidden',
+ $i
+ ));
+}
+
+print($form);
-<?php
include("foot.inc");
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php
index a04d5ce..5763585 100644
--- a/src/usr/local/www/vpn_openvpn_client.php
+++ b/src/usr/local/www/vpn_openvpn_client.php
@@ -1,36 +1,62 @@
<?php
/*
vpn_openvpn_client.php
-
- Copyright (C) 2008 Shrew Soft Inc.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-openvpn-client
-##|*NAME=OpenVPN: Client page
+##|*NAME=OpenVPN: Client
##|*DESCR=Allow access to the 'OpenVPN: Client' page.
##|*MATCH=vpn_openvpn_client.php*
##|-PRIV
@@ -39,7 +65,7 @@ require("guiconfig.inc");
require_once("openvpn.inc");
require_once("pkg-utils.inc");
-$pgtitle = array(gettext("OpenVPN"), gettext("Client"));
+$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Client"));
$shortcut_section = "openvpn";
if (!is_array($config['openvpn']['openvpn-client'])) {
@@ -241,6 +267,10 @@ if ($_POST) {
if (empty($pconfig['proxy_user']) || empty($pconfig['proxy_passwd'])) {
$input_errors[] = gettext("User name and password are required for proxy with authentication.");
}
+
+ if ($pconfig['proxy_passwd'] != $pconfig['proxy_passwd_confirm']) {
+ $input_errors[] = gettext("Password and confirmation must match.");
+ }
}
}
@@ -274,14 +304,14 @@ if ($_POST) {
if (!$tls_mode && !$pconfig['autokey_enable']) {
if (!strstr($pconfig['shared_key'], "-----BEGIN OpenVPN Static key V1-----") ||
- !strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----")) {
+ !strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----")) {
$input_errors[] = gettext("The field 'Shared Key' does not appear to be valid");
}
}
if ($tls_mode && $pconfig['tlsauth_enable'] && !$pconfig['autotls_enable']) {
if (!strstr($pconfig['tls'], "-----BEGIN OpenVPN Static key V1-----") ||
- !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) {
+ !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) {
$input_errors[] = gettext("The field 'TLS Authentication Key' does not appear to be valid");
}
}
@@ -302,12 +332,20 @@ if ($_POST) {
$input_errors[] = gettext("If no Client Certificate is selected, a username and/or password must be entered.");
}
+ if ($pconfig['auth_pass'] != $pconfig['auth_pass_confirm']) {
+ $input_errors[] = gettext("Password and confirmation must match.");
+ }
+
if (!$input_errors) {
$client = array();
foreach ($simplefields as $stat) {
- update_if_changed($stat, $client[$stat], $_POST[$stat]);
+ if (($stat == 'auth_pass') && ($_POST[$stat] == DMYPWD)) {
+ $client[$stat] = $a_client[$id]['auth_pass'];
+ } else {
+ update_if_changed($stat, $client[$stat], $_POST[$stat]);
+ }
}
if ($vpnid) {
@@ -330,7 +368,9 @@ if ($_POST) {
$client['proxy_port'] = $pconfig['proxy_port'];
$client['proxy_authtype'] = $pconfig['proxy_authtype'];
$client['proxy_user'] = $pconfig['proxy_user'];
- $client['proxy_passwd'] = $pconfig['proxy_passwd'];
+ if ($pconfig['proxy_passwd'] != DMYPWD) {
+ $client['proxy_passwd'] = $pconfig['proxy_passwd'];
+ }
$client['description'] = $pconfig['description'];
$client['mode'] = $pconfig['mode'];
$client['custom_options'] = str_replace("\r\n", "\n", $pconfig['custom_options']);
@@ -380,80 +420,17 @@ if ($_POST) {
include("head.inc");
-function build_if_list() {
- $list = array();
-
- $interfaces = get_configured_interface_with_descr();
- $carplist = get_configured_carp_interface_list();
-
- foreach ($carplist as $cif => $carpip)
- $interfaces[$cif.'|'.$carpip] = $carpip." (".get_vip_descr($carpip).")";
-
- $aliaslist = get_configured_ip_aliases_list();
-
- foreach ($aliaslist as $aliasip => $aliasif)
- $interfaces[$aliasif.'|'.$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
-
- $grouplist = return_gateway_groups_array();
-
- foreach ($grouplist as $name => $group) {
- if($group['ipprotocol'] != inet)
- continue;
-
- if($group[0]['vip'] != "")
- $vipif = $group[0]['vip'];
- else
- $vipif = $group[0]['int'];
-
- $interfaces[$name] = "GW Group {$name}";
- }
-
- $interfaces['lo0'] = "Localhost";
- $interfaces['any'] = "any";
-
- foreach ($interfaces as $iface => $ifacename)
- $list[$iface] = $ifacename;
-
- return($list);
-}
-
-function build_cert_list() {
- global $a_cert;
-
- $list = array('' => 'None (Username and/or Password required)');
-
- foreach ($a_cert as $cert) {
- $caname = "";
- $inuse = "";
- $revoked = "";
- $ca = lookup_ca($cert['caref']);
-
- if ($ca)
- $caname = " (CA: {$ca['descr']})";
-
- if ($pconfig['certref'] == $cert['refid'])
- $selected = "selected=\"selected\"";
-
- if (cert_in_use($cert['refid']))
- $inuse = " *In Use";
-
- if (is_cert_revoked($cert))
- $revoked = " *Revoked";
-
- $list[$cert['refid']] = $cert['descr'] . $caname . $inuse . $revoked;
- }
-
- return($list);
-}
-
-if (!$savemsg)
+if (!$savemsg) {
$savemsg = "";
+}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
@@ -463,17 +440,15 @@ $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.x
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
-if($act=="new" || $act=="edit") :
- require_once('classes/Form.class.php');
-
+if ($act=="new" || $act=="edit"):
$form = new Form();
$section = new Form_Section('General Information');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'disable',
'Disabled',
- 'Disable this server',
+ 'Disable this client',
$pconfig['disable']
))->setHelp('Set this option to disable this client without removing it from the list');
@@ -502,7 +477,7 @@ if($act=="new" || $act=="edit") :
'interface',
'Interface',
$pconfig['interface'],
- build_if_list()
+ openvpn_build_if_list()
));
$section->addInput(new Form_Input(
@@ -547,14 +522,14 @@ if($act=="new" || $act=="edit") :
$pconfig['proxy_user']
));
- $section->addInput(new Form_Input(
+ $section->addPassword(new Form_Input(
'proxy_passwd',
'Password',
'password',
$pconfig['proxy_passwd']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'resolve_retry',
'Server hostname resolution',
'Infinitely resolve server ',
@@ -580,18 +555,18 @@ if($act=="new" || $act=="edit") :
$pconfig['auth_user']
))->setHelp('Leave empty when no user name is needed');
- $section->addInput(new Form_Input(
- 'auth_passwd',
+ $section->addPassword(new Form_Input(
+ 'auth_pass',
'Password',
'password',
- $pconfig['auth_passwd']
+ $pconfig['auth_pass']
))->setHelp('Leave empty when no password is needed');
$form->add($section);
$section = new Form_Section('Cryptographic settings');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'tlsauth_enable',
'TLS authentication',
'Enable authentication of TLS packets.',
@@ -599,7 +574,7 @@ if($act=="new" || $act=="edit") :
));
if (!$pconfig['tls']) {
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'autotls_enable',
null,
'Automatically generate a shared TLS authentication key.',
@@ -607,7 +582,7 @@ if($act=="new" || $act=="edit") :
));
}
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'tls',
'Key',
$pconfig['tls']
@@ -615,8 +590,9 @@ if($act=="new" || $act=="edit") :
if (count($a_ca)) {
$list = array();
- foreach ($a_ca as $ca)
+ foreach ($a_ca as $ca) {
$list[$ca['refid']] = $ca['descr'];
+ }
$section->addInput(new Form_Select(
'caref',
@@ -636,33 +612,35 @@ if($act=="new" || $act=="edit") :
'crlref',
'Peer Certificate Revocation list',
$pconfig['crlref'],
- build_crl_list()
+ openvpn_build_crl_list()
));
} else {
$section->addInput(new Form_StaticText(
'Peer Certificate Revocation list',
- sprintf('No Certificate Revocation Lists defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>')
+ sprintf('No Certificate Revocation Lists defined. You may create one here: %s', '<a href="system_crlmanager.php">System &gt; Cert Manager &gt; Certificate Revocation</a>')
));
}
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'autokey_enable',
'Auto generate',
'Automatically generate a shared key',
$pconfig['autokey_enable'] && empty($pconfig['shared_key'])
));
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'shared_key',
'Shared Key',
$pconfig['shared_key']
))->setHelp('Paste your shared key here');
+ $cl = openvpn_build_cert_list(true);
+
$section->addInput(new Form_Select(
'certref',
'Client Certificate',
$pconfig['certref'],
- build_cert_list()
+ $cl['server']
));
$section->addInput(new Form_Select(
@@ -741,28 +719,28 @@ $section->addInput(new Form_Input(
$openvpn_compression_modes
))->setHelp('Compress tunnel packets using the LZO algorithm. Adaptive compression will dynamically disable compression for a period of time if OpenVPN detects that the data in the packets is not being compressed efficiently.');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'passtos',
'Type-of-Service',
'Set the TOS IP header value of tunnel packets to match the encapsulated packet value.',
$pconfig['passtos']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'no_tun_ipv6',
'Disable IPv6',
'Don\'t forward IPv6 traffic. ',
$pconfig['no_tun_ipv6']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'route_no_pull',
'Don\'t pull routes',
'Bars the server from adding routes to the client\'s routing table',
$pconfig['route_no_pull']
))->setHelp('This option still allows the server to set the TCP/IP properties of the client\'s TUN/TAP interface. ');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'route_no_exec',
'Don\'t add/remove routes',
'Don\'t add or remove routes automatically',
@@ -774,7 +752,7 @@ $section->addInput(new Form_Input(
$section = new Form_Section('Advanced Configuration');
$section->addClass('advanced');
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'custom_options',
'Custom options',
$pconfig['custom_options']
@@ -815,7 +793,7 @@ else:
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('OpenVPN Clients')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Protocol")?></th>
@@ -828,7 +806,7 @@ else:
<tbody>
<?php
$i = 0;
- foreach($a_client as $client):
+ foreach ($a_client as $client):
$server = "{$client['server_addr']}:{$client['server_port']}";
?>
<tr <?=isset($server['disable']) ? 'class="disabled"':''?>>
@@ -842,8 +820,8 @@ else:
<?=htmlspecialchars($client['description'])?>
</td>
<td>
- <a href="vpn_openvpn_client.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext("Edit")?></a>
- <a href="vpn_openvpn_client.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit client')?>" href="vpn_openvpn_client.php?act=edit&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete client')?>" href="vpn_openvpn_client.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -857,7 +835,8 @@ else:
<nav class="action-buttons">
<a href="vpn_openvpn_client.php?act=new" class="btn btn-sm btn-success">
- <?=gettext("Add client")?>
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
</a>
</nav>
@@ -866,15 +845,15 @@ endif;
// Note:
// The following *_change() functions were converted from Javascript/DOM to JQuery but otherwise
-// mostly left unchanged. The logic on this form is complex andthis works!
+// mostly left unchanged. The logic on this form is complex and this works!
?>
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function mode_change() {
- switch($('#mode').val()) {
+ switch ($('#mode').val()) {
case "p2p_tls":
hideCheckbox('tlsauth_enable', false);
hideInput('caref', false);
diff --git a/src/usr/local/www/vpn_openvpn_csc.php b/src/usr/local/www/vpn_openvpn_csc.php
index 09b03cc..0dddf20 100644
--- a/src/usr/local/www/vpn_openvpn_csc.php
+++ b/src/usr/local/www/vpn_openvpn_csc.php
@@ -1,36 +1,62 @@
<?php
/*
vpn_openvpn_csc.php
-
- Copyright (C) 2008 Shrew Soft Inc.
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2008 Shrew Soft Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-openvpn-csc
-##|*NAME=OpenVPN: Client Specific Override page
+##|*NAME=OpenVPN: Client Specific Override
##|*DESCR=Allow access to the 'OpenVPN: Client Specific Override' page.
##|*MATCH=vpn_openvpn_csc.php*
##|-PRIV
@@ -39,7 +65,9 @@ require("guiconfig.inc");
require_once("openvpn.inc");
require_once("pkg-utils.inc");
-$pgtitle = array(gettext("OpenVPN"), gettext("Client Specific Override"));
+global $openvpn_tls_server_modes;
+
+$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Client Specific Overrides"));
$shortcut_section = "openvpn";
if (!is_array($config['openvpn']['openvpn-csc'])) {
@@ -75,6 +103,7 @@ if ($_GET['act'] == "del") {
if ($_GET['act'] == "edit") {
if (isset($id) && $a_csc[$id]) {
+ $pconfig['server_list'] = explode(",", $a_csc[$id]['server_list']);
$pconfig['custom_options'] = $a_csc[$id]['custom_options'];
$pconfig['disable'] = isset($a_csc[$id]['disable']);
$pconfig['common_name'] = $a_csc[$id]['common_name'];
@@ -214,6 +243,7 @@ if ($_POST) {
if (!$input_errors) {
$csc = array();
+ $csc['server_list'] = implode(",", $pconfig['server_list']);
$csc['custom_options'] = $pconfig['custom_options'];
if ($_POST['disable'] == "yes") {
$csc['disable'] = true;
@@ -261,14 +291,14 @@ if ($_POST) {
}
if (isset($id) && $a_csc[$id]) {
- $old_csc_cn = $a_csc[$id]['common_name'];
+ $old_csc = $a_csc[$id];
$a_csc[$id] = $csc;
} else {
$a_csc[] = $csc;
}
- if (!empty($old_csc_cn)) {
- openvpn_cleanup_csc($old_csc_cn);
+ if (!empty($old_csc['common_name'])) {
+ openvpn_delete_csc($old_csc);
}
openvpn_resync_csc($csc);
write_config();
@@ -280,11 +310,13 @@ if ($_POST) {
include("head.inc");
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php");
@@ -294,13 +326,29 @@ $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.x
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
-if($act=="new" || $act=="edit"):
- require_once('classes/Form.class.php');
-
+if ($act == "new" || $act == "edit"):
$form = new Form();
$section = new Form_Section('General Information');
+ $serveroptionlist = array();
+ if (is_array($config['openvpn']['openvpn-server'])) {
+ foreach ($config['openvpn']['openvpn-server'] as $serversettings) {
+ if (in_array($serversettings['mode'], $openvpn_tls_server_modes)) {
+ $serveroptionlist[$serversettings['vpnid']] = "OpenVPN Server {$serversettings['vpnid']}: {$serversettings['description']}";
+ }
+ }
+ }
+
+ $section->addInput(new Form_Select(
+ 'server_list',
+ 'Server List',
+ $pconfig['server_list'],
+ $serveroptionlist,
+ true
+ ))->setHelp('Select the servers for which the override will apply. Selecting no servers will also apply the override to all servers.');
+
+
$section->addInput(new Form_Checkbox(
'disable',
'Disable',
@@ -533,7 +581,7 @@ if($act=="new" || $act=="edit"):
$section->add($group);
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'custom_options',
'Advanced',
$pconfig['custom_options']
@@ -562,13 +610,13 @@ if($act=="new" || $act=="edit"):
?>
-<script>
+<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
// Hide/show that section, but have to also respect the wins_server_enable checkbox
function setNetbios() {
- if($('#netbios_enable').prop('checked')) {
+ if ($('#netbios_enable').prop('checked')) {
hideInput('netbios_ntype', false);
hideInput('netbios_scope', false);
hideCheckbox('wins_server_enable', false);
@@ -623,7 +671,7 @@ else : // Not an 'add' or an 'edit'. Just the table of Override CSCs
<tbody>
<?php
$i = 0;
- foreach($a_csc as $csc):
+ foreach ($a_csc as $csc):
$disabled = isset($csc['disable']) ? "Yes":"No";
?>
<tr>
@@ -637,8 +685,8 @@ else : // Not an 'add' or an 'edit'. Just the table of Override CSCs
<?=htmlspecialchars($csc['description'])?>
</td>
<td>
- <a href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i?>" class="btn btn-info btn-xs"><?=gettext('Edit')?></a>
- <a href="vpn_openvpn_csc.php?act=del&amp;id=<?=$i?>" class="btn btn-danger btn-xs"><?=gettext('Delete')?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit CSC Override')?>" href="vpn_openvpn_csc.php?act=edit&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete CSC Override')?>" href="vpn_openvpn_csc.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -647,14 +695,16 @@ else : // Not an 'add' or an 'edit'. Just the table of Override CSCs
?>
</tbody>
</table>
-
- <nav class="action-buttons">
- <a href="vpn_openvpn_csc.php?act=new" class="btn btn-success btn-sm"><?=gettext('Add CSC')?></a>
- </nav>
-
</div>
</div>
+<nav class="action-buttons">
+ <a href="vpn_openvpn_csc.php?act=new" class="btn btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext('Add')?>
+ </a>
+</nav>
+
<?php
endif;
-include("foot.inc"); \ No newline at end of file
+include("foot.inc");
diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php
index b43bb8a..a2d5d46 100644
--- a/src/usr/local/www/vpn_openvpn_server.php
+++ b/src/usr/local/www/vpn_openvpn_server.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2008 Shrew Soft Inc
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -57,7 +56,7 @@
##|+PRIV
##|*IDENT=page-openvpn-server
-##|*NAME=OpenVPN: Server page
+##|*NAME=OpenVPN: Server
##|*DESCR=Allow access to the 'OpenVPN: Server' page.
##|*MATCH=vpn_openvpn_server.php*
##|-PRIV
@@ -66,6 +65,8 @@ require("guiconfig.inc");
require_once("openvpn.inc");
require_once("pkg-utils.inc");
+global $openvpn_topologies;
+
if (!is_array($config['openvpn']['openvpn-server'])) {
$config['openvpn']['openvpn-server'] = array();
}
@@ -202,7 +203,7 @@ if ($_GET['act'] == "edit") {
$pconfig['dynamic_ip'] = $a_server[$id]['dynamic_ip'];
$pconfig['pool_enable'] = $a_server[$id]['pool_enable'];
- $pconfig['topology_subnet'] = $a_server[$id]['topology_subnet'];
+ $pconfig['topology'] = $a_server[$id]['topology'];
$pconfig['serverbridge_dhcp'] = $a_server[$id]['serverbridge_dhcp'];
$pconfig['serverbridge_interface'] = $a_server[$id]['serverbridge_interface'];
@@ -220,9 +221,9 @@ if ($_GET['act'] == "edit") {
$pconfig['dns_server4'] = $a_server[$id]['dns_server4'];
if ($pconfig['dns_server1'] ||
- $pconfig['dns_server2'] ||
- $pconfig['dns_server3'] ||
- $pconfig['dns_server4']) {
+ $pconfig['dns_server2'] ||
+ $pconfig['dns_server3'] ||
+ $pconfig['dns_server4']) {
$pconfig['dns_server_enable'] = true;
}
@@ -230,7 +231,7 @@ if ($_GET['act'] == "edit") {
$pconfig['ntp_server2'] = $a_server[$id]['ntp_server2'];
if ($pconfig['ntp_server1'] ||
- $pconfig['ntp_server2']) {
+ $pconfig['ntp_server2']) {
$pconfig['ntp_server_enable'] = true;
}
@@ -242,7 +243,7 @@ if ($_GET['act'] == "edit") {
$pconfig['wins_server2'] = $a_server[$id]['wins_server2'];
if ($pconfig['wins_server1'] ||
- $pconfig['wins_server2']) {
+ $pconfig['wins_server2']) {
$pconfig['wins_server_enable'] = true;
}
@@ -344,14 +345,14 @@ if ($_POST) {
if (!$tls_mode && !$pconfig['autokey_enable']) {
if (!strstr($pconfig['shared_key'], "-----BEGIN OpenVPN Static key V1-----") ||
- !strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----")) {
+ !strstr($pconfig['shared_key'], "-----END OpenVPN Static key V1-----")) {
$input_errors[] = gettext("The field 'Shared Key' does not appear to be valid");
}
}
if ($tls_mode && $pconfig['tlsauth_enable'] && !$pconfig['autotls_enable']) {
if (!strstr($pconfig['tls'], "-----BEGIN OpenVPN Static key V1-----") ||
- !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) {
+ !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) {
$input_errors[] = gettext("The field 'TLS Authentication Key' does not appear to be valid");
}
}
@@ -412,8 +413,15 @@ if ($_POST) {
$input_errors[] = gettext("The field 'Concurrent connections' must be numeric.");
}
+ if (!array_key_exists($pconfig['topology'], $openvpn_topologies)) {
+ $input_errors[] = gettext("The field 'Topology' contains an invalid selection");
+ }
+
/* If we are not in shared key mode, then we need the CA/Cert. */
if ($pconfig['mode'] != "p2p_shared_key") {
+ if (empty(trim($pconfig['certref']))) {
+ $input_errors[] = gettext("The selected certificate is not valid");
+ }
$reqdfields = explode(" ", "caref certref");
$reqdfieldsn = array(gettext("Certificate Authority"), gettext("Certificate"));
} elseif (!$pconfig['autokey_enable']) {
@@ -430,7 +438,7 @@ if ($_POST) {
$input_errors[] = gettext("Using a tunnel network and server bridge settings together is not allowed.");
}
if (($pconfig['serverbridge_dhcp_start'] && !$pconfig['serverbridge_dhcp_end']) ||
- (!$pconfig['serverbridge_dhcp_start'] && $pconfig['serverbridge_dhcp_end'])) {
+ (!$pconfig['serverbridge_dhcp_start'] && $pconfig['serverbridge_dhcp_end'])) {
$input_errors[] = gettext("Server Bridge DHCP Start and End must both be empty, or defined.");
}
if (($pconfig['serverbridge_dhcp_start'] && !is_ipaddrv4($pconfig['serverbridge_dhcp_start']))) {
@@ -510,7 +518,7 @@ if ($_POST) {
$server['dynamic_ip'] = $pconfig['dynamic_ip'];
$server['pool_enable'] = $pconfig['pool_enable'];
- $server['topology_subnet'] = $pconfig['topology_subnet'];
+ $server['topology'] = $pconfig['topology'];
$server['serverbridge_dhcp'] = $pconfig['serverbridge_dhcp'];
$server['serverbridge_interface'] = $pconfig['serverbridge_interface'];
@@ -581,135 +589,22 @@ if ($_POST) {
}
}
-$pgtitle = array(gettext("OpenVPN"), gettext("Server"));
+$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Server"));
$shortcut_section = "openvpn";
include("head.inc");
-function build_mode_list() {
- global $openvpn_server_modes;
-
- $list = array();
-
- foreach ($openvpn_server_modes as $name => $desc)
- $list[$name] = $desc;
-
- return($list);
-}
-
-function build_if_list() {
- $list = array();
-
- $interfaces = get_configured_interface_with_descr();
- $carplist = get_configured_carp_interface_list();
-
- foreach ($carplist as $cif => $carpip)
- $interfaces[$cif.'|'.$carpip] = $carpip." (".get_vip_descr($carpip).")";
-
- $aliaslist = get_configured_ip_aliases_list();
-
- foreach ($aliaslist as $aliasip => $aliasif)
- $interfaces[$aliasif.'|'.$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
-
- $grouplist = return_gateway_groups_array();
-
- foreach ($grouplist as $name => $group) {
- if($group['ipprotocol'] != inet)
- continue;
-
- if($group[0]['vip'] != "")
- $vipif = $group[0]['vip'];
- else
- $vipif = $group[0]['int'];
-
- $interfaces[$name] = "GW Group {$name}";
- }
-
- $interfaces['lo0'] = "Localhost";
- $interfaces['any'] = "any";
-
- foreach ($interfaces as $iface => $ifacename)
- $list[$iface] = $ifacename;
-
- return($list);
-}
-
-function build_crl_list() {
- global $a_crl;
-
- $list = array('' => 'None');
-
- foreach ($a_crl as $crl) {
- $caname = "";
- $ca = lookup_ca($crl['caref']);
-
- if ($ca)
- $caname = " (CA: {$ca['descr']})";
-
- $list[$crl['refid']] = $crl['descr'] . $caname;
- }
-
- return($list);
-}
-
-function build_cert_list() {
- global $a_cert;
-
- $list = array();
-
- foreach ($a_cert as $cert) {
- $caname = "";
- $inuse = "";
- $revoked = "";
- $ca = lookup_ca($cert['caref']);
-
- if ($ca)
- $caname = " (CA: {$ca['descr']})";
-
- if ($pconfig['certref'] == $cert['refid'])
- $selected = "selected=\"selected\"";
-
- if (cert_in_use($cert['refid']))
- $inuse = " *In Use";
-
- if (is_cert_revoked($cert))
- $revoked = " *Revoked";
-
- $list[$cert['refid']] = $cert['descr'] . $caname . $inuse . $revoked;
- }
-
- return($list);
-}
-
-function build_bridge_list() {
- $list = array();
-
- $serverbridge_interface['none'] = "none";
- $serverbridge_interface = array_merge($serverbridge_interface, get_configured_interface_with_descr());
- $carplist = get_configured_carp_interface_list();
-
- foreach ($carplist as $cif => $carpip)
- $serverbridge_interface[$cif.'|'.$carpip] = $carpip." (".get_vip_descr($carpip).")";
-
- $aliaslist = get_configured_ip_aliases_list();
-
- foreach ($aliaslist as $aliasip => $aliasif)
- $serverbridge_interface[$aliasif.'|'.$aliasip] = $aliasip." (".get_vip_descr($aliasip).")";
-
- foreach ($serverbridge_interface as $iface => $ifacename)
- $list[$iface] = htmlspecialchars($ifacename);
-
- return($list);
-}
-
-if (!$savemsg)
+if (!$savemsg) {
$savemsg = "";
+}
-if ($input_errors)
+if ($input_errors) {
print_input_errors($input_errors);
+}
-if ($savemsg)
+if ($savemsg) {
print_info_box_np($savemsg, 'success');
+}
$tab_array = array();
$tab_array[] = array(gettext("Server"), true, "vpn_openvpn_server.php");
@@ -719,16 +614,14 @@ $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.x
add_package_tabs("OpenVPN", $tab_array);
display_top_tabs($tab_array);
-require_once('classes/Form.class.php');
-
$form = new Form();
-if($act=="new" || $act=="edit") :
+if ($act=="new" || $act=="edit"):
$section = new Form_Section('General Information');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'disable',
'Disabled',
'Disable this server',
@@ -739,7 +632,7 @@ if($act=="new" || $act=="edit") :
'mode',
'Server mode',
$pconfig['mode'],
- build_mode_list()
+ openvpn_build_mode_list()
));
$options = array();
@@ -752,8 +645,9 @@ if($act=="new" || $act=="edit") :
$authmodes[0] = key($auth_servers);
}
- foreach ($auth_servers as $auth_server_key => $auth_server)
+ foreach ($auth_servers as $auth_server_key => $auth_server) {
$options[$auth_server_key] = $auth_server['name'];
+ }
$section->addInput(new Form_Select(
'authmode',
@@ -781,7 +675,7 @@ if($act=="new" || $act=="edit") :
'interface',
'Interface',
$pconfig['interface'],
- build_if_list()
+ openvpn_build_if_list()
));
$section->addInput(new Form_Input(
@@ -802,7 +696,7 @@ if($act=="new" || $act=="edit") :
$section = new Form_Section('Cryptographic settings');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'tlsauth_enable',
'TLS authentication',
'Enable authentication of TLS packets.',
@@ -810,7 +704,7 @@ if($act=="new" || $act=="edit") :
));
if (!$pconfig['tls']) {
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'autotls_enable',
null,
'Automatically generate a shared TLS authentication key.',
@@ -818,7 +712,7 @@ if($act=="new" || $act=="edit") :
));
}
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'tls',
'Key',
$pconfig['tls']
@@ -827,8 +721,9 @@ if($act=="new" || $act=="edit") :
if (count($a_ca)) {
$list = array();
- foreach ($a_ca as $ca)
+ foreach ($a_ca as $ca) {
$list[$ca['refid']] = $ca['descr'];
+ }
$section->addInput(new Form_Select(
'caref',
@@ -848,7 +743,7 @@ if($act=="new" || $act=="edit") :
'crlref',
'Peer Certificate Revocation list',
$pconfig['crlref'],
- build_crl_list()
+ openvpn_build_crl_list()
));
} else {
$section->addInput(new Form_StaticText(
@@ -857,22 +752,40 @@ if($act=="new" || $act=="edit") :
));
}
+ $certhelp = '<span id="certtype"></span>';
+ if (count($a_cert)) {
+ if (!empty(trim($pconfig['certref']))) {
+ $thiscert = lookup_cert($pconfig['certref']);
+ $purpose = cert_get_purpose($thiscert['crt'], true);
+ if ($purpose['server'] != "Yes") {
+ $certhelp = '<span id="certtype" class="text-danger">' . gettext("Warning: The selected server certificate was not created as an SSL Server certificate and may not work as expected") . ' </span>';
+ }
+ }
+ } else {
+ $certhelp = sprintf('%s%s%s$s', '<span id="certtype">', gettext('No Certificates defined. You may create one here: '), '<a href="system_camanager.php">System &gt; Cert Manager</a>', '</span>');
+ }
+
+ $cl = openvpn_build_cert_list(false, true);
+
+ //Save the number of server certs for use at run-time
+ $servercerts = count($cl['server']);
+
$section->addInput(new Form_Select(
'certref',
'Server certificate',
$pconfig['certref'],
- build_cert_list()
- ))->setHelp(count($a_cert) ? '':sprintf('No Certificates defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>'));
+ $cl['server'] + $cl['non-server']
+ ))->setHelp($certhelp);
$section->addInput(new Form_Select(
'dh_length',
'DH Parameter length (bits)',
$pconfig['dh_length'],
- array_combine($openvpn_dh_lengths,$openvpn_dh_lengths)
+ array_combine($openvpn_dh_lengths, $openvpn_dh_lengths)
))->setHelp(count($a_cert) ? '':sprintf('No Certificates defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>'));
if (!$pconfig['shared_key']) {
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'autokey_enable',
'Shared key',
'Automatically generate a shared key',
@@ -880,7 +793,7 @@ if($act=="new" || $act=="edit") :
));
}
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'shared_key',
'Shared Key',
$pconfig['shared_key']
@@ -915,7 +828,7 @@ if($act=="new" || $act=="edit") :
))->setHelp('When a certificate-based client logs in, do not accept certificates below this depth. ' .
'Useful for denying certificates made with intermediate CAs generated from the same CA as the server.');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'strictusercn',
'Strict User-CN Matching',
null,
@@ -946,7 +859,7 @@ if($act=="new" || $act=="edit") :
'The first network address will be assigned to the server virtual interface. The remaining ' .
'network addresses can optionally be assigned to connecting clients. (see Address Pool)');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'serverbridge_dhcp',
'Bridge DHCP',
'Allow clients on the bridge to obtain DHCP.',
@@ -957,7 +870,7 @@ if($act=="new" || $act=="edit") :
'serverbridge_interface',
'Bridge Interface',
$pconfig['serverbridge_interface'],
- build_bridge_list()
+ openvpn_build_bridge_list()
))->setHelp('The interface to which this tap instance will be bridged. This is not done automatically. You must assign this ' .
'interface and create the bridge separately. This setting controls which existing IP address and subnet ' .
'mask are used by OpenVPN for the bridge. Setting this to "none" will cause the Server Bridge DHCP settings below to be ignored.');
@@ -982,7 +895,7 @@ if($act=="new" || $act=="edit") :
'gwredir',
'Redirect Gateway',
'Force all client generated traffic through the tunnel.',
- $pconfig['gwredit']
+ $pconfig['gwredir']
));
$section->addInput(new Form_Input(
@@ -1038,28 +951,28 @@ if($act=="new" || $act=="edit") :
'Adaptive compression will dynamically disable compression for a period of time if OpenVPN detects that the data in the ' .
'packets is not being compressed efficiently"');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'passtos',
'Type-of-Service',
'Set the TOS IP header value of tunnel packets to match the encapsulated packet value.',
$pconfig['passtos']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'client2client',
'Inter-client communication',
'Allow communication between clients connected to this server',
$pconfig['client2client']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'duplicate_cn',
'Duplicate Connection',
'Allow multiple concurrent connections from clients using the same Common Name.',
$pconfig['duplicate_cn']
))->setHelp('(This is not generally recommended, but may be needed for some scenarios.)');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'no_tun_ipv6',
'Disable IPv6',
'Don\'t forward IPv6 traffic. ',
@@ -1070,30 +983,30 @@ if($act=="new" || $act=="edit") :
$section = new Form_Section('Client Settings');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'dynamic_ip',
'Dynamic IP',
'Allow connected clients to retain their connections if their IP address changes',
$pconfig['dynamic_ip']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'pool_enable',
'Address Pool',
'Provide a virtual adapter IP address to clients (see Tunnel Network)',
$pconfig['pool_enable']
));
- $section->addInput(new Form_checkbox(
- 'topology_subnet',
+ $section->addInput(new Form_Select(
+ 'topology',
'Topology',
- 'Allocate only one IP per client (topology subnet), rather than an isolated subnet per client (topology net30).',
- $pconfig['topology_subnet']
- ))->setHelp('Relevant when supplying a virtual adapter IP address to clients when using tun mode on IPv4.").' . '<br />' .
- 'Some clients may require this even for IPv6, such as OpenVPN Connect (iOS/Android). ' .
- 'Others may break if it is present, such as older versions of OpenVPN or clients such as Yealink phones.');
+ $pconfig['topology'],
+ $openvpn_topologies
+ ))->setHelp('Specifies the method used to supply a virtual adapter IP address to clients when using tun mode on IPv4.").' . '<br />' .
+ 'Some clients may require this be set to "subnet" even for IPv6, such as OpenVPN Connect (iOS/Android). ' .
+ 'Older versions of OpenVPN (before 2.0.9) or clients such as Yealink phones may require "net30".');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'dns_domain_enable',
'DNS Default Domain',
'Provide a default domain name to clients',
@@ -1107,7 +1020,7 @@ if($act=="new" || $act=="edit") :
$pconfig['dns_domain']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'dns_server_enable',
'DNS Server enable',
'Provide a DNS server list to clients',
@@ -1142,14 +1055,14 @@ if($act=="new" || $act=="edit") :
$pconfig['dns_server4']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'push_register_dns',
'Force DNS cache update',
'Run "net stop dnscache", "net start dnscache", "ipconfig /flushdns" and "ipconfig /registerdns" on connection initiation.',
$pconfig['push_register_dns']
))->setHelp('This is known to kick Windows into recognizing pushed DNS servers.');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'ntp_server_enable',
'NTP Server enable',
'Provide an NTP server list to clients',
@@ -1174,17 +1087,17 @@ if($act=="new" || $act=="edit") :
$section = new Form_Section('NetBIOS Options');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'netbios_enable',
'NetBIOS enable',
'Enable NetBIOS over TCP/IP',
- $pconfig['ntp_server_enable']
+ $pconfig['netbios_enable']
))->setHelp('If this option is not set, all NetBIOS-over-TCP/IP options (including WINS) will be disabled');
$section->addInput(new Form_Select(
'netbios_ntype',
'Node Type',
- $pconfig['nbios_ntype'],
+ $pconfig['netbios_ntype'],
$netbios_nodetypes
))->setHelp('Possible options: b-node (broadcasts), p-node (point-to-point name queries to a WINS server), ' .
'm-node (broadcast then query name server), and h-node (query name server, then broadcast)');
@@ -1198,7 +1111,7 @@ if($act=="new" || $act=="edit") :
'scope ID isolates NetBIOS traffic on a single network to only those nodes with the same ' .
'NetBIOS scope ID');
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'wins_server_enable',
'WINS server enable',
'Provide a WINS server list to clients',
@@ -1219,7 +1132,7 @@ if($act=="new" || $act=="edit") :
$pconfig['wins_server2']
));
- $section->addInput(new Form_checkbox(
+ $section->addInput(new Form_Checkbox(
'client_mgmt_port_enable',
'Enable custom port ',
'Use a different management port for clients.',
@@ -1239,7 +1152,7 @@ if($act=="new" || $act=="edit") :
$section = new Form_Section('Advanced Configuration');
$section->addClass('advanced');
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
'custom_options',
'Custom options',
$pconfig['custom_options']
@@ -1281,7 +1194,7 @@ else:
<div class="panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext('OpenVPN Servers')?></h2></div>
<div class="panel-body table-responsive">
- <table class="table table-striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th><?=gettext("Protocol / Port")?></th>
@@ -1294,7 +1207,7 @@ else:
<tbody>
<?php
$i = 0;
- foreach($a_server as $server):
+ foreach ($a_server as $server):
?>
<tr <?=isset($server['disable']) ? 'class="disabled"':''?>>
<td>
@@ -1308,8 +1221,8 @@ else:
<?=htmlspecialchars($server['description'])?>
</td>
<td>
- <a href="vpn_openvpn_server.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext("Edit")?></a>
- <a href="vpn_openvpn_server.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext("Delete")?></a>
+ <a class="fa fa-pencil" title="<?=gettext('Edit server')?>" href="vpn_openvpn_server.php?act=edit&amp;id=<?=$i?>"></a>
+ <a class="fa fa-trash" title="<?=gettext('Delete server')?>" href="vpn_openvpn_server.php?act=del&amp;id=<?=$i?>"></a>
</td>
</tr>
<?php
@@ -1322,8 +1235,9 @@ else:
</div>
<nav class="action-buttons">
- <a href="vpn_openvpn_server.php?act=new" class="btn btn-sm btn-success">
- <?=gettext("Add server")?>
+ <a href="vpn_openvpn_server.php?act=new" class="btn btn-sm btn-success btn-sm">
+ <i class="fa fa-plus icon-embed-btn"></i>
+ <?=gettext("Add")?>
</a>
</nav>
@@ -1337,7 +1251,7 @@ endif;
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+events.push(function() {
function mode_change() {
value = $('#mode').val();
@@ -1348,7 +1262,7 @@ events.push(function(){
hideInput('crlref', false);
hideLabel('Peer Certificate Revocation list', false);
- switch(value) {
+ switch (value) {
case "p2p_tls":
case "server_tls":
case "server_user":
@@ -1359,6 +1273,7 @@ events.push(function(){
hideInput('strictusercn', true);
hideCheckbox('autokey_enable', true);
hideInput('shared_key', false);
+ hideInput('topology', false);
break;
case "server_tls_user":
hideInput('tls', false);
@@ -1368,6 +1283,7 @@ events.push(function(){
hideInput('strictusercn', false);
hideCheckbox('autokey_enable', true);
hideInput('shared_key', true);
+ hideInput('topology', false);
break;
case "p2p_shared_key":
hideInput('tls', true);
@@ -1382,10 +1298,11 @@ events.push(function(){
hideInput('strictusercn', true);
hideCheckbox('autokey_enable', true);
hideInput('shared_key', false);
+ hideInput('topology', true);
break;
}
- switch(value) {
+ switch (value) {
case "p2p_shared_key":
hideClass('advanced', true);
hideInput('remote_network', false);
@@ -1448,7 +1365,7 @@ events.push(function(){
// Hide 'autotls_enable' AND 'tls' if mode == p2p_shared_key
// Otherwise hide 'tls' based on state of 'autotls_enable'
function autotls_change() {
- if(($('#mode').val() == 'p2p_shared_key') || (!$('#tlsauth_enable').prop('checked'))){
+ if (($('#mode').val() == 'p2p_shared_key') || (!$('#tlsauth_enable').prop('checked'))) {
hideInput('tls', true);
hideInput('autotls_enable', true);
} else {
@@ -1460,7 +1377,7 @@ events.push(function(){
function autokey_change() {
var hide = $('#autokey_enable').prop('checked')
- if($('#mode').val() != 'p2p_shared_key') {
+ if ($('#mode').val() != 'p2p_shared_key') {
hideCheckbox('autokey_enable', true);
hideInput('shared_key', true);
} else {
@@ -1530,19 +1447,24 @@ events.push(function(){
mvalue = $('#mode').val();
- switch(mvalue) {
- case "p2p_tls":
+ switch (mvalue) {
case "p2p_shared_key":
+ sharedkey = true;
+ p2p = true;
+ break;
+ case "p2p_tls":
+ sharedkey = false;
p2p = true;
break;
default:
+ sharedkey = false;
p2p = false;
break;
}
value = $('#dev_mode').val();
- switch(value) {
+ switch (value) {
case "tun":
hideCheckbox('no_tun_ipv6', false);
hideInput('tunnel_network', false);
@@ -1550,7 +1472,15 @@ events.push(function(){
hideInput('serverbridge_interface', true);
hideInput('serverbridge_dhcp_start', true);
hideInput('serverbridge_dhcp_end', true);
- hideInput('topology_subnet', false);
+ if (sharedkey) {
+ hideInput('local_network', true);
+ hideInput('local_networkv6', true);
+ hideInput('topology', true);
+ } else {
+ hideInput('local_network', false);
+ hideInput('local_networkv6', false);
+ hideInput('topology', false);
+ }
break;
case "tap":
@@ -1563,9 +1493,9 @@ events.push(function(){
hideInput('serverbridge_interface', false);
hideInput('serverbridge_dhcp_start', false);
hideInput('serverbridge_dhcp_end', false);
- hideInput('topology_subnet', false);
+ hideInput('topology', true);
- if( $('#serverbridge_dhcp').prop('checked')) {
+ if ($('#serverbridge_dhcp').prop('checked')) {
disableInput('serverbridge_interface', false);
disableInput('serverbridge_dhcp_start', false);
disableInput('serverbridge_dhcp_end', false);
@@ -1575,7 +1505,7 @@ events.push(function(){
disableInput('serverbridge_dhcp_end', true);
}
} else {
- hideInput('topology_subnet', true);
+ hideInput('topology', true);
disableInput('serverbridge_dhcp', true);
disableInput('serverbridge_interface', true);
disableInput('serverbridge_dhcp_start', true);
@@ -1649,6 +1579,17 @@ events.push(function(){
tuntap_change();
});
+ // Certref
+ $('#certref').on('change', function() {
+ var errmsg = "";
+
+ if ($(this).find(":selected").index() >= "<?=$servercerts?>") {
+ var errmsg = '<span class="text-danger">' + "<?=gettext('Warning: The selected server certificate was not created as an SSL Server certificate and may not work as expected')?>" + '</span>';
+ }
+
+ $('#certtype').html(errmsg);
+ });
+
// ---------- Set initial page display state ----------------------------------------------------------------------
mode_change();
autokey_change();
diff --git a/src/usr/local/www/vpn_pppoe.php b/src/usr/local/www/vpn_pppoe.php
deleted file mode 100644
index 726cfaf..0000000
--- a/src/usr/local/www/vpn_pppoe.php
+++ /dev/null
@@ -1,151 +0,0 @@
-<?php
-/*
- vpn_pppoe.php
- Copyright (C) 2010 Ermal Luçi
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_MODULE: pppoe
-*/
-
-##|+PRIV
-##|*IDENT=page-services-pppoeserver
-##|*NAME=Services: PPPoE Server page
-##|*DESCR=Allow access to the 'Services: PPPoE Server' page.
-##|*MATCH=vpn_pppoe.php*
-##|-PRIV
-
-require_once("guiconfig.inc");
-require_once("filter.inc");
-require_once("vpn.inc");
-
-if (!is_array($config['pppoes']['pppoe'])) {
- $config['pppoes']['pppoe'] = array();
-}
-
-$a_pppoes = &$config['pppoes']['pppoe'];
-
-if ($_POST) {
- $pconfig = $_POST;
-
- if ($_POST['apply']) {
- if (file_exists("{$g['tmp_path']}/.vpn_pppoe.apply")) {
- $toapplylist = unserialize(file_get_contents("{$g['tmp_path']}/.vpn_pppoe.apply"));
- foreach ($toapplylist as $pppoeid) {
- if (!is_numeric($pppoeid)) {
- continue;
- }
- if (is_array($config['pppoes']['pppoe'])) {
- foreach ($config['pppoes']['pppoe'] as $pppoe) {
- if ($pppoe['pppoeid'] == $pppoeid) {
- vpn_pppoe_configure($pppoe);
- break;
- }
- }
- }
- }
- @unlink("{$g['tmp_path']}/.vpn_pppoe.apply");
- }
- $retval = 0;
- $retval |= filter_configure();
- $savemsg = get_std_save_message($retval);
- clear_subsystem_dirty('vpnpppoe');
- }
-}
-
-if ($_GET['act'] == "del") {
- if ($a_pppoes[$_GET['id']]) {
- if ("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid") {
- killbypid("{$g['varrun_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'] . "-vpn.pid");
- }
- if (is_dir("{$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid'])) {
- mwexec("/bin/rm -r {$g['varetc_path']}/pppoe" . $a_pppoes[$_GET['id']]['pppoeid']);
- }
- unset($a_pppoes[$_GET['id']]);
- write_config();
- header("Location: vpn_pppoe.php");
- exit;
- }
-}
-
-$pgtitle = array(gettext("VPN"), gettext("PPPoE"));
-$shortcut_section = "pppoes";
-include("head.inc");
-
-if ($savemsg)
- print_info_box($savemsg, 'success');
-
-if (is_subsystem_dirty('vpnpppoe'))
- print_info_box_np(gettext('The PPPoE entry list has been changed') . '.<br />' . gettext('You must apply the changes in order for them to take effect.'));
-?>
-
-<div class="table-responsive">
- <table class="table table-striped table-hover table-condensed">
- <thead>
- <tr>
- <th><?=gettext("Interface")?></th>
- <th><?=gettext("Local IP")?></th>
- <th><?=gettext("Number of users")?></th>
- <th><?=gettext("Description")?></th>
- <th><!-- Action buttons --></th>
- </tr>
- </thead>
- <tbody>
-<?php
-$i = 0;
-foreach ($a_pppoes as $pppoe):
-?>
- <tr>
- <td>
- <?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($pppoe['interface']))?>
- </td>
- <td>
- <?=htmlspecialchars($pppoe['localip'])?>
- </td>
- <td>
- <?=htmlspecialchars($pppoe['n_pppoe_units'])?>
- </td>
- <td>
- <?=htmlspecialchars($pppoe['descr'])?>
- </td>
- <td>
- <a href="vpn_pppoe_edit.php?id=<?=$i?>" class="btn btn-xs btn-info"><?=gettext('Edit')?></a>
- <a href="vpn_pppoe.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger"><?=gettext('Delete')?></a>
- </td>
- </tr>
-<?php
- $i++;
-endforeach;
-?>
- </tbody>
- </table>
-</div>
-
-<nav class="action-buttons">
- <a href="vpn_pppoe_edit.php" class="btn btn-success"><?=gettext("Add")?></a>
-</nav>
-
-<?php
-include("foot.inc"); \ No newline at end of file
diff --git a/src/usr/local/www/widgets/include/carp_status.inc b/src/usr/local/www/widgets/include/carp_status.inc
index 79d3c03..63a49fe 100644
--- a/src/usr/local/www/widgets/include/carp_status.inc
+++ b/src/usr/local/www/widgets/include/carp_status.inc
@@ -1,7 +1,7 @@
<?php
//set variable for custom title
-$carp_status_title = "Carp Status";
-$carp_status_title_link = "carp_status.php";
+$carp_status_title = "CARP Status";
+$carp_status_title_link = "status_carp.php";
?>
diff --git a/src/usr/local/www/widgets/include/dyn_dns_status.inc b/src/usr/local/www/widgets/include/dyn_dns_status.inc
index 8116fe7..b2588db 100644
--- a/src/usr/local/www/widgets/include/dyn_dns_status.inc
+++ b/src/usr/local/www/widgets/include/dyn_dns_status.inc
@@ -1,7 +1,7 @@
<?php
//set variable for custom title
-$dyn_dns_status_title = "Dyn DNS Status";
+$dyn_dns_status_title = "Dynamic DNS Status";
$dyn_dns_status_title_link = "services_dyndns.php";
?>
diff --git a/src/usr/local/www/widgets/include/ipsec.inc b/src/usr/local/www/widgets/include/ipsec.inc
index 6df0a7c..59fe454 100644
--- a/src/usr/local/www/widgets/include/ipsec.inc
+++ b/src/usr/local/www/widgets/include/ipsec.inc
@@ -1,4 +1,4 @@
<?php
$ipsec_title = "IPsec";
-$ipsec_title_link = "diag_ipsec.php";
+$ipsec_title_link = "status_ipsec.php";
?>
diff --git a/src/usr/local/www/widgets/include/log.inc b/src/usr/local/www/widgets/include/log.inc
index 7ad453a..d2bafb0 100644
--- a/src/usr/local/www/widgets/include/log.inc
+++ b/src/usr/local/www/widgets/include/log.inc
@@ -1,6 +1,6 @@
<?php
//set variable for custom title
$log_title = "Firewall Logs";
-$log_title_link = "diag_logs_filter.php";
+$log_title_link = "status_logs_filter.php";
?> \ No newline at end of file
diff --git a/src/usr/local/www/widgets/javascript/thermal_sensors.js b/src/usr/local/www/widgets/javascript/thermal_sensors.js
index 7415b01..4733f67 100644
--- a/src/usr/local/www/widgets/javascript/thermal_sensors.js
+++ b/src/usr/local/www/widgets/javascript/thermal_sensors.js
@@ -1,59 +1,84 @@
/*
- $Id: thermal_sensors.js
- Description:
- Javascript functions to get and show thermal sensors data in thermal_sensors.widget.php.
- NOTE: depends on proper config in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section.
- File location:
- \usr\local\www\widgets\javascript\
- Used by:
- \usr\local\www\widgets\widgets\thermal_sensors.widget.php
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ thermal_sensors.js
*/
-
-
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
+
+warningTemp = 9999;
+criticalTemp = 100;
+ajaxBusy = false;
//should be called from "thermal_sensors.widget.php"
function showThermalSensorsData() {
+ if(!ajaxBusy) {
+ ajaxBusy = true;
+ //get data from thermal_sensors.widget.php
+ url = "/widgets/widgets/thermal_sensors.widget.php?getThermalSensorsData=1"
+ //IE fix to disable cache when using http:// , just append timespan
+ + new Date().getTime();
+
+ jQuery.ajax(url, {
+ type: 'get',
+ success: function(data) {
+ var thermalSensorsData = data || "";
+ buildThermalSensorsData(thermalSensorsData);
+ },
+ error: function(jqXHR, status, error) {
+ warningTemp = 9999;
+ buildThermalSensorsDataRaw('<span class="alert-danger">Temperature data could not be read.</span>');
+ }
+ });
- //get data from thermal_sensors.widget.php
- url = "/widgets/widgets/thermal_sensors.widget.php?getThermalSensorsData=1"
- //IE fix to disable cache when using http:// , just append timespan
- + new Date().getTime();
-
- jQuery.ajax(url, {
- type: 'get',
- success: function(data) {
- var thermalSensorsData = data || "";
- buildThermalSensorsData(thermalSensorsData);
- },
- error: function(jqXHR, status, error) {
- buildThermalSensorsDataRaw(
- "Error getting data from [thermal_sensors.widget.php] - |" +
- "status: [" + (status || "") + "]|" +
- "error: [" + (error || "") + "]");
- }
- });
-
+ ajaxBusy = false;
+ }
//call itself in 11 seconds
window.setTimeout(showThermalSensorsData, 11000);
}
@@ -63,7 +88,11 @@ function buildThermalSensorsData(thermalSensorsData) {
if (thermal_sensors_widget_showRawOutput) {
buildThermalSensorsDataRaw(thermalSensorsData);
} else {
- buildThermalSensorsDataGraph(thermalSensorsData);
+ if(warningTemp == 9999) {
+ buildThermalSensorsDataGraph(thermalSensorsData);
+ }
+
+ updateThermalSensorsDataGraph(thermalSensorsData);
}
}
@@ -85,32 +114,12 @@ function loadThermalSensorsContainer (thermalSensorsContent) {
//load generated graph (or raw data) into thermalSensorsContainer (thermalSensorsContainer DIV defined in "thermal_sensors.widget.php")
jQuery('#thermalSensorsContainer').html(thermalSensorsContent);
} else {
- jQuery('#thermalSensorsContainer').html("No Thermal Sensors data available.<br /><br />");
- jQuery('<div/>').html(
- "<span>* You can configure a proper Thermal Sensor / Module under <br />" +
- "&nbsp;&nbsp;&nbsp;<a href='system_advanced_misc.php'>System &gt; Advanced &gt; Miscellaneous : Thermal Sensors section</a>.</span>"
- ).appendTo('#thermalSensorsContainer');
+ jQuery('#thermalSensorsContainer').html("No Thermal Sensors data available.");
}
}
function buildThermalSensorsDataGraph(thermalSensorsData) {
- //local constants
- var normalColor = "LimeGreen";
- var normalColorShadowTop = "Lime";
- var normalColorShadowBottom = "Green";
-
- var warningColor = "Orange";
- var warningColorShadowBottom = "Chocolate";
-
- var criticalColor = "Red";
- var criticalColorShadowBottom = "DarkRed";
-
- //local variables
- var barBgColor = normalColor; //green/normal as default
- var barBgColorShadowTop = normalColorShadowTop; //green/normal as default
- var barBgColorShadowBottom = normalColorShadowBottom; //green/normal as default
-
var thermalSensorsArray = new Array();
if (thermalSensorsData && thermalSensorsData != "") {
@@ -118,7 +127,6 @@ function buildThermalSensorsDataGraph(thermalSensorsData) {
}
var thermalSensorsHTMLContent = "";
- var itemsToPulsate = new Array();
//generate graph for each temperature sensor and append to thermalSensorsHTMLContent string
for (var i = 0; i < thermalSensorsArray.length; i++) {
@@ -127,72 +135,13 @@ function buildThermalSensorsDataGraph(thermalSensorsData) {
var sensorName = sensorDataArray[0].trim();
var thermalSensorValue = getThermalSensorValue(sensorDataArray[1]);
- var pulsateTimes = 0;
- var pulsateDuration = 0;
-
- var warningTempThresholdPosition = 0;
- var criticalTempThresholdPosition = 0;
-
- //NOTE: the following variables are declared/set in "thermal_sensors.widget.php":
- // thermal_sensors_widget_coreWarningTempThreshold, thermal_sensors_widget_coreCriticalTempThreshold,
- // thermal_sensors_widget_zoneWarningTempThreshold, thermal_sensors_widget_zoneCriticalTempThreshold
- // thermal_sensors_widget_pulsateWarning, thermal_sensors_widget_pulsateCritical
-
- //set graph color and pulsate parameters
+ //set thresholds
if (sensorName.indexOf("cpu") > -1) { //check CPU Threshold config settings
-
- warningTempThresholdPosition = thermal_sensors_widget_coreWarningTempThreshold;
- criticalTempThresholdPosition = thermal_sensors_widget_coreCriticalTempThreshold;
-
- if (thermalSensorValue < thermal_sensors_widget_coreWarningTempThreshold) {
- barBgColor = normalColor;
- barBgColorShadowTop = normalColorShadowTop;
- barBgColorShadowBottom = normalColorShadowBottom;
- pulsateTimes = 0;
- pulsateDuration = 0;
- } else if (thermalSensorValue >= thermal_sensors_widget_coreWarningTempThreshold && thermalSensorValue < thermal_sensors_widget_coreCriticalTempThreshold) {
- barBgColor = warningColor;
- barBgColorShadowTop = warningColor;
- barBgColorShadowBottom = warningColorShadowBottom;
- pulsateTimes = thermal_sensors_widget_pulsateWarning ? 4 : 0;
- pulsateDuration = thermal_sensors_widget_pulsateWarning ? 900 : 0;
- } else { // thermalSensorValue > thermal_sensors_widget_coreCriticalTempThreshold
- barBgColor = criticalColor;
- barBgColorShadowTop = criticalColor;
- barBgColorShadowBottom = criticalColorShadowBottom;
- pulsateTimes = thermal_sensors_widget_pulsateCritical ? 7 : 0;
- pulsateDuration = thermal_sensors_widget_pulsateCritical ? 900 : 0;
- }
+ warningTemp = thermal_sensors_widget_coreWarningTempThreshold;
+ criticalTemp = thermal_sensors_widget_coreCriticalTempThreshold;
} else { //assuming sensor is for a zone, check Zone Threshold config settings
-
- warningTempThresholdPosition = thermal_sensors_widget_zoneWarningTempThreshold;
- criticalTempThresholdPosition = thermal_sensors_widget_zoneCriticalTempThreshold;
-
- if (thermalSensorValue < thermal_sensors_widget_zoneWarningTempThreshold) {
-
- barBgColor = normalColor;
- barBgColorShadowTop = normalColorShadowTop;
- barBgColorShadowBottom = normalColorShadowBottom;
- pulsateTimes = 0;
- pulsateDuration = 0;
-
- } else if (thermalSensorValue >= thermal_sensors_widget_zoneWarningTempThreshold &&
- thermalSensorValue < thermal_sensors_widget_zoneCriticalTempThreshold) {
-
- barBgColor = warningColor;
- barBgColorShadowTop = warningColor;
- barBgColorShadowBottom = warningColorShadowBottom;
- pulsateTimes = thermal_sensors_widget_pulsateWarning ? 4 : 0;
- pulsateDuration = thermal_sensors_widget_pulsateWarning ? 900 : 0;
-
- } else { // thermalSensorValue > thermal_sensors_widget_zoneCriticalTempThreshold
-
- barBgColor = criticalColor;
- barBgColorShadowTop = criticalColor;
- barBgColorShadowBottom = criticalColorShadowBottom;
- pulsateTimes = thermal_sensors_widget_pulsateCritical ? 7 : 0;
- pulsateDuration = thermal_sensors_widget_pulsateCritical ? 900 : 0;
- }
+ warningTemp = thermal_sensors_widget_zoneWarningTempThreshold;
+ criticalTemp = thermal_sensors_widget_zoneCriticalTempThreshold;
}
//NOTE: variable thermal_sensors_widget_showFullSensorName is declared/set in "thermal_sensors.widget.php"
@@ -201,78 +150,55 @@ function buildThermalSensorsDataGraph(thermalSensorsData) {
}
//build temperature item/row for a sensor
- //NOTE: additional styles are set in 'thermal_sensors.widget.php'
- var thermalSensorRow = "<div class='thermalSensorRow' id='thermalSensorRow" + i + "' >" +
- //sensor name and temperature value
- " <div class='thermalSensorTextShell'><div class='thermalSensorText' id='thermalSensorText" + i + "'>" + sensorName + ": </div><div class='thermalSensorValue' id='thermalSensorValue" + i + "'>" + thermalSensorValue + " &deg;C</div></div>" +
- //temperature bar
- " <div class='thermalSensorBarShell' id='thermalSensorBarShell" + i + "' >" +
- " <div class='thermalSensorBar' id='thermalSensorBar" + i + "' style='background-color: " + barBgColor + "; border-top-color: " + barBgColorShadowTop + "; border-bottom-color: " + barBgColorShadowBottom + "; width:" + thermalSensorValue + "%;' ></div>" +
- //threshold targets (warning and critical)
- " <div class='thermalSensorWarnThresh' id='thermalSensorWarnThresh" + i + "' style='left:" + warningTempThresholdPosition + "%;' ></div>" +
- " <div class='thermalSensorCritThresh' id='thermalSensorCritThresh" + i + "' style='left:" + criticalTempThresholdPosition + "%;' ></div>" +
- //temperature scale (max 100 C)
- " <div class='thermal_sensors_widget_scale000'></div>" +
- " <div class='thermal_sensors_widget_scale010'></div>" +
- " <div class='thermal_sensors_widget_scale020'></div>" +
- " <div class='thermal_sensors_widget_scale030'></div>" +
- " <div class='thermal_sensors_widget_scale040'></div>" +
- " <div class='thermal_sensors_widget_scale050'></div>" +
- " <div class='thermal_sensors_widget_scale060'></div>" +
- " <div class='thermal_sensors_widget_scale070'></div>" +
- " <div class='thermal_sensors_widget_scale080'></div>" +
- " <div class='thermal_sensors_widget_scale090'></div>" +
- " <div class='thermal_sensors_widget_scale100'></div>" +
- " <div class='thermal_sensors_widget_mark100'>100&deg;</div>" +
- " </div>" +
- "</div>";
-
- //collect parameters for warning/critical items we need to pulsate
- if (pulsateTimes > 0) {
- var params = i + "|" + barBgColor + "|" + pulsateTimes + "|" + pulsateDuration;
- itemsToPulsate.push(params);
- }
- //append HTML item
+ var thermalSensorRow = '<div class="progress">' +
+ '<div id="temperaturebarL' + i + '" class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="1" style="width: 1%"></div>' +
+ '<div id="temperaturebarM' + i + '" class="progress-bar progress-bar-warning progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="width: 0%"></div>' +
+ '<div id="temperaturebarH' + i + '" class="progress-bar progress-bar-danger progress-bar-striped" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0" style="width: 0%"></div>' +
+ '</div>' +
+ '<span><b>' + sensorName + ': </b></span>' + '<span id="temperaturemsg' + i + '">' + thermalSensorValue + ' &deg;C</span>';
+
+
thermalSensorsHTMLContent = thermalSensorsHTMLContent + thermalSensorRow;
+
}
//load generated graph into thermalSensorsContainer (DIV defined in "thermal_sensors.widget.php")
loadThermalSensorsContainer(thermalSensorsHTMLContent);
- if (itemsToPulsate.length > 0) {
- //pulsate/flash warning/critical items we collected
- pulsateThermalSensorsItems(itemsToPulsate);
- }
+
}
-function pulsateThermalSensorsItems(itemsToPulsate) {
-
- //pulsate/flash warning/critical items we collected
- for (var i = 0; i < itemsToPulsate.length; i++) {
-
- var pulsateParams = itemsToPulsate[i].split("|");
- var rowNum = parseInt(pulsateParams[0]);
- //var textColor = pulsateParams[1];
- var pulsateTimes = parseInt(pulsateParams[2]);
- var pulsateDuration = parseInt(pulsateParams[3]);
-
- //pulsate temp Value
- var divThermalSensorValue = jQuery("#thermalSensorValue" + rowNum); //get temp value by id
- divThermalSensorValue.effect("pulsate", {
- times: pulsateTimes,
- easing: 'linear' //'easeInExpo'
- }, pulsateDuration);
- ////set Temp Value color
- //divThermalSensorValue.css({ color: textColor });
-
- //pulsate temp Bar
- var divThermalSensorBar = jQuery("#thermalSensorBar" + rowNum); //get temp bar by id
- divThermalSensorBar.effect("pulsate", {
- times: pulsateTimes,
- easing: 'linear' //'easeInExpo'
- }, pulsateDuration);
+function updateThermalSensorsDataGraph(thermalSensorsData) {
+ var thermalSensorsArray = new Array();
+ if (thermalSensorsData && thermalSensorsData != "") {
+ thermalSensorsArray = thermalSensorsData.split("|");
+ }
+
+ //generate graph for each temperature sensor and append to thermalSensorsHTMLContent string
+ for (var i = 0; i < thermalSensorsArray.length; i++) {
+
+ var sensorDataArray = thermalSensorsArray[i].split(":");
+ var sensorName = sensorDataArray[0].trim();
+ var thermalSensorValue = getThermalSensorValue(sensorDataArray[1]);
+
+
+ //set thresholds
+ if (sensorName.indexOf("cpu") > -1) { //check CPU Threshold config settings
+ warningTemp = thermal_sensors_widget_coreWarningTempThreshold;
+ criticalTemp = thermal_sensors_widget_coreCriticalTempThreshold;
+ } else { //assuming sensor is for a zone, check Zone Threshold config settings
+ warningTemp = thermal_sensors_widget_zoneWarningTempThreshold;
+ criticalTemp = thermal_sensors_widget_zoneCriticalTempThreshold;
+ }
+
+ //NOTE: variable thermal_sensors_widget_showFullSensorName is declared/set in "thermal_sensors.widget.php"
+ if (!thermal_sensors_widget_showFullSensorName) {
+ sensorName = getSensorFriendlyName(sensorName);
+ }
+
+ setTempProgress(i, thermalSensorValue);
}
}
@@ -294,3 +220,30 @@ function getSensorFriendlyName(sensorFullName) {
function getThermalSensorValue(stringValue) {
return (+parseFloat(stringValue) || 0).toFixed(1);
}
+
+// Update the progress indicator
+// transition = true allows the bar to move at default speed, false = instantaneous
+function setTempProgress(bar, percent) {
+ var barTempL, barTempM, barTempH;
+
+ if(percent <= warningTemp) {
+ barTempL = percent;
+ barTempM = 0;
+ barTempH = 0;
+ } else if(percent <= criticalTemp) {
+ barTempL = warningTemp;
+ barTempM = percent - warningTemp;
+ barTempH = 0;
+ } else {
+ barTempL = warningTemp;
+ barTempM = criticalTemp - warningTemp;
+ barTempH = percent - criticalTemp;
+ }
+
+
+ $('#' + 'temperaturebarL' + bar).css('width', barTempL + '%').attr('aria-valuenow', barTempL);
+ $('#' + 'temperaturebarM' + bar).css('width', barTempM + '%').attr('aria-valuenow', barTempM);
+ $('#' + 'temperaturebarH' + bar).css('width', barTempH + '%').attr('aria-valuenow', barTempH);
+
+ $('#' + 'temperaturemsg' + bar).html(percent + ' &deg;C');
+} \ No newline at end of file
diff --git a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php
index 4f067a0..c325b54 100644
--- a/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/captive_portal_status.widget.php
@@ -1,39 +1,61 @@
<?php
/*
captive_portal_status.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Copyright (C) 2007 Sam Wenham
- All rights reserved.
-
- status_captiveportal.php
- part of m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2003-2004 Manuel Kasper <mk@neon1.net>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Sam Wenham
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -105,15 +127,15 @@ if ($_GET['order']) {
usort($cpdb_all, "clientcmp");
}
?>
-<table class="table">
+<table class="table table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
- <th><a href="?order=ip&amp;showact=<?=$showact;?>">IP address</a></td>
- <th><a href="?order=mac&amp;showact=<?=$showact;?>">MAC address</a></td>
- <th><a href="?order=user&amp;showact=<?=$showact;?>"><?=gettext("Username");?></a></td>
+ <th><a href="?order=ip&amp;showact=<?=$showact;?>">IP address</a></th>
+ <th><a href="?order=mac&amp;showact=<?=$showact;?>">MAC address</a></th>
+ <th><a href="?order=user&amp;showact=<?=$showact;?>"><?=gettext("Username");?></a></th>
<?php if ($showact == 1): ?>
- <th><a href="?order=start&amp;showact=<?=$showact;?>"><?=gettext("Session start");?></a></td>
- <th><a href="?order=start&amp;showact=<?=$showact;?>"><?=gettext("Last activity");?></a></td>
+ <th><a href="?order=start&amp;showact=<?=$showact;?>"><?=gettext("Session start");?></a></th>
+ <th><a href="?order=start&amp;showact=<?=$showact;?>"><?=gettext("Last activity");?></a></th>
<?php endif; ?>
</tr>
</thead>
diff --git a/src/usr/local/www/widgets/widgets/carp_status.widget.php b/src/usr/local/www/widgets/widgets/carp_status.widget.php
index 4fb97bc..8884e2b 100644
--- a/src/usr/local/www/widgets/widgets/carp_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/carp_status.widget.php
@@ -1,34 +1,58 @@
<?php
/*
- $Id$
carp_status.widget.php
- Copyright (C) 2007 Sam Wenham
- All rights reserved.
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (*) 2007 Sam Wenham
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -58,7 +82,7 @@ $carp_enabled = get_carp_status();
?>
<tr>
<td>
- <i class="icon icon-inbox"></i>
+ <i class="fa fa-inbox"></i>
<a href="/system_hasync.php">
<?=htmlspecialchars(convert_friendly_interface_to_friendly_descr($carp['interface']) . "@{$vhid}");?>
</a>
@@ -67,22 +91,32 @@ $carp_enabled = get_carp_status();
<?php
if ($carp_enabled == false) {
$status = "DISABLED";
- echo "<img src='/themes/".$g['theme']."/images/icons/icon_block.gif' title=\"$status\" alt=\"$status\" />";
+ echo '<i class="fa fa-ban"></i>';
} else {
- if($status == "MASTER") {
- echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass.gif' title=\"$status\" alt=\"$status\" />";
- } else if($status == "BACKUP") {
- echo "<img src='/themes/".$g['theme']."/images/icons/icon_pass_d.gif' title=\"$status\" alt=\"$status\" />";
- } else if($status == "INIT") {
- echo "<img src='/themes/".$g['theme']."/images/icons/icon_log.gif' title=\"$status\" alt=\"$status\" />";
+ if ($status == "MASTER") {
+ echo '<i class="fa fa-arrow-right"></i>';
+ } else if ($status == "BACKUP") {
+ echo '<i class="fa fa-arrow-right"></i>';
+ } else if ($status == "INIT") {
+ echo '<i class="fa fa-list-alt"></i>';
}
}
- if ($ipaddress){ ?> &nbsp;
+ if ($ipaddress) {
+?>
+ &nbsp;
<?=htmlspecialchars($status);?> &nbsp;
- <?=htmlspecialchars($ipaddress);}?>
-</td></tr><?php }
- } else { ?>
- <tr><td>No CARP Interfaces Defined. Click <a href="carp_status.php">here</a> to configure CARP.</td></tr>
-<?php } ?>
+ <?=htmlspecialchars($ipaddress);?>
+<?php
+ }
+?>
+</td></tr>
+<?php
+ }
+ } else {
+?>
+ <tr><td>No CARP Interfaces Defined. Click <a href="status_carp.php">here</a> to configure CARP.</td></tr>
+<?php
+ }
+?>
</table>
</div>
diff --git a/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php b/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php
index 09723d7..00f410c 100644
--- a/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php
+++ b/src/usr/local/www/widgets/widgets/deactivated/cpu_graphs.widget.php
@@ -1,45 +1,67 @@
<?php
/*
- $Id$
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ cpu_graphs.widget.php
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Scott Dale
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
require_once("functions.inc");
?>
-<link href="/themes/<?=$g['theme'];?>/graphlink.css" rel="stylesheet" type="text/css" />
+
<script src="/widgets/javascript/cpu_graphs.js" type="text/javascript"></script>
<script type="text/javascript">
/* initialize the graph */
diff --git a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
index 02b12e6..e6454cb 100644
--- a/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/dyn_dns_status.widget.php
@@ -1,39 +1,58 @@
<?php
/*
- Original status page code from: services_dyndns.php
- Copyright (C) 2008 Ermal Luçi
- Edits to convert it to a widget: dyn_dns_status.widget.php
- Copyright (C) 2013 Stanley P. Miller \ stan-qaz
- All rights reserved.
-
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INClUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
-/*
- pfSense_BUILDER_BINARIES: /usr/bin/host
- pfSense_MODULE: dyndns
+ dyn_dns_status.widget.php
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2013 Stanley P. Miller \ stan-qaz
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -48,7 +67,7 @@ if (!is_array($config['dyndnses']['dyndns'])) {
$a_dyndns = &$config['dyndnses']['dyndns'];
-if($_REQUEST['getdyndnsstatus']) {
+if ($_REQUEST['getdyndnsstatus']) {
$first_entry = true;
foreach ($a_dyndns as $dyndns) {
if ($first_entry) {
@@ -64,87 +83,75 @@ if($_REQUEST['getdyndnsstatus']) {
$cached_ip_s = explode(':', file_get_contents($filename));
$cached_ip = $cached_ip_s[0];
if ($ipaddr <> $cached_ip) {
- echo "<font color='red'>";
+ print('<span class="text-danger">');
} else {
- echo "<font color='green'>";
+ print('<span class="text-success">');
}
- echo htmlspecialchars($cached_ip);
- echo "</font>";
+ print(htmlspecialchars($cached_ip));
+ print('</span>');
} else {
- echo "N/A " . date("H:i:s");
+ print('N/A ' . date("H:i:s"));
}
}
exit;
}
?>
-<div class="content">
-<table>
+
+<table id="dyn_dns_status" class="table table-striped table-hover">
+ <thead>
<tr>
- <td width="5%" class="listhdrr"><?=gettext("Int.");?></td>
- <td width="15%" class="listhdrr"><?=gettext("Service");?></td>
- <td width="20%" class="listhdrr"><?=gettext("Hostname");?></td>
- <td width="20%" class="listhdrr"><?=gettext("Cached IP");?></td>
+ <th style="width:5%;"><?=gettext("Int.");?></th>
+ <th style="width:20%;"><?=gettext("Service");?></th>
+ <th style="width:25%;"><?=gettext("Hostname");?></th>
+ <th style="width:25%;"><?=gettext("Cached IP");?></th>
</tr>
- <?php $i = 0; foreach ($a_dyndns as $dyndns): ?>
- <tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$i;?>'">
- <td class="listlr">
+ </thead>
+ <tbody>
+ <?php $dyndnsid = 0; foreach ($a_dyndns as $dyndns): ?>
+ <tr ondblclick="document.location='services_dyndns_edit.php?id=<?=$dyndnsid;?>'"<?=!isset($dyndns['enable'])?' class="disabled"':''?>>
+ <td>
<?php $iflist = get_configured_interface_with_descr();
foreach ($iflist as $if => $ifdesc) {
if ($dyndns['interface'] == $if) {
- if (!isset($dyndns['enable'])) {
- echo "<span class=\"gray\">{$ifdesc}</span>";
- } else {
- echo "{$ifdesc}";
- }
+ print($ifdesc);
break;
}
}
$groupslist = return_gateway_groups_array();
foreach ($groupslist as $if => $group) {
if ($dyndns['interface'] == $if) {
- if (!isset($dyndns['enable'])) {
- echo "<span class=\"gray\">{$if}</span>";
- } else {
- echo "{$if}";
- }
+ print($if);
break;
}
}
?>
</td>
- <td class="listr">
+ <td>
<?php
$types = explode(",", DYNDNS_PROVIDER_DESCRIPTIONS);
$vals = explode(" ", DYNDNS_PROVIDER_VALUES);
for ($j = 0; $j < count($vals); $j++) {
if ($vals[$j] == $dyndns['type']) {
- if (!isset($dyndns['enable'])) {
- echo "<span class=\"gray\">".htmlspecialchars($types[$j])."</span>";
- } else {
- echo htmlspecialchars($types[$j]);
- }
+ print(htmlspecialchars($types[$j]));
break;
}
}
?>
</td>
- <td class="listr">
+ <td>
<?php
- if (!isset($dyndns['enable'])) {
- echo "<span class=\"gray\">".htmlspecialchars($dyndns['host'])."</span>";
- } else {
- echo htmlspecialchars($dyndns['host']);
- }
+ print(htmlspecialchars($dyndns['host']));
?>
</td>
- <td class="listr">
- <div id='dyndnsstatus<?= $i;?>'><?= gettext("Checking ...");?></div>
+ <td>
+ <div id="dyndnsstatus<?= $dyndnsid;?>"><?= gettext("Checking ...");?></div>
</td>
</tr>
- <?php $i++; endforeach;?>
+ <?php $dyndnsid++; endforeach;?>
+ </tbody>
</table>
-</div>
+
<script type="text/javascript">
//<![CDATA[
function dyndns_getstatus() {
diff --git a/src/usr/local/www/widgets/widgets/gateways.widget.php b/src/usr/local/www/widgets/widgets/gateways.widget.php
index 877b3ce..b11162b 100644
--- a/src/usr/local/www/widgets/widgets/gateways.widget.php
+++ b/src/usr/local/www/widgets/widgets/gateways.widget.php
@@ -4,7 +4,10 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2008 Seth Mos
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -61,6 +64,116 @@ require_once("pfsense-utils.inc");
require_once("functions.inc");
require_once("/usr/local/www/widgets/include/gateways.inc");
+$a_gateways = return_gateways_array();
+$gateways_status = array();
+$gateways_status = return_gateways_status(true);
+
+if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
+ $display_type = $config["widgets"]["gateways_widget"]["display_type"];
+} else {
+ $display_type = "gw_ip";
+}
+
+// Compose the table contents and pass it back to the ajax caller
+if ($_REQUEST && $_REQUEST['ajax']) {
+ global $a_gateways, $gateways_status;
+
+ print("<thead>\n");
+ print( "<tr>\n");
+ print( "<th>" . gettext("Name") . "</th>\n");
+ print( "<th>RTT</th>\n");
+ print( "<th>" . gettext("Loss") . "</th>\n");
+ print( "<th>" . gettext("Status") . "</th>\n");
+ print( "</tr>\n");
+ print("</thead>\n");
+ print("<tbody>\n");
+
+ foreach ($a_gateways as $gname => $gateway) {
+ print("<tr>\n");
+ print( "<td>\n");
+ print(htmlspecialchars($gateway['name']) . "<br />");
+ print('<div id="gateway' . $counter . '" style="display:inline"><b>');
+
+ $monitor_address = "";
+ $monitor_address_disp = "";
+ if ($display_type == "monitor_ip" || $display_type == "both_ip") {
+ $monitor_address = $gateway['monitor'];
+ if ($monitor_address != "" && $display_type == "both_ip") {
+ $monitor_address_disp = " (" . $monitor_address . ")";
+ } else {
+ $monitor_address_disp = $monitor_address;
+ }
+ }
+
+ $if_gw = '';
+ // If the user asked to display Gateway IP or both IPs, or asked for just monitor IP but the monitor IP is blank
+ // then find the gateway IP (which is also the monitor IP if the monitor IP was not explicitly set).
+ if ($display_type == "gw_ip" || $display_type == "both_ip" || ($display_type == "monitor_ip" && $monitor_address == "")) {
+ if (is_ipaddr($gateway['gateway'])) {
+ $if_gw = htmlspecialchars($gateway['gateway']);
+ } else {
+ if ($gateway['ipprotocol'] == "inet") {
+ $if_gw = htmlspecialchars(get_interface_gateway($gateway['friendlyiface']));
+ }
+ if ($gateway['ipprotocol'] == "inet6") {
+ $if_gw = htmlspecialchars(get_interface_gateway_v6($gateway['friendlyiface']));
+ }
+ }
+ if ($if_gw == "") {
+ $if_gw = "~";
+ }
+ }
+
+ if ($monitor_address == $if_gw) {
+ $monitor_address_disp = "";
+ }
+
+ print($if_gw . $monitor_address_disp);
+ unset ($if_gw);
+ unset ($monitor_address);
+ unset ($monitor_address_disp);
+ $counter++;
+
+ print( "</b>");
+ print( "</div>\n");
+ print( "</td>\n");
+
+ if ($gateways_status[$gname]) {
+ if (stristr($gateways_status[$gname]['status'], "force_down")) {
+ $online = "Offline (forced)";
+ $bgcolor = "danger"; // lightcoral
+ } elseif (stristr($gateways_status[$gname]['status'], "down")) {
+ $online = "Offline";
+ $bgcolor = "danger"; // lightcoral
+ } elseif (stristr($gateways_status[$gname]['status'], "loss")) {
+ $online = "Packetloss";
+ $bgcolor = "warning"; // khaki
+ } elseif (stristr($gateways_status[$gname]['status'], "delay")) {
+ $online = "Latency";
+ $bgcolor = "warning"; // khaki
+ } elseif ($gateways_status[$gname]['status'] == "none") {
+ $online = "Online";
+ $bgcolor = "success"; // lightgreen
+ } elseif ($gateways_status[$gname]['status'] == "") {
+ $online = "Pending";
+ $bgcolor = "info"; // lightgray
+ }
+ } else {
+ $online = gettext("Unknown");
+ $bgcolor = "info"; // lightblue
+ }
+
+ print( "<td>" . ($gateways_status[$gname] ? htmlspecialchars($gateways_status[$gname]['delay']) : gettext("Pending")) . "</td>\n");
+ print( "<td>" . ($gateways_status[$gname] ? htmlspecialchars($gateways_status[$gname]['loss']) : gettext("Pending")) . "</td>\n");
+ print('<td class="bg-' . $bgcolor . '">' . $online . "</td>\n");
+ print("</tr>\n");
+ }
+
+ print("</tbody>\n");
+
+ exit;
+}
+
if ($_POST) {
if (!is_array($config["widgets"]["gateways_widget"])) {
$config["widgets"]["gateways_widget"] = array();
@@ -72,148 +185,65 @@ if ($_POST) {
header("Location: /");
exit(0);
}
-
-if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
- $display_type = $config["widgets"]["gateways_widget"]["display_type"];
-} else {
- $display_type = "gw_ip";
-}
-
-$a_gateways = return_gateways_array();
-$gateways_status = array();
-$gateways_status = return_gateways_status(true);
-
?>
-<table class="table table-striped table-hover">
-<thead>
-<tr>
- <th>Name</td>
- <th>RTT</td>
- <th>Loss</td>
- <th>Status</td>
-</tr>
-</thead>
-<tbody>
-<?php foreach ($a_gateways as $gname => $gateway): ?>
- <tr>
- <td>
-<?php
- $if_gw = '';
- if (is_ipaddr($gateway['gateway']))
- $if_gw = $gateway['gateway'];
- else {
- if($gateway['ipprotocol'] == "inet")
- $if_gw = get_interface_gateway($gateway['friendlyiface']);
- if($gateway['ipprotocol'] == "inet6")
- $if_gw = get_interface_gateway_v6($gateway['friendlyiface']);
- }
-?>
- <?=htmlspecialchars($gateway['name'])?><br />
-
- <div id="gateway<?php echo $counter; ?>" style="display:inline"><b>
- <?php
- $monitor_address = "";
- $monitor_address_disp = "";
- if ($display_type == "monitor_ip" || $display_type == "both_ip") {
- $monitor_address = $gateway['monitor'];
- if ($monitor_address != "" && $display_type == "both_ip") {
- $monitor_address_disp = " (" . $monitor_address . ")";
- } else {
- $monitor_address_disp = $monitor_address;
- }
- }
- $if_gw = '';
- // If the user asked to display Gateway IP or both IPs, or asked for just monitor IP but the monitor IP is blank
- // then find the gateway IP (which is also the monitor IP if the monitor IP was not explicitly set).
- if ($display_type == "gw_ip" || $display_type == "both_ip" || ($display_type == "monitor_ip" && $monitor_address == "")) {
- if (is_ipaddr($gateway['gateway'])) {
- $if_gw = htmlspecialchars($gateway['gateway']);
- } else {
- if ($gateway['ipprotocol'] == "inet") {
- $if_gw = htmlspecialchars(get_interface_gateway($gateway['friendlyiface']));
- }
- if ($gateway['ipprotocol'] == "inet6") {
- $if_gw = htmlspecialchars(get_interface_gateway_v6($gateway['friendlyiface']));
- }
- }
- if ($if_gw == "") {
- $if_gw = "~";
- }
- }
- if ($monitor_address == $if_gw) {
- $monitor_address_disp = "";
- }
- echo $if_gw . $monitor_address_disp;
- unset ($if_gw);
- unset ($monitor_address);
- unset ($monitor_address_disp);
- $counter++;
- ?>
- </b>
- </div>
- </td>
-<?php
- if ($gateways_status[$gname]) {
- if (stristr($gateways_status[$gname]['status'], "force_down")) {
- $online = "Offline (forced)";
- $bgcolor = "#F08080"; // lightcoral
- } elseif (stristr($gateways_status[$gname]['status'], "down")) {
- $online = "Offline";
- $bgcolor = "#F08080"; // lightcoral
- } elseif (stristr($gateways_status[$gname]['status'], "loss")) {
- $online = "Packetloss";
- $bgcolor = "#F0E68C"; // khaki
- } elseif (stristr($gateways_status[$gname]['status'], "delay")) {
- $online = "Latency";
- $bgcolor = "#F0E68C"; // khaki
- } elseif ($gateways_status[$gname]['status'] == "none") {
- $online = "Online";
- $bgcolor = "#90EE90"; // lightgreen
- } elseif ($gateways_status[$gname]['status'] == "") {
- $online = "Pending";
- $bgcolor = "#D3D3D3"; // lightgray
- }
- } else {
- $online = gettext("Unknown");
- $bgcolor = "#ADD8E6"; // lightblue
- }
-?>
- <td><?=($gateways_status[$gname] ? htmlspecialchars($gateways_status[$gname]['delay']) : gettext("Pending"))?></td>
- <td><?=($gateways_status[$gname] ? htmlspecialchars($gateways_status[$gname]['loss']) : gettext("Pending"))?></td>
- <td style="background-color: <?=$bgcolor?>"><?=$online?></td>
- </tr>
-<?php endforeach; ?>
-</tbody>
+<table id="gwtbl" class="table table-striped table-hover">
+ <tr><td><?=gettext("Retrieving gateways data")?>&nbsp;<i class="fa fa-cog fa-spin"></i></td></tr>
</table>
<!-- close the body we're wrapped in and add a configuration-panel -->
</div>
-<div class="panel-footer collapse">
+<script type="text/javascript">
+//<![CDATA[
+
+ function get_gw_stats() {
+ var ajaxRequest;
+
+ ajaxRequest = $.ajax({
+ url: "/widgets/widgets/gateways.widget.php",
+ type: "post",
+ data: { ajax: "ajax"}
+ });
+
+ // Deal with the results of the above ajax call
+ ajaxRequest.done(function (response, textStatus, jqXHR) {
+ $('#gwtbl').html(response);
+ // and do it again
+ setTimeout(get_gw_stats, 5000);
+ });
+ }
+
+ events.push(function(){
+ get_gw_stats();
+ });
+//]]>
+</script>
+
+<div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<input type="hidden" id="gateways-config" name="gateways-config" value="" />
<div id="gateways-settings" class="widgetconfigdiv" >
<form action="/widgets/widgets/gateways.widget.php" method="post" name="gateways_widget_iform" id="gateways_widget_iform">
Display:
<?php
- $display_type_gw_ip="checked=\"checked\"";
- $display_type_monitor_ip="";
- $display_type_both_ip="";
+ $display_type_gw_ip = "checked";
+ $display_type_monitor_ip = "";
+ $display_type_both_ip = "";
if (isset($config["widgets"]["gateways_widget"]["display_type"])) {
$selected_radio = $config["widgets"]["gateways_widget"]["display_type"];
if ($selected_radio == "gw_ip") {
- $display_type_gw_ip = "checked=\"checked\"";
- $display_type_monitor_ip="";
- $display_type_both_ip="";
+ $display_type_gw_ip = "checked";
+ $display_type_monitor_ip = "";
+ $display_type_both_ip = "";
} else if ($selected_radio == "monitor_ip") {
$display_type_gw_ip = "";
- $display_type_monitor_ip="checked=\"checked\"";
- $display_type_both_ip="";
+ $display_type_monitor_ip = "checked";
+ $display_type_both_ip = "";
} else if ($selected_radio == "both_ip") {
$display_type_gw_ip = "";
- $display_type_monitor_ip="";
- $display_type_both_ip="checked=\"checked\"";
+ $display_type_monitor_ip = "";
+ $display_type_both_ip = "checked";
}
}
?>
@@ -223,4 +253,4 @@ $gateways_status = return_gateways_status(true);
<br /><br />
<input id="submit_settings" name="submit_settings" type="submit" onclick="return updatePref();" class="formbtn" value="Save Settings" />
</form>
-</div> \ No newline at end of file
+</div>
diff --git a/src/usr/local/www/widgets/widgets/gmirror_status.widget.php b/src/usr/local/www/widgets/widgets/gmirror_status.widget.php
index c8dad84..6cb4bbb 100644
--- a/src/usr/local/www/widgets/widgets/gmirror_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/gmirror_status.widget.php
@@ -1,31 +1,60 @@
<?php
/*
gmirror_status.widget.php
- Copyright (C) 2009-2010 Jim Pingle
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INClUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -37,7 +66,8 @@ require_once("gmirror.inc");
<?=gmirror_html_status()?>
</div>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function gmirrorStatusUpdateFromServer(){
$.ajax({
type: 'get',
@@ -56,4 +86,5 @@ function gmirrorStatusUpdateFromServer(){
events.push(function(){
setInterval('gmirrorStatusUpdateFromServer()', 60*1000);
});
-</script> \ No newline at end of file
+//]]>
+</script>
diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php
index 1570643..255212a 100644
--- a/src/usr/local/www/widgets/widgets/installed_packages.widget.php
+++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php
@@ -1,37 +1,62 @@
<?php
/*
installed_packages.widget.php
-
- Copyright (C) 2013-2014 Electric Sheep Fencing, LP
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) Scott Dale
+ * Copyright (c) 2004-2005 T. Lechat <dev@lechat.org>
+ * Copyright (c) Manuel Kasper <mk@neon1.net>
+ * Copyright (c) Jonathan Watt <jwatt@jwatt.org>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
$nocsrf = true;
@@ -41,71 +66,146 @@ require_once("functions.inc");
require_once("/usr/local/www/widgets/include/installed_packages.inc");
require_once("pkg-utils.inc");
-if(is_array($config['installedpackages']['package'])) {
- $instpkgs = array();
- foreach ($config['installedpackages']['package'] as $instpkg)
- $instpkgs[ $instpkg['name'] ] = $instpkg;
- ksort($instpkgs);
+if ($_REQUEST && $_REQUEST['ajax']) {
+ $package_list = get_pkg_info();
+ $installed_packages = array_filter($package_list, function($v) {
+ return (isset($v['installed']) || isset($v['broken']));
+ });
- $currentvers = get_pkg_info(array_keys($instpkgs), array('version', 'xmlver'));
-}
+ if (empty($installed_packages)) {
+ print("<div class=\"alert alert-warning\" role=\"alert\">\n");
+ print(" <strong>No packages installed.</strong>\n");
+ print(" You can install packages <a href=\"pkg_mgr.php\" class=\"alert-link\">here</a>.\n");
+ print("</div>\n");
+ exit;
+ }
-?>
+ print("<thead>\n");
+ print( "<tr>\n");
+ print( "<th>" . gettext("Name") . "</th>\n");
+ print( "<th>" . gettext("Category") . "</th>\n");
+ print( "<th>" . gettext("Version") . "</th>\n");
+ print( "<th>" . gettext("Actions") . "</th>\n");
+ print( "</tr>\n");
+ print("</thead>\n");
+ print("<tbody>\n");
-<?php if (empty($config['installedpackages']['package'])): ?>
- <div class="alert alert-warning" role="alert">
- <strong>No packages installed.</strong>
- You can install packages <a href="pkg_mgr.php" class="alert-link">here</a>.
- </div>
-<?php else: ?>
- <table class="table table-striped table-hover">
- <thead>
- <tr>
- <th>Package Name</th>
- <th>Category</th>
- <th>Package Version</th>
- </tr>
- </thead>
- <tbody>
-<?php
+ foreach ($installed_packages as $pkg) {
+ if (!$pkg['name']) {
+ continue;
+ }
+ $txtcolor = "";
+ $upgradeavail = false;
+ $vergetstr = "";
+ $missing = false;
-foreach ($instpkgs as $pkgname => $pkg):
- if (empty($pkgname))
- continue;
+ if (isset($pkg['broken'])) {
+ $txtcolor = "text-danger";
+ $missing = true;
+ $status = 'Package is configured, but not installed!';
+ } else if (isset($pkg['installed_version']) && isset($pkg['version'])) {
+ $version_compare = pkg_version_compare(
+ $pkg['installed_version'], $pkg['version']);
+ if ($version_compare == '>') {
+ // we're running a newer version of the package
+ $status = 'Newer than available ('. $pkg['version'] .')';
+ $statusicon = 'exclamation';
+ } else if ($version_compare == '<') {
+ // we're running an older version of the package
+ $status = 'Upgrade available to '.$pkg['version'];
+ $statusicon = 'plus-circle';
+ $txtcolor = "text-warning";
+ $upgradeavail = true;
+ $vergetstr = '&amp;from=' . $pkg['installed_version'] .
+ '&amp;to=' . $pkg['version'];
+ } else if ($version_compare == '=') {
+ // we're running the current version
+ $status = 'ok';
+ $statusicon = 'check';
+ } else {
+ $status = 'Error comparing version';
+ $statusicon = 'exclamation';
+ }
+ } else {
+ // unknown available package version
+ $status = 'Unknown';
+ $statusicon = 'question';
+ }
+
+ print("<tr>\n");
+ print( '<td><span class="' . $txtcolor . '">' . $pkg['shortname'] . "</span></td>\n");
+ print( "<td>" . implode(' ', $pkg['categories']) . "</td>\n");
+ print( "<td>\n");
+ print( '<i title="' . $status . '" class="fa fa-' . $statusicon . '"></i> ');
- $latest_package = $currentvers[$pkg['name']]['version'];
- if ($latest_package) {
- // we're running a newer version of the package
- if(strcmp($pkg['version'], $latest_package) > 0) {
- $status = 'Newer then available ('. $latest_package .')';
- $statusicon = 'exclamation';
+ if (!$g['disablepackagehistory']) {
+ print('<a target="_blank" title="' . gettext("View changelog") . '" href="' . htmlspecialchars($pkg['changeloglink']) . '">');
}
- // we're running an older version of the package
- if(strcmp($pkg['version'], $latest_package) < 0) {
- $status = 'Upgrade available to '.$latest_package;
- $statusicon = 'plus';
+
+ print( htmlspecialchars($pkg['installed_version']));
+
+ if (!$g['disablepackagehistory']) {
+ print("</a>\n");
+ }
+
+ print( "</td>\n");
+ print( "<td>\n");
+ print( '<a title="' . gettext("Remove") . '" href="pkg_mgr_install.php?mode=delete&amp;pkg=' . $pkg['name'] . '"><i class="fa fa-trash"></i></a>'."\n");
+
+ if ($upgradeavail) {
+ print( '<a title="' . gettext("Update") . '" href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=' . $pkg['name'] . $vergetstr . '"><i class="fa fa-refresh"></i></a>'."\n");
+ } else {
+ print( '<a title="' . gettext("Reinstall") . '" href="pkg_mgr_install.php?mode=reinstallpkg&amp;pkg=' . $pkg['name'] . '"><i class="fa fa-retweet"></i></a>'."\n");
}
- // we're running the current version
- if(!strcmp($pkg['version'], $latest_package)) {
- $status = 'Up-to-date';
- $statusicon = 'ok';
+
+ if (!isset($g['disablepackageinfo']) && $pkg['www'] != 'UNKNOWN') {
+ print( '<a target="_blank" title="' . gettext("View more information") . '" href="' . htmlspecialchars($pkg['www']) . '"><i class="fa fa-info"></i></a>'."\n");
}
- } else {
- // unknown available package version
- $status = 'Unknown';
- $statusicon = 'question';
+
+ print( "</td>\n");
+ print("</tr>\n");
}
+
+ print("</tbody>\n");
+
+ exit;
+}
?>
- <tr>
- <td><?=$pkg['name']?></td>
- <td><?=$pkg['category']?></td>
- <td>
- <i title="<?=$status?>" class="icon icon-<?=$statusicon?>-sign"></i>
- <?=$pkg['version']?>
- </td>
- </tr>
-<?php endforeach; ?>
- </tbody>
+
+<div class="table-responsive">
+ <table id="pkgtbl" class="table table-striped table-hover table-condensed">
+ <tr><td><?=gettext("Retrieving package data")?>&nbsp;<i class="fa fa-cog fa-spin"></i></td></tr>
</table>
-<?php endif; ?> \ No newline at end of file
+</div>
+
+<p class="text-center">
+ <?=gettext("Packages may be added/managed here: ")?> <a href="pkg_mgr_installed.php">System -&gt; Packages</a>
+</p>
+
+<script type="text/javascript">
+//<![CDATA[
+
+ function get_pkg_stats() {
+ var ajaxRequest;
+
+ ajaxRequest = $.ajax({
+ url: "/widgets/widgets/installed_packages.widget.php",
+ type: "post",
+ data: { ajax: "ajax"}
+ });
+
+ // Deal with the results of the above ajax call
+ ajaxRequest.done(function (response, textStatus, jqXHR) {
+ $('#pkgtbl').html(response);
+
+ // and do it again
+ setTimeout(get_pkg_stats, 5000);
+ });
+ }
+
+ events.push(function(){
+ get_pkg_stats();
+ });
+//]]>
+</script>
diff --git a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
index 166aa80..5b0fe02 100644
--- a/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
+++ b/src/usr/local/www/widgets/widgets/interface_statistics.widget.php
@@ -1,37 +1,63 @@
<?php
/*
- $Id: interface_statistics.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ interface_statistics.widget.php
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Scott Dale
+ * Copyright (c) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
+ * and Jonathan Watt <jwatt@jwatt.org>
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -40,43 +66,85 @@ require_once("pfsense-utils.inc");
require_once("functions.inc");
require_once("/usr/local/www/widgets/include/interface_statistics.inc");
-$rows = array(
- 'inpkts' => 'Packets In',
- 'outpkts' => 'Packets Out',
- 'inbytes' => 'Bytes In',
- 'outbytes' => 'Bytes Out',
- 'inerrs' => 'Errors In',
- 'outerrs' => 'Errors Out',
- 'collisions' => 'Collisions',
-);
-$ifdescrs = get_configured_interface_with_descr();
+// Compose the table contents and pass it back to the ajax caller
+if ($_REQUEST && $_REQUEST['ajax']) {
+
+ $rows = array(
+ 'inpkts' => 'Packets In',
+ 'outpkts' => 'Packets Out',
+ 'inbytes' => 'Bytes In',
+ 'outbytes' => 'Bytes Out',
+ 'inerrs' => 'Errors In',
+ 'outerrs' => 'Errors Out',
+ 'collisions' => 'Collisions',
+ );
+
+ $ifdescrs = get_configured_interface_with_descr();
+
+ print("<thead>");
+ print( "<tr>");
+ print( "<th></th>");
+
+ foreach ($ifdescrs as $ifname) {
+ print( "<th>" . $ifname . "</th>");
+ }
+
+ print( "</tr>");
+ print( "</thead>");
+ print( "<tbody>");
+
+ foreach ($rows as $key => $name) {
+ print("<tr>");
+ print( "<td><b>" . $name . "</b></td>");
+
+ foreach ($ifdescrs as $ifdescr => $ifname) {
+ $ifinfo = get_interface_info($ifdescr);
+
+ if ($ifinfo['status'] == "down") {
+ continue;
+ }
+
+ $ifinfo['inbytes'] = format_bytes($ifinfo['inbytes']);
+ $ifinfo['outbytes'] = format_bytes($ifinfo['outbytes']);
+
+ print("<td>" . (isset($ifinfo[$key]) ? htmlspecialchars($ifinfo[$key]) : 'n/a') . "</td>");
+ }
+
+ print( "</td>");
+ print( "</tr>");
+ }
+ print( "</tbody>");
+ exit;
+}
?>
-<table class="table table-striped table-hover">
-<thead>
- <tr>
- <td></td>
-<?php foreach ($ifdescrs as $ifname): ?>
- <th><?=$ifname?></th>
-<?php endforeach; ?>
- </tr>
-</thead>
-<tbody>
-<?php foreach ($rows as $key => $name): ?>
- <tr>
- <th><?=$name?></th>
-<?php foreach ($ifdescrs as $ifdescr => $ifname):
- $ifinfo = get_interface_info($ifdescr);
-
- if ($ifinfo['status'] == "down")
- continue;
-
- $ifinfo['inbytes'] = format_bytes($ifinfo['inbytes']);
- $ifinfo['outbytes'] = format_bytes($ifinfo['outbytes']);
- ?>
- <td><?=(isset($ifinfo[$key]) ? htmlspecialchars($ifinfo[$key]) : 'n/a')?></td>
-<?php endforeach; ?>
- </tr>
-<?php endforeach; ?>
- </tbody>
-</table> \ No newline at end of file
+<table id="iftbl" class="table table-striped table-hover">
+ <tr><td><?=gettext("Retrieving interface data")?></td></tr>
+</table>
+
+<script type="text/javascript">
+//<![CDATA[
+
+ function get_if_stats() {
+ var ajaxRequest;
+
+ ajaxRequest = $.ajax({
+ url: "/widgets/widgets/interface_statistics.widget.php",
+ type: "post",
+ data: { ajax: "ajax"}
+ });
+
+ // Deal with the results of the above ajax call
+ ajaxRequest.done(function (response, textStatus, jqXHR) {
+ $('#iftbl').html(response);
+
+ // and do it again
+ setTimeout(get_if_stats, 5000);
+ });
+ }
+
+ events.push(function(){
+ get_if_stats();
+ });
+//]]>
+</script>
diff --git a/src/usr/local/www/widgets/widgets/interfaces.widget.php b/src/usr/local/www/widgets/widgets/interfaces.widget.php
index 65478b2..4cc1de0 100644
--- a/src/usr/local/www/widgets/widgets/interfaces.widget.php
+++ b/src/usr/local/www/widgets/widgets/interfaces.widget.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2007 Scott Dale
*
* Redistribution and use in source and binary forms, with or without modification,
@@ -69,24 +68,29 @@ $ifdescrs = get_configured_interface_with_descr();
<?php
foreach ($ifdescrs as $ifdescr => $ifname):
$ifinfo = get_interface_info($ifdescr);
-
- if ($ifinfo['ppplink']) {
- $icon = 'icon-headphones';
+ if ($ifinfo['pppoelink'] || $ifinfo['pptplink'] || $ifinfo['l2tplink']) {
+ /* PPP link (non-cell) - looks like a modem */
+ $typeicon = 'hdd-o';
+ } else if ($ifinfo['ppplink']) {
+ /* PPP Link (usually cellular) */
+ $typeicon = 'signal';
} else if (is_interface_wireless($ifdescr)) {
- $icon = 'icon-signal';
+ /* Wi-Fi interface (hostap/client/etc) */
+ $typeicon = 'wifi';
} else {
- $icon = 'icon-cog';
+ /* Wired/other interface. */
+ $typeicon = 'sitemap';
}
$known_status = true;
// Choose an icon by interface status
if ($ifinfo['status'] == "up" || $ifinfo['status'] == "associated") {
- $icon = 'icon-arrow-up';
+ $icon = 'arrow-up';
} elseif ($ifinfo['status'] == "no carrier") {
- $icon = 'icon-remove';
+ $icon = 'times-circle';
} elseif ($ifinfo['status'] == "down") {
- $icon = 'icon-arrow-up';
+ $icon = 'arrow-up';
} else {
$known_status = false;
}
@@ -94,14 +98,14 @@ foreach ($ifdescrs as $ifdescr => $ifname):
?>
<tr>
<td title="<?=htmlspecialchars($ifinfo['macaddr'])?>">
- <i class="icon icon-<?=$icon?>"></i>
+ <i class="fa fa-<?=$typeicon?>"></i>
<a href="/interfaces.php?if=<?=$ifdescr?>">
<?=htmlspecialchars($ifname);?>
</a>
</td>
<td>
<?php if ($known_status):?>
- <i class="icon <?=$icon?>" alt="<?=htmlspecialchars($ifinfo['status'])?>"></i>
+ <i class="fa fa-<?=$icon?>" title="<?=htmlspecialchars($ifinfo['status'])?>"></i>
<?php else: ?>
<?=htmlspecialchars($ifinfo['status'])?>
<?php endif; ?>
@@ -110,8 +114,8 @@ foreach ($ifdescrs as $ifdescr => $ifname):
<?=htmlspecialchars($ifinfo['media']);?>
</td>
- <td<?=($ifinfo['dhcplink'] ? ' title="via dhcp"':'')?>>
- <?php if (empty($ifinfo['ipaddr'])): ?>
+ <td <?=($ifinfo['dhcplink'] ? ' title="via dhcp"':'')?>>
+ <?php if (empty($ifinfo['ipaddr']) && empty($ifinfo['ipaddrv6'])): ?>
n/a
<?php else: ?>
<?=htmlspecialchars($ifinfo['ipaddr'])?><br />
diff --git a/src/usr/local/www/widgets/widgets/ipsec.widget.php b/src/usr/local/www/widgets/widgets/ipsec.widget.php
index 00ce085..1b91001 100644
--- a/src/usr/local/www/widgets/widgets/ipsec.widget.php
+++ b/src/usr/local/www/widgets/widgets/ipsec.widget.php
@@ -1,37 +1,63 @@
<?php
/*
ipsec.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2004-2005 T. Lechat <dev@lechat.org> (BSD 2 clause)
+ * Copyright (c) 2007 Jonathan Watt <jwatt@jwatt.org> (BSD 2 clause)
+ * Copyright (c) 2007 Scott Dale (BSD 2 clause)
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -39,177 +65,280 @@ require_once("guiconfig.inc");
require_once("functions.inc");
require_once("ipsec.inc");
-if (isset($config['ipsec']['phase1'])) {
- $tab_array = array();
- $tab_array[0] = array("Overview", true, "ipsec-Overview");
- $tab_array[1] = array("Tunnels", false, "ipsec-tunnel");
- $tab_array[2] = array("Mobile", false, "ipsec-mobile");
+// Compose the table contents and pass it back to the ajax caller
+if ($_REQUEST && $_REQUEST['ajax']) {
- display_widget_tabs($tab_array);
-
- $spd = ipsec_dump_spd();
- $sad = ipsec_dump_sad();
- $mobile = ipsec_dump_mobile();
- $ipsec_status = ipsec_smp_dump_status();
-
- $activecounter = 0;
- $inactivecounter = 0;
-
- if (!is_array($ipsec_status['query'])) {
- $ipsec_status['query'] = array();
- $ipsec_status['query']['ikesalist'] = array();
- $ipsec_status['query']['ikesalist']['ikesa'] = array();
- } else if (!is_array($ipsec_status['query']['ikesalist'])) {
- $ipsec_status['query']['ikesalist'] = array();
- $ipsec_status['query']['ikesalist']['ikesa'] = array();
- } else if (!is_array($ipsec_status['query']['ikesalist']['ikesa'])) {
- $ipsec_status['query']['ikesalist']['ikesa'] = array();
- }
+ if (isset($config['ipsec']['phase1'])) {
+ $spd = ipsec_dump_spd();
+ $sad = ipsec_dump_sad();
+ $mobile = ipsec_dump_mobile();
+ $ipsec_status = ipsec_list_sa();
- $ipsec_detail_array = array();
- $ikenum = array();
- if (isset($config['ipsec']['phase2'])) {
- foreach ($config['ipsec']['phase2'] as $ph2ent) {
- if (!ipsec_lookup_phase1($ph2ent,$ph1ent)) {
- continue;
- }
+ $activecounter = 0;
+ $inactivecounter = 0;
- if ($ph2ent['remoteid']['type'] == "mobile" || isset($ph1ent['mobile'])) {
- continue;
- }
- if (isset($ph1ent['disabled']) || isset($ph2ent['disabled'])) {
- continue;
- }
+ $ipsec_detail_array = array();
+ $ikenum = array();
+ if (isset($config['ipsec']['phase2'])) {
+ foreach ($config['ipsec']['phase2'] as $ph2ent) {
+ if (!ipsec_lookup_phase1($ph2ent,$ph1ent)) {
+ continue;
+ }
- if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == 'ikev1') {
- if (!isset($ikenum[$ph1ent['ikeid']])) {
- $ikenum[$ph1ent['ikeid']] = 0;
- } else {
- $ikenum[$ph1ent['ikeid']]++;
+ if ($ph2ent['remoteid']['type'] == "mobile" || isset($ph1ent['mobile'])) {
+ continue;
}
- $ikeid = "con{$ph1ent['ikeid']}00" . $ikenum[$ph1ent['ikeid']];
- } else {
- if (isset($ikenum[$ph1ent['ikeid']])) {
+
+ if (isset($ph1ent['disabled']) || isset($ph2ent['disabled'])) {
continue;
}
- $ikeid = "con{$ph1ent['ikeid']}";
- $ikenum[$ph1ent['ikeid']] = true;
- }
- $found = false;
- foreach ($ipsec_status['query']['ikesalist']['ikesa'] as $ikesa) {
- if (isset($ikesa['childsalist']) && isset($ikesa['childsalist']['childsa'])) {
- foreach ($ikesa['childsalist']['childsa'] as $childsa) {
- if ($ikeid == $childsa['childconfig']) {
- $found = true;
- break;
- }
+ if (empty($ph1ent['iketype']) || $ph1ent['iketype'] == 'ikev1') {
+ if (!isset($ikenum[$ph1ent['ikeid']])) {
+ $ikenum[$ph1ent['ikeid']] = 0;
+ } else {
+ $ikenum[$ph1ent['ikeid']]++;
}
- } else if ($ikeid == $ikesa['peerconfig']) {
- $found = true;
+
+ $ikeid = "con{$ph1ent['ikeid']}00" . $ikenum[$ph1ent['ikeid']];
+ } else {
+ if (isset($ikenum[$ph1ent['ikeid']])) {
+ continue;
+ }
+
+ $ikeid = "con{$ph1ent['ikeid']}";
+ $ikenum[$ph1ent['ikeid']] = true;
}
- if ($found === true) {
- if ($ikesa['status'] == 'established') {
- /* tunnel is up */
- $iconfn = "true";
- $activecounter++;
- } else {
- /* tunnel is down */
- $iconfn = "false";
- $inactivecounter++;
+ $found = false;
+ foreach ($ipsec_status as $id => $ikesa) {
+ if (isset($ikesa['child-sas'])) {
+ foreach ($ikesa['child-sas'] as $childid => $childsa) {
+ if ($ikeid == $childid) {
+ $found = true;
+ break;
+ }
+ }
+ } else if ($ikeid == $id) {
+ $found = true;
+ }
+
+ if ($found === true) {
+ if ($ikesa['state'] == 'ESTABLISHED') {
+ /* tunnel is up */
+ $iconfn = "true";
+ $activecounter++;
+ } else {
+ /* tunnel is down */
+ $iconfn = "false";
+ $inactivecounter++;
+ }
+ break;
}
- break;
}
+
+ if ($found === false) {
+ /* tunnel is down */
+ $iconfn = "false";
+ $inactivecounter++;
+ }
+
+ $ipsec_detail_array[] = array('src' => convert_friendly_interface_to_friendly_descr($ph1ent['interface']),
+ 'dest' => $ph1ent['remote-gateway'],
+ 'remote-subnet' => ipsec_idinfo_to_text($ph2ent['remoteid']),
+ 'descr' => $ph2ent['descr'],
+ 'status' => $iconfn);
}
+ }
+ unset($ikenum);
+ }
- if ($found === false) {
- /* tunnel is down */
- $iconfn = "false";
- $inactivecounter++;
+ // Only generate the data for the tab that is currently being viewed
+ switch ($_REQUEST['tab']) {
+ case "Overview" :
+ print(" <tr>\n");
+ print( "<td>" . $activecounter . "</td>\n");
+ print( "<td>" . $inactivecounter . "</td>\n");
+ print( "<td>" . (is_array($mobile['pool']) ? htmlspecialchars($mobile['pool'][0]['usage']) : '0') . "</td>\n");
+ print( "</tr>\n");
+ break;
+
+ case "tunnel" :
+ foreach ($ipsec_detail_array as $ipsec) {
+ print(" <tr>\n");
+ print( "<td>" . htmlspecialchars($ipsec['src']) . "</td>\n");
+ print( "<td>" . $ipsec['remote-subnet'] . "<br />(" . htmlspecialchars($ipsec['dest']) . ")</td>\n");
+ print( "<td>" . htmlspecialchars($ipsec['descr']) . "</td>\n");
+
+ if ($ipsec['status'] == "true") {
+ print('<td><i class="fa fa-chevron-up"></i></td>' . "\n");
+ } else {
+ print('<td><i class="fa fa-chevron-down"></i></td>' . "\n");
+ }
+
+ print( "</tr>\n");
}
+ break;
- $ipsec_detail_array[] = array('src' => convert_friendly_interface_to_friendly_descr($ph1ent['interface']),
- 'dest' => $ph1ent['remote-gateway'],
- 'remote-subnet' => ipsec_idinfo_to_text($ph2ent['remoteid']),
- 'descr' => $ph2ent['descr'],
- 'status' => $iconfn);
- }
+ case "mobile" :
+ foreach ($mobile['pool'] as $pool) {
+ if (!is_array($pool['lease'])) {
+ continue;
+ }
+
+ foreach ($pool['lease'] as $muser) {
+ print(" <tr>\n");
+ print( "<td>" . htmlspecialchars($muser['id']) . "</td>\n");
+ print( "<td>" . htmlspecialchars($muser['host']) . "</td>\n");
+ print( "<td>" . htmlspecialchars($muser['status']) . "</td>\n");
+ print(" </tr>\n");
+ }
+ }
+ break;
}
- unset($ikenum);
+
+ exit;
+}
+
+if (isset($config['ipsec']['phase1'])) {
+ $tab_array = array();
+ $tab_array[] = array("Overview", true, "ipsec-Overview");
+ $tab_array[] = array("Tunnels", false, "ipsec-tunnel");
+ $tab_array[] = array("Mobile", false, "ipsec-mobile");
+
+ display_widget_tabs($tab_array);
}
if (isset($config['ipsec']['phase2'])): ?>
- <table class="table">
+<div id="ipsec-Overview" style="display:block;" class="table-responsive">
+ <table class="table table-striped table-hover">
<thead>
<tr>
- <th>Active Tunnels</td>
- <th>Inactive Tunnels</td>
- <th>Mobile Users</td>
+ <th>Active Tunnels</th>
+ <th>Inactive Tunnels</th>
+ <th>Mobile Users</th>
</tr>
</thead>
<tbody>
- <tr>
- <td><?=$activecounter; ?></td>
- <td><?=$inactivecounter; ?></td>
- <td><?=(is_array($mobile['pool']) ? htmlspecialchars($mobile['pool'][0]['usage']) : '0'); ?></td>
- </tr>
+ <tr><td colspan="3"><?=gettext("Retrieving overview data ")?><i class="fa fa-cog fa-spin"></i></td></tr>
</tbody>
</table>
-
+</div>
+<div class="table-responsive" id="ipsec-tunnel" style="display:none;">
<table class="table table-striped table-hover">
<thead>
+ <tr>
<th>Source</th>
<th>Destination</th>
<th>Description</th>
<th>Status</th>
+ </tr>
</thead>
<tbody>
- <?php foreach ($ipsec_detail_array as $ipsec) : ?>
- <tr>
- <td><?php echo htmlspecialchars($ipsec['src']);?></td>
- <td><?php echo $ipsec['remote-subnet'];?><br />(<?php echo htmlspecialchars($ipsec['dest']);?>)</td>
- <td><?php echo htmlspecialchars($ipsec['descr']);?></td>
- <td>
- <?php if ($ipsec['status'] == "true"): ?>
- <i class="icon icon-chevron-up"></i>
- <?php else: ?>
- <i class="icon icon-chevron-down"></i>
- <?php endif; ?>
- </td>
- </tr>
- <?php endforeach; ?>
+ <tr><td colspan="4"><?=gettext("Retrieving tunnel data ")?><i class="fa fa-cog fa-spin"></i></td></tr>
</tbody>
</table>
+</div>
<?php if (is_array($mobile['pool'])): ?>
+<div id="ipsec-mobile" style="display:none;" class="table-responsive">
<table class="table table-striped table-hover">
<thead>
+ <tr>
<th>User</th>
<th>IP</th>
<th>Status</th>
+ </tr>
</thead>
<tbody>
-
- <?php foreach ($mobile['pool'] as $pool):
- if (!is_array($pool['lease']))
- continue;
-
- foreach ($pool['lease'] as $muser) : ?>
- <tr>
- <td><?php echo htmlspecialchars($muser['id']);?></td>
- <td><?php echo htmlspecialchars($muser['host']);?></td>
- <td><?php echo htmlspecialchars($muser['status']);?></td>
- </tr>
- <?php
- endforeach;
- endforeach; ?>
+ <tr><td colspan="3"><?=gettext("Retrieving mobile data ")?><i class="fa fa-cog fa-spin"></i></td></tr>
</tbody>
</table>
+ </div>
<?php endif;?>
<?php else: ?>
<div>
<h5 style="padding-left:10px;">There are no configured IPsec Tunnels</h5>
<p style="padding-left:10px;">You can configure your IPsec <a href="vpn_ipsec.php">here</a>.</p>
</div>
-<?php endif; ?> \ No newline at end of file
+<?php endif;
+
+// This function was in index.php It seems that the ipsec widget is the only place it is used
+// so now it lives here. It wouldn't hurt to update this function and the tab display, but it
+// looks OK for now. The display_widget_tabs() function in guiconfig.inc would need to be updated to match
+?>
+<script type="text/javascript">
+//<![CDATA[
+
+curtab = "Overview";
+
+function changeTabDIV(selectedDiv) {
+ var dashpos = selectedDiv.indexOf("-");
+ var tabclass = selectedDiv.substring(0, dashpos);
+ curtab = selectedDiv.substring(dashpos+1, 20);
+ d = document;
+
+ //get deactive tabs first
+ tabclass = tabclass + "-class-tabdeactive";
+
+ var tabs = document.getElementsByClassName(tabclass);
+ var incTabSelected = selectedDiv + "-deactive";
+
+ for (i = 0; i < tabs.length; i++) {
+ var tab = tabs[i].id;
+ dashpos = tab.lastIndexOf("-");
+ var tab2 = tab.substring(0, dashpos) + "-deactive";
+
+ if (tab2 == incTabSelected) {
+ tablink = d.getElementById(tab2);
+ tablink.style.display = "none";
+ tab2 = tab.substring(0, dashpos) + "-active";
+ tablink = d.getElementById(tab2);
+ tablink.style.display = "table-cell";
+
+ //now show main div associated with link clicked
+ tabmain = d.getElementById(selectedDiv);
+ tabmain.style.display = "block";
+ } else {
+ tab2 = tab.substring(0, dashpos) + "-deactive";
+ tablink = d.getElementById(tab2);
+ tablink.style.display = "table-cell";
+ tab2 = tab.substring(0, dashpos) + "-active";
+ tablink = d.getElementById(tab2);
+ tablink.style.display = "none";
+
+ //hide sections we don't want to see
+ tab2 = tab.substring(0, dashpos);
+ tabmain = d.getElementById(tab2);
+ tabmain.style.display = "none";
+ }
+ }
+}
+
+function get_ipsec_stats() {
+ var ajaxRequest;
+
+ ajaxRequest = $.ajax({
+ url: "/widgets/widgets/ipsec.widget.php",
+ type: "post",
+ data: {
+ ajax: "ajax",
+ tab: curtab
+ }
+ });
+
+ // Deal with the results of the above ajax call
+ ajaxRequest.done(function (response, textStatus, jqXHR) {
+
+ $('tbody', '#ipsec-' + curtab).html(response);
+
+ // and do it again
+ setTimeout(get_ipsec_stats, 6000);
+ });
+}
+
+events.push(function(){
+ get_ipsec_stats();
+});
+//]]>
+</script>
diff --git a/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php b/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php
index b0c8cdb..91983b9 100644
--- a/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/load_balancer_status.widget.php
@@ -1,41 +1,62 @@
<?php
/*
load_balancer_status.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Copyright 2010 Jim Pingle
- Portions copied from status_lb_pool.php, status_lb_vs.php, and vslb.inc:
- Copyright (C) 2010 Seth Mos <seth.mos@dds.nl>.
- Copyright (C) 2005-2008 Bill Marquette
-
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Seth Mos <seth.mos@dds.nl>.
+ * Copyright (c) 2005-2008 Bill Marquette
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -80,21 +101,21 @@ if (!$nentries) {
<?php
switch (trim($rdr_a[$vsent['name']]['status'])) {
case 'active':
- $bgcolor = "#90EE90"; // lightgreen
+ $bgcolor = "success";
$rdr_a[$vsent['name']]['status'] = "Active";
break;
case 'down':
- $bgcolor = "#F08080"; // lightcoral
+ $bgcolor = "danger";
$rdr_a[$vsent['name']]['status'] = "Down";
break;
default:
- $bgcolor = "#D3D3D3"; // lightgray
+ $bgcolor = "info";
$rdr_a[$vsent['name']]['status'] = 'Unknown - relayd not running?';
}
?>
<td>
<?=$vsent['name'];?><br />
- <span style="background-color: <?=$bgcolor?>; display: block"><i><?=$rdr_a[$vsent['name']]['status']?></i></span>
+ <span class="bg-<?=$bgcolor?>" style="display: block"><i><?=$rdr_a[$vsent['name']]['status']?></i></span>
<?=$vsent['ipaddr'].":".$vsent['port'];?><br />
</td>
<td>
@@ -117,27 +138,28 @@ if (!$nentries) {
}
asort($pool_hosts);
foreach ((array) $pool_hosts as $server) {
- if(empty($server['ip']['addr']))
+ if (empty($server['ip']['addr'])) {
continue;
+ }
switch ($server['ip']['state']) {
case 'up':
- $bgcolor = "#90EE90"; // lightgreen
+ $bgcolor = "success";
$checked = "checked";
break;
case 'disabled':
- $bgcolor = "#FFFFFF"; // white
+ $bgcolor = "info";
$checked = "";
break;
default:
- $bgcolor = "#F08080"; // lightcoral
+ $bgcolor = "danger";
$checked = "checked";
}
?>
- <tr style="background-color: <?=$bgcolor?>">
+ <tr class="bg-<?=$bgcolor?>">
<td><?=$server['ip']['addr']?>:<?=$pool['port']?></td>
<td>
- <?php if($server['ip']['avail']): ?>
+ <?php if ($server['ip']['avail']): ?>
({$server['ip']['avail']})
<?php endif; ?>
</td>
diff --git a/src/usr/local/www/widgets/widgets/log.widget.php b/src/usr/local/www/widgets/widgets/log.widget.php
index 2b051c3..62e5104 100644
--- a/src/usr/local/www/widgets/widgets/log.widget.php
+++ b/src/usr/local/www/widgets/widgets/log.widget.php
@@ -1,37 +1,58 @@
<?php
/*
log.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2007 Scott Dale
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -92,17 +113,21 @@ if (isset($_POST['lastsawtime'])) {
$filterlog = conv_log_filter($filter_logfile, $nentries, $nentries + 20);
foreach ($filterlog as $idx => $row) {
- if (strtotime($log_row['time']) <= $_POST['lastsawtime'])
+ if (strtotime($log_row['time']) <= $_POST['lastsawtime']) {
unset($filterlog[$idx]);
+ }
}
-}
-else
+} else {
$filterlog = conv_log_filter($filter_logfile, $nentries, 50, $filterfieldsarray);
+}
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
var logWidgetLastRefresh = <?=time()?>;
+//]]>
</script>
+
<table class="table table-striped table-hover">
<thead>
<tr>
@@ -124,28 +149,33 @@ else
$dstIP = htmlspecialchars($filterent['dstip']);
}
- if ($filterent['act'] == "block")
- $iconfn = "remove";
- else if ($filterent['act'] == "reject")
- $iconfn = "fire";
- else if ($filterent['act'] == "match")
+ if ($filterent['act'] == "block") {
+ $iconfn = "times text-danger";
+ } else if ($filterent['act'] == "reject") {
+ $iconfn = "hand-stop-o text-warning";
+ } else if ($filterent['act'] == "match") {
$iconfn = "filter";
- else
- $iconfn = "ok";
+ } else {
+ $iconfn = "check text-success";
+ }
$rule = find_rule_by_number($filterent['rulenum'], $filterent['tracker'], $filterent['act']);
+
+ // Putting <wbr> tags after each ':' allows the string to word-wrap at that point
+ $srcIP = str_replace(':', ':<wbr>', $srcIP);
+ $dstIP = str_replace(':', ':<wbr>', $dstIP);
?>
<tr>
- <td><a <a href="#" onclick="javascript:getURL('diag_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"
+ <td><a href="#" onclick="javascript:getURL('status_logs_filter.php?getrulenum=<?php echo "{$filterent['rulenum']},{$filterent['tracker']},{$filterent['act']}"; ?>', outputrule);"
role="button" data-toggle="popover" data-trigger="hover"
data-title="Rule that triggered this action"
data-content="<?=htmlspecialchars($rule)?>"> <i
- class="icon icon-<?=$iconfn?>"></i>
+ class="fa fa-<?=$iconfn?>"></i>
</a></td>
<td title="<?=htmlspecialchars($filterent['time'])?>"><?=substr(htmlspecialchars($filterent['time']),0,-3)?></td>
<td><?=htmlspecialchars($filterent['interface']);?></td>
<td><a href="diag_dns.php?host=<?=$filterent['srcip']?>"
- title="<?=gettext("Reverse Resolve with DNS")?>"><?=$srcIP?></a>:<?=htmlspecialchars($filterent['srcport'])?>
+ title="<?=gettext("Reverse Resolve with DNS");?>"><?=$srcIP?></a>
</td>
<td><a href="diag_dns.php?host=<?=$filterent['dstip']?>"
title="<?=gettext("Reverse Resolve with DNS");?>"><?=$dstIP?></a>:<?=htmlspecialchars($filterent['dstport'])?>
@@ -160,11 +190,13 @@ else
<?php
/* for AJAX response, we only need the panel-body */
-if (isset($_GET['lastsawtime']))
+if (isset($_GET['lastsawtime'])) {
exit;
+}
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function logWidgetUpdateFromServer(){
$.ajax({
type: 'get',
@@ -184,11 +216,12 @@ function logWidgetUpdateFromServer(){
events.push(function(){
setInterval('logWidgetUpdateFromServer()', 60*1000);
});
+//]]>
</script>
<!-- close the body we're wrapped in and add a configuration-panel -->
</div>
-<div class="panel-footer collapse">
+<div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<form action="/widgets/widgets/log.widget.php" method="post"
class="form-horizontal">
@@ -196,7 +229,7 @@ events.push(function(){
<label for="filterlogentries" class="col-sm-4 control-label">Number
of entries</label>
<div class="col-sm-6">
- <input type="number" name="filterlogentries" value="<?=$nentries?>"
+ <input type="number" name="filterlogentries" id="filterlogentries" value="<?=$nentries?>"
min="1" max="20" class="form-control" />
</div>
</div>
@@ -206,11 +239,11 @@ events.push(function(){
<div class="col-sm-6 checkbox">
<?php $include_acts = explode(" ", strtolower($nentriesacts)); ?>
<label><input name="actpass" type="checkbox" value="Pass"
- <?=(in_array('pass', $include_acts) ? 'checked="checked"':'')?> />Pass</label>
+ <?=(in_array('pass', $include_acts) ? 'checked':'')?> />Pass</label>
<label><input name="actblock" type="checkbox" value="Block"
- <?=(in_array('block', $include_acts) ? 'checked="checked"':'')?> />Block</label>
+ <?=(in_array('block', $include_acts) ? 'checked':'')?> />Block</label>
<label><input name="actreject" type="checkbox" value="Reject"
- <?=(in_array('reject', $include_acts) ? 'checked="checked"':'')?> />Reject</label>
+ <?=(in_array('reject', $include_acts) ? 'checked':'')?> />Reject</label>
</div>
</div>
@@ -218,10 +251,10 @@ events.push(function(){
<label for="filterlogentriesinterfaces"
class="col-sm-4 control-label">Filter interface</label>
<div class="col-sm-6 checkbox">
- <select name="filterlogentriesinterfaces" class="form-control">
+ <select name="filterlogentriesinterfaces" id="filterlogentriesinterfaces" class="form-control">
<?php foreach (array("All" => "ALL") + get_configured_interface_with_descr() as $iface => $ifacename):?>
<option value="<?=$iface?>"
- <?=($nentriesinterfaces==$iface?'selected="selected"':'')?>><?=htmlspecialchars($ifacename)?></option>
+ <?=($nentriesinterfaces==$iface?'selected':'')?>><?=htmlspecialchars($ifacename)?></option>
<?php endforeach;?>
</select>
</div>
@@ -234,7 +267,8 @@ events.push(function(){
</div>
</form>
-<script>
+<script type="text/javascript">
+//<![CDATA[
if (typeof getURL == 'undefined') {
getURL = function(url, callback) {
if (!url)
@@ -247,7 +281,7 @@ if (typeof getURL == 'undefined') {
throw 'No callback function for getURL';
var http_request = null;
if (typeof XMLHttpRequest != 'undefined') {
- http_request = new XMLHttpRequest();
+ http_request = new XMLHttpRequest();
}
else if (typeof ActiveXObject != 'undefined') {
try {
@@ -275,5 +309,5 @@ if (typeof getURL == 'undefined') {
function outputrule(req) {
alert(req.content);
}
-
-</script> \ No newline at end of file
+//]]>
+</script>
diff --git a/src/usr/local/www/widgets/widgets/ntp_status.widget.php b/src/usr/local/www/widgets/widgets/ntp_status.widget.php
index 9065213..a98d84a 100644
--- a/src/usr/local/www/widgets/widgets/ntp_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/ntp_status.widget.php
@@ -1,9 +1,9 @@
<?php
/*
ntp_status.widget.php
-*//* ====================================================================
+*/
+/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -62,15 +62,15 @@ require_once("functions.inc");
require_once("/usr/local/www/widgets/include/ntp_status.inc");
function getServerDateItems($inDate) {
- return date('Y,n,j,G,',$inDate).intval(date('i',$inDate)).','.intval(date('s',$inDate));
+ return date('Y,n,j,G,', $inDate) . intval(date('i', $inDate)) . ',' . intval(date('s', $inDate));
// year (4-digit),month,day,hours (0-23),minutes,seconds
// use intval to strip leading zero from minutes and seconds
- // so JavaScript won't try to interpret them in octal
- // (use intval instead of ltrim, which translates '00' to '')
+ // so JavaScript won't try to interpret them in octal
+ // (use intval instead of ltrim, which translates '00' to '')
}
function clockTimeString($inDate, $showSeconds) {
- return date($showSeconds ? 'G:i:s' : 'g:i',$inDate).' ';
+ return date($showSeconds ? 'G:i:s' : 'g:i', $inDate) . ' ';
}
if ($_REQUEST['updateme']) {
@@ -110,7 +110,7 @@ if ($_REQUEST['updateme']) {
$tmp = $tmp[1];
if (substr($tmp, 0, 6) == '$GPRMC') {
$gps_vars = explode(",", $tmp);
- $gps_ok = ($gps_vars[2] == "A");
+ $gps_ok = ($gps_vars[2] == "A");
$gps_lat_deg = substr($gps_vars[3], 0, 2);
$gps_lat_min = substr($gps_vars[3], 2) / 60.0;
$gps_lon_deg = substr($gps_vars[5], 0, 3);
@@ -121,9 +121,9 @@ if ($_REQUEST['updateme']) {
$gps_lon = $gps_lon * (($gps_vars[6] == "E") ? 1 : -1);
$gps_la = $gps_vars[4];
$gps_lo = $gps_vars[6];
- }elseif (substr($tmp, 0, 6) == '$GPGGA') {
+ } elseif (substr($tmp, 0, 6) == '$GPGGA') {
$gps_vars = explode(",", $tmp);
- $gps_ok = $gps_vars[6];
+ $gps_ok = $gps_vars[6];
$gps_lat_deg = substr($gps_vars[2], 0, 2);
$gps_lat_min = substr($gps_vars[2], 2) / 60.0;
$gps_lon_deg = substr($gps_vars[4], 0, 3);
@@ -137,9 +137,9 @@ if ($_REQUEST['updateme']) {
$gps_sat = $gps_vars[7];
$gps_la = $gps_vars[3];
$gps_lo = $gps_vars[5];
- }elseif (substr($tmp, 0, 6) == '$GPGLL') {
+ } elseif (substr($tmp, 0, 6) == '$GPGLL') {
$gps_vars = explode(",", $tmp);
- $gps_ok = ($gps_vars[6] == "A");
+ $gps_ok = ($gps_vars[6] == "A");
$gps_lat_deg = substr($gps_vars[1], 0, 2);
$gps_lat_min = substr($gps_vars[1], 2) / 60.0;
$gps_lon_deg = substr($gps_vars[3], 0, 3);
@@ -157,11 +157,11 @@ if ($_REQUEST['updateme']) {
if (isset($config['ntpd']['gps']['type']) && ($config['ntpd']['gps']['type'] == 'SureGPS') && (isset($gps_ok))) {
//GSV message is only enabled by init commands in services_ntpd_gps.php for SureGPS board
$gpsport = fopen("/dev/gps0", "r+");
- while($gpsport){
+ while ($gpsport) {
$buffer = fgets($gpsport);
- if(substr($buffer, 0, 6)=='$GPGSV'){
+ if (substr($buffer, 0, 6) == '$GPGSV') {
//echo $buffer."\n";
- $gpgsv = explode(',',$buffer);
+ $gpgsv = explode(',', $buffer);
$gps_satview = $gpgsv[3];
break;
}
@@ -169,11 +169,15 @@ if ($_REQUEST['updateme']) {
}
?>
-<table class="table" id="ntp_status_widget">
+<table id="ntp_status_widget" class="table table-striped table-hover">
<tr>
<th>Server Time</th>
<td id="ClockTime"> <!-- ntpStatusClock -->
- <script>var ntpServerTime = new Date('<?=date_format(date_create(), 'c')?>');</script>
+ <script type="text/javascript">
+ //<![CDATA[
+ var ntpServerTime = new Date('<?=date_format(date_create(), 'c')?>');
+ //]]>
+ </script>
<!-- display initial value before javascript takes over -->
<?=gmdate('D j Y H:i:s \G\M\T O (T)');?>
</td>
@@ -218,7 +222,8 @@ if ($_REQUEST['updateme']) {
exit;
}
?>
-<script>
+<script type="text/javascript">
+//<![CDATA[
function ntpWidgetUpdateFromServer(){
$.ajax({
type: 'get',
@@ -241,7 +246,9 @@ function ntpWidgetUpdateDisplay(){
$('#ntpStatusClock').html(ntpServerTime.toString());
}
+//]]>
</script>
+
<script type="text/javascript">
//<![CDATA[
/* set up variables used to init clock in BODY's onLoad handler;
@@ -256,7 +263,6 @@ function clockInit() {
//]]>
</script>
-
<script type="text/javascript">
//<![CDATA[
/*** simpleFindObj, by Andrew Shearer
@@ -478,31 +484,15 @@ clockUpdate();
//]]>
</script>
-<!--
-<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="clock">
+<table id="ntpstatus" class="table table-striped table-hover">
<tbody>
<tr>
- <td width="40%" class="vncellt">Server Time</td>
- <td width="60%" class="listr">
- <div id="ClockTime">
- <b><?php echo(clockTimeString($gDate,$gClockShowsSeconds));?></b>
- </div>
- </td>
- </tr>
- </tbody>
-</table>
--->
-<div id='ntpstatus'>
-<table width="100%" border="0" cellspacing="0" cellpadding="0" summary="clock">
- <tbody>
- <tr>
- <td width="100%" class="listr">
+ <td>
Updating...
</td>
</tr>
</tbody>
</table>
-</div>
<script type="text/javascript">
//<![CDATA[
diff --git a/src/usr/local/www/widgets/widgets/openvpn.widget.php b/src/usr/local/www/widgets/widgets/openvpn.widget.php
index b02d106..2d34401 100644
--- a/src/usr/local/www/widgets/widgets/openvpn.widget.php
+++ b/src/usr/local/www/widgets/widgets/openvpn.widget.php
@@ -1,11 +1,9 @@
<?php
-
/*
openvpn.widget.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -62,15 +60,12 @@ require_once("guiconfig.inc");
require_once("openvpn.inc");
/* Handle AJAX */
-if($_GET)
- print_r($_GET);
-
if ($_GET['action']) {
if ($_GET['action'] == "kill") {
$port = $_GET['port'];
$remipp = $_GET['remipp'];
if (!empty($port) and !empty($remipp)) {
- $retval = kill_client($port, $remipp);
+ $retval = openvpn_kill_client($port, $remipp);
echo htmlentities("|{$port}|{$remipp}|{$retval}|");
} else {
echo gettext("invalid input");
@@ -79,43 +74,6 @@ if ($_GET['action']) {
}
}
-
-function kill_client($port, $remipp) {
- global $g;
-
- //$tcpsrv = "tcp://127.0.0.1:{$port}";
- $tcpsrv = "unix://{$g['varetc_path']}/openvpn/{$port}.sock";
- $errval = null;
- $errstr = null;
-
- /* open a tcp connection to the management port of each server */
- $fp = @stream_socket_client($tcpsrv, $errval, $errstr, 1);
- $killed = -1;
- if ($fp) {
- stream_set_timeout($fp, 1);
- fputs($fp, "kill {$remipp}\n");
- while (!feof($fp)) {
- $line = fgets($fp, 1024);
-
- $info = stream_get_meta_data($fp);
- if ($info['timed_out']) {
- break;
- }
-
- /* parse header list line */
- if (strpos($line, "INFO:") !== false) {
- continue;
- }
- if (strpos($line, "SUCCESS") !== false) {
- $killed = 0;
- }
- break;
- }
- fclose($fp);
- }
- return $killed;
-}
-
$servers = openvpn_get_active_servers();
$sk_servers = openvpn_get_active_servers("p2p");
$clients = openvpn_get_active_clients();
@@ -148,10 +106,10 @@ $clients = openvpn_get_active_clients();
<div class="content">
<?php foreach ($servers as $server): ?>
-<div class="panel panel-default">
+<div class="widget panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=htmlspecialchars($server['name']);?></h2></div>
<div class="table-responsive">
- <table class="table table striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th>Name/Time</th>
@@ -165,7 +123,7 @@ $clients = openvpn_get_active_clients();
$evenRowClass = $rowIndex % 2 ? " listMReven" : " listMRodd";
$rowIndex++;
?>
- <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>' class="<?=$evenRowClass?>">
+ <tr name="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>" class="<?=$evenRowClass?>">
<td>
<?=$conn['common_name'];?>
</td>
@@ -173,13 +131,13 @@ $clients = openvpn_get_active_clients();
<?=$conn['remote_host'];?>
</td>
<td>
- <i class="icon icon-remove-sign" onclick="killClient('<?=$server['mgmt']; ?>', '<?=$conn['remote_host']; ?>');" style='cursor:pointer;'
- name='<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>'
+ <i class="fa fa-times-circle" onclick="killClient('<?=$server['mgmt']; ?>', '<?=$conn['remote_host']; ?>');" style="cursor:pointer;"
+ name="<?php echo "i:{$server['mgmt']}:{$conn['remote_host']}"; ?>"
title='Kill client connection from <?php echo $conn['remote_host']; ?>'>
</i>
</td>
</tr>
- <tr name='<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>' class="<?=$evenRowClass?>">
+ <tr name="<?php echo "r:{$server['mgmt']}:{$conn['remote_host']}"; ?>" class="<?=$evenRowClass?>">
<td>
<?=$conn['connect_time'];?>
</td>
@@ -190,24 +148,19 @@ $clients = openvpn_get_active_clients();
</tr>
<?php endforeach; ?>
</tbody>
- <tfoot>
- <tr>
- <td colspan="3" class="list" height="12"></td>
- </tr>
- </tfoot>
</table>
</div>
</div>
<?php endforeach; ?>
<?php if (!empty($sk_servers)) { ?>
-<div class="panel panel-default">
+<div class="widget panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Peer to Peer Server Instance Statistics");?></h2></div>
<div class="table-responsive">
- <table class="table table striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
- <th>Remote/Virtual IP</th>
+ <th>Name/Time</th>
<th>Remote/Virtual IP</th>
<th></th>
</tr>
@@ -222,18 +175,18 @@ $clients = openvpn_get_active_clients();
<?=$sk_server['remote_host'];?>
</td>
<td>
- <?php
+<?php
if ($sk_server['status'] == "up") {
/* tunnel is up */
- echo '<i class="icon icon-arrow-up"></i>';
+ echo '<i class="fa fa-arrow-up"></i>';
} else {
/* tunnel is down */
- echo '<i class="icon icon-arrow-down"></i>';
+ echo '<i class="fa fa-arrow-down"></i>';
}
?>
</td>
</tr>
- <tr name='<?php echo "r:{$sk_server['port']}:{$sk_server['remote_host']}"; ?>'>
+ <tr name="<?php echo "r:{$sk_server['port']}:{$sk_server['remote_host']}"; ?>">
<td>
<?=$sk_server['connect_time'];?>
</td>
@@ -251,10 +204,10 @@ $clients = openvpn_get_active_clients();
<?php
} ?>
<?php if (!empty($clients)) { ?>
-<div class="panel panel-default">
+<div class="widget panel panel-default">
<div class="panel-heading"><h2 class="panel-title"><?=gettext("Client Instance Statistics");?></h2></div>
<div class="table-responsive">
- <table class="table table striped table-hover table-condensed">
+ <table class="table table-striped table-hover table-condensed sortable-theme-bootstrap" data-sortable>
<thead>
<tr>
<th>Name/Time</th>
@@ -264,7 +217,7 @@ $clients = openvpn_get_active_clients();
</thead>
<tbody>
<?php foreach ($clients as $client): ?>
- <tr name='<?php echo "r:{$client['port']}:{$client['remote_host']}"; ?>'>
+ <tr name="<?php echo "r:{$client['port']}:{$client['remote_host']}"; ?>">
<td>
<?=$client['name'];?>
</td>
@@ -272,19 +225,19 @@ $clients = openvpn_get_active_clients();
<?=$client['remote_host'];?>
</td>
<td>
- <?php
+<?php
if ($client['status'] == "up") {
/* tunnel is up */
- echo '<i class="icon icon-arrow-up"></i>';
+ echo '<i class="fa fa-arrow-up"></i>';
} else {
/* tunnel is down */
- echo '<i class="icon icon-arrow-down"></i>';
+ echo '<i class="fa fa-arrow-down"></i>';
}
?>
</td>
</tr>
- <tr name='<?php echo "r:{$client['port']}:{$client['remote_host']}"; ?>'>
+ <tr name="<?php echo "r:{$client['port']}:{$client['remote_host']}"; ?>">
<td>
<?=$client['connect_time'];?>
</td>
diff --git a/src/usr/local/www/widgets/widgets/picture.widget.php b/src/usr/local/www/widgets/widgets/picture.widget.php
index 6b19ab6..7d31199 100644
--- a/src/usr/local/www/widgets/widgets/picture.widget.php
+++ b/src/usr/local/www/widgets/widgets/picture.widget.php
@@ -71,14 +71,14 @@ if ($_POST) {
?>
<a href="/widgets/widgets/picture.widget.php?getpic=true" target="_blank">
- <img width="100%" height="100%" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" />
+ <img style="width:100%; height:100%" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" />
</a>
<!-- close the body we're wrapped in and add a configuration-panel -->
-</div><div class="panel-footer collapse">
+</div><div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<form action="/widgets/widgets/picture.widget.php" method="post" enctype="multipart/form-data" class="form-inline">
<label for="pictfile">New picture: </label>
- <input name="pictfile" type="file" class="form-control" />
+ <input id="pictfile" name="pictfile" type="file" class="form-control" />
<button type="submit" class="btn btn-default">Upload</button>
</form>
diff --git a/src/usr/local/www/widgets/widgets/rss.widget.php b/src/usr/local/www/widgets/widgets/rss.widget.php
index ee007e8..358717e 100644
--- a/src/usr/local/www/widgets/widgets/rss.widget.php
+++ b/src/usr/local/www/widgets/widgets/rss.widget.php
@@ -4,7 +4,6 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -92,15 +91,15 @@ if (!$rss_feed_s) {
$config['widgets']['rssfeed'] = "https://blog.pfsense.org";
}
-if (!$max_items) {
+if (!$max_items || !is_numeric($max_items)) {
$max_items = 10;
}
-if (!$rsswidgetheight) {
+if (!$rsswidgetheight || !is_numeric($rsswidgetheight)) {
$rsswidgetheight = 300;
}
-if (!$rsswidgettextlength) {
+if (!$rsswidgettextlength || !is_numeric($rsswidgettextlength)) {
$rsswidgettextlength = 140; // oh twitter, how do we love thee?
}
@@ -121,8 +120,9 @@ if ($config['widgets']['rssfeed']) {
exec("chmod a+rw /tmp/simplepie/cache/.");
require_once("simplepie/simplepie.inc");
function textLimit($string, $length, $replacer = '...') {
- if(strlen($string) > $length)
+ if (strlen($string) > $length) {
return (preg_match('/^(.*)\W.*$/', substr($string, 0, $length+1), $matches) ? $matches[1] : substr($string, 0, $length)) . $replacer;
+ }
return $string;
}
$feed = new SimplePie();
@@ -131,7 +131,7 @@ if ($config['widgets']['rssfeed']) {
$feed->init();
$feed->handle_content_type();
$counter = 1;
- foreach($feed->get_items(0, $max_items) as $item) {
+ foreach ($feed->get_items(0, $max_items) as $item) {
$feed = $item->get_feed();
$feed->strip_htmltags();
$content = $item->get_content();
@@ -139,7 +139,7 @@ if ($config['widgets']['rssfeed']) {
?>
<a href="<?=$item->get_permalink()?>" target="_blank" class="list-group-item">
<h4 class="list-group-item-heading">
- <img src="<?=$feed->get_favicon()?>" title="Source: <?=$feed->get_title()?>" width="16" height="16" />
+ <img src="pfs-mini.png" title="Source: <?=$feed->get_title()?>" alt="" width="16" height="16" />
<?=$item->get_title()?>
</h4>
<p class="list-group-item-text">
@@ -154,34 +154,34 @@ if ($config['widgets']['rssfeed']) {
</div>
<!-- close the body we're wrapped in and add a configuration-panel -->
-</div><div class="panel-footer collapse">
+</div><div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<form action="/widgets/widgets/rss.widget.php" method="post" class="form-horizontal">
<div class="form-group">
<label for="rssfeed" class="col-sm-3 control-label">Feeds</label>
<div class="col-sm-6">
- <textarea name="rssfeed" class="form-control"><?=$textarea_txt;?></textarea>
+ <textarea id="rssfeed" name="rssfeed" class="form-control"><?=$textarea_txt;?></textarea>
</div>
</div>
<div class="form-group">
<label for="rssmaxitems" class="col-sm-3 control-label"># Stories</label>
<div class="col-sm-6">
- <input type="number" name="rssmaxitems" value="<?=$max_items?>" min="1" max="100" class="form-control" />
+ <input type="number" id="rssmaxitems" name="rssmaxitems" value="<?=$max_items?>" min="1" max="100" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="rsswidgetheight" class="col-sm-3 control-label">Widget height</label>
<div class="col-sm-6">
- <input type="number" name="rsswidgetheight" value="<?=$rsswidgetheight?>" min="100" max="2500" step="100" class="form-control" />
+ <input type="number" id="rsswidgetheight" name="rsswidgetheight" value="<?=$rsswidgetheight?>" min="100" max="2500" step="100" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="rsswidgettextlength" class="col-sm-3 control-label">Content limit</label>
<div class="col-sm-6">
- <input type="number" name="rsswidgettextlength" value="<?=$rsswidgettextlength?>" min="100" max="5000" step="10" class="form-control" />
+ <input type="number" id="rsswidgettextlength" name="rsswidgettextlength" value="<?=$rsswidgettextlength?>" min="100" max="5000" step="10" class="form-control" />
</div>
</div>
@@ -190,4 +190,4 @@ if ($config['widgets']['rssfeed']) {
<button type="submit" class="btn btn-default">Save</button>
</div>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/src/usr/local/www/widgets/widgets/services_status.widget.php b/src/usr/local/www/widgets/widgets/services_status.widget.php
index 380f779..8899886 100644
--- a/src/usr/local/www/widgets/widgets/services_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/services_status.widget.php
@@ -4,7 +4,7 @@
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
+ * Copyright (c) 2007 Sam Wenham
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -65,23 +65,31 @@ require_once("/usr/local/www/widgets/include/services_status.inc");
$services = get_services();
-if(isset($_POST['servicestatusfilter'])) {
+if ($_POST) {
$validNames = array();
- foreach ($services as $service)
+
+ foreach ($services as $service) {
array_push($validNames, $service['name']);
+ }
+
+ if (isset($_POST['servicestatusfilter'])) {
+ $config['widgets']['servicestatusfilter'] = implode(',', array_intersect($validNames, $_POST['servicestatusfilter']));
+ } else {
+ $config['widgets']['servicestatusfilter'] = "";
+ }
- $config['widgets']['servicestatusfilter'] = implode(',', array_intersect($validNames, $_POST['servicestatusfilter']));
write_config("Saved Service Status Filter via Dashboard");
- header("Location: /");
+ header("Location: /index.php");
}
+
?>
<table class="table table-striped table-hover">
<thead>
<tr>
<th></th>
- <th>Service</td>
- <th>Description</td>
- <th>Action</td>
+ <th>Service</th>
+ <th>Description</th>
+ <th>Action</th>
</tr>
</thead>
<tbody>
@@ -100,7 +108,7 @@ if (count($services) > 0) {
$service_desc = explode(".",$service['description']);
?>
<tr>
- <td><i class="icon icon-<?=get_service_status($service)? 'ok' : 'remove'?>-sign"></i></td>
+ <td><i class="fa fa-<?=get_service_status($service) ? 'check-circle text-success' : 'times-circle text-warning'?>"></i></td>
<td><?=$service['name']?></td>
<td><?=$service_desc[0]?></td>
<td><?=get_service_control_GET_links($service)?></td>
@@ -115,15 +123,15 @@ if (count($services) > 0) {
</table>
<!-- close the body we're wrapped in and add a configuration-panel -->
-</div><div class="panel-footer collapse">
+</div><div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<form action="/widgets/widgets/services_status.widget.php" method="post" class="form-horizontal">
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">Hidden services</label>
<div class="col-sm-6">
- <select multiple="multiple" name="servicestatusfilter[]" class="form-control" height="5">
+ <select multiple id="servicestatusfilter" name="servicestatusfilter[]" class="form-control">
<?php foreach ($services as $service): ?>
- <option <?=(in_array($service['name'], $skipservices)?'selected="selected"':'')?>><?=$service['name']?></option>
+ <option <?=(in_array($service['name'], $skipservices)?'selected':'')?>><?=$service['name']?></option>
<?php endforeach; ?>
</select>
</div>
@@ -131,7 +139,29 @@ if (count($services) > 0) {
<div class="form-group">
<div class="col-sm-offset-3 col-sm-6">
- <button type="submit" class="btn btn-default">Save</button>
+ <button type="submit" class="btn btn-primary">Save</button>
+ <button id="clearall" type="button" class="btn btn-default">Clear</button>
</div>
</div>
-</form> \ No newline at end of file
+</form>
+
+<script>
+//<![CDATA[
+events.push(function(){
+ $("select[multiple] option").mousedown(function(){
+ var $self = $(this);
+
+ if ($self.prop("selected"))
+ $self.prop("selected", false);
+ else
+ $self.prop("selected", true);
+
+ return false;
+ });
+
+ $("#clearall").click(function() {
+ $('select#servicestatusfilter option').removeAttr("selected");
+ });
+});
+//]]>
+</script>
diff --git a/src/usr/local/www/widgets/widgets/smart_status.widget.php b/src/usr/local/www/widgets/widgets/smart_status.widget.php
index 175a185..56e3d2d 100644
--- a/src/usr/local/www/widgets/widgets/smart_status.widget.php
+++ b/src/usr/local/www/widgets/widgets/smart_status.widget.php
@@ -1,32 +1,61 @@
<?php
/*
smart_status.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright 2012 mkirbst @ pfSense Forum
- Part of pfSense widgets (https://www.pfsense.org)
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2012 mkirbst @ pfSense Forum
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
@@ -57,25 +86,28 @@ if (count($devs) > 0) {
switch ($dev_state) {
case "PASSED":
case "OK":
- $color = "#90EE90";
+ $color = "text-success";
+ $icon = "fa-check";
break;
case "":
$dev_state = "Unknown";
- $color = "#C0B788";
+ $color = "text-info";
+ $icon = "fa-times-circle";
break;
default:
- $color = "#F08080";
+ $color = "text-alert";
+ $icon = "fa-question-circle";
break;
}
?>
<tr>
- <td><i class="icon icon-<?=$icon?>-sign"></i></td>
+ <td><i class="fa <?=$icon?> <?=$color?>"></i></td>
<td><?=$dev?></td>
<td><?=$dev_ident?></td>
<td><?=ucfirst($dev_state)?></td>
</tr>
<?php
- }
+ }
}
?>
</tbody>
diff --git a/src/usr/local/www/widgets/widgets/system_information.widget.php b/src/usr/local/www/widgets/widgets/system_information.widget.php
index d262407..c5da475 100644
--- a/src/usr/local/www/widgets/widgets/system_information.widget.php
+++ b/src/usr/local/www/widgets/widgets/system_information.widget.php
@@ -2,10 +2,12 @@
/*
system_information.widget.php
*/
-/* ====================================================================
+/*
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
- * Copyright (c) 2007 Scott Dale
+ * Copyright (c) 2007 Scott Dale
+ *
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -51,8 +53,6 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * ====================================================================
- *
*/
require_once("functions.inc");
@@ -61,59 +61,49 @@ require_once('notices.inc');
include_once("includes/functions.inc.php");
if ($_REQUEST['getupdatestatus']) {
- if (isset($config['system']['firmware']['disablecheck'])) {
- exit;
- }
- if (isset($config['system']['firmware']['alturl']['enable'])) {
- $updater_url = "{$config['system']['firmware']['alturl']['firmwareurl']}";
- } else {
- $updater_url = $g['update_url'];
- }
+ require_once("pkg-utils.inc");
- $nanosize = "";
- if ($g['platform'] == "nanobsd") {
- if (!isset($g['enableserial_force'])) {
- $nanosize = "-nanobsd-vga-";
- } else {
- $nanosize = "-nanobsd-";
- }
- $nanosize .= strtolower(trim(file_get_contents("/etc/nanosize.txt")));
+ $system_version = get_system_pkg_version();
+
+ if ($system_version === false) {
+ print(gettext("<i>Unable to check for updates</i>"));
+ exit;
}
- @unlink("/tmp/{$g['product_name']}_version");
- if (download_file_with_progress_bar("{$updater_url}/version{$nanosize}", "/tmp/{$g['product_name']}_version", 'read_body', 5, 5) === true) {
- $remote_version = trim(@file_get_contents("/tmp/{$g['product_name']}_version"));
+ if (!is_array($system_version) ||
+ !isset($system_version['version']) ||
+ !isset($system_version['installed_version'])) {
+ print(gettext("<i>Error in version information</i>"));
+ exit;
}
- if(empty($remote_version))
- echo "<i>Unable to check for updates</i>";
- else {
- $current_installed_buildtime = trim(file_get_contents("/etc/version.buildtime"));
+ $version_compare = pkg_version_compare(
+ $system_version['installed_version'], $system_version['version']);
- if(!$remote_version) {
- echo "<i>Unable to check for updates</i>";
- }
- else {
- $needs_system_upgrade = false;
- $version_compare = pfs_version_compare($current_installed_buildtime, $g['product_version'], $remote_version);
- if ($version_compare == -1) {
+ switch ($version_compare) {
+ case '<':
?>
-<div class="alert alert-warning" role="alert">
- Version <?=$remote_version?> is available. <a href="/system_firmware_check.php" class="alert-link">Click Here to view.</a>
-</div>
+ <div>
+ <?=gettext("Version ")?>
+ <span class="text-success"><?=$system_version['version']?></span> <?=gettext("is available.")?>
+ <a class="fa fa-cloud-download fa-lg" href="/pkg_mgr_install.php?id=firmware"></a>
+ </div>
<?php
- } elseif ($version_compare == 1) {
- echo "You are on a later version than<br />the official release.";
- } else {
- echo "You are on the latest version.";
- }
- }
+ break;
+ case '=':
+ print(gettext("You are on the latest version."));
+ break;
+ case '>':
+ print(gettext("You are on a later version than<br />the official release."));
+ break;
+ default:
+ print(gettext( "<i>Error comparing installed version<br />with latest available</i>"));
+ break;
}
+
exit;
}
-$curcfg = $config['system']['firmware'];
-
$filesystems = get_mounted_filesystems();
?>
@@ -121,7 +111,7 @@ $filesystems = get_mounted_filesystems();
<tbody>
<tr>
<th><?=gettext("Name");?></th>
- <td><?php echo $config['system']['hostname'] . "." . $config['system']['domain']; ?></td>
+ <td><?php echo htmlspecialchars($config['system']['hostname'] . "." . $config['system']['domain']); ?></td>
</tr>
<tr>
<th><?=gettext("Version");?></th>
@@ -130,13 +120,13 @@ $filesystems = get_mounted_filesystems();
(<?php echo php_uname("m"); ?>)
<br />
built on <?php readfile("/etc/version.buildtime"); ?>
- <?php if(!$g['hideuname']): ?>
+ <?php if (!$g['hideuname']): ?>
<br />
<span title="<?php echo php_uname("a"); ?>"><?php echo php_uname("s") . " " . php_uname("r"); ?></span>
<?php endif; ?>
<br/><br/>
- <?php if(!isset($config['system']['firmware']['disablecheck'])): ?>
- <div id='updatestatus'><?php echo gettext("Obtaining update status"); ?> ...</div>
+ <?php if (!isset($config['system']['firmware']['disablecheck'])): ?>
+ <div id='updatestatus'><?php echo gettext("Obtaining update status "); ?><i class="fa fa-cog fa-spin"></i></div>
<?php endif; ?>
</td>
</tr>
@@ -173,12 +163,13 @@ $filesystems = get_mounted_filesystems();
<tr>
<th><?=gettext("CPU Type");?></th>
<td><?=htmlspecialchars(get_single_sysctl("hw.model"))?>
- <div id="cpufreq"><?= get_cpufreq(); ?></div>
+ <div id="cpufreq"><?= get_cpufreq(); ?></div>
<?php
$cpucount = get_cpu_count();
if ($cpucount > 1): ?>
- <div id="cpucount">
- <?= htmlspecialchars($cpucount) ?> CPUs: <?= htmlspecialchars(get_cpu_count(true)); ?></div>
+ <div id="cpucount">
+ <?= htmlspecialchars($cpucount) ?> CPUs: <?= htmlspecialchars(get_cpu_count(true)); ?>
+ </div>
<?php endif; ?>
</td>
</tr>
@@ -218,7 +209,8 @@ $filesystems = get_mounted_filesystems();
<tr>
<th><?=gettext("State table size");?></th>
<td>
- <?php $pfstatetext = get_pfstate();
+ <?php
+ $pfstatetext = get_pfstate();
$pfstateusage = get_pfstate(true);
?>
<div class="progress">
@@ -255,7 +247,7 @@ $filesystems = get_mounted_filesystems();
<tr>
<th><?=gettext("Load average");?></th>
<td>
- <div id="load_average" title="Last 1, 5 and 15 minutes"><?= get_load_average(); ?></div>
+ <div id="load_average" title="Last 1, 5 and 15 minutes"><?= get_load_average(); ?></div>
</td>
</tr>
<tr>
@@ -273,11 +265,11 @@ $filesystems = get_mounted_filesystems();
<td>
<?php $memUsage = mem_usage(); ?>
- <div class="progress" >
- <div id="memUsagePB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$memUsage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$memUsage?>%">
- </div>
+ <div class="progress" >
+ <div id="memUsagePB" class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$memUsage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$memUsage?>%">
</div>
- <span id="memusagemeter"><?=$memUsage?></span><span>% of <?= sprintf("%.0f", get_single_sysctl('hw.physmem') / (1024*1024)) ?> MB</span>
+ </div>
+ <span id="memusagemeter"><?=$memUsage?></span><span>% of <?= sprintf("%.0f", get_single_sysctl('hw.physmem') / (1024*1024)) ?> MB</span>
</td>
</tr>
<?php if ($showswap == true): ?>
@@ -289,7 +281,7 @@ $filesystems = get_mounted_filesystems();
<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$swapusage?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$swapusage?>%">
</div>
</div>
- <span><?=$swapusage?>% of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MB</span>
+ <span><?=$swapusage?>% of <?= sprintf("%.0f", `/usr/sbin/swapinfo -m | /usr/bin/grep -v Device | /usr/bin/awk '{ print $2;}'`) ?> MB</span>
</td>
</tr>
<?php endif; ?>
@@ -297,31 +289,24 @@ $filesystems = get_mounted_filesystems();
<th><?=gettext("Disk usage");?></th>
<td>
<table class="table">
-<?PHP foreach ($filesystems as $fs): ?>
- <tr>
- <th><?=$fs['mountpoint']?></th>
- <td><?=$fs['type'] . ("md" == substr(basename($fs['device']), 0, 2) ? " in RAM" : "")?></td>
- <td><?=$fs['total_size']?></td>
- <td>
- <span><?=$fs['percent_used']?>%</span>
-<!--
- <div class="progress">
- <div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="<?=$fs['percent_used']?>" aria-valuemin="0" aria-valuemax="100" style="width: <?=$fs['percent_used']?>%">
- <span><?=$fs['percent_used']?>%</span>
- </div>
- </div>
--->
- </td>
- </tr>
-<?PHP endforeach; ?>
+<?php foreach ($filesystems as $fs): ?>
+ <tr>
+ <th><?=$fs['mountpoint']?></th>
+ <td><?=$fs['type'] . ("md" == substr(basename($fs['device']), 0, 2) ? " in RAM" : "")?></td>
+ <td><?=$fs['total_size']?></td>
+ <td>
+ <span><?=$fs['percent_used']?>%</span>
+ </td>
+ </tr>
+<?php endforeach; ?>
</table>
</td>
</tr>
</tbody>
</table>
-<script>
-
+<script type="text/javascript">
+//<![CDATA[
function systemStatusGetUpdateStatus() {
$.ajax({
type: 'get',
@@ -349,10 +334,12 @@ function updateMeters() {
stats(data);
}
});
- setTimer();
+
+ setTimer();
+
}
-events.push(function(){
+events.push(function(){
setTimeout('systemStatusGetUpdateStatus()', 4000);
});
@@ -369,7 +356,7 @@ function setProgress(barName, percent) {
}
function setTimer() {
- timeout = window.setTimeout('updateMeters()', update_interval);
+ timeout = window.setTimeout('updateMeters()', update_interval);
}
function stats(x) {
@@ -381,92 +368,105 @@ function stats(x) {
return false;
}))
- updateUptime(values[2]);
- updateDateTime(values[5]);
- updateCPU(values[0]);
- updateMemory(values[1]);
- updateState(values[3]);
- updateTemp(values[4]);
- updateInterfaceStats(values[6]);
- updateInterfaces(values[7]);
- updateGatewayStats(values[8]);
- updateCpuFreq(values[9]);
- updateLoadAverage(values[10]);
- updateMbuf(values[11]);
- updateMbufMeter(values[12]);
- updateStateMeter(values[13]);
+ updateUptime(values[2]);
+ updateDateTime(values[5]);
+ updateCPU(values[0]);
+ updateMemory(values[1]);
+ updateState(values[3]);
+ updateTemp(values[4]);
+ updateInterfaceStats(values[6]);
+ updateInterfaces(values[7]);
+ updateGatewayStats(values[8]);
+ updateCpuFreq(values[9]);
+ updateLoadAverage(values[10]);
+ updateMbuf(values[11]);
+ updateMbufMeter(values[12]);
+ updateStateMeter(values[13]);
}
function updateMemory(x) {
- if(jQuery('#memusagemeter'))
+ if (jQuery('#memusagemeter')) {
jQuery("#memusagemeter").html(x);
- if(jQuery('#memUsagePB')) {
+ }
+ if (jQuery('#memUsagePB')) {
setProgress('memUsagePB', parseInt(x));
}
}
function updateMbuf(x) {
- if(jQuery('#mbuf'))
+ if (jQuery('#mbuf')) {
jQuery("#mbuf").html(x);
+ }
}
function updateMbufMeter(x) {
- if(jQuery('#mbufusagemeter'))
+ if (jQuery('#mbufusagemeter')) {
jQuery("#mbufusagemeter").html(x + '%');
- if(jQuery('#mbufPB'))
+ }
+ if (jQuery('#mbufPB')) {
setProgress('mbufPB', parseInt(x));
+ }
}
function updateCPU(x) {
- if(jQuery('#cpumeter'))
+ if (jQuery('#cpumeter')) {
jQuery("#cpumeter").html(x + '%');
- if(jQuery('#cpuPB'))
+ }
+ if (jQuery('#cpuPB')) {
setProgress('cpuPB', parseInt(x));
+ }
/* Load CPU Graph widget if enabled */
- if(widgetActive('cpu_graphs')) {
+ if (widgetActive('cpu_graphs')) {
GraphValue(graph[0], x);
}
}
function updateTemp(x) {
- if(jQuery("#tempmeter"))
+ if (jQuery("#tempmeter")) {
jQuery("#tempmeter").html(x + '\u00B0' + 'C');
- if(jQuery('#tempPB'))
+ }
+ if (jQuery('#tempPB')) {
jQuery("#tempPB").progressbar( { value: parseInt(x) } );
+ }
}
function updateDateTime(x) {
- if(jQuery('#datetime'))
+ if (jQuery('#datetime')) {
jQuery("#datetime").html(x);
+ }
}
function updateUptime(x) {
- if(jQuery('#uptime'))
+ if (jQuery('#uptime')) {
jQuery("#uptime").html(x);
+ }
}
function updateState(x) {
- if(jQuery('#pfstate'))
+ if (jQuery('#pfstate')) {
jQuery("#pfstate").html('(' + x + ')');
+ }
}
function updateStateMeter(x) {
- if(jQuery('#pfstateusagemeter'))
+ if (jQuery('#pfstateusagemeter')) {
jQuery("#pfstateusagemeter").html(x + '%');
- if(jQuery('#statePB'))
+ }
+ if (jQuery('#statePB')) {
setProgress('statePB', parseInt(x));
+ }
}
-function updateGatewayStats(x){
- if (widgetActive("gateways")){
+function updateGatewayStats(x) {
+ if (widgetActive("gateways")) {
gateways_split = x.split(",");
- for (var y=0; y<gateways_split.length; y++){
+ for (var y=0; y<gateways_split.length; y++) {
gateways_field_split = gateways_split[y].split("^");
- if(jQuery('#gateway' + (y + 1))) {
+ if (jQuery('#gateway' + (y + 1))) {
jQuery('#gateway' + (y + 1)).html(gateways_field_split[0]);
- if(gateways_field_split[1]) {
+ if (gateways_field_split[1]) {
jQuery('#gateway' + (y + 1)).css('background-color',gateways_field_split[1]);
}
}
@@ -475,37 +475,40 @@ function updateGatewayStats(x){
}
function updateCpuFreq(x) {
- if(jQuery('#cpufreq'))
+ if (jQuery('#cpufreq')) {
jQuery("#cpufreq").html(x);
+ }
}
function updateLoadAverage(x) {
- if(jQuery('#load_average'))
+ if (jQuery('#load_average')) {
jQuery("#load_average").html(x);
+ }
}
-function updateInterfaceStats(x){
- if (widgetActive("interface_statistics")){
+function updateInterfaceStats(x) {
+ if (widgetActive("interface_statistics")) {
statistics_split = x.split(",");
var counter = 1;
- for (var y=0; y<statistics_split.length-1; y++){
- if(jQuery('#stat' + counter)) {
+ for (var y=0; y<statistics_split.length-1; y++) {
+ if (jQuery('#stat' + counter)) {
jQuery('#stat' + counter).html(statistics_split[y]);
- counter++;
+ counter++;
}
}
}
}
-function updateInterfaces(x){
- if (widgetActive("interfaces")){
+function updateInterfaces(x) {
+ if (widgetActive("interfaces")) {
interfaces_split = x.split("~");
interfaces_split.each(function(iface){
details = iface.split("^");
- if (details[2] == '')
+ if (details[2] == '') {
ipv4_details = '';
- else
+ } else {
ipv4_details = details[2] + '<br />';
+ }
switch(details[1]) {
case "up":
jQuery('#' + details[0] + '-up').css("display","inline");
@@ -535,15 +538,16 @@ function updateInterfaces(x){
function widgetActive(x) {
var widget = jQuery('#' + x + '-container');
- if ((widget != null) && (widget.css('display') != null) && (widget.css('display') != "none"))
+ if ((widget != null) && (widget.css('display') != null) && (widget.css('display') != "none")) {
return true;
- else
+ } else {
return false;
+ }
}
/* start updater */
events.push(function(){
setTimer();
});
-
+//]]>
</script>
diff --git a/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php b/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php
index 875ccb2..dabf983 100644
--- a/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php
+++ b/src/usr/local/www/widgets/widgets/thermal_sensors.widget.php
@@ -1,37 +1,56 @@
<?php
/*
- $Id: thermal_sensors.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Description: Thermal Sensors Widget.
- NOTE: depends on proper config in System >> Advanced >> Miscellaneous tab >> Thermal Sensors section.
-
- File location:
- \usr\local\www\widgets\widgets\
- Depends on:
- \usr\local\www\widgets\javascript\thermal_sensors.js
- \usr\local\www\widgets\include\thermal_sensors.inc
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
+ thermal_sensors.widget.php
+*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
*/
require_once("guiconfig.inc");
@@ -78,17 +97,17 @@ function saveThresholdSettings(&$configArray, &$postArray, $warningValueKey, $cr
$warningValue = 0;
$criticalValue = 0;
- if (isset($postArray[$warningValueKey])) {
+ if (isset($postArray[$warningValueKey]) && is_numeric($postArray[$warningValueKey])) {
$warningValue = (int) $postArray[$warningValueKey];
}
- if (isset($postArray[$criticalValueKey])) {
+ if (isset($postArray[$criticalValueKey]) && is_numeric($postArray[$criticalValueKey])) {
$criticalValue = (int) $postArray[$criticalValueKey];
}
if (($warningValue >= MIN_THRESHOLD_VALUE && $warningValue <= MAX_THRESHOLD_VALUE) &&
- ($criticalValue >= MIN_THRESHOLD_VALUE && $criticalValue <= MAX_THRESHOLD_VALUE) &&
- ($warningValue < $criticalValue)) {
+ ($criticalValue >= MIN_THRESHOLD_VALUE && $criticalValue <= MAX_THRESHOLD_VALUE) &&
+ ($warningValue < $criticalValue)) {
//all validated ok, save to config array
$configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$warningValueKey] = $warningValue;
$configArray[WIDGETS_CONFIG_SECTION_KEY][THERMAL_SENSORS_WIDGET_SUBSECTION_KEY][$criticalValueKey] = $criticalValue;
@@ -159,121 +178,105 @@ function getBoolValueFromConfig(&$configArray, $valueKey, $defaultValue) {
//start showing temp data
//NOTE: the refresh interval will be reset to a proper value in showThermalSensorsData() (thermal_sensors.js).
- jQuery(document).ready(function() {
+ events.push(function(){
showThermalSensorsData();
});
//]]>
</script>
-
+<div style="padding: 5px">
+ <div id="thermalSensorsContainer" class="listr">
+ (Updating...)<br /><br />
+ </div>
+</div>
+</div>
<input type="hidden" id="thermal_sensors-config" name="thermal_sensors-config" value="" />
-<div id="thermal_sensors-settings" class="widgetconfigdiv" style="display:none;">
+
+<div id="widget-<?=$widgetname?>_panel-footer" class="widgetconfigdiv panel-footer collapse" >
<form action="/widgets/widgets/thermal_sensors.widget.php" method="post" id="iform_thermal_sensors_settings" name="iform_thermal_sensors_settings">
<table>
<tr>
- <td align="left" colspan="2">
- <span style="font-weight: bold" >Thresholds in &deg;C (1 to 100):</span>
+ <td class="text-left" colspan="2">
+ <strong>Thresholds in &deg;C (1 to 100):</strong>
</td>
- <td align="right" colspan="1">
- <span style="font-weight: bold" >Display settings:</span>
+ <td class="text-right" colspan="1">
+ <strong>Display settings:</strong>
</td>
</tr>
<tr>
- <td align="right">
+ <td class="text-right">
Zone Warning:
</td>
<td>
<input type="text" maxlength="3" size="3" class="formfld unknown"
- name="thermal_sensors_widget_zone_warning_threshold"
- id="thermal_sensors_widget_zone_warning_threshold"
- value="<?= $thermal_sensors_widget_zoneWarningTempThreshold; ?>" />
+ name="thermal_sensors_widget_zone_warning_threshold"
+ id="thermal_sensors_widget_zone_warning_threshold"
+ value="<?= $thermal_sensors_widget_zoneWarningTempThreshold; ?>" />
</td>
- <td align="right">
+ <td class="text-right">
<label for="thermal_sensors_widget_show_raw_output">Show raw output (no graph): </label>
<input type="checkbox"
- id="thermal_sensors_widget_show_raw_output"
- name="thermal_sensors_widget_show_raw_output"
- value="<?= $thermal_sensors_widget_showRawOutput; ?>" <?= ($thermal_sensors_widget_showRawOutput) ? " checked='checked'" : ""; ?> />
+ id="thermal_sensors_widget_show_raw_output"
+ name="thermal_sensors_widget_show_raw_output"
+ value="<?= $thermal_sensors_widget_showRawOutput; ?>" <?= ($thermal_sensors_widget_showRawOutput) ? " checked" : ""; ?> />
</td>
</tr>
<tr>
- <td align="right">
+ <td class="text-right">
Zone Critical:
</td>
<td>
<input type="text" maxlength="3" size="3" class="formfld unknown"
- name="thermal_sensors_widget_zone_critical_threshold"
- id="thermal_sensors_widget_zone_critical_threshold"
- value="<?= $thermal_sensors_widget_zoneCriticalTempThreshold; ?>" />
+ name="thermal_sensors_widget_zone_critical_threshold"
+ id="thermal_sensors_widget_zone_critical_threshold"
+ value="<?= $thermal_sensors_widget_zoneCriticalTempThreshold; ?>" />
</td>
- <td align="right">
+ <td class="text-right">
<label for="thermal_sensors_widget_show_full_sensor_name">Show full sensor name: </label>
<input type="checkbox"
- id="thermal_sensors_widget_show_full_sensor_name"
- name="thermal_sensors_widget_show_full_sensor_name"
- value="<?= $thermal_sensors_widget_showFullSensorName; ?>" <?= ($thermal_sensors_widget_showFullSensorName) ? " checked='checked'" : ""; ?> />
+ id="thermal_sensors_widget_show_full_sensor_name"
+ name="thermal_sensors_widget_show_full_sensor_name"
+ value="<?= $thermal_sensors_widget_showFullSensorName; ?>" <?= ($thermal_sensors_widget_showFullSensorName) ? " checked" : ""; ?> />
</td>
</tr>
<tr>
- <td align="right">
+ <td class="text-right">
Core Warning:
</td>
<td>
<input type="text" maxlength="3" size="3" class="formfld unknown"
- name="thermal_sensors_widget_core_warning_threshold"
- id="thermal_sensors_widget_core_warning_threshold"
- value="<?= $thermal_sensors_widget_coreWarningTempThreshold ?>" />
+ name="thermal_sensors_widget_core_warning_threshold"
+ id="thermal_sensors_widget_core_warning_threshold"
+ value="<?= $thermal_sensors_widget_coreWarningTempThreshold ?>" />
</td>
- <td align="right">
- <label for="thermal_sensors_widget_pulsate_warning">Pulsate Warning: </label>
- <input type="checkbox"
- id="thermal_sensors_widget_pulsate_warning"
- name="thermal_sensors_widget_pulsate_warning"
- value="<?= $thermal_sensors_widget_pulsateWarning; ?>" <?= ($thermal_sensors_widget_pulsateWarning) ? " checked='checked'" : ""; ?> />
+ <td class="text-right">
+
</td>
</tr>
<tr>
- <td align="right">
+ <td class="text-right">
Core Critical:
</td>
<td>
<input type="text" maxlength="3" size="3" class="formfld unknown"
- name="thermal_sensors_widget_core_critical_threshold"
- id="thermal_sensors_widget_core_critical_threshold"
- value="<?= $thermal_sensors_widget_coreCriticalTempThreshold ?>" />
+ name="thermal_sensors_widget_core_critical_threshold"
+ id="thermal_sensors_widget_core_critical_threshold"
+ value="<?= $thermal_sensors_widget_coreCriticalTempThreshold ?>" />
</td>
- <td align="right">
- <label for="thermal_sensors_widget_pulsate_critical">Pulsate Critical: </label>
- <input type="checkbox"
- id="thermal_sensors_widget_pulsate_critical"
- name="thermal_sensors_widget_pulsate_critical"
- value="<?= $thermal_sensors_widget_pulsateCritical; ?>" <?= ($thermal_sensors_widget_pulsateCritical) ? " checked='checked'" : ""; ?> />
+ <td class="text-right">
+
</td>
</tr>
<tr>
- <td align="right" colspan="3">
+ <td class="text-right" colspan="3">
<input type="submit" id="thermal_sensors_widget_submit" name="thermal_sensors_widget_submit" class="formbtn" value="Save" />
</td>
</tr>
<tr>
- <td align="left" colspan="3">
+ <td class="text-left" colspan="3">
<span>* You can configure a proper Thermal Sensor / Module under <br />
&nbsp;&nbsp;&nbsp;<a href="system_advanced_misc.php">System &gt; Advanced &gt; Miscellaneous : Thermal Sensors section</a>.</span>
</td>
</tr>
</table>
- </form>
-</div>
-
-<div style="padding: 5px">
- <div id="thermalSensorsContainer" class="listr">
- (Updating...)<br /><br />
- </div>
-</div>
+</form>
-<!-- needed to display the widget settings menu -->
-<script type="text/javascript">
-//<![CDATA[
- textlink = jQuery("#thermal_sensors-configure");
- textlink.css({display: "inline"});
-//]]>
-</script>
diff --git a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php
index 3c4f107..2360fc5 100644
--- a/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php
+++ b/src/usr/local/www/widgets/widgets/traffic_graphs.widget.php
@@ -1,21 +1,16 @@
<?php
/*
traffic_graphs.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Copyright 2007 Scott Dale
- Part of pfSense widgets (https://www.pfsense.org)
- originally based on m0n0wall (http://m0n0.ch/wall)
-
- Copyright (C) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
- and Jonathan Watt <jwatt@jwatt.org>.
+*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
* Copyright (c) 2007 Scott Dale
* Copyright (c) 2004-2005 T. Lechat <dev@lechat.org>, Manuel Kasper <mk@neon1.net>
* and Jonathan Watt <jwatt@jwatt.org>.
*
+ * Some or all of this file is based on the m0n0wall project which is
+ * Copyright (c) 2004 Manuel Kasper (BSD 2 clause)
+ *
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
@@ -68,6 +63,7 @@ $nocsrf = true;
require_once("guiconfig.inc");
require_once("pfsense-utils.inc");
+require_once("ipsec.inc");
require_once("functions.inc");
$first_time = false;
@@ -85,12 +81,12 @@ if (!is_array($a_config["shown"]["item"])) {
}
$ifdescrs = get_configured_interface_with_descr();
-if (isset($config['ipsec']['enable'])) {
+if (ipsec_enabled()) {
$ifdescrs['enc0'] = "IPsec";
}
if ($_POST) {
- if (isset($_POST["refreshinterval"])) {
+ if (isset($_POST["refreshinterval"]) && is_numericint($_POST["refreshinterval"])) {
$a_config["refreshinterval"] = $_POST["refreshinterval"];
}
@@ -101,7 +97,7 @@ if ($_POST) {
$a_config["shown"]["item"] = array();
foreach ($ifdescrs as $ifname => $ifdescr) {
- if(in_array($ifname, $_POST["shown"])) {
+ if (in_array($ifname, $_POST["shown"])) {
$a_config["shown"]["item"][] = $ifname;
}
}
@@ -121,7 +117,7 @@ if ($first_time) {
$shown[$keys[0]] = true;
}
-if (isset($a_config["refreshinterval"])) {
+if (isset($a_config["refreshinterval"]) && is_numericint($a_config["refreshinterval"])) {
$refreshinterval = $a_config["refreshinterval"];
} else {
$refreshinterval = 10;
@@ -156,15 +152,13 @@ foreach ($ifdescrs as $ifname => $ifdescr):
<object data="graph.php?ifnum=<?=$ifname?>&amp;ifname=<?=rawurlencode($ifdescr)?>&amp;timeint=<?=$refreshinterval?>&amp;initdelay=<?=$graphcounter * 2?>">
<param name="id" value="graph" />
<param name="type" value="image/svg+xml" />
- <param name="pluginspage" value="http://www.adobe.com/svg/viewer/install/auto" />
</object>
</div>
- <br />
<?php endif; ?>
<?php endforeach; ?>
<!-- close the body we're wrapped in and add a configuration-panel -->
-</div><div class="panel-footer collapse">
+</div><div id="widget-<?=$widgetname?>_panel-footer" class="panel-footer collapse">
<form action="/widgets/widgets/traffic_graphs.widget.php" method="post" class="form-horizontal">
<div class="form-group">
@@ -172,7 +166,7 @@ foreach ($ifdescrs as $ifname => $ifdescr):
<div class="col-sm-6 checkbox">
<?php foreach ($ifdescrs as $ifname => $ifdescr): ?>
<label>
- <input type="checkbox" name="shown[]"<?= $ifname?>]" value="<?=$ifname?>" <?= ($shown[$ifname]) ? "checked":""?> />
+ <input type="checkbox" name="shown[<?= $ifname?>]" value="<?=$ifname?>" <?= ($shown[$ifname]) ? "checked":""?> />
<?=$ifname?>
</label>
<?php endforeach; ?>
@@ -182,11 +176,11 @@ foreach ($ifdescrs as $ifname => $ifdescr):
<label for="scale_type_up" class="col-sm-3 control-label">Default Autoscale</label>
<div class="col-sm-6 checkbox">
<label>
- <input name="scale_type" type="radio" id="scale_type_up" value="up" <?=($config["widgets"]["trafficgraphs"]["scale_type"]=="follow" ? '' : 'checked="checked"')?> />
+ <input name="scale_type" type="radio" id="scale_type_up" value="up" <?=($config["widgets"]["trafficgraphs"]["scale_type"]=="follow" ? '' : 'checked')?> />
up
</label>
<label>
- <input name="scale_type" type="radio" id="scale_type_follow" value="up" <?=($config["widgets"]["trafficgraphs"]["scale_type"]=="follow" ? 'checked="checked"' : '')?> />
+ <input name="scale_type" type="radio" id="scale_type_follow" value="up" <?=($config["widgets"]["trafficgraphs"]["scale_type"]=="follow" ? 'checked' : '')?> />
follow
</label>
</div>
@@ -195,7 +189,7 @@ foreach ($ifdescrs as $ifname => $ifdescr):
<div class="form-group">
<label for="refreshinterval" class="col-sm-3 control-label">Refresh Interval</label>
<div class="col-sm-6">
- <input type="number" name="refreshinterval" value="<?=$refreshinterval?>" min="1" max="30" class="form-control" />
+ <input type="number" id="refreshinterval" name="refreshinterval" value="<?=$refreshinterval?>" min="1" max="30" class="form-control" />
</div>
</div>
@@ -204,4 +198,4 @@ foreach ($ifdescrs as $ifname => $ifdescr):
<button type="submit" class="btn btn-default">Save</button>
</div>
</div>
-</form> \ No newline at end of file
+</form>
diff --git a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
index a7f74cb..90f2895 100644
--- a/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
+++ b/src/usr/local/www/widgets/widgets/wake_on_lan.widget.php
@@ -1,31 +1,58 @@
<?php
/*
wake_on_lan.widget.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
-
- Copyright (C) 2010 Yehuda Katz
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INClUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2010 Yehuda Katz
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
$nocsrf = true;
@@ -39,44 +66,46 @@ if (is_array($config['wol']['wolentry'])) {
}
?>
-<div class="content">
-<table>
- <tr>
- <?php
- echo '<td class="widgetsubheader" align="center">' . gettext("Computer / Device") . '</td>';
- echo '<td class="widgetsubheader" align="center">' . gettext("Interface") . '</td>';
- echo '<td class="widgetsubheader" align="center">' . gettext("Status") . '</td>';
- ?>
- <td class="widgetsubheader">&nbsp;</td>
- </tr>
+<div class="table-responsive">
+<table class="table table-hover table-striped table-condensed">
+ <thead>
+ <tr>
+ <th class="widgetsubheader"><?=gettext("Device")?></th>
+ <th class="widgetsubheader"><?=gettext("Interface")?></th>
+ <th class="widgetsubheader"><?=gettext("Status")?></th>
+ <th class="widgetsubheader"><?=gettext("Wake")?></th>
+ </tr>
+ </thead>
+ <tbody>
<?php
-
if (count($wolcomputers) > 0) {
- foreach($wolcomputers as $wolent) {
- echo '<tr><td class="listlr">' . $wolent['descr'] . '<br />' . $wolent['mac'] . '</td>' . "\n";
- echo '<td class="listr">' . convert_friendly_interface_to_friendly_descr($wolent['interface']) . '</td>' . "\n";
+ foreach ($wolcomputers as $wolent) {
+ echo '<tr><td>' . $wolent['descr'] . '<br />' . $wolent['mac'] . '</td>' . "\n";
+ echo '<td>' . convert_friendly_interface_to_friendly_descr($wolent['interface']) . '</td>' . "\n";
$is_active = exec("/usr/sbin/arp -an |/usr/bin/grep {$wolent['mac']}| /usr/bin/wc -l|/usr/bin/awk '{print $1;}'");
$status = exec("/usr/sbin/arp -an | /usr/bin/awk '$4 == \"{$wolent['mac']}\" { print $7 }'");
+
if ($status == 'expires') {
- echo '<td class="listr" align="center">' . "\n";
- echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_pass.gif\" alt=\"pass\" /> " . gettext("Online") . "</td>\n";
+ echo '<i class="fa fa-arrow-right" data-toggle="tooltip" title="' . gettext("Online") . '"></i>';
} else if ($status == 'permanent') {
- echo '<td class="listr" align="center">' . "\n";
- echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_pass_d.gif\" alt=\"pass\" /> " . gettext("Static ARP") . "</td>\n";
+ echo '<td class="text-center">' . "\n";
+ echo '<i class="fa fa-arrow-right" data-toggle="tooltip" title="' . gettext("Static ARP") . '"></i>';
} else {
- echo '<td class="listbg" align="center">' . "\n";
- echo "<img src=\"/themes/" . $g["theme"] . "/images/icons/icon_block.gif\" alt=\"block\" />&nbsp;<font color=\"white\">" . gettext("Offline") . "</font></td>\n";
+ echo '<td class="text-center">' . "\n";
+ echo '<i class="fa fa-ban" data-toggle="tooltip" title="' . gettext("Offline") . '"></i>';
}
- echo '<td valign="middle" class="list nowrap">';
+
+ echo "</td>\n<td>";
echo "<a href='services_wol.php?mac={$wolent['mac']}&amp;if={$wolent['interface']}'> ";
- echo "<img title='" . gettext("Wake Up") . "' border='0' src='./themes/".$g['theme']."/images/icons/icon_wol_all.gif' alt='wol' /></a>\n";
+ echo '<i class="fa fa-bed" data-toggle="tooltip" title="' . gettext("Wake up!") . '"></i></a>' . "\n";
echo "</td></tr>\n";
}
} else {
- echo "<tr><td colspan=\"4\" align=\"center\">" . gettext("No saved WoL addresses") . ".</td></tr>\n";
+ echo "<tr><td colspan=\"4\" class=\"text-center\">" . gettext("No saved WoL addresses") . ".</td></tr>\n";
}
?>
+ </tbody>
</table>
-<center><a href="status_dhcp_leases.php" class="navlink">DHCP Leases Status</a></center>
+<p class="text-center"><a href="status_dhcp_leases.php" class="navlink">DHCP Leases Status</a></p>
</div>
diff --git a/src/usr/local/www/wizard.php b/src/usr/local/www/wizard.php
index 90d60e5..9914c5b 100644
--- a/src/usr/local/www/wizard.php
+++ b/src/usr/local/www/wizard.php
@@ -1,11 +1,9 @@
<?php
-/* $Id$ */
/*
wizard.php
*/
/* ====================================================================
* Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
- * Copyright (c) 2004, 2005 Scott Ullrich
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
@@ -57,7 +55,7 @@
##|+PRIV
##|*IDENT=page-pfsensewizardsubsystem
-##|*NAME=pfSense wizard subsystem page
+##|*NAME=pfSense wizard subsystem
##|*DESCR=Allow access to the 'pfSense wizard subsystem' page.
##|*MATCH=wizard.php*
##|-PRIV
@@ -70,10 +68,8 @@ require("shaper.inc");
require_once("rrd.inc");
require_once("system.inc");
-function gentitle_pkg($pgname) {
- global $config;
- return $config['system']['hostname'] . "." . $config['system']['domain'] . " - " . $pgname;
-}
+// This causes the step #, field type and field name to be printed at the top of the page
+define(DEBUG, false);
global $g;
@@ -96,8 +92,14 @@ if (empty($xml)) {
print_info_box_np(sprintf(gettext("ERROR: Could not open %s."), $xml));
die;
} else {
- if (file_exists("{$g['www_path']}/wizards/{$xml}")) {
- $pkg = parse_xml_config_pkg("{$g['www_path']}/wizards/" . $xml, "pfsensewizard");
+ $wizard_xml_prefix = "{$g['www_path']}/wizards";
+ $wizard_full_path = "{$wizard_xml_prefix}/{$xml}";
+ if (substr_compare(realpath($wizard_full_path), $wizard_xml_prefix, 0, strlen($wizard_xml_prefix))) {
+ print_info_box_np(gettext("ERROR: Invalid path specified."));
+ die;
+ }
+ if (file_exists($wizard_full_path)) {
+ $pkg = parse_xml_config_pkg($wizard_full_path, "pfsensewizard");
} else {
print_info_box_np(sprintf(gettext("ERROR: Could not open %s."), $xml));
die;
@@ -212,21 +214,15 @@ do {
}
} while ($oldstepid != $stepid);
-$closehead = false;
-$pgtitle = array($title);
-$notitle = true;
+$pgtitle = array(gettext("Wizard"), gettext($pkg['step'][0]['title'])); //First step is main title of the wizard in the breadcrumb
+$pgtitle[] = ($stepid > 0 ? gettext($pkg['step'][$stepid]['title']):''); //Following steps are sub-level breadcrumbs.
include("head.inc");
-if (file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) {
- echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/wizard.css\" media=\"all\" />\n";
-} else {
- echo "<link type=\"text/css\" rel=\"stylesheet\" href=\"/themes/{$g['theme']}/all.css\" media=\"all\" />";
-}
-
if ($pkg['step'][$stepid]['fields']['field'] != "") { ?>
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+
+
function FieldValidate(userinput, regexp, message) {
if (!userinput.match(regexp)) {
alert(message);
@@ -234,62 +230,74 @@ events.push(function(){
}
function enablechange() {
+
<?php
+
foreach ($pkg['step'][$stepid]['fields']['field'] as $field) {
if (isset($field['enablefields']) or isset($field['checkenablefields'])) {
- print "\t" . 'if (document.iform.' . strtolower($field['name']) . '.checked) {' . "\n";
+ print "\t" . 'if ( $("#" + "' . strtolower($field['name']) . '").prop("checked") ) {' . "\n";
+
if (isset($field['enablefields'])) {
$enablefields = explode(',', $field['enablefields']);
foreach ($enablefields as $enablefield) {
$enablefield = strtolower($enablefield);
- print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 0;' . "\n";
+ print "\t\t" . '$("#" + "' . $enablefield . '").prop("disabled", false);' . "\n";
}
}
+
if (isset($field['checkenablefields'])) {
$checkenablefields = explode(',', $field['checkenablefields']);
foreach ($checkenablefields as $checkenablefield) {
$checkenablefield = strtolower($checkenablefield);
- print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 0;' . "\n";
+ print "\t\t" . '$("#" + "' . $checkenablefield . '").prop("checked", true);' . "\n";
}
}
+
print "\t" . '} else {' . "\n";
if (isset($field['enablefields'])) {
$enablefields = explode(',', $field['enablefields']);
foreach ($enablefields as $enablefield) {
$enablefield = strtolower($enablefield);
- print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 1;' . "\n";
+ print "\t\t" . '$("#" + "' . $enablefield . '").prop("disabled", true);' . "\n";
+
}
}
- if (isset($field['checkenablefields'])) {
- $checkenablefields = explode(',', $field['checkenablefields']);
- foreach ($checkenablefields as $checkenablefield) {
- $checkenablefield = strtolower($checkenablefield);
- print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 1;' . "\n";
+
+ if (isset($field['checkdisablefields'])) {
+ $checkenablefields = explode(',', $field['checkdisablefields']);
+ foreach ($checkenablefields as $checkenablefield) {
+ $checkenablefield = strtolower($checkenablefield);
+ print "\t\t" . '$("#" + "' . $checkenablefield . '").prop("checked", false);' . "\n";
}
}
+
print "\t" . '}' . "\n";
}
}
?>
+
}
function disablechange() {
<?php
foreach ($pkg['step'][$stepid]['fields']['field'] as $field) {
if (isset($field['disablefields']) or isset($field['checkdisablefields'])) {
- print "\t" . 'if (document.iform.' . strtolower($field['name']) . '.checked) {' . "\n";
+
+ print "\t" . 'if ( $("#" + "' . strtolower($field['name']) . '").prop("checked") ) {' . "\n";
+
if (isset($field['disablefields'])) {
$enablefields = explode(',', $field['disablefields']);
foreach ($enablefields as $enablefield) {
$enablefield = strtolower($enablefield);
- print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 1;' . "\n";
+
+ print "\t\t" . '$("#" + "' . $enablefield . '").prop("disabled", true);' . "\n";
}
}
if (isset($field['checkdisablefields'])) {
$checkenablefields = explode(',', $field['checkdisablefields']);
foreach ($checkenablefields as $checkenablefield) {
$checkenablefield = strtolower($checkenablefield);
- print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 1;' . "\n";
+ print "\t\t" . '$("#" + "' . $checkenablefield . '").prop("checked", true);' . "\n";
}
}
print "\t" . '} else {' . "\n";
@@ -297,14 +305,14 @@ events.push(function(){
$enablefields = explode(',', $field['disablefields']);
foreach ($enablefields as $enablefield) {
$enablefield = strtolower($enablefield);
- print "\t\t" . 'document.iform.' . $enablefield . '.disabled = 0;' . "\n";
+ print "\t\t" . '$("#" + "' . $enablefield . '").prop("disabled", false);' . "\n";
}
}
if (isset($field['checkdisablefields'])) {
$checkenablefields = explode(',', $field['checkdisablefields']);
foreach ($checkenablefields as $checkenablefield) {
$checkenablefield = strtolower($checkenablefield);
- print "\t\t" . 'document.iform.' . $checkenablefield . '.checked = 0;' . "\n";
+ print "\t\t" . '$("#" + "' . $checkenablefield . '").prop("checked", false);' . "\n";
}
}
print "\t" . '}' . "\n";
@@ -340,7 +348,7 @@ events.push(function(){
}
?>
}
-});
+
//]]>
</script>
<?php }
@@ -417,8 +425,6 @@ function is_timezone($elt) {
return !preg_match("/\/$/", $elt);
}
-require('classes/Form.class.php');
-
if ($title == "Reload in progress") {
$ip = fixup_string("\$myurl");
} else {
@@ -442,7 +448,7 @@ $completion = ($stepid == 0) ? 0:($stepid * 100) / ($totalsteps -1);
?>
<!-- Present the pfSense logo -->
-<div style="text-align:center"><p><a href="<?=$ip?>"><img border="0" src="logo-black.png" alt="logo-black" align="middle" height="45" width="180" /></a></p></div><br /><br/>
+<div class="text-center"><p><a href="<?=$ip?>"><img border="0" src="logo-black.png" alt="logo-black" align="middle" height="45" width="180" /></a></p></div><br /><br/>
<!-- Draw a progress bar to show step progress -->
<div class="progress">
@@ -470,7 +476,7 @@ $form->addGlobal(new Form_Input(
$section = new Form_Section(fixup_string($title));
-if($description) {
+if ($description) {
$section->addInput(new Form_StaticText(
null,
fixup_string($description)
@@ -510,6 +516,11 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
eval($toeval);
}
+
+ if (DEBUG) {
+ print('Step: ' . $pkg['step'][$stepid]['id'] . ', Field: ' . $field['type'] . ', Name: ' . $name . '<br />');
+ }
+
switch ($field['type']) {
case "input":
if ($field['displayname']) {
@@ -525,7 +536,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
'text',
$value
))->setHelp($field['description'])
- ->setOnchange(($field['validate']) ? 'FieldValidate(this.value, "{$field[\'validate\']}", "{$field[\'message\']}");':'');
+ ->setOnchange(($field['validate']) ? "FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] . ")":"");
break;
case "text":
@@ -546,7 +557,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$onchange = "";
if ($field['validate']) {
- $onchange="FieldValidate(this.value, \"{$field['validate']}\", \"{$field['message']}\");'";
+ $onchange="FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] . ")";
}
$section->addInput(new Form_Input(
@@ -568,10 +579,11 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$etitle = (fixup_string($field['displayname'])) ? $field['displayname'] : $field['name'];
- if (($field['multiple'] != "") && ($field['multiple'] != "0"))
+ if (($field['multiple'] != "") && ($field['multiple'] != "0")) {
$multiple = true;
- else
+ } else {
$multiple = false;
+ }
if ($field['add_to_interfaces_selection'] != "") {
if ($field['add_to_interfaces_selection'] == $value) {
@@ -595,8 +607,9 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
}
}
- if ($value == $ifname)
+ if ($value == $ifname) {
array_push($selected, $value);
+ }
$canecho = 0;
if ($field['interface_filter'] != "") {
@@ -634,7 +647,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
'password',
$value
))->setHelp($field['description'])
- ->setOnchange(($field['validate']) ? 'FieldValidate(this.value, "{$field[\'validate\']}", "{$field[\'message\']}");':'');
+ ->setOnchange(($field['validate']) ? "FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] .")":"");
break;
case "certca_selection":
@@ -654,21 +667,22 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
}
foreach ($config['ca'] as $ca) {
- $name = htmlspecialchars($ca['descr']);
+ $caname = htmlspecialchars($ca['descr']);
- if ($value == $name)
+ if ($value == $caname) {
$selected = $value;
+ }
$canecho = 0;
if ($field['certca_filter'] != "") {
- if (stristr($name, $field['certca_filter']) == true) {
+ if (stristr($caname, $field['certca_filter']) == true) {
$canecho = 1;
}
} else {
$canecho = 1;
}
if ($canecho == 1) {
- $options[$ca['refid']] = $name;
+ $options[$ca['refid']] = $caname;
}
}
@@ -689,8 +703,6 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$etitle = (fixup_string($field['displayname']) ? $field['displayname'] : $field['name']);
- echo "<select id='{$name}' name='{$name}' {$size}>\n";
-
if ($field['add_to_cert_selection'] != "") {
if ($field['add_to_cert_selection'] == $value) {
array_push($selected, $value);
@@ -704,16 +716,16 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
continue;
}
- $name = htmlspecialchars($ca['descr']);
+ $caname = htmlspecialchars($ca['descr']);
- if ($value == $name) {
+ if ($value == $caname) {
array_push($selected, $value);
}
$canecho = 0;
if ($field['cert_filter'] != "") {
- if (stristr($name, $field['cert_filter']) == true) {
+ if (stristr($caname, $field['cert_filter']) == true) {
$canecho = 1;
}
} else {
@@ -721,7 +733,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
}
if ($canecho == 1) {
- $options[$ca['refid']] = $name;
+ $options[$ca['refid']] = $caname;
}
}
@@ -786,13 +798,13 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$etitle = fixup_string($field['name']);
}
- $section->addInput(new Form_TextArea(
+ $section->addInput(new Form_Textarea(
$name,
$etitle,
$value
))->setHelp($field['description'])
->setAttribute('rows', $field['rows'])
- ->setOnchange(($field['validate']) ? 'FieldValidate(this.value, "{$field[\'validate\']}", "{$field[\'message\']}");':'');
+ ->setOnchange(($field['validate']) ? "FieldValidate(this.value, " . $field['validate'] . ", " . $field['message'] . ")":"");
break;
case "submit":
@@ -843,7 +855,7 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
$section->addInput(new Form_Select(
$name,
$etitle,
- $value,
+ ($value == "") ? $g['default_timezone'] : $value,
array_combine($timezonelist, $timezonelist)
))->setHelp($field['description']);
@@ -857,9 +869,9 @@ if ($pkg['step'][$stepid]['fields']['field'] != "") {
}
if (isset($field['enablefields']) or isset($field['checkenablefields'])) {
- $onclick = "Javascript:enablechange()";
+ $onclick = "enablechange()";
} else if (isset($field['disablefields']) or isset($field['checkdisablefields'])) {
- $onclick = "Javascript:disablechange()";
+ $onclick = "disablechange()";
}
$section->addInput(new Form_Checkbox(
@@ -882,7 +894,7 @@ print($form);
<script type="text/javascript">
//<![CDATA[
-events.push(function(){
+
if (typeof ext_change != 'undefined') {
ext_change();
}
@@ -924,7 +936,7 @@ events.push(function(){
}
?>
}
-});
+
//]]>
</script>
@@ -983,9 +995,11 @@ if ($pkg['step'][$stepid]['disableallfieldsbydefault'] != "") {
<script type="text/javascript">
//<![CDATA[
+events.push(function() {
enablechange();
disablechange();
showchange();
+});
//]]>
</script>
diff --git a/src/usr/local/www/wizards/openvpn_wizard.inc b/src/usr/local/www/wizards/openvpn_wizard.inc
index ee530a2..b8e15e1 100644
--- a/src/usr/local/www/wizards/openvpn_wizard.inc
+++ b/src/usr/local/www/wizards/openvpn_wizard.inc
@@ -1,5 +1,8 @@
<?php
/*
+ openvpn_wizard.inc
+*/
+/*
Copyright (C) 2010 Ermal Luçi
All rights reserved.
@@ -23,8 +26,6 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-
- pfSense_MODULE: openvpn
*/
require_once("openvpn.inc");
@@ -207,7 +208,7 @@ function step7_submitphpaction() {
empty($_POST['organization']) || empty($_POST['email'])) {
$stepid--;
$savemsg = "Please enter all information for the new Certificate Authority.";
- } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) ||
+ } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) ||
has_special_chars($_POST['city']) || has_special_chars($_POST['organization'])) {
$stepid--;
$input_errors[] = "Please do not use special characters in Certificate field names.";
@@ -240,7 +241,7 @@ function step8_submitphpaction() {
unset($config['ovpnserver']['step9']['uselist']);
$stepid++;
} else {
- $config['ovpnserver']['step6']['uselist'] = "on";
+ $config['ovpnserver']['step9']['uselist'] = "on";
$_POST['uselist'] = "on";
}
}
@@ -298,7 +299,7 @@ function step9_submitphpaction() {
$certnames[] = $cert['descr'];
$certinfo = cert_get_subject_hash($cert['crt']);
$certcns[] = $certinfo["CN"];
- }
+ }
}
if (preg_match("/[\?\>\<\&\/\\\"\']/", $_POST['descr'])) {
@@ -310,13 +311,13 @@ function step9_submitphpaction() {
empty($_POST['organization']) || empty($_POST['email'])) {
$stepid--;
$savemsg = "Please enter all information for the new certificate.";
- } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) ||
+ } elseif (has_special_chars($_POST['country']) || has_special_chars($_POST['state']) ||
has_special_chars($_POST['city']) || has_special_chars($_POST['organization'])) {
$stepid--;
$input_errors[] = "Please do not use special characters in Certificate field names.";
} elseif (in_array($_POST['descr'], $certnames) || in_array($_POST['descr'], $certcns)) {
$stepid--;
- $savemsg = "Please enter a different name for the Certificate. A Certificate with that name/common name already exists.";
+ $savemsg = "Please enter a different name for the Certificate. A Certificate with that name/common name already exists.";
} elseif (strlen($_POST['country']) != 2) {
$stepid--;
$savemsg = "Please enter only a two-letter ISO country code";
@@ -583,6 +584,7 @@ function step12_submitphpaction() {
}
$server['dh_length'] = $pconfig['step10']['dhkey'];
$server['tunnel_network'] = $pconfig['step10']['tunnelnet'];
+ $server['topology'] = $pconfig['step10']['topology'];
if (isset($pconfig['step10']['rdrgw']))
$server['gwredir'] = $pconfig['step10']['rdrgw'];
if (isset($pconfig['step10']['localnet']))
diff --git a/src/usr/local/www/wizards/openvpn_wizard.xml b/src/usr/local/www/wizards/openvpn_wizard.xml
index 6aea7fd..8eee453 100644
--- a/src/usr/local/www/wizards/openvpn_wizard.xml
+++ b/src/usr/local/www/wizards/openvpn_wizard.xml
@@ -32,9 +32,9 @@
<totalsteps>12</totalsteps>
<step>
<id>1</id>
- <title>OpenVPN Wizard: Authentication Type Selection</title>
- <description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <title>OpenVPN Remote Access Server Setup</title>
+ <description>This wizard will guide you through an OpenVPN Remote Access Server Setup .&lt;br/&gt;&lt;br/&gt; The wizard may be stopped at any time by clicking the logo image at the top of the screen.</description>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -71,9 +71,9 @@
</step>
<step>
<id>2</id>
- <title>OpenVPN Wizard: LDAP Server Selection</title>
+ <title>LDAP Server Selection</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -107,9 +107,9 @@
</step>
<step>
<id>3</id>
- <title>OpenVPN Wizard: Add LDAP Server</title>
+ <title>Add LDAP Server</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -234,9 +234,9 @@
</step>
<step>
<id>4</id>
- <title>OpenVPN Wizard: RADIUS Server Selection</title>
+ <title>RADIUS Server Selection</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -270,9 +270,9 @@
</step>
<step>
<id>5</id>
- <title>OpenVPN Wizard: Add RADIUS Server</title>
+ <title>Add RADIUS Server</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -319,9 +319,9 @@
</step>
<step>
<id>6</id>
- <title>OpenVPN Wizard: Certificate Authority Selection</title>
+ <title>Certificate Authority Selection</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<name>Choose a Certificate Authority (CA)</name>
@@ -348,9 +348,9 @@
</step>
<step>
<id>7</id>
- <title>OpenVPN Wizard: Add Certificate Authority</title>
+ <title>Add Certificate Authority</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<name>Create a New Certificate Authority (CA) Certificate</name>
@@ -450,9 +450,9 @@
</step>
<step>
<id>8</id>
- <title>OpenVPN Wizard: Server Certificate Selection</title>
+ <title>Server Certificate Selection</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<name>Choose a Server Certificate</name>
@@ -479,9 +479,9 @@
</step>
<step>
<id>9</id>
- <title>OpenVPN Wizard: Add a Server Certificate</title>
+ <title>Add a Server Certificate</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<name>Create a New Server Certificate</name>
@@ -581,9 +581,9 @@
</step>
<step>
<id>10</id>
- <title>OpenVPN Wizard: Server Setup</title>
+ <title>Server Setup</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -810,6 +810,24 @@
<bindstofield>ovpnserver->step10->addrpool</bindstofield>
</field>
<field>
+ <displayname>Topology</displayname>
+ <name>topology</name>
+ <type>select</type>
+ <value>subnet</value>
+ <bindstofield>ovpnserver->step10->topology</bindstofield>
+ <options>
+ <option>
+ <name>Subnet -- One IP address per client in a common subnet</name>
+ <value>subnet</value>
+ </option>
+ <option>
+ <name>net30 -- Isolated /30 network per client</name>
+ <value>net30</value>
+ </option>
+ </options>
+ <description>Specifies the method used to supply a virtual adapter IP address to clients when using tun mode on IPv4.&lt;br /&gt;Some clients may require this be set to &quot;subnet&quot; even for IPv6, such as OpenVPN Connect (iOS/Android).&lt;br /&gt;Older versions of OpenVPN (before 2.0.9) or clients such as Yealink phones may require &quot;net30&quot;.</description>
+ </field>
+ <field>
<displayname>DNS Default Domain</displayname>
<name>defaultdomain</name>
<type>input</type>
@@ -918,9 +936,9 @@
</step>
<step>
<id>11</id>
- <title>OpenVPN Wizard: Firewall Rule Configuration</title>
+ <title>Firewall Rule Configuration</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -960,9 +978,9 @@
</step>
<step>
<id>12</id>
- <title>OpenVPN Wizard: Finished!</title>
+ <title>Finished!</title>
<description>OpenVPN Remote Access Server Setup Wizard</description>
- <disableheader>on</disableheader>
+ <disableheader>true</disableheader>
<fields>
<field>
<type>listtopic</type>
@@ -984,4 +1002,4 @@
<stepsubmitphpaction>step12_submitphpaction();</stepsubmitphpaction>
<includefile>/usr/local/www/wizards/openvpn_wizard.inc</includefile>
</step>
-</pfsensewizard> \ No newline at end of file
+</pfsensewizard>
diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml
index 9da0509..20281f7 100644
--- a/src/usr/local/www/wizards/setup_wizard.xml
+++ b/src/usr/local/www/wizards/setup_wizard.xml
@@ -1,40 +1,61 @@
<?xml version="1.0" encoding="utf-8" ?>
<pfsensewizard>
<copyright>
-/* $Id$ */
-/*
- setup_wizard.xml
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2004, 2005 Scott Ullrich
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
-*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
</copyright>
<totalsteps>10</totalsteps>
<step>
<id>1</id>
- <title>pfSense Setup Wizard</title>
+ <title>pfSense Setup</title>
<disableheader>true</disableheader>
<description>This wizard will guide you through the initial configuration of pfSense.&lt;br/&gt;&lt;br/&gt; The wizard may be stopped at any time by clicking the logo image at the top of the screen.</description>
<fields>
@@ -127,19 +148,31 @@
<stepsubmitphpaction>
<![CDATA[
if(empty($_POST['hostname']) || !is_unqualified_hostname($_POST['hostname'])) {
- print_info_box_np("Hostname is invalid. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Hostname is invalid. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(empty($_POST['domain']) || !is_domain($_POST['domain'])) {
- print_info_box_np("Domain is invalid. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Domain is invalid. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(!empty($_POST['primarydnsserver']) && !is_ipaddr($_POST['primarydnsserver'])) {
- print_info_box_np("Primary DNS server is invalid. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Primary DNS server is invalid. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(!empty($_POST['secondarydnsserver']) && !is_ipaddr($_POST['secondarydnsserver'])) {
- print_info_box_np("Second DNS server is invalid. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Second DNS server is invalid. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
]]>
@@ -170,7 +203,9 @@
<![CDATA[
foreach (explode(' ', $_POST['timeserverhostname']) as $ts) {
if (!is_domain($ts)) {
- print_info_box_np(gettext("NTP Time Server names may only contain the characters a-z, 0-9, '-' and '.'. Entries may be separated by spaces. Please press back in your browser window and correct."));
+ $input_errors[] = gettext("NTP Time Server names may only contain the characters a-z, 0-9, '-' and '.'. Entries may be separated by spaces. Please press back in your browser window and correct.");
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
}
@@ -200,6 +235,25 @@
}
document.forms[0].selectedtype.selectedIndex = selectedItem;
enableitems(selectedItem);
+
+ events.push(function(){
+ $('#showpppoepassword').click(function(event) {
+ if(this.checked) {
+ $('#pppoepassword').attr('type', 'text');
+ } else {
+ $('#pppoepassword').attr('type', 'password');
+ }
+ });
+
+ $('#showpptppassword').click(function(event) {
+ if(this.checked) {
+ $('#pptppassword').attr('type', 'text');
+ } else {
+ $('#pptppassword').attr('type', 'password');
+ }
+ });
+ });
+
</javascriptafterformdisplay>
<fields>
<field>
@@ -220,12 +274,12 @@
<option>
<name>PPPoE</name>
<value>pppoe</value>
- <enablefields>pppoeusername,pppoepassword,pppoeservicename,pppoedialondemand,pppoeidletimeout</enablefields>
+ <enablefields>pppoeusername,pppoepassword,pppoeservicename,pppoedialondemand,pppoeidletimeout,showpppoepassword</enablefields>
</option>
<option>
<name>PPTP</name>
<value>pptp</value>
- <enablefields>pptpusername,pptppassword,pptplocalipaddress,pptplocalsubnet,pptpremoteipaddress,pptpdialondemand,pptpidletimeout
+ <enablefields>pptpusername,pptppassword,pptplocalipaddress,pptplocalsubnet,pptpremoteipaddress,pptpdialondemand,pptpidletimeout,showpptppassword
</enablefields>
</option>
</options>
@@ -306,10 +360,15 @@
</field>
<field>
<name>PPPoE Password</name>
- <type>input</type>
+ <type>password</type>
<bindstofield>wizardtemp->wan->password</bindstofield>
</field>
<field>
+ <name>Show PPPoE password</name>
+ <type>checkbox</type>
+ <typehint>Reveal password characters</typehint>
+ </field>
+ <field>
<name>PPPoE Service name</name>
<type>input</type>
<description>Hint: this field can usually be left empty</description>
@@ -339,10 +398,15 @@
</field>
<field>
<name>PPTP Password</name>
- <type>input</type>
+ <type>password</type>
<bindstofield>wizardtemp->wan->pptppassword</bindstofield>
</field>
<field>
+ <name>Show PPTP password</name>
+ <type>checkbox</type>
+ <typehint>Reveal password characters</typehint>
+ </field>
+ <field>
<combinefieldsbegin>true</combinefieldsbegin>
<name>PPTP Local IP Address</name>
<type>input</type>
@@ -370,12 +434,12 @@
<name>PPTP Dial on demand</name>
<typehint>Enable Dial-On-Demand mode</typehint>
<type>checkbox</type>
- <bindstofield>wizardtemp->wan->pptpondemand</bindstofield>
+ <bindstofield>wizardtemp->wan->pptpondemand</bindstofield>
<description>This option causes the interface to operate in dial-on-demand mode, allowing you to have a virtual full time connection. The interface is configured, but the actual connection of the link is delayed until qualifying outgoing traffic is detected.</description>
</field>
<field>
<name>PPTP Idle timeout</name>
- <type>input</type>
+ <type>input</type>
<bindstofield>wizardtemp->wan->pptpidletimeout</bindstofield>
<description>If no qualifying outgoing packets are transmitted for the specified number of seconds, the connection is brought down. An idle timeout of zero disables this feature.</description>
</field>
@@ -424,35 +488,56 @@
<stepsubmitphpaction>
<![CDATA[
if(!empty($_POST['mtu']) && ($_POST['mtu'] < 576)) {
- print_info_box_np("MTU Must be at least 576 (Per RFC 791). Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "MTU Must be at least 576 (Per RFC 791). Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(!empty($_POST['macaddress']) && !is_macaddr($_POST['macaddress'])) {
- print_info_box_np("Invalid MAC Address. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid MAC Address. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(!empty($_POST['ipaddress']) && ($_POST['selectedtype'] == "Static")) {
if (!is_ipaddr($_POST['ipaddress'])) {
- print_info_box_np("Invalid WAN IP Address. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid WAN IP Address. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if ($_POST['subnetmask'] < 31 &&
($_POST['ipaddress'] == gen_subnet($_POST['ipaddress'], $_POST['subnetmask']) ||
$_POST['ipaddress'] == gen_subnet_max($_POST['ipaddress'], $_POST['subnetmask']))) {
- print_info_box_np("Invalid WAN IP Address. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid WAN IP Address. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
}
if(!empty($_POST['dhcphostname']) && !is_hostname($_POST['dhcphostname'])) {
- print_info_box_np("Invalid DHCP Hostname. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid DHCP Hostname. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(!empty($_POST['pptplocalipaddress']) && !is_ipaddr($_POST['pptplocalipaddress'])) {
- print_info_box_np("Invalid PPTP Local IP Address. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid PPTP Local IP Address. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if(!empty($_POST['pptpremoteipaddress']) && !is_ipaddr($_POST['pptpremoteipaddress'])) {
- print_info_box_np("Invalid PPTP Remote IP Address. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid PPTP Remote IP Address. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
$type = $_POST['selectedtype'];
@@ -498,13 +583,13 @@
</stepsubmitphpaction>
<stepsubmitbeforesave>
<![CDATA[
- if($_POST['selectedtype'] == "Static") {
-
+ if($_POST['selectedtype'] == "Static") {
+
} else {
$_POST['ipaddress'] = $_POST['selectedtype'];
$config['interfaces']['wan']['ipaddr'] = $_POST['selectedtype'];
write_config();
- if(!$config['interfaces']['lan'])
+ if(!$config['interfaces']['lan'])
header("Location: /wizard.php?xml=setup_wizard.xml&stepid=6&next=Next");
}
]]>
@@ -545,15 +630,24 @@
if ($_POST['subnetmask'] < 31) {
if ($_POST['lanipaddress'] == $lowestip) {
- print_info_box_np("LAN IP Address equals subnet network address. This is not allowed. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "LAN IP Address equals subnet network address. This is not allowed. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
if ($_POST['lanipaddress'] == $highestip) {
- print_info_box_np("LAN IP Address equals subnet broadcast address. This is not allowed. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "LAN IP Address equals subnet broadcast address. This is not allowed. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
} else {
- print_info_box_np("Invalid subnet mask, choose a mask less than 31. Please press back in your browser window and correct.");
+ include("head.inc");
+ $input_errors[] = "Invalid subnet mask, choose a mask less than 31. Please press back in your browser window and correct.";
+ print_input_errors($input_errors);
+ include("foot.inc");
die;
}
@@ -607,9 +701,10 @@
</field>
</fields>
<stepsubmitphpaction>
+ <![CDATA[
if($_POST['adminpassword'] != "") {
if($_POST['adminpassword'] == $_POST['adminpasswordagain']) {
- $admin_user =&amp; getUserEntryByUID(0);
+ $admin_user =& getUserEntryByUID(0);
local_user_set_password($admin_user, $_POST['adminpassword']);
local_user_set($admin_user);
write_config();
@@ -618,6 +713,7 @@
die;
}
}
+ ]]>
</stepsubmitphpaction>
</step>
<step>
@@ -636,7 +732,7 @@
<id>9</id>
<title>Reload in progress</title>
<description>
- A reload is now in progress. Please wait. &lt;p&gt;
+ A reload is now in progress. Please wait. &lt;p&gt;
&lt;meta http-equiv="refresh" content="5; url=wizard.php?xml=setup_wizard.xml&amp;stepid=9" &gt;
&lt;p&gt;
The wizard will redirect to the next step once the reload is completed.
@@ -688,7 +784,7 @@
if($g['product_name'] <> 'pfSense') {
header("Location: " . fixup_string("\$myurl"));
exit;
- }
+ }
]]>
</stepbeforeformdisplay>
<description>
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
index d984fed..796752b 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.inc
@@ -1,34 +1,57 @@
<?php
/*
traffic_shaper_wizard_dedicated.inc
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2006 Bill Marquette - bill.marquette@gmail.com.
- Copyright (C) 2006 Scott Ullrich - sullrich@pfsense.com.
- Copyright (C) 2008-2010 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
function step1_stepbeforeformdisplay() {
global $stepid, $savemsg, $pkg;
@@ -238,7 +261,7 @@ function step2_stepbeforeformdisplay() {
$field['displayname'] = "Download";
$field['name'] = "conn{$i}download";
$field['type'] = "input";
- $field['bindstofield'] = "ezshaper->step2->conn{$i}download";
+ $field['bindstofieldnext'] = "ezshaper->step2->conn{$i}download";
$field['combinefieldsbegin'] = "true";
$fields[] = $field;
@@ -357,11 +380,6 @@ function step3_stepbeforeformdisplay() {
$voipfields[] = $field;
$field = array();
- $field['name'] = "Next";
- $field['type'] = "submit";
- $voipfields[] = $field;
-
- $field = array();
$field['name'] = "VOIP specific settings";
$field['type'] = "listtopic";
$voipfields[] = $field;
@@ -409,7 +427,7 @@ function step3_stepbeforeformdisplay() {
$voipfields[] = $field;
$field = array();
- $field['displayname'] = "Upload";
+ $field['displayname'] = "Upload rate";
$field['name'] = "conn{$i}upload";
$enablefields[] = "conn{$i}upload";
$field['type'] = "input";
@@ -418,6 +436,7 @@ function step3_stepbeforeformdisplay() {
$voipfields[] = $field;
$field = array();
+ $field['displayname'] = "Units";
$field['combinefieldsend'] = "true";
$field['dontdisplayname'] = "true";
$field['dontcombinecells'] = "true";
@@ -442,7 +461,7 @@ function step3_stepbeforeformdisplay() {
$voipfields[] = $field;
$field = array();
- $field['displayname'] = "Download";
+ $field['displayname'] = "Download rate";
$field['name'] = "local{$i}download";
$enablefields[] = "local{$i}download";
$field['type'] = "input";
@@ -452,6 +471,7 @@ function step3_stepbeforeformdisplay() {
$field = array();
$field['combinefieldsend'] = "true";
+ $field['displayname'] = "Units";
$field['dontdisplayname'] = "true";
$field['dontcombinecells'] = "true";
$field['name'] = "local{$i}downloadspeed";
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml
index c86a72a..96cb828 100755
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_dedicated.xml
@@ -1,43 +1,64 @@
<?xml version="1.0"?>
<pfsensewizard>
<copyright><![CDATA[
- /*
- traffic_shaper_wizard_dedicated.xml
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2005 Bill Marquette - bill.marquette@gmail.com.
- Copyright (C) 2008-2010 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */]]></copyright>
+ /* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */]]></copyright>
<totalsteps>9</totalsteps>
<step>
<id>1</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>pfSense Traffic Shaper</title>
<disableheader>true</disableheader>
- <description>This wizard will guide you through setting up the pfSense traffic shaper.
- Please be aware that Custom Bandwidths should not exceed 30% of the interface/link bandwidth. Keep this in mind during the wizard.
+ <description>This wizard will guide you through setting up the pfSense traffic shaper.&lt;br/&gt;&lt;br/&gt; The wizard may be stopped at any time by clicking the logo image at the top of the screen.
+ &lt;br/&gt;&lt;br/&gt; Please be aware that Custom Bandwidths should not exceed 30% of the interface/link bandwidth. Keep this in mind during the wizard.
</description>
<fields>
<field>
@@ -63,7 +84,7 @@
</step>
<step>
<id>2</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Shaper configuration</title>
<description>Shaper configuration</description>
<javascriptafterformdisplay/>
<stepbeforeformdisplay>step2_stepbeforeformdisplay();</stepbeforeformdisplay>
@@ -78,7 +99,7 @@
</step>
<step>
<id>3</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Voice over IP</title>
<description>Voice over IP</description>
<fields>
<field>
@@ -89,11 +110,7 @@
<bindstofield>ezshaper-&gt;step3-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
- <name>VOIP specific settings</name>
+ <name>VOIP specific settingsX</name>
<type>listtopic</type>
</field>
<field>
@@ -132,7 +149,7 @@
<name>Bandwidth</name>
<type>input</type>
<validate>^[0-9]*$</validate>
- <typehint>Total bandwidth in percentage(%)(should be between 5 and 40) guarantee for VOIP traffic.</typehint>
+ <description>Total bandwidth in percentage(%)(should be between 5 and 40) guarantee for VOIP traffic.</description>
<bindstofield>ezshaper-&gt;step3-&gt;bandwidth</bindstofield>
</field>
<field>
@@ -146,7 +163,7 @@
</step>
<step>
<id>4</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Penalty Box</title>
<description>Penalty Box</description>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<fields>
@@ -160,10 +177,6 @@
<bindstofield>ezshaper-&gt;step4-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>PenaltyBox specific settings</name>
<type>listtopic</type>
</field>
@@ -187,14 +200,15 @@
<dontdisplayname>true</dontdisplayname>
<dontcombinecells>true</dontcombinecells>
<donotdisable>true</donotdisable>
- <name>BandwidthSpeed</name>
+ <displayname>Units</displayname>
+ <name>BandwidthSpeed</name>
<description>The limit you want to apply.</description>
- <type>select</type>
+ <type>select</type>
<options>
<option>
- <name>%</name>
- <value>%</value>
- </option>
+ <name>%</name>
+ <value>%</value>
+ </option>
<option>
<name>bit/s</name>
<value>b</value>
@@ -212,8 +226,8 @@
<value>Gb</value>
</option>
</options>
- <bindstofield>ezshaper->step4->bandwidthunit</bindstofield>
- </field>
+ <bindstofield>ezshaper->step4->bandwidthunit</bindstofield>
+ </field>
<field>
<name>Next</name>
<type>submit</type>
@@ -224,7 +238,7 @@
</step>
<step>
<id>5</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Peer to Peer networking</title>
<description>Peer to Peer networking</description>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<fields>
@@ -238,10 +252,6 @@
<bindstofield>ezshaper-&gt;step5-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>p2p Catch all</name>
<type>listtopic</type>
</field>
@@ -265,6 +275,7 @@
<dontcombinecells>true</dontcombinecells>
<donotdisable>true</donotdisable>
<name>BandwidthSpeed</name>
+ <displayname>Units</displayname>
<description>The limit you want to apply.</description>
<type>select</type>
<options>
@@ -431,7 +442,7 @@
</step>
<step>
<id>6</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Network Games</title>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<description>Network Games</description>
<fields>
@@ -445,10 +456,6 @@
<bindstofield>ezshaper-&gt;step6-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>Enable/Disable specific game consoles and services</name>
<type>listtopic</type>
</field>
@@ -753,7 +760,7 @@
</step>
<step>
<id>7</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Raise or lower other Applications</title>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<description>Raise or lower other Applications</description>
<fields>
@@ -767,10 +774,6 @@
<bindstofield>ezshaper-&gt;step7-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>Remote Service / Terminal emulation</name>
<type>listtopic</type>
</field>
@@ -1631,7 +1634,7 @@
</step>
<step>
<id>8</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Reload profile</title>
<field>
<name>Reload profile notice</name>
<type>listtopic</type>
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
index 3f68869..91b9b19 100644
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.inc
@@ -1,34 +1,57 @@
<?php
/*
traffic_shaper_wizard_multi_all.inc
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2006 Bill Marquette - bill.marquette@gmail.com.
- Copyright (C) 2006 Scott Ullrich - sullrich@pfsense.com.
- Copyright (C) 2008-2010 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
function step1_stepbeforeformdisplay() {
global $stepid, $savemsg, $pkg;
@@ -393,11 +416,6 @@ function step3_stepbeforeformdisplay() {
$voipfields[] = $field;
$field = array();
- $field['name'] = "Next";
- $field['type'] = "submit";
- $voipfields[] = $field;
-
- $field = array();
$field['name'] = "VOIP specific settings";
$field['type'] = "listtopic";
$voipfields[] = $field;
@@ -459,6 +477,7 @@ function step3_stepbeforeformdisplay() {
$field['name'] = "conn{$i}uploadspeed";
$enablefields[] = "conn{$i}uploadspeed";
$field['typehint'] = "Upload bandwidth guarantee for VOIP phone(s) on connection {$i}.";
+ $field['displayname'] = "Units";
$field['type'] = "select";
$field['options']['option'] = array();
$opts = array();
@@ -500,6 +519,7 @@ function step3_stepbeforeformdisplay() {
$field['name'] = "local{$i}downloadspeed";
$enablefields[] = "local{$i}downloadspeed";
$field['typehint'] = "Download bandwidth guarantee for VOIP phone(s) on connections.";
+ $field['displayname'] = "Units";
$field['type'] = "select";
$field['options']['option'] = array();
$opts = array();
diff --git a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml
index e94256b..f49138c 100755
--- a/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml
+++ b/src/usr/local/www/wizards/traffic_shaper_wizard_multi_all.xml
@@ -1,43 +1,64 @@
<?xml version="1.0"?>
<pfsensewizard>
<copyright><![CDATA[
- /*
- traffic_shaper_wizard_multi_all.xml
- part of pfSense (https://www.pfsense.org/)
-
- Copyright (C) 2005 Bill Marquette - bill.marquette@gmail.com.
- Copyright (C) 2008-2010 Ermal Luçi
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
- */]]></copyright>
+ /* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */]]></copyright>
<totalsteps>9</totalsteps>
<step>
<id>1</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>pfSense Traffic Shaper</title>
<disableheader>true</disableheader>
- <description>This wizard will guide you through setting up the pfSense traffic shaper.
- Please be aware that Custom Bandwidths should not exceed 30% of the interface/link bandwidth. Keep this in mind during the wizard.
+ <description>This wizard will guide you through setting up the pfSense traffic shaper. &lt;br/&gt;&lt;br/&gt; The wizard may be stopped at any time by clicking the logo image at the top of the screen.
+ &lt;br/&gt;&lt;br/&gt; Please be aware that Custom Bandwidths should not exceed 30% of the interface/link bandwidth. Keep this in mind during the wizard.
</description>
<fields>
<field>
@@ -71,7 +92,7 @@
</step>
<step>
<id>2</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Shaper configuration</title>
<description>Shaper configuration</description>
<javascriptafterformdisplay/>
<stepbeforeformdisplay>step2_stepbeforeformdisplay();</stepbeforeformdisplay>
@@ -86,7 +107,7 @@
</step>
<step>
<id>3</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Voice over IP</title>
<description>Voice over IP</description>
<fields>
<field>
@@ -143,10 +164,6 @@
<typehint>Total bandwidth in percentage(%)(should be between 5 and 40) guarantee for VOIP traffic.</typehint>
<bindstofield>ezshaper-&gt;step3-&gt;bandwidth</bindstofield>
</field>
- <field>
- <name>Next</name>
- <type>submit</type>
- </field>
</fields>
<stepbeforeformdisplay>step3_stepbeforeformdisplay();</stepbeforeformdisplay>
<stepsubmitphpaction>step3_stepsubmitphpaction();</stepsubmitphpaction>
@@ -154,7 +171,7 @@
</step>
<step>
<id>4</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Penalty Box</title>
<description>Penalty Box</description>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<fields>
@@ -168,10 +185,6 @@
<bindstofield>ezshaper-&gt;step4-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>PenaltyBox specific settings</name>
<type>listtopic</type>
</field>
@@ -232,7 +245,7 @@
</step>
<step>
<id>5</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Peer to Peer networking</title>
<description>Peer to Peer networking</description>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<fields>
@@ -246,10 +259,6 @@
<bindstofield>ezshaper-&gt;step5-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>p2p Catch all</name>
<type>listtopic</type>
</field>
@@ -439,7 +448,7 @@
</step>
<step>
<id>6</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Network Games</title>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<description>Network Games</description>
<fields>
@@ -453,10 +462,6 @@
<bindstofield>ezshaper-&gt;step6-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>Enable/Disable specific game consoles and services</name>
<type>listtopic</type>
</field>
@@ -761,7 +766,7 @@
</step>
<step>
<id>7</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Raise or lower other Applications</title>
<disableallfieldsbydefault>true</disableallfieldsbydefault>
<description>Raise or lower other Applications</description>
<fields>
@@ -775,10 +780,6 @@
<bindstofield>ezshaper-&gt;step7-&gt;enable</bindstofield>
</field>
<field>
- <name>Next</name>
- <type>submit</type>
- </field>
- <field>
<name>Remote Service / Terminal emulation</name>
<type>listtopic</type>
</field>
@@ -1639,7 +1640,7 @@
</step>
<step>
<id>8</id>
- <title>pfSense Traffic Shaper Wizard</title>
+ <title>Reload Profile</title>
<field>
<name>Reload profile notice</name>
<type>listtopic</type>
diff --git a/src/usr/local/www/xmlrpc.php b/src/usr/local/www/xmlrpc.php
index 5fd022a..b70f592 100755
--- a/src/usr/local/www/xmlrpc.php
+++ b/src/usr/local/www/xmlrpc.php
@@ -1,36 +1,62 @@
<?php
/*
xmlrpc.php
- Copyright (C) 2013-2015 Electric Sheep Fencing, LP
- Copyright (C) 2009, 2010 Scott Ullrich
- Copyright (C) 2005 Colin Smith
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
- THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
- OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- POSSIBILITY OF SUCH DAMAGE.
*/
+/* ====================================================================
+ * Copyright (c) 2004-2015 Electric Sheep Fencing, LLC. All rights reserved.
+ * Copyright (c) 2005 Colin Smith
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgment:
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution. (http://www.pfsense.org/).
+ *
+ * 4. The names "pfSense" and "pfSense Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * coreteam@pfsense.org.
+ *
+ * 5. Products derived from this software may not be called "pfSense"
+ * nor may "pfSense" appear in their names without prior written
+ * permission of the Electric Sheep Fencing, LLC.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ *
+ * "This product includes software developed by the pfSense Project
+ * for use in the pfSense software distribution (http://www.pfsense.org/).
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE pfSense PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE pfSense PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ====================================================================
+ *
+ */
##|+PRIV
##|*IDENT=page-xmlrpclibrary
-##|*NAME=XMLRPC Library page
+##|*NAME=XMLRPC Library
##|*DESCR=Allow access to the 'XMLRPC Library' page.
##|*MATCH=xmlrpc.php*
##|-PRIV
@@ -172,6 +198,7 @@ function restore_config_section_xmlrpc($raw_params) {
global $config, $xmlrpc_g;
$old_config = $config;
+ $old_ipsec_enabled = ipsec_enabled();
if (xmlrpc_loop_detect()) {
log_error("Disallowing CARP sync loop");
@@ -307,7 +334,7 @@ function restore_config_section_xmlrpc($raw_params) {
}
}
- if (isset($old_config['ipsec']['enable']) !== isset($config['ipsec']['enable'])) {
+ if ($old_ipsec_enabled !== ipsec_enabled()) {
vpn_ipsec_configure();
}
@@ -442,28 +469,7 @@ function interfaces_carp_configure_xmlrpc($raw_params) {
}
/*****************************/
-$check_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion.");
-
-$check_firmware_version_sig = array(
- array(
- $XML_RPC_String,
- $XML_RPC_String
- )
-);
-
-function check_firmware_version_xmlrpc($raw_params) {
- global $xmlrpc_g, $XML_RPC_String;
-
- $params = xmlrpc_params_to_php($raw_params);
- if (!xmlrpc_auth($params)) {
- xmlrpc_authfail();
- return $xmlrpc_g['return']['authfail'];
- }
- return new XML_RPC_Response(new XML_RPC_Value(check_firmware_version(false), $XML_RPC_String));
-}
-
-/*****************************/
-$pfsense_firmware_version_doc = gettext("Basic XMLRPC wrapper for check_firmware_version. This function will return the output of check_firmware_version upon completion.");
+$pfsense_firmware_version_doc = gettext("Basic XMLRPC wrapper for host_firmware_version. This function will return the output of host_firmware_version upon completion.");
$pfsense_firmware_version_sig = array (
array (
@@ -559,9 +565,6 @@ $server = new XML_RPC_Server(
'pfsense.merge_installedpackages_section_xmlrpc' => array('function' => 'merge_installedpackages_section_xmlrpc',
'signature' => $merge_config_section_sig,
'docstring' => $merge_config_section_doc),
- 'pfsense.check_firmware_version' => array('function' => 'check_firmware_version_xmlrpc',
- 'signature' => $check_firmware_version_sig,
- 'docstring' => $check_firmware_version_doc),
'pfsense.host_firmware_version' => array('function' => 'pfsense_firmware_version_xmlrpc',
'signature' => $pfsense_firmware_version_sig,
'docstring' => $host_firmware_version_doc),
diff --git a/tools/build_snapshots.sh b/tools/build_snapshots.sh
index 9260fab..87d101d 100755
--- a/tools/build_snapshots.sh
+++ b/tools/build_snapshots.sh
@@ -31,8 +31,9 @@
#
usage() {
- echo "Usage: $(basename $0) [-l] [-r] [-u]"
+ echo "Usage: $(basename $0) [-l] [-r] [-u] [-p]"
echo " -l: Build looped operations"
+ echo " -p: Update poudriere repo"
echo " -r: Do not reset local changes"
echo " -u: Do not upload snapshots"
}
@@ -43,15 +44,17 @@ export BUILDER_ROOT=$(realpath "${BUILDER_TOOLS}/..")
NO_RESET=""
NO_UPLOAD=""
LOOPED_SNAPSHOTS=""
-export minsleepvalue=${minsleepvalue:-"28800"}
-export maxsleepvalue=${maxsleepvalue:-"86400"}
+POUDRIERE_SNAPSHOTS=""
# Handle command line arguments
-while getopts lur opt; do
+while getopts lpru opt; do
case ${opt} in
l)
LOOPED_SNAPSHOTS=1
;;
+ p)
+ POUDRIERE_SNAPSHOTS=--poudriere-snapshots
+ ;;
r)
NO_RESET=1
;;
@@ -65,6 +68,13 @@ while getopts lur opt; do
esac
done
+if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
+ export minsleepvalue=${minsleepvalue:-"360"}
+else
+ export minsleepvalue=${minsleepvalue:-"28800"}
+fi
+export maxsleepvalue=${maxsleepvalue:-"86400"}
+
# Keeps track of how many time builder has looped
export BUILDCOUNTER=0
export COUNTER=0
@@ -73,16 +83,21 @@ export COUNTER=0
export _sleeping=0
snapshot_update_status() {
- ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --snapshot-update-status "${1}"
+ ${BUILDER_ROOT}/build.sh ${NO_UPLOAD} ${POUDRIERE_SNAPSHOTS} \
+ --snapshot-update-status "$*"
}
git_last_commit() {
- snapshot_update_status ">>> Updating ${PRODUCT_NAME} repository."
[ -z "${NO_RESET}" ] \
&& git -C "${BUILDER_ROOT}" reset --hard >/dev/null 2>&1
git -C "${BUILDER_ROOT}" pull -q
- export CURRENT_COMMIT=$(git -C ${BUILDER_ROOT} log -1 --format='%H')
- export CURRENT_AUTHOR=$(git -C ${BUILDER_ROOT} log -1 --format='%an')
+ if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
+ local _remote_repo=$(${BUILDER_ROOT}/build.sh -V POUDRIERE_PORTS_GIT_URL)
+ local _remote_branch=$(${BUILDER_ROOT}/build.sh -V POUDRIERE_PORTS_GIT_BRANCH)
+ export CURRENT_COMMIT=$(git ls-remote ${_remote_repo} ${_remote_branch} | cut -f1)
+ else
+ export CURRENT_COMMIT=$(git -C ${BUILDER_ROOT} log -1 --format='%H')
+ fi
}
restart_build() {
@@ -103,7 +118,8 @@ snapshots_sleep_between_runs() {
[ -z "${LAST_COMMIT}" ] \
&& export LAST_COMMIT=${CURRENT_COMMIT}
- snapshot_update_status ">>> Sleeping for at least $minsleepvalue, at most $maxsleepvalue in between snapshot builder runs."
+ snapshot_update_status ">>> Sleeping for at least $minsleepvalue," \
+ "at most $maxsleepvalue in between snapshot builder runs."
snapshot_update_status ">>> Last known commit: ${LAST_COMMIT}"
snapshot_update_status ">>> Freezing build process at $(date)"
echo ">>> Press ctrl+T to start a new build"
@@ -115,27 +131,32 @@ snapshots_sleep_between_runs() {
done
if [ ${COUNTER} -lt ${maxsleepvalue} ]; then
- snapshot_update_status ">>> Thawing build process and resuming checks for pending commits at $(date)."
+ snapshot_update_status ">>> Thawing build process and" \
+ "resuming checks for pending commits at $(date)."
echo ">>> Press ctrl+T to start a new build"
fi
while [ $COUNTER -lt $maxsleepvalue ]; do
sleep 1
+ COUNTER=$(($COUNTER + 1))
# Update this repo each 60 seconds
- if [ "$((${COUNTER} % 60))" = "0" ]; then
- git_last_commit
- if [ "${LAST_COMMIT}" != "${CURRENT_COMMIT}" ]; then
- snapshot_update_status ">>> New commit: $CURRENT_AUTHOR - $CURRENT_COMMIT .. No longer sleepy."
- COUNTER=$(($maxsleepvalue + 60))
- export LAST_COMMIT="${CURRENT_COMMIT}"
- fi
+ if [ "$((${COUNTER} % 60))" != "0" ]; then
+ continue
+ fi
+ git_last_commit
+ if [ "${LAST_COMMIT}" != "${CURRENT_COMMIT}" ]; then
+ snapshot_update_status ">>> New commit:" \
+ "$CURRENT_COMMIT " \
+ ".. No longer sleepy."
+ COUNTER=$(($maxsleepvalue + 60))
+ export LAST_COMMIT="${CURRENT_COMMIT}"
fi
- COUNTER=$(($COUNTER + 1))
done
_sleeping=0
if [ $COUNTER -ge $maxsleepvalue ]; then
- snapshot_update_status ">>> Sleep timer expired. Restarting build."
+ snapshot_update_status ">>> Sleep timer expired." \
+ "Restarting build."
COUNTER=0
fi
@@ -148,13 +169,27 @@ while [ /bin/true ]; do
git_last_commit
- (${BUILDER_ROOT}/build.sh --clean-builder 2>&1) | while read -r LINE; do
- snapshot_update_status "${LINE}"
- done
-
- (${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --flash-size '1g 2g 4g' --snapshots 2>&1) | while read -r LINE; do
- snapshot_update_status "${LINE}"
- done
+ if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
+ (${BUILDER_ROOT}/build.sh --update-poudriere-ports 2>&1) \
+ | while read -r LINE; do
+ snapshot_update_status "${LINE}"
+ done
+
+ (${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --update-pkg-repo 2>&1) \
+ | while read -r LINE; do
+ snapshot_update_status "${LINE}"
+ done
+ else
+ (${BUILDER_ROOT}/build.sh --clean-builder 2>&1) \
+ | while read -r LINE; do
+ snapshot_update_status "${LINE}"
+ done
+
+ (${BUILDER_ROOT}/build.sh ${NO_UPLOAD} --flash-size '1g 2g 4g' \
+ --snapshots 2>&1) | while read -r LINE; do
+ snapshot_update_status "${LINE}"
+ done
+ fi
if [ -z "${LOOPED_SNAPSHOTS}" ]; then
# only one build required, exiting
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 0696742..7b81bdc 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -63,17 +63,32 @@ git_last_commit() {
# Create core pkg repository
core_pkg_create_repo() {
- if [ ! -d "${CORE_PKG_PATH}/All" ]; then
+ if [ ! -d "${CORE_PKG_REAL_PATH}/All" ]; then
return
fi
+ ############ ATTENTION ##############
+ #
+ # For some reason pkg-repo fail without / in the end of directory name
+ # so removing it will break command
+ #
+ # https://github.com/freebsd/pkg/issues/1364
+ #
echo -n ">>> Creating core packages repository... "
- if pkg repo -q "${CORE_PKG_PATH}"; then
+ if pkg repo -q "${CORE_PKG_REAL_PATH}/"; then
echo "Done!"
else
echo "Failed!"
print_error_pfS
fi
+
+ # Use the same directory structure as poudriere does to avoid
+ # breaking snapshot repositories during rsync
+ ln -sf $(basename ${CORE_PKG_REAL_PATH}) ${CORE_PKG_PATH}/.latest
+ ln -sf .latest/All ${CORE_PKG_PATH}/All
+ ln -sf .latest/digests.txz ${CORE_PKG_PATH}/digests.txz
+ ln -sf .latest/meta.txz ${CORE_PKG_PATH}/meta.txz
+ ln -sf .latest/packagesite.txz ${CORE_PKG_PATH}/packagesite.txz
}
# Create core pkg (base, kernel)
@@ -82,6 +97,7 @@ core_pkg_create() {
local _flavor="${2}"
local _version="${3}"
local _root="${4}"
+ local _filter="${5}"
[ -d "${CORE_PKG_TMP}" ] \
&& rm -rf ${CORE_PKG_TMP}
@@ -106,7 +122,10 @@ core_pkg_create() {
if [ -f "${_templates_path}/pkg-plist" ]; then
cp ${_templates_path}/pkg-plist ${_plist}
else
- (cd ${_root} && find . -type f -or -type l | sed 's,^.,,' | sort -u) > ${_plist}
+ if [ -n "${_filter}" ]; then
+ _filter="-name ${_filter}"
+ fi
+ (cd ${_root} && find . ${_filter} -type f -or -type l | sed 's,^.,,' | sort -u) > ${_plist}
fi
if [ -f "${_templates_path}/exclude_plist" ]; then
@@ -132,8 +151,8 @@ core_pkg_create() {
rm -f ${_plist}.tmp ${plist}.exclude
fi
- mkdir -p ${CORE_PKG_PATH}/All
- if ! pkg create -o ${CORE_PKG_PATH}/All -p ${_plist} -r ${_root} -m ${_metadir}; then
+ mkdir -p ${CORE_PKG_REAL_PATH}/All
+ if ! pkg create -o ${CORE_PKG_REAL_PATH}/All -p ${_plist} -r ${_root} -m ${_metadir}; then
echo ">>> ERROR: Error building package ${_template} ${_flavor}"
print_error_pfS
fi
@@ -258,7 +277,7 @@ build_all_kernels() {
print_error_pfS
fi
- if [ -n "${NO_BUILDKERNEL}" -a -f "${CORE_PKG_PATH}/All/$(get_pkg_name kernel-${KERNEL_NAME}).txz" ]; then
+ if [ -n "${NO_BUILDKERNEL}" -a -f "${CORE_PKG_REAL_PATH}/All/$(get_pkg_name kernel-${KERNEL_NAME}).txz" ]; then
echo ">>> NO_BUILDKERNEL set, skipping build" | tee -a ${LOGFILE}
continue
fi
@@ -271,6 +290,10 @@ build_all_kernels() {
ensure_kernel_exists $KERNEL_DESTDIR
+ echo -n ">>> Creating pkg of $KERNEL_NAME-debug kernel to staging area..." | tee -a ${LOGFILE}
+ core_pkg_create kernel-debug ${KERNEL_NAME} ${CORE_PKG_VERSION} ${KERNEL_DESTDIR} \*.symbols
+ find ${KERNEL_DESTDIR} -name '*.symbols' -type f -delete
+
echo -n ">>> Creating pkg of $KERNEL_NAME kernel to staging area..." | tee -a ${LOGFILE}
core_pkg_create kernel ${KERNEL_NAME} ${CORE_PKG_VERSION} ${KERNEL_DESTDIR}
@@ -305,10 +328,10 @@ install_default_kernel() {
fi
mkdir -p $FINAL_CHROOT_DIR/pkgs
if [ -z "${2}" -o -n "${INSTALL_EXTRA_KERNELS}" ]; then
- cp ${CORE_PKG_PATH}/All/$(get_pkg_name kernel-${KERNEL_NAME}).txz $FINAL_CHROOT_DIR/pkgs
+ cp ${CORE_PKG_REAL_PATH}/All/$(get_pkg_name kernel-${KERNEL_NAME}).txz $FINAL_CHROOT_DIR/pkgs
if [ -n "${INSTALL_EXTRA_KERNELS}" ]; then
for _EXTRA_KERNEL in $INSTALL_EXTRA_KERNELS; do
- _EXTRA_KERNEL_PATH=${CORE_PKG_PATH}/All/$(get_pkg_name kernel-${_EXTRA_KERNEL}).txz
+ _EXTRA_KERNEL_PATH=${CORE_PKG_REAL_PATH}/All/$(get_pkg_name kernel-${_EXTRA_KERNEL}).txz
if [ -f "${_EXTRA_KERNEL_PATH}" ]; then
echo -n ". adding ${_EXTRA_KERNEL_PATH} on image /pkgs folder"
cp ${_EXTRA_KERNEL_PATH} $FINAL_CHROOT_DIR/pkgs
@@ -333,6 +356,7 @@ create_Full_update_tarball() {
rm -rf ${FINAL_CHROOT_DIR}/cf
rm -rf ${FINAL_CHROOT_DIR}/conf
+ rm -f ${FINAL_CHROOT_DIR}/etc/dh-parameters.*
rm -f ${FINAL_CHROOT_DIR}/etc/rc.conf
rm -f ${FINAL_CHROOT_DIR}/etc/pwd.db 2>/dev/null
rm -f ${FINAL_CHROOT_DIR}/etc/group 2>/dev/null
@@ -346,14 +370,14 @@ create_Full_update_tarball() {
rm ${FINAL_CHROOT_DIR}/boot/loader.conf.local 2>/dev/null
# Old systems will run (pre|post)_upgrade_command from /tmp
- if [ -f ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/pre_upgrade_command ]; then
+ if [ -f ${FINAL_CHROOT_DIR}${PRODUCT_SHARE_DIR}/pre_upgrade_command ]; then
cp -p \
- ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/pre_upgrade_command \
+ ${FINAL_CHROOT_DIR}${PRODUCT_SHARE_DIR}/pre_upgrade_command \
${FINAL_CHROOT_DIR}/tmp
fi
- if [ -f ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/post_upgrade_command ]; then
+ if [ -f ${FINAL_CHROOT_DIR}${PRODUCT_SHARE_DIR}/post_upgrade_command ]; then
cp -p \
- ${FINAL_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/post_upgrade_command \
+ ${FINAL_CHROOT_DIR}${PRODUCT_SHARE_DIR}/post_upgrade_command \
${FINAL_CHROOT_DIR}/tmp
fi
@@ -674,7 +698,6 @@ awk '
# Set NanoBSD image size
echo "${_NANO_MEDIASIZE}" > ${MNT}/etc/nanosize.txt
- rm -f $MNT/cf/conf/* 2>/dev/null
echo "/dev/ufs/${_label}0 / ufs ro,sync,noatime 1 1" > ${MNT}/etc/fstab
if [ $NANO_CONFSIZE -gt 0 ] ; then
@@ -1012,6 +1035,11 @@ clone_to_staging_area() {
tar -C ${PRODUCT_SRC} -c -f - . | \
tar -C ${STAGE_CHROOT_DIR} -x -p -f -
+ if [ "${PRODUCT_NAME}" != "pfSense" ]; then
+ mv ${STAGE_CHROOT_DIR}/usr/local/sbin/pfSense-upgrade \
+ ${STAGE_CHROOT_DIR}/usr/local/sbin/${PRODUCT_NAME}-upgrade
+ fi
+
if [ -f ${STAGE_CHROOT_DIR}/etc/master.passwd ]; then
chroot ${STAGE_CHROOT_DIR} cap_mkdb /etc/master.passwd
chroot ${STAGE_CHROOT_DIR} pwd_mkdb /etc/master.passwd
@@ -1039,19 +1067,51 @@ clone_to_staging_area() {
${BUILDER_TOOLS}/templates/core_pkg/base/exclude_files \
> ${_exclude_files}
- mkdir -p ${STAGE_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME} >/dev/null 2>&1
+ mkdir -p ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR} >/dev/null 2>&1
+
+ # Include a sample pkg stable conf to base
+ setup_pkg_repo \
+ ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR}/${PRODUCT_NAME}-repo.conf \
+ ${TARGET} \
+ ${TARGET_ARCH} \
+ ${PKG_REPO_CONF_BRANCH} \
+ "release"
+
+ # Include a sample pkg devel conf to base
+ setup_pkg_repo \
+ ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR}/${PRODUCT_NAME}-repo-devel.conf \
+ ${TARGET} \
+ ${TARGET_ARCH} \
+ ${PKG_REPO_CONF_BRANCH}
+
mtree \
-c \
-k uid,gid,mode,size,flags,sha256digest \
-p ${STAGE_CHROOT_DIR} \
-X ${_exclude_files} \
- > ${STAGE_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/base.mtree
+ > ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR}/base.mtree
tar \
-C ${STAGE_CHROOT_DIR} \
- -cJf ${STAGE_CHROOT_DIR}/usr/local/share/${PRODUCT_NAME}/base.txz \
+ -cJf ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR}/base.txz \
-X ${_exclude_files} \
.
+ mkdir -p $(dirname ${STAGE_CHROOT_DIR}${PKG_REPO_PATH}) >/dev/null 2>&1
+
+ # Create repo and repo-devel packages
+ cp -f ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR}/${PRODUCT_NAME}-repo.conf \
+ ${STAGE_CHROOT_DIR}${PKG_REPO_PATH}
+
+ core_pkg_create repo "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
+
+ cp -f ${STAGE_CHROOT_DIR}${PRODUCT_SHARE_DIR}/${PRODUCT_NAME}-repo-devel.conf \
+ ${STAGE_CHROOT_DIR}${PKG_REPO_PATH}
+
+ core_pkg_create repo-devel "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
+
+ rm -f ${STAGE_CHROOT_DIR}${PKG_REPO_PATH}
+
+ core_pkg_create rc "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
core_pkg_create base "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
core_pkg_create base-nanobsd "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
core_pkg_create default-config "" ${CORE_PKG_VERSION} ${STAGE_CHROOT_DIR}
@@ -1111,6 +1171,8 @@ customize_stagearea_for_image() {
# Prepare final stage area
create_final_staging_area
+ pkg_chroot_add ${FINAL_CHROOT_DIR} rc
+
if [ "${1}" = "nanobsd" -o \
"${1}" = "nanobsd-vga" ]; then
@@ -1128,13 +1190,19 @@ customize_stagearea_for_image() {
pkg_chroot_add ${FINAL_CHROOT_DIR} base
fi
+ if [ -n "${IS_RELEASE}" ]; then
+ pkg_chroot_add ${FINAL_CHROOT_DIR} repo
+ else
+ pkg_chroot_add ${FINAL_CHROOT_DIR} repo-devel
+ fi
+
if [ "${1}" = "iso" -o \
"${1}" = "memstick" -o \
"${1}" = "memstickserial" -o \
"${1}" = "memstickadi" ]; then
install_bsdinstaller
mkdir -p ${FINAL_CHROOT_DIR}/pkgs
- cp ${CORE_PKG_PATH}/All/*default-config*.txz ${FINAL_CHROOT_DIR}/pkgs
+ cp ${CORE_PKG_REAL_PATH}/All/*default-config*.txz ${FINAL_CHROOT_DIR}/pkgs
fi
if [ "${1}" = "nanobsd" -o \
@@ -1373,6 +1441,18 @@ setup_pkg_repo() {
local _arch="${2}"
local _target_arch="${3}"
local _branch="${4}"
+ local _release="${5}"
+
+ if [ -n "${_release}" ]; then
+ local _template="${PKG_REPO_TEMPLATE}"
+ else
+ local _template="${PKG_REPO_DEVEL_TEMPLATE}"
+ fi
+
+ if [ -z "${_template}" -o ! -f "${_template}" ]; then
+ echo ">>> ERROR: It was not possible to find pkg conf template ${_template}"
+ print_error_pfS
+ fi
mkdir -p $(dirname ${_target}) >/dev/null 2>&1
@@ -1381,7 +1461,7 @@ setup_pkg_repo() {
-e "s/%%GIT_REPO_BRANCH_OR_TAG%%/${_branch}/g" \
-e "s,%%PKG_REPO_SERVER%%,${PKG_REPO_SERVER},g" \
-e "s/%%PRODUCT_NAME%%/${PRODUCT_NAME}/g" \
- ${FREEBSD_SRC_DIR}/release/pkg_repos/${PRODUCT_NAME}.conf.template \
+ ${_template} \
> ${_target}
}
@@ -1393,14 +1473,18 @@ builder_setup() {
return
fi
- if [ ! -f /usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf ]; then
- [ -d /usr/local/etc/pkg/repos ] \
- || mkdir -p /usr/local/etc/pkg/repos
+ if [ ! -f ${PKG_REPO_PATH} ]; then
+ [ -d $(dirname ${PKG_REPO_PATH}) ] \
+ || mkdir -p $(dirname ${PKG_REPO_PATH})
update_freebsd_sources
local _arch=$(uname -m)
- setup_pkg_repo /usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf ${_arch} ${_arch} ${PKG_REPO_CONF_BRANCH}
+ setup_pkg_repo \
+ ${PKG_REPO_PATH} \
+ ${_arch} \
+ ${_arch} \
+ ${PKG_REPO_CONF_BRANCH}
fi
pkg install ${PRODUCT_NAME}-builder
@@ -1495,12 +1579,12 @@ pkg_chroot_add() {
print_error_pfS
fi
- if [ ! -f ${CORE_PKG_PATH}/All/${_pkg} ]; then
+ if [ ! -f ${CORE_PKG_REAL_PATH}/All/${_pkg} ]; then
echo ">>> ERROR: Package ${_pkg} not found"
print_error_pfS
fi
- cp ${CORE_PKG_PATH}/All/${_pkg} ${_target}
+ cp ${CORE_PKG_REAL_PATH}/All/${_pkg} ${_target}
pkg_chroot ${_target} add /${_pkg}
rm -f ${_target}/${_pkg}
}
@@ -1508,13 +1592,18 @@ pkg_chroot_add() {
pkg_bootstrap() {
local _root=${1:-"${STAGE_CHROOT_DIR}"}
- setup_pkg_repo ${_root}/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf ${TARGET} ${TARGET_ARCH} ${PKG_REPO_CONF_BRANCH}
+ setup_pkg_repo \
+ ${_root}${PKG_REPO_PATH} \
+ ${TARGET} \
+ ${TARGET_ARCH} \
+ ${PKG_REPO_CONF_BRANCH} \
+ ${IS_RELEASE}
pkg_chroot ${_root} bootstrap -f
}
# This routine assists with installing various
-# freebsd ports files into the pfsenese-fs staging
+# freebsd ports files into the pfsense-fs staging
# area.
install_pkg_install_ports() {
local MAIN_PKG="${1}"
@@ -1622,7 +1711,7 @@ finish() {
pkg_repo_rsync() {
local _repo_path="${1}"
- if [ -n "${DO_NOT_UPLOAD}" -o -z "${_repo_path}" -o ! -d "${_repo_path}" ]; then
+ if [ -z "${_repo_path}" -o ! -d "${_repo_path}" ]; then
return
fi
@@ -1632,6 +1721,51 @@ pkg_repo_rsync() {
local _logfile="${LOGFILE}"
fi
+ if [ -n "${PKG_REPO_SIGNING_COMMAND}" ]; then
+
+ # Detect poudriere directory structure
+ if [ -L "${_repo_path}/.latest" ]; then
+ local _real_repo_path=$(readlink -f ${_repo_path}/.latest)
+ else
+ local _real_repo_path=${_repo_path}
+ fi
+
+ echo -n ">>> Signing repository... " | tee -a ${_logfile}
+ ############ ATTENTION ##############
+ #
+ # For some reason pkg-repo fail without / in the end of directory name
+ # so removing it will break command
+ #
+ # https://github.com/freebsd/pkg/issues/1364
+ #
+ if script -aq ${_logfile} pkg repo ${_real_repo_path}/ \
+ signing_command: ${PKG_REPO_SIGNING_COMMAND} >/dev/null 2>&1; then
+ echo "Done!" | tee -a ${_logfile}
+ else
+ echo "Failed!" | tee -a ${_logfile}
+ echo ">>> ERROR: An error occurred trying to sign repo"
+ print_error_pfS
+ fi
+
+ local _pkgfile="${_repo_path}/Latest/pkg.txz"
+ if [ -e ${_pkgfile} ]; then
+ echo -n ">>> Signing Latest/pkg.txz for bootstraping... " | tee -a ${_logfile}
+
+ if sha256 -q ${_pkgfile} | ${PKG_REPO_SIGNING_COMMAND} \
+ > ${_pkgfile}.sig 2>/dev/null; then
+ echo "Done!" | tee -a ${_logfile}
+ else
+ echo "Failed!" | tee -a ${_logfile}
+ echo ">>> ERROR: An error occurred trying to sign Latest/pkg.txz"
+ print_error_pfS
+ fi
+ fi
+ fi
+
+ if [ -n "${DO_NOT_UPLOAD}" ]; then
+ return
+ fi
+
echo -n ">>> Sending updated repository to ${PKG_RSYNC_HOSTNAME}... " | tee -a ${_logfile}
if script -aq ${_logfile} rsync -ave "ssh -p ${PKG_RSYNC_SSH_PORT}" \
--timeout=60 --delete-delay ${_repo_path} \
@@ -1677,7 +1811,7 @@ poudriere_possible_archs() {
local _arch=$(uname -m)
local _archs="i386.i386"
- # IF host is amd64, we'll create both repos, and if possible armv6
+ # If host is amd64, we'll create both repos, and if possible armv6
if [ "${_arch}" = "amd64" ]; then
_archs="amd64.amd64 ${_archs}"
@@ -1725,6 +1859,61 @@ poudriere_jail_name() {
echo "${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}_${_jail_arch}"
}
+poudriere_rename_ports() {
+ if [ "${PRODUCT_NAME}" = "pfSense" ]; then
+ return;
+ fi
+
+ LOGFILE=${BUILDER_LOGS}/poudriere.log
+
+ local _ports_dir="/usr/local/poudriere/ports/${POUDRIERE_PORTS_NAME}"
+
+ echo -n ">>> Renaming product ports on ${POUDRIERE_PORTS_NAME}... " | tee -a ${LOGFILE}
+ for d in $(find ${_ports_dir} -depth 2 -type d -name '*pfSense*'); do
+ local _pdir=$(dirname ${d})
+ local _pname=$(echo $(basename ${d}) | sed "s,pfSense,${PRODUCT_NAME},")
+
+ if [ -e ${_pdir}/${_pname} ]; then
+ rm -rf ${_pdir}/${_pname}
+ fi
+
+ cp -r ${d} ${_pdir}/${_pname}
+
+ sed -i '' -e "s,pfSense,${PRODUCT_NAME},g" \
+ -e "s,https://www.pfsense.org,${PRODUCT_URL},g" \
+ -e "/^MAINTAINER=/ s,^.*$,MAINTAINER= ${PRODUCT_EMAIL}," \
+ ${_pdir}/${_pname}/Makefile \
+ ${_pdir}/${_pname}/pkg-descr
+
+ # PHP module is special
+ if echo "${_pname}" | grep -q "^php[0-9]*-${PRODUCT_NAME}-module"; then
+ local _product_capital=$(echo ${PRODUCT_NAME} | tr '[a-z]' '[A-Z]')
+ sed -i '' -e "s,PHP_PFSENSE,PHP_${_product_capital},g" \
+ -e "s,PFSENSE_SHARED_LIBADD,${_product_capital}_SHARED_LIBADD,g" \
+ -e "s,pfSense,${PRODUCT_NAME},g" \
+ -e "s,${PRODUCT_NAME}\.c,pfSense.c,g" \
+ ${_pdir}/${_pname}/files/config.m4
+
+ sed -i '' -e "s,COMPILE_DL_PFSENSE,COMPILE_DL_${_product_capital}," \
+ -e "s,pfSense_module_entry,${PRODUCT_NAME}_module_entry,g" \
+ -e "/ZEND_GET_MODULE/ s,pfSense,${PRODUCT_NAME}," \
+ -e "/PHP_PFSENSE_WORLD_EXTNAME/ s,pfSense,${PRODUCT_NAME}," \
+ ${_pdir}/${_pname}/files/pfSense.c \
+ ${_pdir}/${_pname}/files/php_pfSense.h
+ fi
+
+ if [ -d ${_pdir}/${_pname}/files ]; then
+ for fd in $(find ${_pdir}/${_pname}/files -type d -name '*pfSense*'); do
+ local _fddir=$(dirname ${fd})
+ local _fdname=$(echo $(basename ${fd}) | sed "s,pfSense,${PRODUCT_NAME},")
+
+ mv ${fd} ${_fddir}/${_fdname}
+ done
+ fi
+ done
+ echo "Done!" | tee -a ${LOGFILE}
+}
+
poudriere_create_ports_tree() {
LOGFILE=${BUILDER_LOGS}/poudriere.log
@@ -1744,6 +1933,7 @@ poudriere_create_ports_tree() {
print_error_pfS
fi
echo "Done!" | tee -a ${LOGFILE}
+ poudriere_rename_ports
fi
}
@@ -1782,8 +1972,14 @@ poudriere_init() {
# Check if zfs rootfs exists
if ! zfs list ${ZFS_TANK}${ZFS_ROOT} >/dev/null 2>&1; then
- echo ">>> ERROR: ZFS filesystem ${ZFS_TANK}${ZFS_ROOT} not found, please create it and try again..." | tee -a ${LOGFILE}
- print_error_pfS
+ echo -n ">>> Creating ZFS filesystem ${ZFS_TANK}${ZFS_ROOT}... "
+ if zfs create -o atime=off -o mountpoint=/usr/local${ZFS_ROOT} \
+ ${ZFS_TANK}${ZFS_ROOT} >/dev/null 2>&1; then
+ echo "Done!"
+ else
+ echo "Failed!"
+ print_error_pfS
+ fi
fi
# Make sure poudriere is installed
@@ -1817,6 +2013,11 @@ COMMIT_PACKAGES_ON_FAILURE=no
GIT_URL="${POUDRIERE_PORTS_GIT_URL}"
EOF
+ # Create DISTFILES_CACHE if it doesn't exist
+ if [ ! -d /usr/ports/distfiles ]; then
+ mkdir -p /usr/ports/distfiles
+ fi
+
# Remove old jails
for jail_arch in ${_archs}; do
jail_name=$(poudriere_jail_name ${jail_arch})
@@ -1902,13 +2103,14 @@ poudriere_update_ports() {
if ! poudriere ports -l | grep -q -E "^${POUDRIERE_PORTS_NAME}[[:blank:]]"; then
poudriere_create_ports_tree
else
- echo -n ">>> Reseting local changes on ports tree ${POUDRIERE_PORTS_NAME}... " | tee -a ${LOGFILE}
+ echo -n ">>> Resetting local changes on ports tree ${POUDRIERE_PORTS_NAME}... " | tee -a ${LOGFILE}
script -aq ${LOGFILE} git -C "/usr/local/poudriere/ports/${POUDRIERE_PORTS_NAME}" reset --hard >/dev/null 2>&1
script -aq ${LOGFILE} git -C "/usr/local/poudriere/ports/${POUDRIERE_PORTS_NAME}" clean -fd >/dev/null 2>&1
echo "Done!" | tee -a ${LOGFILE}
echo -n ">>> Updating ports tree ${POUDRIERE_PORTS_NAME}... " | tee -a ${LOGFILE}
script -aq ${LOGFILE} poudriere ports -u -p "${POUDRIERE_PORTS_NAME}" >/dev/null 2>&1
echo "Done!" | tee -a ${LOGFILE}
+ poudriere_rename_ports
fi
}
@@ -1968,7 +2170,7 @@ poudriere_bulk() {
print_error_pfS
fi
- # ./ is intentional, it's a rsync trick to make it chdir to directory before send it
+ # ./ is intentional, it's an rsync trick to make it chdir to directory before sending it
pkg_repo_rsync "/usr/local/poudriere/data/packages/./${jail_name}-${POUDRIERE_PORTS_NAME}"
done
}
@@ -1978,18 +2180,23 @@ poudriere_bulk() {
# and we scp the log file to the builder host if
# needed for the real time logging functions.
snapshots_update_status() {
- if [ -z "${SNAPSHOTS}" -o -z "$1" ]; then
+ if [ -z "$1" ]; then
+ return
+ fi
+ if [ -z "${SNAPSHOTS}" -a -z "${POUDRIERE_SNAPSHOTS}" ]; then
return
fi
- echo $1
- echo "`date` -|- $1" >> $SNAPSHOTSLOGFILE
- if [ -z "${DO_NOT_UPLOAD}" -a -n "${RSYNCIP}" ]; then
- LU=`cat $SNAPSHOTSLASTUPDATE`
- CT=`date "+%H%M%S"`
+ echo "$*"
+ echo "`date` -|- $*" >> $SNAPSHOTSLOGFILE
+ if [ -z "${DO_NOT_UPLOAD}" -a -n "${SNAPSHOTS_RSYNCIP}" ]; then
+ LU=$(cat $SNAPSHOTSLASTUPDATE 2>/dev/null)
+ CT=$(date "+%H%M%S")
# Only update every minute
if [ "$LU" != "$CT" ]; then
- ssh ${RSYNCUSER}@${RSYNCIP} "mkdir -p ${RSYNCLOGS}"
- scp -q $SNAPSHOTSLOGFILE ${RSYNCUSER}@${RSYNCIP}:${RSYNCLOGS}/build.log
+ ssh ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP} \
+ "mkdir -p ${SNAPSHOTS_RSYNCLOGS}"
+ scp -q $SNAPSHOTSLOGFILE \
+ ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP}:${SNAPSHOTS_RSYNCLOGS}/build.log
date "+%H%M%S" > $SNAPSHOTSLASTUPDATE
fi
fi
@@ -1998,8 +2205,9 @@ snapshots_update_status() {
# Copy the current log file to $filename.old on
# the snapshot www server (real time logs)
snapshots_rotate_logfile() {
- if [ -z "${DO_NOT_UPLOAD}" -a -n "${RSYNCIP}" ]; then
- scp -q $SNAPSHOTSLOGFILE ${RSYNCUSER}@${RSYNCIP}:${RSYNCLOGS}/build.log.old
+ if [ -z "${DO_NOT_UPLOAD}" -a -n "${SNAPSHOTS_RSYNCIP}" ]; then
+ scp -q $SNAPSHOTSLOGFILE \
+ ${SNAPSHOTS_RSYNCUSER}@${SNAPSHOTS_RSYNCIP}:${SNAPSHOTS_RSYNCLOGS}/build.log.old
fi
# Cleanup log file
@@ -2008,6 +2216,30 @@ snapshots_rotate_logfile() {
}
+snapshots_create_latest_symlink() {
+ local _image="${1}"
+
+ if [ -z "${_image}" ]; then
+ return
+ fi
+
+ if [ -z "${TIMESTAMP_SUFFIX}" ]; then
+ return
+ fi
+
+ if [ -f "${_image}.gz" ]; then
+ local _image_fixed="${_image}.gz"
+ elif [ -f "${_image}" ]; then
+ local _image_fixed=${_image}
+ else
+ return
+ fi
+
+ local _symlink=$(echo ${_image_fixed} | sed "s,${TIMESTAMP_SUFFIX},-latest,")
+ ln -sf $(basename ${_image_fixed}) ${_symlink}
+ ln -sf $(basename ${_image}).sha256 ${_symlink}.sha256
+}
+
snapshots_copy_to_staging_nanobsd() {
for NANOTYPE in nanobsd nanobsd-vga; do
for FILESIZE in ${1}; do
@@ -2016,21 +2248,19 @@ snapshots_copy_to_staging_nanobsd() {
mkdir -p $STAGINGAREA/nanobsd
mkdir -p $STAGINGAREA/nanobsdupdates
- cp $IMAGES_FINAL_DIR/$FILENAMEFULL $STAGINGAREA/nanobsd/ 2>/dev/null
- cp $IMAGES_FINAL_DIR/$FILENAMEUPGRADE $STAGINGAREA/nanobsdupdates 2>/dev/null
+ cp -l $IMAGES_FINAL_DIR/$FILENAMEFULL $STAGINGAREA/nanobsd/ 2>/dev/null
+ cp -l $IMAGES_FINAL_DIR/$FILENAMEUPGRADE $STAGINGAREA/nanobsdupdates 2>/dev/null
if [ -f $STAGINGAREA/nanobsd/$FILENAMEFULL ]; then
- md5 $STAGINGAREA/nanobsd/$FILENAMEFULL > $STAGINGAREA/nanobsd/$FILENAMEFULL.md5 2>/dev/null
sha256 $STAGINGAREA/nanobsd/$FILENAMEFULL > $STAGINGAREA/nanobsd/$FILENAMEFULL.sha256 2>/dev/null
fi
if [ -f $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE ]; then
- md5 $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE > $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE.md5 2>/dev/null
sha256 $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE > $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE.sha256 2>/dev/null
fi
# Copy NanoBSD auto update:
if [ -f $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE ]; then
- cp $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE $STAGINGAREA/latest-${NANOTYPE}-$FILESIZE.img.gz 2>/dev/null
+ cp -l $STAGINGAREA/nanobsdupdates/$FILENAMEUPGRADE $STAGINGAREA/latest-${NANOTYPE}-$FILESIZE.img.gz 2>/dev/null
sha256 $STAGINGAREA/latest-${NANOTYPE}-$FILESIZE.img.gz > $STAGINGAREA/latest-${NANOTYPE}-$FILESIZE.img.gz.sha256 2>/dev/null
# NOTE: Updates need a file with output similar to date output
# Use the file generated at start of snapshots_dobuilds() to be consistent on times
@@ -2041,29 +2271,29 @@ snapshots_copy_to_staging_nanobsd() {
}
snapshots_copy_to_staging_iso_updates() {
- # Copy ISOs
- md5 ${ISOPATH}.gz > ${ISOPATH}.md5
- sha256 ${ISOPATH}.gz > ${ISOPATH}.sha256
- cp ${ISOPATH}* $STAGINGAREA/ 2>/dev/null
+ local _img=""
- # Copy memstick items
- md5 ${MEMSTICKPATH}.gz > ${MEMSTICKPATH}.md5
- sha256 ${MEMSTICKPATH}.gz > ${MEMSTICKPATH}.sha256
- cp ${MEMSTICKPATH}* $STAGINGAREA/ 2>/dev/null
+ for _img in ${ISOPATH} ${MEMSTICKPATH} ${MEMSTICKSERIALPATH}; do
+ if [ ! -f "${_img}.gz" ]; then
+ continue
+ fi
+ sha256 ${_img}.gz > ${_img}.sha256
+ cp -l ${_img}* $STAGINGAREA/ 2>/dev/null
+ snapshots_create_latest_symlink ${STAGINGAREA}/$(basename ${_img})
+ done
- md5 ${MEMSTICKSERIALPATH}.gz > ${MEMSTICKSERIALPATH}.md5
- sha256 ${MEMSTICKSERIALPATH}.gz > ${MEMSTICKSERIALPATH}.sha256
- cp ${MEMSTICKSERIALPATH}* $STAGINGAREA/ 2>/dev/null
+ if [ -f "${UPDATES_TARBALL_FILENAME}" ]; then
+ sha256 ${UPDATES_TARBALL_FILENAME} > ${UPDATES_TARBALL_FILENAME}.sha256
+ cp -l ${UPDATES_TARBALL_FILENAME}* $STAGINGAREA/ 2>/dev/null
+ snapshots_create_latest_symlink ${STAGINGAREA}/$(basename ${UPDATES_TARBALL_FILENAME})
+ fi
- if [ "${TARGET}" = "amd64" ]; then
- md5 ${MEMSTICKADIPATH}.gz > ${MEMSTICKADIPATH}.md5
+ if [ "${TARGET}" = "amd64" -a -f "${MEMSTICKADIPATH}.gz" ]; then
sha256 ${MEMSTICKADIPATH}.gz > ${MEMSTICKADIPATH}.sha256
- cp ${MEMSTICKADIPATH}* $STAGINGAREA/ 2>/dev/null
+ cp -l ${MEMSTICKADIPATH}* $STAGINGAREA/ 2>/dev/null
+ snapshots_create_latest_symlink ${STAGINGAREA}/$(basename ${MEMSTICKADIPATH})
fi
- md5 ${UPDATES_TARBALL_FILENAME} > ${UPDATES_TARBALL_FILENAME}.md5
- sha256 ${UPDATES_TARBALL_FILENAME} > ${UPDATES_TARBALL_FILENAME}.sha256
- cp ${UPDATES_TARBALL_FILENAME}* $STAGINGAREA/ 2>/dev/null
# NOTE: Updates need a file with output similar to date output
# Use the file generated at start of snapshots_dobuilds() to be consistent on times
if [ -z "${_IS_RELEASE}" ]; then
@@ -2077,7 +2307,7 @@ snapshots_scp_files() {
fi
snapshots_update_status ">>> Copying core pkg repo to ${PKG_RSYNC_HOSTNAME}"
- # Add ./ before last directory, it's rsync trick to make it chdir to parent directory before send
+ # Add ./ before last directory, it's an rsync trick to make it chdir to parent directory before sending
pkg_repo_rsync $(echo "${CORE_PKG_PATH}" | sed -E 's,/$,,; s,/([^/]*)$,/./\1,')
snapshots_update_status ">>> Finished copying core pkg repo"
@@ -2113,8 +2343,7 @@ snapshots_scp_files() {
ssh ${RSYNCUSER}@${RSYNCIP} "rm -f ${RSYNCPATH}/.updaters/latest.tgz"
ssh ${RSYNCUSER}@${RSYNCIP} "rm -f ${RSYNCPATH}/.updaters/latest.tgz.sha256"
- LATESTFILENAME="`ls $UPDATESDIR/*.tgz | grep Full | grep -v md5 | grep -v sha256 | tail -n1`"
- LATESTFILENAME=`basename ${LATESTFILENAME}`
+ LATESTFILENAME=$(basename ${UPDATES_TARBALL_FILENAME})
ssh ${RSYNCUSER}@${RSYNCIP} "ln -s ${RSYNCPATH}/updates/${LATESTFILENAME} \
${RSYNCPATH}/.updaters/latest.tgz"
ssh ${RSYNCUSER}@${RSYNCIP} "ln -s ${RSYNCPATH}/updates/${LATESTFILENAME}.sha256 \
diff --git a/tools/builder_defaults.sh b/tools/builder_defaults.sh
index 18556d0..eb0e173 100644
--- a/tools/builder_defaults.sh
+++ b/tools/builder_defaults.sh
@@ -84,7 +84,7 @@ fi
# Make sure pkg will not be interactive
export ASSUME_ALWAYS_YES=true
-# Architecture, supported ARCH values are:
+# Architecture, supported ARCH values are:
# Tier 1: i386, AMD64, and PC98
# Tier 2: ARM, PowerPC, ia64, Sparc64 and sun4v
# Tier 3: MIPS and S/390
@@ -107,6 +107,7 @@ fi
export PRODUCT_NAME=${PRODUCT_NAME:-"nonSense"}
export PRODUCT_URL=${PRODUCT_URL:-""}
export PRODUCT_SRC=${PRODUCT_SRC:-"${BUILDER_ROOT}/src"}
+export PRODUCT_EMAIL=${PRODUCT_EMAIL:-"coreteam@pfsense.org"}
if [ "${PRODUCT_NAME}" = "pfSense" -a "${BUILD_AUTHORIZED_BY_ELECTRIC_SHEEP_FENCING}" != "yes" ]; then
echo ">>>ERROR: According the following license, only Electric Sheep Fencing can build genuine pfSense® software"
@@ -133,7 +134,7 @@ else
export GIT_REPO_BRANCH_OR_TAG="${_cur_git_repo_branch_or_tag}"
fi
-GIT_REPO_BASE=$(git -C ${BUILDER_ROOT} config --get remote.origin.url | sed 's,/[^/]*,,')
+GIT_REPO_BASE=$(git -C ${BUILDER_ROOT} config --get remote.origin.url | sed -e 's,/[^/]*$,,')
# This is used for using svn for retrieving src
export FREEBSD_REPO_BASE=${FREEBSD_REPO_BASE:-"${GIT_REPO_BASE}/freebsd-src.git"}
@@ -175,7 +176,7 @@ export MAKEJ_KERNEL=${MAKEJ_KERNEL:-"${_CPUS}"}
if [ "${TARGET}" = "i386" ]; then
export MODULES_OVERRIDE=${MODULES_OVERRIDE:-"i2c ipmi ndis ipfw ipdivert dummynet fdescfs opensolaris zfs glxsb if_stf coretemp amdtemp hwpmc"}
else
- export MODULES_OVERRIDE=${MODULES_OVERRIDE:-"i2c ipmi ndis ipfw ipdivert dummynet fdescfs opensolaris zfs glxsb if_stf coretemp amdtemp aesni sfxge hwpmc"}
+ export MODULES_OVERRIDE=${MODULES_OVERRIDE:-"i2c ipmi ndis ipfw ipdivert dummynet fdescfs opensolaris zfs glxsb if_stf coretemp amdtemp aesni sfxge hwpmc vmm nmdm"}
fi
# Area that the final image will appear in
@@ -211,7 +212,7 @@ export VMDK_DISK_CAPACITY_IN_GB=${VMDK_DISK_CAPACITY_IN_GB:-"8"}
export OVA_FIRST_PART_SIZE_IN_GB=${OVA_FIRST_PART_SIZE_IN_GB:-"6"}
# swap partition size (freebsd-swap)
export OVA_SWAP_PART_SIZE_IN_GB=${OVA_SWAP_PART_SIZE_IN_GB:-"2"}
-# Calculate real swap size, removing 128 blocks (65536 bytes) beggining/loader
+# Calculate real swap size, removing 128 blocks (65536 bytes) beginning/loader
export OVA_SWAP_PART_SIZE=$((${OVA_SWAP_PART_SIZE_IN_GB}*1024*1024*1024-65536))
# Temporary place to save files
export OVA_TMP=${OVA_TMP:-"${SCRATCHDIR}/ova_tmp"}
@@ -261,7 +262,7 @@ fi
echo "$BUILTDATESTRING" > $BUILTDATESTRINGFILE
# Poudriere
-export ZFS_TANK=${ZFS_TANK:-"tank"}
+export ZFS_TANK=${ZFS_TANK:-"zroot"}
export ZFS_ROOT=${ZFS_ROOT:-"/poudriere"}
export POUDRIERE_PORTS_NAME=${POUDRIERE_PORTS_NAME:-"${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}"}
@@ -273,9 +274,13 @@ export POUDRIERE_PORTS_GIT_BRANCH=${POUDRIERE_PORTS_GIT_BRANCH:-"devel"}
export PKG_RSYNC_USERNAME=${PKG_RSYNC_USERNAME:-"wwwsync"}
export PKG_RSYNC_SSH_PORT=${PKG_RSYNC_SSH_PORT:-"22"}
export PKG_RSYNC_DESTDIR=${PKG_RSYNC_DESTDIR:-"/usr/local/www/beta/packages"}
+export PKG_RSYNC_LOGS=${PKG_RSYNC_LOGS:-"/usr/local/www/beta"}
export PKG_REPO_SERVER=${PKG_REPO_SERVER:-"pkg+http://beta.pfsense.org/packages"}
export PKG_REPO_CONF_BRANCH=${PKG_REPO_CONF_BRANCH:-"${GIT_REPO_BRANCH_OR_TAG}"}
+# Command used to sign pkg repo
+export PKG_REPO_SIGNING_COMMAND=${PKG_REPO_SIGNING_COMMAND:-""}
+
unset _IS_RELEASE
unset CORE_PKG_DATESTRING
export TIMESTAMP_SUFFIX="-${DATESTRING}"
@@ -303,8 +308,16 @@ esac
# Define base package version, based on date for snaps
export CORE_PKG_VERSION="${PRODUCT_VERSION%%-*}${CORE_PKG_DATESTRING}"
export CORE_PKG_PATH=${CORE_PKG_PATH:-"${SCRATCHDIR}/${PRODUCT_NAME}_${GIT_REPO_BRANCH_OR_TAG}_${TARGET}_${TARGET_ARCH}-core"}
+export CORE_PKG_REAL_PATH="${CORE_PKG_PATH}/.real_$(date +%s)"
export CORE_PKG_TMP=${CORE_PKG_TMP:-"${SCRATCHDIR}/core_pkg_tmp"}
+export PKG_REPO_BASE=${PKG_REPO_BASE:-"${FREEBSD_SRC_DIR}/release/pkg_repos"}
+export PKG_REPO_TEMPLATE=${PKG_REPO_TEMPLATE:-"${PKG_REPO_BASE}/${PRODUCT_NAME}.conf.template"}
+export PKG_REPO_DEVEL_TEMPLATE=${PKG_REPO_TEMPLATE:-"${PKG_REPO_BASE}/${PRODUCT_NAME}-devel.conf.template"}
+export PKG_REPO_PATH=${PKG_REPO_PATH:-"/usr/local/etc/pkg/repos/${PRODUCT_NAME}.conf"}
+
+export PRODUCT_SHARE_DIR=${PRODUCT_SHARE_DIR:-"/usr/local/share/${PRODUCT_NAME}"}
+
# Package overlay. This gives people a chance to build product
# installable image that already contains certain extra packages.
#
@@ -337,3 +350,13 @@ mkdir -p ${STAGINGAREA}
export SNAPSHOTSLOGFILE=${SNAPSHOTSLOGFILE:-"${SCRATCHDIR}/snapshots-build.log"}
export SNAPSHOTSLASTUPDATE=${SNAPSHOTSLASTUPDATE:-"${SCRATCHDIR}/snapshots-lastupdate.log"}
+
+if [ -n "${POUDRIERE_SNAPSHOTS}" ]; then
+ export SNAPSHOTS_RSYNCIP=${PKG_RSYNC_HOSTNAME}
+ export SNAPSHOTS_RSYNCUSER=${PKG_RSYNC_USERNAME}
+ export SNAPSHOTS_RSYNCLOGS=${PKG_RSYNC_LOGS}
+else
+ export SNAPSHOTS_RSYNCIP=${RSYNCIP}
+ export SNAPSHOTS_RSYNCUSER=${RSYNCUSER}
+ export SNAPSHOTS_RSYNCLOGS=${RSYNCLOGS}
+fi
diff --git a/tools/conf/pfPorts/make.conf b/tools/conf/pfPorts/make.conf
index a972fde..5f06177 100644
--- a/tools/conf/pfPorts/make.conf
+++ b/tools/conf/pfPorts/make.conf
@@ -2,13 +2,11 @@
OPTIONS_UNSET_FORCE= X11 DOCS EXAMPLES MAN INFO MANPAGES
# Individual ports options
-net_apinger_SET_FORCE= IPV6
-
www_elinks_UNSET_FORCE= FASTMEM
www_lighttpd_SET_FORCE= NODELAY
-net_miniupnpd_SET_FORCE= PF_ENABLE_FILTER_RULES
+net_miniupnpd_SET_FORCE= PF_ENABLE_FILTER_RULES IPV6 UPNP_IGDV2 CHECK_PORTINUSE
security_openssl_SET_FORCE= PADLOCK
@@ -26,8 +24,10 @@ emulators_qemu_UNSET_FORCE= SDL
security_ca_root_nss_SET_FORCE= ETCSYMLINK
security_strongswan_SET_FORCE= CURL EAPDYNAMIC EAPRADIUS EAPSIMFILE \
- IKEv1 UNBOUND XAUTH IPSECKEY SMP PKI UNITY
-security_strongswan_UNSET_FORCE= EAPAKA3GPP2
+ IKEv1 UNBOUND XAUTH IPSECKEY PKI UNITY VICI VSTR
+security_strongswan_UNSET_FORCE= EAPAKA3GPP2 BUILTIN LIBC SMP
+
+security_xinetd_UNSET_FORCE= XCONV
dns_unbound_SET_FORCE= LIBEVENT
@@ -43,10 +43,6 @@ CFLAGS+= -static
CONFIGURE_ARGS= --without-openssl-header-check
.endif
-.if ${.CURDIR:N*security/strongswan*}==""
-ETCDIR= /var/etc/ipsec/strongswan
-.endif
-
DEFAULT_VERSIONS= php=56
WITH_OPENSSL_BASE= yes
sysutils_syslog-ng_SET_FORCE= SYS_SSL
@@ -84,8 +80,7 @@ net_freeradius2_SET_FORCE=KERBEROS LDAP MYSQL PERL PGSQL PYTHON SSL_PORT
lang_gcc_UNSET_FORCE=JAVA
-devel_git_SET_FORCE=CONTRIB CURL ETCSHELLS ICONV NLS PERL
-devel_git_UNSET_FORCE=CVS GITWEB GUI HTMLDOCS P4 SVN
+devel_git_UNSET_FORCE=CVS GITWEB GUI HTMLDOCS P4 SVN CONTRIB PERL ETCSHELLS
graphics_graphviz_SET_FORCE=ICONV NLS
graphics_graphviz_UNSET_FORCE=DIGCOLA IPSEPCOLA PANGOCAIRO XPM
diff --git a/clean.sh b/tools/scripts/clean.sh
index 3f14115..3f14115 100755
--- a/clean.sh
+++ b/tools/scripts/clean.sh
diff --git a/tools/scripts/generate-privdefs.php b/tools/scripts/generate-privdefs.php
index 917a94d..553be1e 100755
--- a/tools/scripts/generate-privdefs.php
+++ b/tools/scripts/generate-privdefs.php
@@ -65,7 +65,7 @@ if (count($argv) < 2) {
echo "\n";
echo "Examples:\n";
echo "#generate-privdefs /\n";
- echo "#generate-privdefs /home/pfsense/RELENG_1/pfSense/\n";
+ echo "#generate-privdefs /home/pfsense/src/\n";
echo "\n";
exit -1;
}
@@ -93,13 +93,14 @@ list_phpfiles($path, $found);
echo "--Gathering privilege metadata--\n";
$data;
+sort($found);
foreach ($found as $fname)
read_file_metadata($path."/".$fname, $data, "PRIV");
echo "--Generating privilege definitions--\n";
$privdef = $prefix."etc/inc/priv.defs.inc";
-$fp = fopen($privdef,"w");
+$fp = fopen($privdef, "w");
if (!$fp) {
echo "unable to open {$privdef}\n";
exit -2;
@@ -108,15 +109,22 @@ if (!$fp) {
$pdata;
$pdata = "<?php\n";
$pdata .= "/*\n";
-$pdata .= " * priv.defs.inc - Generated privilege definitions\n";
+$pdata .= " * priv.defs.inc - Default Privilege Definitions\n";
+$pdata .= " * Generated by pfSense/tools/scripts/generate-privdefs.php\n";
+$pdata .= " *\n";
+$pdata .= " * ***************************************************\n";
+$pdata .= " * DO NOT EDIT THIS FILE. IT IS GENERATED BY A SCRIPT.\n";
+$pdata .= " * ***************************************************\n";
+$pdata .= " *\n";
+$pdata .= " * Text is pulled from metadata headers in the referenced files.\n";
$pdata .= " *\n";
$pdata .= " */\n";
$pdata .= "\n";
$pdata .= "\$priv_list = array();\n";
$pdata .= "\n";
$pdata .= "\$priv_list['page-all'] = array();\n";
-$pdata .= "\$priv_list['page-all']['name'] = \"WebCfg - All pages\";\n";
-$pdata .= "\$priv_list['page-all']['descr'] = \"Allow access to all pages\";\n";
+$pdata .= "\$priv_list['page-all']['name'] = gettext(\"WebCfg - All pages\");\n";
+$pdata .= "\$priv_list['page-all']['descr'] = gettext(\"Allow access to all pages\");\n";
$pdata .= "\$priv_list['page-all']['match'] = array();\n";
$pdata .= "\$priv_list['page-all']['match'][] = \"*\";\n";
$pdata .= "\n";
@@ -159,8 +167,8 @@ foreach ($data as $fname => $tags) {
}
$pdata .= "\$priv_list['{$ident}'] = array();\n";
- $pdata .= "\$priv_list['{$ident}']['name'] = \"WebCfg - {$name}\";\n";
- $pdata .= "\$priv_list['{$ident}']['descr'] = \"{$descr}\";\n";
+ $pdata .= "\$priv_list['{$ident}']['name'] = gettext(\"WebCfg - {$name}\");\n";
+ $pdata .= "\$priv_list['{$ident}']['descr'] = gettext(\"{$descr}\");\n";
$pdata .= "\$priv_list['{$ident}']['match'] = array();\n";
foreach ($match as $url)
@@ -188,7 +196,7 @@ echo "--Checking for pages without privilege definitions--\n";
foreach ($found as $fname) {
$match = false;
foreach ($pages_current as $pname => $pdesc) {
- if (!strcmp($pname,$fname)) {
+ if (!strcmp($pname, $fname)) {
$match = true;
break;
}
@@ -202,7 +210,7 @@ echo "--Checking for stale privilege definitions--\n";
foreach ($pages_current as $pname => $pdesc) {
$match = false;
foreach ($found as $fname) {
- if (!strncmp($fname,$pname,strlen($fname))) {
+ if (!strncmp($fname, $pname, strlen($fname))) {
$match = true;
break;
}
diff --git a/tools/scripts/update_package_pfPorts.php b/tools/scripts/update_package_pfPorts.php
index 6b5cd5d..3962ae0 100755
--- a/tools/scripts/update_package_pfPorts.php
+++ b/tools/scripts/update_package_pfPorts.php
@@ -55,7 +55,7 @@ $opts .= "t:"; // Path to ports tree repo
$options = getopt($opts);
-if(!isset($options['x']))
+if (!isset($options['x']))
usage();
// Set the XML filename that we are processing
@@ -85,7 +85,7 @@ if (is_dir("{$src_dir}/etc/inc")) {
}
$pkgs = parse_xml_config_pkg($xml_filename, "pfsensepkgs");
-if(!$pkgs) {
+if (!$pkgs) {
echo "!!! An error occurred while trying to process {$xml_filename}. Exiting.\n";
exit;
}
@@ -101,7 +101,7 @@ if (isset($options['p'])) {
$pfs_version = trim(file_get_contents("{$src_dir}/etc/version"));
-foreach($pkgs['packages']['package'] as $pkg) {
+foreach ($pkgs['packages']['package'] as $pkg) {
if (isset($pkg_list) && !in_array(strtolower($pkg['name']), $pkg_list))
continue;
@@ -391,7 +391,9 @@ function create_port($pkg) {
$conflicts = $product_name . '-base-nanobsd-[0-9]*';
}
if (isset($pkg['conflicts']) && !empty($pkg['conflicts'])) {
- $conflicts = trim($conflicts . ' ' . $port_name_prefix . $pkg['conflicts'] . '-[0-9]*');
+ foreach (preg_split('/[\s\t]+/', $pkg['conflicts']) as $conflict) {
+ $conflicts = trim($conflicts . ' ' . $port_name_prefix . $conflict . '-[0-9]*');
+ }
}
if (!empty($conflicts)) {
$makefile[] = "";
@@ -429,12 +431,7 @@ function create_port($pkg) {
function usage() {
global $argv;
- echo "Usage: {$argv[0]} -x <path to pkg xml> [-p <package name>]\n";
- echo " Flags:\n";
- echo " -s Product version to pass to set_version.sh during chroot build\n";
- echo " -U Do NOT run build.sh --update-sources\n";
- echo " Examples:\n";
- echo " {$argv[0]} -x /home/packages/pkg_info.10.xml -p squid -s RELENG_2_2\n";
+ echo "Usage: {$argv[0]} -x <path to pkg xml> -t <path to ports tree> [-p <package name>]\n";
exit;
}
?>
diff --git a/tools/templates/core_pkg/base-nanobsd/exclude_files b/tools/templates/core_pkg/base-nanobsd/exclude_files
index 8228dc9..2c915af 100644
--- a/tools/templates/core_pkg/base-nanobsd/exclude_files
+++ b/tools/templates/core_pkg/base-nanobsd/exclude_files
@@ -13,6 +13,7 @@
./etc/dh-parameters.4096
./etc/fstab
./etc/group
+./etc/hosts
./etc/master.passwd
./etc/master.passwd.db
./etc/passwd
@@ -20,6 +21,7 @@
./etc/pwd.db
./etc/rc.conf
./etc/spwd.db
+./etc/syslog.conf
./media
./mnt
./proc
@@ -27,3 +29,4 @@
./tmp
./usr/local/share/%%PRODUCT_NAME%%/base.mtree
./usr/local/share/%%PRODUCT_NAME%%/base.txz
+./usr/local/etc/pkg/repos/%%PRODUCT_NAME%%.conf
diff --git a/tools/templates/core_pkg/base-nanobsd/metadir/+INSTALL b/tools/templates/core_pkg/base-nanobsd/metadir/+INSTALL
index 82aeafc..d86a758 100644
--- a/tools/templates/core_pkg/base-nanobsd/metadir/+INSTALL
+++ b/tools/templates/core_pkg/base-nanobsd/metadir/+INSTALL
@@ -13,6 +13,7 @@ echo "===> Removing schg flag from base files"
# Cleanup schg flags
chflags -R noschg \
+ /boot \
/bin \
/sbin \
/usr/bin \
diff --git a/tools/templates/core_pkg/base-nanobsd/metadir/+MANIFEST b/tools/templates/core_pkg/base-nanobsd/metadir/+MANIFEST
index f163b92..b1a31a7 100644
--- a/tools/templates/core_pkg/base-nanobsd/metadir/+MANIFEST
+++ b/tools/templates/core_pkg/base-nanobsd/metadir/+MANIFEST
@@ -7,7 +7,7 @@ EOD
maintainer: development@pfsense.org
prefix: /usr/local
deps: {
-
+"%%PRODUCT_NAME%%-rc": {origin: "security/%%PRODUCT_NAME%%-rc", version: "%%VERSION%%"}
}
categories [ security, ]
licenselogic: single
diff --git a/tools/templates/core_pkg/base/exclude_files b/tools/templates/core_pkg/base/exclude_files
index d21c093..2c915af 100644
--- a/tools/templates/core_pkg/base/exclude_files
+++ b/tools/templates/core_pkg/base/exclude_files
@@ -8,8 +8,12 @@
./conf.default/config.xml
./etc/bogons
./etc/bogonsv6
+./etc/dh-parameters.1024
+./etc/dh-parameters.2048
+./etc/dh-parameters.4096
./etc/fstab
./etc/group
+./etc/hosts
./etc/master.passwd
./etc/master.passwd.db
./etc/passwd
@@ -17,6 +21,7 @@
./etc/pwd.db
./etc/rc.conf
./etc/spwd.db
+./etc/syslog.conf
./media
./mnt
./proc
@@ -24,3 +29,4 @@
./tmp
./usr/local/share/%%PRODUCT_NAME%%/base.mtree
./usr/local/share/%%PRODUCT_NAME%%/base.txz
+./usr/local/etc/pkg/repos/%%PRODUCT_NAME%%.conf
diff --git a/tools/templates/core_pkg/base/metadir/+INSTALL b/tools/templates/core_pkg/base/metadir/+INSTALL
index 82aeafc..d86a758 100644
--- a/tools/templates/core_pkg/base/metadir/+INSTALL
+++ b/tools/templates/core_pkg/base/metadir/+INSTALL
@@ -13,6 +13,7 @@ echo "===> Removing schg flag from base files"
# Cleanup schg flags
chflags -R noschg \
+ /boot \
/bin \
/sbin \
/usr/bin \
diff --git a/tools/templates/core_pkg/base/metadir/+MANIFEST b/tools/templates/core_pkg/base/metadir/+MANIFEST
index 94b2057..0f5ed85 100644
--- a/tools/templates/core_pkg/base/metadir/+MANIFEST
+++ b/tools/templates/core_pkg/base/metadir/+MANIFEST
@@ -7,7 +7,7 @@ EOD
maintainer: development@pfsense.org
prefix: /usr/local
deps: {
-
+"%%PRODUCT_NAME%%-rc": {origin: "security/%%PRODUCT_NAME%%-rc", version: "%%VERSION%%"}
}
categories [ security, ]
licenselogic: single
diff --git a/tools/templates/core_pkg/kernel-debug/metadir/+DESC b/tools/templates/core_pkg/kernel-debug/metadir/+DESC
new file mode 100644
index 0000000..00ac37d
--- /dev/null
+++ b/tools/templates/core_pkg/kernel-debug/metadir/+DESC
@@ -0,0 +1,3 @@
+%%PRODUCT_NAME%% kernel debug files
+
+WWW: %%PRODUCT_URL%%
diff --git a/tools/templates/core_pkg/kernel-debug/metadir/+MANIFEST b/tools/templates/core_pkg/kernel-debug/metadir/+MANIFEST
new file mode 100644
index 0000000..b2b7999
--- /dev/null
+++ b/tools/templates/core_pkg/kernel-debug/metadir/+MANIFEST
@@ -0,0 +1,15 @@
+name: "%%PRODUCT_NAME%%-kernel-debug-%%FLAVOR%%"
+version: "%%VERSION%%"
+origin: "security/%%PRODUCT_NAME%%-kernel-debug"
+comment: <<EOD
+%%PRODUCT_NAME%% kernel-debug
+EOD
+maintainer: development@pfsense.org
+prefix: /
+deps: {
+"%%PRODUCT_NAME%%-kernel-%%FLAVOR%%": {origin: "security/%%PRODUCT_NAME%%-kernel", version: "%%VERSION%%"}
+}
+categories [ security, ]
+licenselogic: single
+licenses: [ BSD2CLAUSE, ]
+options: { }
diff --git a/tools/templates/core_pkg/kernel/metadir/+MANIFEST b/tools/templates/core_pkg/kernel/metadir/+MANIFEST
index 1770333..5c87a6a 100644
--- a/tools/templates/core_pkg/kernel/metadir/+MANIFEST
+++ b/tools/templates/core_pkg/kernel/metadir/+MANIFEST
@@ -7,7 +7,7 @@ EOD
maintainer: development@pfsense.org
prefix: /
deps: {
-
+"%%PRODUCT_NAME%%-rc": {origin: "security/%%PRODUCT_NAME%%-rc", version: "%%VERSION%%"}
}
categories [ security, ]
licenselogic: single
diff --git a/tools/templates/core_pkg/rc/metadir/+DESC b/tools/templates/core_pkg/rc/metadir/+DESC
new file mode 100644
index 0000000..18e12fe
--- /dev/null
+++ b/tools/templates/core_pkg/rc/metadir/+DESC
@@ -0,0 +1,3 @@
+%%PRODUCT_NAME%% rc script
+
+WWW: %%PRODUCT_URL%%
diff --git a/tools/templates/core_pkg/rc/metadir/+MANIFEST b/tools/templates/core_pkg/rc/metadir/+MANIFEST
new file mode 100644
index 0000000..3099d1f
--- /dev/null
+++ b/tools/templates/core_pkg/rc/metadir/+MANIFEST
@@ -0,0 +1,15 @@
+name: "%%PRODUCT_NAME%%-rc"
+version: "%%VERSION%%"
+origin: "security/%%PRODUCT_NAME%%-rc"
+comment: <<EOD
+%%PRODUCT_NAME%% rc script
+EOD
+maintainer: development@pfsense.org
+prefix: /
+deps: {
+
+}
+categories [ security, ]
+licenselogic: single
+licenses: [ BSD2CLAUSE, ]
+options: { }
diff --git a/tools/templates/core_pkg/rc/pkg-plist b/tools/templates/core_pkg/rc/pkg-plist
new file mode 100644
index 0000000..3cdb92d
--- /dev/null
+++ b/tools/templates/core_pkg/rc/pkg-plist
@@ -0,0 +1 @@
+/etc/rc
diff --git a/tools/templates/core_pkg/repo-devel/metadir/+DESC b/tools/templates/core_pkg/repo-devel/metadir/+DESC
new file mode 100644
index 0000000..4196161
--- /dev/null
+++ b/tools/templates/core_pkg/repo-devel/metadir/+DESC
@@ -0,0 +1,3 @@
+%%PRODUCT_NAME%% pkg repository configuration (devel)
+
+WWW: %%PRODUCT_URL%%
diff --git a/tools/templates/core_pkg/repo-devel/metadir/+MANIFEST b/tools/templates/core_pkg/repo-devel/metadir/+MANIFEST
new file mode 100644
index 0000000..745383a
--- /dev/null
+++ b/tools/templates/core_pkg/repo-devel/metadir/+MANIFEST
@@ -0,0 +1,15 @@
+name: "%%PRODUCT_NAME%%-repo-devel"
+version: "%%VERSION%%"
+origin: "security/%%PRODUCT_NAME%%-repo-devel"
+comment: <<EOD
+%%PRODUCT_NAME%% pkg repository configuration (devel)
+EOD
+maintainer: development@pfsense.org
+prefix: /usr/local
+deps: {
+
+}
+categories [ security, ]
+licenselogic: single
+licenses: [ BSD2CLAUSE, ]
+options: { }
diff --git a/tools/templates/core_pkg/repo-devel/pkg-plist b/tools/templates/core_pkg/repo-devel/pkg-plist
new file mode 100644
index 0000000..1a670e1
--- /dev/null
+++ b/tools/templates/core_pkg/repo-devel/pkg-plist
@@ -0,0 +1 @@
+etc/pkg/repos/%%PRODUCT_NAME%%.conf
diff --git a/tools/templates/core_pkg/repo/metadir/+DESC b/tools/templates/core_pkg/repo/metadir/+DESC
new file mode 100644
index 0000000..ec6bbc5
--- /dev/null
+++ b/tools/templates/core_pkg/repo/metadir/+DESC
@@ -0,0 +1,3 @@
+%%PRODUCT_NAME%% pkg repository configuration (stable)
+
+WWW: %%PRODUCT_URL%%
diff --git a/tools/templates/core_pkg/repo/metadir/+MANIFEST b/tools/templates/core_pkg/repo/metadir/+MANIFEST
new file mode 100644
index 0000000..9487b7b
--- /dev/null
+++ b/tools/templates/core_pkg/repo/metadir/+MANIFEST
@@ -0,0 +1,15 @@
+name: "%%PRODUCT_NAME%%-repo"
+version: "%%VERSION%%"
+origin: "security/%%PRODUCT_NAME%%-repo"
+comment: <<EOD
+%%PRODUCT_NAME%% pkg repository configuration (stable)
+EOD
+maintainer: development@pfsense.org
+prefix: /usr/local
+deps: {
+
+}
+categories [ security, ]
+licenselogic: single
+licenses: [ BSD2CLAUSE, ]
+options: { }
diff --git a/tools/templates/core_pkg/repo/pkg-plist b/tools/templates/core_pkg/repo/pkg-plist
new file mode 100644
index 0000000..1a670e1
--- /dev/null
+++ b/tools/templates/core_pkg/repo/pkg-plist
@@ -0,0 +1 @@
+etc/pkg/repos/%%PRODUCT_NAME%%.conf
diff --git a/tools/templates/pkg-deinstall.in b/tools/templates/pkg-deinstall.in
index 0ea6111..83d1c3d 100644
--- a/tools/templates/pkg-deinstall.in
+++ b/tools/templates/pkg-deinstall.in
@@ -1,3 +1,3 @@
#!/bin/sh
-/usr/local/sbin/fcgicli -f /etc/rc.packages -d "pkg=%%PORTNAME%%&when=${2}"
+/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2}
diff --git a/tools/templates/pkg-install.in b/tools/templates/pkg-install.in
index d9217e6..25b1886 100644
--- a/tools/templates/pkg-install.in
+++ b/tools/templates/pkg-install.in
@@ -4,4 +4,4 @@ if [ "${2}" != "POST-INSTALL" ]; then
exit 0
fi
-/usr/local/sbin/fcgicli -f /etc/rc.packages -d "pkg=%%PORTNAME%%&when=${2}"
+/usr/local/bin/php -f /etc/rc.packages %%PORTNAME%% ${2}
OpenPOWER on IntegriCloud