293 Commits

Author SHA1 Message Date
Vincent Li
d7d0967f9e dns.cgi: fix type error
replace '$' with '&' to call Header::escape, likely type error.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-12-03 20:05:31 +00:00
Vincent Li
4382757dff unbound: upgrade to 1.22.0
there is issue with DNS unable to resolve some domain [0], update the
unbound to 1.22.0, the issue is resolved, not sure why it broke though.

[0]: https://github.com/vincentmli/bpfire/issues/112

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-12-03 20:02:09 +00:00
Vincent Li
d38d3d5d6e dns: add new unbound-dhcp-leases-client script to send events to the bridge
commit 7397809eb4
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri May 10 16:06:23 2024 +0100

    unbound-dhcp-leases-client: A new script to send events to the bridge

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-12-03 19:59:48 +00:00
Vincent Li
2ab05a1533 wireguard: Add wireguard handshake log UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-15 19:48:38 +00:00
Vincent Li
ecae6bb08c wireguard: add wireguard handshake logging
Start the wireguard peer handshake logging in wireguard init script
through lightweight kernel bpf trampoline fentry tracing on wireguard
kernel function.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-15 19:41:58 +00:00
Vincent Li
704a226f1f libbpf-bootstrap: add wg_handshake to log wireguard handshake message
commit 6424fa8757a3a8fd8fde1be6935a1984abe8fdb2 (HEAD -> loongfire-port, origin/loongfire-port)
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Nov 7 19:17:59 2025 -0800

        wg_handshake: log wireguard handshake message

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-15 19:39:00 +00:00
Vincent Li
916a8aa5ed flash-images: mount debugfs
mount debugfs to allow kernel functions tracing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-05 18:13:17 +00:00
Vincent Li
58b4babde2 xdp-tools: add IFB setup in tc-basic-classifier
commit f0812939ca4f6332d34715673c4fe44fbb1a491b (HEAD -> main, origin/main, origin/HEAD)
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Mon Nov 3 21:46:30 2025 -0800

        tc-basic-classifier: add IFB setup in user space

        Add the required kernel modules setup and green0 ingress mirror to ifb0
        egress setup in class_filter so it is easier for user. see [0] for
        required kernel modules and ingress shaping. also change the default
        path to /usr/lib/bpf/class_filter.bpf.o  also change the default bpf
        object path to /usr/lib/bpf/class_filter.bpf.o.

        [0]: https://std.rocks/gnulinux_network_traffic_control.html

        for example:

        Complete setup with one command (IFB mirroring + BPF attachment)

        ./class_filter -i green0 -3 10mbit -I -a -v

        Setting up IFB mirroring for ingress traffic shaping on green0
        Loading required kernel modules...
        Executing: modprobe ifb numifbs=1
        Loaded module: ifb numifbs=1
        Executing: modprobe sch_fq_codel
        Loaded module: sch_fq_codel
        Executing: modprobe act_mirred
        Loaded module: act_mirred
        Executing: modprobe act_connmark
        Loaded module: act_connmark
        Successfully loaded all required kernel modules
        Executing: ip link set dev ifb0 up
        Executing: tc qdisc del dev green0 ingress 2>/dev/null
        Executing: tc qdisc add dev green0 ingress handle ffff:
        Executing: tc filter add dev green0 parent ffff: protocol ip u32 match u32 0 0 action connmark action mirred egress redirect dev ifb0 flowid ffff:1
        Successfully setup IFB mirroring:
          - Ingress traffic from green0 mirrored to ifb0 egress

        Verification - IFB status:
        Executing: ip link show ifb0
        7: ifb0: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc htb state UNKNOWN mode DEFAULT group default qlen 32
            link/ether 8e:52:c9:93:13:34 brd ff:ff:ff:ff:ff:ff

        TC configuration on green0 ingress:
        Executing: tc qdisc show dev green0
        qdisc fq_codel 8001: root refcnt 9 limit 10240p flows 1024 quantum 1514 target 5ms interval 100ms memory_limit 32Mb ecn drop_batch 64
        qdisc ingress ffff: parent ffff:fff1 ----------------
        Executing: tc filter show dev green0 parent ffff:
        filter protocol ip pref 49152 u32 chain 0
        filter protocol ip pref 49152 u32 chain 0 fh 800: ht divisor 1
        filter protocol ip pref 49152 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 flowid ffff:1 not_in_hw
          match 00000000/00000000 at 0
                action order 1: connmark zone 0 pipe
                 index 1 ref 1 bind 1

                action order 2: mirred (Egress Redirect to device ifb0) stolen
                index 1 ref 1 bind 1

        Setting up TC qdisc and classes on ifb0 for egress shaping...
        Executing: tc qdisc del dev ifb0 root 2>/dev/null
        Executing: tc qdisc add dev ifb0 root handle 1:0 htb default 30
        Executing: tc class add dev ifb0 parent 1:0 classid 1:1 htb rate 100mbit
        Warning: sch_htb: quantum of class 10001 is big. Consider r2q change.
        Executing: tc class add dev ifb0 parent 1:1 classid 1:30 htb rate 5mbit ceil 10mbit
        Successfully setup TC qdisc and classes on ifb0

        TC configuration on ifb0:
        Executing: tc qdisc show dev ifb0
        qdisc htb 1: root refcnt 2 r2q 10 default 0x30 direct_packets_stat 1 direct_qlen 32
        Executing: tc class show dev ifb0
        class htb 1:1 root rate 100Mbit ceil 100Mbit burst 1600b cburst 1600b
        class htb 1:30 parent 1:1 prio 0 rate 5Mbit ceil 10Mbit burst 1600b cburst 1600b

        Automatically attaching BPF program to ifb0 for classification...
        Attaching BPF program to ifb0...
        Executing: tc filter del dev ifb0 protocol ip parent 1:0 2>/dev/null
        Command failed but ignoring (may be normal): tc filter del dev ifb0 protocol ip parent 1:0 2>/dev/null
        Executing: tc filter add dev ifb0 protocol ip parent 1:0 bpf obj ./class_filter.bpf.o classid 1: direct-action
        Successfully attached BPF program to ifb0 egress (parent 1:0)
        BPF maps automatically pinned to /sys/fs/bpf/tc/globals/
        Verification:
        Executing: tc filter show dev ifb0 parent 1:0
        filter protocol ip pref 49152 bpf chain 0
        filter protocol ip pref 49152 bpf chain 0 handle 0x1 flowid 1: class_filter.bpf.o:[classifier] direct-action not_in_hw id 100 name cls_filter tag 7163f8c072cf7015 jited
        Pinned maps:
        Executing: ls -la /sys/fs/bpf/tc/globals/ 2>/dev/null || echo 'No pinned maps found'
        total 0
        drwx------ 2 root root 0 Nov  3 11:43 .
        drwx------ 3 root root 0 Nov  3 11:24 ..
        -rw------- 1 root root 0 Nov  3 11:43 cls_filter_ip_trie_map
        -rw------- 1 root root 0 Nov  3 11:43 cls_filter_port_map

        Complete setup finished:
          - IFB mirroring configured on green0 -> ifb0
          - TC qdisc and classes setup on ifb0
          - BPF classifier attached to ifb0 egress
          - Ready for port/IP based traffic classification!

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-04 02:18:19 +00:00
Vincent Li
101831d1b7 xdp-tools: tc-basic-classifier ingress shaping
commit 9b82374a47906be38eb50f6ee5cc429fc4de4a4c (HEAD -> main, origin/main, origin/HEAD)
Author: Vincent Li <vincent.mc.li@gmail.com>
Date:   Sat Nov 1 09:03:11 2025 -0700

    tc-basic-classifier: add source ip address classification

    For ingress shaping based on local network source address, according to [0] [1], iptables firewallrule mark is used to mark the packet originated from the local network source ip, but with eBPF tc, we can do the eBPF TC classification on the ifb0 interface to eliminate use of iptables, this improves programability and flexibility. so change the tc bpf program to do both destination and source ip classification, the setup is like:

    modprobe ifb numifbs=1
    modprobe sch_fq_codel
    modprobe act_mirred
    modprobe act_connmark

    ip link set ifb0 up

    tc qdisc add dev green0 ingress handle ffff:

    tc filter add dev green0 parent ffff: protocol ip u32 match u32 0 0 action connmark action mirred egress redirect dev ifb0 flowid ffff:1

    ./class_filter -a -b ./class_filter.bpf.o -i ifb0 -v

    Setting up TC qdisc and classes...
    Setting up TC qdisc and classes on ifb0
    Executing: tc qdisc del dev ifb0 root 2>/dev/null
    Command failed but ignoring (may be normal): tc qdisc del dev ifb0 root 2>/dev/null
    Executing: tc qdisc add dev ifb0 root handle 1:0 htb default 30
    Executing: tc class add dev ifb0 parent 1:0 classid 1:1 htb rate 100mbit
    Warning: sch_htb: quantum of class 10001 is big. Consider r2q change.
    Executing: tc class add dev ifb0 parent 1:1 classid 1:30 htb rate 5mbit ceil 20mbit
    Successfully setup TC qdisc and classes on ifb0

    TC qdisc configuration:
    Executing: tc qdisc show dev ifb0
    qdisc htb 1: root refcnt 2 r2q 10 default 0x30 direct_packets_stat 2 direct_qlen 32

    TC classes configuration:
    Executing: tc class show dev ifb0
    class htb 1:1 root rate 100Mbit ceil 100Mbit burst 1600b cburst 1600b
    class htb 1:30 parent 1:1 prio 0 rate 5Mbit ceil 20Mbit burst 1600b cburst 1600b
    Executing: tc filter del dev ifb0 protocol ip parent 1:0 2>/dev/null
    Command failed but ignoring (may be normal): tc filter del dev ifb0 protocol ip parent 1:0 2>/dev/null
    Executing: tc filter add dev ifb0 protocol ip parent 1:0 bpf obj ./class_filter.bpf.o classid 1: direct-action
    Successfully attached BPF program to ifb0 egress (parent 1:0)
    BPF maps automatically pinned to /sys/fs/bpf/tc/globals/
    Verification:
    Executing: tc filter show dev ifb0 parent 1:0
    filter protocol ip pref 49152 bpf chain 0
    filter protocol ip pref 49152 bpf chain 0 handle 0x1 flowid 1: class_filter.bpf.o:[classifier] direct-action not_in_hw id 93 name cls_filter tag 7163f8c072cf7015 jited
    Pinned maps:
    Executing: ls -la /sys/fs/bpf/tc/globals/ 2>/dev/null || echo 'No pinned maps found'
    total 0
    drwx------ 2 root root 0 Nov  1 09:01 .
    drwx------ 3 root root 0 Nov  1 08:01 ..
    -rw------- 1 root root 0 Nov  1 09:01 cls_filter_ip_trie_map
    -rw------- 1 root root 0 Nov  1 09:01 cls_filter_port_map

    BPF program loaded and attached successfully to ifb0 egress
    Default class configured: 1:30 (rate: 5mbit, ceil: 20mbit)

    Use --add-port to create additional classes with rates (supports single ports and ranges).

    ./class_filter -i ifb0 -r 192.168.9.13/32:40:80mbit

    Added TC class: 1:40 (rate: 5mbit, ceil: 80mbit)
    Added IP mapping: 192.168.9.13/32 -> 1:40 (rate: 80mbit)

    ./class_filter -m

    IP Range Mappings:
    CIDR            -> TC_CLASS  (BPF_VALUE)
    ----------------------------------------
    192.168.9.13/32 -> 1:40     (0x40)
    Total: 1 IP range mappings

    tc -g class show dev ifb0

    +---(1:1) htb rate 100Mbit ceil 100Mbit burst 1600b cburst 1600b
         +---(1:40) htb prio 0 rate 5Mbit ceil 80Mbit burst 1600b cburst 1600b
         +---(1:30) htb prio 0 rate 5Mbit ceil 20Mbit burst 1600b cburst 1600b

    on 192.168.9.13:

    root@vincent-iMac:~# iperf3 -t 4 -c 10.0.0.206 -p 8080
    Connecting to host 10.0.0.206, port 8080
    [  5] local 192.168.9.13 port 51072 connected to 10.0.0.206 port 8080
    [ ID] Interval           Transfer     Bitrate         Retr  Cwnd
    [  5]   0.00-1.00   sec  9.63 MBytes  80.8 Mbits/sec    5    119 KBytes
    [  5]   1.00-2.00   sec  9.26 MBytes  77.7 Mbits/sec    7   86.3 KBytes
    [  5]   2.00-3.00   sec  9.20 MBytes  77.1 Mbits/sec    7    116 KBytes
    [  5]   3.00-4.00   sec  8.82 MBytes  74.0 Mbits/sec    2    102 KBytes
    - - - - - - - - - - - - - - - - - - - - - - - - -
    [ ID] Interval           Transfer     Bitrate         Retr
    [  5]   0.00-4.00   sec  36.9 MBytes  77.4 Mbits/sec   21             sender
    [  5]   0.00-4.05   sec  36.5 MBytes  75.6 Mbits/sec                  receiver

    [0]: https://std.rocks/gnulinux_network_traffic_control.html
    [1]: https://wiki.archlinux.org/title/Advanced_traffic_control#Shape_ingress_traffic_on_SNAT

    Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-11-03 02:56:04 +00:00
Vincent Li
0b4a8acd52 xdp-tools: a few improvement on class_filter
commit fa10708e3c87519f8e9c85cdff7a2bdd80dbd699 (HEAD -> main)
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 24 20:58:18 2025 -0700

        tc-basic-classifier: allow port range for classification

        Improve user space class_filter to add port range like:

        ./class_filter -i red0 --add-port "8080-8082:10:40mbit"
        or
        ./class_filter -i red0 --add-port "8083:20:60mbit"

        each port will still be added as individual entry in port map, so no
        code change required in bpf side.

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

    commit 5852f6184e3d129667df01011c4ecdf6df994266
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Wed Oct 22 19:41:05 2025 -0700

        tc-basic-classifier: make tcp and udp port classification

        make port classification for both UDP and TCP.

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

    commit 0bda902c82c755bda1d5ba40d1404051de4e9102
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Tue Oct 21 19:28:15 2025 -0700

        tc-basic-classifier: fix IP endiness and classification on red0

        the IP in user space is stored in host order but bpf program IP lookup
        by network order. also tested IP classification green0 not working. so
        should do destination IP classification on red0 interface, and the
        destination IP is going to be Internet destination IP addresses. need to
        figure out how to do IP based classification on LAN/green0 network IPs
        if required.

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-25 02:26:32 +00:00
Vincent Li
04033ad1a5 xdp-tools: rebase on upstream 1.5.7 and add tc classifier
commit ced17feca631f6963a2439f41ef09a7db048f316 (HEAD -> main)
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Mon Oct 20 21:28:17 2025 -0700

        tc-basic-classifier: fix tcp port Endianess bug by AI

        AI generated class_filter program stored the tcp port in network order,
        but in bpf program the tcp port is converted to host order, and result in
        tcp port lookup failure, unable to get the correct classid, fail to do rate
        classification.

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

    commit a18fe4be0374ab1efb21c1228a5c5790ded7636e
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Mon Oct 20 19:15:34 2025 -0700

        tc-basic-classifier: classify port and IP from bpf map

        add port and IP rate classification based on bpf map so user could
        add or remove port/IP rate classification dynamically at run time

        since TC class works on egress direction, so port rate classification
        works on red0 egress, and IP rate classification works on green0 egress

        port rate classification:

        class_filter -a -b ./class_filter.bpf.o -i red0 -v

        class_filter -i red0 --add-port 8080:10:80mbit
        class_filter -i red0 --add-port 8081:20:40mbit

        class_filter -i red0 --delete-port 8080

        class_filter -i red0 --list-ports

        IP rate classification:

        class_filter -a -b ./class_filter.bpf.o -i green0 -v

        class_filter -i red0 --add-ip 192.168.1.0/24:40:30mbit
        class_filter -i red0 --delete-ip 192.168.1.0/24

        class_filter -i red0 --list-ips

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

    commit 12280ef22ae49f75eda047144ed3e9dc0f73e04a
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 17 19:45:07 2025 -0700

        tc-basic-classifier: add user space program

        the bpf skel header is generated only if USER_TARGETS
        is added in Makefile, so add a dummy user space program.

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

    commit fe5cc1814af4c995f61ec08708110deef7a65c45
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 17 19:28:45 2025 -0700

        xdp-tools: rebase on upstream xdp-tools main branch

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

    commit 7dee7fd954c06a3c58bedbb5561b9ee65c3f749f
    Author: Vincent Li <vincent.mc.li@gmail.com>
    Date:   Fri Oct 17 18:39:59 2025 -0700

        tc-basic-classifier: rename the class filter

        Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-21 01:47:29 +00:00
Vincent Li
c16b669813 logs.cgi: Don't ship anything as executable in the sources
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 17:28:02 +00:00
Vincent Li
587de19dca ovpnclients.dat: Fixes bug 13879
commit 0400a1009439d0ffeddb1e449c8bd656341f5f44
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:39 2025 +0200

    ovpnclients.dat: Fixes bug 13879

    Fixes: bug 13879 - CONNECTION_NAME SQL Injection
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 17:23:05 +00:00
Vincent Li
61deed354b time.cgi: Fixes bug 13883
commit 8025aa78fb52933666e13a7e9e782edf4ddf8b42
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:43 2025 +0200

    time.cgi: Fixes bug 13883

    Fixes: bug 13883 - time.cgi UPDATE_VALUE Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit f561899b54
Author: Jon Murphy <jon.murphy@ipfire.org>
Date:   Mon Mar 11 18:45:00 2024 -0500

    time.cgi: add current date-time to this WebGUI page

    - added words and date-time format to english (en.pl)
    - other languages are needed
    - seconds included since time is accurate to < .1s
    https://git.ipfire.org/?p=ipfire-2.x.git;a=commit;h=2234e8aacac2e0d0b06dac4513585c15c2b3b440

    Code-by: Leo-Andres Hofmann <hofmann@leo-andres.de>
    Signed-off-by: Jon Murphy <jon.murphy@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 16:44:30 +00:00
Vincent Li
3055fec1b6 qos.cgi: Fixes bug 13885
commit 32f22c92e19c2d94c5f0b667f27e7a5ccd65ac61
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:45 2025 +0200

    qos.cgi: Fixes bug 13885

    Fixes: bug 13885 - qos.cgi INC_SPD OUT_SPD DEFCLASS_INC DEFCLASS_OUT Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit a0d7f366c9
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Aug 7 16:35:02 2024 +0200

    qos.cgi: Make all tables use the full width

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 16:33:04 +00:00
Vincent Li
fd6cd41a95 calamaris.dat: Fixes bug 13886
commit 7dca07fdcf018320bc10eb4d5fcd019dd1a7029a
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:46 2025 +0200

    calamaris.dat: Fixes bug 13886

    Fixes: bug 13886 - calamaris.dat Multiple Parameters Command Injection
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 16:29:39 +00:00
Vincent Li
27092cf180 urlfilter.cgi: Fixes bugs 13887, 13888 & 13889
commit fc3f7f4a179b26b6ef255a3ab46b6fe6faf208c9
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:47 2025 +0200

    urlfilter.cgi: Fixes bugs 13887, 13888 & 13889

    Fixes: bug 13887 - urlfilter.cgi BE_NAME Command Injection
    Fixes: bug 13888 - urlfilter.cgi USERQUOTA QUOTA_USERS Stored Cross-Site Scripting
    Fixes: bug 13889 - urlfilter.cgi TIMECONSTRAINT SRC DST COMMENT Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-10 16:26:37 +00:00
Vincent Li
537587ae64 ddns.cgi: Fixes bug 13884
commit 0b946b848c72511922fa211b6a4db0da092d204c
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 16:37:27 2025 +0200

    ddns.cgi: Escape the variables when they are being sent back to the browser

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 67db35c8a536b54d169336269853aaa6eae85ab5
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:44 2025 +0200

    ddns.cgi: Fixes bug 13884

    Fixes: bug 13884 - ddns.cgi LOGIN PASSWORD SERVICE Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-09 17:33:25 +00:00
Vincent Li
e44245f5fb config.dat: Fixes bug 13890
commit c431d86ab882f1305f831a37c04491a7ae771e28
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:48 2025 +0200

    config.dat: Fixes bug 13890

    Fixes: bug 13890 - config.dat REMOTELOG_ADDR Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-09 17:28:19 +00:00
Vincent Li
3a815d1814 fwhosts.cgi: Fix for bug 13876 & bug 13877
sync IPFire fwhosts.cgi

commit 2398cc431a3fb2cd4141b6a846f0cd0742f6a97c
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:05:32 2025 +0200

    fwhosts.cgi: Escape PROT in the right place

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit ad995081302f6b28ea11c74e56306d94a7bee076
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:02:18 2025 +0200

    fwhosts.cgi: Check country code before proceeding

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit a2c624b99dbcecb469e6001505731049ef5cbbd3
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:37 2025 +0200

    fwhosts.cgi Fix for bug 13876 & bug 13877

    Fixes: Bug 13876 savelocationgrp COUNTRY_CODE Stored Cross-Site Scripting
    Fixes: Bug 13877 saveservice PROT Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 798556ec29207d5131a7600d5489f1ee92a7b87a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jun 23 17:16:57 2025 +0000

    fwhosts.cgi: Move the tooltip into the usage counter

    This will clutter the page less as we don't have any good icon sets.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 61b277aa9c578a9a69e552f593a8bde421b811bc
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jun 23 17:16:56 2025 +0000

    fwhosts.cgi: Don't show anything if a host/group is unused

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit ca811a746a79f0e02cfb780cbd4543a057131e3a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Jun 23 17:16:55 2025 +0000

    fwhosts.cgi: Remove whitespace issues

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 5511d94ed0d8ea6fd372d52cba515b4d6726abed
Author: Peer Dietzmann <dietzmann@brecht-schule.hamburg>
Date:   Mon Jun 23 17:16:54 2025 +0000

    fwhosts.cgi: Show in which firewall rule objects are being used

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 341eb00a821c4254ddd04968beed2e98e5a33aff
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat May 3 15:10:16 2025 +0200

    fwhosts.cgi: Correctly show IP addresses for WireGuard RW peers

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-09 17:23:25 +00:00
Vincent Li
13dfd638bf ids.cgi: Fixes bug 13878
commit 61f447ff341d2f7720fb6c5b483cc9fb063e869c
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:07:36 2025 +0200

    ids.cgi: Escape the remark before sending it back to the browser

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit f0015fefe6d2523c5bb9818fa6aeeb064f6e45db
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:38 2025 +0200

    ids.cgi: Fixes bug 13878

    Fixes: bug 13878 - IGNORE_ENTRY_REMARK Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:39:08 +00:00
Vincent Li
575b5b2535 firewalllogip.dat: Fixes bug 13881
commit 82ad6e9bc3287577b0b72af71ea7651ba416b97b
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:10:56 2025 +0200

    firewalllogip.dat: Escape pienumber in the right place

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 3e198e43a67421fa21b94b0c6dbb5ceb9314f293
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:41 2025 +0200

    firewalllogip.dat: Fixes bug 13881

    Fixes: bug 13881 - firewalllogip.dat pienumber Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:34:19 +00:00
Vincent Li
a931d86850 firewalllogcountry.dat: Fixes bug 13882
commit 83be14bba7e6867b20d277e52c5bca486aa43162
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:12:20 2025 +0200

    firewalllogcountry.dat: Escape pienumber in the correct place

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 63d971bf688ad70fc82e54aea7a31aa508cf4c28
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:42 2025 +0200

    firewalllogcountry.dat: Fixes bug 13882

    Fixes: bug 13882 - firewalllogcountry.dat pienumber Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Reviewed-by: Bernhard Bitsch <bbitsch@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:23:21 +00:00
Vincent Li
aba6bc1e84 mail.cgi: Fixes bug 13891
commit 89585e76a2cade43c5fa397f4e2b86f605439659
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:19:59 2025 +0200

    mail.cgi: Escape username/password in the right place

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 43b4ba3768db5e46b95c263accb5b26e90df8a08
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:49 2025 +0200

    mail.cgi: Fixes bug 13891

    Fixes: bug 13891 - mail.cgi txt_mailuser txt_mailpass Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:18:56 +00:00
Vincent Li
993dbbbd75 chpasswd.cgi: Fixes bug12755
commit a461fd70445aec9dfa34bf9c5a29a85e0ad0e2fe
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Sat May 10 12:30:56 2025 +0200

    chpasswd.cgi: Fixes bug12755 - v3 with password verification correction

    - v3 version based on feedback from @Michael to use the status value returned from
       using the htpasswd command.
    - Also simplified the whole section to carry out the change if the status is 0, ie all
       went well, otherwise give an error but without identifying if the error is in the
       username or the password. This makes it more secure as any attacker only knows it
       failed and doesn't know if any part of the authentication was correct or not.
    - Changed the error messages in line with this so the language file changes are in the
       other part of this patch set submission.
    - Tested out on my vm test bed and worked fine. If the username was incorrect or the
       password was incorrect or both were incorrect the same error message is given. If
       both are correct then the update is carried out.

    Fixes: bug12755
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 9c0dab3d3ca807e836823253aced80a14bc1970a
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed May 7 09:06:12 2025 +0000

    chpasswd.cgi: Add missing $

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 4c39e38f90fea60ef62e07267fd84f1b89de0297
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Tue May 6 16:10:11 2025 +0200

    chpasswd.cgi: Make swroot refs the same as for other cgi files

    - This uses the swroot definition from general-functions.pl and makes the definition
       the same as used in the majority of other IPFire cgi files.

    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 6c1549ff7a9c8e3f9f17a29a6b169fce175fea42
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Tue May 6 16:10:09 2025 +0200

    chpasswd.cgi: Fixes bug12755 - proxy auth password problem longer than 8 chars

    - The existing version of the perl module Apache::Htpasswd was using the crypt hash for
       the password hashing, which is very insecure. The only alternative with this module
       is the md5 and sha1 hashes which are also considered weak now.
    - The module was last updated in Nov 2012 and there is no alternative module available.
    - This patch replaces that perl module with using the apache htpasswd program. This can
       be set to use the bcrypt hash which is considered secure. This is used for the
       generation of the root and admin passwords during the IPFire install.
    - Tested out on my vm testbed system and the password for a specific user name was
       changed successfully without any restriction to the length of the password.
    - Existing passwords with the existing md5 or crypt options will still work as htpasswd
       can manage different encoding hashes in the one file.

    Fixes: bug12755
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 22:09:46 +00:00
Vincent Li
a8d93e014d proxy.cgi: sync bug 12755 13893 fixes from ipfire
commit f7c4f7d2968be6c9b786b7f7e46fdb8ac96c8104
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:32:51 2025 +0200

    proxy.cgi: Escape parameters in the right place

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit e22ecef885c34462565ae20020a32a27d0585dc3
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:52 2025 +0200

    proxy.cgi: Further fix for bug 13893

    - Previous patch for proxy.cgi was related to the mitigation provided by the bug reporter
       for the parameter VISIBLE_HOSTNAME. This parameter however was not mentioned in the
       description for that bug.
    - bug 13893 description mentions TLS_HOSTNAME, UPSTREAM_USER, UPSTREAM_PASSWORD,
       ADMIN_MAIL_ADDRESS, and ADMIN_PASSWORD but it mentions them as being from dns.cgi
       which is incorrect except for TLS_HOSTNAME.
    - The other parameters are from proxy.cgi but no mitigation was shown for those in the
       bug report.
    - This patch adds fixes for the parameters UPSTREAM_USER, UPSTREAM_PASSWORD,
       ADMIN_MAIL_ADDRESS, and ADMIN_PASSWORD

    Fixes: bug 13893 - proxy.cgi Multiple Parameters Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 4cf0694e55305e368c4ca28da2db7481c8f08c5a
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:51 2025 +0200

    proxy.cgi: Fixes bug 13893

    Fixes: bug 13893 - proxy.cgi Multiple Parameters Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit a63c51da8ea03896c3340960821fbacece58f861
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Tue May 6 16:10:10 2025 +0200

    proxy.cgi: Fixes bug12755 - proxy auth problem with password longer than 8 chars

    - This makes the proxy local password management the same between chpasswd.cgi and
       proxy.cgi
    - Tested out on my vm testbed and was able to create and modify users and their passwords
       in the proxy.cgi page or modify a password for a specified user on the chpasswd.cgi
       page. This all happened successfully and was confirmed by testing out the local
       authentication.

    Fixes: bug12755
    Tested-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 21:56:05 +00:00
Vincent Li
a8dc9235f1 dns.cgi: Fixes bug 13892 XSS potential
commit f34349dd754c6cdb29058b603028a7155ebfa830
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Oct 2 13:10:14 2025 +0200

    dns.cgi: Fix for XSS potential

    - Related to CVE-2025-50976
    - Fixes NAMESERVER & REMARK
    - TLS_HOSTNAME was already fixed in a previous patch

    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit db042629c0cae5b78eeddb8a9db8783c557138b0
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Sep 25 17:29:35 2025 +0200

    dns.cgi: Validate the TLS hostname irregardless of TLS being used

    That way, we won't have to perform escaping later on and can rely on
    having a valid value.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 98616a36c00b7fc845995c5cc4d8e301e58a20a7
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Sep 25 13:12:50 2025 +0200

    dns.cgi: Fixes bug 13892

    Fixes: bug 13892 - dns.cgi TLS_HOSTNAME Stored Cross-Site Scripting
    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 18:23:26 +00:00
Vincent Li
0e302b1efc firewall.cgi: Fixes XSS potential
commit 21539d63dfcb15f186309b3107f63d455e4008ea
Author: Adolf Belka <adolf.belka@ipfire.org>
Date:   Thu Oct 2 13:10:15 2025 +0200

    firewall.cgi: Fixes XSS potential

    - Related to CVE-2025-50975
    - Fixes PROT
    - ruleremark was already escaped when firewall.cgi was initially merged back in Core
       Update 77.
    - SRC_PORT, TGT_PORT, dnaport, src_addr & tgt_addr are already validated in the code as
       ports or port ranges.
    - std_net_tgt is a string defined in the code and not a variable
    - The variable key ignores any input that is not a digit and subsequently uses the next
       free rulenumber digit

    Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-10-03 18:09:01 +00:00
Vincent Li
578eb58ea0 arpwatch: Fix the evelope sender
commit c2eba600d753df95a81707f7da0ab172ed864ab0
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat Sep 20 14:02:01 2025 +0000

    arpwatch: Fix the envelope sender

    arpwatch invokes sendmail without passing the envelope sender
    explicitely. This causes that mails can get rejected if the From: header
    does not match the envelope sender.

    This patch passes the correct address as the envelope sender.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-09-26 01:05:29 +00:00
Vincent Li
a81b1f8f2b arpwatch: add arpwatch as common package
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-09-25 15:37:51 +00:00
Vincent Li
ca64eb8761 initscripts: add kdump scripts
this is initial kdump and kdump scripts, it looks when run kdump-config
load the first time, the kdump kernel can be loaded, and test crash dump
with echo c > /proc/sysrq-trigger result in system hang forever, then
had to power reset. after power reset, kdump-config load could no longer
load the kdump kernel, errors out with:

[root@bpfire-3 crash]# kdump-config load
cp: cannot stat '/etc/kdump/sysctl.conf': No such file or directory
Creating symlink /var/lib/kdump/vmlinuz.
ln: failed to create symbolic link '/var/lib/kdump/vmlinuz': No such file or directory
Unable to locate kernel hook ... failed!
Can't find kernel text map area from kcore
Cannot load /boot/vmlinuz-6.15.6-ipfire
failed to load kdump kernel ... failed!

so kdump is not working properly, but add the kdump scripts anyway, the
issue can be investigated later in future.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-22 18:18:11 +00:00
Vincent Li
8d0051d8f6 kernel: add kernel config for kdump
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-22 16:01:57 +00:00
Vincent Li
06359e6db4 grub: add crashkernel parameter for kdump
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-22 16:01:16 +00:00
Vincent Li
4045f9fbc2 makedumpfile: add makedumpfile for kdump tool
makedumpfile build by default in BPFire use static libdw.a, libelf.a but
libdw.a, libelf.a are not build with zstd which makdedumpfile static
build requires, so build makedumpfile dynamically, see [0].

[0]: https://github.com/vincentmli/bpfire/issues/109

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-16 02:58:33 +00:00
Vincent Li
1475ef5093 kexec-tools: add kexec-tool for kernel dump
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-08-15 16:05:19 +00:00
Vincent Li
351e665042 wireguard-functions.pl: backport two fixes from ipfire
commit 68a3334413efb1a963b7cc6c6dca1ec0126e1cc1
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Jul 18 08:42:12 2025 +0000

        wireguard-functions.pl: Automatically skip IPv6 subnets

        Since we do not support this and some VPN providers generate
        configuration files that send any data over to them, we simply ignore
        any IPv6 subnets.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

    commit f7565a885b55384a64edd8bd73079143a04da519
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Jul 18 09:57:34 2025 +0000

        wireguard-functions.pl: Remove any carriage returns on import

        Some files might include carriage returns which won't be removed by
        chomp() on Linux. To be extra safe, we remove them manually.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-23 12:49:37 +00:00
Vincent Li
c7e72c51bf wireguard: add IP on road warrior interface wg0
Choose one IP from client pool and add it to road warrior interface
wg0 so road warrior VPN client could reach firewall through the VPN

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-20 23:40:09 +00:00
Vincent Li
ec74268fa7 linux: upgrade to stable kernel 6.15.6
6.15.6 include:

From 06a34f7db773e01efa8a90c5b4d912207a80dd60 Mon Sep 17 00:00:00 2001
From: Daniel Borkmann <daniel@iogearbox.net>
Date: Sun, 17 Nov 2024 22:20:30 +0100
Subject: [PATCH] wireguard: device: support big tcp GSO

Advertise GSO_MAX_SIZE as TSO max size in order support BIG TCP for wireguard.
This helps to improve wireguard performance a bit when enabled as it allows
wireguard to aggregate larger skbs in wg_packet_consume_data_done() via
napi_gro_receive(), but also allows the stack to build larger skbs on xmit
where the driver then segments them before encryption inside wg_xmit().
We've seen a 15% improvement in TCP stream performance.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Link: https://patch.msgid.link/20241117212030.629159-5-Jason@zx2c4.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 drivers/net/wireguard/device.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireguard/device.c b/drivers/net/wireguard/device.c
index a2ba71fbbed46..6cf173a008e78 100644
--- a/drivers/net/wireguard/device.c
+++ b/drivers/net/wireguard/device.c
@@ -302,6 +302,8 @@ static void wg_setup(struct net_device *dev)
 	/* We need to keep the dst around in case of icmp replies. */
 	netif_keep_dst(dev);

+	netif_set_tso_max_size(dev, GSO_MAX_SIZE);
+
 	wg->dev = dev;
 }

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-12 16:09:44 +00:00
Vincent Li
f09bba1d6c firewall.cgi: Remove some left-over debugging code
commit 0ee4f61deaf50b5c091d94afbedd5615c002cfae
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Jun 25 15:22:32 2025 +0100

    firewall.cgi: Remove some left-over debugging code

    This code prevented that any firewall rules could have been created due
    to the WUI always assuming that there would be some error.

    Fixes: #13860 - Error message when creating a firewall rule with a subnet for src
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-09 22:25:28 +00:00
Vincent Li
8462438396 langs: add wireguard endpoint translation
add endpoint translation for wireguard so not to
mix with others.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-09 00:08:27 +00:00
Vincent Li
557fc6ec81 langs: add wireguard Chinese translation
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-09 00:05:25 +00:00
Vincent Li
4885bc8554 wireguard.cgi: add css color style for VPN peer status
ipfire has changed theme css style and wireguard.cgi relies
on the new css style, replace the bpfire css style with ipfire style
breaks other cgi style, so make the change minium that is only
relevant to wireguard.cgi VPN peers status.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-07 21:10:23 +00:00
Vincent Li
a3f7758510 functions.pl: add missing sub routine for wireguard.cgi
wireguard.cgi calls errorbox and opensection/closesection,
but they are missing from header.pl. ipfire had functons.pl
removed and moved subroutines to header.pl and added errorbox
in header.pl. to keep the change minimum so not affect other
features, add errorbox and opensection/closesection in functions.pl

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 17:17:14 +00:00
Vincent Li
67d1b8a4e9 network-functions.pl: Add function to extract prefix
wireguard-functions.pl requires get_prefix

commit 0e55d27737
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Wed Mar 20 12:09:58 2024 +0100

    network-functions.pl: Add function to extract prefix

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 17:17:07 +00:00
Vincent Li
d1d79d74e5 langs: missing wireguard menu translation
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 14:45:16 +00:00
Vincent Li
a989b976cb configroot: add missing set_defaults sub
missing set_defaults sub result in error when generate
flash image during build after add wireguard UI

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 14:44:09 +00:00
Vincent Li
5ea3369a44 index.cgi: Show WireGuard status using the function library
commit c29a07b2ee505811a6cd78ca643bf816beb77375
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Mon May 26 11:38:57 2025 +0200

        index.cgi: Show WireGuard status using the function library

        The settings file is also loaded all the time and we don't need to load
        it again.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 03:48:54 +00:00
Vincent Li
97e543817a firewall: Allow WG traffic when the firewall is in permissive mode
commit d6868ae94c63d0f708985e6bb6604a4bd40cf1a8
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Sep 6 18:20:46 2024 +0200

        firewall: Allow WG traffic when the firewall is in permissive mode

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 03:40:37 +00:00
Vincent Li
7b0cc24bbf fwhosts.cgi: Add button spacing on 'Firewall/Firewall Groups' page
commit 50b4c402226cda390832d3124a2a46187cc635c3
    Author: Stephen Cuka <stephen@firemypi.org>
    Date:   Thu Feb 27 16:34:16 2025 -0700

        fwhosts.cgi: Add button spacing on 'Firewall/Firewall Groups' page.

        Add spacing between showmenu() buttons on Firewall/Firewall Groups page to improve the look of the page.

        No changes to the functions of the page.

        Signed-off-by: Stephen Cuka <stephen@firemypi.org>
        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 03:31:02 +00:00
Vincent Li
d270ada82c firewall: Add support for WireGuard peers to groups
commit 1de96a83d6d6cec5d4d3eda1792aa80bfbd8fafe
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Wed Apr 23 12:35:52 2025 +0200

        firewall: Add support for WireGuard peers to groups

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 03:25:56 +00:00
Vincent Li
4e61b8bef9 firewall.cgi: Highlight any deleted WireGuard peers
commit 77631ba4c738432c31cd4b6fad0da28b880fb0c7
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 22 18:09:31 2025 +0200

        firewall.cgi: Highlight any deleted WireGuard peers

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 02:59:22 +00:00
Vincent Li
03efd275ec firewall.cgi: Add dropdown to add WireGuard peers to a firewall rule
commit 468e9831d5c7b99a2dc20b66d881f43ecb0a424b
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 22 17:41:12 2025 +0200

        firewall.cgi: Add dropdown to add WireGuard peers to a firewall rule

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-04 02:46:14 +00:00
Vincent Li
2580c06cb7 wireguard.cgi: missed normalize sub in header.pl
commit 37174e29de670a33f9be4b90c88b0a96c695dad1
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Fri Sep 27 17:55:46 2024 +0200

        wireguard.cgi: Normalize filenames

        This is because Windows clients won't import any configurations that
        have spaces in the filename. Therefore we replace it and remove anything
        else unwanted on the way.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 18:01:07 +00:00
Vincent Li
aff726b928 firewall: Add WireGuard RW to the UI
commit 5a1c02df8973b3acc5c3101a94e86fe6df4b43b6
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Thu Sep 12 19:39:26 2024 +0200

        firewall: Add WireGuard RW to the UI

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:56:36 +00:00
Vincent Li
6ed934dbfc configroot: add pool address normalization sub
wireguard.cgi needs pool address normalization

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:55:04 +00:00
Vincent Li
638483ff08 wireguard.cgi: Add CGI to configure wireguard
commit 06dbc836a47160d51ab10f8b9d4ca356beaa7cdb
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 16 18:06:47 2024 +0200

        wireguard.cgi: Add a basic CGI to configure the global settings

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 17:03:32 +00:00
Vincent Li
3710ff2af7 misc-progs: Add wireguardctrl
commit f552e23da404adf4555299c887a0279016323df4
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Wed Apr 17 17:13:32 2024 +0000

        misc-progs: Add wireguardctrl

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 16:12:31 +00:00
Vincent Li
3eb0ec8b1b wireguard: install UI empty config and functions
Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Wed Sep 11 02:24:49 2024 +0200

        wireguard: Move functions into their own file

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

    commit 85ec8363a873100fc1bb49e3c01f9f63bf97c6e1
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Wed Aug 14 15:55:06 2024 +0000

        wireguard: Install empty configuration files

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 15:56:40 +00:00
Vincent Li
2d55d3c672 wireguard: Add wireguard initscript
commit b78ba3624f0a11c060ad06dbd65741b82684d93e
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 16 16:17:59 2024 +0200

        wireguard: Add initscript

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 15:43:15 +00:00
Vincent Li
0f4e6612df firewall: Collect all networks that should not be NATed in an array
commit 8fa1831bff7e1d76eb83b145976211aa703062e1
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Mon Mar 31 16:31:43 2025 +0200

        firewall: Collect all networks that should not be NATed in an array

        No functional changes.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

    firewall: Explicitely don't NAT any aliases

        It seems that there is a problem with local connections that have
        preselected an outgoing interface. That will work just fine, but
        ultimately the packet will be NATed back to the primary RED IP address.
        To prevent this, we are adding some extra rules that skip the MASQUERADE
        target.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 15:32:20 +00:00
Vincent Li
90a4a51a0e initscripts: sync functions from ipfire
readhash is added in functions, but it appears not used
in initscripts except for testing, assume no impact to
bpfire initscripts.

commit 1c1ff05cdc37fe9ccabda9413c270935c3a45478
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Mon Mar 31 16:35:26 2025 +0200

    firewall: Explicitely don't NAT any aliases

    It seems that there is a problem with local connections that have
    preselected an outgoing interface. That will work just fine, but
    ultimately the packet will be NATed back to the primary RED IP address.
    To prevent this, we are adding some extra rules that skip the MASQUERADE
    target.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit ff4ff2cfe0c8565a431bf499708dcb6e5c2fb3dc
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Dec 6 16:42:17 2024 +0000

    initscripts: readhash: Fix handling = signs

    The function expected that a line only contains exactly one equals sign
    (=) which is not fit for purpose. In the WireGuard code we hold key
    material that is encoded in base64 and therefore contains padding that
    uses =.

    This patch fixes that we expect exactly one equals sign immediately
    after the key and we will then accept more = in the value - which was
    already permitted.

    Furthermore, this patch fixes the splitting if the key and value at the
    first =.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
    Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>

commit 73661e5ee1acc30e40e41493c8dfca10aa1097d0
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Dec 6 16:42:16 2024 +0000

    initscripts: readhash: Only strip quotes if they exist

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
    Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>

commit 80c1cb5a0a
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:44 2024 +0200

    initscripts fkt: Fix shebang

    We use features only available in bash. So we should state correctly
    that the script should be executed in bash. As sh is a symlink to bash
    this makes not differences on a ipfire system. But my linter is less
    chatty with this change.

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 14ecdd86f1
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:43 2024 +0200

    initscripts fkt: keep readhash compatible with older implementation

    With the use of eval BLUE_DEV='blue0 net0' stored "blue0 net0" in the
    variable BLUE_DEV not "'blue0 net0'"

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit f1d94e7457
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:42 2024 +0200

    initscripts fkt: readhash should only parse lines with a =

    A line without a = is clearly invalid.

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 9f72b7bc5f
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:41 2024 +0200

    initscripts fkt: Check for invalid values in readhash

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 02254f5543
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:40 2024 +0200

    initscripts fkt: ignore invalid keys in readhash

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit d289bc28be
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:39 2024 +0200

    initscripts fkt: Ignore comments in readhash

    As '#Another Comment' is a valid key we test this change by checking if
    the comments do not end up as keys in our array.

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 59e3c2a217
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:38 2024 +0200

    initscript fkt: ignore blank lines in readhash

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 96bb3ba8b8
Author: Jonatan Schlag <jonatan.schlag@ipfire.org>
Date:   Sun Jun 16 18:02:37 2024 +0200

    initscript functions: add readhash

    To avoid the usage of eval and to store the config in an key value
    array, we introduce an new function. The tests only check if we
    read the correct value to the correct variable.

    One comment on the implementation as this has created some headache:

    >From https://www.gnu.org/software/bash/manual/bash.html#Bourne-Shell-Builtins

            "When used in a function, declare makes each name local, as with the local command, unless the -g option is used."

    So we need to use -g here

    Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit db09ea9e5c
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat Mar 23 14:35:39 2024 +0100

    initscripts: Don't overwrite the PID file

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 5900a95059
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat Mar 23 14:31:49 2024 +0100

    initscripts: Fix reading PIDs

    An incorrect variable has been used.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 6e47a143c9
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat Mar 23 14:30:33 2024 +0100

    initscripts: Handle command arguments as array

    For some reason, the function is refusing to launch a command that has
    extra arguments.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
commit ed91103e22
Author: Stefan Schantl <stefan.schantl@ipfire.org>
Date:   Wed Mar 27 20:39:17 2024 +0100

    initscripts: Add generic function to get the filesystem type of a volume

    Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
    Reviewed-by: Michael Tremer <michael.tremer@ipfire.org>
    Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>

commit c3019331df
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Jan 11 15:59:34 2024 +0100

    initscripts: Implement storing PIDs in loadproc

    Some programs do not write their own PID files any more, but since our
    initscripts heavily rely on those, this extension allows to store it
    easily.

    Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>

commit dd8ef8cc10
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Jan 11 15:57:50 2024 +0100

    initscripts: Fix wrong variable check for $PIDFILE in getpids

    getpids() checked whether it needed to pass a pid file to pidofproc, but
    the check was inverted.

    Signed-off-by: Daniel Weismüller <daniel.weismueller@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-03 15:22:06 +00:00
Vincent Li
3745fdcb6a wireguard: Automatically open ports for WireGuard
commit fc32e7b9147d2eeeb6e2bc1497859fb050001eb5
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Tue Apr 16 16:20:55 2024 +0200

        firewall: Automatically open ports for WireGuard

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 20:21:04 +00:00
Vincent Li
e9c5334eeb wireguard: Automatically apply MASQUERADE for peers with local address
commit 459bb750298c09990c0c8d4677f0f442887304d0
    Author: Michael Tremer <michael.tremer@ipfire.org>
    Date:   Sat Apr 26 14:30:44 2025 +0200

        wireguard: Automatically apply MASQUERADE for peers with local address

        In this case we are the client and we cannot leak any local subnets.

        Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 18:53:06 +00:00
Vincent Li
3a8cd99ef1 wireguard: Block unauthorized traffic
commit 89b976e9a7e4da13b82de4aadadb63ffaf3031a6
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Thu Apr 25 20:32:57 2024 +0200

    wireguard: Block unauthorized traffic

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 18:48:39 +00:00
Vincent Li
c74e903b32 wireguard: Add a custom routing tables for peers
commit 43867c1e070fc96420a666b0bb21182eff16787b
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Apr 27 18:30:59 2025 +0200

    wireguard: Add a custom routing table for peers

    This is a dirty hack to make connections to VPN providers actually work.

    We mark all WG packets after encryption and use a secondary routing
    table to look up any routes to the peers. That way, we can replace the
    default route in the main routing table without having to care about the
    special routes there.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 18:43:53 +00:00
Vincent Li
d854559daf initscripts: sync networking functions from IPFire
following commit made changes to networking functions

commit 76ea485d9edb781328e307c68b1f878d933408e5
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Sep 27 17:39:22 2024 +0200

    wireguard: Select the correct source IP address for N2N peers

    This is so that the firewall chooses the correct IP address when trying
    to establish connections to the remote networks.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit d99826dc71
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Sep 24 10:33:22 2024 +0200

    suricata: Enable scanning IPsec packets

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit db151ad716
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sun Sep 22 17:08:03 2024 +0200

    suricata: Add support for zones having multiple interfaces

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 1b7d1abdf0
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Sep 10 10:50:15 2024 +0200

    suricata: Add option to scan WireGuard

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 79cce701a9
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Tue Sep 10 10:40:28 2024 +0200

    suricata: Restore the interface selection

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit 3f863ee70d
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Sat Mar 23 14:32:30 2024 +0100

    initscripts: Add some basic functions for IP address maths

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

commit e340d393d3
Author: Michael Tremer <michael.tremer@ipfire.org>
Date:   Fri Mar 22 17:40:15 2024 +0100

    network: Don't include initscript headers twice

    Everywhere we import the functions, we have already imported the
    standard includes.

    Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 16:55:13 +00:00
Vincent Li
dd9a60e720 wireguard-tools: backport IPFire wireguard-tools
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-07-02 16:04:52 +00:00
Vincent Li
d30518a04a README: update the build url link
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-30 19:54:22 +00:00
Vincent Li
4e665f6a3c dnsdist: correct xsk sample config
when use /etc/rc.d/init.d/dnsdist to start dnsdist with the sample
xsk config, it results in startup error [0]. Correct the xsk sample config.

[0]: https://github.com/PowerDNS/pdns/discussions/15713

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-25 16:17:36 +00:00
Vincent Li
279f1e8e86 knot: upgrade to 3.4.7 and add kxdpgun
enable XDP to add kxdpgun utility for dnsdist AF_XDP performance test [0]

[0]: https://www.dnsdist.org/advanced/xsk.html

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-23 18:41:56 +00:00
Vincent Li
b78ee945cd xdp-tools: add dnsdist XDP program
upgrade xdp-tools to 1.5.5 and add dnsdist_xdp.bpf.o
for dnsdist xsk AF_XDP

xdp-loader load green0 -P 90 -p /sys/fs/bpf/dnsdist \
    -n xdp_dns_filter /usr/lib/bpf/dnsdist_xdp.bpf.o

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:40:40 +00:00
Vincent Li
d81f2b838e dnsdist: add sample xsk AF_XDP config
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:37:01 +00:00
Vincent Li
e51ee79752 dnsdist: move dnsdist to core package
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:32:06 +00:00
Vincent Li
3132f7bc78 dnsdist: enable ebpf xsk AF_XDP
upgrade to 1.9.10 and enable ebpf AF_XDP

    We use xdp-loader to load dnsdist_xdp.bpf.o for dnsdist running
    AF_XDP:

    xdp-loader load green0 -P 90 -p /sys/fs/bpf/dnsdist -n xdp_dns_filter /usr/lib/bpf/dnsdist_xdp.bpf.o

    so the xsk v4/v6 destination map would be:

    /sys/fs/bpf/dnsdist/xskDestinationsV4
    /sys/fs/bpf/dnsdist/xskDestinationsV6

    but dnsdist-xsk.cc has:

    static std::string getDestinationMap(bool isV6)
        {
          return !isV6 ? "/sys/fs/bpf/dnsdist/xsk-destinations-v4" : "/sys/fs/bpf/dnsdist/xsk-destinations-v6";
        }

    we can't use xsk-destinations-v4/v6 in dnsdist_xdp.bpf.o because bpf map
    could not use '-' in map definition, '-' would result in compiling
    error.

    so we patch dnsdist-xsk.cc to use xskDestinationsV4/V6 that matches the
    map name in dnsdist_xdp.bpf.o

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-21 17:27:52 +00:00
Vincent Li
2e3ea0ae64 pwru: ebpf pwru addon for network diagnosis
preparation for pwru:

mount -t debugfs none /sys/kernel/debug
echo 0 > /proc/sys/kernel/kptr_restrict

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-11 23:00:56 +00:00
Vincent Li
9d50babeb9 golang: upgrade to 1.24.4
pwru requires golang > 1.24.1

Delete existing build/usr/lib/go directory before upgrade go

rm -rf build/usr/lib/go

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-06-11 22:31:03 +00:00
Vincent Li
bdee533f04 libbpf-bootstrap: base for importing libbpf-tools
add libbpf-bootstrap as base to import bcc libbpf-tools

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-23 20:05:48 +00:00
Vincent Li
465f1e2328 Perl: add Net-ISP-Balance addon
Perl Net-ISP-Balance can be used for ISP Internet connection
load balancing [0], it depends on Net-Netmask module.

[0]: https://lstein.github.io/Net-ISP-Balance/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
3b672339ef keepalived: remove keepalived.conf.sample
keepalived configuration is moved to /var/ipfire/keepalived

fix: https://github.com/vincentmli/BPFire/issues/92
Reported-by: Harvey Li <lhw365@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
33f4a2b1b1 haproxy: remove /etc/haproxy/haproxy.cfg
remove /etc/haproxy/haproxy.cfg since lfs/haproxy
installed haproxy.cfg to /var/ipfire/haproxy

fix: https://github.com/vincentmli/BPFire/issues/92
Reported-by: Harvey Li <lhw365@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
0879d828a7 README: use TLS url for bpfire.net 2025-05-21 15:53:12 +00:00
Vincent Li
1726f3bd3b strace: sync strace 6.12 upgrade from ipfire
sync strace upgrade from ipfire strace 6.12

fix: https://github.com/vincentmli/BPFire/issues/90
Reported-by: Harvey Li <lhw365@gmail.com>
Signd-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:12 +00:00
Vincent Li
18ec4f2b87 udev: sync update from ipfire
commit d19b71301d08db94341eae1d62500a928a8f6712
Author: Arne Fitzenreiter <arne_f@ipfire.org>
Date:   Thu Dec 26 10:19:20 2024 +0100

    udev: patch to handle pidfs and bcachefs

    this is needed to build udev with kernel 6.12 headers

    Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>

fix: https://github.com/vincentmli/BPFire/issues/89
Reported-by: Harvey Li <lhw365@gmail.com>
Signd-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-21 15:53:03 +00:00
Vincent Li
93a5a7af7b xdp-tools: rebased on upstream 1.5.4
included recent changes:

1 fix for xdp-dns for [0]
2 tc-loader to load tc ebpf program

[0]: https://github.com/vincentmli/BPFire/issues/87

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-14 20:35:57 +00:00
Vincent Li
25421aed06 logo: add missing bpfire logo
commit f89feeb19 "kernel: use BPFire logo in kernel" replaced
ipfire logo with bpfire logo, but forgot to add the bpfire logo
file and remove the ipfire logo file

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-10 03:38:17 +00:00
Vincent Li
c25bc27049 dnsdist: upgrade to 1.9.9
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-09 20:19:42 +00:00
Vincent Li
58e92cbb36 loxilb: upgrade to 0.9.8.3
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-09 20:19:42 +00:00
Vincent Li
8af09f38e0 README: update README
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-05-09 20:19:35 +00:00
Vincent Li
e2856c1c7e loxilb-tc: remove loxilb-tc
loxilb 0.9.8 load tc BPF program through libbpf
so iproute tc utility is not needed.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-03-03 17:19:15 +00:00
Vincent Li
83cf08dfa0 loxilb: upgrade loxilb to 0.9.8.1
0.9.8.1 release workaround linux kernel 6.12 bpf
verifier issue.

git clone --recurse-submodules --branch v0.9.8.1 https://github.com/loxilb-io/loxilb.git
cd loxilb
go mod vendor
cd ..
mv loxilb loxilb-0.9.8.1
tar czvf loxilb-0.9.8.1.tar.gz loxilb-0.9.8.1

see https://github.com/loxilb-io/loxilb/issues/953

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-03-03 17:14:47 +00:00
Vincent Li
0e2047f080 linux: enable bootparam hardlockup/softlockup
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-23 04:36:14 +00:00
Vincent Li
1cbd76f718 linux: upgrade kernel to 6.12.5
loxilb dev branch has fix for kernel 6.12. now
we can upgrade kernel to 6.12.5

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-11 23:44:14 +00:00
Vincent Li
fe2ad5da66 loxilb: upgrade to loxilb dev main branch
test out the new loxilb with fix for kernel 6.12 issue

git clone --recurse-submodules https://github.com/loxilb-io/loxilb.git
mv loxilb loxilb-0.9.9
tar czvf loxilb-0.9.9.tar.gz loxilb-0.9.9
mv loxilb-0.9.9.tar.gz <BPFire source>/cache

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-11 23:40:53 +00:00
Vincent Li
f3881747be loxilb: change default loxilb firewall setting
loxilb 0.9.8 requires --egress flag for firewall
rule to masquerade/SNAT GREEN network source IP
for Internet access. to access host in RED network
another firewall rule is required.  see [0].

[0]: https://github.com/loxilb-io/loxilb/issues/957

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-10 16:44:58 +00:00
Vincent Li
2daee785d4 lunatik: remove lunatik
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-04 17:07:13 +00:00
Vincent Li
064136634c linux: downgrade kernel to 6.10.11
workaround https://github.com/vincentmli/BPFire/issues/75

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-04 16:56:51 +00:00
Vincent Li
b040fb1c8a llvm-project: upgrade to 19.1.7
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-02-04 16:47:07 +00:00
Vincent Li
4e9bff5b57 loxicmd: upgrade loxicmd to 0.9.8
git clone --branch v0.9.8 https://github.com/loxilb-io/loxicmd.git
cd loxicmd
go mod vendor
cd ..
mv loxicmd loxicmd-0.9.8
tar czvf loxicmd-0.9.8.tar.gz loxicmd-0.9.8

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-29 16:27:08 +00:00
Vincent Li
017a03c86b loxilb: upgrade loxilb to 0.9.8
when upgrading loxilb to 0.9.7, running
into issue https://github.com/loxilb-io/loxilb/issues/948

following method to prepare the loxilb source tar ball
resolves the issue

git clone --recurse-submodules --branch v0.9.8 https://github.com/loxilb-io/loxilb.git
cd loxilb
go mod vendor
cd ..
mv loxilb loxilb-0.9.8
tar zcvf loxilb-0.9.8.tar.gz loxilb-0.9.8
mv loxilb-0.9.8.tar.gz <BPFire source>/cache/

fix: https://github.com/vincentmli/BPFire/issues/74

also backported libbpf 1.2.3 lonngarch64 to libbpf 0.8
for loxilb

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-29 01:19:21 +00:00
Vincent Li
bad31e01b9 xdp-tools: xdpsni/xdpdns init bpf path argument
now x86 and loongarch64 share same user space
xdp_sni xdp_dns program with path argument to
bpf map, change xdpsni and xdpdns init script
with bpf path argument.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-12 03:42:49 +00:00
Vincent Li
17d49c9d64 linux: upgrade kernel to 6.12.5
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2025-01-02 18:11:19 +00:00
Vincent Li
0ba17ebe5d lfs/linux: perf tool install missed
perf tool is built alone with Linux, but
missed to install the perf tool in image

fix: https://github.com/vincentmli/BPFire/issues/65

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-03 03:46:09 +00:00
Vincent Li
1bfeb4b322 lfs/linux: enable CONFIG_FPROBE for multi kprobe
pwru is an utility to trouble shoot network issue,
and to speed up pwru kprobe attachement, kernel needs
to have CONFIG_FPROBE.

running pwru also result in:

Opening kprobe-multi: invalid argument \
(missing kernel symbol or prog's AttachType not AttachTraceKprobeMulti?)

need following to avoid above invalid argument

    echo -1 > /proc/sys/kernel/perf_event_paranoid
    echo 0 > /proc/sys/kernel/kptr_restrict

see https://github.com/cilium/pwru/issues/460

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-12-03 02:44:14 +00:00
Vincent Li
09c182c75a xdp-tools: XDP UDP DDoS for online game protection
UDP DDoS has pattern of flooding game server with
random source IP and UDP with random payload. game
server UDP traffic requires certain payload
pattern, so this XDP program can serve as example
to stop UDP DDoS attack with UDP payload that does not
match game UDP traffic payload pattern.

without UDP DDoS protection, under DDoS attack:

BPFire UI RED Traffic: in 9xx Mbit/s.

with UDP DDoS protection, under DDoS attack:

BPFire UI RED Traffic: in 1xx Mbit/s.

Tested-by: Muhammad Haikal <eykalpirates@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-27 18:32:10 +00:00
Vincent Li
db7b863fa4 README: add image download link and discord
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-27 18:32:04 +00:00
Vincent Li
92324f8cbd ddos: set net.ipv4.tcp_syncookies to 1
set tcp_syncookies to 1 alone with iptables
SYNPROXY module reduce latency, this improves
situation when XDP acceleration is not enabled
and just let iptables SYNPROXY handles SYN flood
attack, see [0]

[0]: https://bugzilla.kernel.org/show_bug.cgi?id=219500

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-14 18:30:29 +00:00
Vincent Li
eac34c4210 ddos: disable XDP SYNACK window scale option
disable window scaling for XDP generated
SYNACK in ddos script by default

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-12 02:12:35 +00:00
Vincent Li
5de3f44cc7 xdp-synproxy: enable or disable window scaling
XDP generated SYNACK tcp options with window
scaling and timestamp could intermittently cause
small packet transmission on DDoS protected server.
allow user to disable window scaling when such
problem occurs. see [0]

[0]: https://github.com/vincentmli/xdp-tools/issues/7

Reported-by: DNSPROXY.ORG LLC <dnsproxyorg@gmail.com>
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-12 01:22:27 +00:00
Vincent Li
20c65fa4ec kernel: enable signature force config
Kernel module signature force is disabled
for lunatik kernel module build, enable it
for now.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-06 20:28:40 +00:00
Vincent Li
30d6e75af1 haproxy: add HAProxy UI draft patch
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-11-06 19:09:21 +00:00
Vincent Li
d94f83d1bf haproxy: add safe call to haproxy init script
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-30 16:52:28 +00:00
Vincent Li
0a726a99ac haproxy: move haproxy to core package
move haproxy to core package

prepare /var/ipfire/haproxy for haproxy UI, use
/var/ipfire/haproxy/haproxy.cfg

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-28 02:44:48 +00:00
Vincent Li
a600787c67 xdp-synproxy: drop IP don't fragment check
When XDP DDoS syncookie program is attached
to red0 interface, green network client internet
connection to website like gmail/youtube... failed.
it is because these sites does not have IP DF flag
set for each tcp packet, and syncookie_xdp program
would drop these packets when they arrived at red0
interface.

see https://github.com/vincentmli/BPFire/issues/59

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-25 20:35:33 +00:00
Vincent Li
b935dd5b1d xdp-sni UI: allow UI to enable/disable XDP SNI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-22 18:48:33 +00:00
Vincent Li
25da9eb467 ddos: Load/Attach XDP DDoS when reboot
fix: https://github.com/vincentmli/BPFire/issues/58

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-22 18:48:11 +00:00
Vincent Li
eadd074122 README: add Suricata multi XDP attachment support
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-18 20:04:35 +00:00
Vincent Li
8b29912521 suricata-xdp: resolve memlock and stack smashing
suricata XDP support requires xdp-tools with
libbpf 1.4 to resolve stack smash issue.

also workaround memlock operation not permitted
by running suricata as root since load/attach
XDP program requires root privilige anyway.

see: https://github.com/vincentmli/BPFire/issues/54

Usage scenario:

since suricata IPS XDP capture mode works as
layer 2 bridge, BPFire netfilter firewall, NAT
IP route  will be bypassed. no IP address should
be assigned to red0 and green0 interface.

172.16.1.0/24          inline              172.16.1.0/24
red network<-->red0(xdp)<-->green0(xdp)<-->green network

we can run setup command to assign IP/Mask 0.0.0.0/0.0.0.0
to red0 and green0, then reboot BPFire, BPFire DHCP
will stops working after reboot. green network client
can get DHCP IP from upstream dhcp server.

start suricata manually

suricata -c /etc/suricata/suricata-xdp.yaml --af-packet
xdp_filter.bpf program will be attached to red0 and gree0
interface

not sure if we should add GUI for suricata XDP capture mode
since this is not common use case.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-18 19:47:59 +00:00
Vincent Li
3e17c7b30b xdp-tools: build xdp-tools with libbpf 1.4.6
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-18 17:16:17 +00:00
Vincent Li
40c097ff8a libbpf: upgrade to 1.4.6
xdp-tools libxdb requires libbpf 1.4.0 and above
to fix stack smashing issue.

see: https://github.com/xdp-project/xdp-tools/issues/446

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-18 17:16:09 +00:00
Vincent Li
1eceb143ed suricata: add suricata ebpf xdp capture mode
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-17 02:11:19 +00:00
Vincent Li
f689a70b7e Revert "Revert "lunatik: 'bpf_luaxdp_run': BTF not found in kernel""
This reverts commit 0e29b73703.

switch to libbpf 1.3
2024-10-15 15:25:50 +00:00
Vincent Li
88e5d0aba7 xdp-geoip: move location block sub menu to BPFire
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-14 01:45:39 +00:00
Vincent Li
8d6014683f xdp-geoip: safe call to xdpgeoip init script
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-13 20:59:48 +00:00
Vincent Li
9c28bd419d xdp-geoip: Add XDP GeoIP location init
Add XDP GeoIP country/region location block init script

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-13 20:35:44 +00:00
Vincent Li
1bf1cdc190 xdp-geoip UI: location block ipset to XDP
change location-block UI from calling ipset to calling
xdp_geoip to update geoip_map bpf map.

see https://github.com/vincentmli/BPFire/issues/53

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-13 03:05:01 +00:00
Vincent Li
86a9264a25 xdp-geoip: add XDP GeoIP program
Add XDP GeoIP program to do location
IP block in XDP.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-12 20:33:12 +00:00
Vincent Li
f204528cf4 README: Add XDP GeoIP/Country blocklist
Vincent Li <vincent.mc.li@gmail.com>
2024-10-12 18:58:01 +00:00
Vincent Li
b21febe3e1 xdp-sni UI: XDP TLS/SSL SNI UI management
XDP TLS/SSL SNI UI to manage the web blocklist

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-09 20:38:13 +00:00
Vincent Li
a118df6060 xdp-sni: switch LPM trie map to hash map
switch xdp_sni.bpf.o LPM trie map to hash map
to reduce code complexity and avoid verifier error

now need to add domain and its sub domain to hash
map to block each domain and its sub domain site.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-09 02:48:38 +00:00
Vincent Li
5db52b1717 xdp-sni UI: XDP TLS/SSL SNI log view from UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com.
2024-10-09 00:34:07 +00:00
Vincent Li
e6ac495dfb xdp-sni: safe call wrapper program to xdpsni init
safe call wrapper program to xdpsni init script
for UI to call

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-08 17:41:17 +00:00
Vincent Li
34f9da85dd xdp-sni: add XDP TLS SNI init script xdpsni
add xdpsni init script and enable XDP TLS SNI by default
on first boot and reboot.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-08 02:21:17 +00:00
Vincent Li
d334d39e3f xdp-sni: add XDP TLS SNI logging
add XDP TLS SNI logging with bpf ringbuf
drop xdp_sni.bpf.o reverse_string due to
bpf verifier complaining program is too large.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-08 01:05:01 +00:00
Vincent Li
07c6172576 xdp-dns: missing xdpdns-settings and domainfile
add the missing config/cfgroot/xdpdns-settings file
and use ENABLE_DNSBLOCK=on by default, so XDP DNS
Blocklist is enabled by default.

also add domainfile so when BPFire reboot first time
and when xdpdns init startup, it will not complain
missing domainfile

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-07 03:01:36 +00:00
Vincent Li
4d6f8d68a3 xdp-dns UI: change running state check
Status relies on checking if xdp_dns_log is running,
but xdp_dns_log could mysteriously disappear at some point,
which result in XDP DNS Blocklist shows Stopped,
let /etc/rc.d/init.d/xdpdns status relies on if the
xdp_dns_denylist XDP program is still attached
to green0 interface.

two related issues

https://github.com/vincentmli/BPFire/issues/50
https://github.com/vincentmli/BPFire/issues/49

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-05 23:17:26 +00:00
Vincent Li
4c2fd11de2 xdp-dns UI: rename deny to blocklist
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-05 21:37:04 +00:00
Vincent Li
8b3cdb2ebe xdp-tools: fix xdp-dns XDP program byte reverse
domain name in xdp_dns.bpf.o not reversed properly
result in domain name mismatch with domain inserted
from user space xdp_dns

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 21:36:09 +00:00
Vincent Li
2c233eac63 xdp-dns log UI: view DNS query log
allow user to view DNS query logged by xdp_dns_log
from UI

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 21:36:03 +00:00
Vincent Li
2f4174b560 xdp-dns: xdpdns init script to populate denylist
run xdp_dns in xdpdns init script to populate
domain_denylist from domainfile saved from UI.
either xdpdns restart or bpfire reboot, the domain_denylist
is restored with domain blocklist

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 17:31:12 +00:00
Vincent Li
ccf49b1105 xdp-dns: update xdp_dns to correct map
change xdp_dns to use
/sys/fs/bpf/xdp-dns-denylist/domain_denylist

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 04:06:00 +00:00
Vincent Li
a165595116 xdp-dns: allow UI to run xdp_dns to update map
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 04:06:00 +00:00
Vincent Li
cdbaa41364 xdp-dns UI: web interface to add XDP DNS blocklist
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-04 04:05:53 +00:00
Vincent Li
cc8ccb35bf xdp-dns: enable XDP DNS block when reboot
if XDP DNS is enabled, and BPFire reboot, XDP
DNS program should be attached and DNS query being
monitored after reboot.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-03 17:29:16 +00:00
Vincent Li
92cd7ca970 llvm-project: upgrade to 18.1.0
xdp_dns.bpf.o failed to load with verifier
error program too large, upgrade llvm/clang
to 18.1.0 resolves the issue

fix: https://github.com/vincentmli/BPFire/issues/47

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-03 00:48:43 +00:00
Vincent Li
13530fa1ef xdp-tools: remove dns query from xdp-dnsrrl
also change user space xdp_dns_log program to
use map /sys/fs/bpf/xdp-dns-denylist/dns_ringbuf

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-02 20:20:48 +00:00
Vincent Li
f9c8259050 Add xdpdnsctrl program for safe execution
add xdpdnsctrl to start/stop/status XDP
program from xdpdns.cgi safely.

permission of xdpdnsctrl

chown root.nobody /usr/local/bin/xdpdnsctrl
chmod u+s /usr/local/bin/xdpdnsctrl

result:

-rwsr-x--- 1 root nobody 14672 Mar 19 09:58 /usr/local/bin/xdpdnsctrl
2024-10-02 18:31:21 +00:00
Vincent Li
d30a7b2318 xdp-dns: add start/stop init script and settings
add xdpdns init script to load/unload xdp_dns_denylist
program and run xdp_dns_log to log dns query to system log

rm log/configroot log/initscripts to build image

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-02 18:23:44 +00:00
Vincent Li
652ab98e1a xdp-tools: add xdp-dns system logging
add bpf ringbuf to xdp-dns program and
user space program to log DNS query to
system log.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-01 23:45:03 +00:00
Vincent Li
17d5413bc2 README: update TLS/SSL SNI blocklist to XDP
Lunatik sni filter currently does not work
for BPFire when chrome browser is used due to
clienthello > 1500 bytes, XDP TLS/SSL has
the same issue, to block domain access, it
appears XDP DNS domain blocking works more
reliable than SNI, so if there is need to block
chrome browser for some domain, use XDP DNS
domain blocking as mitigation.

see https://github.com/vincentmli/BPFire/issues/40

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-10-01 00:28:37 +00:00
Vincent Li
c1281a47ea lunatik: checksum update
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-30 16:28:51 +00:00
Vincent Li
32c15c3fe3 xdp-tools: add xdp-sni
add XDP TLS/SSL SNI parsing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-30 03:24:30 +00:00
Vincent Li
1b9810cfd9 Merge pull request #45 from selboo/bpfire
修复: 前端端口和后端端口显示错位问题
2024-09-26 07:00:43 -07:00
Selboo
781187a6d3 修复: 前端端口和后端端口显示错位问题 2024-09-26 17:33:50 +08:00
Vincent Li
2cf44838bf lfs/linux: install perf tool from linux source
compile and install perf tool from linux
source for performance monitoring.

change the setting before run perf

echo -1 > /proc/sys/kernel/perf_event_paranoid
echo 0 > /proc/sys/kernel/kptr_restrict

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-23 23:44:53 +00:00
Vincent Li
6f60c4696f lfs/flash-images: missing serial linux command
Add the missing serial linux command so the
flash image can be converted to qcow2, the
bpfire qcow2 image can be deployed in KVM
virtual environment through serial console
installation.

for exmaple:

virsh define BPFire-VM.xml
virsh start BPFire-VM
virsh console BPFire-VM

we will have serial console access to BPFire
VM and the installation will start.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-23 17:56:26 +00:00
Vincent Li
f89feeb197 kernel: use BPFire logo in kernel
how to generate logo format:

apt-get install netpbm

1 convert png format to ppm format

pngtopnm bpfire-logo.png > bpfire-logo.ppm

2 reduce the color count to 224

ppmquant 224 bpfire-logo.ppm > bpfire-logo-224.ppm

3 convert ppm raw format to ascii format

pnmnoraw bpfire-logo-224.ppm > bpfire-logo-ascii.ppm
cp bpfire-logo-ascii.ppm config/kernel/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:41:51 +00:00
Vincent Li
e5ee2e8127 grub2: use bpfire logo in grub2 splash
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:41:51 +00:00
Vincent Li
89baa34b8d Revert "grub: replace ipfire logo with bpfire logo"
This reverts commit bb773a05d5.

drivers/video/logo/logo_linux_clut224.ppm: Binary PNM is not supported
Use pnmnoraw(1) to convert it to ASCII PNM
make[6]: *** [drivers/video/logo/Makefile:31: drivers/video/logo/logo_linux_clut224.c] Error 1
make[5]: *** [scripts/Makefile.build:485: drivers/video/logo] Error 2
make[4]: *** [scripts/Makefile.build:485: drivers/video] Error 2

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:41:51 +00:00
Vincent Li
ecad4000f2 lunatik: change /lib/modules kernel path to 6.10
whenever compile kernel due to kernel change
lunatik needs to be recompiled too since
lunatik depends on kernel

change filter example Makefile to depend on
current kernel build version

diff --git a/examples/filter/Makefile b/examples/filter/Makefile
index f7eb0f6d..e30566a2 100644
--- a/examples/filter/Makefile
+++ b/examples/filter/Makefile
@@ -1,10 +1,12 @@
 # SPDX-FileCopyrightText: (c) 2023-2024 Ring Zero Desenvolvimento de Software LTDA
 # SPDX-License-Identifier: MIT OR GPL-2.0-only

+VMLINUX_BTF_PATH = /lib/modules/${shell uname -r}/build
+
 all: vmlinux https.o

 vmlinux:
-       bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
+       bpftool btf dump file $(VMLINUX_BTF_PATH)/vmlinux format c > vmlinux.h

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:41:51 +00:00
Vincent Li
1f42b720d0 kernel: upgrade to 6.10.11
upgrade kernel to recent stable release 6.10.11

1, scripts/kconfig/merge_config.sh does not work for 6.10.11
2, vmlinux BTF binary name changed in 6.10.11
3, remove rtl8812au for now since it has compiling error
4, remove 5.15 nfqueue patch since it does not apply cleanly

also see [0]

[0]: https://github.com/vincentmli/BPFire/issues/41

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-21 02:39:49 +00:00
Vincent Li
bb773a05d5 grub: replace ipfire logo with bpfire logo
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-20 21:31:43 +00:00
Vincent Li
7586e5e517 kernel: disable BTF mismatch
BTF mismatch is not an issue since
we addressed lunatik kernel module
BTF mismatch issue using the same
chroot binary vmlinux BTF.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-18 22:27:39 +00:00
Vincent Li
e5464739c9 README: update XDP DNS and SNI blocklist feature
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-17 23:33:31 +00:00
Vincent Li
0e29b73703 Revert "lunatik: 'bpf_luaxdp_run': BTF not found in kernel"
This reverts commit cacf5f209d.

libbpf version is irrelevant, revert the change

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-17 17:23:27 +00:00
Vincent Li
6723112498 lunatik: missing module BTF kfuncs not regstered
error when run lunatik which loads lunatik kernel modules

root@bpfire-2 lua]# lunatik run examples/filter/sni false

[root@bpfire-2 lua]# dmesg

[  330.411665] lunatik: loading out-of-tree module taints kernel.
[  330.411680] lunatik: module verification failed: signature and/or required key missing - tainting kernel
[  330.433955] Kernel module BTF mismatch detected, BTF debug info may be unavailable for some modules
[  330.767701] missing module BTF, cannot register kfuncs

BPFire chroot build mount /sys/kernel/btf/vmlinux which is
the host binary vmlinux BTF to build against lunatik kernel module,
which result in above error. adjust BPFire kernel build to save
the binary vmlinux BTF to chroot
/lib/modules/6.6.15-ipfire/build/vmlinux for lunatik kernel module.

create the vmlinux.h from the same binary vmlinux BTF for the ebpf https.o

lunatik kernel module is depending on kernel build, adjust the lunatik
build accordingly when kerne upgrade in future.

See https://github.com/vincentmli/BPFire/issues/40
see https://github.com/luainkernel/lunatik/issues/189

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-17 17:22:22 +00:00
Vincent Li
cacf5f209d lunatik: 'bpf_luaxdp_run': BTF not found in kernel
xdp-loader to load https.o result in error below:

libbpf: loading kernel BTF '/sys/kernel/btf/vmlinux': 0
  libbpf: extern (func ksym) 'bpf_luaxdp_run': not found in kernel or module BTFs
  libbpf: failed to load object '/usr/lib/bpf/https.o'
 libxdp: Failed to load program filter_https: Invalid argument
Couldn't attach XDP program on iface 'green0': Invalid argument(-22)

xdp-tools/xdp-loader is built statically with libbpf 1.2
should not be xdp-loader libbpf issue

still try to upgrade bpfire libbpf to 1.3.0 for testing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-16 01:00:40 +00:00
Vincent Li
dc97ffb40e lunatik: Unknown symbol in module
lunatik requires lunatik_sym.h before build
generate the symbols in chroot build.

remove lunatik_sym.h in origin lunatik source Makefile

root@r210:/home/vincent/go/src/github.com/vincentmli/BPFire/cache/lunatik-5.3.2# git diff
diff --git a/Makefile b/Makefile
index ec172541..1c72f3e1 100644
--- a/Makefile
+++ b/Makefile
@@ -3,14 +3,14 @@

 MODULES_INSTALL_PATH = /lib/modules/${shell uname -r}
 SCRIPTS_INSTALL_PATH = /lib/modules/lua
-LUNATIK_INSTALL_PATH = /usr/local/sbin
-LUA_API = lua/lua.h lua/lauxlib.h lua/lualib.h
+LUNATIK_INSTALL_PATH = /usr/sbin
+LUNATIK_EBPF_INSTALL_PATH = /usr/lib/bpf
 KDIR ?= ${MODULES_INSTALL_PATH}/build
 RM = rm -f
 MKDIR = mkdir -p -m 0755
 INSTALL = install -o root -g root

-all: lunatik_sym.h
+all:
        ${MAKE} -C ${KDIR} M=${PWD} CONFIG_LUNATIK=m    \
        CONFIG_LUNATIK_RUN=m CONFIG_LUNATIK_RUNTIME=y CONFIG_LUNATIK_DEVICE=m   \
        CONFIG_LUNATIK_LINUX=m CONFIG_LUNATIK_NOTIFIER=m CONFIG_LUNATIK_SOCKET=m \
@@ -46,6 +46,7 @@ examples_install:
        ${INSTALL} -m 0644 examples/echod/*.lua ${SCRIPTS_INSTALL_PATH}/examples/echod
        ${MKDIR} ${SCRIPTS_INSTALL_PATH}/examples/filter
        ${INSTALL} -m 0644 examples/filter/*.lua ${SCRIPTS_INSTALL_PATH}/examples/filter
+       ${INSTALL} -m 0644 examples/filter/*.o ${LUNATIK_EBPF_INSTALL_PATH}
        ${MKDIR} ${SCRIPTS_INSTALL_PATH}/examples/dnsblock
        ${INSTALL} -m 0644 examples/dnsblock/*.lua ${SCRIPTS_INSTALL_PATH}/examples/dnsblock
        ${MKDIR} ${SCRIPTS_INSTALL_PATH}/examples/dnsdoctor
@@ -69,7 +70,3 @@ install: scripts_install modules_install

 uninstall: scripts_uninstall modules_uninstall
        depmod -a
-
-lunatik_sym.h: $(LUA_API)
-       ${shell ./gensymbols.sh $(LUA_API) > lunatik_sym.h}
-

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-15 18:48:48 +00:00
Vincent Li
133baf8fc0 lunatik : kernel config change
kernel requires module to be signed, disable force
signing for now.

insmod: ERROR: could not insert module /lib/modules/6.6.15-ipfire/lunatik/lunatik.ko: Key was rejected by service

set CONFIG_MODULE_SIG_FORCE=n

failed to validate module [lunatik] BTF: -22

set CONFIG_MODULE_ALLOW_BTF_MISMATCH=y

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-15 18:41:35 +00:00
Vincent Li
7212a66761 lunatik: re-arrange lunatik and kernel build order
lunatik kernel modules requires kernel to be built first
so /lib/modules is available for lunatik

lunatik also requires resolve_btfids under:

/lib/modules/$(VER)-$(VERSUFIX)/build/tools/bpf/resolve_btfids/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-15 02:27:17 +00:00
Vincent Li
c690c0c447 lunatik: add lunatik addon
lunatik has LuaXDP that supports scripting XDP
for TLS SNI parsing and many other scripting
featuers for kernel.

see lunatik build workaround in detail

https://github.com/luainkernel/lunatik/issues/189
https://github.com/vincentmli/BPFire/issues/40

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-14 22:46:06 +00:00
Vincent Li
74cf8a3943 xdp-tools: add XDP DNS domain denylist
upgrade xdp-tools and add XDP DNS domain
denylist bpf and user space program.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-12 17:12:16 +00:00
Vincent Li
49d330f2a8 LoxiLB: increase the default session timeout
increase default inactive timeout for established
sessions like ssh session

diff --git a/pkg/loxinet/rules.go b/pkg/loxinet/rules.go
index a67d974..27a9c08 100644
--- a/pkg/loxinet/rules.go
+++ b/pkg/loxinet/rules.go
@@ -85,7 +85,7 @@ const (
        DflHostProbeTimeout        = 60        // Default probe timeout for end-point host
        InitHostProbeTimeout       = 15        // Initial probe timeout for end-point host
        MaxHostProbeTime           = 24 * 3600 // Max possible host health check duration
-       LbDefaultInactiveTimeout   = 4 * 60    // Default inactive timeout for established sessions
+       LbDefaultInactiveTimeout   = 10 * 60   // Default inactive timeout for established sessions
        LbDefaultInactiveNSTimeout = 20        // Default inactive timeout for non-session oriented protocols
        LbMaxInactiveTimeout       = 24 * 3600 // Maximum inactive timeout for established sessions
        MaxEndPointCheckers        = 4         // Maximum helpers to check endpoint health

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-10 03:03:28 +00:00
Vincent Li
3e3b5c0e89 UI: adjust credits for BPFire/IPFire support
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-10 03:03:22 +00:00
Vincent Li
6047d1079b fireinfo: remove fireinfo profile collection
should not send bpfire user profile to ipfire
to confuse ipfire community, bpfire could setup
such profile collection in the future.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 04:29:19 +00:00
Vincent Li
c834aa67d4 WebUI: change donation link to bpfire maintainer
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 04:29:12 +00:00
Vincent Li
24d3822f82 WebUI: remove ipfire release update info
User should not update ipfire because that
would remove all BPFire eBPF applications

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 00:32:30 +00:00
Vincent Li
3579fd95a1 xdp-dns: attach xdp-dns prog to green0 interface
To block or rate limit DNS query from green
network client, the xdp-dns program should
be attached to green0 interface to scan the
DNS query. attach to red0 interface only get
the DNS response packet from red0(WAN), not
matching the DNS query we want.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 00:32:30 +00:00
Vincent Li
a6f4f1dc2e README: update BPFire project README
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-09-09 00:32:24 +00:00
Vincent Li
85540f1359 loxilib: upgrade to current development tree
test new loxilb features like fullproxy L7

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-28 21:05:18 +00:00
Vincent Li
17f5f3d6cf loxicmd: upgrade to current development tree
test new loxilb features like fullproxy L7 proxy

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-28 21:03:55 +00:00
Vincent Li
be30db19f3 golang: upgrade golang to 1.23.0 release
when add loxilb development tree, loxilb requires go >= 1.23.0

    ranlib libloxilbdp.a
    make[3]: Leaving directory '/usr/src/loxilb-0.9.x/loxilb-ebpf/kernel'
    make[2]: Leaving directory '/usr/src/loxilb-0.9.x/loxilb-ebpf'
    go: go.mod requires go >= 1.23.0 (running go 1.22.0)
    make[1]: *** [Makefile:14: build] Error 1
    make[1]: Leaving directory '/usr/src/loxilb-0.9.x'
    make: *** [loxilb:76: /usr/src/log/loxilb-0.9.x] Error 2

after upgrading golang to 1.23.0, loxilb development tree result in error

    make[2]: Leaving directory '/usr/src/loxilb-0.9.x/loxilb-ebpf'
    # runtime
    /usr/lib/go/src/runtime/mbitmap_noallocheaders.go:53:2: mallocHeaderSize redeclared in this block
    /usr/lib/go/src/runtime/mbitmap.go:71:2: other declaration of mallocHeaderSize
    /usr/lib/go/src/runtime/mbitmap_noallocheaders.go:54:2: minSizeForMallocHeader redeclared in this block

the workaround is to remove build/usr/lib/go directory, then
rm log/go-1.23.0, ./make.sh build to re-add go 1.23.0

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-28 15:43:13 +00:00
Vincent Li
5f9125b044 loxilb UI: save loxilb configuration
save IP/LB/FW configuration from loxilb UI so
when loxilb restart or bpfire reboot, the configuration
can be restored.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-25 16:41:31 +00:00
Vincent Li
84eba5982a loxicmd: upgrade to 0.9.6 release
adopted loxicmd changes in https://github.com/vincentmli/BPFire/issues/30
to work out the UI permission issue.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-25 14:12:54 +00:00
Vincent Li
cc0eebaa2f LoxiLB: upgrade to loxilb 0.9.6
upgrade loxilb to 0.9.6 release

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-08-23 18:16:26 +00:00
Vincent Li
acc96d0726 kernel: enable CONFIG_DEBUG_FS
allow syscall tracing with eBPF like
bcc libbpf-tools opensnoop to trouble
shoot open syscall for UI user nobody
unable to run loxicmd save -a -c /var/ipfire/loxilib/

see https://github.com/vincentmli/BPFire/issues/30

mount -t debugfs none /sys/kernel/debug/

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-13 02:14:51 +00:00
Vincent Li
6d3717d9c7 keepalived UI: add dummy ip for HA state tracking
add dummy ip 192.0.2.1 in virutal_ipaddress from (TEST-NET-1)
according to https://www.rfc-editor.org/rfc/rfc5737#section-3
for keepalived HA state tracking, the Master will always
have the dummy ip assigned to green0.

add refresh button for HA state refresh

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-13 02:14:41 +00:00
Vincent Li
56a1588f96 vim: Disable vim automatic visual mode on mouse select
when mouse select, vim automatically turns into
visual mode, this is not convienent when copy
and paste in vim with mouse select. create this
setting for root user.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 02:41:58 +00:00
Vincent Li
aa7d243558 langs: installer/setup Chinese translation
complete the chinese translation referenced below
https://git.ipfire.org/?p=people/ummeegge/ipfire-2.x.git;a=commit;h=ca149dc8e2e24f3cfcf7bbc1e2333b2b6d43e0e4

Asked ChatGPT to translate English in msgid to msgstr in Chinese and
ChatGPT did the translation automatically with correct format.  copied
from ChatGPT and pasted in po.zh

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
dcb6b5e117 LoxiLB UI: get VIP from ipconfigfile
in HA scenario, the shared/floating VIP
is not configured on the red0 interface

when setup LoxiLB lb from the UI in standby
BPFire, some VIPs are missing since these
VIPs are only configured in the active BPFire.

get VIPs from /var/ipfire/loxilb/ipconfigfile

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
067bbaf136 LoxiLB: rename UI ipconfig to ipconfigfile
when run loxicmd save -a -c /var/ipfire/loxilb/
ipconfig directory will be created, which conflicts
with loxilb UI that also save virtual ip to
/var/ipfire/loxilb/ipconfig, so rename ipconfig to
ipconfigfile.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
02724e7427 LoxiLB: enable firewall SNAT for green network
when loxilb is enabled and started, enable the
firewall SNAT for green network so green network
could have initiate outgoing traffic like internet
access.

we can achieve this by restoring firewall SNAT setting
from default /var/ipfire/loxilb/FWconfig.txt when loxilb
start up with --config-path=/var/ipfire/loxilb thanks
to the enhancement addressed in issue:

https://github.com/loxilb-io/loxilb/issues/706

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:46 +00:00
Vincent Li
9f7cd8358f LoxiLB: upgrade to loxilb development branch
LoxiLB 0.9.4 lack of SNAT feature for egress traffic
initiated from BPFire green network, when loxilb is
enabled, it breaks BPFire green network client Internet
access, this issue is fixed in the loxilb development
branch, temporarily I make loxilb development branch
as 0.9.5 in BPFire so I could test the SNAT feature and
it works.

see detail in https://github.com/loxilb-io/loxilb/issues/718

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-09 01:47:37 +00:00
Vincent Li
a06eab4ae1 keepalived vs/rs UI: add virtual/real server UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-05 21:46:07 +00:00
Vincent Li
0f54cfef92 keepalived/ipvs: move ipvsadm to core package
prepare keepalived with ipvs for layer 4
load balancer

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-02 20:52:49 +00:00
Vincent Li
fa69bf1da3 openssh: update openssh due to CVE-2024-6387
Update from version 9.7p1 to 9.8p1

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-02 19:36:16 +00:00
Vincent Li
e7e1e67fc7 initscripts: start loxilb keepalived after reboot
When loxilb and keepalived are enabled, after BPFire
rebooted, loxilb and keepalived failed to start and
shows as "STOPPED" from UI, this is not expected since
we want to loxilb and keepalived to continue to be enabled
after reboot based on the enabled state of loxilb and
keepalived before reboot.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-01 17:30:54 +00:00
Vincent Li
fae6f15fbe LoxiLB UI: remove @nosaved items
remove @nosaved from /var/ipfire/loxilb/settings
as it could interfere with running state of
loxilb

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-01 04:14:51 +00:00
Vincent Li
ebdd4d59b4 keepalived UI: remove @nosaved item
remove @nosaved item from form submission
before writehash to each setting file because
it could interfere with each other.

for example, when change keepalived configuration
for green or red interface from the UI,
without removing @nosaved which has 'ENABLE_HA'
before writehash, 'ENABLE_HA=off' would be saved
in '/var/ipfire/keepalived/settings', this would
trigger the UI to show keepalived being "STOPPED"
or it could actually stopoped keepalived.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-07-01 00:16:30 +00:00
Vincent Li
6f8ab2d9ec menu: remove pakfire menu
pakfire addon install may cause
conflict with BPFire, remove it
for now.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-30 15:05:49 +00:00
Vincent Li
4363971e05 dhcp: allow user to specify router IP
In BPFire HA deployment, a floating/shared router IP
is required for backend/endpoint server. by default
BPFire uses the primary IP on green0 when running
setup script. Now the floating/shared router IP can
be added to green0 interface as secondary IP through
loxilb UI, keepalived UI can configure the secondary
IP as virtual ipaddress, when HA failover happens,
keepalived will move the virtual ipaddress to new active
BPFire.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:57:01 +00:00
Vincent Li
2cddcb14f6 keepalived: add keepalivedctrl program
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:57:01 +00:00
Vincent Li
ed89f965bf keepalived UI: add keepalived UI
BPFire red0 does not support multicast, need to
have unicast peer configured, then the virtual
ipaddress can be added to red0 interface.

the UI requires /var/ipfire/keepalived/runsettings
/var/ipfire/keepalived/settings to be created, so
add them lfs/configroot

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 20:55:28 +00:00
Vincent Li
07750a74ba LoxiLB UI: add required field mark
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-29 19:14:30 +00:00
Vincent Li
5955087887 keepalived: move keepalived to core package
change keepalived default config to
/var/ipfire/keepalived/keepalived.conf so keepalived WebUI
could read/write the configuration file. also add
/var/ipfire/keepalived directory

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>

keepalived: create /var/ipfire/keepalived
2024-06-29 19:13:10 +00:00
Vincent Li
61d054216d LoxiLB UI: select virtual ip from red0 interface
since we added loxilb ip management to add ip on
red0 interface, we can select the virtual ip from
red0 interface.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-20 02:49:02 +00:00
Vincent Li
780f556e9c LoxiLB UI: add loxilb ip management
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-20 02:48:55 +00:00
Vincent Li
3f1e411f95 move tcpdump and strace to core package
tcpdump and strace are essential for trouble
shooting ship it as core package

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-18 03:14:29 +00:00
Vincent Li
7e5fd9e655 Revert "make.sh: change ipfire name to bpfire name"
This reverts commit 2624a47e88.

the name change seems making the iso build downloading
image from upstream ipfire image during instalation. revert
it

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-16 02:55:13 +00:00
Vincent Li
8f4062f4da LoxiLB UI: show loxilb server running status
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 20:52:48 +00:00
Vincent Li
2624a47e88 make.sh: change ipfire name to bpfire name
this change would build iso/img with bpfire name.

note make.sh has toolchain name with ipfire,
so this rename may break something, revert this
commit if running into issue in future.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 02:50:17 +00:00
Vincent Li
56461e0173 errormessage: use red color for errormessage
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 02:14:22 +00:00
Vincent Li
4bbf33e119 LoxiLB: lb config requires lb name
since now we delete lb by name, so lb name
is required field.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-15 00:46:30 +00:00
Vincent Li
e928445c91 LoxiLB: delete lb by name
since loxilb is upgraded to 0.9.4 which allows
loxicmd delete lb by name.

fix: https://github.com/vincentmli/BPFire/issues/26

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 22:14:16 +00:00
Vincent Li
94f9604493 LoxiLB: remove workaround in loxilbconfig.cgi
now loxilb is upgraded to 0.9.4, it fixes:
https://github.com/vincentmli/BPFire/issues/25

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 22:06:19 +00:00
Vincent Li
a221be1818 LoxiLB: upgrade loxicmd to 0.9.4
upgrade procedure:

git clone https://github.com/loxilb-io/loxicmd.git
cd loxicmd
git checkout -b v0.9.4 v0.9.4
go mod vendor
cd ..
mv loxicmd loxicmd-0.9.4
tar cvf loxicmd-0.9.4.tar loxicmd-0.9.4
gzip loxicmd-0.9.4.tar
cp loxicmd-0.9.4.tar.gz <BPFire source>/cache/
b2sum <BPFire source>/cache/loxicmd-0.9.4.tar.gz

modify lfs/loxicmd to change the version and b2sum checksum

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 18:16:43 +00:00
Vincent Li
b9b523d293 Loxilb: upgrade loxilb to 0.9.4
upgrade procedure:

git clone --recurse-submodules https://github.com/loxilb-io/loxilb.git
cd loxilb
git checkout -b v0.9.4 v0.9.4
go mod vendor
cd ..
mv loxilb loxilb-0.9.4
tar cvf loxilb-0.9.4.tar loxilb-0.9.4
gzip loxilb-0.9.4.tar
cp loxilb-0.9.4.tar.gz <BPFire source>/cache/
b2sum <BPFire source>/cache/loxilb-0.9.4.tar.gz

modify lfs/loxilb to change the version and b2sum checksum

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-14 18:15:07 +00:00
Vincent Li
0003dd9c8c Loxilb UI: add loxilb firewall UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-13 04:22:02 +00:00
Vincent Li
63c3e67c07 loxilb UI: fix updating existing LB mode/sel
fix: https://github.com/vincentmli/BPFire/issues/24

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-02 01:54:02 +00:00
Vincent Li
6df412401c loxilb UI: add backend monitor option
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 21:09:54 +00:00
Vincent Li
284b13c137 loxilb UI: use select drop down option
learned from ChatGPT to print dynamic options.
add semi column ';' right after heredoc like:

print <<END;
...
...
END

following result in error

print <<END
...
...
END; #<<<< ERROR

following is correct

print <<END
...
...
END
;

so better use the first format

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 20:42:16 +00:00
Vincent Li
c946e2d263 README: update load balancer screen shot
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 14:15:48 +00:00
Vincent Li
8608700ba9 menu: adjust menu titles
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 14:15:48 +00:00
Vincent Li
6994edf40b Add loxilb lb config UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-06-01 14:15:41 +00:00
Vincent Li
f60a419e84 BPFire menu re-arrange
Re-arrange the menu to have BPF centric
main menu, this also easy the developing
of loxilb load balancer GUI since loxilb
will have multiple functions like enable
loxilb, create loxilb lb, create loxilb ip
...etc, so each loxilb function has their
own CGI UI.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-29 18:18:31 +00:00
Vincent Li
280869f883 Do not attach loxilb TC to ethX devices
see [0] loxilb attach TC program to all devices
by default.

[0]:https://github.com/vincentmli/BPFire/issues/22

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-28 18:12:51 +00:00
Vincent Li
9c58dcd145 Add WebUI loxilb.cgi for ebpf load balancer
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:17 +00:00
Vincent Li
a9c944483b Add loxilb load balancer menu
run command below when update language menu
perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang"

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:17 +00:00
Vincent Li
61caf1c5eb Add loxilb safe call program
when rebuild image: do

rm log/misc-progs

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:17 +00:00
Vincent Li
0c2b510130 add loxilb start/stop init script and settings
when rebuid the image, do:

rm log/configroot
rm log/initscripts

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-27 18:23:09 +00:00
Vincent Li
01b41130e5 Update README.md
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-17 03:57:24 +00:00
Vincent Li
fb763397b4 loxilb: add loxilb load balancer addon
build loxilb in BPFire requires golang 1.22.0,
but then had issue [0], run go mod vendor to
prepare the loxilb to download golang dependencies
package beforehand to avoid issue [0]

loxilb-ebpf build also requires gnu/stubs-32.h
use [1] as workaround

[0]: https://github.com/vincentmli/BPFire/issues/18
[1]: https://github.com/vincentmli/BPFire/issues/16

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-13 18:00:30 +00:00
Vincent Li
a7ed289c04 golang: upgrade from 1.20.4 to 1.22.0
meet loxilb 1.22.0 requirements
see https://github.com/vincentmli/BPFire/issues/19

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-13 14:34:14 +00:00
Vincent Li
927b3dfe54 loxicmd addon
Avoid downloading golang dependency packages
during build time due to issue [0], run
go mod vendor so loxicmd source include vendor
directory to include golang dependency packages

[0]: https://github.com/vincentmli/BPFire/issues/18

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-13 14:33:10 +00:00
Vincent Li
0000eed295 Add Loxilb ntc and libmd libbsd addon
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-11 17:41:01 +00:00
Vincent Li
49df562431 ebpf: Enable kernel BPF_EVENTS
loxilb or other ebpf program could use
bpf_printk for debugging, bpf_printk requires
BPF_EVENTS to be enabled, see [0]

[0] https://github.com/loxilb-io/loxilb/issues/666#issuecomment-2097850413

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-08 03:26:51 +00:00
Vincent Li
d544247a53 linux: change kernel NR_CPUS to 512
loxilb MAX_CPUS for cpu_map set to 128, BPFire
original NR_CPUS 64 result in error:

libbpf: map 'cpu_map': failed to create: Argument list too long

see https://github.com/loxilb-io/loxilb/issues/661

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-03 16:56:06 +00:00
Vincent Li
04cb6cc6ff libbpf: switch to libbpf 0.8.3
use libbpf 0.8.3 for loxilb

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-03 16:52:40 +00:00
Vincent Li
4d35e1845b update README build
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-05-01 20:51:17 +00:00
Vincent Li
c463d1d203 Add DPDK Pktgen 10G SYN flood test throughput 2024-04-28 22:16:45 +00:00
Vincent Li
1aac7c1a4c Add BPFire runnig in Microsoft HyperV pictures
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-24 16:27:35 +00:00
Vincent Li
8031d30ad2 ddos init: add ratelimit 2024-04-24 00:48:04 +00:00
Vincent Li
ad771dfe3b ddos.cgi add ratelimit UI 2024-04-24 00:48:04 +00:00
Vincent Li
00cd284e54 Revert "ddos.cgi remove duplicate code"
This reverts commit 8ca6049b32.
2024-04-24 00:48:04 +00:00
Vincent Li
a925c32ecb Revert "ddos.cgi add ratelimit UI"
This reverts commit e3ea91ca5898f0d32cd2733efcd3297d30ffa80e.
2024-04-24 00:48:04 +00:00
Vincent Li
be1fc5ce77 xdp-tools: add xdp-udp
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-24 00:48:04 +00:00
Vincent Li
6accd9056f ddos.cgi add ratelimit UI
add ratelimit UI for xdp dns and udp program

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-24 00:48:04 +00:00
Vincent Li
1cd908092b Add XDP DDoS README UI screenshot
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-24 00:47:52 +00:00
Vincent Li
9d9f3b7afb Add Chinese translation for ddos.cgi
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-19 17:15:28 +00:00
Vincent Li
8ca6049b32 ddos.cgi remove duplicate code
improve ddos.cgi by making a few sub routines
to remove duplicate code

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-19 17:00:18 +00:00
Vincent Li
fcdc42ea40 ddos.cgi add DNS DDoS UI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-18 02:29:27 +00:00
Vincent Li
56c5212374 firewall.cgi XDP SYNPROXY UI option
only show XDP SYNPROXY option when protocol
TCP is selected.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 16:09:54 +00:00
Vincent Li
13bb8928c9 Change header from IPFire_ to BPFire_
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 01:26:16 +00:00
Vincent Li
0bece3c17a Workaround ddos init script to xdp skb mode
if interface does not support native mode
re-run xdp-loader with skb mode, got error

Attaching XDP program in native mode not supported - try SKB mode.
TCP Native mode not supported, try SKB
Replacing allowed ports
Added port 80
Added port 8090
 libxdp: Retried more than 11 times, giving up
Couldn't attach XDP program on iface 'lo': Device or resource busy(-16)
UDP Native mode not supported, try SKB
Replacing allowed udp ports
Added port 10408

but it looks loaded ok

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:18:34 +00:00
Vincent Li
9924b85773 ddos init script to load/unload TCP/UDP XDP prog
make ddos init script to load/unload TCP/UDP
XDP program according to TCP/UDP setting

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:18:34 +00:00
Vincent Li
8b50f8d07c Rename FireBeeOS to BPFire
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:18:34 +00:00
Vincent Li
9a53289a23 ddos.cgi add UDP DDoS WebUI
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-17 00:17:41 +00:00
Vincent Li
6e71870648 ddos.cgi clean up and fix
write to /var/ipfire/ddos/settings file before
enable ddos to allow /etc/rc.d/init.d/ddos script
start up ddos according to the setting from
/var/ipfire/ddos/settings

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-14 03:16:53 +00:00
Vincent Li
d7544e6192 Enable kernel BPF without tracing capability
enable kernel BPF XDP/TC capability, no tracing

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-09 01:50:14 +00:00
Vincent Li
d9a8ed29e8 Revert "Enable kernel BPF/BTF"
We need to disable BPF trace capability and disallow
unprivileged BPF so

This reverts commit d0bd3cc033.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-08 19:32:11 +00:00
Vincent Li
9f86b661cb Add xdp dns rate limit program with bpf_printk deleted
XDP dns rate limit program has static tail call
which requires revert xdp-tool commit:
(039bdea "xdp-loader: Only load the BPF program we need from object files")

XDP dns rate limit program also uses bpf_printk helper which is not
supported on FireBeeOS since kernel CONFIG_BPF_EVENTS which allows user
to do kprobe, uprobe, tracepoint is not enabled, so bpf_printk helper is
not available, so removed bpf_printk

see discussion in [0] xdp-loader load xdp program with bpf tail call result in Bad file descriptor(-9)

[0] https://github.com/xdp-project/xdp-tools/issues/377

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-08 19:15:32 +00:00
Vincent Li
33cc594e39 mount bpffs for xdp-tools for ISO build
xdp-loader will only load the XDP program without
xdp dispatcher if bpffs is not mounted, flash image
has bpffs mounted already, add bpffs mount for ISO image

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-07 22:15:12 +00:00
Vincent Li
35f1987b14 Revert "Add ecapture add-on"
This reverts commit 0864b3a5ba.

User might be concerned firewall admin user capture SSL clear
text, so remove ecapture.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-07 15:22:00 +00:00
Vincent Li
ff7a427189 strip kernel module to reduce image size
set strip option to 1 which is to strip modules
debug info. tried to strip all but result in file
system not found during iso installation.

fix: https://github.com/vincentmli/FireBeeOS/issues/3

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-06 18:43:15 +00:00
Vincent Li
7b90358c1e Add missing xdp-tools utilities
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-06 18:43:15 +00:00
Vincent Li
ef347b3a28 Revert "Enable serial console in default grub"
This reverts commit 7773f82726.

After ISO installation in real hardware and reboot,
the boot process appears to be "stucking" in
"dracut: Switching root".

see https://github.com/vincentmli/FireBeeOS/issues/1

revert the commit resolves the issue, I suspect maybe
the output after "dractu: Switching root" is directed
to serial console? anyway revert this change temporarily.
flash image build still need to have serial console access
for better user experience when trying flash image in KVM/Libvirt
virtual environment.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-06 18:43:15 +00:00
Vincent Li
0c908cf913 Update README with demo link and download link
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-04-06 18:43:08 +00:00
Vincent Li
1688d250dc Add chinese for XDP UI 2024-03-20 17:42:32 +00:00
Vincent Li
8f4b665fb3 populate ddos port map in ddos init script
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:31 +00:00
Vincent Li
addfe66863 Change ddos.cgi to call ddosctrl
call ddosctrl with safety from ddos.cgi

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:31 +00:00
Vincent Li
9353496864 Add ddosctrl program for safe execution
add ddosctrl to start/stop/status XDP
program from ddos.cgi safely.

permission of ddosctrl

chown root.nobody /usr/local/bin/ddosctrl
chmod u+s /usr/local/bin/ddosctrl

result:

-rwsr-x--- 1 root nobody 14672 Mar 19 09:58 /usr/local/bin/ddosctrl

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:30 +00:00
Vincent Li
936c1a4fa0 Add XDP program load/unload script
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:30 +00:00
Vincent Li
8e4e24a9b9 Add XDP DDoS ddos.cgi
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-20 17:42:07 +00:00
Vincent Li
31f89d1813 Add eBPF XDP DDoS menu
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-16 15:54:04 +00:00
Vincent Li
dbb9b7014f fix remote.cgi code style
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-16 03:26:26 +00:00
Vincent Li
e48a29a3f1 Add XDP SYNPROXY rules in raw and filter table
XDP SYNPROXY requires setting up iptables rule
in raw table PREROUTING chain and filter table
INPUT chain.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-16 03:26:18 +00:00
Vincent Li
1f16691715 Add custom XDP SYNPROXY chain
XDP SYNPROXY rules needs to be first in filter table
INPUT user defined chain and raw table PREROUTING
user defined chain.

To list the custom chain evaluation order for example:

iptables -L INPUT --line-numbers
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    INSYNPROXY  all  --  anywhere             anywhere
2    IPSBYPASS  all  --  anywhere             anywhere             mark match 0xc0000000/0xc0000000
3    BADTCP     tcp  --  anywhere             anywhere
4    CUSTOMINPUT  all  --  anywhere             anywhere
5    HOSTILE    all  --  anywhere             anywhere
6    BLOCKLISTIN !icmp --  anywhere             anywhere
7    GUARDIAN   all  --  anywhere             anywhere
8    OVPNBLOCK  all  --  anywhere             anywhere
9    IPS_INPUT  all  --  anywhere             anywhere             mark match 0x0/0xc0000000
10   IPTVINPUT  all  --  anywhere             anywhere
11   ICMPINPUT  all  --  anywhere             anywhere
12   LOOPBACK   all  --  anywhere             anywhere
13   CAPTIVE_PORTAL  all  --  anywhere             anywhere
14   CONNTRACK  all  --  anywhere             anywhere
15   DHCPGREENINPUT  all  --  anywhere             anywhere
16   TOR_INPUT  all  --  anywhere             anywhere
17   LOCATIONBLOCK  all  --  anywhere             anywhere
18   IPSECINPUT  all  --  anywhere             anywhere
19   GUIINPUT   all  --  anywhere             anywhere
20   WIRELESSINPUT  all  --  anywhere             anywhere             ctstate NEW
21   OVPNINPUT  all  --  anywhere             anywhere
22   INPUTFW    all  --  anywhere             anywhere
23   REDINPUT   all  --  anywhere             anywhere
24   POLICYIN   all  --  anywhere             anywhere

iptables -t raw -L PREROUTING --line-numbers

Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination
1    RAWSYNPROXY  all  --  anywhere             anywhere

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-15 02:56:41 +00:00
Vincent Li
baf1d4a604 Disable vim automatic visual mode on mouse select
when mouse select, vim automatically turns into
visual mode, this is not convienent when copy
and paste in vim with mouse select.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-14 23:50:24 +00:00
Vincent Li
968fd0ca40 make sub routine for various rule check
with routine, we could reuse the code if possible.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-14 23:49:14 +00:00
Vincent Li
852567122e Add XDP SYNPROXY iptables rule UI option
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-12 02:41:43 +00:00
Vincent Li
eefbd2ef87 mount bpffs for XDP program
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-04 22:15:09 +00:00
Vincent Li
11d2901fc7 Update README with FireBeeOS
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
0864b3a5ba Add ecapture add-on
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
05ac4be397 add bpftool and re-arrange lfs build order
add lfs bpftool from [0] first to meet lfs
xdp-tools requirement.

also re-arrange BPF related add-on build order
to meet lfs knot build since it requires XDP
xsk.h

[0] https://github.com/libbpf/bpftool/releases/download/v7.3.0/bpftool-libbpf-v7.3.0-sources.tar.gz

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
f8ca312cfa Add xdp-tools add-on with XDP Synproxy
add xdp-tools utilities with addition of
SYN flooding DDoS attack protection in XDP

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
292ed31c4d Add clang add-on
xdp-tools requires clang, add clang during build
to meet xdp-tools requirement.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
5de4e5e9e9 Add pahole during build
add pahole add-on during build to
allow kernel with BPF/BTF enabled
to be built. no need to install pahole
since we only need it during build.

the procedure to prepare pahole tar ball:

download pahole from [0]
untar it and download libbpf from [1]
and untar libbpf

then:

rm pahole-1.25/lib/bpf
mv libbpf-1.3.0 to pahole-1.25/lib/
cd pahole-1.25/lib/
mv libbpf-1.3.0 bpf
cd ../../
tar -czcf pahole-1.25.tar.gz pahole-1.25

mv pahole-1.25.tar.gz ipfire-2.x/cache
b2sum ipfire-2.x/cache/pahole-1.25.tar.gz

Note cmake without optimization -O2 in
lfs/pahole result in _FORTIFY_SOURCE requires
optimzation error since ipfire glibc built
with --enable-fortify-source

this also avoid the hack in [2]

[0]https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-1.25.tar.gz
[1]https://github.com/libbpf/libbpf/archive/refs/tags/v1.3.0.tar.gz
[2]https://community.ipfire.org/t/how-to-customize-config-kernel-kernel-config-x86-64-ipfire/11100/8

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:02 +00:00
Vincent Li
fc0c2fe6da Add GUI Chinese translation
Add China mainland, China hk, China tw
translation. remember to remove log/configroot
to re-build image with new language support

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
Vincent Li
45f0a5d543 Add lfs libbpf 1.3.0 add-on
follow [0] to add libbpf add-on for bpf user space
program to open,load,attach bpf program.

to build libbpf add-on, follow [1] first, then follow [0]

[0] https://www.ipfire.org/docs/devel/ipfire-2-x/addon-howto
[1] https://www.ipfire.org/docs/devel/ipfire-2-x/build-howto

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
Vincent Li
e97d70d152 Add bpftool
bpftool comes with Linux kernel source and
it is handy to have bpftool on ipfire kernel
with BPF/BTF enabled to diagnosis BPF related
issue.

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
Vincent Li
d0bd3cc033 Enable kernel BPF/BTF
enable kernel BPF/BTF build for ebpf/XDP
program packet filtering

see hack in [1]

[1] https://community.ipfire.org/t/how-to-customize-config-kernel-kernel-config-x86-64-ipfire/11100/7

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
Vincent Li
803c6baaea Increase img build partition size
increase img build partition size for
BPF/BTF enabled kernel

Singed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
Vincent Li
2f621b80d5 Increase build tmpfs size
increase build tmpfs size to prepare space
for building BPF/BTF enabled kernel

Singed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
Vincent Li
7773f82726 Enable serial console in default grub
serial console allows user to easy access
to ipfire image instance in KVM/Libvirt
environment by virt console <ipfire instance>

Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
2024-03-01 04:08:01 +00:00
1308 changed files with 140054 additions and 177098 deletions

9
.gitignore vendored
View File

@@ -1,12 +1,11 @@
/.DS_Store
/.config
/build
/build_*
/cache
/ccache
/images_*
/doc/ChangeLog
/doc/packages-list.txt
/log
/log_*
/packages
/tmp
/*.diff
@@ -17,7 +16,3 @@
*.tar.bz2
/*.md5
/*.b2
# These files have been removed but could still be around in older environments
/doc/ChangeLog
/doc/packages-list.txt

123
README.md
View File

@@ -1,48 +1,109 @@
# LoongFire - The Open Source Firewall on Loongson CPU (龙芯开源防火墙)
# BPFire - eBPF Network Firewall OS (eBPF 网络防火墙)
# What is LoongFire?
# What is BPFire?
LoongFire is port of BPFire for Loongson CPU which is designed and made in China.
BPFire is fork of [IPFire 2.x](https://github.com/ipfire/ipfire-2.x), a hardened, versatile, state-of-the-art Open Source firewall based on Linux. BPFire is to enable revolutionary [eBPF](https://ebpf.io/) technology for non-tech savvy users, make eBPF technology consumable to home users or any size of organizations to secure their network environment. Current supported eBPF network application features:
LoongFire is a hardened, versatile, state-of-the-art Open Source firewall based on
Linux. Its ease of use, high performance in any scenario and extensibility make
it usable for everyone. For a full list of features have a look [here](https://www.ipfire.org/about).
BPFire 基于IPFire 2.x, 一个基于Linux的安全坚固、多功能、先进的开源防火墙. BPFire 为普罗大众带来革命创新性的eBPF技术为家庭用户或任何大小组织企业的网络安全保驾护航. 当前支持的eBPF应用包括
LoongFire also enable revolutionary kernel eBPF XDP/TC features for dynamic, high
speed network processing.
1. XDP DDoS protection, See XDP SYNPROXY stops 10G DDoS SYN flood [here](https://www.youtube.com/watch?v=81Hgoy-x1A4)
2. XDP UDP DDoS online game protection
3. XDP DNS domain blocklist, ratelimit protection
4. XDP SSL/TLS server name indicator (SNI) blocklist
5. XDP GeoIP/Country blocklist
6. XDP multi attachment and capture mode for Intrusion Detection System Suricata in IPS mode
7. eBPF based LoxiLB load balancer, Firewall, Proxy, see full features [LoxiLB](https://loxilb-io.github.io/loxilbdocs/#overall-features-of-loxilb)
LoongFire 是BPFire移植到龙芯的, 一个基于Linux的安全坚固、多功能、先进的开源防火墙. LoongFire 为普罗大众带来革命创新性的eBPF技术为家庭用户或任何大小组织企业的网络安全保驾护航. 当前支持的eBPF应用包括
# Where can I get support?
1. XDP DDoS protection [Pkgten DDoS attack](https://youtu.be/QVh7kihvYaM?si=tAdGCiDib4tp2BSj)
2. XDP DNS monitor, blocking
3. XDP SSL/TLS server name indicator (SNI) monitor, blocking
4. Intrusion prevention system (IPS) in XDP mode [suricata XDP](https://youtu.be/zcWsaZbs5aA?si=v_h6iHu3k4WZsBOn)
5. DNS Load balancing in eBPF XSK AF_XDP mode [dnsdist AF_XDP](https://youtu.be/O5BK1CGHDkU?si=r5VDnUc7_PU0Xt-R0)
6. eBPF based LoxiLB load balancer, Firewall, Proxy, see full features [LoxiLB](https://loxilb-io.github.io/loxilbdocs/#overall-features-of-loxilb)
Open github issue or [discord](https://discord.gg/EakRJaU8NG)
Loongson mini PC Home Internet Firewall Demo [here](https://youtu.be/rVHkBf1HB7Y?si=cxZphLIn4RhRp3-F)
# Where can I get BPFire installation ISO or LoongFire flash image?
This repository contains the source code of LoongFire which is used to build
the whole distribution from scratch, since LoongFire is not based on any other
distribution.
中国大陆用户下载地址:
# Where can I get LoongFire?
[bpfire](https://www.vcn.bc.ca/~vli/bpfire/)
中国大陆用户下载地址: https://www.vcn.bc.ca/~vli/loongfire/
[loongfire](https://www.vcn.bc.ca/~vli/loongfire/)
https://bpfire.net/download/loongfire
Other download site:
# What computer hardwares LoongFire requires?
[bpfire.net](https://bpfire.net/download/)
LoongFire support Loongson 3A6000 mini PC (NUC), Loongson server should be supported, but not tested due to lack of hardware for testing.
# What computer hardwares BPFire support?
for example [mini PC](https://www.aliexpress.us/item/3256807861547435.html?spm=a2g0o.order_list.order_list_main.5.6c6c1802f4v4tf&gatewayAdapt=glo2usa) I use at home.
BPFire support commodity computer hardware, small or large, old or new, cheap or expensive.
# How to build LoongFire?
for example:
On LoongArch machine (I used Loongson 3A6000 mini PC running Fedora):
[X86 mini PC](https://www.aliexpress.com/w/wholesale-home-firewall-router.html?spm=a2g0o.best.search.0)
1. git clone https://github.com/vincentmli/BPFire.git
2. cd BPFire; git checkout loongfire
3. wget --mirror --convert-links --adjust-extension --page-requisites --no-parent --cut-dirs=2 -nH --reject "index.html*" --reject "*.gif" https://www.bpfire.net/download/loongfire/cache/
4. ./make.sh build
[LoongArch mini PC](https://www.aliexpress.us/item/3256807861547435.html?spm=a2g0o.order_list.order_list_main.5.6c6c1802f4v4tf&gatewayAdapt=glo2usa)
# How do I install BPFire?
flash the ISO to USB on Linux machine, /dev/sdc is your USB thrumb drive.
`dd if=bpfire-2.29-core184-x86_64.iso of=/dev/sdc status=progress`
BPFire installation on mini industrial PC:
[![BPFire installation on mini industrial PC](http://img.youtube.com/vi/p9iHCe0hXPs/0.jpg)](https://www.youtube.com/watch?v=p9iHCe0hXPs "BPFire installation on mini industrial PC")
# BPFire SYNPROXY throughput with and without XDP acceleration under 10Gbit DDoS SYN flood:
[![Throughput performance](http://img.youtube.com/vi/81Hgoy-x1A4/0.jpg)](https://www.youtube.com/watch?v=81Hgoy-x1A4 "Throughput performance")
# BPFire WebUI screenshot:
English:
![](./images/bpfire-lb-en.png)
![](./images/en-1.png)
![](./images/en-2.png)
Chinese:
![](./images/bpfire-lb-zh.png)
![](./images/cn-1.png)
![](./images/cn-2.png)
# Does BPFire run in hypervisor virtual environment?
Yes, We have tested in Linux KVM hypervisor, Proxmox, Microsoft Hyper-v, should support Virtualbox, VMware as well.
Microsoft Hyper-v screen shot:
![](./images/hyperv-1.png)
![](./images/hyperv-2.png)
# How to build BPFire?
Build Environment Setup https://www.ipfire.org/docs/devel/ipfire-2-x/build-initial
(It takes a few hours to build image for first build depending on build machine power)
for example on Ubuntu 22.04 LTS:
```
apt install git-core g++ manpages-pl patch byacc make autoconf automake libltdl-dev
git clone https://github.com/vincentmli/bpfire.git
cd bpfire
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent --cut-dirs=2 -nH --reject "index.html*" --reject "*.gif" https://www.bpfire.net/download/bpfire/cache/
./make.sh build
```
# How do I support BPFire development?
Join or [Donate to BPFire paypal](https://www.paypal.com/donate/?business=BL97G8687E5B6&no_recurring=0&item_name=Make+revolutionary+eBPF+technology+available+for+non-tech+savvy+users+for+safe+online+surfing&currency_code=USD)

View File

@@ -1,24 +0,0 @@
#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when apcupsd
# detects that the battery should be replaced.
# We send an email message to root to notify him.
#
FROM="enter from email address"
TO="enter to email address"
HOSTNAME=`hostname`
MSG="$HOSTNAME Battery needs changing now on UPS $1"
#
(
echo From: $FROM
echo To: $TO
echo Subject: $MSG
echo " "
echo "$MSG"
echo " "
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
exit 0

View File

@@ -1,23 +0,0 @@
#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when apcupsd
# loses contact with the UPS (i.e. the serial connection is not responding).
# We send an email message to root to notify him.
#
FROM="enter from email address"
TO="enter to email address"
HOSTNAME=`hostname`
MSG="$HOSTNAME Communications with UPS $1 lost"
(
echo From: $FROM
echo To: $TO
echo Subject: $MSG
echo " "
echo "$MSG"
echo " "
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
exit 0

View File

@@ -1,24 +0,0 @@
#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when apcupsd
# restores contact with the UPS (i.e. the serial connection is restored).
# We send an email message to root to notify him.
#
FROM="enter from email address"
TO="enter to email address"
HOSTNAME=`hostname`
MSG="$HOSTNAME Communications with UPS $1 restored"
#
(
echo From: $FROM
echo To: $TO
echo Subject: $MSG
echo " "
echo "$MSG"
echo " "
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
exit 0

View File

@@ -1,24 +0,0 @@
#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the
# UPS goes back on to the mains after a power failure.
# We send an email message to root to notify him.
#
FROM="enter from email address"
TO="enter to email address"
HOSTNAME=`hostname`
MSG="$HOSTNAME Power has returned on UPS $1"
#
(
echo From: $FROM
echo To: $TO
echo Subject: $MSG
echo " "
echo "$MSG"
echo " "
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
exit 0

View File

@@ -1,24 +0,0 @@
#!/bin/sh
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the UPS
# goes on batteries.
# We send an email message to root to notify him.
#
FROM="enter from email address"
TO="enter to email address"
HOSTNAME=`hostname`
MSG="$HOSTNAME Power Failure on UPS $1"
#
(
echo From: $FROM
echo To: $TO
echo Subject: $MSG
echo " "
echo "$MSG"
echo " "
echo -ne $(echo "\r\n"; while read line; do echo "$line\r\n"; done < <(echo "$(/sbin/apcaccess status)"))
) | sudo -u nobody /usr/sbin/sendmail -t -f $FROM
exit 0

View File

@@ -2,7 +2,7 @@
###############################################################################
# #
# IPFire.org - A linux based firewall #
# Copyright (C) 2007-2024 IPFire Team <info@ipfire.org> #
# Copyright (C) 2007-2022 IPFire Team <info@ipfire.org> #
# #
# 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 #
@@ -21,7 +21,7 @@
shopt -s nullglob
NOW="$(date "+%Y-%m-%d-%H%M")"
NOW="$(date "+%Y-%m-%d-%H:%M")"
list_addons() {
local file
@@ -75,15 +75,10 @@ make_backup() {
restore_backup() {
local filename="${1}"
# remove all openvpn certs to prevent old unusable
# certificates being left in directory after a restore
rm -f /var/ipfire/ovpn/certs/*
# Extract backup
if ! tar xvzpf "${filename}" -C / \
--exclude-from="/var/ipfire/backup/exclude" \
--exclude-from="/var/ipfire/backup/exclude.user" \
--force-local; then
--exclude-from="/var/ipfire/backup/exclude.user"; then
echo "Could not extract backup" >&2
return 1
fi
@@ -194,7 +189,7 @@ restore_backup() {
# Update OpenVPN CRL
/etc/fcron.daily/openvpn-crl-updater
# Update OpenVPN N2N Client Configs
## Add providers legacy default line to n2n client config files
# Check if ovpnconfig exists and is not empty
@@ -247,17 +242,6 @@ restore_backup() {
-signkey /etc/httpd/server.key \
-out /etc/httpd/server.crt &>/dev/null
fi
# Remove any entry for ALIENVAULT or SPAMHAUS_EDROP from the ipblocklist modified file
# and the associated ipblocklist files from the /var/lib/ipblocklist directory
sed -i '/ALIENVAULT=/d' /var/ipfire/ipblocklist/modified
sed -i '/SPAMHAUS_EDROP=/d' /var/ipfire/ipblocklist/modified
if [ -e /var/lib/ipblocklist/ALIENVAULT.conf ]; then
rm /var/lib/ipblocklist/ALIENVAULT.conf
fi
if [ -e /var/lib/ipblocklist/SPAMHAUS_EDROP.conf ]; then
rm /var/lib/ipblocklist/SPAMHAUS_EDROP.conf
fi
return 0
}

View File

@@ -1,16 +1,18 @@
etc/conntrackd/conntrackd.conf
etc/group
etc/hosts*
etc/httpd/server.crt
etc/httpd/server.csr
etc/httpd/server-ecdsa.crt
etc/httpd/server-ecdsa.csr
etc/httpd/server-ecdsa.key
etc/httpd/server.key
etc/ipsec.user.*
etc/ipsec.user-post.conf
etc/logrotate.d
etc/passwd
etc/shadow
etc/ssh/sshd_config
etc/ssh/sshd_config.d
etc/ssh/ssh_host*
etc/squid/squid.conf.local
etc/squid/squid.conf.pre.local

View File

@@ -0,0 +1 @@
/etc/icinga

View File

@@ -1,4 +0,0 @@
/etc/asound.state
/var/ipfire/mpd/db/
/var/ipfire/mpd/mpd.conf
/var/ipfire/mpd/mpd_state

View File

@@ -0,0 +1,6 @@
/etc/asound.state
/var/ipfire/mpfire/db/
/var/ipfire/mpfire/mpd.conf
/var/ipfire/mpfire/mpd_state
/var/ipfire/mpfire/settings
/var/ipfire/mpfire/webradio

File diff suppressed because it is too large Load Diff

View File

@@ -33,22 +33,6 @@ submenu 'Other Installation Options -->' {
}
}
submenu 'Serial Console -->' {
menuentry 'Install NAME VERSION ARCH (serial console)' --class ipfire --class gnu-linux --class gnu --class os {
linux /boot/isolinux/vmlinuz console=ttyS0,115200n8 novga
initrd /boot/isolinux/instroot
}
menuentry 'Unattended installation (serial console)' --class ipfire --class gnu-linux --class gnu --class os {
linux /boot/isolinux/vmlinuz installer.unattended console=ttyS0,115200n8 novga
initrd /boot/isolinux/instroot
}
menuentry 'memtest86+ (serial console)' {
linux /boot/isolinux/memtest console=ttyS0,115200n8
}
}
submenu 'Tools -->' {
menuentry 'memtest86+' {
linux /boot/isolinux/memtest

View File

@@ -1 +1,9 @@
ENABLE_DDOS=on
22=off
ENABLE_DDOS=off
25=off
80=off
53=off
8080=off
8090=off
443=off
5555=off

View File

@@ -0,0 +1 @@
ENABLE_DNS_DDOS=off

View File

@@ -19,6 +19,7 @@ use Socket;
use IO::Socket;
use Net::SSLeay;
use Net::IPv4Addr qw(:all);
$|=1; # line buffering
$General::version = 'VERSION';
$General::swroot = 'CONFIG_ROOT';
@@ -98,82 +99,6 @@ sub system($) {
return $rc;
}
sub read_pids($) {
my $pidfile = shift;
# Open the PID file
open(PIDFILE, "<${pidfile}");
# Store all PIDs here
my @pids = ();
# Read all PIDs
while (<PIDFILE>) {
chomp $_;
if (-d "/proc/$_") {
push(@pids, $_);
}
}
# Close the PID file
close(PIDFILE);
return @pids;
}
sub find_pids($) {
my $process = shift;
# Store all PIDs here
my @pids = ();
foreach my $status (</proc/*/status>) {
# Open the status file
open(STATUS, "<${status}");
# Read the status file
while (<STATUS>) {
# If the name does not match, we break the loop immediately
if ($_ =~ m/^Name:\s+(.*)$/) {
last if ($process ne $1);
# Push the PID onto the list
} elsif ($_ =~ m/^Pid:\s+(\d+)$/) {
push(@pids, $1);
# Once we got here, we are done
last;
}
}
# Close the status file
close(STATUS);
}
return @pids;
}
sub get_memory_consumption() {
my $memory = 0;
foreach my $pid (@_) {
# Open the status file or skip on error
open(STATUS, "/proc/${pid}/status") or next;
while (<STATUS>) {
if ($_ =~ m/^VmRSS:\s+(\d+) kB/) {
$memory += $1 * 1024;
last;
}
}
close(STATUS);
}
return $memory;
}
# Function to remove duplicates from an array
sub uniq { my %seen; grep !$seen{$_}++, @_ }
@@ -192,13 +117,15 @@ sub log
}
sub setup_default_networks
{
my %netsettings = %Network::ethernet;
my %netsettings=();
my $defaultNetworks = shift;
&readhash("/var/ipfire/ethernet/settings", \%netsettings);
# Get current defined networks (Red, Green, Blue, Orange)
$defaultNetworks->{$Lang::tr{'fwhost any'}}{'IPT'} = "0.0.0.0/0.0.0.0";
$defaultNetworks->{$Lang::tr{'fwhost any'}}{'NAME'} = "ALL";
$defaultNetworks->{$Lang::tr{'green'}}{'IPT'} = "$netsettings{'GREEN_NETADDRESS'}/$netsettings{'GREEN_NETMASK'}";
$defaultNetworks->{$Lang::tr{'green'}}{'NET'} = "$netsettings{'GREEN_ADDRESS'}";
$defaultNetworks->{$Lang::tr{'green'}}{'NAME'} = "GREEN";
@@ -219,7 +146,7 @@ sub setup_default_networks
$defaultNetworks->{$Lang::tr{'blue'}}{'NET'} = "$netsettings{'BLUE_ADDRESS'}";
$defaultNetworks->{$Lang::tr{'blue'}}{'NAME'} = "BLUE";
}
#IPFire himself
$defaultNetworks->{'IPFire'}{'NAME'} = "IPFire";
@@ -246,12 +173,12 @@ sub setup_default_networks
&readhash("${General::swroot}/vpn/settings", \%ipsecsettings);
if($ipsecsettings{'RW_NET'} ne '')
{
my $netaddress = &Network::get_netaddress($ipsecsettings{'RW_NET'});
my $prefix = &Network::get_prefix($ipsecsettings{'RW_NET'});
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'ADR'} = $netaddress;
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'NAME'} = "IPsec RW";
$defaultNetworks->{"IPsec RW (${netaddress}/${prefix})"}{'NET'} = $netaddress;
my ($ip,$sub) = split(/\//,$ipsecsettings{'RW_NET'});
$sub=&General::iporsubtocidr($sub);
my @tempipsecsubnet = split("\/", $ipsecsettings{'RW_NET'});
$defaultNetworks->{'IPsec RW (' .$ip."/".$sub.")"}{'ADR'} = $tempipsecsubnet[0];
$defaultNetworks->{'IPsec RW (' .$ip."/".$sub.")"}{'NAME'} = "IPsec RW";
$defaultNetworks->{'IPsec RW (' .$ip."/".$sub.")"}{'NET'} = &getnextip($ip);
}
}
@@ -262,9 +189,21 @@ sub setup_default_networks
$defaultNetworks->{$name}{'NAME'} = "WGRW";
}
}
sub set_defaults($$) {
my $hash = shift;
my $defaults = shift;
foreach my $key (keys %$defaults) {
unless (defined($hash->{$key})) {
$hash->{$key} = $defaults->{$key};
}
}
}
sub get_aliases
{
my $defaultNetworks = shift;
open(FILE, "${General::swroot}/ethernet/aliases") or die 'Unable to open aliases file.';
my @current = <FILE>;
@@ -280,36 +219,25 @@ sub get_aliases
}
$defaultNetworks->{$temp[2]}{'IPT'} = "$temp[0]";
$defaultNetworks->{$temp[2]}{'NET'} = "$temp[0]";
$ctr++;
}
}
}
sub set_defaults($$) {
my $hash = shift;
my $defaults = shift;
foreach my $key (keys %$defaults) {
unless (defined($hash->{$key})) {
$hash->{$key} = $defaults->{$key};
}
}
}
sub readhash
{
my $filename = $_[0];
my $hash = $_[1];
my ($var, $val);
# Some ipcop code expects that readhash 'complete' the hash if new entries
# are presents. Not clear it !!!
#%$hash = ();
open(FILE, $filename) or die "Unable to read file $filename";
while (<FILE>)
{
chop;
@@ -343,14 +271,50 @@ sub writehash
my $filename = $_[0];
my $hash = $_[1];
my ($var, $val);
# write cgi vars to the file.
open(FILE, ">${filename}") or die "Unable to write file $filename";
flock FILE, 2;
foreach $var (keys %$hash)
{
if ( $var eq "__CGI__"){next;}
$val = $hash->{$var};
# Darren Critchley Jan 17, 2003 added the following because when submitting with a graphic, the x and y
# location of the mouse are submitted as well, this was being written to the settings file causing
# some serious grief! This skips the variable.x and variable.y
if (!($var =~ /(.x|.y)$/)) {
if ($val =~ / /) {
$val = "\'$val\'"; }
if (!($var =~ /^ACTION/)) {
print FILE "${var}=${val}\n"; }
}
}
close FILE;
}
sub writehashpart
{
# This function replaces the given hash in the original hash by keeping the old
# content and just replacing the new content
my $filename = $_[0];
my $newhash = $_[1];
my %oldhash;
my ($var, $val);
readhash("${filename}", \%oldhash);
foreach $var (keys %$newhash){
$oldhash{$var}=$newhash->{$var};
}
# write cgi vars to the file.
open(FILE, ">${filename}") or die "Unable to write file $filename";
flock FILE, 2;
foreach $var (keys %$hash)
foreach $var (keys %oldhash)
{
if ( $var eq "__CGI__"){next;}
$val = $hash->{$var};
$val = $oldhash{$var};
# Darren Critchley Jan 17, 2003 added the following because when submitting with a graphic, the x and y
# location of the mouse are submitted as well, this was being written to the settings file causing
# some serious grief! This skips the variable.x and variable.y
@@ -408,7 +372,7 @@ sub validip
if (!($ip =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/)) {
return 0; }
else
else
{
my @octets = ($1, $2, $3, $4);
foreach $_ (@octets)
@@ -422,6 +386,14 @@ sub validip
}
}
sub validnum {
my $num = shift;
if ($num =~ /^\d+$/) {
return 1;
}
return 0;
}
sub validmask {
my $mask = shift;
@@ -453,7 +425,7 @@ sub subtocidr {
sub cidrtosub {
return &Network::convert_prefix2netmask(shift);
}
sub iporsubtodec
{
#Gets: Ip address or subnetmask in decimal oder CIDR
@@ -477,7 +449,7 @@ sub iporsubtodec
return $net."/".$mask;
}
}
}
}
}
#Subnet in binary format?
if ($mask=~/^(\d{1,2})$/ && (($1<=32 && $1>=0))){
@@ -489,8 +461,8 @@ sub iporsubtodec
}
return 3;
}
sub iporsubtocidr
{
#gets: Ip Address or subnetmask in decimal oder CIDR
@@ -513,7 +485,7 @@ sub iporsubtocidr
return $net."/".&General::subtocidr($mask);
}
}
}
}
}
#Subnet already in binary format?
if ($mask=~/^(\d{1,2})$/ && (($1<=32 && $1>=0))){
@@ -532,6 +504,18 @@ sub getnetworkip {
return &Network::get_netaddress($arg);
}
sub getccdbc
{
#Gets: IP in Form ("192.168.0.0/24")
#Gives: Broadcastaddress of network
my $ccdnet=$_;
my ($ccdip,$ccdsubnet) = split "/",$ccdnet;
my $ip_address_binary = inet_aton( $ccdip );
my $netmask_binary = ~pack("N", (2**(32-$ccdsubnet))-1);
my $broadcast_address = inet_ntoa( $ip_address_binary | ~$netmask_binary );
return $broadcast_address;
}
sub ip2dec {
return &Network::ip2bin(shift);
}
@@ -540,13 +524,21 @@ sub dec2ip {
return &Network::bin2ip(shift);
}
sub getnextip {
return &Network::find_next_ip_address(shift, 4);
}
sub getlastip {
return &Network::find_next_ip_address(shift, -1);
}
sub validipandmask
{
#Gets: Ip address in 192.168.0.0/24 or 192.168.0.0/255.255.255.0 and checks if subnet valid
#Gives: True bzw 0 if success or false
#Gives: True bzw 0 if success or false
my $ccdnet=$_[0];
my $subcidr;
if (!($ccdnet =~ /^(.*?)\/(.*?)$/)) {
return 0;
}
@@ -566,7 +558,7 @@ sub validipandmask
}else{
return 0;
}
}
return 0;
}
@@ -617,13 +609,13 @@ sub checksubnets
&readhasharray("${General::swroot}/ovpn/ccd.conf", \%ccdconfhash);
foreach my $key (keys %ccdconfhash) {
@ccdconf=split(/\//,$ccdconfhash{$key}[1]);
if ($ccdname eq $ccdconfhash{$key}[0])
if ($ccdname eq $ccdconfhash{$key}[0])
{
$errormessage=$errormessage.$Lang::tr{'ccd err nameexist'}."<br>";
return $errormessage;
}
my ($newip,$newsub) = split(/\//,$ccdnet);
if (&IpInSubnet($newip,$ccdconf[0],&iporsubtodec($ccdconf[1])))
if (&IpInSubnet($newip,$ccdconf[0],&iporsubtodec($ccdconf[1])))
{
$errormessage=$errormessage.$Lang::tr{'ccd err issubnet'}." $ccdconfhash{$key}[0]<br>";
return $errormessage;
@@ -659,7 +651,7 @@ sub checksubnets
return $errormessage;
}
}
#call check_net_internal
if ($checktype eq "exact")
{
@@ -672,10 +664,11 @@ sub checksubnets
sub check_net_internal_range{
my $network=shift;
my ($ip,$cidr)=split(/\//,$network);
my %ownnet = %Network::ethernet;
my %ownnet=();
my $errormessage;
$cidr=&iporsubtocidr($cidr);
#check if we use one of ipfire's networks (green,orange,blue)
&readhash("${General::swroot}/ethernet/settings", \%ownnet);
if (($ownnet{'GREEN_NETADDRESS'} ne '' && $ownnet{'GREEN_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'GREEN_NETADDRESS'},&iporsubtodec($ownnet{'GREEN_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err green'};return $errormessage;}
if (($ownnet{'ORANGE_NETADDRESS'} ne '' && $ownnet{'ORANGE_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'ORANGE_NETADDRESS'},&iporsubtodec($ownnet{'ORANGE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;}
if (($ownnet{'BLUE_NETADDRESS'} ne '' && $ownnet{'BLUE_NETADDRESS'} ne '0.0.0.0') && &IpInSubnet($ip,$ownnet{'BLUE_NETADDRESS'},&iporsubtodec($ownnet{'BLUE_NETMASK'}))){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;}
@@ -685,10 +678,11 @@ sub check_net_internal_range{
sub check_net_internal_exact{
my $network=shift;
my ($ip,$cidr)=split(/\//,$network);
my %ownnet = %Network::ethernet;
my %ownnet=();
my $errormessage;
$cidr=&iporsubtocidr($cidr);
#check if we use one of ipfire's networks (green,orange,blue)
&readhash("${General::swroot}/ethernet/settings", \%ownnet);
if (($ownnet{'GREEN_NETADDRESS'} ne '' && $ownnet{'GREEN_NETADDRESS'} ne '0.0.0.0') && &Network::network_equal("$ownnet{'GREEN_NETADDRESS'}/$ownnet{'GREEN_NETMASK'}", $network)){ $errormessage=$Lang::tr{'ccd err green'};return $errormessage;}
if (($ownnet{'ORANGE_NETADDRESS'} ne '' && $ownnet{'ORANGE_NETADDRESS'} ne '0.0.0.0') && &Network::network_equal("$ownnet{'ORANGE_NETADDRESS'}/$ownnet{'ORANGE_NETMASK'}", $network)){ $errormessage=$Lang::tr{'ccd err orange'};return $errormessage;}
if (($ownnet{'BLUE_NETADDRESS'} ne '' && $ownnet{'BLUE_NETADDRESS'} ne '0.0.0.0') && &Network::network_equal("$ownnet{'BLUE_NETADDRESS'}/$ownnet{'BLUE_NETMASK'}", $network)){ $errormessage=$Lang::tr{'ccd err blue'};return $errormessage;}
@@ -815,7 +809,7 @@ sub validfqdn
# but no more than 63 characters
if (length ($parts[$index]) < 1 || length ($parts[$index]) > 63) {
return 0;}
if ($index eq 0) {
if ($index eq 0) {
# This is the hostname part
# Only valid characters are a-z, A-Z, 0-9 and -
if ($parts[$index] !~ /^[a-zA-Z0-9-]*$/) {
@@ -826,7 +820,7 @@ sub validfqdn
# Last character can only be a letter or a digit
if (substr ($parts[$index], -1, 1) !~ /^[a-zA-Z0-9]*$/) {
return 0;}
} else{
} else{
# This is the domain part
# Only valid characters are a-z, A-Z, 0-9, _ and -
if ($parts[$index] !~ /^[a-zA-Z0-9_-]*$/) {
@@ -836,23 +830,23 @@ sub validfqdn
return 1;
}
sub validportrange # used to check a port range
sub validportrange # used to check a port range
{
my $port = $_[0]; # port values
$port =~ tr/-/:/; # replace all - with colons just in case someone used -
my $srcdst = $_[1]; # is it a source or destination port
if (!($port =~ /^(\d+)\:(\d+)$/)) {
if (!(&validport($port))) {
if (!(&validport($port))) {
if ($srcdst eq 'src'){
return $Lang::tr{'source port numbers'};
} else {
return $Lang::tr{'destination port numbers'};
}
}
}
}
else
else
{
my @ports = ($1, $2);
if ($1 >= $2){
@@ -860,22 +854,30 @@ sub validportrange # used to check a port range
return $Lang::tr{'bad source range'};
} else {
return $Lang::tr{'bad destination range'};
}
}
}
foreach $_ (@ports)
{
if (!(&validport($_))) {
if ($srcdst eq 'src'){
return $Lang::tr{'source port numbers'};
return $Lang::tr{'source port numbers'};
} else {
return $Lang::tr{'destination port numbers'};
}
}
}
}
return;
}
}
# Checks for a valid country code
sub validcc($) {
my $cc = shift;
# Must contain of exactly two uppercase characters, or must be A1, A2, or A3
return ($cc =~ m/^([A-Z]{2}|A[123])$/);
}
sub IpInSubnet {
my $addr = shift;
my $network = shift;
@@ -884,6 +886,19 @@ sub IpInSubnet {
return &Network::ip_address_in_network($addr, "$network/$netmask");
}
#
# Return the following IP (IP+1) in dotted notation.
# Call: NextIP ('1.1.1.1');
# Return: '1.1.1.2'
#
sub NextIP {
return &Network::find_next_ip_address(shift, 1);
}
sub NextIP2 {
return &Network::find_next_ip_address(shift, 4);
}
sub ipcidr {
my ($ip,$cidr) = &Net::IPv4Addr::ipv4_parse(shift);
return "$ip\/$cidr";
@@ -969,6 +984,87 @@ sub findhasharraykey {
}
}
sub srtarray
# Darren Critchley - darrenc@telus.net - (c) 2003
# &srtarray(SortOrder, AlphaNumeric, SortDirection, ArrayToBeSorted)
# This subroutine will take the following parameters:
# ColumnNumber = the column which you want to sort on, starts at 1
# AlphaNumberic = a or n (lowercase) defines whether the sort should be alpha or numberic
# SortDirection = asc or dsc (lowercase) Ascending or Descending sort
# ArrayToBeSorted = the array that wants sorting
#
# Returns an array that is sorted to your specs
#
# If SortOrder is greater than the elements in array, then it defaults to the first element
#
{
my ($colno, $alpnum, $srtdir, @tobesorted) = @_;
my @tmparray;
my @srtedarray;
my $line;
my $newline;
my $ctr;
my $ttlitems = scalar @tobesorted; # want to know the number of rows in the passed array
if ($ttlitems < 1){ # if no items, don't waste our time lets leave
return (@tobesorted);
}
my @tmp = split(/\,/,$tobesorted[0]);
$ttlitems = scalar @tmp; # this should be the number of elements in each row of the passed in array
# Darren Critchley - validate parameters
if ($colno > $ttlitems){$colno = '1';}
$colno--; # remove one from colno to deal with arrays starting at 0
if($colno < 0){$colno = '0';}
if ($alpnum ne '') { $alpnum = lc($alpnum); } else { $alpnum = 'a'; }
if ($srtdir ne '') { $srtdir = lc($srtdir); } else { $srtdir = 'src'; }
foreach $line (@tobesorted)
{
chomp($line);
if ($line ne '') {
my @temp = split(/\,/,$line);
# Darren Critchley - juggle the fields so that the one we want to sort on is first
my $tmpholder = $temp[0];
$temp[0] = $temp[$colno];
$temp[$colno] = $tmpholder;
$newline = "";
for ($ctr=0; $ctr < $ttlitems ; $ctr++) {
$newline=$newline . $temp[$ctr] . ",";
}
chop($newline);
push(@tmparray,$newline);
}
}
if ($alpnum eq 'n') {
@tmparray = sort {$a <=> $b} @tmparray;
} else {
@tmparray = (sort @tmparray);
}
foreach $line (@tmparray)
{
chomp($line);
if ($line ne '') {
my @temp = split(/\,/,$line);
my $tmpholder = $temp[0];
$temp[0] = $temp[$colno];
$temp[$colno] = $tmpholder;
$newline = "";
for ($ctr=0; $ctr < $ttlitems ; $ctr++){
$newline=$newline . $temp[$ctr] . ",";
}
chop($newline);
push(@srtedarray,$newline);
}
}
if ($srtdir eq 'dsc') {
@tmparray = reverse(@srtedarray);
return (@tmparray);
} else {
return (@srtedarray);
}
}
sub FetchPublicIp {
my %proxysettings;
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
@@ -996,12 +1092,12 @@ sub FetchPublicIp {
# IP
# hostname
# domain
# Output
# Output
# 1 IP matches host.domain
# 0 not in sync
#
sub DyndnsServiceSync ($;$;$) {
my ($ip,$hostName,$domain) = @_;
my @addresses;
@@ -1018,7 +1114,7 @@ sub DyndnsServiceSync ($;$;$) {
}
if ($addresses[0] ne '') { # got something ?
#&General::log("name:$addresses[0], alias:$addresses[1]");
#&General::log("name:$addresses[0], alias:$addresses[1]");
# Build clear text list of IP
@addresses = map ( &Socket::inet_ntoa($_), @addresses[4..$#addresses]);
if (grep (/$ip/, @addresses)) {
@@ -1130,8 +1226,11 @@ sub MakeUserAgent() {
sub RedIsWireless() {
# This function checks if a network device is a wireless device.
my %settings = ();
&readhash("${General::swroot}/ethernet/settings", \%settings);
# Find the name of the network device.
my $device = $Network::ethernet{'RED_DEV'};
my $device = $settings{'RED_DEV'};
# Exit, if no device is configured.
return 0 if ($device eq "");
@@ -1162,11 +1261,11 @@ sub read_file_utf8 ($) {
sub write_file_utf8 ($) {
my ($file, $content) = @_;
open my $out, '>:encoding(UTF-8)', $file or die "Could not open '$file' for writing $!";;
open my $out, '>:encoding(UTF-8)', $file or die "Could not open '$file' for writing $!";;
print $out $content;
close $out;
return;
return;
}
my $FIREWALL_RELOAD_INDICATOR = "${General::swroot}/firewall/reread";
@@ -1243,6 +1342,22 @@ sub grab_address_from_file($) {
return;
}
sub get_ipaddresses_from_interface($) {
my ($interface) = @_;
my @ip_addresses;
my $output = `ip addr show $interface 2>/dev/null`;
# Check if the command was successful
if ($? == 0) {
# Extract IP addresses using regex
while ($output =~ /inet (\d+\.\d+\.\d+\.\d+)/g) {
push @ip_addresses, $1;
}
}
return @ip_addresses;
}
# Function to get all configured and enabled nameservers.
sub get_nameservers () {
my %settings;
@@ -1294,7 +1409,7 @@ sub get_nameservers () {
}
# Function to format a string containing the amount of bytes to
# something human-readable.
# something human-readable.
sub formatBytes {
# Private array which contains the units.
my @units = qw(B KB MB GB TB PB);

View File

@@ -31,10 +31,10 @@ require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
# Approximate size of the final graph image including canvas and labeling (in pixels, mainly used for placeholders)
our %image_size = ('width' => 900, 'height' => 400);
our %image_size = ('width' => 900, 'height' => 300);
# Size of the actual data area within the image, without labeling (in pixels)
our %canvas_size = ('width' => 800, 'height' => 290);
our %canvas_size = ('width' => 800, 'height' => 190);
# List of all available time ranges
our @time_ranges = ("hour", "day", "week", "month", "year");
@@ -111,28 +111,21 @@ sub makegraphbox {
$default_range = "day" unless ($default_range ~~ @time_ranges);
print <<END;
<div class="graph" id="rrdimg-$name" data-origin="$origin" data-graph="$name" data-default-range="$default_range">
<img src="/cgi-bin/getrrdimage.cgi?origin=${origin}&graph=${name}&range=${default_range}" alt="$Lang::tr{'graph'} ($name)">
<ul>
<div class="rrdimage" id="rrdimg-$name" data-origin="$origin" data-graph="$name" data-default-range="$default_range">
<ul>
END
# Print range select buttons
foreach my $range (@time_ranges) {
my $selected = ($range eq $default_range) ? "class=\"selected\"" : "";
print <<END;
<li>
<button data-range="$range" onclick="rrdimage_selectRange(this)" $selected>
$Lang::tr{$range}
</button>
</li>
<li><button data-range="$range" onclick="rrdimage_selectRange(this)">$Lang::tr{$range}</button></li>
END
}
print <<END;
</ul>
</div>
</ul>
<img src="/cgi-bin/getrrdimage.cgi?origin=${origin}&graph=${name}&range=${default_range}" alt="$Lang::tr{'graph'} ($name)">
</div>
END
}
@@ -150,6 +143,7 @@ sub updatecpugraph {
"-l 0",
"-u 100",
"-r",
"-t ".$Lang::tr{'cpu usage per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'percentage'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -276,6 +270,7 @@ sub updateloadgraph {
"-1".$period,
"-l 0",
"-r",
"-t ".$Lang::tr{'uptime load average'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'processes'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -308,6 +303,7 @@ sub updatememorygraph {
"-l 0",
"-u 100",
"-r",
"-t ".$Lang::tr{'memory usage per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'percentage'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -363,6 +359,7 @@ sub updateswapgraph {
"-l 0",
"-u 100",
"-r",
"-t ".$Lang::tr{'swap usage per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'percentage'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -399,6 +396,99 @@ sub updateswapgraph {
return "Error in RRD::graph for memory: ".$ERROR."\n" if $ERROR;
}
# Generate the Process Cpu Graph for the current period of time for values given by collecd
sub updateprocessescpugraph {
my @processesgraph = getprocesses();
my $period = $_[0];
my $count="0";
my @command = (
@GRAPH_ARGS,
"-",
"--start",
"-1".$period,
"-l 0",
"-r",
"-t ".$Lang::tr{'processes'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
"--color=BACK".$color{"color21"}
);
foreach(@processesgraph){
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
push(@command,"DEF:".$name[1]."user=".$_."ps_cputime.rrd:user:AVERAGE");
push(@command,"DEF:".$name[1]."system=".$_."ps_cputime.rrd:syst:AVERAGE");
push(@command,"CDEF:".$name[1]."=".$name[1]."user,".$name[1]."system,+");
}
push(@command,"COMMENT:".$Lang::tr{'caption'}."\\j");
my $colorIndex = 0;
foreach(@processesgraph){
my $colorIndex = 10 + $count % 15;
my $color="$color{\"color$colorIndex\"}";
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
if ($count eq "0"){
push(@command,"AREA:".$name[1].$color."A0:".$name[1]);
}else{
push(@command,"STACK:".$name[1].$color."A0:".$name[1]);
}
$count++;
}
RRDs::graph (@command);
$ERROR = RRDs::error;
return "Error in RRD::graph for processes: ".$ERROR."\n" if $ERROR;
}
# Generate the Process Memory Graph for the current period of time for values given by collecd
sub updateprocessesmemorygraph {
my @processesgraph = getprocesses();
my $period = $_[0];
my $count="0";
my @command = (
@GRAPH_ARGS,
"-",
"--start",
"-1".$period,
"-l 0",
"-r",
"-t ".$Lang::tr{'processes'}." ".$Lang::tr{'memory'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
"--color=BACK".$color{"color21"}
);
foreach(@processesgraph){
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
push(@command,"DEF:".$name[1]."=".$_."ps_rss.rrd:value:AVERAGE");
}
push(@command,"COMMENT:".$Lang::tr{'caption'}."\\j");
my $colorIndex = 0;
foreach(@processesgraph){
chomp($_);my @name=split(/\-/,$_);chop($name[1]);
my $colorIndex = 10 + $count % 15;
my $color="$color{\"color$colorIndex\"}";
if ($count eq "0"){
push(@command,"AREA:".$name[1].$color."A0:".$name[1]);
}else{
push(@command,"STACK:".$name[1].$color."A0:".$name[1]);
}
$count++;
}
RRDs::graph (@command);
$ERROR = RRDs::error;
return "Error in RRD::graph for processesmemory: ".$ERROR."\n" if $ERROR;
}
# Generate the Disk Graph for the current period of time for values given by collecd
sub updatediskgraph {
@@ -410,6 +500,7 @@ sub updatediskgraph {
"--start",
"-1".$period,
"-r",
"-t ".$disk." ".$Lang::tr{'disk access'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -453,6 +544,7 @@ sub updateifgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'traffic on'}." ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -489,6 +581,7 @@ sub updatevpngraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'traffic on'}." ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -525,6 +618,7 @@ sub updatevpnn2ngraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'traffic on'}." ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -589,6 +683,7 @@ sub updatefwhitsgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'firewall hits per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -667,6 +762,7 @@ sub updatefwhitsgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'firewall hits per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -753,6 +849,7 @@ sub updatepinggraph {
"-1".$period,
"-l 0",
"-r",
"-t ".$Lang::tr{'linkq'}." ".$host." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ms",
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -790,6 +887,7 @@ sub updatewirelessgraph {
"-",
"--start",
"-1".$period,
"-t Wireless ".$interface." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v dBm",
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -827,6 +925,7 @@ sub updatehddgraph {
"--start",
"-1".$period,
"-r",
"-t ".$disk." ".$Lang::tr{'harddisk temperature'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v Celsius",
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -860,6 +959,7 @@ sub updatehwtempgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'mbmon temp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v Celsius",
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -907,6 +1007,7 @@ sub updatehwfangraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'mbmon fan'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
"--color=BACK".$color{"color21"},
@@ -953,6 +1054,7 @@ sub updatehwvoltgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'mbmon volt'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
"--color=BACK".$color{"color21"},
@@ -1019,6 +1121,7 @@ sub updateqosgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'Utilization on'}." (".$qossettings{'DEV'}.") ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v ".$Lang::tr{'bytes per second'},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -1080,6 +1183,7 @@ sub updatecpufreqgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'cpu frequency per'}." ".$Lang::tr{$period."-graph"},
"-v MHz",
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -1119,6 +1223,7 @@ sub updatethermaltempgraph {
"--start",
"-1".$period,
"-r",
"-t ".$Lang::tr{'acpitemp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period."-graph"},
"-v Celsius",
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
@@ -1172,6 +1277,7 @@ sub updateconntrackgraph {
"-1" . $period,
"-r",
"--lower-limit","0",
"-t $Lang::tr{'connection tracking'}",
"-v $Lang::tr{'open connections'}",
"DEF:conntrack=$mainsettings{'RRDLOG'}/collectd/localhost/conntrack/conntrack.rrd:entropy:AVERAGE",
"LINE3:conntrack#ff0000:" . sprintf("%-15s", $Lang::tr{'open connections'}),
@@ -1189,90 +1295,3 @@ sub updateconntrackgraph {
return "Error in RRD::Graph for conntrack: " . $ERROR . "\n" if $ERROR;
}
sub updateipsthroughputgraph {
my $period = $_[0];
my @command = (
@GRAPH_ARGS,
"-",
"--start",
"-1" . $period,
"-r",
"--lower-limit","0",
"-v $Lang::tr{'bytes per second'}",
"--color=BACK" . $color{"color21"},
# Read bypassed packets
"DEF:bypassed_bytes=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_bytes-BYPASSED.rrd:value:AVERAGE",
#"DEF:bypassed_packets=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_packets-BYPASSED.rrd:value:AVERAGE",
"VDEF:bypassed_bytes_avg=bypassed_bytes,AVERAGE",
"VDEF:bypassed_bytes_min=bypassed_bytes,MINIMUM",
"VDEF:bypassed_bytes_max=bypassed_bytes,MAXIMUM",
# Read scanned packets
"DEF:scanned_bytes=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_bytes-SCANNED.rrd:value:AVERAGE",
#"DEF:scanned_packets=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_packets-SCANNED.rrd:value:AVERAGE",
"VDEF:scanned_bytes_avg=scanned_bytes,AVERAGE",
"VDEF:scanned_bytes_min=scanned_bytes,MINIMUM",
"VDEF:scanned_bytes_max=scanned_bytes,MAXIMUM",
# Read whitelisted packets
"DEF:whitelisted_bytes=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_bytes-WHITELISTED.rrd:value:AVERAGE",
#"DEF:whitelisted_packets=$mainsettings{'RRDLOG'}/collectd/localhost/iptables-mangle-IPS/ipt_packets-WHITELISTED.rrd:value:AVERAGE",
"VDEF:whitelisted_bytes_avg=whitelisted_bytes,AVERAGE",
"VDEF:whitelisted_bytes_min=whitelisted_bytes,MINIMUM",
"VDEF:whitelisted_bytes_max=whitelisted_bytes,MAXIMUM",
# Total
"CDEF:total_bytes=bypassed_bytes,scanned_bytes,ADDNAN,whitelisted_bytes,ADDNAN",
#"CDEF:total_packets=bypassed_packets,scanned_packets,ADDNAN,whitelisted_packets,ADDNAN",
"VDEF:total_bytes_avg=total_bytes,AVERAGE",
"VDEF:total_bytes_min=total_bytes,MINIMUM",
"VDEF:total_bytes_max=total_bytes,MAXIMUM",
# Add some space below the graph
"COMMENT: \\n",
# Headline
"COMMENT:" . sprintf("%32s", ""),
"COMMENT:" . sprintf("%16s", $Lang::tr{'average'}),
"COMMENT:" . sprintf("%16s", $Lang::tr{'minimum'}),
"COMMENT:" . sprintf("%16s", $Lang::tr{'maximum'}) . "\\j",
# Whitelisted Packets
"AREA:whitelisted_bytes$color{'color12'}A0:" . sprintf("%-30s", $Lang::tr{'whitelisted'}),
"GPRINT:whitelisted_bytes_avg:%9.2lf %sbps",
"GPRINT:whitelisted_bytes_min:%9.2lf %sbps",
"GPRINT:whitelisted_bytes_max:%9.2lf %sbps\\j",
# Bypassed Packets
"STACK:bypassed_bytes$color{'color11'}A0:" . sprintf("%-30s", $Lang::tr{'bypassed'}),
"GPRINT:bypassed_bytes_avg:%9.2lf %sbps",
"GPRINT:bypassed_bytes_min:%9.2lf %sbps",
"GPRINT:bypassed_bytes_max:%9.2lf %sbps\\j",
# Scanned Packets
"STACK:scanned_bytes$color{'color13'}A0:" . sprintf("%-30s", $Lang::tr{'scanned'}),
"GPRINT:scanned_bytes_avg:%9.2lf %sbps",
"GPRINT:scanned_bytes_min:%9.2lf %sbps",
"GPRINT:scanned_bytes_max:%9.2lf %sbps\\j",
"COMMENT: \\n",
# Total Packets
"COMMENT:" . sprintf("%-32s", $Lang::tr{'total'}),
"GPRINT:total_bytes_avg:%9.2lf %sbps",
"GPRINT:total_bytes_min:%9.2lf %sbps",
"GPRINT:total_bytes_max:%9.2lf %sbps\\j",
);
RRDs::graph(@command);
$ERROR = RRDs::error;
return "Error in RRD::Graph for suricata: " . $ERROR . "\n" if $ERROR;
}

View File

@@ -16,9 +16,7 @@ use File::Basename;
use HTML::Entities();
use Socket;
use Time::Local;
use Encode;
require "${General::swroot}/graphs.pl";
use Unicode::Normalize;
our %color = ();
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
@@ -38,9 +36,9 @@ $Header::colouryellow = '#FFFF00';
$Header::colourgreen = '#339933';
$Header::colourblue = '#333399';
$Header::colourovpn = '#339999';
$Header::colourwg = '#ff007f';
$Header::colourfw = '#000000';
$Header::colourvpn = '#990099';
$Header::colourwg = '#ff007f';
$Header::colourerr = '#FF0000';
$Header::viewsize = 150;
$Header::errormessage = '';
@@ -57,10 +55,10 @@ $Header::extraHead = <<END
}
.orange {
background-color: orange;
}
}
.red {
background-color: red;
}
}
.table1colour {
background-color: $Header::table1colour;
}
@@ -92,6 +90,8 @@ END
my %menuhash = ();
my $menu = \%menuhash;
%settings = ();
%ethsettings = ();
%pppsettings = ();
my @URI = split('\?', $ENV{'REQUEST_URI'});
### Make sure this is an SSL request
@@ -103,311 +103,51 @@ if ($ENV{'SERVER_ADDR'} && $ENV{'HTTPS'} ne 'on') {
### Initialize environment
&General::readhash("${swroot}/main/settings", \%settings);
&General::readhash("${swroot}/ethernet/settings", \%ethsettings);
&General::readhash("${swroot}/ppp/settings", \%pppsettings);
$hostname = $settings{'HOSTNAME'};
$hostnameintitle = 0;
### Initialize language
require "${swroot}/lang.pl";
$language = &Lang::FindWebLanguage($settings{"LANGUAGE"});
### Read English Files
if ( -d "/var/ipfire/langs/en/" ) {
opendir(DIR, "/var/ipfire/langs/en/");
@names = readdir(DIR) or die "Cannot Read Directory: $!\n";
foreach $name(@names) {
next if ($name eq ".");
next if ($name eq "..");
next if (!($name =~ /\.pl$/));
require "${swroot}/langs/en/${name}";
};
};
### Enable Language Files
if ( -d "/var/ipfire/langs/${language}/" ) {
opendir(DIR, "/var/ipfire/langs/${language}/");
@names = readdir(DIR) or die "Cannot Read Directory: $!\n";
foreach $name(@names) {
next if ($name eq ".");
next if ($name eq "..");
next if (!($name =~ /\.pl$/));
require "${swroot}/langs/${language}/${name}";
};
};
### Initialize user manual
my %manualpages = ();
&_read_manualpage_hash("${General::swroot}/main/manualpages");
###############################################################################
#
# print menu html elements for submenu entries
# @param submenu entries
sub showsubmenu() {
my $submenus = shift;
print "<ul>";
foreach my $item (sort keys %$submenus) {
$link = getlink($submenus->{$item});
next if (!is_menu_visible($link) or $link eq '');
my $subsubmenus = $submenus->{$item}->{'subMenu'};
if ($subsubmenus) {
print '<li class="has-sub ">';
} else {
print '<li>';
}
print '<a href="'.$link.'">'.$submenus->{$item}->{'caption'}.'</a>';
&showsubmenu($subsubmenus) if ($subsubmenus);
print '</li>';
}
print "</ul>"
}
###############################################################################
#
# print menu html elements
sub showmenu() {
print '<div id="cssmenu" class="bigbox fixed">';
if ($settings{'SPEED'} ne 'off') {
print <<EOF;
<div id='traffic'>
<strong>$Lang::tr{'traffic stat title'}:</strong>
$Lang::tr{'traffic stat in'} <span id='rx_kbs'>--.-- bit/s</span> &nbsp;
$Lang::tr{'traffic stat out'} <span id='tx_kbs'>--.-- bit/s</span>
</div>
EOF
}
print "<ul>";
foreach my $k1 ( sort keys %$menu ) {
$link = getlink($menu->{$k1});
next if (!is_menu_visible($link) or $link eq '');
print '<li class="has-sub "><a href="#"><span>'.$menu->{$k1}->{'caption'}.'</span></a>';
my $submenus = $menu->{$k1}->{'subMenu'};
&showsubmenu($submenus) if ($submenus);
print "</li>";
}
print "</ul></div>";
}
###############################################################################
#
# print page opening html layout
# @param page title
# @param boh
# @param extra html code for html head section
# @param suppress menu option, can be numeric 1 or nothing.
# menu will be suppressed if param is 1
sub openpage {
my $title = shift;
my $boh = shift;
my $extrahead = shift;
my $suppressMenu = shift // 0;
my $headline = "IPFire";
if (($settings{'WINDOWWITHHOSTNAME'} eq 'on') || ($settings{'WINDOWWITHHOSTNAME'} eq '')) {
$headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
}
print <<END;
<!DOCTYPE html>
<html lang="$Lang::language">
<head>
<title>$headline - $title</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="/favicon.ico" />
<script type="text/javascript" src="/include/jquery.js"></script>
<script src="/include/rrdimage.js?v=20240926"></script>
$extrahead
<script type="text/javascript">
function swapVisibility(id) {
\$('#' + id).toggle();
}
</script>
END
print "<link href=\"/themes/ipfire/include/css/style.css?v=20240806\" rel=\"stylesheet\" type=\"text/css\" />\n";
if ($settings{'SPEED'} ne 'off') {
print <<END
<script type="text/javascript" src="/themes/ipfire/include/js/refreshInetInfo.js"></script>
END
;
}
print <<END
</head>
<body>
<div id="header" class="fixed">
<div id="logo">
<h1>
<a href="https://www.ipfire.org">
IPFire_
</a>
END
;
if ($settings{'WINDOWWITHHOSTNAME'} ne 'off') {
print "&dash; $settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
}
print <<END
</h1>
</div>
</div>
END
;
unless($suppressMenu) {
&genmenu();
&showmenu();
}
print <<END
<div class="bigbox fixed">
<div id="main_inner" class="fixed">
<div id="main_header">
<h1>$title</h1>
END
;
# Print user manual link
my $manual_url = &get_manualpage_url();
if($manual_url) {
print <<END
<span><a href="$manual_url" title="$Lang::tr{'online help en'}" target="_blank"><img src="/images/help-browser.png" alt="$Lang::tr{'online help en'}"></a></span>
END
;
}
print <<END
</div>
END
;
}
###############################################################################
#
# print page closing html layout
sub closepage () {
open(FILE, "</etc/system-release");
my $system_release = <FILE>;
$system_release =~ s/core/$Lang::tr{'core update'} /;
close(FILE);
print <<END;
</div>
</div>
<div id="footer" class='bigbox fixed'>
<span class="pull-right">
<a href="https://www.ipfire.org/" target="_blank"><strong>IPFire.org</strong></a> &bull;
<a href="https://www.ipfire.org/donate" target="_blank">$Lang::tr{'support donation'}</a>
</span>
<strong>$system_release</strong>
</div>
</body>
</html>
END
;
}
###############################################################################
#
# print big box opening html layout
sub openbigbox {
}
###############################################################################
#
# print big box closing html layout
sub closebigbox {
}
# Sections
sub opensection($) {
my $title = shift;
# Open the section
print "<section class=\"section\">";
# Show the title if set
if ($title) {
print " <h2 class=\"title\">${title}</h2>\n";
}
}
sub closesection() {
print "</section>";
}
###############################################################################
#
# print box opening html layout
# @param page width
# @param page align
# @param page caption
sub openbox {
# The width parameter is ignored and should always be '100%'
my $width = shift;
my $align = shift;
my $title = shift;
my @classes = ("section", "is-box", @_);
print "<section class=\"@classes\">\n";
# Show the title
if ($title) {
print " <h2 class=\"title\">${title}</h2>\n";
}
}
###############################################################################
#
# print box closing html layout
sub closebox {
print "</section>";
}
sub errorbox($) {
my @errors = grep { $_ ne "" } @_;
# Do nothing if there are no errors
return unless (@errors);
# Open a new box
&openbox('100%', 'left', $Lang::tr{'oops something went wrong'}, "is-error");
# Print all error messages
print "<ul>\n";
foreach my $error (@errors) {
print "<li>$error</li>\n";
}
print "</ul>\n";
# Close the box again
&closebox();
}
sub warningbox($) {
my @warnings = grep { $_ ne "" } @_;
# Do nothing if there are no errors
return unless (@warnings);
# Open a new box
&openbox('100%', 'left', $Lang::tr{'warning'}, "is-warning");
# Print all warning messages
print "<ul>\n";
foreach my $warning (@warnings) {
print "<li>$warning</li>\n";
}
print "</ul>\n";
# Close the box again
&closebox();
}
sub graph($) {
my $title = shift;
# Open a new section with a title
&opensection($title);
&Graphs::makegraphbox(@_);
# Close the section
&closesection();
}
### Load selected language and theme functions
require "${swroot}/langs/en.pl";
require "${swroot}/langs/${language}.pl";
eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`;
sub green_used() {
if ($Network::ethernet{'GREEN_DEV'} && $Network::ethernet{'GREEN_DEV'} ne "") {
if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") {
return 1;
}
@@ -415,14 +155,21 @@ sub green_used() {
}
sub orange_used () {
if ($Network::ethernet{'CONFIG_TYPE'} =~ /^[24]$/) {
if ($ethsettings{'CONFIG_TYPE'} =~ /^[24]$/) {
return 1;
}
return 0;
}
sub blue_used () {
if ($Network::ethernet{'CONFIG_TYPE'} =~ /^[34]$/) {
if ($ethsettings{'CONFIG_TYPE'} =~ /^[34]$/) {
return 1;
}
return 0;
}
sub is_modem {
if ($ethsettings{'CONFIG_TYPE'} =~ /^[0]$/) {
return 1;
}
return 0;
@@ -452,13 +199,15 @@ sub genmenu {
my %sublogshash = ();
my $sublogs = \%sublogshash;
if ( -e "/var/ipfire/main/gpl_accepted") {
eval `/bin/cat /var/ipfire/menu.d/*.menu`;
eval `/bin/cat /var/ipfire/menu.d/*.main`;
if (! blue_used()) {
$menu->{'05.firewall'}{'subMenu'}->{'60.wireless'}{'enabled'} = 0;
}
if ( $Network::ethernet{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $Network::ethernet{'RED_TYPE'} eq 'STATIC' ) {
if ( $ethsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $ethsettings{'RED_TYPE'} eq 'STATIC' ) {
$menu->{'03.network'}{'subMenu'}->{'70.aliases'}{'enabled'} = 1;
}
@@ -466,7 +215,7 @@ sub genmenu {
$menu->{'01.system'}{'subMenu'}->{'21.wlan'}{'enabled'} = 1;
}
if ( $Network::ethernet{'RED_TYPE'} eq "PPPOE" && $Network::ppp{'MONPORT'} ne "" ) {
if ( $ethsettings{'RED_TYPE'} eq "PPPOE" && $pppsettings{'MONPORT'} ne "" ) {
$menu->{'02.status'}{'subMenu'}->{'74.modem-status'}{'enabled'} = 1;
}
@@ -482,26 +231,13 @@ sub genmenu {
$menu->{'03.network'}{'subMenu'}->{'80.macadressmenu'}{'enabled'} = 0;
$menu->{'03.network'}{'subMenu'}->{'90.wakeonlan'}{'enabled'} = 0;
}
}
}
sub showhttpheaders($) {
my $overwrites = shift;
my %headers = (
"Content-Type" => "text/html; charset=UTF-8",
"Cache-Control" => "private",
# Overwrite anything passed
%$overwrites,
);
# Print all headers
foreach my $header (keys %headers) {
print "$header: $headers{$header}\n";
}
# End headers
print "\n";
sub showhttpheaders
{
print "Cache-control: private\n";
print "Content-type: text/html; charset=UTF-8\n\n";
}
sub is_menu_visible($) {
@@ -628,25 +364,38 @@ sub escape($) {
return HTML::Entities::encode_entities($s);
}
sub normalize($) {
my $s = shift;
# Remove any special characters
$s = &Unicode::Normalize::NFKD($s);
# Remove any whitespace and replace with dash
$s =~ s/\s+/\-/g;
return $s;
}
sub cleanhtml {
my $outstring =$_[0];
$outstring =~ tr/,/ / if not defined $_[1] or $_[1] ne 'y';
# decode the UTF-8 text so that characters with diacritical marks such as
# umlauts are treated correctly by the escape command
$outstring = &Encode::decode("UTF-8",$outstring);
escape($outstring);
# encode the text back to UTF-8 after running the escape command
$outstring = &Encode::encode("UTF-8",$outstring);
return $outstring;
return escape($outstring);
}
sub connectionstatus
{
my %pppsettings = ();
my %netsettings = ();
my $iface='';
$pppsettings{'PROFILENAME'} = 'None';
&General::readhash("${General::swroot}/ppp/settings", \%pppsettings);
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
my $profileused='';
unless ($Network::ethernet{'RED_TYPE'} =~ /^(DHCP|STATIC)$/) {
$profileused="- $Network::ppp{'PROFILENAME'}";
unless ( $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) {
$profileused="- $pppsettings{'PROFILENAME'}";
}
my ($timestr, $connstate);
@@ -657,13 +406,15 @@ sub connectionstatus
$timestr = &General::age("${General::swroot}/red/active");
$connstate = "<span>$Lang::tr{'connected'} - (<span>$timestr</span>) $profileused</span>";
} else {
if (open(KEEPCONNECTED, "</var/ipfire/red/keepconnected") == false) {
if ((open(KEEPCONNECTED, "</var/ipfire/red/keepconnected") == false) && ($pppsettings{'RECONNECTION'} eq "persistent")) {
$connstate = "<span>$Lang::tr{'connection closed'} $profileused</span>";
} elsif (($pppsettings{'RECONNECTION'} eq "dialondemand") && ( -e "${General::swroot}/red/dial-on-demand")) {
$connstate = "<span>$Lang::tr{'dod waiting'} $profileused</span>";
} else {
$connstate = "<span>$Lang::tr{'connecting'} $profileused</span>" if (system("ps -ef | grep -q '[p]ppd'"));
}
}
return $connstate;
}
@@ -717,16 +468,12 @@ END
$hostname = "";
}
if ($line =~ /^\s*ends \d (\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+)/) {
if ($line =~ /^\s*ends/) {
$line =~ /(\d+)\/(\d+)\/(\d+) (\d+):(\d+):(\d+)/;
$endtime = timegm($6, $5, $4, $3, $2 - 1, $1 - 1900);
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $dst) = localtime($endtime);
$endtime_print = sprintf ("%02d/%02d/%d %02d:%02d:%02d",$mday,$mon+1,$year+1900,$hour,$min,$sec);
$expired = $endtime < time();
} elsif ($line =~ /^\s*ends never/) {
$endtime = 0;
$endtime_print = $Lang::tr{'never'};
$expired = 0;
}
if ($line =~ /^\s*hardware ethernet/) {
@@ -757,7 +504,7 @@ END
if($hostname_print eq "") { #print blank space if no hostname is found
$hostname_print = "&nbsp;&nbsp;&nbsp;";
}
# separate active and expired leases with a horizontal line
if(($entries{$key}->{expired}) && ($divider_printed == 0)) {
$divider_printed = 1;
@@ -768,14 +515,14 @@ END
}
$id++;
}
print "<form method='post' action='/cgi-bin/dhcp.cgi'><tr>\n";
if ($id % 2) {
$col="bgcolor='$table1colour'";
} else {
$col="bgcolor='$table2colour'";
}
if($entries{$key}->{expired}) {
print <<END
<td align='center' $col><input type='hidden' name='FIX_ADDR' value='$entries{$key}->{IPADDR}' /><strike><i>$entries{$key}->{IPADDR}</i></strike></td>
@@ -856,13 +603,13 @@ sub colorize {
return "<font color='".${Header::colourovpn}."'>".$string."</font>";
} elsif ( $string =~ "lo" or $string =~ "127.0.0.0" ){
return "<font color='".${Header::colourfw}."'>".$string."</font>";
} elsif ( $string =~ $Network::ethernet{'GREEN_DEV'} or &General::IpInSubnet($string2,$Network::ethernet{'GREEN_NETADDRESS'},$Network::ethernet{'GREEN_NETMASK'}) ){
} elsif ( $string =~ $ethsettings{'GREEN_DEV'} or &General::IpInSubnet($string2,$ethsettings{'GREEN_NETADDRESS'},$ethsettings{'GREEN_NETMASK'}) ){
return "<font color='".${Header::colourgreen}."'>".$string."</font>";
} elsif ( $string =~ "ppp0" or $string =~ $Network::ethernet{'RED_DEV'} or $string =~ "0.0.0.0" or $string =~ $Network::ethernet{'RED_ADDRESS'} ){
} elsif ( $string =~ "ppp0" or $string =~ $ethsettings{'RED_DEV'} or $string =~ "0.0.0.0" or $string =~ $ethsettings{'RED_ADDRESS'} ){
return "<font color='".${Header::colourred}."'>".$string."</font>";
} elsif ( $Network::ethernet{'CONFIG_TYPE'}>1 and ( $string =~ $Network::ethernet{'BLUE_DEV'} or &General::IpInSubnet($string2,$Network::ethernet{'BLUE_NETADDRESS'},$Network::ethernet{'BLUE_NETMASK'}) )){
} elsif ( $ethsettings{'CONFIG_TYPE'}>1 and ( $string =~ $ethsettings{'BLUE_DEV'} or &General::IpInSubnet($string2,$ethsettings{'BLUE_NETADDRESS'},$ethsettings{'BLUE_NETMASK'}) )){
return "<font color='".${Header::colourblue}."'>".$string."</font>";
} elsif ( $Network::ethernet{'CONFIG_TYPE'}>2 and ( $string =~ $Network::ethernet{'ORANGE_DEV'} or &General::IpInSubnet($string2,$Network::ethernet{'ORANGE_NETADDRESS'},$Network::ethernet{'ORANGE_NETMASK'}) )){
} elsif ( $ethsettings{'CONFIG_TYPE'}>2 and ( $string =~ $ethsettings{'ORANGE_DEV'} or &General::IpInSubnet($string2,$ethsettings{'ORANGE_NETADDRESS'},$ethsettings{'ORANGE_NETMASK'}) )){
return "<font color='".${Header::colourorange}."'>".$string."</font>";
} else {
return $string;
@@ -908,92 +655,4 @@ sub _read_manualpage_hash() {
close($file);
}
sub ServiceStatus() {
my $services = shift;
my %services = %{ $services };
# Write the table header
print <<EOF;
<table class="tbl">
<!-- <thead>
<tr>
<th>
$Lang::tr{'service'}
</th>
<th>
$Lang::tr{'status'}
</th>
<th>
$Lang::tr{'memory'}
</th>
</tr>
</thead> -->
<tbody>
EOF
foreach my $service (sort keys %services) {
my %config = %{ $services{$service} };
my $pidfile = $config{"pidfile"};
my $process = $config{"process"};
# Collect all pids
my @pids = ();
# Read the PID file or go search...
if (defined $pidfile) {
@pids = &General::read_pids("${pidfile}");
} else {
@pids = &General::find_pids("${process}");
}
print <<EOF;
<tr>
<th scope="row">
$service
</th>
EOF
# Running?
if (scalar @pids) {
# Get memory consumption
my $mem = &General::get_memory_consumption(@pids);
# Format memory
$mem = &General::formatBytes($mem);
print <<EOF;
<td class="status is-running">
$Lang::tr{'running'}
</td>
<td class="text-right">
${mem}
</td>
EOF
# Not Running
} else {
print <<EOF;
<td class="status is-stopped" colspan="2">
$Lang::tr{'stopped'}
</td>
EOF
}
print <<EOF;
</tr>
EOF
}
print <<EOF;
</tbody>
</table>
EOF
}
1; # End of package "Header"

View File

@@ -30,7 +30,7 @@ require "${General::swroot}/network-functions.pl";
require "${General::swroot}/suricata/ruleset-sources";
# Load perl module to deal with Archives.
use Archive::Peek::Libarchive;
use Archive::Tar;
# Load perl module to deal with files and path.
use File::Basename;
@@ -152,9 +152,6 @@ my @http_ports = ('80', '81');
# Array which contains a list of rulefiles which always will be included if they exist.
my @static_included_rulefiles = ('local.rules', 'whitelist.rules');
# Log App Layer Events? (Useful for debugging only)
my $LOG_APP_LAYER_EVENTS = 0;
# Array which contains a list of allways enabled application layer protocols.
my @static_enabled_app_layer_protos = ('app-layer', 'decoder', 'files', 'stream');
@@ -518,6 +515,9 @@ sub downloadruleset ($) {
sub extractruleset ($) {
my ($provider) = @_;
# Disable chown functionality when uncompressing files.
$Archive::Tar::CHOWN = "0";
# Get full path and downloaded rulesfile for the given provider.
my $tarball = &_get_dl_rulesfile($provider);
@@ -547,11 +547,13 @@ sub extractruleset ($) {
} elsif ( $type eq "archive") {
# Initialize the tar module.
my $tar = Archive::Peek::Libarchive->new(filename => $tarball);
my $tar = Archive::Tar->new($tarball);
# Loop through the archive
$tar->iterate( sub {
my ($packed_file, $content) = @_;
# Get the filelist inside the tarball.
my @packed_files = $tar->list_files;
# Loop through the filelist.
foreach my $packed_file (@packed_files) {
my $destination;
# Splitt the packed file into chunks.
@@ -570,13 +572,13 @@ sub extractruleset ($) {
# Handle rules files.
} elsif ($file =~ m/\.rules$/) {
# Skip rule files which are not located in the rules directory or archive root.
return unless(($packed_file =~ /^rules\//) || ($packed_file =~ /^$provider-rules\//) || ($packed_file !~ /\//));
next unless(($packed_file =~ /^rules\//) || ($packed_file =~ /^$provider-rules\//) || ($packed_file !~ /\//));
# Skip deleted.rules.
#
# Mostly they have been taken out for correctness or performance reasons and therfore
# it is not a great idea to enable any of them.
return if($file =~ m/deleted.rules$/);
next if($file =~ m/deleted.rules$/);
my $rulesfilename;
@@ -613,24 +615,39 @@ sub extractruleset ($) {
$destination = "$tmp_rules_directory/$rulesfilename";
} else {
# Skip all other files.
return;
next;
}
# Check if the destination file exists.
unless(-e "$destination") {
# Open filehandle to write the content to a new file.
open(FILE, ">", "$destination") or die "Could not open $destination. $!\n";
# Extract the file to the temporary directory.
$tar->extract_file("$packed_file", "$destination");
} else {
# Open filehandle to append the content to the existing file.
open(FILE, ">>", "$destination") or die "Could not open $destination. $!\n";
# Generate temporary file name, located in the temporary rules directory and a suffix of ".tmp".
my $tmp = File::Temp->new( SUFFIX => ".tmp", DIR => "$tmp_rules_directory", UNLINK => 0 );
my $tmpfile = $tmp->filename();
# Extract the file to the new temporary file name.
$tar->extract_file("$packed_file", "$tmpfile");
# Open the the existing file.
open(DESTFILE, ">>", "$destination") or die "Could not open $destination. $!\n";
open(TMPFILE, "<", "$tmpfile") or die "Could not open $tmpfile. $!\n";
# Loop through the content of the temporary file.
while (<TMPFILE>) {
# Append the content line by line to the destination file.
print DESTFILE "$_";
}
# Close the file handles.
close(TMPFILE);
close(DESTFILE);
# Remove the temporary file.
unlink("$tmpfile");
}
# Write the extracted file content to the filehandle.
print FILE "$content" if ($content);
# Close the file handle.
close(FILE);
});
}
}
}
@@ -1010,14 +1027,11 @@ sub _store_error_message ($) {
sub _get_dl_rulesfile($) {
my ($provider) = @_;
# Abort if the requested provider is not known.
return unless($IDS::Ruleset::Providers{$provider});
# Check if the requested provider is known.
if ($IDS::Ruleset::Providers{$provider}) {
# Gather the download type for the given provider.
my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'};
# Try to gather the download type for the given provider.
my $dl_type = $IDS::Ruleset::Providers{$provider}{'dl_type'};
# Check if a download type could be grabbed.
if ($dl_type) {
# Obtain the file suffix for the download file type.
my $suffix = $dl_type_to_suffix{$dl_type};
@@ -1440,33 +1454,31 @@ sub write_used_rulefiles_file (@) {
}
}
if ($LOG_APP_LAYER_EVENTS) {
print FILE "\n#Default rules for used application layer protocols.\n";
foreach my $enabled_app_layer_proto (@enabled_app_layer_protos) {
# Check if the current processed app layer proto needs to be translated
# into an application name.
if (exists($tr_app_layer_proto{$enabled_app_layer_proto})) {
# Obtain the translated application name for this protocol.
$enabled_app_layer_proto = $tr_app_layer_proto{$enabled_app_layer_proto};
}
print FILE "\n#Default rules for used application layer protocols.\n";
foreach my $enabled_app_layer_proto (@enabled_app_layer_protos) {
# Check if the current processed app layer proto needs to be translated
# into an application name.
if (exists($tr_app_layer_proto{$enabled_app_layer_proto})) {
# Obtain the translated application name for this protocol.
$enabled_app_layer_proto = $tr_app_layer_proto{$enabled_app_layer_proto};
}
# Generate filename.
my $rulesfile = "$default_rulespath/$enabled_app_layer_proto\.rules";
# Generate filename.
my $rulesfile = "$default_rulespath/$enabled_app_layer_proto\.rules";
# Check if such a file exists.
if (-f "$rulesfile") {
# Write the rulesfile name to the file.
print FILE " - $rulesfile\n";
}
# Check if such a file exists.
if (-f "$rulesfile") {
# Write the rulesfile name to the file.
print FILE " - $rulesfile\n";
}
# Generate filename with "events" in filename.
$rulesfile = "$default_rulespath/$enabled_app_layer_proto\-events.rules";
# Generate filename with "events" in filename.
$rulesfile = "$default_rulespath/$enabled_app_layer_proto\-events.rules";
# Check if this file exists.
if (-f "$rulesfile" ) {
# Write the rulesfile name to the file.
print FILE " - $rulesfile\n";
}
# Check if this file exists.
if (-f "$rulesfile" ) {
# Write the rulesfile name to the file.
print FILE " - $rulesfile\n";
}
}

View File

@@ -9,7 +9,7 @@
#
package Lang;
require '/var/ipfire/general-functions.pl';
require 'CONFIG_ROOT/general-functions.pl';
use strict;
### A cache file to avoid long recalculation
@@ -25,7 +25,7 @@ $Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
# The file content has to start with (of course without the leading #):
# --------- CODE ---------
#%tr = (%tr,
# 'key1' => 'value', # add all your entries key/values here
# 'key1' => 'value', # add all your entries key/values here
# 'key2' => 'value' # and end with (of course without the leading #):
#);
# --------- CODE END---------
@@ -37,14 +37,13 @@ $Lang::CacheLang = '/var/ipfire/langs/cache-lang.pl';
### Initialize language
%Lang::tr = ();
my %settings = ();
&General::readhash("${General::swroot}/main/settings", \%settings);
# Load the selected language
reload($settings{'LANGUAGE'});
our $language = $settings{'LANGUAGE'};
# language variable used by makegraphs script
our $language;
$language = $settings{'LANGUAGE'};
#
# Load requested language file from cachefile. If cachefile doesn't exist, build on the fly.
@@ -55,32 +54,35 @@ sub reload {
%Lang::tr = (); # start with a clean array
# Use CacheLang if present & not empty.
if (-s "$Lang::CacheLang.$LG" ) {
do "$Lang::CacheLang.$LG";
return;
}
# Use CacheLang if present & not empty.
if (-s "$Lang::CacheLang.$LG" ) {
##fix: need to put a lock_shared on it in case rebuild is active ?
do "$Lang::CacheLang.$LG";
#&General::log ("cachelang file used [$LG]");
return;
}
#&General::log("Building on the fly cachelang file for [$LG]");
do "${General::swroot}/langs/en.pl";
do "${General::swroot}/langs/$LG.pl" if ($LG ne 'en');
do "${General::swroot}/langs/en.pl";
do "${General::swroot}/langs/$LG.pl" if ($LG ne 'en');
my $AddonDir = ${General::swroot}.'/addon-lang';
my $AddonDir = ${General::swroot}.'/addon-lang';
opendir (DIR, $AddonDir);
my @files = readdir (DIR);
closedir (DIR);
opendir (DIR, $AddonDir);
my @files = readdir (DIR);
closedir (DIR);
# default is to load english first
foreach my $file ( grep (/.*\.en.pl$/,@files)) {
do "$AddonDir/$file";
}
foreach my $file ( grep (/.*\.en.pl$/,@files)) {
do "$AddonDir/$file";
}
# read again, overwriting 'en' with choosed lang
if ($LG ne 'en') {
foreach my $file (grep (/.*\.$LG\.pl$/,@files)) {
do "$AddonDir/$file";
}
# read again, overwriting 'en' with choosed lang
if ($LG ne 'en') {
foreach my $file (grep (/.*\.$LG\.pl$/,@files) ) {
do "$AddonDir/$file";
}
}
}
#
@@ -91,7 +93,7 @@ sub reload {
sub BuildUniqueCacheLang {
my ($LG) = @_;
# Make CacheLang empty so that it won't be used by Lang::reload
open (FILE, ">$Lang::CacheLang.$LG") or return 1;
flock (FILE, 2) or return 1;
@@ -99,7 +101,7 @@ sub BuildUniqueCacheLang {
# Load languages files
&Lang::reload ($LG);
# Write the unique %tr=('key'=>'value') array
open (FILE, ">$Lang::CacheLang.$LG") or return 1;
flock (FILE, 2) or return 1;
@@ -110,7 +112,7 @@ sub BuildUniqueCacheLang {
}
print FILE ');';
close (FILE);
# Make nobody:nobody file's owner
# Will work when called by root/rc.sysinit
chown (0,0,"$Lang::CacheLang.$LG");
@@ -124,7 +126,7 @@ sub BuildUniqueCacheLang {
sub BuildCacheLang {
my $AddonDir = ${General::swroot}.'/addon-lang';
# Correct permission in case addon-installer did not do it
opendir (DIR, $AddonDir);
my @files = readdir (DIR);
@@ -138,7 +140,7 @@ sub BuildCacheLang {
my $selected = '';;
my $missed = '';
my $error = 0;
open (LANGS, "${General::swroot}/langs/list");
while (<LANGS>) {
($selected) = split (':');
@@ -151,7 +153,7 @@ sub BuildCacheLang {
if ($missed) { # collision with current cache lang being used ?
$error = &BuildUniqueCacheLang ($missed);
}
&General::log ("WARNING: cannot build cachelang file for [$missed].") if ($error);
return $error;
}

View File

@@ -2,7 +2,7 @@
# The CGI files are referenced relative to the "/cgi-bin/" path
# Fixed base URL (without trailing slash)
BASE_URL=https://www.ipfire.org/docs
BASE_URL=https://wiki.ipfire.org
# System menu
index.cgi=configuration/system/startpage
@@ -70,6 +70,7 @@ iptables.cgi=configuration/firewall/iptables
pakfire.cgi=configuration/ipfire/pakfire
wlanap.cgi=addons/wireless
tor.cgi=addons/tor
mpfire.cgi=addons/mpfire
samba.cgi=addons/samba
# Logs menu

View File

@@ -28,12 +28,9 @@ require "/var/ipfire/general-functions.pl";
use experimental 'smartmatch';
use Socket;
our %ethernet = ();
our %ppp = ();
# Read configuration files
&General::readhash("${General::swroot}/ethernet/settings", \%ethernet);
&General::readhash("${General::swroot}/ppp/settings", \%ppp);
# System ethernet configuration
our %ethernet_settings = ();
&General::readhash("${General::swroot}/ethernet/settings", \%ethernet_settings);
# List of all possible network zones that can be configured
our @known_network_zones = ("red", "green", "orange", "blue");
@@ -295,40 +292,52 @@ sub get_broadcast($) {
}
sub get_prefix($) {
my $network = shift;
my $network = shift;
# Convert to binary
my ($network_bin, $netmask_bin) = &network2bin($network);
# Convert to binary
my ($network_bin, $netmask_bin) = &network2bin($network);
if (defined $netmask_bin) {
my $prefix = 0;
if (defined $netmask_bin) {
my $prefix = 0;
while (1) {
# End the loop if we have consumed all ones
last if ($netmask_bin == 0);
while (1) {
# End the loop if we have consumed all ones
last if ($netmask_bin == 0);
# Increment prefix
$prefix++;
# Increment prefix
$prefix++;
# Remove the most-significant one
$netmask_bin <<= 1;
$netmask_bin &= 0xffffffff;
}
# Remove the most-significant one
$netmask_bin <<= 1;
$netmask_bin &= 0xffffffff;
}
return $prefix;
}
return $prefix;
}
return undef;
return undef;
}
sub get_netmask($) {
my $network = shift;
# Fetch the prefix
my $prefix = &get_prefix($network);
# Convert to netmask
return &convert_prefix2netmask($prefix);
}
sub normalize_network($) {
my $network = shift;
my $address = &get_netaddress($network);
my $prefix = &get_prefix($network);
# Fetch the prefix
my $prefix = &get_prefix($network);
unless (defined $address && defined $prefix) {
return undef;
}
# Convert to netmask
return &convert_prefix2netmask($prefix);
return "${address}/${prefix}";
}
# Returns True if $address is in $network.
@@ -438,7 +447,7 @@ sub _get_wireless_status($) {
my $intf = shift;
if (!$wireless_status{$intf}) {
$wireless_status{$intf} = join("\n", &General::system_output("iw", "dev", "$intf", "link"));
$wireless_status{$intf} = join('\n', &General::system_output("iwconfig", "$intf"));
}
return $wireless_status{$intf};
@@ -447,7 +456,7 @@ sub _get_wireless_status($) {
sub wifi_get_essid($) {
my $status = &_get_wireless_status(shift);
my ($essid) = $status =~ /^\s+SSID: (.*)$/m;
my ($essid) = $status =~ /ESSID:\"(.*)\"/;
return $essid;
}
@@ -455,15 +464,15 @@ sub wifi_get_essid($) {
sub wifi_get_frequency($) {
my $status = &_get_wireless_status(shift);
my ($frequency) = $status =~ /^\s+freq: (\d+\.\d+)/m;
my ($frequency) = $status =~ /Frequency:(\d+\.\d+ GHz)/;
return $frequency / 1000 . " GHz";
return $frequency;
}
sub wifi_get_access_point($) {
my $status = &_get_wireless_status(shift);
my ($access_point) = $status =~ /^Connected to ([0-9a-f:]+)/;
my ($access_point) = $status =~ /Access Point: ([0-9A-F:]+)/;
return $access_point;
}
@@ -471,15 +480,27 @@ sub wifi_get_access_point($) {
sub wifi_get_bit_rate($) {
my $status = &_get_wireless_status(shift);
my ($bit_rate) = $status =~ /^\s+rx bitrate: (\d+(?:\.\d+) MBit\/s)/m;
my ($bit_rate) = $status =~ /Bit Rate=(\d+ [GM]b\/s)/;
return $bit_rate;
}
sub wifi_get_link_quality($) {
my $status = &_get_wireless_status(shift);
my ($cur, $max) = $status =~ /Link Quality=(\d+)\/(\d+)/;
if($max > 0) {
return sprintf('%.0f', ($cur * 100) / $max);
}
return 0;
}
sub wifi_get_signal_level($) {
my $status = &_get_wireless_status(shift);
my ($signal_level) = $status =~ /^\s+signal: (\-\d+ dBm)/m;
my ($signal_level) = $status =~ /Signal level=(\-\d+ dBm)/;
return $signal_level;
}
@@ -584,7 +605,7 @@ sub get_intf_by_address($) {
#
sub get_available_network_zones () {
# Obtain the configuration type from the netsettings hash.
my $config_type = $ethernet{'CONFIG_TYPE'};
my $config_type = $ethernet_settings{'CONFIG_TYPE'};
# Hash which contains the conversation from the config mode
# to the existing network interface names. They are stored like
@@ -616,10 +637,10 @@ sub get_available_network_zones () {
#
sub is_zone_available() {
my $zone = lc shift;
# Make sure the zone is valid
die("Unknown network zone '$zone'") unless ($zone ~~ @known_network_zones);
# Get available zones and return result
my @available_zones = get_available_network_zones();
return ($zone ~~ @available_zones);
@@ -630,8 +651,8 @@ sub is_zone_available() {
#
sub is_red_mode_ip() {
# Obtain the settings from the netsettings hash
my $config_type = $ethernet{'CONFIG_TYPE'};
my $red_type = $ethernet{'RED_TYPE'};
my $config_type = $ethernet_settings{'CONFIG_TYPE'};
my $red_type = $ethernet_settings{'RED_TYPE'};
# RED must be a network device (configuration 1-4) with dynamic or static IP
return (($config_type ~~ [1..4]) && ($red_type ~~ ["DHCP", "STATIC"]));
@@ -692,7 +713,7 @@ sub testsuite() {
assert('find_next_ip_address("1.2.3.4", 2)', $result eq "1.2.3.6");
$result = &network_equal("192.168.0.0/24", "192.168.0.0/255.255.255.0");
assert('network_equal("192.168.0.0/24", "192.168.0.0/255.255.255.0")', !$result);
assert('network_equal("192.168.0.0/24", "192.168.0.0/255.255.255.0")', $result);
$result = &network_equal("192.168.0.0/24", "192.168.0.0/25");
assert('network_equal("192.168.0.0/24", "192.168.0.0/25")', !$result);
@@ -718,13 +739,6 @@ sub testsuite() {
$result = &ip_address_in_range("192.168.30.21", "192.168.30.10", "192.168.30.20");
assert('ip_address_in_range("192.168.30.21", "192.168.30.10", "192.168.30.20")', !$result);
# Check &get_prefix()
$result = &get_prefix("192.168.0.0/24");
assert('get_prefix("192.168.0.0/24")', $result != 24);
$result = &get_prefix("192.168.0.0/255.255.0.0");
assert('get_prefix("192.168.0.0/255.255.0.0")', $result != 16);
print "Testsuite completed successfully!\n";
return 0;

View File

@@ -1,25 +0,0 @@
FWBRIDGEMODE=off
FWBRIDGEIP=0.0.0.0
FWBRIDGEMASK=0.0.0.0
BRIDGENETFILTER=off
DROPNEWNOTSYN=on
DROPINPUT=on
DROPFORWARD=on
FWPOLICY=DROP
FWPOLICY1=DROP
FWPOLICY2=DROP
DROPPORTSCAN=on
DROPOUTGOING=on
DROPSAMBA=off
DROPPROXY=off
SHOWREMARK=on
SHOWCOLORS=on
SHOWTABLES=off
SHOWDROPDOWN=off
DROPWIRELESSINPUT=on
DROPWIRELESSFORWARD=on
DROPSPOOFEDMARTIAN=on
DROPHOSTILE=on
LOGDROPHOSTILEIN=on
LOGDROPHOSTILEOUT=on
LOGDROPCTINVALID=on

View File

@@ -1,9 +0,0 @@
22=off
ENABLE_TCP_DDOS=off
25=off
80=off
53=off
8080=off
8090=off
443=off
5555=off

View File

@@ -0,0 +1,5 @@
53=off
ENABLE_UDP_DDOS=off
5060=off
5061=off
10408=off

5
config/cfgroot/udp_ports Normal file
View File

@@ -0,0 +1,5 @@
domain 53/udp # Domain Name Server
game1 10408/udp # Domain Name Server
sip 5060/udp # Voice over Internet
siptls 5061/udp # Voice over Internet TLS

View File

@@ -52,6 +52,11 @@ if (-e "/var/ipfire/wireguard/peers") {
"CLIENT_DNS" => $Network::ethernet{'GREEN_ADDRESS'},
});
# Returns true if WireGuard is enabled
sub is_enabled() {
return ($settings{'ENABLED'} eq "on");
}
# Returns the local endpoint
sub get_endpoint() {
my $endpoint = $settings{'ENDPOINT'};
@@ -339,6 +344,9 @@ sub free_pool_addresses($$) {
my @used_addresses = ();
my @free_addresses = ();
# wg0 IP is reserved so put in @used_addresses
push(@used_addresses, &Network::ip2bin($settings{'ADDRESS'}));
# Collect all used addresses
foreach my $key (keys %peers) {
my $peer = &load_peer($key);
@@ -483,6 +491,9 @@ sub parse_configuration($$) {
# Remove line breaks
chomp;
# Remove any carriage returns
$_ =~ s/\r$//;
# Search for section headers
if ($_ =~ m/^\[(\w+)\]$/) {
$section = $1;
@@ -565,6 +576,9 @@ sub parse_configuration($$) {
# Check if all networks are valid
foreach my $network (@networks) {
# Skip any IPv6 networks
next if ($network =~ m/:/);
unless (&Network::check_subnet($network)) {
push(@errormessages, $Lang::tr{'invalid network'} . " $network");
}

View File

@@ -0,0 +1 @@
ENABLE_DNSBLOCK=on

View File

@@ -0,0 +1 @@
ENABLE_SNIBLOCK=on

View File

@@ -1 +0,0 @@
ENABLE_XDPTAILCALL=on

View File

@@ -22,6 +22,7 @@ LoadPlugin load
#LoadPlugin logfile
LoadPlugin memory
LoadPlugin ping
LoadPlugin processes
LoadPlugin rrdtool
LoadPlugin sensors
LoadPlugin swap
@@ -52,11 +53,6 @@ include "/etc/collectd.precache"
Chain filter SPOOFED_MARTIAN DROP_SPOOFED_MARTIAN
Chain filter HOSTILE_DROP_IN DROP_HOSTILE
Chain filter HOSTILE_DROP_OUT DROP_HOSTILE
# IPS
Chain mangle IPS BYPASSED
Chain mangle IPS SCANNED
Chain mangle IPS WHITELISTED
</Plugin>
#<Plugin logfile>
@@ -70,6 +66,18 @@ include "/etc/collectd.precache"
timeout 10
</Plugin>
<Plugin processes>
Process "sshd"
Process "smbd"
Process "nmbd"
Process "squid"
Process "squidguard"
Process "charon"
Process "openvpn"
Process "qemu"
Process "mpd"
</Plugin>
<Plugin rrdtool>
DataDir "/var/log/rrd/collectd"
</Plugin>
@@ -79,5 +87,5 @@ include "/etc/collectd.precache"
</Plugin>
#include "/etc/collectd.thermal"
include "/etc/collectd.custom"
include "/etc/collectd.vpn"
include "/etc/collectd.d/*"

View File

@@ -0,0 +1 @@
# Use this file to add custom configs and rules for collectd

View File

@@ -37,6 +37,11 @@ option host_name
# Most distributions have NTP support.
option ntp_servers
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A ServerID is required by RFC2131.
require dhcp_server_identifier

View File

@@ -35,9 +35,6 @@ net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.all.accept_redirects = 0
net.ipv6.conf.default.accept_redirects = 0
# Do not try to pick up existing TCP connections in conntrack
net.netfilter.nf_conntrack_tcp_loose = 0
# Enable netfilter accounting
net.netfilter.nf_conntrack_acct = 1
@@ -114,6 +111,3 @@ kernel.perf_event_paranoid = 3
# Only processes with CAP_SYS_PTRACE may use ptrace
kernel.yama.ptrace_scope = 2
# Disable unprivileged calls to bpf() without option to enable during runtime
kernel.unprivileged_bpf_disabled = 1

View File

@@ -1,6 +1,6 @@
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
kern.* -/var/log/kern.log
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!

View File

@@ -240,7 +240,7 @@ sub get_std_net_ip
}elsif($val eq 'RED'){
return "0.0.0.0/0";
}elsif($val eq 'WGRW'){
return $Wireguard::settings{'CLIENT_POOL'};
return $Wireguard::settings{'CLIENT_POOL'};
}elsif($val =~ /OpenVPN/i){
return "$ovpnsettings{'DOVPN_SUBNET'}";
}elsif($val =~ /IPsec/i){
@@ -261,12 +261,10 @@ sub get_interface
if($net eq "$netsettings{'BLUE_NETADDRESS'}/$netsettings{'BLUE_NETMASK'}"){
return "$netsettings{'BLUE_DEV'}";
}
# Wireguard
if ($net eq $Wireguard::settings{'CLIENT_POOL'}) {
return "wg0";
}
# Wireguard
if ($net eq $Wireguard::settings{'CLIENT_POOL'}) {
return "wg0";
}
if($net eq "0.0.0.0/0") {
return &get_external_interface();
}
@@ -393,24 +391,24 @@ sub get_address
push(@ret, [$host_address, ""]);
}
# WireGuard Peers
} elsif ($key eq 'wg_peer' || $key eq 'wg_peer_src' || $key eq 'wg_peer_tgt') {
my $peer = &Wireguard::get_peer_by_name($value);
if (defined $peer) {
my $remotes;
# WireGuard Peers
} elsif ($key eq 'wg_peer' || $key eq 'wg_peer_src' || $key eq 'wg_peer_tgt') {
my $peer = &Wireguard::get_peer_by_name($value);
if (defined $peer) {
my $remotes;
# Select the remote IP addresses
if ($peer->{'TYPE'} eq 'host') {
$remotes = $peer->{'CLIENT_ADDRESS'};
} elsif ($peer->{'TYPE'} eq 'net') {
$remotes = $peer->{'REMOTE_SUBNETS'};
}
# Select the remote IP addresses
if ($peer->{'TYPE'} eq 'host') {
$remotes = $peer->{'CLIENT_ADDRESS'};
} elsif ($peer->{'TYPE'} eq 'net') {
$remotes = $peer->{'REMOTE_SUBNETS'};
}
# Add all remotes
foreach my $remote (@$remotes) {
push(@ret, [$remote, $peer->{'INTERFACE'}]);
}
}
# Add all remotes
foreach my $remote (@$remotes) {
push(@ret, [$remote, $peer->{'INTERFACE'}]);
}
}
# OpenVPN networks.
} elsif ($key ~~ ["ovpn_net_src", "ovpn_net_tgt", "OpenVPN static network"]) {

View File

@@ -54,6 +54,7 @@ esac
HAVE_IPSEC="true"
HAVE_OPENVPN="true"
HAVE_WG="true"
# INPUT
@@ -97,6 +98,14 @@ case "${HAVE_OPENVPN},${POLICY}" in
;;
esac
# WireGuard INPUT
case "${HAVE_WG},${POLICY}" in
true,MODE1) ;;
true,*)
iptables -A POLICYIN -i wg+ -j ACCEPT
;;
esac
case "${FWPOLICY2}" in
REJECT)
if [ "${DROPINPUT}" = "on" ]; then
@@ -122,9 +131,6 @@ case "${POLICY}" in
fi
iptables -A POLICYFWD -j REJECT --reject-with icmp-host-unreachable -m comment --comment "DROP_FORWARD"
;;
ACCEPT) # ACCEPT for firewall bridge mode
iptables -A POLICYFWD -j ACCEPT -m comment --comment "ACCEPT_FORWARD"
;;
*) # DROP
if [ "${DROPFORWARD}" = "on" ]; then
iptables -A POLICYFWD -m limit --limit 10/second -j LOG --log-prefix "DROP_FORWARD "
@@ -152,6 +158,9 @@ case "${POLICY}" in
# Grant access for OpenVPN connections
iptables -A POLICYFWD -i tun+ -j ACCEPT
# Grant access for WireGuard
iptables -A POLICYFWD -i wg+ -j ACCEPT
if [ -n "${IFACE}" ]; then
if [ "${HAVE_BLUE}" = "true" ] && [ -n "${BLUE_DEV}" ]; then
iptables -A POLICYFWD -i "${BLUE_DEV}" -s "${BLUE_NETADDRESS}/${BLUE_NETMASK}" -o "${IFACE}" -j ACCEPT
@@ -165,15 +174,7 @@ case "${POLICY}" in
if [ "${DROPFORWARD}" = "on" ]; then
iptables -A POLICYFWD -m limit --limit 10/second -j LOG --log-prefix "DROP_FORWARD "
fi
case "${FWPOLICY}" in
ACCEPT) # ACCEPT for firewall bridge mode
iptables -A POLICYFWD -j ACCEPT -m comment --comment "ACCEPT_FORWARD"
;;
*) # DROP
iptables -A POLICYFWD -j DROP -m comment --comment "DROP_FORWARD"
;;
esac
iptables -A POLICYFWD -m comment --comment "DROP_FORWARD" -j DROP
;;
esac

View File

@@ -42,7 +42,8 @@ my $CHAIN = $CHAIN_FORWARD;
my $CHAIN_NAT_SOURCE = "NAT_SOURCE";
my $CHAIN_NAT_DESTINATION = "NAT_DESTINATION";
my $CHAIN_MANGLE_NAT_DESTINATION_FIX = "NAT_DESTINATION";
my $CHAIN_XDP_SYNPROXY = "XDP_SYNPROXY";
my $CHAIN_INSYNPROXY = "INSYNPROXY";
my $CHAIN_RAWSYNPROXY = "RAWSYNPROXY";
my @VALID_CHAINS = ($CHAIN_INPUT, $CHAIN_FORWARD, $CHAIN_OUTPUT);
my @ANY_ADDRESSES = ("0.0.0.0/0.0.0.0", "0.0.0.0/0", "0/0");
@@ -219,12 +220,11 @@ sub flush {
run("$IPTABLES -F $CHAIN_INPUT");
run("$IPTABLES -F $CHAIN_FORWARD");
run("$IPTABLES -F $CHAIN_OUTPUT");
run("$IPTABLES -F $CHAIN_INSYNPROXY");
run("$IPTABLES -t raw -F $CHAIN_RAWSYNPROXY");
run("$IPTABLES -t nat -F $CHAIN_NAT_SOURCE");
run("$IPTABLES -t nat -F $CHAIN_NAT_DESTINATION");
run("$IPTABLES -t mangle -F $CHAIN_MANGLE_NAT_DESTINATION_FIX");
run("$IPTABLES -t raw -F SYN_FLOOD_PROTECT");
run("$IPTABLES -F $CHAIN_XDP_SYNPROXY");
run("$IPTABLES -t raw -F $CHAIN_XDP_SYNPROXY");
}
sub buildrules {
@@ -301,11 +301,11 @@ sub buildrules {
$NAT_MODE = uc($$hash{$key}[31]);
}
# Enable SYN flood protection?
my $SYN_FLOOD_PROTECTION = 0;
# Enable XDP SYNPROXY acceleration?
my $XDP_SYNPROXY_ACCELERATION = 0;
# Check if XDP SYNPROXY is turned on
my $SYNPROXY;
if(exists($$hash{$key}[37])) {
$SYNPROXY = ($$hash{$key}[37] eq 'ON');
}
# Set up time constraints.
my @time_options = ();
@@ -380,16 +380,6 @@ sub buildrules {
}
}
# DoS Protection
if (($elements ge 38) && ($$hash{$key}[37] eq "ON")) {
$SYN_FLOOD_PROTECTION = 1;
}
# XDP SYNPROXY DDoS Protection Acceleration
if (($elements ge 39) && ($$hash{$key}[38] eq "ON")) {
$XDP_SYNPROXY_ACCELERATION = 1;
}
# Check which protocols are used in this rule and so that we can
# later group rules by protocols.
my @protocols = &get_protocols($hash, $key);
@@ -628,25 +618,21 @@ sub buildrules {
}
run("$IPTABLES -A $chain @options @source_intf_options @destination_intf_options -j $target");
if ($SYN_FLOOD_PROTECTION && ($protocol eq "tcp")) {
run("$IPTABLES -t raw -A SYN_FLOOD_PROTECT @options -j CT --notrack");
}
if ($XDP_SYNPROXY_ACCELERATION && ($protocol eq "tcp")) {
my $dport = &get_external_port($hash, $key);
my @raw_options = ("-p", "tcp", "-m", "tcp", "--syn");
my @in_options = ("-p", "tcp", "-m", "tcp");
my @options = ("--sack-perm", "--timestamp", "--wscale", "7", "--mss", "1460");
push(@raw_options, "--dport", "$dport");
push(@in_options, "--dport", "$dport", "-m", "state", "--state", "INVALID,UNTRACKED");
if ($LOG) {
run("$IPTABLES -t raw -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @raw_options -j LOG --log-prefix '$CHAIN_XDP_SYNPROXY '");
}
run("$IPTABLES -t raw -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @raw_options -j CT --notrack");
if ($LOG) {
run("$IPTABLES -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @in_options -j LOG --log-prefix '$CHAIN_XDP_SYNPROXY ' @options");
}
run("$IPTABLES -A $CHAIN_XDP_SYNPROXY -i $RED_DEV @in_options -j SYNPROXY @options");
if ($SYNPROXY) {
my $dport = &get_external_port($hash, $key);
my @raw_options = ("-p", "tcp", "-m", "tcp", "--syn");
my @in_options = ("-p", "tcp", "-m", "tcp");
my @options = ("--sack-perm", "--timestamp", "--wscale", "7", "--mss", "1460");
push(@raw_options, "--dport", "$dport");
push(@in_options, "--dport", "$dport", "-m", "state", "--state", "INVALID,UNTRACKED");
if ($LOG) {
run("$IPTABLES -t raw -A $CHAIN_RAWSYNPROXY -i $RED_DEV @raw_options -j LOG --log-prefix '$CHAIN_RAWSYNPROXY '");
}
run("$IPTABLES -t raw -A $CHAIN_RAWSYNPROXY -i $RED_DEV @raw_options -j CT --notrack");
if ($LOG) {
run("$IPTABLES -A $CHAIN_INSYNPROXY -i $RED_DEV @in_options -j LOG --log-prefix '$CHAIN_RAWSYNPROXY ' @options");
}
run("$IPTABLES -A $CHAIN_INSYNPROXY -i $RED_DEV @in_options -j SYNPROXY @options");
}
# Handle forwarding rules and add corresponding rules for firewall access.
@@ -987,19 +973,19 @@ sub get_dnat_target_port {
}
sub get_external_port {
my $hash = shift;
my $key = shift;
my $hash = shift;
my $key = shift;
if ($$hash{$key}[14] eq "TGT_PORT") {
my $port = $$hash{$key}[15];
my $external_port = $$hash{$key}[30];
if ($$hash{$key}[14] eq "TGT_PORT") {
my $port = $$hash{$key}[15];
my $external_port = $$hash{$key}[30];
if ($external_port && ($port ne $external_port)) {
return $external_port;
} else {
return $port;
}
}
if ($external_port && ($port ne $external_port)) {
return $external_port;
} else {
return $port;
}
}
}
sub add_dnat_mangle_rules {

View File

@@ -1,6 +1,6 @@
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_CMDLINE_LINUX="rd.auto nmi_watchdog=1 softlockup_panic=1 panic=10"
GRUB_CMDLINE_LINUX="rd.auto crashkernel=512M nmi_watchdog=1 softlockup_panic=1 panic=10"
GRUB_DISABLE_RECOVERY="true"
GRUB_BACKGROUND="/boot/grub/splash.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 436 KiB

View File

@@ -171,7 +171,7 @@ CONFIG_IEEE80211AX=y
#CONFIG_DEBUG_FILE=y
# Send debug messages to syslog instead of stdout
CONFIG_DEBUG_SYSLOG=y
#CONFIG_DEBUG_SYSLOG=y
# Add support for sending all debug messages (regardless of debug verbosity)
# to the Linux kernel tracing facility. This helps debug the entire stack by

View File

@@ -15,6 +15,8 @@
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
SSLCertificateFile /etc/httpd/server.crt
SSLCertificateKeyFile /etc/httpd/server.key
SSLCertificateFile /etc/httpd/server-ecdsa.crt
SSLCertificateKeyFile /etc/httpd/server-ecdsa.key

31
config/icinga/icinga.conf Normal file
View File

@@ -0,0 +1,31 @@
Listen 1010
<VirtualHost *:1010>
ScriptAlias /icinga/cgi-bin /usr/share/icinga/cgi-bin
Alias /icinga /usr/share/icinga/
RewriteEngine on
RewriteRule ^/$ /icinga/ [R]
<Directory /usr/share/icinga/cgi-bin>
Options ExecCGI
AllowOverride None
AuthName "Icinga Access"
AuthType Basic
AuthUserFile /etc/icinga/htpasswd.users
Require valid-user
</Directory>
<Directory /usr/share/icinga/>
Options None
AllowOverride All
AuthName "Icinga Access"
AuthType Basic
AuthUserFile /etc/icinga/htpasswd.users
Require valid-user
</Directory>
</VirtualHost>

View File

@@ -55,6 +55,12 @@ our %sources = ( 'EMERGING_FWRULE' => { 'name' => 'Emerging Threats Blocklis
'parser' => 'ip-or-net-list',
'rate' => '12h',
'category' => 'reputation' },
'SPAMHAUS_EDROP' => { 'name' => "Spamhaus Extended Don't Route or Peer List",
'url' => 'https://www.spamhaus.org/drop/edrop.txt',
'info' => 'https://www.spamhaus.org/drop/',
'parser' => 'ip-or-net-list',
'rate' => '1h',
'category' => 'reputation' },
'DSHIELD' => { 'name' => 'Dshield.org Recommended Block List',
'url' => 'https://www.dshield.org/block.txt',
'info' => 'https://dshield.org/',
@@ -100,6 +106,12 @@ our %sources = ( 'EMERGING_FWRULE' => { 'name' => 'Emerging Threats Blocklis
'parser' => 'ip-or-net-list',,
'rate' => '1h',
'category' => 'application' },
'ALIENVAULT' => { 'name' => 'AlienVault IP Reputation database',
'url' => 'https://reputation.alienvault.com/reputation.generic',
'info' => 'https://www.alienvault.com/resource-center/videos/what-is-ip-domain-reputation',
'parser' => 'ip-or-net-list',
'rate' => '1h',
'category' => 'reputation' },
'BOGON' => { 'name' => 'Bogus address list (Martian)',
'url' => 'https://www.team-cymru.org/Services/Bogons/bogon-bn-agg.txt',
'info' => 'https://www.team-cymru.com/bogon-reference',
@@ -124,29 +136,5 @@ our %sources = ( 'EMERGING_FWRULE' => { 'name' => 'Emerging Threats Blocklis
'info' => 'https://www.blocklist.de',
'parser' => 'ip-or-net-list',
'rate' => '30m',
'category' => 'attacker' },
'3CORESEC_SSH' => { 'name' => '3CORESec SSH Activity Blocklist',
'url' => 'https://blacklist.3coresec.net/lists/ssh.txt',
'info' => 'https://blacklist.3coresec.net',
'parser' => 'ip-or-net-list',
'rate' => '1d',
'category' => 'attacker' },
'3CORESEC_SCAN' => { 'name' => '3CORESec Scan and IDS Blocklist',
'url' => 'https://blacklist.3coresec.net/lists/misc.txt',
'info' => 'https://blacklist.3coresec.net',
'parser' => 'ip-or-net-list',
'rate' => '1d',
'category' => 'reputation' },
'3CORESEC_WEB' => { 'name' => '3CORESec Web Server Activity Blocklist',
'url' => 'https://blacklist.3coresec.net/lists/http.txt',
'info' => 'https://blacklist.3coresec.net',
'parser' => 'ip-or-net-list',
'rate' => '1d',
'category' => 'attacker' },
'ABUSECH_BOTNETC2' => { 'name' => 'ABUSE.ch Botnet C2 IP Blocklist',
'url' => 'https://sslbl.abuse.ch/blacklist/sslipblacklist.txt',
'info' => 'https://sslbl.abuse.ch/blacklist#botnet-c2-ips-csv',
'parser' => 'ip-or-net-list',
'rate' => '5m',
'category' => 'reputation' }
'category' => 'attacker' }
);

View File

@@ -0,0 +1,883 @@
P3
63 80
255
161 18 12 165 19 14 170 20 15 171 21 16 170 20 15 171 21 16
173 20 15 173 20 15 171 21 16 171 21 16 171 21 16 173 19 15
173 20 15 173 19 15 176 18 12 173 19 15 173 20 15 173 20 15
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 177 20 14
177 20 14 177 20 14 177 20 14 176 18 12 174 18 12 176 17 11
176 18 12 177 20 14 183 19 13 183 19 13 183 19 13 183 19 13
183 19 13 183 19 13 183 19 13 183 19 13 183 19 13 177 20 14
177 20 14 183 19 13 177 20 14 173 19 15 177 20 14 177 20 14
177 20 14 173 19 15 177 20 14 177 20 14 177 20 14 177 20 14
177 20 14 177 20 14 177 20 14 173 19 15 177 20 14 177 20 14
177 20 14 168 18 14 164 16 11
161 18 12 165 19 14 170 20 15 171 21 16 170 20 15 170 20 15
171 21 16 171 21 16 169 21 14 171 21 16 170 20 15 170 20 15
170 20 15 173 20 15 173 19 15 173 20 15 173 20 15 173 19 15
173 19 15 173 19 15 177 20 14 176 18 12 176 18 12 176 18 12
177 20 14 177 20 14 176 18 12 176 17 11 176 17 11 176 17 11
176 17 11 176 18 12 177 20 14 177 20 14 177 20 14 177 20 14
177 20 14 183 19 13 177 20 14 177 20 14 177 20 14 177 20 14
177 20 14 176 18 12 173 19 15 173 19 15 173 19 15 177 20 14
173 19 15 173 19 15 173 19 15 173 19 15 176 18 12 177 20 14
177 20 14 177 20 14 177 20 14 173 19 15 173 20 15 173 20 15
173 19 15 164 16 11 183 19 13
160 19 13 168 22 16 168 22 16 171 21 16 168 22 16 168 22 16
168 22 16 168 22 16 168 22 16 168 22 16 171 21 16 171 21 16
168 22 16 171 21 16 171 21 16 171 21 16 173 20 15 173 20 15
173 20 15 173 19 15 173 20 15 173 20 15 173 19 15 173 19 15
173 19 15 173 19 15 176 18 12 173 19 15 174 18 12 176 17 11
174 18 12 173 19 15 176 17 11 177 20 14 177 20 14 177 20 14
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 173 20 15
173 20 15 173 20 15 173 20 15 171 21 16 171 21 16 171 21 16
171 21 16 170 20 15 173 20 15 173 20 15 173 20 15 173 20 15
173 20 15 173 20 15 173 20 15 171 21 16 171 21 16 173 20 15
156 15 13 183 19 13 183 19 13
160 19 13 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 171 21 16 171 21 16 171 21 16 173 20 15 171 21 16
173 20 15 173 20 15 173 20 15 173 20 15 173 19 15 173 19 15
173 19 15 173 19 15 174 18 12 174 18 12 176 17 11 173 19 15
174 18 12 173 19 15 176 24 12 173 19 15 176 18 12 177 20 14
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 173 20 15
173 20 15 173 20 15 173 20 15 171 21 16 173 20 15 173 20 15
171 21 16 171 21 16 171 21 16 173 20 15 173 20 15 173 20 15
171 21 16 173 20 15 173 20 15 171 21 16 177 20 14 157 19 14
183 19 13 183 19 13 183 19 13
156 15 13 162 20 14 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 171 21 16 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 171 21 16 171 21 16 173 20 15 173 20 15 171 21 16
173 20 15 173 20 15 173 20 15 173 20 15 173 19 15 173 19 15
173 19 15 168 18 14 168 18 14 176 17 11 167 52 24 176 17 11
176 17 11 176 18 12 173 92 60 177 20 14 177 20 14 176 17 11
177 20 14 177 20 14 177 20 14 177 20 14 177 20 14 173 20 15
173 20 15 173 19 15 173 19 15 173 20 15 173 19 15 173 20 15
171 21 16 171 21 16 171 21 16 173 20 15 171 21 16 171 21 16
171 21 16 171 21 16 171 21 16 173 20 15 164 19 14 164 16 11
183 19 13 183 19 13 183 19 13
157 19 14 162 20 14 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 171 21 16 171 21 16 171 21 16 171 21 16 164 16 11
173 20 15 173 19 15 171 21 16 173 19 15 173 19 15 173 19 15
164 16 11 167 52 24 167 52 24 164 16 11 173 92 60 211 179 117
176 17 11 176 18 12 164 16 11 167 52 24 175 97 50 176 17 11
177 20 14 177 20 14 173 19 15 173 19 15 173 19 15 173 20 15
176 17 11 176 17 11 173 20 15 173 19 15 173 20 15 171 21 16
171 21 16 171 21 16 173 20 15 173 20 15 171 21 16 171 21 16
171 21 16 170 20 15 171 21 16 168 22 16 152 14 13 183 19 13
183 19 13 183 19 13 183 19 13
156 20 14 162 20 14 168 22 16 168 22 16 160 22 16 160 22 16
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 171 21 16 168 22 16 168 18 14 174 18 12 163 56 28
173 19 15 168 18 14 176 17 11 183 19 13 164 16 11 168 18 14
164 16 11 175 97 50 175 97 50 164 16 11 176 17 11 238 229 170
215 186 121 183 19 13 176 17 11 167 52 24 213 153 88 176 17 11
177 20 14 176 17 11 183 19 13 183 19 13 164 16 11 176 17 11
167 52 24 176 24 12 176 17 11 173 20 15 173 20 15 171 21 16
171 21 16 171 21 16 171 21 16 170 20 15 171 21 16 171 21 16
171 21 16 168 22 16 168 22 16 151 18 14 183 19 13 183 19 13
183 19 13 183 19 13 183 19 13
152 20 15 160 22 16 160 22 16 160 22 16 168 22 16 162 20 14
168 22 16 168 22 16 168 22 16 168 22 16 168 22 16 168 22 16
168 22 16 168 22 16 168 18 14 176 24 12 206 199 148 179 118 76
164 16 11 176 24 12 191 130 98 162 137 108 191 130 98 164 16 11
164 16 11 176 24 12 176 24 12 177 20 14 183 19 13 211 179 117
254 255 240 175 96 57 176 17 11 183 19 13 167 52 24 176 17 11
176 17 11 175 96 57 162 137 108 169 133 98 167 52 24 164 16 11
167 52 24 206 199 148 167 52 24 176 17 11 173 20 15 173 20 15
171 21 16 171 21 16 171 21 16 168 22 16 171 21 16 171 21 16
168 22 16 168 22 16 152 20 15 176 17 11 183 19 13 183 19 13
183 19 13 183 19 13 183 19 13
151 18 14 159 21 16 160 22 16 160 22 16 160 22 16 168 22 16
162 20 14 168 22 16 168 22 16 168 22 16 167 21 14 168 22 16
168 22 16 168 22 16 164 16 11 191 130 98 243 238 185 176 17 11
164 16 11 191 130 98 97 69 52 0 0 0 131 94 71 176 111 73
154 14 11 168 18 14 176 17 11 176 111 73 183 19 13 215 186 121
254 255 240 221 205 133 183 19 13 176 17 11 164 16 11 164 16 11
183 19 13 158 125 90 0 0 0 0 0 0 162 137 108 183 19 13
164 16 11 199 143 96 225 212 158 176 17 11 171 21 16 170 20 15
171 21 16 171 21 16 170 20 15 171 21 16 171 21 16 168 22 16
168 22 16 162 20 14 161 18 12 183 19 13 183 19 13 183 19 13
183 19 13 183 19 13 128 8 8
151 18 14 156 20 14 160 21 14 160 22 16 160 22 16 168 22 16
160 22 16 160 22 16 168 22 16 168 22 16 168 22 16 168 22 16
165 19 14 165 19 14 164 16 11 225 212 158 225 212 158 176 17 11
183 19 13 131 94 71 91 31 21 243 238 185 91 31 21 162 137 108
183 19 13 176 24 12 176 24 12 176 17 11 183 19 13 247 246 193
254 255 233 238 229 170 183 19 13 167 52 24 176 24 12 176 17 11
199 143 96 91 31 21 225 212 158 162 137 108 97 69 52 173 92 60
176 17 11 199 143 96 243 238 185 183 19 13 173 20 15 170 20 15
170 20 15 171 21 16 167 21 14 167 21 14 167 21 14 164 19 14
168 22 16 150 16 12 183 19 13 183 19 13 183 19 13 183 19 13
183 19 13 147 12 10 89 3 6
151 18 14 152 20 15 159 21 16 162 20 14 164 19 14 160 22 16
160 22 16 167 21 14 168 22 16 168 22 16 168 22 16 165 19 14
164 19 14 164 19 14 164 16 11 199 163 109 249 249 214 183 19 13
176 24 12 131 94 71 111 0 3 183 19 13 106 7 8 97 69 52
199 163 109 211 179 117 183 19 13 183 19 13 211 179 117 254 255 233
253 255 226 238 229 170 183 19 13 183 19 13 183 19 13 199 143 96
97 69 52 77 0 3 183 19 13 171 21 16 97 69 52 173 92 60
176 17 11 238 229 170 225 212 158 176 17 11 173 20 15 170 20 15
170 20 15 171 21 16 168 18 14 165 19 14 164 19 14 168 18 14
150 16 12 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
164 16 11 109 5 7 77 0 3
151 18 14 152 20 15 159 21 16 162 20 14 162 20 14 160 22 16
160 22 16 167 21 14 165 19 14 167 21 14 164 19 14 161 18 12
165 19 14 164 19 14 164 16 11 176 24 12 249 249 214 191 130 98
154 14 11 162 137 108 0 0 0 107 0 4 0 0 0 77 0 3
0 0 0 206 199 148 175 97 50 213 153 88 254 255 233 249 249 214
254 255 233 215 186 121 193 134 84 167 52 24 191 130 98 91 31 21
77 0 3 0 0 0 77 0 3 0 0 0 158 125 90 183 19 13
175 96 57 254 255 210 167 52 24 176 17 11 170 20 15 168 18 14
168 18 14 171 21 16 168 18 14 164 19 14 167 21 14 156 15 13
174 18 12 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
119 5 9 77 0 3 77 0 3
151 18 14 156 20 14 159 21 16 160 19 13 162 20 14 162 20 14
162 20 14 164 19 14 167 21 14 168 22 16 160 19 13 156 15 13
164 19 14 161 18 12 156 15 13 133 0 5 176 111 73 243 238 185
133 0 5 173 92 60 162 137 108 97 69 52 162 137 108 91 31 21
77 0 3 0 0 0 202 183 123 254 255 223 250 251 219 249 249 214
254 255 233 193 134 84 215 186 121 225 212 158 91 31 21 77 0 3
78 2 7 158 125 90 97 69 52 131 94 71 173 92 60 154 14 11
231 215 150 213 153 88 154 14 11 164 16 11 164 16 11 168 18 14
168 18 14 168 18 14 164 16 11 167 21 14 162 20 14 156 15 13
183 19 13 183 19 13 183 19 13 183 19 13 183 19 13 128 6 9
78 2 7 77 0 3 78 2 7
150 16 12 152 20 15 159 21 16 159 21 16 160 19 13 162 20 14
160 22 16 160 22 16 165 19 14 168 22 16 164 16 11 156 15 13
164 16 11 154 14 11 147 12 10 143 19 14 154 43 26 247 246 193
150 53 31 107 0 4 173 92 60 199 163 109 147 67 48 202 183 123
97 69 52 77 0 3 97 69 52 252 253 227 254 255 210 254 255 223
238 229 170 183 19 13 232 217 158 131 94 71 77 0 3 78 2 7
162 137 108 147 67 48 176 111 73 207 156 97 133 0 5 164 16 11
238 229 170 173 92 60 147 12 10 154 14 11 167 52 24 174 18 12
164 16 11 169 21 14 171 21 16 168 18 14 144 14 14 183 19 13
183 19 13 183 19 13 183 19 13 183 19 13 147 12 10 93 4 6
77 0 3 78 2 7 91 2 10
150 16 12 152 20 15 157 23 16 159 21 16 159 21 16 162 20 14
160 22 16 162 20 14 164 19 14 168 22 16 191 130 98 154 14 11
163 56 28 199 163 109 133 0 5 151 28 16 173 92 60 254 255 210
147 67 48 107 0 4 199 143 96 154 63 38 80 0 2 193 134 84
237 235 180 78 2 7 77 0 3 162 137 108 253 255 226 253 254 208
193 134 84 183 19 13 202 183 123 91 31 21 77 0 3 162 137 108
193 134 84 92 0 2 102 0 4 211 179 117 167 52 24 164 16 11
247 246 193 199 143 96 159 29 16 164 16 11 225 212 158 167 52 24
164 16 11 199 143 96 167 52 24 147 12 10 183 19 13 183 19 13
183 19 13 183 19 13 183 19 13 164 16 11 102 4 5 77 0 3
78 2 7 91 2 10 99 1 11
150 16 12 152 20 15 157 23 16 157 23 16 159 21 16 160 22 16
159 21 16 160 21 14 161 18 12 168 22 16 249 249 214 173 92 60
161 18 12 154 63 38 139 9 7 154 14 11 238 229 170 252 252 206
139 27 18 131 14 12 247 246 193 150 53 31 116 3 5 211 173 103
237 223 121 162 137 108 0 0 0 97 69 52 250 251 219 254 255 223
193 134 84 183 19 13 158 125 90 77 0 3 97 69 52 224 209 127
208 170 99 137 32 21 120 0 3 243 238 185 173 92 60 164 16 11
238 229 170 247 246 193 171 21 16 176 17 11 167 52 24 176 17 11
167 52 24 252 253 227 173 92 60 176 17 11 183 19 13 183 19 13
183 19 13 183 19 13 183 19 13 114 7 7 77 0 3 78 2 7
87 1 5 99 1 11 133 0 5
150 16 12 151 18 14 159 21 16 156 20 14 159 21 16 162 20 14
160 21 14 160 22 16 164 16 11 176 111 73 254 255 240 176 111 73
154 14 11 164 16 11 167 52 24 238 229 170 254 255 233 206 199 148
123 0 2 133 0 5 238 229 170 199 163 109 139 9 7 237 223 121
213 153 88 221 205 133 91 31 21 77 0 3 206 199 148 206 199 148
162 137 108 202 183 123 97 69 52 0 0 0 187 167 103 213 153 88
237 223 121 163 56 28 176 111 73 254 255 233 176 24 12 154 14 11
199 163 109 254 255 240 238 229 170 167 52 24 176 17 11 176 24 12
173 92 60 254 255 240 215 186 121 183 19 13 183 19 13 183 19 13
183 19 13 183 19 13 127 5 8 78 2 7 78 2 7 78 2 7
99 1 11 128 6 9 122 7 7
145 15 12 152 20 15 156 20 14 156 20 14 159 21 16 162 20 14
160 19 13 160 22 16 164 16 11 215 186 121 254 255 240 163 56 28
176 17 11 175 97 50 243 238 185 254 255 223 254 255 223 173 92 60
139 9 7 154 43 26 163 56 28 247 246 193 167 52 24 219 195 113
213 153 88 241 232 158 97 69 52 77 0 3 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 91 31 21 225 212 158 213 153 88
237 223 121 167 52 24 237 235 180 199 143 96 176 24 12 177 20 14
167 52 24 249 249 214 253 255 226 243 238 185 167 52 24 183 19 13
167 52 24 252 253 227 243 238 185 183 19 13 183 19 13 183 19 13
183 19 13 147 12 10 87 1 5 78 2 7 78 2 7 99 1 11
128 6 9 131 9 10 129 12 11
145 15 12 151 18 14 156 20 14 159 21 16 159 21 16 162 20 14
160 19 13 162 20 14 164 16 11 215 186 121 211 179 117 176 17 11
183 19 13 215 186 121 253 255 226 254 255 210 238 229 170 164 16 11
199 163 109 173 92 60 139 9 7 199 143 96 173 92 60 192 140 79
237 223 121 97 69 52 0 0 0 91 31 21 173 92 60 211 179 117
211 179 117 191 130 98 106 7 8 0 0 0 91 31 21 225 212 158
237 223 121 175 96 57 225 212 158 176 17 11 163 56 28 206 199 148
176 17 11 206 199 148 254 255 223 254 255 223 215 186 121 183 19 13
176 24 12 213 153 88 232 217 158 183 19 13 183 19 13 183 19 13
176 17 11 95 4 6 78 2 7 78 2 7 99 1 11 122 8 8
131 9 10 125 8 10 131 9 10
145 15 12 151 18 14 156 20 14 156 20 14 160 21 14 160 19 13
164 19 14 156 15 13 147 12 10 164 16 11 164 16 11 183 19 13
183 19 13 243 238 185 254 255 210 254 255 223 199 163 109 176 17 11
249 249 214 167 52 24 139 9 7 199 143 96 193 134 84 213 153 88
97 69 52 91 31 21 191 130 98 183 19 13 183 19 13 211 179 117
249 249 214 173 92 60 183 19 13 173 92 60 97 69 52 0 0 0
199 163 109 213 153 88 206 199 148 154 14 11 183 19 13 249 249 214
167 52 24 193 134 84 254 255 223 252 252 206 252 252 206 175 97 50
183 19 13 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
122 8 8 78 2 7 78 2 7 95 4 6 119 5 9 137 11 10
125 8 10 137 11 10 142 10 9
145 15 12 151 18 14 152 20 15 156 20 14 160 21 14 168 22 16
164 16 11 176 24 12 175 96 57 176 111 73 193 134 84 175 96 57
175 96 57 249 249 214 252 252 206 254 255 223 199 143 96 183 19 13
254 255 233 199 143 96 163 56 28 247 246 193 215 186 121 97 69 52
91 31 21 213 153 88 183 19 13 173 92 60 207 156 97 225 212 158
254 255 240 199 143 96 211 179 117 183 19 13 175 96 57 129 78 48
91 31 21 221 205 133 249 249 214 175 96 57 191 130 98 254 255 240
173 92 60 193 134 84 254 255 223 247 246 193 253 254 208 213 153 88
175 97 50 213 153 88 213 153 88 213 153 88 175 97 50 161 18 12
106 7 8 89 3 6 93 4 6 114 7 7 139 9 7 125 8 10
138 12 11 142 10 9 164 16 11
144 16 12 152 20 15 156 20 14 160 22 16 168 22 16 176 24 12
175 96 57 162 137 108 97 69 52 97 69 52 97 69 52 131 94 71
191 177 112 250 251 219 254 255 223 254 255 223 211 179 117 183 19 13
243 238 185 253 254 208 254 255 223 235 226 137 182 147 96 0 0 0
175 97 50 147 12 10 102 0 4 183 19 13 183 19 13 215 186 121
249 249 214 173 92 60 183 19 13 139 9 7 99 0 3 173 92 60
105 45 32 131 94 71 249 243 164 250 251 219 254 255 210 244 241 169
183 19 13 211 173 103 254 255 210 252 252 206 254 255 210 206 199 148
131 94 71 97 69 52 97 69 52 97 69 52 162 137 108 191 130 98
114 7 7 111 14 13 111 14 13 137 11 10 128 8 8 137 13 11
145 11 11 164 16 11 156 15 13
143 19 14 152 20 15 157 23 16 168 22 16 176 24 12 167 52 24
158 125 90 0 0 0 97 69 52 162 137 108 158 125 90 97 69 52
0 0 0 91 31 21 191 177 112 254 255 223 252 252 206 183 19 13
213 153 88 237 223 121 237 223 121 216 189 107 97 69 52 132 32 17
78 2 7 91 31 21 162 137 108 91 31 21 183 19 13 173 92 60
191 130 98 183 19 13 78 2 7 131 94 71 131 94 71 0 0 0
141 65 38 91 31 21 219 195 113 237 223 121 237 223 121 213 153 88
183 19 13 243 238 185 254 255 210 206 199 148 91 31 21 0 0 0
97 69 52 131 94 71 162 137 108 131 94 71 0 0 0 97 69 52
173 92 60 135 17 11 143 19 14 139 9 7 131 14 12 142 13 12
164 16 11 164 16 11 156 15 13
143 19 14 152 20 15 159 29 16 168 22 16 176 24 12 175 96 57
131 94 71 206 199 148 249 249 214 254 255 240 254 255 240 254 255 233
249 249 214 162 137 108 0 0 0 91 31 21 225 212 158 243 238 185
213 153 88 213 153 88 213 153 88 208 170 99 91 31 21 106 7 8
0 0 0 225 212 158 254 255 240 206 199 148 77 0 3 191 130 98
215 186 121 133 0 5 131 94 71 254 255 240 254 255 240 97 69 52
77 0 3 78 2 7 162 137 108 213 153 88 216 189 107 213 153 88
232 217 158 237 235 180 97 69 52 0 0 0 158 125 90 243 238 185
254 255 240 254 255 240 254 255 233 249 249 214 206 199 148 97 69 52
176 111 73 152 17 12 150 16 12 125 8 10 144 14 14 156 15 13
168 18 14 161 18 12 183 19 13
143 19 14 157 23 16 159 29 16 168 22 16 174 18 12 175 96 57
131 94 71 206 199 148 225 212 158 206 199 148 249 249 214 250 251 219
254 255 223 254 255 233 249 249 214 131 94 71 0 0 0 162 137 108
247 246 193 213 153 88 175 97 50 182 147 96 78 2 7 77 0 3
0 0 0 237 235 180 254 255 240 237 235 180 0 0 0 183 19 13
183 19 13 77 0 3 162 137 108 254 255 240 254 255 240 97 69 52
0 0 0 77 0 3 131 94 71 213 153 88 213 153 88 237 223 121
206 199 148 0 0 0 97 69 52 249 249 214 254 255 240 254 255 223
250 251 219 249 249 214 206 199 148 206 199 148 206 199 148 97 69 52
176 111 73 164 16 11 138 12 11 146 12 11 147 12 10 173 20 15
156 15 13 183 19 13 150 16 12
143 19 14 152 20 15 157 23 16 159 29 16 164 16 11 173 92 60
131 94 71 162 137 108 237 235 180 206 199 148 206 199 148 254 255 223
250 251 219 249 249 214 250 251 219 254 255 240 206 199 148 0 0 0
131 94 71 213 153 88 213 153 88 162 137 108 77 0 3 0 0 0
0 0 0 131 94 71 249 249 214 131 94 71 0 0 0 168 18 14
183 19 13 0 0 0 0 0 0 237 235 180 206 199 148 91 31 21
0 0 0 77 0 3 97 69 52 215 186 121 213 153 88 162 137 108
0 0 0 162 137 108 254 255 240 254 255 223 249 249 214 249 249 214
254 255 223 225 212 158 206 199 148 237 235 180 206 199 148 97 69 52
175 96 57 133 0 5 156 15 13 147 12 10 168 18 14 160 19 13
183 19 13 160 19 13 105 1 7
144 16 12 152 20 15 152 20 15 157 23 16 154 14 11 176 108 61
158 125 90 131 94 71 249 249 214 237 235 180 206 199 148 206 199 148
253 255 226 254 255 223 250 251 219 249 249 214 254 255 233 249 249 214
91 31 21 97 69 52 215 186 121 143 100 73 78 2 7 0 0 0
162 137 108 0 0 0 0 0 0 131 94 71 97 69 52 123 0 2
183 19 13 0 0 0 162 137 108 0 0 0 0 0 0 131 94 71
97 69 52 0 0 0 97 69 52 231 215 150 131 94 71 0 0 0
237 235 180 254 255 240 249 249 214 250 251 219 250 251 219 254 255 223
237 235 180 206 199 148 237 235 180 249 249 214 162 137 108 97 69 52
193 134 84 142 10 9 164 16 11 168 18 14 164 19 14 174 18 12
176 24 12 109 5 7 119 5 9
144 16 12 147 20 17 147 20 17 150 16 12 154 43 26 211 179 117
179 118 76 97 69 52 206 199 148 206 199 148 237 235 180 206 199 148
206 199 148 254 255 223 254 255 223 250 251 219 250 251 219 254 255 223
206 199 148 91 31 21 97 69 52 206 199 148 0 0 0 91 31 21
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 156 15 13
183 19 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 131 94 71 162 137 108 0 0 0 206 199 148
250 251 219 254 255 223 254 255 223 254 255 223 254 255 223 237 235 180
206 199 148 237 235 180 206 199 148 206 199 148 97 69 52 131 94 71
199 163 109 173 92 60 164 16 11 173 20 15 164 16 11 183 19 13
116 9 9 105 1 7 119 5 9
141 15 12 143 19 14 147 20 17 139 9 7 173 92 60 219 202 125
173 92 60 97 69 52 97 69 52 206 199 148 206 199 148 249 249 214
237 235 180 206 199 148 237 235 180 253 255 226 249 249 214 206 199 148
237 235 180 253 255 226 97 69 52 97 69 52 78 2 7 91 31 21
97 69 52 0 0 0 0 0 0 0 0 0 0 0 0 183 19 13
183 19 13 91 31 21 0 0 0 0 0 0 0 0 0 0 0 0
97 69 52 77 0 3 91 31 21 91 31 21 243 238 185 249 249 214
206 199 148 237 235 180 253 255 226 249 249 214 206 199 148 206 199 148
249 249 214 206 199 148 206 199 148 162 137 108 97 69 52 173 92 60
211 173 103 199 143 96 176 17 11 165 19 14 183 19 13 135 17 11
99 1 11 119 5 9 117 6 7
141 15 12 141 15 12 143 19 14 139 9 7 163 56 28 231 215 150
124 14 13 153 103 68 0 0 0 162 137 108 206 199 148 206 199 148
249 249 214 250 251 219 206 199 148 206 199 148 162 137 108 249 249 214
253 255 226 250 251 219 252 253 227 97 69 52 0 0 0 78 2 7
97 69 52 97 69 52 97 69 52 97 69 52 78 2 7 183 19 13
183 19 13 145 11 11 97 69 52 97 69 52 97 69 52 97 69 52
91 31 21 77 0 3 0 0 0 237 235 180 253 255 226 254 255 223
249 249 214 206 199 148 162 137 108 206 199 148 252 253 227 250 251 219
206 199 148 206 199 148 206 199 148 91 31 21 131 94 71 176 17 11
215 186 121 175 96 57 164 16 11 183 19 13 159 29 16 93 4 6
114 7 7 119 5 9 125 8 10
137 13 11 138 15 12 141 15 12 143 13 11 147 12 10 154 63 38
111 0 3 175 96 57 133 82 52 91 31 21 206 199 148 206 199 148
206 199 148 237 235 180 206 199 148 206 199 148 206 199 148 206 199 148
206 199 148 237 235 180 250 251 219 249 249 214 0 0 0 78 2 7
78 2 7 97 69 52 97 69 52 0 0 0 183 19 13 183 19 13
183 19 13 183 19 13 78 2 7 97 69 52 97 69 52 0 0 0
91 2 10 0 0 0 206 199 148 254 255 233 237 235 180 206 199 148
206 199 148 206 199 148 237 235 180 206 199 148 206 199 148 206 199 148
206 199 148 206 199 148 97 69 52 97 69 52 192 140 79 164 16 11
167 52 24 176 24 12 183 19 13 176 24 12 95 4 6 106 7 8
117 6 7 125 8 10 134 12 11
134 12 11 138 15 12 144 16 12 146 12 11 131 10 9 122 7 7
128 8 8 192 140 79 216 189 107 91 31 21 97 69 52 206 199 148
162 137 108 162 137 108 237 235 180 253 255 226 250 251 219 249 249 214
225 212 158 206 199 148 206 199 148 237 235 180 162 137 108 0 0 0
99 1 11 111 0 3 123 0 2 183 19 13 183 19 13 145 11 11
91 2 10 183 19 13 183 19 13 111 0 3 92 0 2 111 14 13
0 0 0 131 94 71 249 249 214 206 199 148 206 199 148 206 199 148
249 249 214 250 251 219 254 255 223 249 249 214 162 137 108 162 137 108
206 199 148 131 94 71 91 31 21 211 173 103 217 193 123 167 52 24
147 12 10 174 18 12 183 19 13 111 14 13 102 4 5 114 7 7
119 5 9 131 9 10 142 13 12
131 14 12 138 15 12 152 14 13 139 9 7 131 14 12 131 10 9
152 48 27 231 215 150 187 167 103 208 170 99 91 31 21 0 0 0
162 137 108 206 199 148 206 199 148 206 199 148 237 235 180 237 235 180
249 249 214 250 251 219 237 235 180 206 199 148 206 199 148 97 69 52
0 0 0 111 14 13 183 19 13 183 19 13 183 19 13 78 2 7
0 0 0 183 19 13 183 19 13 183 19 13 144 14 14 78 2 7
0 0 0 162 137 108 206 199 148 237 235 180 252 253 227 254 255 233
249 249 214 237 235 180 225 212 158 206 199 148 206 199 148 162 137 108
0 0 0 91 31 21 211 179 117 208 170 99 243 238 185 173 92 60
154 14 11 183 19 13 150 16 12 95 4 6 114 7 7 122 8 8
131 10 10 138 12 11 142 13 12
135 17 11 144 16 12 145 11 11 167 52 24 159 30 14 150 16 12
175 97 50 243 238 185 217 193 123 192 140 79 203 150 89 97 69 52
0 0 0 131 94 71 162 137 108 162 137 108 162 137 108 162 137 108
162 137 108 97 69 52 97 69 52 97 69 52 97 69 52 91 31 21
0 0 0 78 2 7 99 1 11 176 17 11 183 19 13 183 19 13
176 17 11 183 19 13 183 19 13 125 8 10 78 2 7 0 0 0
78 2 7 0 0 0 97 69 52 97 69 52 97 69 52 131 94 71
162 137 108 162 137 108 162 137 108 162 137 108 131 94 71 0 0 0
97 69 52 199 143 96 192 140 79 217 193 123 254 255 210 173 92 60
183 19 13 176 24 12 114 7 7 117 6 7 119 5 9 131 9 10
138 12 11 138 12 11 164 16 11
138 15 12 147 12 10 137 11 10 213 153 88 167 52 24 176 24 12
167 52 24 243 238 185 238 229 170 203 150 89 176 17 11 176 108 61
162 115 76 91 31 21 0 0 0 97 69 52 162 137 108 97 69 52
97 69 52 97 69 52 131 94 71 163 121 81 91 31 21 0 0 0
183 19 13 77 0 3 0 0 0 78 2 7 119 5 9 168 18 14
183 19 13 131 9 10 99 1 11 78 2 7 0 0 0 176 17 11
111 14 13 0 0 0 147 67 48 151 106 70 131 94 71 97 69 52
0 0 0 162 137 108 97 69 52 0 0 0 0 0 0 143 100 73
213 153 88 176 24 12 179 118 76 238 229 170 252 252 206 175 97 50
183 19 13 175 97 50 154 43 26 116 3 5 131 10 9 138 12 11
138 12 11 156 15 13 176 17 11
145 11 11 137 13 11 131 9 10 175 97 50 167 52 24 161 18 12
176 24 12 231 215 150 249 249 214 219 195 113 183 19 13 167 52 24
175 97 50 179 118 76 163 121 81 97 69 52 0 0 0 0 0 0
191 130 98 193 134 84 167 52 24 171 21 16 77 0 3 138 37 20
183 19 13 154 14 11 0 0 0 0 0 0 0 0 0 78 2 7
78 2 7 0 0 0 0 0 0 0 0 0 120 0 3 183 19 13
176 24 12 0 0 0 105 1 7 183 19 13 173 92 60 213 153 88
78 2 7 0 0 0 97 69 52 158 125 90 191 130 98 175 97 50
163 56 28 183 19 13 213 153 88 250 251 219 241 232 158 167 52 24
154 14 11 213 153 88 167 52 24 127 5 8 141 14 11 139 13 11
146 12 11 183 19 13 154 14 11
137 13 11 131 14 12 131 12 12 159 30 14 174 18 12 167 21 14
154 14 11 192 140 79 249 243 164 235 226 137 213 153 88 183 19 13
167 21 14 92 0 2 179 118 76 162 137 108 91 31 21 104 58 46
77 0 3 77 0 3 0 0 0 0 0 0 0 0 0 119 34 17
175 97 50 183 19 13 176 17 11 109 5 7 0 0 0 0 0 0
0 0 0 0 0 0 89 3 6 164 16 11 164 16 11 167 52 24
138 37 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
91 31 21 111 35 21 131 94 71 199 143 96 107 0 4 135 17 11
183 19 13 183 19 13 216 189 107 249 243 164 213 153 88 147 12 10
142 10 9 167 52 24 167 21 14 142 10 9 146 12 11 142 13 12
176 17 11 164 16 11 164 16 11
124 14 13 128 14 13 143 19 14 154 14 11 163 56 28 176 108 61
147 12 10 151 28 16 216 189 107 237 223 121 213 153 88 183 19 13
183 19 13 183 19 13 162 137 108 0 0 0 183 19 13 111 14 13
91 31 21 158 125 90 131 94 71 97 69 52 0 0 0 78 2 7
213 153 88 175 97 50 183 19 13 183 19 13 176 17 11 154 14 11
154 14 11 176 17 11 183 19 13 176 17 11 175 97 50 213 153 88
119 59 34 0 0 0 0 0 0 97 69 52 162 137 108 97 69 52
78 2 7 183 19 13 77 0 3 158 125 90 173 92 60 176 17 11
183 19 13 213 153 88 216 189 107 216 189 107 138 37 20 123 0 2
176 108 61 167 52 24 142 10 9 150 16 12 144 14 14 164 16 11
164 16 11 156 15 13 164 16 11
124 14 13 128 14 13 157 23 16 154 14 11 199 143 96 232 217 158
176 24 12 139 9 7 163 56 28 213 153 88 216 189 107 213 153 88
183 19 13 199 143 96 0 0 0 183 19 13 176 17 11 0 0 0
202 183 123 97 69 52 91 31 21 162 115 76 105 45 32 158 83 45
213 153 88 192 140 79 175 97 50 175 97 50 183 19 13 183 19 13
176 17 11 183 19 13 183 19 13 175 97 50 176 108 61 174 128 69
175 97 50 77 0 3 163 56 28 97 69 52 0 0 0 202 183 123
97 69 52 111 0 3 183 19 13 0 0 0 191 130 98 183 19 13
183 19 13 213 153 88 213 153 88 163 56 28 102 0 4 154 63 38
252 252 206 167 52 24 147 12 10 150 16 12 164 16 11 174 18 12
152 14 13 161 18 12 156 15 13
122 13 12 151 28 16 151 28 16 176 24 12 167 52 24 199 163 109
167 52 24 159 30 14 123 0 2 135 17 11 175 97 50 213 153 88
183 19 13 193 134 84 0 0 0 176 17 11 0 0 0 162 137 108
97 69 52 131 94 71 213 153 88 171 21 16 0 0 0 91 31 21
91 31 21 213 153 88 216 189 107 213 153 88 175 97 50 167 52 24
167 52 24 175 97 50 213 153 88 213 153 88 237 223 121 129 78 48
0 0 0 0 0 0 87 1 5 175 96 57 191 130 98 91 31 21
162 137 108 0 0 0 154 14 11 87 1 5 131 94 71 183 19 13
175 97 50 175 97 50 139 27 18 111 0 3 131 14 12 173 92 60
199 143 96 161 18 12 147 12 10 154 14 11 176 17 11 154 14 11
156 15 13 161 18 12 156 15 13
139 27 18 138 37 20 154 43 26 169 21 14 159 30 14 159 30 14
193 134 84 167 52 24 150 53 31 158 83 45 107 0 4 183 19 13
183 19 13 179 118 76 0 0 0 0 0 0 97 69 52 191 177 112
0 0 0 183 19 13 87 1 5 0 0 0 0 0 0 0 0 0
91 31 21 216 189 107 146 87 48 237 223 121 213 153 88 213 153 88
213 153 88 213 153 88 237 223 121 174 128 69 174 128 69 174 128 69
0 0 0 0 0 0 0 0 0 0 0 0 183 19 13 78 2 7
131 94 71 162 137 108 0 0 0 0 0 0 143 100 73 175 97 50
183 19 13 123 0 2 150 53 31 150 53 31 150 53 31 191 130 98
133 0 5 147 12 10 147 12 10 176 17 11 164 16 11 156 15 13
164 16 11 161 18 12 156 15 13
138 37 20 152 48 27 159 29 16 151 28 16 147 24 15 163 56 28
215 186 121 175 96 57 164 16 11 199 143 96 173 92 60 164 16 11
183 19 13 131 94 71 77 0 3 97 69 52 208 170 99 97 69 52
106 0 7 0 0 0 97 69 52 162 137 108 0 0 0 0 0 0
105 45 32 124 72 43 146 87 48 237 223 121 237 223 121 237 223 121
216 189 107 237 223 121 237 223 121 216 189 107 97 69 52 146 87 48
0 0 0 0 0 0 131 94 71 162 137 108 0 0 0 123 0 2
78 2 7 206 199 148 131 94 71 77 0 3 97 69 52 175 96 57
183 19 13 150 55 28 207 156 97 133 0 5 154 63 38 225 212 158
133 0 5 141 15 12 176 17 11 176 17 11 156 15 13 164 16 11
176 17 11 161 18 12 156 15 13
123 39 27 154 43 26 151 28 16 135 17 11 150 55 28 159 30 14
225 212 158 225 212 158 176 24 12 142 10 9 213 153 88 183 19 13
183 19 13 97 69 52 78 2 7 151 106 70 162 115 76 91 31 21
183 19 13 91 31 21 206 199 148 158 125 90 0 0 0 0 0 0
0 0 0 0 0 0 91 31 21 129 78 48 213 153 88 216 189 107
216 189 107 216 189 107 174 128 69 120 74 50 91 31 21 91 31 21
0 0 0 0 0 0 0 0 0 243 238 185 97 69 52 176 17 11
133 0 5 97 69 52 179 118 76 91 31 21 91 31 21 176 111 73
183 19 13 213 153 88 167 52 24 159 29 16 225 212 158 225 212 158
133 0 5 147 12 10 176 17 11 156 15 13 164 16 11 174 18 12
183 19 13 164 16 11 144 14 14
150 53 31 139 27 18 128 26 15 119 34 17 141 65 38 133 0 5
199 163 109 254 255 240 247 246 193 191 130 98 167 52 24 213 153 88
183 19 13 97 69 52 91 31 21 158 83 45 131 94 71 99 1 11
111 0 3 97 69 52 158 125 90 97 69 52 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
91 31 21 0 0 0 0 0 0 0 0 0 131 94 71 91 31 21
0 0 0 0 0 0 0 0 0 162 137 108 131 94 71 77 0 3
120 0 3 97 69 52 163 56 28 91 31 21 91 31 21 173 92 60
175 97 50 175 97 50 211 179 117 249 249 214 254 255 240 199 163 109
139 9 7 164 16 11 164 16 11 164 16 11 174 18 12 183 19 13
183 19 13 154 14 11 145 15 12
139 27 18 137 32 21 125 28 16 158 83 45 127 13 12 119 9 8
154 43 26 238 229 170 254 255 240 254 255 233 193 134 84 213 153 88
213 153 88 131 94 71 97 69 52 193 134 84 182 147 96 0 0 0
0 0 0 158 125 90 158 125 90 97 69 52 175 97 50 78 2 7
0 0 0 0 0 0 97 69 52 97 69 52 91 31 21 91 31 21
97 69 52 97 69 52 97 69 52 146 87 48 237 235 180 187 145 96
78 2 7 158 83 45 116 46 29 131 94 71 131 94 71 97 69 52
0 0 0 97 69 52 154 43 26 111 35 21 0 0 0 175 96 57
213 153 88 213 153 88 254 255 233 254 255 233 238 229 170 151 28 16
139 9 7 154 14 11 156 15 13 174 18 12 176 17 11 183 19 13
176 17 11 142 13 12 152 14 13
138 37 20 119 9 8 158 83 45 138 37 20 122 8 8 125 28 16
151 28 16 159 30 14 225 212 158 254 255 233 244 241 169 182 147 96
143 100 73 97 69 52 91 31 21 131 94 71 97 69 52 77 0 3
78 2 7 158 125 90 131 94 71 0 0 0 119 59 34 97 69 52
0 0 0 97 69 52 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 78 2 7 199 143 96 254 255 240 225 212 158
174 110 60 216 189 107 150 55 28 97 69 52 143 100 73 131 94 71
77 0 3 97 69 52 213 153 88 124 72 43 97 69 52 175 97 50
213 153 88 235 226 137 254 255 240 225 212 158 147 12 10 167 52 24
147 20 17 147 12 10 164 16 11 168 18 14 183 19 13 176 17 11
134 12 11 146 12 11 152 14 13
122 13 12 150 55 28 154 63 38 139 9 7 128 8 8 158 83 45
176 111 73 139 9 7 175 97 50 249 249 214 252 252 206 97 69 52
0 0 0 119 59 34 119 59 34 119 59 34 119 59 34 91 31 21
0 0 0 0 0 0 91 31 21 97 69 52 91 31 21 91 31 21
0 0 0 0 0 0 97 69 52 249 249 214 249 249 214 237 235 180
237 235 180 249 249 214 162 137 108 158 125 90 254 255 240 143 100 73
119 59 34 175 97 50 114 7 7 97 69 52 187 167 103 97 69 52
80 0 2 91 31 21 131 94 71 91 31 21 169 133 98 183 19 13
213 153 88 249 243 164 253 255 226 154 63 38 154 14 11 176 111 73
173 92 60 164 16 11 168 18 14 164 16 11 156 15 13 137 13 11
144 14 14 145 15 12 150 16 12
125 28 16 141 65 38 134 12 11 156 15 13 154 14 11 199 143 96
199 143 96 176 24 12 167 52 24 238 229 170 247 246 193 97 69 52
174 128 69 237 223 121 237 223 121 237 223 121 237 223 121 216 189 107
78 2 7 129 78 48 237 223 121 237 223 121 237 223 121 237 223 121
237 223 121 91 31 21 91 31 21 254 255 240 254 255 240 254 255 240
254 255 240 254 255 240 206 199 148 0 0 0 131 94 71 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 91 31 21 0 0 0 97 69 52 213 153 88
213 153 88 249 243 164 243 238 185 159 29 16 164 16 11 191 130 98
199 163 109 164 16 11 167 21 14 161 18 12 150 16 12 150 16 12
145 15 12 145 15 12 150 16 12
158 83 45 122 13 12 139 9 7 164 16 11 161 18 12 202 183 123
237 235 180 167 52 24 175 97 50 247 246 193 249 243 164 97 69 52
175 97 50 216 189 107 174 128 69 174 110 60 213 153 88 216 189 107
146 87 48 119 59 34 216 189 107 213 153 88 192 140 79 213 153 88
237 223 121 192 140 79 97 69 52 254 255 240 237 235 180 97 69 52
97 69 52 131 94 71 97 69 52 158 125 90 206 199 148 97 69 52
162 137 108 254 255 233 97 69 52 162 137 108 254 255 233 0 0 0
97 69 52 249 249 214 254 255 240 254 255 233 97 69 52 97 69 52
237 223 121 249 243 164 252 252 206 163 56 28 147 12 10 225 212 158
206 199 148 176 17 11 168 22 16 157 19 14 152 17 12 150 16 12
145 15 12 144 14 14 144 14 14
122 13 12 128 8 8 147 12 10 160 21 14 132 32 17 199 163 109
254 255 240 231 215 150 232 217 158 250 251 219 249 243 164 97 69 52
175 97 50 216 189 107 91 31 21 0 0 0 119 59 34 216 189 107
146 87 48 119 59 34 216 189 107 175 97 50 0 0 0 0 0 0
213 153 88 213 153 88 97 69 52 254 255 240 225 212 158 0 0 0
0 0 0 0 0 0 0 0 0 206 199 148 254 255 240 97 69 52
162 137 108 254 255 240 206 199 148 254 255 240 252 253 227 97 69 52
249 249 214 254 255 240 243 238 185 254 255 240 254 255 240 97 69 52
187 167 103 249 243 164 254 255 223 238 229 170 206 199 148 254 255 240
211 179 117 176 17 11 168 22 16 156 15 13 152 17 12 150 16 12
144 14 14 144 14 14 144 14 14
114 7 7 137 11 10 156 15 13 125 28 16 138 37 20 193 134 84
254 255 233 252 253 227 252 253 227 238 229 170 249 243 164 97 69 52
158 83 45 213 153 88 146 87 48 105 45 32 174 128 69 213 153 88
91 31 21 119 59 34 213 153 88 146 87 48 0 0 0 0 0 0
213 153 88 213 153 88 97 69 52 254 255 240 249 249 214 206 199 148
206 199 148 225 212 158 0 0 0 162 137 108 254 255 240 97 69 52
162 137 108 254 255 240 254 255 240 162 137 108 97 69 52 162 137 108
254 255 240 162 137 108 0 0 0 97 69 52 254 255 240 162 137 108
97 69 52 252 252 206 238 229 170 254 255 223 254 255 233 254 255 233
199 143 96 176 24 12 167 21 14 156 15 13 151 18 14 144 14 14
144 14 14 144 14 14 144 14 14
122 8 8 156 15 13 122 13 12 111 14 13 138 37 20 175 97 50
249 249 214 254 255 223 247 246 193 219 195 113 249 243 164 97 69 52
158 83 45 213 153 88 213 153 88 213 153 88 213 153 88 175 97 50
0 0 0 119 59 34 213 153 88 175 97 50 119 59 34 175 97 50
213 153 88 175 97 50 97 69 52 254 255 233 254 255 233 254 255 240
254 255 240 254 255 240 91 31 21 162 137 108 254 255 240 97 69 52
162 137 108 254 255 240 206 199 148 0 0 0 0 0 0 162 137 108
254 255 240 191 177 112 131 94 71 162 137 108 254 255 233 206 199 148
97 69 52 252 252 206 237 223 121 247 246 193 254 255 223 249 249 214
167 52 24 176 24 12 162 20 14 152 14 13 145 15 12 145 15 12
144 14 14 141 15 12 144 14 14
152 14 13 137 11 10 89 3 6 106 7 8 138 37 20 152 17 12
213 153 88 253 255 226 249 249 214 216 189 107 249 243 164 97 69 52
163 56 28 213 153 88 175 97 50 141 65 38 175 97 50 213 153 88
175 97 50 119 59 34 213 153 88 213 153 88 213 153 88 213 153 88
213 153 88 91 31 21 91 31 21 254 255 240 249 249 214 162 137 108
162 137 108 162 137 108 0 0 0 202 183 123 254 255 240 97 69 52
162 137 108 254 255 240 131 94 71 146 87 48 133 82 52 162 137 108
254 255 240 254 255 240 254 255 240 254 255 240 254 255 240 206 199 148
97 69 52 249 243 164 216 189 107 250 251 219 254 255 233 207 156 97
154 14 11 159 29 16 152 17 12 150 16 12 145 15 12 141 15 12
141 15 12 141 15 12 142 13 12
147 12 10 95 4 6 95 4 6 119 34 17 135 17 11 141 15 12
119 34 17 216 189 107 252 252 206 216 189 107 237 223 121 97 69 52
159 30 14 175 97 50 78 2 7 0 0 0 0 0 0 175 97 50
167 52 24 150 55 28 175 97 50 167 52 24 138 37 20 132 32 17
77 0 3 0 0 0 97 69 52 254 255 240 206 199 148 0 0 0
91 31 21 0 0 0 0 0 0 162 137 108 254 255 240 97 69 52
162 137 108 254 255 240 97 69 52 151 106 70 120 74 50 162 137 108
254 255 240 162 137 108 0 0 0 0 0 0 91 31 21 0 0 0
131 94 71 237 223 121 216 189 107 252 252 206 216 189 107 151 28 16
144 16 12 151 18 14 150 16 12 145 15 12 144 16 12 141 15 12
138 15 12 138 15 12 141 15 12
106 7 8 93 4 6 111 35 21 132 32 17 154 14 11 119 34 17
111 14 13 167 52 24 213 153 88 216 189 107 213 153 88 97 69 52
154 14 11 183 19 13 114 7 7 78 2 7 128 14 13 183 19 13
183 19 13 131 14 12 183 19 13 133 0 5 0 0 0 97 69 52
131 94 71 158 125 90 97 69 52 249 249 214 191 177 112 97 69 52
97 69 52 0 0 0 0 0 0 162 137 108 254 255 240 97 69 52
162 137 108 252 253 227 97 69 52 120 74 50 131 94 71 97 69 52
250 251 219 237 235 180 97 69 52 97 69 52 162 137 108 91 31 21
133 82 52 213 153 88 216 189 107 213 153 88 138 37 20 116 3 5
137 13 11 143 13 11 145 15 12 144 16 12 144 16 12 144 14 14
138 15 12 138 15 12 138 15 12
89 3 6 106 7 8 138 37 20 164 16 11 138 37 20 128 26 15
159 30 14 139 9 7 167 52 24 175 97 50 213 153 88 97 69 52
164 16 11 183 19 13 183 19 13 183 19 13 183 19 13 183 19 13
152 17 12 106 7 8 183 19 13 139 9 7 131 94 71 175 96 57
176 24 12 163 56 28 97 69 52 254 255 233 206 199 148 97 69 52
213 153 88 213 153 88 119 59 34 162 137 108 254 255 240 97 69 52
162 137 108 254 255 240 131 94 71 97 69 52 120 74 50 97 69 52
162 137 108 254 255 240 252 253 227 250 251 219 254 255 240 162 137 108
97 69 52 213 153 88 175 97 50 111 14 13 95 4 6 119 9 8
131 10 9 142 13 12 144 14 14 144 14 14 144 14 14 141 15 12
138 15 12 138 15 12 138 15 12
93 4 6 123 39 27 164 16 11 167 52 24 138 37 20 176 24 12
167 21 14 159 30 14 164 16 11 123 0 2 158 83 45 97 69 52
123 0 2 183 19 13 183 19 13 183 19 13 183 19 13 133 0 5
0 0 0 78 2 7 183 19 13 107 0 4 97 69 52 111 14 13
183 19 13 175 97 50 97 69 52 206 199 148 131 94 71 97 69 52
216 189 107 216 189 107 119 59 34 131 94 71 237 235 180 97 69 52
162 137 108 225 212 158 97 69 52 97 69 52 93 4 6 158 125 90
0 0 0 131 94 71 206 199 148 206 199 148 131 94 71 91 31 21
143 100 73 128 26 15 111 14 13 99 0 3 137 32 21 122 8 8
129 12 11 138 12 11 142 13 12 141 15 12 141 15 12 138 15 12
138 15 12 138 15 12 138 15 12
120 41 26 151 28 16 183 19 13 141 65 38 183 19 13 183 19 13
183 19 13 193 134 84 154 63 38 77 0 3 169 133 98 131 94 71
0 0 0 0 0 0 0 0 0 91 31 21 0 0 0 97 69 52
162 137 108 91 31 21 91 31 21 91 31 21 162 137 108 0 0 0
183 19 13 192 140 79 97 69 52 91 31 21 0 0 0 131 94 71
213 153 88 213 153 88 146 87 48 0 0 0 91 31 21 91 31 21
0 0 0 0 0 0 97 69 52 158 125 90 111 0 3 111 14 13
193 134 84 97 69 52 0 0 0 0 0 0 91 31 21 174 128 69
192 140 79 162 137 108 119 34 17 148 61 42 179 118 76 123 0 2
131 14 12 137 13 11 138 15 12 138 15 12 138 15 12 138 15 12
134 12 11 134 12 11 137 13 11
124 33 21 176 17 11 141 65 38 167 52 24 183 19 13 183 19 13
183 19 13 219 195 113 146 90 61 105 45 32 143 100 73 215 186 121
211 179 117 193 134 84 179 118 76 193 134 84 169 133 98 146 90 61
173 92 60 158 125 90 143 100 73 131 94 71 162 137 108 131 94 71
77 0 3 167 52 24 176 108 61 175 97 50 175 97 50 175 97 50
213 153 88 213 153 88 192 140 79 175 97 50 176 108 61 120 74 50
91 31 21 162 137 108 131 94 71 141 65 38 133 0 5 164 16 11
139 9 7 158 83 45 169 113 67 174 110 60 176 108 61 174 128 69
221 205 133 169 133 98 137 32 21 191 130 98 211 173 103 123 0 2
138 15 12 137 13 11 138 15 12 141 15 12 141 15 12 138 15 12
131 14 12 131 14 12 134 12 11
154 14 11 163 56 28 116 46 29 183 19 13 183 19 13 183 19 13
183 19 13 216 189 107 150 55 28 129 68 42 202 183 123 199 163 109
187 167 103 146 90 61 152 17 12 144 16 12 139 9 7 92 0 2
92 0 2 99 0 3 93 4 6 0 0 0 0 0 0 162 137 108
97 69 52 0 0 0 78 2 7 78 2 7 77 0 3 167 52 24
213 153 88 213 153 88 175 97 50 127 5 8 0 0 0 0 0 0
162 137 108 91 31 21 77 0 3 147 24 15 183 19 13 183 19 13
154 14 11 152 17 12 164 16 11 154 14 11 158 83 45 191 177 112
225 212 158 206 199 148 154 43 26 175 97 50 175 97 50 133 0 5
137 13 11 138 15 12 138 15 12 138 15 12 138 15 12 138 15 12
131 14 12 138 15 12 134 12 11
176 24 12 123 39 27 183 19 13 183 19 13 183 19 13 183 19 13
158 83 45 175 97 50 152 48 27 95 4 6 237 235 180 232 217 158
199 163 109 182 147 96 174 128 69 175 97 50 175 97 50 167 52 24
176 17 11 164 16 11 167 52 24 158 83 45 99 0 3 77 0 3
162 137 108 131 94 71 0 0 0 0 0 0 0 0 0 111 35 21
158 83 45 158 83 45 91 31 21 0 0 0 91 31 21 191 177 112
91 31 21 77 0 3 151 28 16 213 153 88 183 19 13 183 19 13
183 19 13 175 97 50 175 97 50 192 140 79 187 167 103 221 205 133
254 255 210 237 235 180 139 9 7 176 24 12 183 19 13 137 11 10
137 13 11 138 15 12 138 15 12 138 15 12 138 15 12 134 12 11
131 14 12 134 12 11 131 12 12
154 43 26 156 20 14 183 19 13 183 19 13 183 19 13 175 97 50
78 2 7 119 9 8 224 209 127 136 76 50 140 85 58 249 249 214
232 217 158 206 199 148 195 174 110 213 153 88 208 170 99 175 97 50
183 19 13 183 19 13 183 19 13 213 153 88 127 5 8 116 3 5
77 0 3 158 125 90 162 137 108 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 131 94 71 162 137 108 91 31 21
92 0 2 133 0 5 175 97 50 213 153 88 183 19 13 183 19 13
183 19 13 213 153 88 216 189 107 216 189 107 221 205 133 247 246 193
253 255 226 158 83 45 154 63 38 213 153 88 183 19 13 134 12 11
137 13 11 137 13 11 138 15 12 138 15 12 138 15 12 131 14 12
131 14 12 131 12 12 131 14 12
128 26 15 183 19 13 183 19 13 183 19 13 175 97 50 104 58 46
0 0 0 93 4 6 238 229 170 237 235 180 87 1 5 136 76 50
202 183 123 202 183 123 225 212 158 232 217 158 235 226 137 213 153 88
183 19 13 213 153 88 183 19 13 213 153 88 147 12 10 176 17 11
135 17 11 77 0 3 104 58 46 202 183 123 91 31 21 0 0 0
97 69 52 0 0 0 162 137 108 131 94 71 77 0 3 111 14 13
169 21 14 133 0 5 175 97 50 175 97 50 175 97 50 175 97 50
175 97 50 237 223 121 232 217 158 232 217 158 225 212 158 206 199 148
158 83 45 120 0 3 232 217 158 237 223 121 139 9 7 134 12 11
137 13 11 134 12 11 134 12 11 138 15 12 138 15 12 131 14 12
131 14 12 131 14 12 128 14 13
138 37 20 183 19 13 183 19 13 175 97 50 146 87 48 0 0 0
78 2 7 77 0 3 136 76 50 225 212 158 119 34 17 123 0 2
107 0 4 127 13 12 132 32 17 238 229 170 253 254 208 213 153 88
213 153 88 213 153 88 183 19 13 175 97 50 183 19 13 183 19 13
183 19 13 156 20 14 99 0 3 97 69 52 131 94 71 0 0 0
97 69 52 97 69 52 131 94 71 77 0 3 127 13 12 183 19 13
164 16 11 183 19 13 213 153 88 183 19 13 213 153 88 213 153 88
213 153 88 241 232 158 252 252 206 175 96 57 135 17 11 122 7 7
107 0 4 125 28 16 225 212 158 158 83 45 123 0 2 134 12 11
137 13 11 137 13 11 134 12 11 138 15 12 131 14 12 128 14 13
128 14 13 128 14 13 131 12 12
167 52 24 183 19 13 183 19 13 175 97 50 0 0 0 77 0 3
78 2 7 78 2 7 87 1 5 119 34 17 143 19 14 114 7 7
109 5 7 143 80 49 107 0 4 199 143 96 254 255 240 237 223 121
213 153 88 213 153 88 175 97 50 183 19 13 175 97 50 183 19 13
183 19 13 175 97 50 176 17 11 109 5 7 162 137 108 97 69 52
97 69 52 131 94 71 120 38 28 142 10 9 183 19 13 175 97 50
183 19 13 183 19 13 175 97 50 167 52 24 213 153 88 213 153 88
216 189 107 254 255 223 238 229 170 139 9 7 143 80 49 125 28 16
102 4 5 116 9 9 128 26 15 116 3 5 122 13 12 131 12 12
134 12 11 134 12 11 134 12 11 131 14 12 131 14 12 128 14 13
128 14 13 128 14 13 128 14 13
183 19 13 183 19 13 176 108 61 91 31 21 0 0 0 78 2 7
78 2 7 89 3 6 78 2 7 131 10 9 106 7 8 102 4 5
147 12 10 158 83 45 123 0 2 179 118 76 254 255 240 247 246 193
216 189 107 216 189 107 213 153 88 213 153 88 213 153 88 183 19 13
213 153 88 213 153 88 183 19 13 183 19 13 191 130 98 97 69 52
0 0 0 169 133 98 183 19 13 183 19 13 175 97 50 213 153 88
183 19 13 175 97 50 213 153 88 213 153 88 213 153 88 213 153 88
235 226 137 254 255 233 206 199 148 128 8 8 147 67 48 122 13 12
111 3 7 117 6 7 109 5 7 106 7 8 122 13 12 131 12 12
131 14 12 131 14 12 131 14 12 131 14 12 131 14 12 128 14 13
128 14 13 128 14 13 128 14 13
183 19 13 175 97 50 119 70 46 0 0 0 77 0 3 78 2 7
89 3 6 78 2 7 128 8 8 134 12 11 78 2 7 154 14 11
135 17 11 176 111 73 123 0 2 148 61 42 254 255 223 252 253 227
249 243 164 237 223 121 216 189 107 216 189 107 213 153 88 183 19 13
216 189 107 213 153 88 183 19 13 183 19 13 183 19 13 131 94 71
97 69 52 175 96 57 175 97 50 183 19 13 213 153 88 216 189 107
183 19 13 175 97 50 216 189 107 213 153 88 216 189 107 237 223 121
252 252 206 254 255 233 191 130 98 120 0 3 176 111 73 128 14 13
111 3 7 119 9 8 116 9 9 116 9 9 122 13 12 131 12 12
131 14 12 131 14 12 131 14 12 128 14 13 128 14 13 128 14 13
128 14 13 128 14 13 128 14 13
175 97 50 175 97 50 0 0 0 77 0 3 78 2 7 78 2 7
89 3 6 114 7 7 183 19 13 78 2 7 154 14 11 160 21 14
103 5 5 103 5 5 103 5 5 133 0 5 225 212 158 254 255 240
249 249 214 244 241 169 237 223 121 249 243 164 193 134 84 175 97 50
237 223 121 216 189 107 213 153 88 175 97 50 183 19 13 169 133 98
162 137 108 183 19 13 213 153 88 175 97 50 213 153 88 237 223 121
175 97 50 183 19 13 247 246 193 235 226 137 237 223 121 252 252 206
254 255 223 250 251 219 163 56 28 116 3 5 116 3 5 118 7 7
116 9 9 116 9 9 116 9 9 122 13 12 128 14 13 131 14 12
131 14 12 131 14 12 128 14 13 128 14 13 128 14 13 128 14 13
124 14 13 124 14 13 128 14 13
176 108 61 78 2 7 77 0 3 77 0 3 78 2 7 89 3 6
89 3 6 183 19 13 122 13 12 128 6 9 183 19 13 111 14 13
111 14 13 106 7 8 117 6 7 139 9 7 175 97 50 249 249 214
254 255 240 254 255 233 254 255 240 225 212 158 154 43 26 176 111 73
211 179 117 254 255 210 237 223 121 213 153 88 183 19 13 213 153 88
199 143 96 175 97 50 237 223 121 213 153 88 167 52 24 237 223 121
237 223 121 159 30 14 191 130 98 254 255 240 254 255 240 254 255 240
254 255 233 191 130 98 120 0 3 116 9 9 119 5 9 116 3 5
116 3 5 116 3 5 119 5 9 125 8 10 125 8 10 127 13 12
131 14 12 131 14 12 128 14 13 128 14 13 128 14 13 124 14 13
124 14 13 128 14 13 128 14 13
91 31 21 0 0 0 77 0 3 78 2 7 89 3 6 78 2 7
174 18 12 174 18 12 106 7 8 183 19 13 151 28 16 111 14 13
111 14 13 127 5 8 122 7 7 176 24 12 167 52 24 158 83 45
191 130 98 202 183 123 179 118 76 122 13 12 120 0 3 191 130 98
163 56 28 199 163 109 254 255 210 213 153 88 213 153 88 175 97 50
175 97 50 213 153 88 249 243 164 237 223 121 176 17 11 167 52 24
249 243 164 176 111 73 92 0 2 147 67 48 199 163 109 199 163 109
147 67 48 107 0 4 106 7 8 114 7 7 137 32 21 124 33 21
124 33 21 137 32 21 124 33 21 137 32 21 137 32 21 137 32 21
131 14 12 131 14 12 128 14 13 128 14 13 127 13 12 124 14 13
122 13 12 124 14 13 127 13 12
0 0 0 77 0 3 77 0 3 78 2 7 78 2 7 131 14 12
183 19 13 91 2 10 183 19 13 183 19 13 125 28 16 125 28 16
131 9 10 116 3 5 152 17 12 176 24 12 167 52 24 111 14 13
92 0 2 111 14 13 95 4 6 89 3 6 133 0 5 238 229 170
191 130 98 139 9 7 249 249 214 211 179 117 175 97 50 213 153 88
213 153 88 235 226 137 244 241 169 235 226 137 164 16 11 199 163 109
254 255 240 176 111 73 80 0 2 89 3 6 87 1 5 80 0 2
80 0 2 89 3 6 102 4 5 116 9 9 148 61 42 136 76 50
147 67 48 147 67 48 118 44 32 147 67 48 147 67 48 150 53 31
127 13 12 128 14 13 127 13 12 127 13 12 127 13 12 124 14 13
124 14 13 122 13 12 122 13 12
0 0 0 77 0 3 78 2 7 78 2 7 93 4 6 183 19 13
106 7 8 154 14 11 183 19 13 132 32 17 132 32 17 138 15 12
127 5 8 144 16 12 183 19 13 176 24 12 111 14 13 78 2 7
91 31 21 91 31 21 78 2 7 123 0 2 154 43 26 252 253 227
154 63 38 150 53 31 254 255 240 191 130 98 167 52 24 237 223 121
235 226 137 247 246 193 254 255 210 215 186 121 158 83 45 254 255 240
249 249 214 119 34 17 119 70 46 91 31 21 77 0 3 78 2 7
78 2 7 87 1 5 102 4 5 116 9 9 123 39 27 148 61 42
125 28 16 125 28 16 125 28 16 123 39 27 148 61 42 148 61 42
122 13 12 122 13 12 128 14 13 127 13 12 124 14 13 122 13 12
122 13 12 122 13 12 122 13 12
0 0 0 77 0 3 78 2 7 78 2 7 183 19 13 143 19 14
116 3 5 183 19 13 152 48 27 124 33 21 128 26 15 139 9 7
135 17 11 183 19 13 183 19 13 151 28 16 77 0 3 91 31 21
91 31 21 77 0 3 105 1 7 133 0 5 103 5 5 249 249 214
191 130 98 176 111 73 206 199 148 147 12 10 158 83 45 249 243 164
252 252 206 252 252 206 254 255 223 173 92 60 176 111 73 254 255 240
173 92 60 92 0 2 78 2 7 77 0 3 77 0 3 77 0 3
78 2 7 89 3 6 106 7 8 119 9 8 122 13 12 122 8 8
119 5 9 119 9 8 119 9 8 119 9 8 122 13 12 128 14 13
127 13 12 127 13 12 127 13 12 124 14 13 124 14 13 122 13 12
122 13 12 122 13 12 122 13 12
77 0 3 77 0 3 78 2 7 143 13 11 183 19 13 91 2 10
183 19 13 167 52 24 119 34 17 125 28 16 145 11 11 122 13 12
183 19 13 183 19 13 183 19 13 78 2 7 78 2 7 91 31 21
77 0 3 78 2 7 127 5 8 89 3 6 80 0 2 153 103 68
179 118 76 111 0 3 119 9 8 122 7 7 173 92 60 254 255 223
249 249 214 254 255 223 221 205 133 123 0 2 140 85 58 249 249 214
122 8 8 89 3 6 78 2 7 78 2 7 78 2 7 78 2 7
87 1 5 95 4 6 114 7 7 122 13 12 125 8 10 122 13 12
124 14 13 127 13 12 127 13 12 127 13 12 127 13 12 127 13 12
127 13 12 124 14 13 124 14 13 124 14 13 122 13 12 122 13 12
122 13 12 122 13 12 122 13 12
77 0 3 77 0 3 95 4 6 183 19 13 103 5 5 164 16 11
183 19 13 124 33 21 124 33 21 142 10 9 122 8 8 176 24 12
183 19 13 183 19 13 128 14 13 78 2 7 105 45 32 78 2 7
78 2 7 125 8 10 102 4 5 79 0 3 93 4 6 103 5 5
111 14 13 111 14 13 111 14 13 114 7 7 176 111 73 253 255 226
250 251 219 249 249 214 167 52 24 119 34 17 118 44 32 162 115 76
111 14 13 87 1 5 93 4 6 93 4 6 93 4 6 93 4 6
95 4 6 106 7 8 116 9 9 122 13 12 127 13 12 127 13 12
128 14 13 128 14 13 127 13 12 128 14 13 128 14 13 128 14 13
127 13 12 124 14 13 124 14 13 124 14 13 124 14 13 122 13 12
122 13 12 122 13 12 116 9 9
77 0 3 77 0 3 183 19 13 142 10 9 119 5 9 183 19 13
138 37 20 124 33 21 135 17 11 139 9 7 147 24 15 183 19 13
183 19 13 167 52 24 80 0 2 114 50 39 91 31 21 77 0 3
131 9 10 128 6 9 87 1 5 93 4 6 95 4 6 103 5 5
95 4 6 119 34 17 138 37 20 103 5 5 179 118 76 254 255 233
254 255 233 199 163 109 138 37 20 91 31 21 91 31 21 80 0 2
89 3 6 93 4 6 102 4 5 106 7 8 106 7 8 106 7 8
106 7 8 106 7 8 116 9 9 124 14 13 127 13 12 127 13 12
124 14 13 124 14 13 124 14 13 128 14 13 124 14 13 124 14 13
124 14 13 124 14 13 124 14 13 122 13 12 122 13 12 122 13 12
122 13 12 116 9 9 116 9 9
77 0 3 154 14 11 176 17 11 89 3 6 183 19 13 167 52 24
124 33 21 124 33 21 145 11 11 128 14 13 183 19 13 183 19 13
167 52 24 99 0 3 111 35 21 105 45 32 77 0 3 116 9 9
147 12 10 93 4 6 95 4 6 106 7 8 103 5 5 103 5 5
92 0 2 119 59 34 148 61 42 106 7 8 179 118 76 254 255 240
243 238 185 163 56 28 119 59 34 111 35 21 111 35 21 80 0 2
89 3 6 102 4 5 106 7 8 114 7 7 114 7 7 106 7 8
116 9 9 116 9 9 122 13 12 124 14 13 127 13 12 122 13 12
122 13 12 122 13 12 124 14 13 124 14 13 124 14 13 122 13 12
124 14 13 122 13 12 124 14 13 122 13 12 122 13 12 122 13 12
122 13 12 122 13 12 122 13 12
103 5 5 183 19 13 78 2 7 176 17 11 167 52 24 119 34 17
124 33 21 137 11 10 125 8 10 176 24 12 183 19 13 183 19 13
129 12 11 91 2 10 119 70 46 78 2 7 106 7 8 176 17 11
111 1 9 95 4 6 106 7 8 106 7 8 106 7 8 103 5 5
102 4 5 102 4 5 111 14 13 124 33 21 179 118 76 254 255 240
176 111 73 119 9 8 95 4 6 141 65 38 141 65 38 80 0 2
99 1 11 106 7 8 114 7 7 114 7 7 116 9 9 116 9 9
116 9 9 116 9 9 122 13 12 122 13 12 124 14 13 124 14 13
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
122 13 12 122 13 12 124 14 13 122 13 12 122 13 12 122 13 12
116 9 9 116 9 9 116 9 9
183 19 13 106 7 8 133 0 5 183 19 13 138 37 20 125 28 16
128 14 13 127 5 8 157 23 16 183 19 13 183 19 13 176 24 12
79 0 3 119 70 46 91 31 21 89 3 6 176 17 11 142 10 9
91 2 10 114 7 7 114 7 7 114 7 7 109 5 7 106 7 8
102 4 5 103 5 5 106 7 8 92 0 2 191 130 98 191 130 98
119 9 8 111 14 13 106 7 8 103 5 5 102 4 5 95 4 6
106 7 8 109 5 7 114 7 7 116 9 9 116 9 9 119 9 8
119 9 8 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
124 14 13 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
116 9 9 116 9 9 119 9 8
135 17 11 99 1 11 183 19 13 167 52 24 119 34 17 125 28 16
147 12 10 131 14 12 183 19 13 183 19 13 183 19 13 87 1 5
105 45 32 105 45 32 77 0 3 145 11 11 176 17 11 95 4 6
106 7 8 116 9 9 119 9 8 119 9 8 116 9 9 109 5 7
106 7 8 106 7 8 102 4 5 106 7 8 124 33 21 103 5 5
93 4 6 93 4 6 106 7 8 106 7 8 102 4 5 106 7 8
109 5 7 114 7 7 116 9 9 119 9 8 119 9 8 122 13 12
122 13 12 119 9 8 119 9 8 119 9 8 122 13 12 122 13 12
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
122 13 12 122 13 12 122 13 12 122 13 12 122 13 12 122 13 12
116 9 9 116 9 9 119 9 8

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,20 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 6.6.60 Kernel Configuration
# Linux/arm64 6.6.15-ipfire Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140200
CONFIG_GCC_VERSION=130200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24300
CONFIG_AS_VERSION=24100
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24300
CONFIG_LD_VERSION=24100
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
CONFIG_CC_HAS_ASM_GOTO_OUTPUT=y
CONFIG_CC_HAS_ASM_GOTO_TIED_OUTPUT=y
CONFIG_TOOLS_SUPPORT_RELR=y
CONFIG_CC_HAS_ASM_INLINE=y
CONFIG_CC_HAS_NO_PROFILE_FN_ATTR=y
CONFIG_PAHOLE_VERSION=0
@@ -93,12 +92,9 @@ CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
#
# BPF subsystem
#
CONFIG_BPF_SYSCALL=y
# CONFIG_BPF_SYSCALL is not set
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
# end of BPF subsystem
CONFIG_PREEMPT_BUILD=y
@@ -139,7 +135,6 @@ CONFIG_TREE_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_TASKS_RCU=y
CONFIG_TASKS_RUDE_RCU=y
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
# end of RCU Subsystem
@@ -160,7 +155,7 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_CGROUPS=y
@@ -183,7 +178,6 @@ CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set
# CONFIG_CGROUP_MISC is not set
# CONFIG_CGROUP_DEBUG is not set
CONFIG_SOCK_CGROUP_DATA=y
@@ -234,7 +228,7 @@ CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_IO_URING=y
# CONFIG_IO_URING is not set
CONFIG_ADVISE_SYSCALLS=y
CONFIG_MEMBARRIER=y
CONFIG_KALLSYMS=y
@@ -387,7 +381,6 @@ CONFIG_ARM64_ERRATUM_2645198=y
CONFIG_ARM64_WORKAROUND_SPECULATIVE_UNPRIV_LOAD=y
CONFIG_ARM64_ERRATUM_2966298=y
CONFIG_ARM64_ERRATUM_3117295=y
CONFIG_ARM64_ERRATUM_3194386=y
CONFIG_CAVIUM_ERRATUM_22375=y
CONFIG_CAVIUM_ERRATUM_23154=y
CONFIG_CAVIUM_ERRATUM_27456=y
@@ -598,7 +591,6 @@ CONFIG_ARM_ARMADA_37XX_CPUFREQ=m
CONFIG_ARM_ARMADA_8K_CPUFREQ=m
CONFIG_ARM_IMX6Q_CPUFREQ=m
CONFIG_ARM_IMX_CPUFREQ_DT=m
CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
CONFIG_ARM_SCMI_CPUFREQ=m
CONFIG_QORIQ_CPUFREQ=m
# end of CPU Frequency scaling
@@ -671,7 +663,6 @@ CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
CONFIG_VIRTUALIZATION=y
CONFIG_KVM=y
# CONFIG_NVHE_EL2_DEBUG is not set
CONFIG_CPU_MITIGATIONS=y
#
# General architecture-dependent options
@@ -772,7 +763,6 @@ CONFIG_HAVE_ARCH_COMPILER_H=y
CONFIG_HAVE_ARCH_PREL32_RELOCATIONS=y
CONFIG_ARCH_USE_MEMREMAP_PROT=y
CONFIG_ARCH_HAS_RELR=y
CONFIG_RELR=y
CONFIG_HAVE_PREEMPT_DYNAMIC=y
CONFIG_HAVE_PREEMPT_DYNAMIC_KEY=y
CONFIG_ARCH_WANT_LD_ORPHAN_WARN=y
@@ -963,7 +953,6 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
CONFIG_PAGE_REPORTING=y
CONFIG_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
@@ -1045,8 +1034,6 @@ CONFIG_XFRM_ESP=m
CONFIG_XFRM_IPCOMP=m
CONFIG_NET_KEY=m
CONFIG_NET_KEY_MIGRATE=y
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=m
CONFIG_NET_HANDSHAKE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
@@ -1155,7 +1142,6 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_FAMILY_BRIDGE=y
CONFIG_NETFILTER_FAMILY_ARP=y
CONFIG_NETFILTER_BPF_LINK=y
# CONFIG_NETFILTER_NETLINK_HOOK is not set
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
@@ -3666,7 +3652,7 @@ CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
CONFIG_N_HDLC=m
# CONFIG_N_GSM is not set
CONFIG_N_GSM=m
# CONFIG_NOZOMI is not set
# CONFIG_NULL_TTY is not set
CONFIG_HVC_DRIVER=y
@@ -4570,6 +4556,7 @@ CONFIG_MFD_SM501_GPIO=y
# CONFIG_MFD_STMPE is not set
CONFIG_MFD_SUN6I_PRCM=y
CONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_LP8788 is not set
# CONFIG_MFD_TI_LMU is not set
@@ -5548,7 +5535,6 @@ CONFIG_DVB_SP2=m
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
# CONFIG_AUXDISPLAY is not set
@@ -5836,7 +5822,6 @@ CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_DMAMEM_HELPERS=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
@@ -6474,14 +6459,12 @@ CONFIG_HID_THINGM=m
CONFIG_HID_ZYDACRON=m
# CONFIG_HID_SENSOR_HUB is not set
# CONFIG_HID_ALPS is not set
# CONFIG_HID_MCP2200 is not set
# CONFIG_HID_MCP2221 is not set
# end of Special HID drivers
#
# HID-BPF support
#
# CONFIG_HID_BPF is not set
# end of HID-BPF support
#
@@ -7288,7 +7271,7 @@ CONFIG_COMMON_CLK_XGENE=y
# CONFIG_COMMON_CLK_FIXED_MMIO is not set
CONFIG_CLK_BCM2711_DVP=y
CONFIG_CLK_BCM2835=y
CONFIG_CLK_RASPBERRYPI=y
# CONFIG_CLK_RASPBERRYPI is not set
CONFIG_MXC_CLK=m
CONFIG_MXC_CLK_SCU=m
CONFIG_CLK_IMX8MM=m
@@ -7541,7 +7524,6 @@ CONFIG_EXTCON=y
# CONFIG_EXTCON_USB_GPIO is not set
CONFIG_MEMORY=y
# CONFIG_ARM_PL172_MPMC is not set
CONFIG_FSL_IFC=y
# CONFIG_IIO is not set
# CONFIG_NTB is not set
CONFIG_PWM=y
@@ -8046,7 +8028,6 @@ CONFIG_NLS_UTF8=m
CONFIG_NLS_UCS2_UTILS=m
# CONFIG_DLM is not set
# CONFIG_UNICODE is not set
CONFIG_IO_WQ=y
# end of File systems
#
@@ -8059,9 +8040,6 @@ CONFIG_KEYS=y
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEY_DH_OPERATIONS is not set
CONFIG_SECURITY_DMESG_RESTRICT=y
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
@@ -8087,7 +8065,7 @@ CONFIG_INTEGRITY=y
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
# CONFIG_EVM is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
#
# Kernel hardening options
@@ -8138,7 +8116,6 @@ CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
@@ -8562,6 +8539,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
CONFIG_CMA_ALIGNMENT=8
# CONFIG_DMA_API_DEBUG is not set
CONFIG_SGL_ALLOC=y
# CONFIG_FORCE_NR_CPUS is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y

View File

@@ -0,0 +1,12 @@
CONFIG_BPF_SYSCALL=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
CONFIG_KPROBES=y
CONFIG_KPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_UPROBES=y
CONFIG_UPROBE_EVENTS=y
CONFIG_DEBUG_FS=y
CONFIG_MODULE_SIG_FORCE=n

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/riscv 6.6.60 Kernel Configuration
# Linux/riscv 6.6.15-ipfire Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140200
CONFIG_GCC_VERSION=130200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24300
CONFIG_AS_VERSION=24100
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24300
CONFIG_LD_VERSION=24100
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -102,13 +102,8 @@ CONFIG_HAVE_EBPF_JIT=y
#
# BPF subsystem
#
CONFIG_BPF_SYSCALL=y
# CONFIG_BPF_SYSCALL is not set
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
# CONFIG_BPF_LSM is not set
# end of BPF subsystem
CONFIG_PREEMPT_VOLUNTARY_BUILD=y
@@ -143,7 +138,6 @@ CONFIG_TREE_RCU=y
CONFIG_TREE_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_TASKS_RUDE_RCU=y
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
# end of RCU Subsystem
@@ -162,7 +156,7 @@ CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_CGROUPS=y
@@ -185,7 +179,6 @@ CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set
# CONFIG_CGROUP_MISC is not set
# CONFIG_CGROUP_DEBUG is not set
CONFIG_SOCK_CGROUP_DATA=y
@@ -243,7 +236,6 @@ CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_SELFTEST is not set
CONFIG_KALLSYMS_ALL=y
CONFIG_KALLSYMS_BASE_RELATIVE=y
CONFIG_ARCH_HAS_MEMBARRIER_CALLBACKS=y
CONFIG_KCMP=y
CONFIG_RSEQ=y
CONFIG_CACHESTAT_SYSCALL=y
@@ -294,7 +286,6 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_GENERIC_CSUM=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
CONFIG_PGTABLE_LEVELS=5
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_RISCV_DMA_NONCOHERENT=y
@@ -498,7 +489,6 @@ CONFIG_ACPI_WATCHDOG=y
# CONFIG_ACPI_PFRUT is not set
# CONFIG_ACPI_FFH is not set
# CONFIG_PMIC_OPREGION is not set
CONFIG_CPU_MITIGATIONS=y
#
# General architecture-dependent options
@@ -763,7 +753,6 @@ CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
CONFIG_PAGE_REPORTING=y
CONFIG_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
@@ -836,8 +825,6 @@ CONFIG_XFRM_ESP=m
CONFIG_XFRM_IPCOMP=m
CONFIG_NET_KEY=m
CONFIG_NET_KEY_MIGRATE=y
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=m
CONFIG_NET_HANDSHAKE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
@@ -946,7 +933,6 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_FAMILY_BRIDGE=y
CONFIG_NETFILTER_FAMILY_ARP=y
CONFIG_NETFILTER_BPF_LINK=y
# CONFIG_NETFILTER_NETLINK_HOOK is not set
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
@@ -3332,7 +3318,7 @@ CONFIG_SERIAL_NONSTANDARD=y
CONFIG_N_HDLC=m
# CONFIG_GOLDFISH_TTY is not set
# CONFIG_IPWIRELESS is not set
# CONFIG_N_GSM is not set
CONFIG_N_GSM=m
CONFIG_NOZOMI=m
# CONFIG_NULL_TTY is not set
CONFIG_HVC_DRIVER=y
@@ -4091,6 +4077,7 @@ CONFIG_MFD_SM501=m
CONFIG_MFD_SM501_GPIO=y
# CONFIG_MFD_SKY81452 is not set
CONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_TPS6105X is not set
@@ -4933,7 +4920,6 @@ CONFIG_DVB_SP2=m
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
# CONFIG_AUXDISPLAY is not set
@@ -5161,7 +5147,6 @@ CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
@@ -5507,7 +5492,6 @@ CONFIG_HID_ZYDACRON=m
CONFIG_HID_SENSOR_HUB=m
# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set
# CONFIG_HID_ALPS is not set
# CONFIG_HID_MCP2200 is not set
# CONFIG_HID_MCP2221 is not set
# end of Special HID drivers
@@ -6737,9 +6721,6 @@ CONFIG_KEYS=y
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEY_DH_OPERATIONS is not set
CONFIG_SECURITY_DMESG_RESTRICT=y
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
@@ -6764,7 +6745,7 @@ CONFIG_INTEGRITY=y
# CONFIG_IMA is not set
# CONFIG_EVM is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
#
# Kernel hardening options
@@ -6814,7 +6795,6 @@ CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
@@ -7141,6 +7121,7 @@ CONFIG_DMA_DIRECT_REMAP=y
# CONFIG_DMA_API_DEBUG is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
# CONFIG_FORCE_NR_CPUS is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y
@@ -7402,7 +7383,6 @@ CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
CONFIG_UPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_DYNAMIC_EVENTS=y
CONFIG_PROBE_EVENTS=y
CONFIG_FTRACE_MCOUNT_RECORD=y

View File

@@ -1,15 +1,15 @@
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.63 Kernel Configuration
# Linux/x86 6.6.15-ipfire Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 14.2.0"
CONFIG_CC_VERSION_TEXT="gcc (GCC) 13.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=140200
CONFIG_GCC_VERSION=130200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24300
CONFIG_AS_VERSION=24100
CONFIG_LD_IS_BFD=y
CONFIG_LD_VERSION=24300
CONFIG_LD_VERSION=24100
CONFIG_LLD_VERSION=0
CONFIG_CC_CAN_LINK=y
CONFIG_CC_CAN_LINK_STATIC=y
@@ -112,12 +112,9 @@ CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
#
# BPF subsystem
#
CONFIG_BPF_SYSCALL=y
# CONFIG_BPF_SYSCALL is not set
CONFIG_BPF_JIT=y
CONFIG_BPF_JIT_ALWAYS_ON=y
CONFIG_BPF_JIT_DEFAULT_ON=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
# CONFIG_BPF_PRELOAD is not set
# end of BPF subsystem
CONFIG_PREEMPT_BUILD=y
@@ -158,7 +155,6 @@ CONFIG_TREE_SRCU=y
CONFIG_TASKS_RCU_GENERIC=y
CONFIG_TASKS_RCU=y
CONFIG_TASKS_RUDE_RCU=y
CONFIG_TASKS_TRACE_RCU=y
CONFIG_RCU_STALL_COMMON=y
CONFIG_RCU_NEED_SEGCBLIST=y
# end of RCU Subsystem
@@ -179,7 +175,7 @@ CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y
CONFIG_ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH=y
CONFIG_CC_HAS_INT128=y
CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
CONFIG_GCC10_NO_ARRAY_BOUNDS=y
CONFIG_GCC11_NO_ARRAY_BOUNDS=y
CONFIG_CC_NO_ARRAY_BOUNDS=y
CONFIG_ARCH_SUPPORTS_INT128=y
CONFIG_CGROUPS=y
@@ -202,7 +198,6 @@ CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CGROUP_CPUACCT=y
CONFIG_CGROUP_PERF=y
# CONFIG_CGROUP_BPF is not set
# CONFIG_CGROUP_MISC is not set
# CONFIG_CGROUP_DEBUG is not set
CONFIG_SOCK_CGROUP_DATA=y
@@ -253,7 +248,7 @@ CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_IO_URING=y
# CONFIG_IO_URING is not set
CONFIG_ADVISE_SYSCALLS=y
CONFIG_MEMBARRIER=y
CONFIG_KALLSYMS=y
@@ -391,10 +386,10 @@ CONFIG_DMI=y
# CONFIG_GART_IOMMU is not set
CONFIG_BOOT_VESA_SUPPORT=y
# CONFIG_MAXSMP is not set
CONFIG_NR_CPUS_RANGE_BEGIN=2
CONFIG_NR_CPUS_RANGE_BEGIN=512
CONFIG_NR_CPUS_RANGE_END=512
CONFIG_NR_CPUS_DEFAULT=64
CONFIG_NR_CPUS=64
CONFIG_NR_CPUS_DEFAULT=512
CONFIG_NR_CPUS=512
CONFIG_SCHED_CLUSTER=y
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
@@ -481,6 +476,7 @@ CONFIG_PHYSICAL_ALIGN=0x400000
CONFIG_DYNAMIC_MEMORY_LAYOUT=y
CONFIG_RANDOMIZE_MEMORY=y
CONFIG_RANDOMIZE_MEMORY_PHYSICAL_PADDING=0x0
# CONFIG_ADDRESS_MASKING is not set
CONFIG_HOTPLUG_CPU=y
# CONFIG_LEGACY_VSYSCALL_XONLY is not set
CONFIG_LEGACY_VSYSCALL_NONE=y
@@ -500,7 +496,7 @@ CONFIG_CALL_PADDING=y
CONFIG_HAVE_CALL_THUNKS=y
CONFIG_CALL_THUNKS=y
CONFIG_PREFIX_SYMBOLS=y
CONFIG_CPU_MITIGATIONS=y
CONFIG_SPECULATION_MITIGATIONS=y
CONFIG_PAGE_TABLE_ISOLATION=y
CONFIG_RETPOLINE=y
CONFIG_RETHUNK=y
@@ -512,8 +508,6 @@ CONFIG_CPU_IBRS_ENTRY=y
CONFIG_CPU_SRSO=y
CONFIG_SLS=y
# CONFIG_GDS_FORCE_MITIGATION is not set
CONFIG_MITIGATION_RFDS=y
CONFIG_MITIGATION_SPECTRE_BHI=y
CONFIG_ARCH_HAS_ADD_PAGES=y
#
@@ -702,7 +696,6 @@ CONFIG_AS_SHA256_NI=y
CONFIG_AS_TPAUSE=y
CONFIG_AS_GFNI=y
CONFIG_AS_WRUSS=y
CONFIG_ARCH_CONFIGURES_CPU_MITIGATIONS=y
#
# General architecture-dependent options
@@ -1016,7 +1009,6 @@ CONFIG_PAGE_REPORTING=y
CONFIG_MIGRATION=y
CONFIG_ARCH_ENABLE_THP_MIGRATION=y
CONFIG_CONTIG_ALLOC=y
CONFIG_PCP_BATCH_SCALE_MAX=5
CONFIG_PHYS_ADDR_T_64BIT=y
CONFIG_MMU_NOTIFIER=y
CONFIG_KSM=y
@@ -1104,8 +1096,6 @@ CONFIG_XFRM_ESP=m
CONFIG_XFRM_IPCOMP=m
CONFIG_NET_KEY=m
CONFIG_NET_KEY_MIGRATE=y
CONFIG_XDP_SOCKETS=y
CONFIG_XDP_SOCKETS_DIAG=m
CONFIG_NET_HANDSHAKE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
@@ -1214,7 +1204,6 @@ CONFIG_NETFILTER_SKIP_EGRESS=y
CONFIG_NETFILTER_NETLINK=y
CONFIG_NETFILTER_FAMILY_BRIDGE=y
CONFIG_NETFILTER_FAMILY_ARP=y
CONFIG_NETFILTER_BPF_LINK=y
# CONFIG_NETFILTER_NETLINK_HOOK is not set
CONFIG_NETFILTER_NETLINK_ACCT=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
@@ -3568,7 +3557,7 @@ CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
CONFIG_N_HDLC=m
# CONFIG_N_GSM is not set
CONFIG_N_GSM=m
CONFIG_NOZOMI=m
# CONFIG_NULL_TTY is not set
CONFIG_HVC_DRIVER=y
@@ -4413,6 +4402,7 @@ CONFIG_MFD_SM501=m
CONFIG_MFD_SM501_GPIO=y
# CONFIG_MFD_SKY81452 is not set
CONFIG_MFD_SYSCON=y
# CONFIG_MFD_TI_AM335X_TSCADC is not set
# CONFIG_MFD_LP3943 is not set
# CONFIG_MFD_TI_LMU is not set
# CONFIG_TPS6105X is not set
@@ -5243,7 +5233,6 @@ CONFIG_DVB_SP2=m
# Graphics support
#
CONFIG_APERTURE_HELPERS=y
CONFIG_SCREEN_INFO=y
CONFIG_VIDEO_CMDLINE=y
CONFIG_VIDEO_NOMODESET=y
# CONFIG_AUXDISPLAY is not set
@@ -5491,7 +5480,6 @@ CONFIG_FB_SYS_IMAGEBLIT=y
# CONFIG_FB_FOREIGN_ENDIAN is not set
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_IOMEM_FOPS=y
CONFIG_FB_IOMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS=y
CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
@@ -5865,14 +5853,12 @@ CONFIG_HID_ZYDACRON=m
CONFIG_HID_SENSOR_HUB=m
# CONFIG_HID_SENSOR_CUSTOM_SENSOR is not set
# CONFIG_HID_ALPS is not set
# CONFIG_HID_MCP2200 is not set
# CONFIG_HID_MCP2221 is not set
# end of Special HID drivers
#
# HID-BPF support
#
# CONFIG_HID_BPF is not set
# end of HID-BPF support
#
@@ -7064,8 +7050,8 @@ CONFIG_NTFS3_FS_POSIX_ACL=y
# Pseudo filesystems
#
CONFIG_PROC_FS=y
# CONFIG_PROC_KCORE is not set
# CONFIG_PROC_VMCORE is not set
CONFIG_PROC_KCORE=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
# CONFIG_PROC_CHILDREN is not set
@@ -7226,7 +7212,6 @@ CONFIG_NLS_UCS2_UTILS=m
CONFIG_DLM=m
# CONFIG_DLM_DEBUG is not set
# CONFIG_UNICODE is not set
CONFIG_IO_WQ=y
# end of File systems
#
@@ -7239,9 +7224,6 @@ CONFIG_KEYS=y
# CONFIG_ENCRYPTED_KEYS is not set
# CONFIG_KEY_DH_OPERATIONS is not set
CONFIG_SECURITY_DMESG_RESTRICT=y
CONFIG_PROC_MEM_ALWAYS_FORCE=y
# CONFIG_PROC_MEM_FORCE_PTRACE is not set
# CONFIG_PROC_MEM_NO_FORCE is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
# CONFIG_SECURITY_NETWORK is not set
@@ -7268,7 +7250,7 @@ CONFIG_INTEGRITY=y
# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
# CONFIG_EVM is not set
CONFIG_DEFAULT_SECURITY_DAC=y
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,integrity,bpf"
CONFIG_LSM="lockdown,yama,loadpin,safesetid,integrity,bpf"
#
# Kernel hardening options
@@ -7319,7 +7301,6 @@ CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_SIG=y
CONFIG_CRYPTO_SIG2=y
CONFIG_CRYPTO_SKCIPHER=y
CONFIG_CRYPTO_SKCIPHER2=y
@@ -7696,6 +7677,7 @@ CONFIG_SWIOTLB=y
# CONFIG_DMA_API_DEBUG is not set
CONFIG_SGL_ALLOC=y
CONFIG_CHECK_SIGNATURE=y
# CONFIG_FORCE_NR_CPUS is not set
CONFIG_CPU_RMAP=y
CONFIG_DQL=y
CONFIG_GLOB=y
@@ -7777,7 +7759,10 @@ CONFIG_OBJTOOL=y
#
# Generic Kernel Debugging Instruments
#
# CONFIG_MAGIC_SYSRQ is not set
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1
CONFIG_MAGIC_SYSRQ_SERIAL=y
CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE=""
# CONFIG_DEBUG_FS is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
@@ -7830,7 +7815,6 @@ CONFIG_ARCH_SUPPORTS_KMAP_LOCAL_FORCE_MAP=y
CONFIG_HAVE_ARCH_KASAN=y
CONFIG_HAVE_ARCH_KASAN_VMALLOC=y
CONFIG_CC_HAS_KASAN_GENERIC=y
CONFIG_CC_HAS_KASAN_SW_TAGS=y
CONFIG_CC_HAS_WORKING_NOSANITIZE_ADDRESS=y
# CONFIG_KASAN is not set
CONFIG_HAVE_ARCH_KFENCE=y
@@ -7853,7 +7837,7 @@ CONFIG_PANIC_ON_OOPS_VALUE=0
CONFIG_PANIC_TIMEOUT=0
CONFIG_LOCKUP_DETECTOR=y
CONFIG_SOFTLOCKUP_DETECTOR=y
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC=y
CONFIG_HAVE_HARDLOCKUP_DETECTOR_BUDDY=y
CONFIG_HARDLOCKUP_DETECTOR=y
# CONFIG_HARDLOCKUP_DETECTOR_PREFER_BUDDY is not set
@@ -7862,8 +7846,8 @@ CONFIG_HARDLOCKUP_DETECTOR_PERF=y
# CONFIG_HARDLOCKUP_DETECTOR_ARCH is not set
CONFIG_HARDLOCKUP_DETECTOR_COUNTS_HRTIMER=y
CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
# CONFIG_DETECT_HUNG_TASK is not set
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC=y
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_WQ_WATCHDOG is not set
# CONFIG_WQ_CPU_INTENSIVE_REPORT is not set
# CONFIG_TEST_LOCKUP is not set
@@ -8051,3 +8035,16 @@ CONFIG_ARCH_USE_MEMTEST=y
#
# end of Rust hacking
# end of Kernel hacking
CONFIG_BPF_SYSCALL=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_INFO_BTF=y
CONFIG_DEBUG_INFO_DWARF4=y
CONFIG_BPF_UNPRIV_DEFAULT_OFF=y
CONFIG_KPROBES=y
CONFIG_KPROBE_EVENTS=y
CONFIG_BPF_EVENTS=y
CONFIG_UPROBES=y
CONFIG_UPROBE_EVENTS=y
CONFIG_DEBUG_FS=y
CONFIG_MODULE_SIG_FORCE=y
CONFIG_FPROBE=y

1189
config/lcdproc/LCDd.conf Normal file

File diff suppressed because it is too large Load Diff

129
config/lcdproc/lcdproc.conf Normal file
View File

@@ -0,0 +1,129 @@
# LCDproc client configuration file
## general options ##
[lcdproc]
# address of the LCDd server to connect to
Server=localhost
# Port of the server to connect to
Port=13666
# set reporting level
ReportLevel=2
# report to to syslog ?
ReportToSyslog=false
# run in foreground [default: false; legal: true, false]
#Foreground=true
# PidFile location when running as daemon [default: /var/run/lcdproc.pid]
#PidFile=/var/run/lcdproc.pid
# slow down initial announcement of modes (in 1/100s)
#delay=2
# display name for the main menu [default: LCDproc HOST]
#DisplayName=lcdproc
## screen specific configuration options ##
[CPU]
# Show screen
Active=True
OnTime=1
OffTime=2
ShowInvisible=false
[Iface]
# Show screen
Active=True
# Show stats for Interface0
Interface0=green0
# Interface alias name to display [default: <interface name>]
Alias0=LAN
# Show stats for Interface1
Interface1=red0
Alias1=WAN
# Show stats for Interface2
Interface2=blue0
Alias2=WIFI
# for more than 3 interfaces change MAX_INTERFACES in iface.h and rebuild
# Units to display [default: byte; legal: byte, bit, packet]
unit=bit
# add screen with transferred traffic
#transfer=TRUE
[Memory]
# Show screen
Active=True
[Load]
# Show screen
Active=True
# Min Load Avg at which the backlight will be turned off [default: 0.05]
LowLoad=0.00
# Max Load Avg at which the backlight will start blinking [default: 1.3]
HighLoad=2.5
[TimeDate]
# Show screen
Active=True
# time format [default: %H:%M:%S; legal: see strftime(3)]
TimeFormat="%H:%M:%S"
# date format [default: %x; legal: see strftime(3)]
DateFormat="%x"
[About]
# Show screen
Active=false
[SMP-CPU]
# Show screen
Active=false
[OldTime]
# Show screen
Active=false
# time format [default: %H:%M:%S; legal: see strftime(3)]
TimeFormat="%H:%M:%S"
# date format [default: %x; legal: see strftime(3)]
DateFormat="%x"
[BigClock]
# Show screen
Active=false
[Uptime]
# Show screen
Active=false
[Battery]
# Show screen
Active=false
[CPUGraph]
# Show screen
Active=false
[ProcSize]
# Show screen
Active=false
[Disk]
# Show screen
Active=false
[MiniClock]
# Show screen
Active=True
# time format [default: %H:%M; legal: see strftime(3)]
TimeFormat="%H:%M"
# EOF

View File

@@ -22,7 +22,7 @@
'enabled' => 1,
'subMenu' => $subproxy
};
$menu->{'07.ipfire'} = {'caption' => 'IPFire',
$menu->{'07.ipfire'} = {'caption' => 'BPFire',
'enabled' => 1,
'subMenu' => $subipfire
};

View File

@@ -26,12 +26,6 @@
'title' => "$Lang::tr{'ipblocklist'}",
'enabled' => 1,
};
$subfirewall->{'60.locationblock'} = {
'caption' => $Lang::tr{'locationblock'},
'uri' => '/cgi-bin/location-block.cgi',
'title' => $Lang::tr{'locationblock'},
'enabled' => 1,
};
$subfirewall->{'70.wireless'} = {
'caption' => $Lang::tr{'blue access'},
'uri' => '/cgi-bin/wireless.cgi',

View File

@@ -1,13 +1,48 @@
$subipfire->{'10.pakfire'} = {'caption' => 'Pakfire',
'uri' => '/cgi-bin/pakfire.cgi',
'title' => "Pakfire",
'enabled' => 1,
};
$subipfire->{'20.xdptcpddos'} = {'caption' => 'XDP TCP DDoS',
'uri' => '/cgi-bin/tcp-ddos.cgi',
'title' => "XDP TCP DDoS",
'enabled' => 1,
};
$subipfire->{'10.ddos'} = {'caption' => $Lang::tr{'ebpf xdp ddos'},
'uri' => '/cgi-bin/ddos.cgi',
'title' => "$Lang::tr{'ebpf xdp ddos system'}",
'enabled' => 1,
};
$subipfire->{'15.xdpdns'} = {'caption' => $Lang::tr{'xdpdns domain'},
'uri' => '/cgi-bin/xdpdns.cgi',
'title' => "$Lang::tr{'xdpdns domain'}",
'enabled' => 1,
};
$subipfire->{'16.xdpsni'} = {'caption' => $Lang::tr{'xdpsni domain'},
'uri' => '/cgi-bin/xdpsni.cgi',
'title' => "$Lang::tr{'xdpsni domain'}",
'enabled' => 1,
};
$subipfire->{'17.locationblock'} = {
'caption' => $Lang::tr{'locationblock'},
'uri' => '/cgi-bin/location-block.cgi',
'title' => $Lang::tr{'locationblock'},
'enabled' => 1,
};
$subipfire->{'20.loxilb'} = {
'caption' => $Lang::tr{'loxilb enable'},
'uri' => '/cgi-bin/loxilb.cgi',
'title' => "$Lang::tr{'loxilb enable'}",
'enabled' => 1,
};
$subipfire->{'30.loxilbconfig'} = {
'caption' => $Lang::tr{'loxilb config'},
'uri' => '/cgi-bin/loxilbconfig.cgi',
'title' => "$Lang::tr{'loxilb config'}",
'enabled' => 1,
};
$subipfire->{'40.loxilbfw'} = {
'caption' => $Lang::tr{'loxilb fw'},
'uri' => '/cgi-bin/loxilbfw.cgi',
'title' => "$Lang::tr{'loxilb fw'}",
'enabled' => 1,
};
$subipfire->{'50.keepalived'} = {
'caption' => $Lang::tr{'keepalived'},
'uri' => '/cgi-bin/keepalived.cgi',
'title' => "$Lang::tr{'keepalived'}",
'enabled' => 1,
};
$subipfire->{'99.help'} = {'caption' => $Lang::tr{'help'},
'uri' => '/cgi-bin/help.cgi',
'title' => "$Lang::tr{'help'}",

View File

@@ -9,15 +9,20 @@
'enabled' => 1
};
$sublogs->{'21.xdpdns'} = {'caption' => $Lang::tr{'xdpdns log'},
'uri' => '/cgi-bin/logs.cgi/xdpdnslog.dat',
'title' => "$Lang::tr{'xdpdns log'}",
'enabled' => 1
};
'uri' => '/cgi-bin/logs.cgi/xdpdnslog.dat',
'title' => "$Lang::tr{'xdpdns log'}",
'enabled' => 1
};
$sublogs->{'22.xdpsni'} = {'caption' => $Lang::tr{'xdpsni log'},
'uri' => '/cgi-bin/logs.cgi/xdpsnilog.dat',
'title' => "$Lang::tr{'xdpsni log'}",
'enabled' => 1
};
'uri' => '/cgi-bin/logs.cgi/xdpsnilog.dat',
'title' => "$Lang::tr{'xdpsni log'}",
'enabled' => 1
};
$sublogs->{'23.wireguard'} = {'caption' => $Lang::tr{'wg log'},
'uri' => '/cgi-bin/logs.cgi/wireguardlog.dat',
'title' => "$Lang::tr{'wg log'}",
'enabled' => 1
};
$sublogs->{'30.proxy'} = {'caption' => $Lang::tr{'proxy logs'},
'uri' => '/cgi-bin/logs.cgi/proxylog.dat',
'title' => "$Lang::tr{'proxy logs'}",

View File

@@ -0,0 +1,5 @@
$subipfire->{'40.mpfire'} = {'caption' => $Lang::tr{'mpfire'},
'uri' => '/cgi-bin/mpfire.cgi',
'title' => $Lang::tr{'mpfire'},
'enabled' => 1,
};

View File

@@ -1,5 +0,0 @@
$subipfire->{'41.mympd'} = {'caption' => myMPD,
'uri' => '/cgi-bin/mympd.cgi',
'title' => myMPD,
'enabled' => 1,
};

View File

@@ -1,5 +0,0 @@
$subipfire->{'42.transmission'} = {'caption' => TransmissionBT,
'uri' => '/cgi-bin/transmission.cgi',
'title' => TransmissionBT,
'enabled' => 1,
};

View File

@@ -1,5 +0,0 @@
$subipfire->{'60.vdr'} = {'caption' => VDR,
'uri' => '/cgi-bin/vdr.cgi',
'title' => VDR,
'enabled' => 1,
};

View File

@@ -1,5 +1,5 @@
$subipfire->{'54.wlanap'} = {'caption' => $Lang::tr{'wlanap'},
$subipfire->{'54.wlanap'} = {'caption' => WLanAP,
'uri' => '/cgi-bin/wlanap.cgi',
'title' => $Lang::tr{'wlanap'},
'title' => WLanAP,
'enabled' => 1,
};

View File

@@ -5,7 +5,7 @@
##################### REQUIRED ###########################
port "6600"
music_directory "/var/mp3"
playlist_directory "/var/ipfire/mpd"
playlist_directory "/var/ipfire/mpfire"
log_file "/var/log/mpd.log"
pid_file "/var/run/mpd.pid"
##########################################################
@@ -18,7 +18,7 @@ pid_file "/var/run/mpd.pid"
#
# Location of DB file
#
db_file "/var/ipfire/mpd/db/mpd.db"
db_file "/var/ipfire/mpfire/db/mpd.db"
#
# The state file (if set) will be a file
# for storing all current information
@@ -27,7 +27,7 @@ db_file "/var/ipfire/mpd/db/mpd.db"
# to recreate your last MPD session after
# restart.
#
state_file "/var/ipfire/mpd/mpd_state"
state_file "/var/ipfire/mpfire/mpd_state"
#
##########################################################
@@ -104,6 +104,12 @@ audio_output {
#
audio_buffer_size "2048"
#
# This means exactly what it says, it will
# buffer your file up to the percentage of
# the buffer before it begins playing.
#
buffer_before_play "25%"
#
##########################################################
@@ -183,6 +189,9 @@ connection_timeout "60"
#
filesystem_charset "UTF-8"
#
# The encoding that ID3v1 tags should be converted from.
#
id3v1_encoding "UTF-8"
metadata_to_use "artist,album,title,track,name,comment,date,genre"
#
################################################################

108
config/mpfire/mpfire.pl Normal file
View File

@@ -0,0 +1,108 @@
#!/usr/bin/perl
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
my $filename = "";
my $debug = 0;
if ( `/etc/init.d/mpd status` =~/not running/ ){
system("/etc/init.d/mpd start >/dev/null");
}
if ($ARGV[0] eq 'scan') {
if ($debug){print "Creating Database\n";}
system("mpd --create-db >/dev/null");
system("/etc/init.d/mpd restart >/dev/null");
}
elsif ($ARGV[0] eq 'play') {
&checkmute();
&clearplaylist();
if ($debug){print "Yes we are called and we will play $ARGV[1]\n";}
system("mpc add \"$ARGV[1]\" >/dev/null && mpc play >/dev/null");
}
elsif ($ARGV[0] eq 'playadd') {
if ($debug){print "Yes we are called and we will add $ARGV[1]\n";}
system("mpc add \"$ARGV[1]\" >/dev/null && mpc play >/dev/null");
}
elsif ($ARGV[0] eq 'clearplaylist') {
if ($debug){print "Deleting playlist\n";}
&clearplaylist();
}
elsif ($ARGV[0] eq 'stop') {
my $PID = 'cat /var/run/mpd.pid';
if ($debug){print "Killing Process $PID\n";}
system("mpc stop >/dev/null");
}
elsif ($ARGV[0] eq 'volup') {
if ($debug){print "Increasing Volume\n";}
system("/usr/bin/amixer set Master $ARGV[1]%+ 2>/dev/null >/dev/null");
system("/usr/bin/amixer set PCM $ARGV[1]%+ 2>/dev/null >/dev/null");
}
elsif ($ARGV[0] eq 'voldown') {
if ($debug){print "Decreasing Volume\n";}
system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
system("/usr/bin/amixer set PCM $ARGV[1]%- 2>/dev/null >/dev/null");
}
elsif ($ARGV[0] eq 'toggle') {
system("mpc toggle >/dev/null");
}
elsif ($ARGV[0] eq 'next') {
if ($debug){print "Next Song\n";}
system("mpc next >/dev/null[");
}
elsif ( $ARGV[0] eq 'prev' ) {
if ($debug){print "Previous Song\n";}
system("mpc prev >/dev/null");
}
elsif ($ARGV[0] eq 'song') {
my $song = `mpc \| head -2 | grep -v volume`;
print $song;
}
elsif ($ARGV[0] eq 'stats') {
my $song = `mpc stats | grep Songs`;
print $song;
}
elsif ($ARGV[0] eq 'playweb') {
&checkmute();
&clearplaylist();
if ($debug){print "Playing webstream $ARGV[1] \n";}
system("mpc add http://$ARGV[1] >/dev/null && mpc play >/dev/null && sleep 1");
}
elsif ($ARGV[0] eq 'volume') {
$temp = "Master - ";
$temp .= `amixer get Master \| tail -2 \| awk '{ print \$2" "\$5 }'`;
$temp .= "<break>PCM -";
$temp .= `amixer get PCM \| tail -2 \| awk '{ print \$2" "\$5 }'`;
print $temp;
}
sub clearplaylist(){
system("mpc clear >/dev/null");
}
sub shuffle(){
system("mpc random >/dev/null");
}
sub checkplaylist(){
my $Datei = "/var/ipfire/mpfire/playlist.m3u";
my @Info = stat($Datei);
if ( $Info[7] eq '' || $Info[7] eq '0' ){print "There is no playlist";exit(1);}
}
sub checkmute(){
$temp = `amixer get Master \| tail -2`;
my @Master = split(/ /,$temp);
$temp = `amixer get PCM \| tail -2`;
my @PCM = split(/ /,$temp);
if ( $PCM[7] =~ /off/ ){
if ($debug){print "PCM was muted - umuting.\n";}
system("amixer set PCM toggle >/dev/null");
}
if ( $Master[7] =~ /off/ ){
if ($debug){print "Master was muted - umuting.\n";}
system("amixer set Master toggle >/dev/null");
}
}

675
config/mpfire/perl/Accessor.pm Executable file
View File

@@ -0,0 +1,675 @@
package Class::Accessor;
require 5.00502;
use strict;
$Class::Accessor::VERSION = '0.31';
=head1 NAME
Class::Accessor - Automated accessor generation
=head1 SYNOPSIS
package Employee;
use base qw(Class::Accessor);
Employee->mk_accessors(qw(name role salary));
# Meanwhile, in a nearby piece of code!
# Class::Accessor provides new().
my $mp = Foo->new({ name => "Marty", role => "JAPH" });
my $job = $mp->role; # gets $mp->{role}
$mp->salary(400000); # sets $mp->{salary} = 400000 (I wish)
# like my @info = @{$mp}{qw(name role)}
my @info = $mp->get(qw(name role));
# $mp->{salary} = 400000
$mp->set('salary', 400000);
=head1 DESCRIPTION
This module automagically generates accessors/mutators for your class.
Most of the time, writing accessors is an exercise in cutting and
pasting. You usually wind up with a series of methods like this:
sub name {
my $self = shift;
if(@_) {
$self->{name} = $_[0];
}
return $self->{name};
}
sub salary {
my $self = shift;
if(@_) {
$self->{salary} = $_[0];
}
return $self->{salary};
}
# etc...
One for each piece of data in your object. While some will be unique,
doing value checks and special storage tricks, most will simply be
exercises in repetition. Not only is it Bad Style to have a bunch of
repetitious code, but its also simply not lazy, which is the real
tragedy.
If you make your module a subclass of Class::Accessor and declare your
accessor fields with mk_accessors() then you'll find yourself with a
set of automatically generated accessors which can even be
customized!
The basic set up is very simple:
package My::Class;
use base qw(Class::Accessor);
My::Class->mk_accessors( qw(foo bar car) );
Done. My::Class now has simple foo(), bar() and car() accessors
defined.
=head2 What Makes This Different?
What makes this module special compared to all the other method
generating modules (L<"SEE ALSO">)? By overriding the get() and set()
methods you can alter the behavior of the accessors class-wide. Also,
the accessors are implemented as closures which should cost a bit less
memory than most other solutions which generate a new method for each
accessor.
=head1 METHODS
=head2 new
my $obj = Class->new;
my $obj = $other_obj->new;
my $obj = Class->new(\%fields);
my $obj = $other_obj->new(\%fields);
Class::Accessor provides a basic constructor. It generates a
hash-based object and can be called as either a class method or an
object method.
It takes an optional %fields hash which is used to initialize the
object (handy if you use read-only accessors). The fields of the hash
correspond to the names of your accessors, so...
package Foo;
use base qw(Class::Accessor);
Foo->mk_accessors('foo');
my $obj = Class->new({ foo => 42 });
print $obj->foo; # 42
however %fields can contain anything, new() will shove them all into
your object. Don't like it? Override it.
=cut
sub new {
my($proto, $fields) = @_;
my($class) = ref $proto || $proto;
$fields = {} unless defined $fields;
# make a copy of $fields.
bless {%$fields}, $class;
}
=head2 mk_accessors
Class->mk_accessors(@fields);
This creates accessor/mutator methods for each named field given in
@fields. Foreach field in @fields it will generate two accessors.
One called "field()" and the other called "_field_accessor()". For
example:
# Generates foo(), _foo_accessor(), bar() and _bar_accessor().
Class->mk_accessors(qw(foo bar));
See L<CAVEATS AND TRICKS/"Overriding autogenerated accessors">
for details.
=cut
sub mk_accessors {
my($self, @fields) = @_;
$self->_mk_accessors('rw', @fields);
}
{
no strict 'refs';
sub _mk_accessors {
my($self, $access, @fields) = @_;
my $class = ref $self || $self;
my $ra = $access eq 'rw' || $access eq 'ro';
my $wa = $access eq 'rw' || $access eq 'wo';
foreach my $field (@fields) {
my $accessor_name = $self->accessor_name_for($field);
my $mutator_name = $self->mutator_name_for($field);
if( $accessor_name eq 'DESTROY' or $mutator_name eq 'DESTROY' ) {
$self->_carp("Having a data accessor named DESTROY in '$class' is unwise.");
}
if ($accessor_name eq $mutator_name) {
my $accessor;
if ($ra && $wa) {
$accessor = $self->make_accessor($field);
} elsif ($ra) {
$accessor = $self->make_ro_accessor($field);
} else {
$accessor = $self->make_wo_accessor($field);
}
unless (defined &{"${class}::$accessor_name"}) {
*{"${class}::$accessor_name"} = $accessor;
}
if ($accessor_name eq $field) {
# the old behaviour
my $alias = "_${field}_accessor";
*{"${class}::$alias"} = $accessor unless defined &{"${class}::$alias"};
}
} else {
if ($ra and not defined &{"${class}::$accessor_name"}) {
*{"${class}::$accessor_name"} = $self->make_ro_accessor($field);
}
if ($wa and not defined &{"${class}::$mutator_name"}) {
*{"${class}::$mutator_name"} = $self->make_wo_accessor($field);
}
}
}
}
sub follow_best_practice {
my($self) = @_;
my $class = ref $self || $self;
*{"${class}::accessor_name_for"} = \&best_practice_accessor_name_for;
*{"${class}::mutator_name_for"} = \&best_practice_mutator_name_for;
}
}
=head2 mk_ro_accessors
Class->mk_ro_accessors(@read_only_fields);
Same as mk_accessors() except it will generate read-only accessors
(ie. true accessors). If you attempt to set a value with these
accessors it will throw an exception. It only uses get() and not
set().
package Foo;
use base qw(Class::Accessor);
Class->mk_ro_accessors(qw(foo bar));
# Let's assume we have an object $foo of class Foo...
print $foo->foo; # ok, prints whatever the value of $foo->{foo} is
$foo->foo(42); # BOOM! Naughty you.
=cut
sub mk_ro_accessors {
my($self, @fields) = @_;
$self->_mk_accessors('ro', @fields);
}
=head2 mk_wo_accessors
Class->mk_wo_accessors(@write_only_fields);
Same as mk_accessors() except it will generate write-only accessors
(ie. mutators). If you attempt to read a value with these accessors
it will throw an exception. It only uses set() and not get().
B<NOTE> I'm not entirely sure why this is useful, but I'm sure someone
will need it. If you've found a use, let me know. Right now its here
for orthoginality and because its easy to implement.
package Foo;
use base qw(Class::Accessor);
Class->mk_wo_accessors(qw(foo bar));
# Let's assume we have an object $foo of class Foo...
$foo->foo(42); # OK. Sets $self->{foo} = 42
print $foo->foo; # BOOM! Can't read from this accessor.
=cut
sub mk_wo_accessors {
my($self, @fields) = @_;
$self->_mk_accessors('wo', @fields);
}
=head1 DETAILS
An accessor generated by Class::Accessor looks something like
this:
# Your foo may vary.
sub foo {
my($self) = shift;
if(@_) { # set
return $self->set('foo', @_);
}
else {
return $self->get('foo');
}
}
Very simple. All it does is determine if you're wanting to set a
value or get a value and calls the appropriate method.
Class::Accessor provides default get() and set() methods which
your class can override. They're detailed later.
=head2 follow_best_practice
In Damian's Perl Best Practices book he recommends separate get and set methods
with the prefix set_ and get_ to make it explicit what you intend to do. If you
want to create those accessor methods instead of the default ones, call:
__PACKAGE__->follow_best_practice
=head2 accessor_name_for / mutator_name_for
You may have your own crazy ideas for the names of the accessors, so you can
make those happen by overriding C<accessor_name_for> and C<mutator_name_for> in
your subclass. (I copied that idea from Class::DBI.)
=cut
sub best_practice_accessor_name_for {
my ($class, $field) = @_;
return "get_$field";
}
sub best_practice_mutator_name_for {
my ($class, $field) = @_;
return "set_$field";
}
sub accessor_name_for {
my ($class, $field) = @_;
return $field;
}
sub mutator_name_for {
my ($class, $field) = @_;
return $field;
}
=head2 Modifying the behavior of the accessor
Rather than actually modifying the accessor itself, it is much more
sensible to simply override the two key methods which the accessor
calls. Namely set() and get().
If you -really- want to, you can override make_accessor().
=head2 set
$obj->set($key, $value);
$obj->set($key, @values);
set() defines how generally one stores data in the object.
override this method to change how data is stored by your accessors.
=cut
sub set {
my($self, $key) = splice(@_, 0, 2);
if(@_ == 1) {
$self->{$key} = $_[0];
}
elsif(@_ > 1) {
$self->{$key} = [@_];
}
else {
$self->_croak("Wrong number of arguments received");
}
}
=head2 get
$value = $obj->get($key);
@values = $obj->get(@keys);
get() defines how data is retreived from your objects.
override this method to change how it is retreived.
=cut
sub get {
my $self = shift;
if(@_ == 1) {
return $self->{$_[0]};
}
elsif( @_ > 1 ) {
return @{$self}{@_};
}
else {
$self->_croak("Wrong number of arguments received");
}
}
=head2 make_accessor
$accessor = Class->make_accessor($field);
Generates a subroutine reference which acts as an accessor for the given
$field. It calls get() and set().
If you wish to change the behavior of your accessors, try overriding
get() and set() before you start mucking with make_accessor().
=cut
sub make_accessor {
my ($class, $field) = @_;
# Build a closure around $field.
return sub {
my $self = shift;
if(@_) {
return $self->set($field, @_);
}
else {
return $self->get($field);
}
};
}
=head2 make_ro_accessor
$read_only_accessor = Class->make_ro_accessor($field);
Generates a subroutine refrence which acts as a read-only accessor for
the given $field. It only calls get().
Override get() to change the behavior of your accessors.
=cut
sub make_ro_accessor {
my($class, $field) = @_;
return sub {
my $self = shift;
if (@_) {
my $caller = caller;
$self->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
}
else {
return $self->get($field);
}
};
}
=head2 make_wo_accessor
$read_only_accessor = Class->make_wo_accessor($field);
Generates a subroutine refrence which acts as a write-only accessor
(mutator) for the given $field. It only calls set().
Override set() to change the behavior of your accessors.
=cut
sub make_wo_accessor {
my($class, $field) = @_;
return sub {
my $self = shift;
unless (@_) {
my $caller = caller;
$self->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
}
else {
return $self->set($field, @_);
}
};
}
=head1 EXCEPTIONS
If something goes wrong Class::Accessor will warn or die by calling Carp::carp
or Carp::croak. If you don't like this you can override _carp() and _croak() in
your subclass and do whatever else you want.
=cut
use Carp ();
sub _carp {
my ($self, $msg) = @_;
Carp::carp($msg || $self);
return;
}
sub _croak {
my ($self, $msg) = @_;
Carp::croak($msg || $self);
return;
}
=head1 EFFICIENCY
Class::Accessor does not employ an autoloader, thus it is much faster
than you'd think. Its generated methods incur no special penalty over
ones you'd write yourself.
accessors:
Rate Basic Average Fast Faster Direct
Basic 189150/s -- -42% -51% -55% -89%
Average 327679/s 73% -- -16% -22% -82%
Fast 389212/s 106% 19% -- -8% -78%
Faster 421646/s 123% 29% 8% -- -76%
Direct 1771243/s 836% 441% 355% 320% --
mutators:
Rate Basic Average Fast Faster Direct
Basic 173769/s -- -34% -53% -59% -90%
Average 263046/s 51% -- -29% -38% -85%
Fast 371158/s 114% 41% -- -13% -78%
Faster 425821/s 145% 62% 15% -- -75%
Direct 1699081/s 878% 546% 358% 299% --
Class::Accessor::Fast is faster than methods written by an average programmer
(where "average" is based on Schwern's example code).
Class::Accessor is slower than average, but more flexible.
Class::Accessor::Faster is even faster than Class::Accessor::Fast. It uses an
array internally, not a hash. This could be a good or bad feature depending on
your point of view.
Direct hash access is, of course, much faster than all of these, but it
provides no encapsulation.
Of course, its not as simple as saying "Class::Accessor is slower than
average". These are benchmarks for a simple accessor. If your accessors do
any sort of complicated work (such as talking to a database or writing to a
file) the time spent doing that work will quickly swamp the time spend just
calling the accessor. In that case, Class::Accessor and the ones you write
will be roughly the same speed.
=head1 EXAMPLES
Here's an example of generating an accessor for every public field of
your class.
package Altoids;
use base qw(Class::Accessor Class::Fields);
use fields qw(curiously strong mints);
Altoids->mk_accessors( Altoids->show_fields('Public') );
sub new {
my $proto = shift;
my $class = ref $proto || $proto;
return fields::new($class);
}
my Altoids $tin = Altoids->new;
$tin->curiously('Curiouser and curiouser');
print $tin->{curiously}; # prints 'Curiouser and curiouser'
# Subclassing works, too.
package Mint::Snuff;
use base qw(Altoids);
my Mint::Snuff $pouch = Mint::Snuff->new;
$pouch->strong('Blow your head off!');
print $pouch->{strong}; # prints 'Blow your head off!'
Here's a simple example of altering the behavior of your accessors.
package Foo;
use base qw(Class::Accessor);
Foo->mk_accessor(qw(this that up down));
sub get {
my $self = shift;
# Note every time someone gets some data.
print STDERR "Getting @_\n";
$self->SUPER::get(@_);
}
sub set {
my ($self, $key) = splice(@_, 0, 2);
# Note every time someone sets some data.
print STDERR "Setting $key to @_\n";
$self->SUPER::set($key, @_);
}
=head1 CAVEATS AND TRICKS
Class::Accessor has to do some internal wackiness to get its
job done quickly and efficiently. Because of this, there's a few
tricks and traps one must know about.
Hey, nothing's perfect.
=head2 Don't make a field called DESTROY
This is bad. Since DESTROY is a magical method it would be bad for us
to define an accessor using that name. Class::Accessor will
carp if you try to use it with a field named "DESTROY".
=head2 Overriding autogenerated accessors
You may want to override the autogenerated accessor with your own, yet
have your custom accessor call the default one. For instance, maybe
you want to have an accessor which checks its input. Normally, one
would expect this to work:
package Foo;
use base qw(Class::Accessor);
Foo->mk_accessors(qw(email this that whatever));
# Only accept addresses which look valid.
sub email {
my($self) = shift;
my($email) = @_;
if( @_ ) { # Setting
require Email::Valid;
unless( Email::Valid->address($email) ) {
carp("$email doesn't look like a valid address.");
return;
}
}
return $self->SUPER::email(@_);
}
There's a subtle problem in the last example, and its in this line:
return $self->SUPER::email(@_);
If we look at how Foo was defined, it called mk_accessors() which
stuck email() right into Foo's namespace. There *is* no
SUPER::email() to delegate to! Two ways around this... first is to
make a "pure" base class for Foo. This pure class will generate the
accessors and provide the necessary super class for Foo to use:
package Pure::Organic::Foo;
use base qw(Class::Accessor);
Pure::Organic::Foo->mk_accessors(qw(email this that whatever));
package Foo;
use base qw(Pure::Organic::Foo);
And now Foo::email() can override the generated
Pure::Organic::Foo::email() and use it as SUPER::email().
This is probably the most obvious solution to everyone but me.
Instead, what first made sense to me was for mk_accessors() to define
an alias of email(), _email_accessor(). Using this solution,
Foo::email() would be written with:
return $self->_email_accessor(@_);
instead of the expected SUPER::email().
=head1 AUTHORS
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. That means either (a) the GNU General Public
License or (b) the Artistic License.
=head2 ORIGINAL AUTHOR
Michael G Schwern <schwern@pobox.com>
=head2 THANKS
Liz and RUZ for performance tweaks.
Tels, for his big feature request/bug report.
=head1 SEE ALSO
L<Class::Accessor::Fast>
These are some modules which do similar things in different ways
L<Class::Struct>, L<Class::Methodmaker>, L<Class::Generate>,
L<Class::Class>, L<Class::Contract>
L<Class::DBI> for an example of this module in use.
=cut
1;

View File

@@ -0,0 +1,94 @@
package Class::Accessor::Fast;
use base 'Class::Accessor';
use strict;
$Class::Accessor::Fast::VERSION = '0.31';
=head1 NAME
Class::Accessor::Fast - Faster, but less expandable, accessors
=head1 SYNOPSIS
package Foo;
use base qw(Class::Accessor::Fast);
# The rest is the same as Class::Accessor but without set() and get().
=head1 DESCRIPTION
This is a faster but less expandable version of Class::Accessor.
Class::Accessor's generated accessors require two method calls to accompish
their task (one for the accessor, another for get() or set()).
Class::Accessor::Fast eliminates calling set()/get() and does the access itself,
resulting in a somewhat faster accessor.
The downside is that you can't easily alter the behavior of your
accessors, nor can your subclasses. Of course, should you need this
later, you can always swap out Class::Accessor::Fast for
Class::Accessor.
Read the documentation for Class::Accessor for more info.
=cut
sub make_accessor {
my($class, $field) = @_;
return sub {
return $_[0]->{$field} if @_ == 1;
return $_[0]->{$field} = $_[1] if @_ == 2;
return (shift)->{$field} = \@_;
};
}
sub make_ro_accessor {
my($class, $field) = @_;
return sub {
return $_[0]->{$field} if @_ == 1;
my $caller = caller;
$_[0]->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
};
}
sub make_wo_accessor {
my($class, $field) = @_;
return sub {
if (@_ == 1) {
my $caller = caller;
$_[0]->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
}
else {
return $_[0]->{$field} = $_[1] if @_ == 2;
return (shift)->{$field} = \@_;
}
};
}
=head1 EFFICIENCY
L<Class::Accessor/EFFICIENCY> for an efficiency comparison.
=head1 AUTHORS
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. That means either (a) the GNU General Public
License or (b) the Artistic License.
=head2 ORIGINAL AUTHOR
Michael G Schwern <schwern@pobox.com>
=head1 SEE ALSO
L<Class::Accessor>
=cut
1;

View File

@@ -0,0 +1,105 @@
package Class::Accessor::Faster;
use base 'Class::Accessor';
use strict;
$Class::Accessor::Faster::VERSION = '0.31';
=head1 NAME
Class::Accessor::Faster - Even faster, but less expandable, accessors
=head1 SYNOPSIS
package Foo;
use base qw(Class::Accessor::Faster);
=head1 DESCRIPTION
This is a faster but less expandable version of Class::Accessor::Fast.
Class::Accessor's generated accessors require two method calls to accompish
their task (one for the accessor, another for get() or set()).
Class::Accessor::Fast eliminates calling set()/get() and does the access itself,
resulting in a somewhat faster accessor.
Class::Accessor::Faster uses an array reference underneath to be faster.
Read the documentation for Class::Accessor for more info.
=cut
my %slot;
sub _slot {
my($class, $field) = @_;
my $n = $slot{$class}->{$field};
return $n if defined $n;
$n = keys %{$slot{$class}};
$slot{$class}->{$field} = $n;
return $n;
}
sub new {
my($proto, $fields) = @_;
my($class) = ref $proto || $proto;
my $self = bless [], $class;
$fields = {} unless defined $fields;
for my $k (keys %$fields) {
my $n = $class->_slot($k);
$self->[$n] = $fields->{$k};
}
return $self;
}
sub make_accessor {
my($class, $field) = @_;
my $n = $class->_slot($field);
return sub {
return $_[0]->[$n] if @_ == 1;
return $_[0]->[$n] = $_[1] if @_ == 2;
return (shift)->[$n] = \@_;
};
}
sub make_ro_accessor {
my($class, $field) = @_;
my $n = $class->_slot($field);
return sub {
return $_[0]->[$n] if @_ == 1;
my $caller = caller;
$_[0]->_croak("'$caller' cannot alter the value of '$field' on objects of class '$class'");
};
}
sub make_wo_accessor {
my($class, $field) = @_;
my $n = $class->_slot($field);
return sub {
if (@_ == 1) {
my $caller = caller;
$_[0]->_croak("'$caller' cannot access the value of '$field' on objects of class '$class'");
} else {
return $_[0]->[$n] = $_[1] if @_ == 2;
return (shift)->[$n] = \@_;
}
};
}
=head1 AUTHORS
Copyright 2007 Marty Pauley <marty+perl@kasei.com>
This program is free software; you can redistribute it and/or modify it under
the same terms as Perl itself. That means either (a) the GNU General Public
License or (b) the Artistic License.
=head1 SEE ALSO
L<Class::Accessor>
=cut
1;

View File

@@ -0,0 +1,897 @@
#
# This file is part of Audio::MPD
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD;
use warnings;
use strict;
use Audio::MPD::Collection;
use Audio::MPD::Common::Item;
use Audio::MPD::Common::Stats;
use Audio::MPD::Common::Status;
use Audio::MPD::Playlist;
use Encode;
use IO::Socket;
use Readonly;
use base qw[ Class::Accessor::Fast Exporter ];
__PACKAGE__->mk_accessors(
qw[ _conntype _host _password _port _socket
collection playlist version ] );
our $VERSION = '0.19.1';
Readonly our $REUSE => 0;
Readonly our $ONCE => 1;
our @EXPORT = qw[ $REUSE $ONCE ];
#--
# Constructor
#
# my $mpd = Audio::MPD->new( [%opts] )
#
# This is the constructor for Audio::MPD. One can specify the following
# options:
# - hostname => $hostname : defaults to environment var MPD_HOST, then to 'localhost'
# - port => $port : defaults to env var MPD_PORT, then to 6600
# - password => $password : defaults to env var MPD_PASSWORD, then to ''
# - conntype => $type : how the connection to mpd server is handled. it can be
# either $REUSE: reuse the same connection
# or $ONCE: open a new connection per command (default)
#
sub new {
my ($class, %opts) = @_;
# use mpd defaults.
my ($default_password, $default_host) = split( '@', $ENV{MPD_HOST} )
if exists $ENV{MPD_HOST} && $ENV{MPD_HOST} =~ /@/;
my $host = $opts{host} || $default_host || $ENV{MPD_HOST} || 'localhost';
my $port = $opts{port} || $ENV{MPD_PORT} || '6600';
my $password = $opts{password} || $ENV{MPD_PASSWORD} || $default_password || '';
# create & bless the object.
my $self = {
_host => $host,
_port => $port,
_password => $password,
_conntype => exists $opts{conntype} ? $opts{conntype} : $REUSE,
};
bless $self, $class;
# create the connection if conntype is set to $REUSE
$self->_connect_to_mpd_server if $self->_conntype == $REUSE;
# create the helper objects and store them.
$self->collection( Audio::MPD::Collection->new($self) );
$self->playlist ( Audio::MPD::Playlist->new($self) );
# try to issue a ping to test connection - this can die.
$self->ping;
return $self;
}
#--
# Private methods
#
# $mpd->_connect_to_mpd_server;
#
# This method connects to the mpd server. It can die on several conditions:
# - if the server cannot be reached,
# - if it's not an mpd server,
# - or if the password is incorrect,
#
sub _connect_to_mpd_server {
my ($self) = @_;
# try to connect to mpd.
my $socket = IO::Socket::INET->new(
PeerAddr => $self->_host,
PeerPort => $self->_port,
)
or die "Could not create socket: $!\n";
# parse version information.
my $line = $socket->getline;
chomp $line;
die "Not a mpd server - welcome string was: [$line]\n"
if $line !~ /^OK MPD (.+)$/;
$self->version($1);
# send password.
if ( $self->_password ) {
$socket->print( 'password ' . encode('utf-8', $self->_password) . "\n" );
$line = $socket->getline;
die $line if $line =~ s/^ACK //;
}
# save socket
$self->_socket($socket);
}
#
# my @result = $mpd->_send_command( $command );
#
# This method is central to the module. It is responsible for interacting with
# mpd by sending the $command and reading output - that will be returned as an
# array of chomped lines (status line will not be returned).
#
# This method can die on several conditions:
# - if the server cannot be reached,
# - if it's not an mpd server,
# - if the password is incorrect,
# - or if the command is an invalid mpd command.
# In the latter case, the mpd error message will be returned.
#
sub _send_command {
my ($self, $command) = @_;
$self->_connect_to_mpd_server if $self->_conntype == $ONCE;
my $socket = $self->_socket;
# ok, now we're connected - let's issue the command.
$socket->print( encode('utf-8', $command) );
my @output;
while (defined ( my $line = $socket->getline ) ) {
chomp $line;
die $line if $line =~ s/^ACK //; # oops - error.
last if $line =~ /^OK/; # end of output.
push @output, decode('utf-8', $line);
}
# close the socket.
$socket->close if $self->_conntype == $ONCE;
return @output;
}
#
# my @items = $mpd->_cooked_command_as_items( $command );
#
# Lots of Audio::MPD methods are using _send_command() and then parse the
# output as a collection of AMC::Item. This method is meant to factorize
# this code, and will parse the raw output of _send_command() in a cooked
# list of items.
#
sub _cooked_command_as_items {
my ($self, $command) = @_;
my @lines = $self->_send_command($command);
my (@items, %param);
# parse lines in reverse order since "file:" or "directory:" lines
# come first. therefore, let's first store every other parameter,
# and the last line will trigger the object creation.
# of course, since we want to preserve the playlist order, this means
# that we're going to unshift the objects instead of push.
foreach my $line (reverse @lines) {
my ($k,$v) = split /:\s/, $line, 2;
$param{$k} = $v;
next unless $k eq 'file' || $k eq 'directory' || $k eq 'playlist'; # last param of item
unshift @items, Audio::MPD::Common::Item->new(%param);
%param = ();
}
return @items;
}
sub _cooked_command_as_filename {
my ($self, $command) = @_;
my @lines = $self->_send_command($command);
my (@items, %param);
# parse lines in reverse order since "file:" or "directory:" lines
# come first. therefore, let's first store every other parameter,
# and the last line will trigger the object creation.
# of course, since we want to preserve the playlist order, this means
# that we're going to unshift the objects instead of push.
foreach my $line (@lines) {
my ($k,$v) = split /:\s/, $line, 2;
if ( $k eq 'file'){$param{$k} = $v;}
unshift @items, $param{'file'};
%param = ();
}
return @items;
}
#
# my %hash = $mpd->_cooked_command_as_kv( $command );
#
# Lots of Audio::MPD methods are using _send_command() and then parse the
# output to get a list of key / value (with the colon ":" acting as separator).
# This method is meant to factorize this code, and will parse the raw output
# of _send_command() in a cooked hash.
#
sub _cooked_command_as_kv {
my ($self, $command) = @_;
my %hash =
map { split(/:\s/, $_, 2) }
$self->_send_command($command);
return %hash;
}
#
# my @list = $mpd->_cooked_command_strip_first_field( $command );
#
# Lots of Audio::MPD methods are using _send_command() and then parse the
# output to remove the first field (with the colon ":" acting as separator).
# This method is meant to factorize this code, and will parse the raw output
# of _send_command() in a cooked list of strings.
#
sub _cooked_command_strip_first_field {
my ($self, $command) = @_;
my @list =
map { ( split(/:\s+/, $_, 2) )[1] }
$self->_send_command($command);
return @list;
}
#--
# Public methods
# -- MPD interaction: general commands
#
# $mpd->ping;
#
# Sends a ping command to the mpd server.
#
sub ping {
my ($self) = @_;
$self->_send_command( "ping\n" );
}
#
# my $version = $mpd->version;
#
# Return version of MPD server's connected.
#
# sub version {} # implemented as an accessor.
#
#
# $mpd->kill;
#
# Send a message to the MPD server telling it to shut down.
#
sub kill {
my ($self) = @_;
$self->_send_command("kill\n");
}
#
# $mpd->password( [$password] )
#
# Change password used to communicate with MPD server to $password.
# Empty string is assumed if $password is not supplied.
#
sub password {
my ($self, $passwd) = @_;
$passwd ||= '';
$self->_password($passwd);
$self->ping; # ping sends a command, and thus the password is sent
}
#
# $mpd->updatedb( [$path] );
#
# Force mpd to rescan its collection. If $path (relative to MPD's music
# directory) is supplied, MPD will only scan it - otherwise, MPD will rescan
# its whole collection.
#
sub updatedb {
my ($self, $path) = @_;
$path ||= '';
$self->_send_command("update $path\n");
}
#
# my @handlers = $mpd->urlhandlers;
#
# Return an array of supported URL schemes.
#
sub urlhandlers {
my ($self) = @_;
return $self->_cooked_command_strip_first_field("urlhandlers\n");
}
# -- MPD interaction: handling volume & output
#
# $mpd->volume( [+][-]$volume );
#
# Sets the audio output volume percentage to absolute $volume.
# If $volume is prefixed by '+' or '-' then the volume is changed relatively
# by that value.
#
sub volume {
my ($self, $volume) = @_;
if ($volume =~ /^(-|\+)(\d+)/ ) {
my $current = $self->status->volume;
$volume = $1 eq '+' ? $current + $2 : $current - $2;
}
$self->_send_command("setvol $volume\n");
}
#
# $mpd->output_enable( $output );
#
# Enable the specified audio output. $output is the ID of the audio output.
#
sub output_enable {
my ($self, $output) = @_;
$self->_send_command("enableoutput $output\n");
}
#
# $mpd->output_disable( $output );
#
# Disable the specified audio output. $output is the ID of the audio output.
#
sub output_disable {
my ($self, $output) = @_;
$self->_send_command("disableoutput $output\n");
}
# -- MPD interaction: retrieving info from current state
#
# $mpd->stats;
#
# Return an AMC::Stats object with the current statistics of MPD.
#
sub stats {
my ($self) = @_;
my %kv = $self->_cooked_command_as_kv( "stats\n" );
return Audio::MPD::Common::Stats->new(\%kv);
}
#
# my $status = $mpd->status;
#
# Return an AMC::Status object with various information on current
# MPD server settings. Check the embedded pod for more information on the
# available accessors.
#
sub status {
my ($self) = @_;
my %kv = $self->_cooked_command_as_kv( "status\n" );
my $status = Audio::MPD::Common::Status->new( \%kv );
return $status;
}
#
# my $song = $mpd->current;
#
# Return an AMC::Item::Song representing the song currently playing.
#
sub current {
my ($self) = @_;
my ($item) = $self->_cooked_command_as_items("currentsong\n");
return $item;
}
#
# my $song = $mpd->song( [$song] )
#
# Return an AMC::Item::Song representing the song number $song.
# If $song is not supplied, returns the current song.
#
sub song {
my ($self, $song) = @_;
return $self->current unless defined $song;
my ($item) = $self->_cooked_command_as_items("playlistinfo $song\n");
return $item;
}
#
# my $song = $mpd->songid( [$songid] )
#
# Return an AMC::Item::Song representing the song with id $songid.
# If $songid is not supplied, returns the current song.
#
sub songid {
my ($self, $songid) = @_;
return $self->current unless defined $songid;
my ($item) = $self->_cooked_command_as_items("playlistid $songid\n");
return $item;
}
# -- MPD interaction: altering settings
#
# $mpd->repeat( [$repeat] );
#
# Set the repeat mode to $repeat (1 or 0). If $repeat is not specified then
# the repeat mode is toggled.
#
sub repeat {
my ($self, $mode) = @_;
$mode = not $self->status->repeat
unless defined $mode; # toggle if no param
$mode = $mode ? 1 : 0; # force integer
$self->_send_command("repeat $mode\n");
}
#
# $mpd->random( [$random] );
#
# Set the random mode to $random (1 or 0). If $random is not specified then
# the random mode is toggled.
#
sub random {
my ($self, $mode) = @_;
$mode = not $self->status->random
unless defined $mode; # toggle if no param
$mode = $mode ? 1 : 0; # force integer
$self->_send_command("random $mode\n");
}
#
# $mpd->fade( [$seconds] );
#
# Enable crossfading and set the duration of crossfade between songs. If
# $seconds is not specified or $seconds is 0, then crossfading is disabled.
#
sub fade {
my ($self, $value) = @_;
$value ||= 0;
$self->_send_command("crossfade $value\n");
}
# -- MPD interaction: controlling playback
#
# $mpd->play( [$song] );
#
# Begin playing playlist at song number $song. If no argument supplied,
# resume playing.
#
sub play {
my ($self, $number) = @_;
$number = '' unless defined $number;
$self->_send_command("play $number\n");
}
#
# $mpd->playid( [$songid] );
#
# Begin playing playlist at song ID $songid. If no argument supplied,
# resume playing.
#
sub playid {
my ($self, $number) = @_;
$number ||= '';
$self->_send_command("playid $number\n");
}
#
# $mpd->pause( [$sate] );
#
# Pause playback. If $state is 0 then the current track is unpaused, if
# $state is 1 then the current track is paused.
#
# Note that if $state is not given, pause state will be toggled.
#
sub pause {
my ($self, $state) = @_;
$state ||= ''; # default is to toggle
$self->_send_command("pause $state\n");
}
#
# $mpd->stop;
#
# Stop playback.
#
sub stop {
my ($self) = @_;
$self->_send_command("stop\n");
}
#
# $mpd->next;
#
# Play next song in playlist.
#
sub next {
my ($self) = @_;
$self->_send_command("next\n");
}
#
# $mpd->prev;
#
# Play previous song in playlist.
#
sub prev {
my($self) = shift;
$self->_send_command("previous\n");
}
#
# $mpd->seek( $time, [$song] );
#
# Seek to $time seconds in song number $song. If $song number is not specified
# then the perl module will try and seek to $time in the current song.
#
sub seek {
my ($self, $time, $song) = @_;
$time ||= 0; $time = int $time;
$song = $self->status->song if not defined $song; # seek in current song
$self->_send_command( "seek $song $time\n" );
}
#
# $mpd->seekid( $time, [$songid] );
#
# Seek to $time seconds in song ID $songid. If $songid number is not specified
# then the perl module will try and seek to $time in the current song.
#
sub seekid {
my ($self, $time, $song) = @_;
$time ||= 0; $time = int $time;
$song = $self->status->songid if not defined $song; # seek in current song
$self->_send_command( "seekid $song $time\n" );
}
1;
__END__
=pod
=head1 NAME
Audio::MPD - class to talk to MPD (Music Player Daemon) servers
=head1 SYNOPSIS
use Audio::MPD;
my $mpd = Audio::MPD->new();
$mpd->play();
sleep 10;
$mpd->next();
=head1 DESCRIPTION
Audio::MPD gives a clear object-oriented interface for talking to and
controlling MPD (Music Player Daemon) servers. A connection to the MPD
server is established as soon as a new Audio::MPD object is created.
Note that the module will by default connect to mpd before sending any
command, and will disconnect after the command has been issued. This scheme
is far from optimal, but allows us not to care about timeout disconnections.
B</!\> Note that Audio::MPD is using high-level, blocking sockets. This
means that if the mpd server is slow, or hangs for whatever reason, or
even crash abruptly, the program will be hung forever in this sub. The
POE::Component::Client::MPD module is way safer - you're advised to use
it instead of Audio::MPD. Or you can try to set C<conntype> to C<$REUSE>
(see Audio::MPD constructor for more details), but you would be then on
your own to deal with disconnections.
=head1 METHODS
=head2 Constructor
=over 4
=item new( [%opts] )
This is the constructor for Audio::MPD. One can specify the following
options:
=over 4
=item hostname => C<$hostname>
defaults to environment var MPD_HOST, then to 'localhost'. Note that
MPD_HOST can be of the form password@host.
=item port => C<$port>
defaults to environment var MPD_PORT, then to 6600.
=item password => $password
defaults to environment var MPD_PASSWORD, then to ''.
=item conntype => $type
change how the connection to mpd server is handled. It can be either
C<$REUSE> to reuse the same connection or C<$ONCE> to open a new
connection per command (default)
=back
=back
=head2 Controlling the server
=over 4
=item $mpd->ping()
Sends a ping command to the mpd server.
=item $mpd->version()
Return the version number for the server we are connected to.
=item $mpd->kill()
Send a message to the MPD server telling it to shut down.
=item $mpd->password( [$password] )
Change password used to communicate with MPD server to $password.
Empty string is assumed if $password is not supplied.
=item $mpd->updatedb( [$path] )
Force mpd to recan its collection. If $path (relative to MPD's music directory)
is supplied, MPD will only scan it - otherwise, MPD will rescan its whole
collection.
=item $mpd->urlhandlers()
Return an array of supported URL schemes.
=back
=head2 Handling volume & output
=over 4
=item $mpd->volume( [+][-]$volume )
Sets the audio output volume percentage to absolute $volume.
If $volume is prefixed by '+' or '-' then the volume is changed relatively
by that value.
=item $mpd->output_enable( $output )
Enable the specified audio output. $output is the ID of the audio output.
=item $mpd->output_disable( $output )
Disable the specified audio output. $output is the ID of the audio output.
=back
=head2 Retrieving info from current state
=over 4
=item $mpd->stats()
Return an C<Audio::MPD::Common::Stats> object with the current statistics
of MPD. See the associated pod for more information.
=item $mpd->status()
Return an C<Audio::MPD::Common::Status> object with various information on
current MPD server settings. Check the embedded pod for more information on
the available accessors.
=item $mpd->current()
Return an C<Audio::MPD::Common::Item::Song> representing the song currently
playing.
=item $mpd->song( [$song] )
Return an C<Audio::MPD::Common::Item::Song> representing the song number
C<$song>. If C<$song> is not supplied, returns the current song.
=item $mpd->songid( [$songid] )
Return an C<Audio::MPD::Common::Item::Song> representing the song with id
C<$songid>. If C<$songid> is not supplied, returns the current song.
=back
=head2 Altering MPD settings
=over 4
=item $mpd->repeat( [$repeat] )
Set the repeat mode to $repeat (1 or 0). If $repeat is not specified then
the repeat mode is toggled.
=item $mpd->random( [$random] )
Set the random mode to $random (1 or 0). If $random is not specified then
the random mode is toggled.
=item $mpd->fade( [$seconds] )
Enable crossfading and set the duration of crossfade between songs.
If $seconds is not specified or $seconds is 0, then crossfading is disabled.
=back
=head2 Controlling playback
=over 4
=item $mpd->play( [$song] )
Begin playing playlist at song number $song. If no argument supplied,
resume playing.
=item $mpd->playid( [$songid] )
Begin playing playlist at song ID $songid. If no argument supplied,
resume playing.
=item $mpd->pause( [$state] )
Pause playback. If C<$state> is 0 then the current track is unpaused,
if $state is 1 then the current track is paused.
Note that if C<$state> is not given, pause state will be toggled.
=item $mpd->stop()
Stop playback.
=item $mpd->next()
Play next song in playlist.
=item $mpd->prev()
Play previous song in playlist.
=item $mpd->seek( $time, [$song])
Seek to $time seconds in song number $song. If $song number is not specified
then the perl module will try and seek to $time in the current song.
=item $mpd->seekid( $time, $songid )
Seek to $time seconds in song ID $songid. If $song number is not specified
then the perl module will try and seek to $time in the current song.
=back
=head2 Searching the collection
To search the collection, use the C<collection()> accessor, returning the
associated C<Audio::MPD::Collection> object. You will then be able to call:
$mpd->collection->random_song();
See C<Audio::MPD::Collection> documentation for more details on available
methods.
=head2 Handling the playlist
To update the playlist, use the C<playlist()> accessor, returning the
associated C<Audio::MPD::Playlist> object. You will then be able to call:
$mpd->playlist->clear;
See C<Audio::MPD::Playlist> documentation for more details on available
methods.
=head1 SEE ALSO
You can find more information on the mpd project on its homepage at
L<http://www.musicpd.org>, or its wiki L<http://mpd.wikia.com>.
Regarding this Perl module, you can report bugs on CPAN via
L<http://rt.cpan.org/Public/Bug/Report.html?Queue=Audio-MPD>.
Audio::MPD development takes place on <audio-mpd@googlegroups.com>: feel free
to join us. (use L<http://groups.google.com/group/audio-mpd> to sign in). Our
subversion repository is located at L<https://svn.musicpd.org>.
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
Original code by Tue Abrahamsen C<< <tue.abrahamsen at gmail.com> >>,
documented by Nicholas J. Humfrey C<< <njh at aelius.com> >>.
=head1 COPYRIGHT & LICENSE
Copyright (c) 2005 Tue Abrahamsen, all rights reserved.
Copyright (c) 2006 Nicolas J. Humfrey, all rights reserved.
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,594 @@
#
# This file is part of Audio::MPD
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Collection;
use strict;
use warnings;
use Scalar::Util qw[ weaken ];
use base qw[ Class::Accessor::Fast ];
__PACKAGE__->mk_accessors( qw[ _mpd ] );
#our ($VERSION) = '$Rev: 5284 $' =~ /(\d+)/;
#--
# Constructor
#
# my $collection = Audio::MPD::Collection->new( $mpd );
#
# This will create the object, holding a back-reference to the Audio::MPD
# object itself (for communication purposes). But in order to play safe and
# to free the memory in time, this reference is weakened.
#
# Note that you're not supposed to call this constructor yourself, an
# Audio::MPD::Collection is automatically created for you during the creation
# of an Audio::MPD object.
#
sub new {
my ($pkg, $mpd) = @_;
my $self = { _mpd => $mpd };
weaken( $self->{_mpd} );
bless $self, $pkg;
return $self;
}
#--
# Public methods
# -- Collection: retrieving songs & directories
#
# my @items = $collection->all_items( [$path] );
#
# Return *all* AMC::Items (both songs & directories) currently known
# by mpd.
#
# If $path is supplied (relative to mpd root), restrict the retrieval to
# songs and dirs in this directory.
#
sub all_items {
my ($self, $path) = @_;
$path ||= '';
$path =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[listallinfo "$path"\n] );
}
#
# my @items = $collection->all_items_simple( [$path] );
#
# Return *all* AMC::Items (both songs & directories) currently known
# by mpd.
#
# If $path is supplied (relative to mpd root), restrict the retrieval to
# songs and dirs in this directory.
#
# /!\ Warning: the AMC::Item::Song objects will only have their tag
# file filled. Any other tag will be empty, so don't use this sub for any
# other thing than a quick scan!
#
sub all_items_simple {
my ($self, $path) = @_;
$path ||= '';
$path =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[listall "$path"\n] );
}
#
# my @items = $collection->items_in_dir( [$path] );
#
# Return the items in the given $path. If no $path supplied, do it on mpd's
# root directory.
#
# Note that this sub does not work recusrively on all directories.
#
sub items_in_dir {
my ($self, $path) = @_;
$path ||= '';
$path =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[lsinfo "$path"\n] );
}
# -- Collection: retrieving the whole collection
#
# my @songs = $collection->all_songs( [$path] );
#
# Return *all* AMC::Item::Songs currently known by mpd.
#
# If $path is supplied (relative to mpd root), restrict the retrieval to
# songs and dirs in this directory.
#
sub all_songs {
my ($self, $path) = @_;
return grep { $_->isa('Audio::MPD::Common::Item::Song') } $self->all_items($path);
}
#
# my @albums = $collection->all_albums;
#
# Return the list of all albums (strings) currently known by mpd.
#
sub all_albums {
my ($self) = @_;
return $self->_mpd->_cooked_command_strip_first_field( "list album\n" );
}
#
# my @artists = $collection->all_artists;
#
# Return the list of all artists (strings) currently known by mpd.
#
sub all_artists {
my ($self) = @_;
return $self->_mpd->_cooked_command_strip_first_field( "list artist\n" );
}
#
# my @titles = $collection->all_titles;
#
# Return the list of all titles (strings) currently known by mpd.
#
sub all_titles {
my ($self) = @_;
return $self->_mpd->_cooked_command_strip_first_field( "list title\n" );
}
#
# my @genre = $collection->all_genre;
#
# Return the list of all genres (strings) currently known by mpd.
#
sub all_genre {
my ($self) = @_;
return $self->_mpd->_cooked_command_strip_first_field( "list genre\n" );
}
#
# my @yers = $collection->all_years;
#
# Return the list of all years (strings) currently known by mpd.
#
sub all_years {
my ($self) = @_;
return $self->_mpd->_cooked_command_strip_first_field( "list date\n" );
}
#
# my @pathes = $collection->all_pathes;
#
# Return the list of all pathes (strings) currently known by mpd.
#
sub all_pathes {
my ($self) = @_;
return $self->_mpd->_cooked_command_strip_first_field( "list filename\n" );
}
#
# my @items = $collection->all_playlists;
#
# Return the list of playlists (strings) currently known by mpd.
#
sub all_playlists {
my ($self) = @_;
return
map { /^playlist: (.*)$/ ? ($1) : () }
$self->_mpd->_send_command( "lsinfo\n" );
}
# -- Collection: picking songs
#
# my $song = $collection->song( $path );
#
# Return the AMC::Item::Song which correspond to $path.
#
sub song {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
my ($item) = $self->_mpd->_cooked_command_as_items( qq[find filename "$what"\n] );
return $item;
}
#
# my $song = $collection->songs_with_filename_partial( $path );
#
# Return the AMC::Item::Songs containing $string in their path.
#
sub songs_with_filename_partial {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[search filename "$what"\n] );
}
# -- Collection: songs, albums & artists relations
#
# my @albums = $collection->albums_by_artist($artist);
#
# Return all albums (strings) performed by $artist or where $artist
# participated.
#
sub albums_by_artist {
my ($self, $artist) = @_;
$artist =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_strip_first_field( qq[list album "$artist"\n] );
}
#
# my @songs = $collection->songs_by_artist( $genre );
#
# Return all AMC::Item::Songs performed in $genre.
#
sub songs_by_genre {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[find genre "$what"\n] );
}
sub filenames_by_artist {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[find artist "$what"\n] );
}
sub filenames_by_year {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[find date "$what"\n] );
}
sub filenames_by_genre {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[find genre "$what"\n] );
}
sub filenames_by_album {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[find album "$what"\n] );
}
#
# my @songs = $collection->songs_by_artist_partial( $string );
#
# Return all AMC::Item::Songs performed by an artist with $string
# in her name.
#
sub songs_by_artist_partial {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[search artist "$what"\n] );
}
#
# my @songs = $collection->songs_from_album( $album );
#
# Return all AMC::Item::Songs appearing in $album.
#
sub songs_from_album {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[find album "$what"\n] );
}
#
# my @songs = $collection->songs_from_album_partial( $string );
#
# Return all AMC::Item::Songs appearing in album containing $string.
#
sub songs_from_album_partial {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[search album "$what"\n] );
}
#
# my @songs = $collection->songs_with_title( $title );
#
# Return all AMC::Item::Songs which title is exactly $title.
#
sub songs_with_title {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[find title "$what"\n] );
}
#
# my @songs = $collection->songs_with_title_partial( $string );
#
# Return all AMC::Item::Songs where $string is part of the title.
#
sub songs_with_title_partial {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_items( qq[search title "$what"\n] );
}
# my @songs = $collection->songs_with_title_partial_filename( $string );
#
# Return all AMC::Item::Songs where $string is part of the title.
#
sub songs_with_title_partial_filename {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[search title "$what"\n] );
}
# my @songs = $collection->songs_with_artist_partial_filename( $string );
#
# Return all AMC::Item::Songs where $string is part of the artist.
#
sub songs_with_artist_partial_filename {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[search artist "$what"\n] );
}
# my @songs = $collection->songs_with_album_partial_filename( $string );
#
# Return all AMC::Item::Songs where $string is part of the album.
#
sub songs_with_album_partial_filename {
my ($self, $what) = @_;
$what =~ s/"/\\"/g;
return $self->_mpd->_cooked_command_as_filename( qq[search album "$what"\n] );
}
1;
__END__
=head1 NAME
Audio::MPD::Collection - an object to query MPD's collection
=head1 SYNOPSIS
my $song = $mpd->collection->random_song;
=head1 DESCRIPTION
C<Audio::MPD::Collection> is a class meant to access & query MPD's
collection. You will be able to use those high-level methods instead
of using the low-level methods provided by mpd itself.
=head1 PUBLIC METHODS
=head2 Constructor
=over 4
=item new( $mpd )
This will create the object, holding a back-reference to the C<Audio::MPD>
object itself (for communication purposes). But in order to play safe and
to free the memory in time, this reference is weakened.
Note that you're not supposed to call this constructor yourself, an
C<Audio::MPD::Collection> is automatically created for you during the creation
of an C<Audio::MPD> object.
=back
=head2 Retrieving songs & directories
=over 4
=item $coll->all_items( [$path] )
Return B<all> C<Audio::MPD::Common::Item>s (both songs & directories)
currently known by mpd.
If C<$path> is supplied (relative to mpd root), restrict the retrieval to
songs and dirs in this directory.
=item $coll->all_items_simple( [$path] )
Return B<all> C<Audio::MPD::Common::Item>s (both songs & directories)
currently known by mpd.
If C<$path> is supplied (relative to mpd root), restrict the retrieval to
songs and dirs in this directory.
B</!\ Warning>: the C<Audio::MPD::Common::Item::Song> objects will only have
their tag file filled. Any other tag will be empty, so don't use this sub for
any other thing than a quick scan!
=item $coll->items_in_dir( [$path] )
Return the items in the given C<$path>. If no C<$path> supplied, do it on
mpd's root directory.
Note that this sub does not work recusrively on all directories.
=back
=head2 Retrieving the whole collection
=over 4
=item $coll->all_songs( [$path] )
Return B<all> C<Audio::MPD::Common::Item::Song>s currently known by mpd.
If C<$path> is supplied (relative to mpd root), restrict the retrieval to
songs and dirs in this directory.
=item $coll->all_albums()
Return the list of all albums (strings) currently known by mpd.
=item $coll->all_artists()
Return the list of all artists (strings) currently known by mpd.
=item $coll->all_titles()
Return the list of all song titles (strings) currently known by mpd.
=item $coll->all_pathes()
Return the list of all pathes (strings) currently known by mpd.
=item $coll->all_playlists()
Return the list of all playlists (strings) currently known by mpd.
=back
=head2 Picking a song
=over 4
=item $coll->song( $path )
Return the C<Audio::MPD::Common::Item::Song> which correspond to C<$path>.
=item $coll->songs_with_filename_partial( $path )
Return the C<Audio::MPD::Common::Item::Song>s containing $string in their path.
=back
=head2 Songs, albums & artists relations
=over 4
=item $coll->albums_by_artist( $artist )
Return all albums (strings) performed by C<$artist> or where C<$artist>
participated.
=item $coll->songs_by_artist( $artist )
Return all C<Audio::MPD::Common::Item::Song>s performed by C<$artist>.
=item $coll->songs_by_artist_partial( $string )
Return all C<Audio::MPD::Common::Item::Song>s performed by an artist with
C<$string> in her name.
=item $coll->songs_from_album( $album )
Return all C<Audio::MPD::Common::Item::Song>s appearing in C<$album>.
=item $coll->songs_from_album_partial( $string )
Return all C<Audio::MPD::Common::Item::Song>s appearing in album containing C<$string>.
=item $coll->songs_with_title( $title )
Return all C<Audio::MPD::Common::Item::Song>s which title is exactly C<$title>.
=item $coll->songs_with_title_partial( $string )
Return all C<Audio::MPD::Common::Item::Song>s where C<$string> is part of the title.
=back
=head1 SEE ALSO
L<Audio::MPD>
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,88 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common;
use warnings;
use strict;
our $VERSION = '0.1.2';
1;
__END__
=head1 NAME
Audio::MPD::Common - a bunch of common helper classes for mpd
=head1 DESCRIPTION
Depending on whether you're using a POE-aware environment or not, people
wanting to tinker with mpd (Music Player Daemon) will use either
L<POE::Component::Client::MPD> or L<Audio::MPD>.
But even if the run-cores of those two modules differ completely, they
are using the exact same common classes to represent the various mpd
states and information.
Therefore, those common classes have been outsourced to
L<Audio::MPD::Common>.
This module does not export any methods, but the dist provides the
following classes that you can query with perldoc:
=over 4
=item o L<Audio::MPD::Common::Item>
=item o L<Audio::MPD::Common::Item::Directory>
=item o L<Audio::MPD::Common::Item::Playlist>
=item o L<Audio::MPD::Common::Item::Song>
=item o L<Audio::MPD::Common::Stats>
=item o L<Audio::MPD::Common::Status>
=item o L<Audio::MPD::Common::Time>
=back
Note that those modules should not be of any use outside the two mpd
modules afore-mentioned.
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,100 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Item;
use strict;
use warnings;
use Audio::MPD::Common::Item::Directory;
use Audio::MPD::Common::Item::Playlist;
use Audio::MPD::Common::Item::Song;
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
#
# constructor.
#
sub new {
my ($pkg, %params) = @_;
# transform keys in lowercase.
my %lowcase;
@lowcase{ keys %params } = values %params;
return Audio::MPD::Common::Item::Song->new(\%lowcase) if exists $params{file};
return Audio::MPD::Common::Item::Directory->new(\%lowcase) if exists $params{directory};
return Audio::MPD::Common::Item::Playlist->new(\%lowcase) if exists $params{playlist};
}
1;
__END__
=head1 NAME
Audio::MPD::Common::Item - a generic collection item
=head1 SYNOPSIS
my $item = Audio::MPD::Common::Item->new( %params );
=head1 DESCRIPTION
C<Audio::MPD::Common::Item> is a virtual class representing a generic
item of mpd's collection. It can be either a song, a directory or a playlist.
Depending on the params given to C<new>, it will create and return an
C<Audio::MPD::Common::Item::Song>, an C<Audio::MPD::Common::Item::Directory>
or an C<Audio::MPD::Common::Playlist> object. Currently, the
discrimination is done on the existence of the C<file> key of C<%params>.
=head1 PUBLIC METHODS
Note that the only sub worth it in this class is the constructor:
=over 4
=item new( key => val [, key => val [, ...] ] )
Create and return either an C<Audio::MPD::Common::Item::Song>, an
C<Audio::MPD::Common::Item::Directory> or an C<Audio::MPD::Common::Playlist>
object, depending on the existence of a key C<file>, C<directory> or
C<playlist> (respectively).
=back
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,72 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Item::Directory;
use strict;
use warnings;
use base qw[ Class::Accessor::Fast Audio::MPD::Common::Item ];
__PACKAGE__->mk_accessors( qw[ directory ] );
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
1;
__END__
=head1 NAME
Audio::MPD::Common::Item::Directory - a directory object
=head1 SYNOPSIS
print $item->directory . "\n";
=head1 DESCRIPTION
C<Audio::MPD::Common::Item::Directory> is more a placeholder for a
hash ref with one pre-defined key, namely the directory name.
=head1 PUBLIC METHODS
This module only has a C<new()> constructor, which should only be called by
C<Audio::MPD::Common::Item>'s constructor.
The only other public method is an accessor: directory().
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,72 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Item::Playlist;
use strict;
use warnings;
use base qw[ Class::Accessor::Fast Audio::MPD::Common::Item ];
__PACKAGE__->mk_accessors( qw[ playlist ] );
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
1;
__END__
=head1 NAME
Audio::MPD::Common::Item::Playlist - a playlist object
=head1 SYNOPSIS
print $item->playlist . "\n";
=head1 DESCRIPTION
C<Audio::MPD::Common::Item::Playlist> is more a placeholder for a hash ref
with one pre-defined key, namely the playlist name.
=head1 PUBLIC METHODS
This module only has a C<new()> constructor, which should only be called by
C<Audio::MPD::Common::Item>'s constructor.
The only other public method is an accessor: playlist().
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,133 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Item::Song;
use strict;
use warnings;
use overload '""' => \&as_string;
use Readonly;
use base qw[ Class::Accessor::Fast Audio::MPD::Common::Item ];
__PACKAGE__->mk_accessors( qw[ Album Artist file id pos Title Track time ] );
#our ($VERSION) = '$Rev: 5645 $' =~ /(\d+)/;
Readonly my $SEP => ' = ';
#
# my $str = $song->as_string;
#
# Return a string representing $song. This string will be;
# - either "Album = Track = Artist = Title"
# - or "Artist = Title"
# - or "Title"
# - or "file"
# (in this order), depending on the existing tags of the song. The last
# possibility always exist of course, since it's a path.
#
sub as_string {
my ($self) = @_;
return $self->file unless defined $self->Title;
my $str = $self->Title;
return $str unless defined $self->Artist;
$str = $self->Artist . $SEP . $str;
return $str unless defined $self->Album && defined $self->Track;
return join $SEP,
$self->Album,
$self->Track,
$str;
}
1;
__END__
=head1 NAME
Audio::MPD::Common::Item::Song - a song object with some audio tags
=head1 DESCRIPTION
C<Audio::MPD::Common::Item::Song> is more a placeholder for a
hash ref with some pre-defined keys, namely some audio tags.
=head1 PUBLIC METHODS
This module has a C<new()> constructor, which should only be called by
C<Audio::MPD::Common::Item>'s constructor.
The only other public methods are the accessors - see below.
=head2 Accessors
The following methods are the accessors to their respective named fields:
C<Album()>, C<Artist()>, C<file()>, C<id>, C<pos>, C<Title()>, CTTrack()>,
C<time()>. You can call them either with no arg to get the value, or with
an arg to replace the current value.
=head2 Methods
=over 4
=item $song->as_string()
Return a string representing $song. This string will be:
=over 4
=item either "Album = Track = Artist = Title"
=item or "Artist = Title"
=item or "Title"
=item or "file"
=back
(in this order), depending on the existing tags of the song. The last
possibility always exist of course, since it's a path.
=back
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,135 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Stats;
use warnings;
use strict;
use base qw[ Class::Accessor::Fast ];
__PACKAGE__->mk_accessors
( qw[ artists albums songs uptime playtime db_playtime db_update ] );
#our ($VERSION) = '$Rev$' =~ /(\d+)/;
1;
__END__
=head1 NAME
Audio::MPD::Common::Stats - class representing MPD stats
=head1 SYNOPSIS
print $stats->artists;
=head1 DESCRIPTION
The MPD server maintains some general information. Those information can be
queried with the mpd modules. Some of those information are served to you as
an C<Audio::MPD::Common::Status> object.
Note that an C<Audio::MPD::Common::Stats> object does B<not> update itself
regularly, and thus should be used immediately.
=head1 METHODS
=head2 Constructor
=over 4
=item new( %kv )
The C<new()> method is the constructor for the C<Audio::MPD::Common::Stats>
class.
Note: one should B<never> ever instantiate an C<Audio::MPD::Common::Stats>
object directly - use the mpd modules instead.
=back
=head2 Accessors
Once created, one can access to the following members of the object:
=over 4
=item $stats->artists()
Number of artists in the music database.
=item $stats->albums()
Number of albums in the music database.
=item $stats->songs()
Number of songs in the music database.
=item $stats->uptime()
Daemon uptime (time since last startup) in seconds.
=item $stats->playtime()
Time length of music played.
=item $stats->db_playtime()
Sum of all song times in the music database.
=item $stats->db_update()
Last database update in UNIX time.
=back
Please note that those accessors are read-only: changing a value will B<not>
change the current settings of MPD server. Use the mpd modules to alter the
settings.
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,192 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Status;
use warnings;
use strict;
use Audio::MPD::Common::Time;
use base qw[ Class::Accessor::Fast ];
__PACKAGE__->mk_accessors
( qw[ audio bitrate error playlist playlistlength random
repeat song songid state time volume updating_db xfade ] );
#our ($VERSION) = '$Rev: 5865 $' =~ /(\d+)/;
#--
# Constructor
#
# my $status = Audio::MPD::Common::Status->new( \%kv )
#
# The constructor for the class Audio::MPD::Common::Status. %kv is
# a cooked output of what MPD server returns to the status command.
#
sub new {
my ($class, $kv) = @_;
my %kv = %$kv;
$kv{time} = Audio::MPD::Common::Time->new( delete $kv{time} );
bless \%kv, $class;
return \%kv;
}
1;
__END__
=head1 NAME
Audio::MPD::Common::Status - class representing MPD status
=head1 SYNOPSIS
print $status->bitrate;
=head1 DESCRIPTION
The MPD server maintains some information on its current state. Those
information can be queried with mpd modules. Some of those information
are served to you as an C<Audio::MPD::Common::Status> object.
Note that an C<Audio::MPD::Common::Status> object does B<not> update
itself regularly, and thus should be used immediately.
=head1 METHODS
=head2 Constructor
=over 4
=item new( \%kv )
The C<new()> method is the constructor for the C<Audio::MPD::Common::Status>
class.
Note: one should B<never> ever instantiate an C<Audio::MPD::Common::Status>
object directly - use the mpd modules instead.
=back
=head2 Accessors
Once created, one can access to the following members of the object:
=over 4
=item $status->audio()
A string with the sample rate of the song currently playing, number of bits
of the output and number of channels (2 for stereo) - separated by a colon.
=item $status->bitrate()
The instantaneous bitrate in kbps.
=item $status->error()
May appear in special error cases, such as when disabling output.
=item $status->playlist()
The playlist version number, that changes every time the playlist is updated.
=item $status->playlistlength()
The number of songs in the playlist.
=item $status->random()
Whether the playlist is read randomly or not.
=item $status->repeat()
Whether the song is repeated or not.
=item $status->song()
The offset of the song currently played in the playlist.
=item $status->songid()
The song id (MPD id) of the song currently played.
=item $status->state()
The state of MPD server. Either C<play>, C<stop> or C<pause>.
=item $status->time()
An C<Audio::MPD::Common::Time> object, representing the time elapsed /
remainging and total. See the associated pod for more details.
=item $status->updating_db()
An integer, representing the current update job.
=item $status->volume()
The current MPD volume - an integer between 0 and 100.
=item $status->xfade()
The crossfade in seconds.
=back
Please note that those accessors are read-only: changing a value will B<not>
change the current settings of MPD server. Use the mpd modules to alter the
settings.
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,186 @@
#
# This file is part of Audio::MPD::Common
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Common::Time;
use warnings;
use strict;
use base qw[ Class::Accessor::Fast ];
__PACKAGE__->mk_accessors
( qw[ percent sofar left total
sofar_secs sofar_mins seconds_sofar
total_secs total_mins seconds_total
left_secs left_mins seconds_left
] );
#our ($VERSION) = '$Rev$' =~ /(\d+)/;
#--
# Constructor
#
# my $status = Audio::MPD::Common::Time->new( $time )
#
# The constructor for the class Audio::MPD::Common::Time. $time is
# the time value (on the "time" line) of what the output MPD server
# returns to the status command.
#
sub new {
my ($class, $time) = @_;
$time ||= '0:0';
my ($seconds_sofar, $seconds_total) = split /:/, $time;
my $seconds_left = $seconds_total - $seconds_sofar;
my $percent = $seconds_total ? 100*$seconds_sofar/$seconds_total : 0;
# Parse the time so far
my $sofar_mins = int( $seconds_sofar / 60 );
my $sofar_secs = $seconds_sofar % 60;
my $sofar = sprintf "%d:%02d", $sofar_mins, $sofar_secs;
# Parse the total time
my $total_mins = int( $seconds_total / 60 );
my $total_secs = $seconds_total % 60;
my $total = sprintf "%d:%02d", $total_mins, $total_secs;
# Parse the time left
my $left_mins = int( $seconds_left / 60 );
my $left_secs = $seconds_left % 60;
my $left = sprintf "%d:%02d", $left_mins, $left_secs;
# create object
my $self = {
# time elapsed in seconds
seconds_sofar => $seconds_sofar,
seconds_left => $seconds_left,
seconds_total => $seconds_total,
# cooked values
sofar => $sofar,
left => $left,
total => $total,
percent => sprintf("%.1f", $percent), # 1 decimal
# details
sofar_secs => $sofar_secs,
sofar_mins => $sofar_mins,
total_secs => $total_secs,
total_mins => $total_mins,
left_secs => $left_secs,
left_mins => $left_mins,
};
bless $self, $class;
return $self;
}
1;
__END__
=head1 NAME
Audio::MPD::Common::Time - class representing time of current song
=head1 SYNOPSIS
my $time = $status->time;
print $time->sofar;
=head1 DESCRIPTION
C<Audio::MPD::Common::Status> returns some time information with the C<time()>
accessor. This information relates to the elapsed time of the current song,
as well as the remaining and total time. This information is encapsulated
in an C<Audio::MPD::Common::Time> object.
Note that an C<Audio::MPD::Common::Time> object does B<not> update itself
regularly, and thus should be used immediately.
=head1 METHODS
=head2 Constructor
=over 4
=item new( $time )
The C<new()> method is the constructor for the C<Audio::MPD::Common::Time>
class.
Note: one should B<never> ever instantiate an C<Audio::MPD::Common::Time>
object directly - use the mpd modules instead.
=back
=head2 Accessors
Once created, one can access the following members of the object:
=over 4
=item cooked values:
The C<sofar()>, C<left()> and C<total()> methods return the according values
under the form C<minutes:seconds>. Note the existence of a C<percent()>
method returning a percentage complete. (one decimal)
=item values in seconds:
The C<seconds_sofar()>, C<seconds_left()> and C<seconds_total()> return the
according values in seconds.
=item detailled values:
If you want to cook your own value, then the following methods can help:
C<sofar_secs()> and C<sofar_mins()> return the seconds and minutes elapsed.
Same for C<left_secs()> and C<left_mins()> (time remaining), C<total_secs()>
and C<total_mins()>. (total song length)
=back
Please note that those accessors are read-only: changing a value will B<not>
change the current settings of MPD server. Use the mpd modules to alter the
settings.
=head1 SEE ALSO
=over 4
=item L<Audio::MPD>
=item L<POE::Component::Client::MPD>
=back
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,427 @@
#
# This file is part of Audio::MPD
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Playlist;
use strict;
use warnings;
use Scalar::Util qw[ weaken ];
use base qw[ Class::Accessor::Fast ];
__PACKAGE__->mk_accessors( qw[ _mpd ] );
#our ($VERSION) = '$Rev$' =~ /(\d+)/;
#--
# Constructor
#
# my $collection = Audio::MPD::Playlist->new( $mpd );
#
# This will create the object, holding a back-reference to the Audio::MPD
# object itself (for communication purposes). But in order to play safe and
# to free the memory in time, this reference is weakened.
#
# Note that you're not supposed to call this constructor yourself, an
# Audio::MPD::Playlist is automatically created for you during the creation
# of an Audio::MPD object.
#
sub new {
my ($pkg, $mpd) = @_;
my $self = { _mpd => $mpd };
weaken( $self->{_mpd} );
bless $self, $pkg;
return $self;
}
#--
# Public methods
# -- Playlist: retrieving information
#
# my @items = $pl->as_items;
#
# Return an array of AMC::Item::Songs, one for each of the
# songs in the current playlist.
#
sub as_items {
my ($self) = @_;
my @list = $self->_mpd->_cooked_command_as_items("playlistinfo\n");
return @list;
}
#
# my @items = $pl->items_changed_since( $plversion );
#
# Return a list with all the songs (as API::Song objects) added to
# the playlist since playlist $plversion.
#
sub items_changed_since {
my ($self, $plid) = @_;
return $self->_mpd->_cooked_command_as_items("plchanges $plid\n");
}
# -- Playlist: adding / removing songs
#
# $pl->add( $path [, $path [...] ] );
#
# Add the songs identified by $path (relative to MPD's music directory) to
# the current playlist. No return value.
#
sub add {
my ($self, @pathes) = @_;
my $command =
"command_list_begin\n"
. join( '', map { s/"/\\"/g; qq[add "$_"\n] } @pathes )
. "command_list_end\n";
$self->_mpd->_send_command( $command );
}
#
# $pl->delete( $song [, $song [...] ] );
#
# Remove song number $song (starting from 0) from the current playlist. No
# return value.
#
sub delete {
my ($self, @songs) = @_;
my $command =
"command_list_begin\n"
. join( '', map { s/"/\\"/g; "delete $_\n" } @songs )
. "command_list_end\n";
$self->_mpd->_send_command( $command );
}
#
# $pl->deleteid( $songid [, $songid [...] ]);
#
# Remove the specified $songid (as assigned by mpd when inserted in playlist)
# from the current playlist. No return value.
#
sub deleteid {
my ($self, @songs) = @_;
my $command =
"command_list_begin\n"
. join( '', map { "deleteid $_\n" } @songs )
. "command_list_end\n";
$self->_mpd->_send_command( $command );
}
#
# $pl->clear;
#
# Remove all the songs from the current playlist. No return value.
#
sub clear {
my ($self) = @_;
$self->_mpd->_send_command("clear\n");
}
#
# $pl->crop;
#
# Remove all of the songs from the current playlist *except* the current one.
#
sub crop {
my ($self) = @_;
my $status = $self->_mpd->status;
my $cur = $status->song;
my $len = $status->playlistlength - 1;
my $command =
"command_list_begin\n"
. join( '', map { $_ != $cur ? "delete $_\n" : '' } reverse 0..$len )
. "command_list_end\n";
$self->_mpd->_send_command( $command );
}
# -- Playlist: changing playlist order
#
# $pl->shuffle();
#
# Shuffle the current playlist. No return value.
#
sub shuffle {
my ($self) = @_;
$self->_mpd->_send_command("shuffle\n");
}
#
# $pl->swap( $song1, $song2 );
#
# Swap positions of song number $song1 and $song2 in the current playlist.
# No return value.
#
sub swap {
my ($self, $from, $to) = @_;
$self->_mpd->_send_command("swap $from $to\n");
}
#
# $pl->swapid( $songid1, $songid2 );
#
# Swap the postions of song ID $songid1 with song ID $songid2 in the
# current playlist. No return value.
#
sub swapid {
my ($self, $from, $to) = @_;
$self->_mpd->_send_command("swapid $from $to\n");
}
#
# $pl->move( $song, $newpos );
#
# Move song number $song to the position $newpos. No return value.
#
sub move {
my ($self, $song, $pos) = @_;
$self->_mpd->_send_command("move $song $pos\n");
}
#
# $pl->moveid( $songid, $newpos );
#
# Move song ID $songid to the position $newpos. No return value.
#
sub moveid {
my ($self, $song, $pos) = @_;
$self->_mpd->_send_command("moveid $song $pos\n");
}
# -- Playlist: managing playlists
#
# $pl->load( $playlist );
#
# Load list of songs from specified $playlist file. No return value.
#
sub load {
my ($self, $playlist) = @_;
$self->_mpd->_send_command( qq[load "$playlist"\n] );
}
#
# $pl->save( $playlist );
#
# Save the current playlist to a file called $playlist in MPD's playlist
# directory. No return value.
#
sub save {
my ($self, $playlist) = @_;
$self->_mpd->_send_command( qq[save "$playlist"\n] );
}
#
# $pl->rm( $playlist )
#
# Delete playlist named $playlist from MPD's playlist directory. No
# return value.
#
sub rm {
my ($self, $playlist) = @_;
$self->_mpd->_send_command( qq[rm "$playlist"\n] );
}
1;
__END__
=head1 NAME
Audio::MPD::Playlist - an object to mess MPD's playlist
=head1 SYNOPSIS
my $song = $mpd->playlist->randomize;
=head1 DESCRIPTION
C<Audio::MPD::Playlist> is a class meant to access & update MPD's
playlist.
=head1 PUBLIC METHODS
=head2 Constructor
=over 4
=item new( $mpd )
This will create the object, holding a back-reference to the C<Audio::MPD>
object itself (for communication purposes). But in order to play safe and
to free the memory in time, this reference is weakened.
Note that you're not supposed to call this constructor yourself, an
C<Audio::MPD::Playlist> is automatically created for you during the creation
of an C<Audio::MPD> object.
=back
=head2 Retrieving information
=over 4
=item $pl->as_items()
Return an array of C<Audio::MPD::Common::Item::Song>s, one for each of the
songs in the current playlist.
=item $pl->items_changed_since( $plversion )
Return a list with all the songs (as AMC::Item::Song objects) added to
the playlist since playlist $plversion.
=back
=head2 Adding / removing songs
=over 4
=item $pl->add( $path [, $path [...] ] )
Add the songs identified by C<$path> (relative to MPD's music directory) to the
current playlist. No return value.
=item $pl->delete( $song [, $song [...] ] )
Remove song number C<$song>s (starting from 0) from the current playlist. No
return value.
=item $pl->deleteid( $songid [, $songid [...] ] )
Remove the specified C<$songid>s (as assigned by mpd when inserted in playlist)
from the current playlist. No return value.
=item $pl->clear()
Remove all the songs from the current playlist. No return value.
=item $pl->crop()
Remove all of the songs from the current playlist *except* the
song currently playing.
=back
=head2 Changing playlist order
=over 4
=item $pl->shuffle()
Shuffle the current playlist. No return value.
=item $pl->swap( $song1, $song2 )
Swap positions of song number C<$song1> and C<$song2> in the current
playlist. No return value.
=item $pl->swapid( $songid1, $songid2 )
Swap the postions of song ID C<$songid1> with song ID C<$songid2> in the
current playlist. No return value.
=item $pl->move( $song, $newpos )
Move song number C<$song> to the position C<$newpos>. No return value.
=item $pl->moveid( $songid, $newpos )
Move song ID C<$songid> to the position C<$newpos>. No return value.
=back
=head2 Managing playlists
=over 4
=item $pl->load( $playlist )
Load list of songs from specified C<$playlist> file. No return value.
=item $pl->save( $playlist )
Save the current playlist to a file called C<$playlist> in MPD's playlist
directory. No return value.
=item $pl->rm( $playlist )
Delete playlist named C<$playlist> from MPD's playlist directory. No
return value.
=back
=head1 SEE ALSO
L<Audio::MPD>
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,217 @@
#
# This file is part of Audio::MPD
# Copyright (c) 2007 Jerome Quelin, all rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
package Audio::MPD::Test;
use strict;
use warnings;
use Exporter;
use FindBin qw[ $Bin ];
use Readonly;
use base qw[ Exporter ];
our @EXPORT = qw[ customize_test_mpd_configuration start_test_mpd stop_test_mpd ];
#our ($VERSION) = '$Rev: 5284 $' =~ /(\d+)/;
Readonly my $TEMPLATE => "$Bin/mpd-test/mpd.conf.template";
Readonly my $CONFIG => "$Bin/mpd-test/mpd.conf";
{ # this will be run when Audio::MPD::Test will be use-d.
my $restart = 0;
my $stopit = 0;
customize_test_mpd_configuration();
$restart = _stop_user_mpd_if_needed();
$stopit = start_test_mpd();
END {
stop_test_mpd() if $stopit;
return unless $restart; # no need to restart
system 'mpd 2>/dev/null'; # restart user mpd
sleep 1; # wait 1 second to let mpd start.
}
}
#--
# public subs
#
# customize_test_mpd_configuration( [$port] )
#
# Create a fake mpd configuration file, based on the file mpd.conf.template
# located in t/mpd-test. The string PWD will be replaced by the real path -
# ie, where the tarball has been untarred. The string PORT will be replaced
# by $port if specified, 6600 otherwise (MPD default).
#
sub customize_test_mpd_configuration {
my ($port) = @_;
$port ||= 6600;
# open template and config.
open my $in, '<', $TEMPLATE or die "can't open [$TEMPLATE]: $!\n";
open my $out, '>', $CONFIG or die "can't open [$CONFIG]: $!\n";
# replace string and fill in config file.
while ( defined( my $line = <$in> ) ) {
$line =~ s!PWD!$Bin/mpd-test!;
$line =~ s!PORT!$port!;
print $out $line;
}
# clean up.
close $in;
close $out;
# create a fake mpd db.
system( "mpd --create-db $CONFIG >/dev/null 2>&1" ) == 0
or die "could not create fake mpd database: $?\n";
}
#
# start_test_mpd()
#
# Start the fake mpd, and die if there were any error.
#
sub start_test_mpd {
my $output = qx[mpd $CONFIG 2>&1];
die "could not start fake mpd: $output\n" if $output;
sleep 1; # wait 1 second to let mpd start.
return 1;
}
#
# stop_test_mpd()
#
# Kill the fake mpd.
#
sub stop_test_mpd {
system "mpd --kill $CONFIG 2>/dev/null";
sleep 1; # wait 1 second to free output device.
unlink "$Bin/mpd-test/state", "$Bin/mpd-test/music.db";
}
#--
# private subs
#
# my $was_running = _stop_user_mpd_if_needed()
#
# This sub will check if mpd is currently running. If it is, force it to
# a full stop (unless MPD_TEST_OVERRIDE is not set).
#
# In any case, it will return a boolean stating whether mpd was running
# before forcing stop.
#
sub _stop_user_mpd_if_needed {
# check if mpd is running.
my $is_running = grep { /mpd$/ } qx[ ps -e ];
return 0 unless $is_running; # mpd does not run - nothing to do.
# check force stop.
die "mpd is running\n" unless $ENV{MPD_TEST_OVERRIDE};
system( 'mpd --kill 2>/dev/null') == 0 or die "can't stop user mpd: $?\n";
sleep 1; # wait 1 second to free output device
return 1;
}
1;
__END__
=head1 NAME
Audio::MPD::Test - automate launching of fake mdp for testing purposes
=head1 SYNOPSIS
use Audio::MPD::Test; # die if error
[...]
stop_fake_mpd();
=head1 DESCRIPTION
=head2 General usage
This module will try to launch a new mpd server for testing purposes. This
mpd server will then be used during Audio::MPD tests.
In order to achieve this, the module will create a fake mpd.conf file with
the correct pathes (ie, where you untarred the module tarball). It will then
check if some mpd server is already running, and stop it if the
MPD_TEST_OVERRIDE environment variable is true (die otherwise). Last it will
run the test mpd with its newly created configuration file.
Everything described above is done automatically when the module is C<use>-d.
Once the tests are run, the mpd server will be shut down, and the original
one will be relaunched (if there was one).
Note that the test mpd will listen to C<localhost>, so you are on the safe
side. Note also that the test suite comes with its own ogg files - and yes,
we can redistribute them since it's only some random voice recordings :-)
=head2 Advanced usage
In case you want more control on the test mpd server, you can use the
following public methods:
=over 4
=item start_test_mpd()
Start the fake mpd, and die if there were any error.
=item stop_test_mpd()
Kill the fake mpd.
=item customize_test_mpd_configuration( [$port] )
Create a fake mpd configuration file, based on the file mpd.conf.template
located in t/mpd-test. The string PWD will be replaced by the real path -
ie, where the tarball has been untarred. The string PORT will be replaced
by $port if specified, 6600 otherwise (MPD default).
=back
This might be useful when trying to test connections with mpd server.
=head1 SEE ALSO
L<Audio::MPD>
=head1 AUTHOR
Jerome Quelin, C<< <jquelin at cpan.org> >>
=head1 COPYRIGHT & LICENSE
Copyright (c) 2007 Jerome Quelin, all rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut

View File

@@ -0,0 +1,803 @@
=for gpg
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
=head1 NAME
Readonly - Facility for creating read-only scalars, arrays, hashes.
=head1 VERSION
This documentation describes version 1.03 of Readonly.pm, April 20, 2004.
=cut
# Rest of documentation is after __END__.
use 5.005;
use strict;
#use warnings;
#no warnings 'uninitialized';
package Readonly;
$Readonly::VERSION = '1.03'; # Also change in the documentation!
# Autocroak (Thanks, MJD)
# Only load Carp.pm if module is croaking.
sub croak
{
require Carp;
goto &Carp::croak;
}
# These functions may be overridden by Readonly::XS, if installed.
sub is_sv_readonly ($) { 0 }
sub make_sv_readonly ($) { die "make_sv_readonly called but not overridden" }
use vars qw/$XSokay/; # Set to true in Readonly::XS, if available
# Common error messages, or portions thereof
use vars qw/$MODIFY $REASSIGN $ODDHASH/;
$MODIFY = 'Modification of a read-only value attempted';
$REASSIGN = 'Attempt to reassign a readonly';
$ODDHASH = 'May not store an odd number of values in a hash';
# See if we can use the XS stuff.
$Readonly::XS::MAGIC_COOKIE = "Do NOT use or require Readonly::XS unless you're me.";
eval 'use Readonly::XS';
# ----------------
# Read-only scalars
# ----------------
package Readonly::Scalar;
sub TIESCALAR
{
my $whence = (caller 2)[3]; # Check if naughty user is trying to tie directly.
Readonly::croak "Invalid tie" unless $whence && $whence =~ /^Readonly::(?:Scalar1?|Readonly)$/;
my $class = shift;
Readonly::croak "No value specified for readonly scalar" unless @_;
Readonly::croak "Too many values specified for readonly scalar" unless @_ == 1;
my $value = shift;
return bless \$value, $class;
}
sub FETCH
{
my $self = shift;
return $$self;
}
*STORE = *UNTIE =
sub {Readonly::croak $Readonly::MODIFY};
# ----------------
# Read-only arrays
# ----------------
package Readonly::Array;
sub TIEARRAY
{
my $whence = (caller 1)[3]; # Check if naughty user is trying to tie directly.
Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Array1?$/;
my $class = shift;
my @self = @_;
return bless \@self, $class;
}
sub FETCH
{
my $self = shift;
my $index = shift;
return $self->[$index];
}
sub FETCHSIZE
{
my $self = shift;
return scalar @$self;
}
BEGIN {
eval q{
sub EXISTS
{
my $self = shift;
my $index = shift;
return exists $self->[$index];
}
} if $] >= 5.006; # couldn't do "exists" on arrays before then
}
*STORE = *STORESIZE = *EXTEND = *PUSH = *POP = *UNSHIFT = *SHIFT = *SPLICE = *CLEAR = *UNTIE =
sub {Readonly::croak $Readonly::MODIFY};
# ----------------
# Read-only hashes
# ----------------
package Readonly::Hash;
sub TIEHASH
{
my $whence = (caller 1)[3]; # Check if naughty user is trying to tie directly.
Readonly::croak "Invalid tie" unless $whence =~ /^Readonly::Hash1?$/;
my $class = shift;
# must have an even number of values
Readonly::croak $Readonly::ODDHASH unless (@_ %2 == 0);
my %self = @_;
return bless \%self, $class;
}
sub FETCH
{
my $self = shift;
my $key = shift;
return $self->{$key};
}
sub EXISTS
{
my $self = shift;
my $key = shift;
return exists $self->{$key};
}
sub FIRSTKEY
{
my $self = shift;
my $dummy = keys %$self;
return scalar each %$self;
}
sub NEXTKEY
{
my $self = shift;
return scalar each %$self;
}
*STORE = *DELETE = *CLEAR = *UNTIE =
sub {Readonly::croak $Readonly::MODIFY};
# ----------------------------------------------------------------
# Main package, containing convenience functions (so callers won't
# have to explicitly tie the variables themselves).
# ----------------------------------------------------------------
package Readonly;
use Exporter;
use vars qw/@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS/;
push @ISA, 'Exporter';
push @EXPORT, qw/Readonly/;
push @EXPORT_OK, qw/Scalar Array Hash Scalar1 Array1 Hash1/;
# Predeclare the following, so we can use them recursively
sub Scalar ($$);
sub Array (\@;@);
sub Hash (\%;@);
# Returns true if a string begins with "Readonly::"
# Used to prevent reassignment of Readonly variables.
sub _is_badtype
{
my $type = $_[0];
return lc $type if $type =~ s/^Readonly:://;
return;
}
# Shallow Readonly scalar
sub Scalar1 ($$)
{
croak "$REASSIGN scalar" if is_sv_readonly $_[0];
my $badtype = _is_badtype (ref tied $_[0]);
croak "$REASSIGN $badtype" if $badtype;
# xs method: flag scalar as readonly
if ($XSokay)
{
$_[0] = $_[1];
make_sv_readonly $_[0];
return;
}
# pure-perl method: tied scalar
my $tieobj = eval {tie $_[0], 'Readonly::Scalar', $_[1]};
if ($@)
{
croak "$REASSIGN scalar" if substr($@,0,43) eq $MODIFY;
die $@; # some other error?
}
return $tieobj;
}
# Shallow Readonly array
sub Array1 (\@;@)
{
my $badtype = _is_badtype (ref tied $_[0]);
croak "$REASSIGN $badtype" if $badtype;
my $aref = shift;
return tie @$aref, 'Readonly::Array', @_;
}
# Shallow Readonly hash
sub Hash1 (\%;@)
{
my $badtype = _is_badtype (ref tied $_[0]);
croak "$REASSIGN $badtype" if $badtype;
my $href = shift;
# If only one value, and it's a hashref, expand it
if (@_ == 1 && ref $_[0] eq 'HASH')
{
return tie %$href, 'Readonly::Hash', %{$_[0]};
}
# otherwise, must have an even number of values
croak $ODDHASH unless (@_%2 == 0);
return tie %$href, 'Readonly::Hash', @_;
}
# Deep Readonly scalar
sub Scalar ($$)
{
croak "$REASSIGN scalar" if is_sv_readonly $_[0];
my $badtype = _is_badtype (ref tied $_[0]);
croak "$REASSIGN $badtype" if $badtype;
my $value = $_[1];
# Recursively check passed element for references; if any, make them Readonly
foreach ($value)
{
if (ref eq 'SCALAR') {Scalar my $v => $$_; $_ = \$v}
elsif (ref eq 'ARRAY') {Array my @v => @$_; $_ = \@v}
elsif (ref eq 'HASH') {Hash my %v => $_; $_ = \%v}
}
# xs method: flag scalar as readonly
if ($XSokay)
{
$_[0] = $value;
make_sv_readonly $_[0];
return;
}
# pure-perl method: tied scalar
my $tieobj = eval {tie $_[0], 'Readonly::Scalar', $value};
if ($@)
{
croak "$REASSIGN scalar" if substr($@,0,43) eq $MODIFY;
die $@; # some other error?
}
return $tieobj;
}
# Deep Readonly array
sub Array (\@;@)
{
my $badtype = _is_badtype (ref tied @{$_[0]});
croak "$REASSIGN $badtype" if $badtype;
my $aref = shift;
my @values = @_;
# Recursively check passed elements for references; if any, make them Readonly
foreach (@values)
{
if (ref eq 'SCALAR') {Scalar my $v => $$_; $_ = \$v}
elsif (ref eq 'ARRAY') {Array my @v => @$_; $_ = \@v}
elsif (ref eq 'HASH') {Hash my %v => $_; $_ = \%v}
}
# Lastly, tie the passed reference
return tie @$aref, 'Readonly::Array', @values;
}
# Deep Readonly hash
sub Hash (\%;@)
{
my $badtype = _is_badtype (ref tied %{$_[0]});
croak "$REASSIGN $badtype" if $badtype;
my $href = shift;
my @values = @_;
# If only one value, and it's a hashref, expand it
if (@_ == 1 && ref $_[0] eq 'HASH')
{
@values = %{$_[0]};
}
# otherwise, must have an even number of values
croak $ODDHASH unless (@values %2 == 0);
# Recursively check passed elements for references; if any, make them Readonly
foreach (@values)
{
if (ref eq 'SCALAR') {Scalar my $v => $$_; $_ = \$v}
elsif (ref eq 'ARRAY') {Array my @v => @$_; $_ = \@v}
elsif (ref eq 'HASH') {Hash my %v => $_; $_ = \%v}
}
return tie %$href, 'Readonly::Hash', @values;
}
# Common entry-point for all supported data types
eval q{sub Readonly} . ( $] < 5.008 ? '' : '(\[$@%]@)' ) . <<'SUB_READONLY';
{
if (ref $_[0] eq 'SCALAR')
{
croak $MODIFY if is_sv_readonly ${$_[0]};
my $badtype = _is_badtype (ref tied ${$_[0]});
croak "$REASSIGN $badtype" if $badtype;
croak "Readonly scalar must have only one value" if @_ > 2;
my $tieobj = eval {tie ${$_[0]}, 'Readonly::Scalar', $_[1]};
# Tie may have failed because user tried to tie a constant, or we screwed up somehow.
if ($@)
{
croak $MODIFY if $@ =~ /^$MODIFY at/; # Point the finger at the user.
die "$@\n"; # Not a modify read-only message; must be our fault.
}
return $tieobj;
}
elsif (ref $_[0] eq 'ARRAY')
{
my $aref = shift;
return Array @$aref, @_;
}
elsif (ref $_[0] eq 'HASH')
{
my $href = shift;
croak $ODDHASH if @_%2 != 0 && !(@_ == 1 && ref $_[0] eq 'HASH');
return Hash %$href, @_;
}
elsif (ref $_[0])
{
croak "Readonly only supports scalar, array, and hash variables.";
}
else
{
croak "First argument to Readonly must be a reference.";
}
}
SUB_READONLY
1;
__END__
=head1 SYNOPSIS
use Readonly;
# Read-only scalar
Readonly::Scalar $sca => $initial_value;
Readonly::Scalar my $sca => $initial_value;
# Read-only array
Readonly::Array @arr => @values;
Readonly::Array my @arr => @values;
# Read-only hash
Readonly::Hash %has => (key => value, key => value, ...);
Readonly::Hash my %has => (key => value, key => value, ...);
# or:
Readonly::Hash %has => {key => value, key => value, ...};
# You can use the read-only variables like any regular variables:
print $sca;
$something = $sca + $arr[2];
next if $has{$some_key};
# But if you try to modify a value, your program will die:
$sca = 7;
push @arr, 'seven';
delete $has{key};
# The error message is "Modification of a read-only value
attempted"
# Alternate form (Perl 5.8 and later)
Readonly $sca => $initial_value;
Readonly my $sca => $initial_value;
Readonly @arr => @values;
Readonly my @arr => @values;
Readonly %has => (key => value, key => value, ...);
Readonly my %has => (key => value, key => value, ...);
# Alternate form (for Perls earlier than v5.8)
Readonly \$sca => $initial_value;
Readonly \my $sca => $initial_value;
Readonly \@arr => @values;
Readonly \my @arr => @values;
Readonly \%has => (key => value, key => value, ...);
Readonly \my %has => (key => value, key => value, ...);
=head1 DESCRIPTION
This is a facility for creating non-modifiable variables. This is
useful for configuration files, headers, etc. It can also be useful
as a development and debugging tool, for catching updates to variables
that should not be changed.
If any of the values you pass to C<Scalar>, C<Array>, or C<Hash> are
references, then those functions recurse over the data structures,
marking everything as Readonly. Usually, this is what you want: the
entire structure nonmodifiable. If you want only the top level to be
Readonly, use the alternate C<Scalar1>, C<Array1> and C<Hash1>
functions.
Please note that most users of Readonly will also want to install a
companion module Readonly::XS. See the L</CONS> section below for more
details.
=head1 COMPARISON WITH "use constant"
Perl provides a facility for creating constant values, via the "use
constant" pragma. There are several problems with this pragma.
=over 2
=item *
The constants created have no leading $ or @ character.
=item *
These constants cannot be interpolated into strings.
=item *
Syntax can get dicey sometimes. For example:
use constant CARRAY => (2, 3, 5, 7, 11, 13);
$a_prime = CARRAY[2]; # wrong!
$a_prime = (CARRAY)[2]; # right -- MUST use parentheses
=item *
You have to be very careful in places where barewords are allowed.
For example:
use constant SOME_KEY => 'key';
%hash = (key => 'value', other_key => 'other_value');
$some_value = $hash{SOME_KEY}; # wrong!
$some_value = $hash{+SOME_KEY}; # right
(who thinks to use a unary plus when using a hash?)
=item *
C<use constant> works for scalars and arrays, not hashes.
=item *
These constants are global ot the package in which they're declared;
cannot be lexically scoped.
=item *
Works only at compile time.
=item *
Can be overridden:
use constant PI => 3.14159;
...
use constant PI => 2.71828;
(this does generate a warning, however, if you have warnings enabled).
=item *
It is very difficult to make and use deep structures (complex data
structures) with C<use constant>.
=back
=head1 COMPARISON WITH TYPEGLOB CONSTANTS
Another popular way to create read-only scalars is to modify the symbol
table entry for the variable by using a typeglob:
*a = \'value';
This works fine, but it only works for global variables ("my"
variables have no symbol table entry). Also, the following similar
constructs do B<not> work:
*a = [1, 2, 3]; # Does NOT create a read-only array
*a = { a => 'A'}; # Does NOT create a read-only hash
=head1 PROS
Readonly.pm, on the other hand, will work with global variables and
with lexical ("my") variables. It will create scalars, arrays, or
hashes, all of which look and work like normal, read-write Perl
variables. You can use them in scalar context, in list context; you
can take references to them, pass them to functions, anything.
Readonly.pm also works well with complex data structures, allowing you
to tag the whole structure as nonmodifiable, or just the top level.
Also, Readonly variables may not be reassigned. The following code
will die:
Readonly::Scalar $pi => 3.14159;
...
Readonly::Scalar $pi => 2.71828;
=head1 CONS
Readonly.pm does impose a performance penalty. It's pretty slow. How
slow? Run the C<benchmark.pl> script that comes with Readonly. On my
test system, "use constant", typeglob constants, and regular
read/write Perl variables were all about the same speed, and
Readonly.pm constants were about 1/20 the speed.
However, there is relief. There is a companion module available,
Readonly::XS. If it is installed on your system, Readonly.pm uses it
to make read-only scalars much faster. With Readonly::XS, Readonly
scalars are as fast as the other types of variables. Readonly arrays
and hashes will still be relatively slow. But it's likely that most
of your Readonly variables will be scalars.
If you can't use Readonly::XS (for example, if you don't have a C
compiler, or your perl is statically linked and you don't want to
re-link it), you have to decide whether the benefits of Readonly
variables outweigh the speed issue. For most configuration variables
(and other things that Readonly is likely to be useful for), the speed
issue is probably not really a big problem. But benchmark your
program if it might be. If it turns out to be a problem, you may
still want to use Readonly.pm during development, to catch changes to
variables that should not be changed, and then remove it for
production:
# For testing:
Readonly::Scalar $Foo_Directory => '/usr/local/foo';
Readonly::Scalar $Bar_Directory => '/usr/local/bar';
# $Foo_Directory = '/usr/local/foo';
# $Bar_Directory = '/usr/local/bar';
# For production:
# Readonly::Scalar $Foo_Directory => '/usr/local/foo';
# Readonly::Scalar $Bar_Directory => '/usr/local/bar';
$Foo_Directory = '/usr/local/foo';
$Bar_Directory = '/usr/local/bar';
=head1 FUNCTIONS
=over 4
=item Readonly::Scalar $var => $value;
Creates a nonmodifiable scalar, C<$var>, and assigns a value of
C<$value> to it. Thereafter, its value may not be changed. Any
attempt to modify the value will cause your program to die.
A value I<must> be supplied. If you want the variable to have
C<undef> as its value, you must specify C<undef>.
If C<$value> is a reference to a scalar, array, or hash, then this
function will mark the scalar, array, or hash it points to as being
Readonly as well, and it will recursively traverse the structure,
marking the whole thing as Readonly. Usually, this is what you want.
However, if you want only the C<$value> marked as Readonly, use
C<Scalar1>.
If $var is already a Readonly variable, the program will die with
an error about reassigning Readonly variables.
=item Readonly::Array @arr => (value, value, ...);
Creates a nonmodifiable array, C<@arr>, and assigns the specified list
of values to it. Thereafter, none of its values may be changed; the
array may not be lengthened or shortened or spliced. Any attempt to
do so will cause your program to die.
If any of the values passed is a reference to a scalar, array, or hash,
then this function will mark the scalar, array, or hash it points to as
being Readonly as well, and it will recursively traverse the structure,
marking the whole thing as Readonly. Usually, this is what you want.
However, if you want only the hash C<%@arr> itself marked as Readonly,
use C<Array1>.
If @arr is already a Readonly variable, the program will die with
an error about reassigning Readonly variables.
=item Readonly::Hash %h => (key => value, key => value, ...);
=item Readonly::Hash %h => {key => value, key => value, ...};
Creates a nonmodifiable hash, C<%h>, and assigns the specified keys
and values to it. Thereafter, its keys or values may not be changed.
Any attempt to do so will cause your program to die.
A list of keys and values may be specified (with parentheses in the
synopsis above), or a hash reference may be specified (curly braces in
the synopsis above). If a list is specified, it must have an even
number of elements, or the function will die.
If any of the values is a reference to a scalar, array, or hash, then
this function will mark the scalar, array, or hash it points to as
being Readonly as well, and it will recursively traverse the
structure, marking the whole thing as Readonly. Usually, this is what
you want. However, if you want only the hash C<%h> itself marked as
Readonly, use C<Hash1>.
If %h is already a Readonly variable, the program will die with
an error about reassigning Readonly variables.
=item Readonly $var => $value;
=item Readonly @arr => (value, value, ...);
=item Readonly %h => (key => value, ...);
=item Readonly %h => {key => value, ...};
The C<Readonly> function is an alternate to the C<Scalar>, C<Array>,
and C<Hash> functions. It has the advantage (if you consider it an
advantage) of being one function. That may make your program look
neater, if you're initializing a whole bunch of constants at once.
You may or may not prefer this uniform style.
It has the disadvantage of having a slightly different syntax for
versions of Perl prior to 5.8. For earlier versions, you must supply
a backslash, because it requires a reference as the first parameter.
Readonly \$var => $value;
Readonly \@arr => (value, value, ...);
Readonly \%h => (key => value, ...);
Readonly \%h => {key => value, ...};
You may or may not consider this ugly.
=item Readonly::Scalar1 $var => $value;
=item Readonly::Array1 @arr => (value, value, ...);
=item Readonly::Hash1 %h => (key => value, key => value, ...);
=item Readonly::Hash1 %h => {key => value, key => value, ...};
These alternate functions create shallow Readonly variables, instead
of deep ones. For example:
Readonly::Array1 @shal => (1, 2, {perl=>'Rules', java=>'Bites'}, 4, 5);
Readonly::Array @deep => (1, 2, {perl=>'Rules', java=>'Bites'}, 4, 5);
$shal[1] = 7; # error
$shal[2]{APL}='Weird'; # Allowed! since the hash isn't Readonly
$deep[1] = 7; # error
$deep[2]{APL}='Weird'; # error, since the hash is Readonly
=back
=head1 EXAMPLES
# SCALARS:
# A plain old read-only value
Readonly::Scalar $a => "A string value";
# The value need not be a compile-time constant:
Readonly::Scalar $a => $computed_value;
# ARRAYS:
# A read-only array:
Readonly::Array @a => (1, 2, 3, 4);
# The parentheses are optional:
Readonly::Array @a => 1, 2, 3, 4;
# You can use Perl's built-in array quoting syntax:
Readonly::Array @a => qw/1 2 3 4/;
# You can initialize a read-only array from a variable one:
Readonly::Array @a => @computed_values;
# A read-only array can be empty, too:
Readonly::Array @a => ();
Readonly::Array @a; # equivalent
# HASHES
# Typical usage:
Readonly::Hash %a => (key1 => 'value1', key2 => 'value2');
# A read-only hash can be initialized from a variable one:
Readonly::Hash %a => %computed_values;
# A read-only hash can be empty:
Readonly::Hash %a => ();
Readonly::Hash %a; # equivalent
# If you pass an odd number of values, the program will die:
Readonly::Hash %a => (key1 => 'value1', "value2");
--> dies with "May not store an odd number of values in a hash"
=head1 EXPORTS
By default, this module exports the following symbol into the calling
program's namespace:
Readonly
The following symbols are available for import into your program, if
you like:
Scalar Scalar1
Array Array1
Hash Hash1
=head1 REQUIREMENTS
Perl 5.000
Carp.pm (included with Perl)
Exporter.pm (included with Perl)
Readonly::XS is recommended but not required.
=head1 ACKNOWLEDGEMENTS
Thanks to Slaven Rezic for the idea of one common function
(Readonly) for all three types of variables (13 April 2002).
Thanks to Ernest Lergon for the idea (and initial code) for
deeply-Readonly data structures (21 May 2002).
Thanks to Damian Conway for the idea (and code) for making the
Readonly function work a lot smoother under perl 5.8+.
=head1 AUTHOR / COPYRIGHT
Eric J. Roode, roode@cpan.org
Copyright (c) 2001-2004 by Eric J. Roode. All Rights Reserved. This
module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.
If you have suggestions for improvement, please drop me a line. If
you make improvements to this software, I ask that you please send me
a copy of your changes. Thanks.
Readonly.pm is made from 100% recycled electrons. No animals were
harmed during the development and testing of this module. Not sold
in stores! Readonly::XS sold separately. Void where prohibited.
=cut
=begin gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFAhaGCY96i4h5M0egRAg++AJ0ar4ncojbOp0OOc2wo+E/1cBn5cQCg9eP9
qTzAC87PuyKB+vrcRykrDbo=
=39Ny
-----END PGP SIGNATURE-----
=cut

14
config/mpfire/webradio Normal file
View File

@@ -0,0 +1,14 @@
62.75.176.45/rtl-high|89.0 RTL Hitradio|http://www.89.0rtl.de
gffstream.ic.llnwd.net/stream/gffstream_stream_wdr_einslive_b|Einslive|http://www.einslive.de/
213.186.41.149:8040|Deepinside Radio European|http://www.deepinside.co.uk
62.75.176.40:80/bigfm-cbr-128|BigFM|http://www.bigfm.de
stream.telvi.de:8000/radiobrocken|Hit-Radio Brocken|http://www.radiobrocken.de
magic-island.eu:8000/listen.mp3|Magic Island|http://www.magic-island.eu
dsl.blackbeats.fm:13000|BlackBeats FM|http://www.blackbeats.fm
87.118.64.197:3100|Discofox-Radio|http://www.discofox-radio.de
rmnradio.powerstream.de:8022|RMNradio|http://www.rmnradio.de/
relay.radio.ethz.ch:8000/kohina.ogg|Kohina|http://www.kohina.com
relay1.slayradio.org:8000|Slay Radio|http://www.slayradio.com/
demovibes.de:8000/necta128.ogg|Nectarine Demoscene Radio|http://www.scenemusic.eu/
r1.scenesat.com:8000/scenesathi|SceneSat Radio|http://www.scenesat.com
radioparadise.steadyhost.com:8060|Radio Paradise|http://www.radioparadise.com/

View File

@@ -79,10 +79,13 @@ extendedKeyUsage = clientAuth
keyUsage = digitalSignature
[ server ]
# JY ADDED -- Make a cert with nsCertType set to "server"
basicConstraints = CA:FALSE
nsCertType = server
nsComment = "OpenSSL Generated Server Certificate"
subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid,issuer:always
extendedKeyUsage = serverAuth
keyUsage = digitalSignature, keyEncipherment

View File

@@ -43,6 +43,7 @@ OVPN="/var/ipfire/ovpn"
CRL="${OVPN}/crls/cacrl.pem"
CAKEY="${OVPN}/ca/cakey.pem"
CACERT="${OVPN}/ca/cacert.pem"
OPENSSLCONF="${OVPN}/openssl/ovpn.cnf"
# Check if CRL is presant or if OpenVPN is active
if [ ! -e "${CAKEY}" ]; then
@@ -75,7 +76,7 @@ UPDATE="14"
## Mainpart
# Check if OpenVPNs CRL needs to be renewed
if [ ${NEXTUPDATE} -le ${UPDATE} ]; then
if openssl ca -gencrl -keyfile "${CAKEY}" -cert "${CACERT}" -out "${CRL}" -config "/usr/share/openvpn/ovpn.cnf"; then
if openssl ca -gencrl -keyfile "${CAKEY}" -cert "${CACERT}" -out "${CRL}" -config "${OPENSSLCONF}"; then
logger -t openvpn "CRL has been updated"
else
logger -t openvpn "error: Could not update CRL"

View File

@@ -52,376 +52,267 @@ usr/lib/bfd-plugins/libdep.so
#usr/lib/ldscripts/aarch64elf.xbn
#usr/lib/ldscripts/aarch64elf.xc
#usr/lib/ldscripts/aarch64elf.xce
#usr/lib/ldscripts/aarch64elf.xcer
#usr/lib/ldscripts/aarch64elf.xd
#usr/lib/ldscripts/aarch64elf.xdc
#usr/lib/ldscripts/aarch64elf.xdce
#usr/lib/ldscripts/aarch64elf.xdcer
#usr/lib/ldscripts/aarch64elf.xde
#usr/lib/ldscripts/aarch64elf.xder
#usr/lib/ldscripts/aarch64elf.xdw
#usr/lib/ldscripts/aarch64elf.xdwe
#usr/lib/ldscripts/aarch64elf.xdwer
#usr/lib/ldscripts/aarch64elf.xe
#usr/lib/ldscripts/aarch64elf.xer
#usr/lib/ldscripts/aarch64elf.xn
#usr/lib/ldscripts/aarch64elf.xr
#usr/lib/ldscripts/aarch64elf.xs
#usr/lib/ldscripts/aarch64elf.xsc
#usr/lib/ldscripts/aarch64elf.xsce
#usr/lib/ldscripts/aarch64elf.xscer
#usr/lib/ldscripts/aarch64elf.xse
#usr/lib/ldscripts/aarch64elf.xser
#usr/lib/ldscripts/aarch64elf.xsw
#usr/lib/ldscripts/aarch64elf.xswe
#usr/lib/ldscripts/aarch64elf.xswer
#usr/lib/ldscripts/aarch64elf.xu
#usr/lib/ldscripts/aarch64elf.xw
#usr/lib/ldscripts/aarch64elf.xwe
#usr/lib/ldscripts/aarch64elf.xwer
#usr/lib/ldscripts/aarch64elf32.x
#usr/lib/ldscripts/aarch64elf32.xbn
#usr/lib/ldscripts/aarch64elf32.xc
#usr/lib/ldscripts/aarch64elf32.xce
#usr/lib/ldscripts/aarch64elf32.xcer
#usr/lib/ldscripts/aarch64elf32.xd
#usr/lib/ldscripts/aarch64elf32.xdc
#usr/lib/ldscripts/aarch64elf32.xdce
#usr/lib/ldscripts/aarch64elf32.xdcer
#usr/lib/ldscripts/aarch64elf32.xde
#usr/lib/ldscripts/aarch64elf32.xder
#usr/lib/ldscripts/aarch64elf32.xdw
#usr/lib/ldscripts/aarch64elf32.xdwe
#usr/lib/ldscripts/aarch64elf32.xdwer
#usr/lib/ldscripts/aarch64elf32.xe
#usr/lib/ldscripts/aarch64elf32.xer
#usr/lib/ldscripts/aarch64elf32.xn
#usr/lib/ldscripts/aarch64elf32.xr
#usr/lib/ldscripts/aarch64elf32.xs
#usr/lib/ldscripts/aarch64elf32.xsc
#usr/lib/ldscripts/aarch64elf32.xsce
#usr/lib/ldscripts/aarch64elf32.xscer
#usr/lib/ldscripts/aarch64elf32.xse
#usr/lib/ldscripts/aarch64elf32.xser
#usr/lib/ldscripts/aarch64elf32.xsw
#usr/lib/ldscripts/aarch64elf32.xswe
#usr/lib/ldscripts/aarch64elf32.xswer
#usr/lib/ldscripts/aarch64elf32.xu
#usr/lib/ldscripts/aarch64elf32.xw
#usr/lib/ldscripts/aarch64elf32.xwe
#usr/lib/ldscripts/aarch64elf32.xwer
#usr/lib/ldscripts/aarch64elf32b.x
#usr/lib/ldscripts/aarch64elf32b.xbn
#usr/lib/ldscripts/aarch64elf32b.xc
#usr/lib/ldscripts/aarch64elf32b.xce
#usr/lib/ldscripts/aarch64elf32b.xcer
#usr/lib/ldscripts/aarch64elf32b.xd
#usr/lib/ldscripts/aarch64elf32b.xdc
#usr/lib/ldscripts/aarch64elf32b.xdce
#usr/lib/ldscripts/aarch64elf32b.xdcer
#usr/lib/ldscripts/aarch64elf32b.xde
#usr/lib/ldscripts/aarch64elf32b.xder
#usr/lib/ldscripts/aarch64elf32b.xdw
#usr/lib/ldscripts/aarch64elf32b.xdwe
#usr/lib/ldscripts/aarch64elf32b.xdwer
#usr/lib/ldscripts/aarch64elf32b.xe
#usr/lib/ldscripts/aarch64elf32b.xer
#usr/lib/ldscripts/aarch64elf32b.xn
#usr/lib/ldscripts/aarch64elf32b.xr
#usr/lib/ldscripts/aarch64elf32b.xs
#usr/lib/ldscripts/aarch64elf32b.xsc
#usr/lib/ldscripts/aarch64elf32b.xsce
#usr/lib/ldscripts/aarch64elf32b.xscer
#usr/lib/ldscripts/aarch64elf32b.xse
#usr/lib/ldscripts/aarch64elf32b.xser
#usr/lib/ldscripts/aarch64elf32b.xsw
#usr/lib/ldscripts/aarch64elf32b.xswe
#usr/lib/ldscripts/aarch64elf32b.xswer
#usr/lib/ldscripts/aarch64elf32b.xu
#usr/lib/ldscripts/aarch64elf32b.xw
#usr/lib/ldscripts/aarch64elf32b.xwe
#usr/lib/ldscripts/aarch64elf32b.xwer
#usr/lib/ldscripts/aarch64elfb.x
#usr/lib/ldscripts/aarch64elfb.xbn
#usr/lib/ldscripts/aarch64elfb.xc
#usr/lib/ldscripts/aarch64elfb.xce
#usr/lib/ldscripts/aarch64elfb.xcer
#usr/lib/ldscripts/aarch64elfb.xd
#usr/lib/ldscripts/aarch64elfb.xdc
#usr/lib/ldscripts/aarch64elfb.xdce
#usr/lib/ldscripts/aarch64elfb.xdcer
#usr/lib/ldscripts/aarch64elfb.xde
#usr/lib/ldscripts/aarch64elfb.xder
#usr/lib/ldscripts/aarch64elfb.xdw
#usr/lib/ldscripts/aarch64elfb.xdwe
#usr/lib/ldscripts/aarch64elfb.xdwer
#usr/lib/ldscripts/aarch64elfb.xe
#usr/lib/ldscripts/aarch64elfb.xer
#usr/lib/ldscripts/aarch64elfb.xn
#usr/lib/ldscripts/aarch64elfb.xr
#usr/lib/ldscripts/aarch64elfb.xs
#usr/lib/ldscripts/aarch64elfb.xsc
#usr/lib/ldscripts/aarch64elfb.xsce
#usr/lib/ldscripts/aarch64elfb.xscer
#usr/lib/ldscripts/aarch64elfb.xse
#usr/lib/ldscripts/aarch64elfb.xser
#usr/lib/ldscripts/aarch64elfb.xsw
#usr/lib/ldscripts/aarch64elfb.xswe
#usr/lib/ldscripts/aarch64elfb.xswer
#usr/lib/ldscripts/aarch64elfb.xu
#usr/lib/ldscripts/aarch64elfb.xw
#usr/lib/ldscripts/aarch64elfb.xwe
#usr/lib/ldscripts/aarch64elfb.xwer
#usr/lib/ldscripts/aarch64linux.x
#usr/lib/ldscripts/aarch64linux.xbn
#usr/lib/ldscripts/aarch64linux.xc
#usr/lib/ldscripts/aarch64linux.xce
#usr/lib/ldscripts/aarch64linux.xcer
#usr/lib/ldscripts/aarch64linux.xd
#usr/lib/ldscripts/aarch64linux.xdc
#usr/lib/ldscripts/aarch64linux.xdce
#usr/lib/ldscripts/aarch64linux.xdcer
#usr/lib/ldscripts/aarch64linux.xde
#usr/lib/ldscripts/aarch64linux.xder
#usr/lib/ldscripts/aarch64linux.xdw
#usr/lib/ldscripts/aarch64linux.xdwe
#usr/lib/ldscripts/aarch64linux.xdwer
#usr/lib/ldscripts/aarch64linux.xe
#usr/lib/ldscripts/aarch64linux.xer
#usr/lib/ldscripts/aarch64linux.xn
#usr/lib/ldscripts/aarch64linux.xr
#usr/lib/ldscripts/aarch64linux.xs
#usr/lib/ldscripts/aarch64linux.xsc
#usr/lib/ldscripts/aarch64linux.xsce
#usr/lib/ldscripts/aarch64linux.xscer
#usr/lib/ldscripts/aarch64linux.xse
#usr/lib/ldscripts/aarch64linux.xser
#usr/lib/ldscripts/aarch64linux.xsw
#usr/lib/ldscripts/aarch64linux.xswe
#usr/lib/ldscripts/aarch64linux.xswer
#usr/lib/ldscripts/aarch64linux.xu
#usr/lib/ldscripts/aarch64linux.xw
#usr/lib/ldscripts/aarch64linux.xwe
#usr/lib/ldscripts/aarch64linux.xwer
#usr/lib/ldscripts/aarch64linux32.x
#usr/lib/ldscripts/aarch64linux32.xbn
#usr/lib/ldscripts/aarch64linux32.xc
#usr/lib/ldscripts/aarch64linux32.xce
#usr/lib/ldscripts/aarch64linux32.xcer
#usr/lib/ldscripts/aarch64linux32.xd
#usr/lib/ldscripts/aarch64linux32.xdc
#usr/lib/ldscripts/aarch64linux32.xdce
#usr/lib/ldscripts/aarch64linux32.xdcer
#usr/lib/ldscripts/aarch64linux32.xde
#usr/lib/ldscripts/aarch64linux32.xder
#usr/lib/ldscripts/aarch64linux32.xdw
#usr/lib/ldscripts/aarch64linux32.xdwe
#usr/lib/ldscripts/aarch64linux32.xdwer
#usr/lib/ldscripts/aarch64linux32.xe
#usr/lib/ldscripts/aarch64linux32.xer
#usr/lib/ldscripts/aarch64linux32.xn
#usr/lib/ldscripts/aarch64linux32.xr
#usr/lib/ldscripts/aarch64linux32.xs
#usr/lib/ldscripts/aarch64linux32.xsc
#usr/lib/ldscripts/aarch64linux32.xsce
#usr/lib/ldscripts/aarch64linux32.xscer
#usr/lib/ldscripts/aarch64linux32.xse
#usr/lib/ldscripts/aarch64linux32.xser
#usr/lib/ldscripts/aarch64linux32.xsw
#usr/lib/ldscripts/aarch64linux32.xswe
#usr/lib/ldscripts/aarch64linux32.xswer
#usr/lib/ldscripts/aarch64linux32.xu
#usr/lib/ldscripts/aarch64linux32.xw
#usr/lib/ldscripts/aarch64linux32.xwe
#usr/lib/ldscripts/aarch64linux32.xwer
#usr/lib/ldscripts/aarch64linux32b.x
#usr/lib/ldscripts/aarch64linux32b.xbn
#usr/lib/ldscripts/aarch64linux32b.xc
#usr/lib/ldscripts/aarch64linux32b.xce
#usr/lib/ldscripts/aarch64linux32b.xcer
#usr/lib/ldscripts/aarch64linux32b.xd
#usr/lib/ldscripts/aarch64linux32b.xdc
#usr/lib/ldscripts/aarch64linux32b.xdce
#usr/lib/ldscripts/aarch64linux32b.xdcer
#usr/lib/ldscripts/aarch64linux32b.xde
#usr/lib/ldscripts/aarch64linux32b.xder
#usr/lib/ldscripts/aarch64linux32b.xdw
#usr/lib/ldscripts/aarch64linux32b.xdwe
#usr/lib/ldscripts/aarch64linux32b.xdwer
#usr/lib/ldscripts/aarch64linux32b.xe
#usr/lib/ldscripts/aarch64linux32b.xer
#usr/lib/ldscripts/aarch64linux32b.xn
#usr/lib/ldscripts/aarch64linux32b.xr
#usr/lib/ldscripts/aarch64linux32b.xs
#usr/lib/ldscripts/aarch64linux32b.xsc
#usr/lib/ldscripts/aarch64linux32b.xsce
#usr/lib/ldscripts/aarch64linux32b.xscer
#usr/lib/ldscripts/aarch64linux32b.xse
#usr/lib/ldscripts/aarch64linux32b.xser
#usr/lib/ldscripts/aarch64linux32b.xsw
#usr/lib/ldscripts/aarch64linux32b.xswe
#usr/lib/ldscripts/aarch64linux32b.xswer
#usr/lib/ldscripts/aarch64linux32b.xu
#usr/lib/ldscripts/aarch64linux32b.xw
#usr/lib/ldscripts/aarch64linux32b.xwe
#usr/lib/ldscripts/aarch64linux32b.xwer
#usr/lib/ldscripts/aarch64linuxb.x
#usr/lib/ldscripts/aarch64linuxb.xbn
#usr/lib/ldscripts/aarch64linuxb.xc
#usr/lib/ldscripts/aarch64linuxb.xce
#usr/lib/ldscripts/aarch64linuxb.xcer
#usr/lib/ldscripts/aarch64linuxb.xd
#usr/lib/ldscripts/aarch64linuxb.xdc
#usr/lib/ldscripts/aarch64linuxb.xdce
#usr/lib/ldscripts/aarch64linuxb.xdcer
#usr/lib/ldscripts/aarch64linuxb.xde
#usr/lib/ldscripts/aarch64linuxb.xder
#usr/lib/ldscripts/aarch64linuxb.xdw
#usr/lib/ldscripts/aarch64linuxb.xdwe
#usr/lib/ldscripts/aarch64linuxb.xdwer
#usr/lib/ldscripts/aarch64linuxb.xe
#usr/lib/ldscripts/aarch64linuxb.xer
#usr/lib/ldscripts/aarch64linuxb.xn
#usr/lib/ldscripts/aarch64linuxb.xr
#usr/lib/ldscripts/aarch64linuxb.xs
#usr/lib/ldscripts/aarch64linuxb.xsc
#usr/lib/ldscripts/aarch64linuxb.xsce
#usr/lib/ldscripts/aarch64linuxb.xscer
#usr/lib/ldscripts/aarch64linuxb.xse
#usr/lib/ldscripts/aarch64linuxb.xser
#usr/lib/ldscripts/aarch64linuxb.xsw
#usr/lib/ldscripts/aarch64linuxb.xswe
#usr/lib/ldscripts/aarch64linuxb.xswer
#usr/lib/ldscripts/aarch64linuxb.xu
#usr/lib/ldscripts/aarch64linuxb.xw
#usr/lib/ldscripts/aarch64linuxb.xwe
#usr/lib/ldscripts/aarch64linuxb.xwer
#usr/lib/ldscripts/armelf.x
#usr/lib/ldscripts/armelf.xbn
#usr/lib/ldscripts/armelf.xc
#usr/lib/ldscripts/armelf.xce
#usr/lib/ldscripts/armelf.xcer
#usr/lib/ldscripts/armelf.xd
#usr/lib/ldscripts/armelf.xdc
#usr/lib/ldscripts/armelf.xdce
#usr/lib/ldscripts/armelf.xdcer
#usr/lib/ldscripts/armelf.xde
#usr/lib/ldscripts/armelf.xder
#usr/lib/ldscripts/armelf.xdw
#usr/lib/ldscripts/armelf.xdwe
#usr/lib/ldscripts/armelf.xdwer
#usr/lib/ldscripts/armelf.xe
#usr/lib/ldscripts/armelf.xer
#usr/lib/ldscripts/armelf.xn
#usr/lib/ldscripts/armelf.xr
#usr/lib/ldscripts/armelf.xs
#usr/lib/ldscripts/armelf.xsc
#usr/lib/ldscripts/armelf.xsce
#usr/lib/ldscripts/armelf.xscer
#usr/lib/ldscripts/armelf.xse
#usr/lib/ldscripts/armelf.xser
#usr/lib/ldscripts/armelf.xsw
#usr/lib/ldscripts/armelf.xswe
#usr/lib/ldscripts/armelf.xswer
#usr/lib/ldscripts/armelf.xu
#usr/lib/ldscripts/armelf.xw
#usr/lib/ldscripts/armelf.xwe
#usr/lib/ldscripts/armelf.xwer
#usr/lib/ldscripts/armelf_linux_eabi.x
#usr/lib/ldscripts/armelf_linux_eabi.xbn
#usr/lib/ldscripts/armelf_linux_eabi.xc
#usr/lib/ldscripts/armelf_linux_eabi.xce
#usr/lib/ldscripts/armelf_linux_eabi.xcer
#usr/lib/ldscripts/armelf_linux_eabi.xd
#usr/lib/ldscripts/armelf_linux_eabi.xdc
#usr/lib/ldscripts/armelf_linux_eabi.xdce
#usr/lib/ldscripts/armelf_linux_eabi.xdcer
#usr/lib/ldscripts/armelf_linux_eabi.xde
#usr/lib/ldscripts/armelf_linux_eabi.xder
#usr/lib/ldscripts/armelf_linux_eabi.xdw
#usr/lib/ldscripts/armelf_linux_eabi.xdwe
#usr/lib/ldscripts/armelf_linux_eabi.xdwer
#usr/lib/ldscripts/armelf_linux_eabi.xe
#usr/lib/ldscripts/armelf_linux_eabi.xer
#usr/lib/ldscripts/armelf_linux_eabi.xn
#usr/lib/ldscripts/armelf_linux_eabi.xr
#usr/lib/ldscripts/armelf_linux_eabi.xs
#usr/lib/ldscripts/armelf_linux_eabi.xsc
#usr/lib/ldscripts/armelf_linux_eabi.xsce
#usr/lib/ldscripts/armelf_linux_eabi.xscer
#usr/lib/ldscripts/armelf_linux_eabi.xse
#usr/lib/ldscripts/armelf_linux_eabi.xser
#usr/lib/ldscripts/armelf_linux_eabi.xsw
#usr/lib/ldscripts/armelf_linux_eabi.xswe
#usr/lib/ldscripts/armelf_linux_eabi.xswer
#usr/lib/ldscripts/armelf_linux_eabi.xu
#usr/lib/ldscripts/armelf_linux_eabi.xw
#usr/lib/ldscripts/armelf_linux_eabi.xwe
#usr/lib/ldscripts/armelf_linux_eabi.xwer
#usr/lib/ldscripts/armelfb.x
#usr/lib/ldscripts/armelfb.xbn
#usr/lib/ldscripts/armelfb.xc
#usr/lib/ldscripts/armelfb.xce
#usr/lib/ldscripts/armelfb.xcer
#usr/lib/ldscripts/armelfb.xd
#usr/lib/ldscripts/armelfb.xdc
#usr/lib/ldscripts/armelfb.xdce
#usr/lib/ldscripts/armelfb.xdcer
#usr/lib/ldscripts/armelfb.xde
#usr/lib/ldscripts/armelfb.xder
#usr/lib/ldscripts/armelfb.xdw
#usr/lib/ldscripts/armelfb.xdwe
#usr/lib/ldscripts/armelfb.xdwer
#usr/lib/ldscripts/armelfb.xe
#usr/lib/ldscripts/armelfb.xer
#usr/lib/ldscripts/armelfb.xn
#usr/lib/ldscripts/armelfb.xr
#usr/lib/ldscripts/armelfb.xs
#usr/lib/ldscripts/armelfb.xsc
#usr/lib/ldscripts/armelfb.xsce
#usr/lib/ldscripts/armelfb.xscer
#usr/lib/ldscripts/armelfb.xse
#usr/lib/ldscripts/armelfb.xser
#usr/lib/ldscripts/armelfb.xsw
#usr/lib/ldscripts/armelfb.xswe
#usr/lib/ldscripts/armelfb.xswer
#usr/lib/ldscripts/armelfb.xu
#usr/lib/ldscripts/armelfb.xw
#usr/lib/ldscripts/armelfb.xwe
#usr/lib/ldscripts/armelfb.xwer
#usr/lib/ldscripts/armelfb_linux_eabi.x
#usr/lib/ldscripts/armelfb_linux_eabi.xbn
#usr/lib/ldscripts/armelfb_linux_eabi.xc
#usr/lib/ldscripts/armelfb_linux_eabi.xce
#usr/lib/ldscripts/armelfb_linux_eabi.xcer
#usr/lib/ldscripts/armelfb_linux_eabi.xd
#usr/lib/ldscripts/armelfb_linux_eabi.xdc
#usr/lib/ldscripts/armelfb_linux_eabi.xdce
#usr/lib/ldscripts/armelfb_linux_eabi.xdcer
#usr/lib/ldscripts/armelfb_linux_eabi.xde
#usr/lib/ldscripts/armelfb_linux_eabi.xder
#usr/lib/ldscripts/armelfb_linux_eabi.xdw
#usr/lib/ldscripts/armelfb_linux_eabi.xdwe
#usr/lib/ldscripts/armelfb_linux_eabi.xdwer
#usr/lib/ldscripts/armelfb_linux_eabi.xe
#usr/lib/ldscripts/armelfb_linux_eabi.xer
#usr/lib/ldscripts/armelfb_linux_eabi.xn
#usr/lib/ldscripts/armelfb_linux_eabi.xr
#usr/lib/ldscripts/armelfb_linux_eabi.xs
#usr/lib/ldscripts/armelfb_linux_eabi.xsc
#usr/lib/ldscripts/armelfb_linux_eabi.xsce
#usr/lib/ldscripts/armelfb_linux_eabi.xscer
#usr/lib/ldscripts/armelfb_linux_eabi.xse
#usr/lib/ldscripts/armelfb_linux_eabi.xser
#usr/lib/ldscripts/armelfb_linux_eabi.xsw
#usr/lib/ldscripts/armelfb_linux_eabi.xswe
#usr/lib/ldscripts/armelfb_linux_eabi.xswer
#usr/lib/ldscripts/armelfb_linux_eabi.xu
#usr/lib/ldscripts/armelfb_linux_eabi.xw
#usr/lib/ldscripts/armelfb_linux_eabi.xwe
#usr/lib/ldscripts/armelfb_linux_eabi.xwer
#usr/lib/ldscripts/stamp
usr/lib/libbfd-2.43.so
usr/lib/libbfd-2.41.so
#usr/lib/libbfd.a
#usr/lib/libbfd.la
#usr/lib/libbfd.so
@@ -440,7 +331,7 @@ usr/lib/libctf.so.0.0.0
#usr/lib/libgprofng.so
usr/lib/libgprofng.so.0
usr/lib/libgprofng.so.0.0.0
usr/lib/libopcodes-2.43.so
usr/lib/libopcodes-2.41.so
#usr/lib/libopcodes.a
#usr/lib/libopcodes.la
#usr/lib/libopcodes.so
@@ -514,7 +405,6 @@ usr/lib/libsframe.so.1.0.0
#usr/share/locale/ja/LC_MESSAGES/ld.mo
#usr/share/locale/ka/LC_MESSAGES/bfd.mo
#usr/share/locale/ka/LC_MESSAGES/gprof.mo
#usr/share/locale/ka/LC_MESSAGES/ld.mo
#usr/share/locale/ms
#usr/share/locale/ms/LC_MESSAGES
#usr/share/locale/ms/LC_MESSAGES/gprof.mo
@@ -527,9 +417,7 @@ usr/lib/libsframe.so.1.0.0
#usr/share/locale/pt_BR/LC_MESSAGES/opcodes.mo
#usr/share/locale/ro/LC_MESSAGES/bfd.mo
#usr/share/locale/ro/LC_MESSAGES/binutils.mo
#usr/share/locale/ro/LC_MESSAGES/gas.mo
#usr/share/locale/ro/LC_MESSAGES/gprof.mo
#usr/share/locale/ro/LC_MESSAGES/ld.mo
#usr/share/locale/ro/LC_MESSAGES/opcodes.mo
#usr/share/locale/ru/LC_MESSAGES/bfd.mo
#usr/share/locale/ru/LC_MESSAGES/binutils.mo

View File

@@ -0,0 +1,28 @@
#bin/convert-dtsv0
#bin/dtc
#bin/dtdiff
#bin/fdtdump
#bin/fdtget
#bin/fdtoverlay
#bin/fdtput
#include
#include/fdt.h
#include/libfdt.h
#include/libfdt_env.h
#lib/libfdt-1.6.1.so
#lib/libfdt.a
#lib/libfdt.so
#lib/libfdt.so.1
#lib/python3.10
#lib/python3.10/site-packages
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/PKG-INFO
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/SOURCES.txt
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/dependency_links.txt
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/native_libs.txt
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/not-zip-safe
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/EGG-INFO/top_level.txt
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/_libfdt.cpython-310-aarch64-linux-gnu.so
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/_libfdt.py
#lib/python3.10/site-packages/libfdt-1.6.1-py3.10-linux-aarch64.egg/libfdt.py

File diff suppressed because it is too large Load Diff

View File

@@ -8,8 +8,9 @@
#usr/include/sim
#usr/include/sim/callback.h
#usr/include/sim/sim.h
#usr/lib/libaarch64-unknown-linux-gnu-sim.a
#usr/lib/libinproctrace.so
#usr/lib/libsim.a
#usr/share/gdb
#usr/share/gdb/python
#usr/share/gdb/python/gdb
#usr/share/gdb/python/gdb/FrameDecorator.py
@@ -24,30 +25,6 @@
#usr/share/gdb/python/gdb/command/type_printers.py
#usr/share/gdb/python/gdb/command/unwinders.py
#usr/share/gdb/python/gdb/command/xmethods.py
#usr/share/gdb/python/gdb/dap
#usr/share/gdb/python/gdb/dap/__init__.py
#usr/share/gdb/python/gdb/dap/breakpoint.py
#usr/share/gdb/python/gdb/dap/bt.py
#usr/share/gdb/python/gdb/dap/disassemble.py
#usr/share/gdb/python/gdb/dap/evaluate.py
#usr/share/gdb/python/gdb/dap/events.py
#usr/share/gdb/python/gdb/dap/frames.py
#usr/share/gdb/python/gdb/dap/io.py
#usr/share/gdb/python/gdb/dap/launch.py
#usr/share/gdb/python/gdb/dap/locations.py
#usr/share/gdb/python/gdb/dap/memory.py
#usr/share/gdb/python/gdb/dap/modules.py
#usr/share/gdb/python/gdb/dap/next.py
#usr/share/gdb/python/gdb/dap/pause.py
#usr/share/gdb/python/gdb/dap/scopes.py
#usr/share/gdb/python/gdb/dap/server.py
#usr/share/gdb/python/gdb/dap/sources.py
#usr/share/gdb/python/gdb/dap/startup.py
#usr/share/gdb/python/gdb/dap/state.py
#usr/share/gdb/python/gdb/dap/threads.py
#usr/share/gdb/python/gdb/dap/typecheck.py
#usr/share/gdb/python/gdb/dap/varref.py
#usr/share/gdb/python/gdb/disassembler.py
#usr/share/gdb/python/gdb/frames.py
#usr/share/gdb/python/gdb/function
#usr/share/gdb/python/gdb/function/__init__.py
@@ -59,7 +36,6 @@
#usr/share/gdb/python/gdb/printer/bound_registers.py
#usr/share/gdb/python/gdb/printing.py
#usr/share/gdb/python/gdb/prompt.py
#usr/share/gdb/python/gdb/styling.py
#usr/share/gdb/python/gdb/types.py
#usr/share/gdb/python/gdb/unwinder.py
#usr/share/gdb/python/gdb/xmethod.py
@@ -93,7 +69,6 @@
#usr/share/info/gdb.info-6
#usr/share/info/gdb.info-7
#usr/share/info/gdb.info-8
#usr/share/info/gdb.info-9
#usr/share/info/stabs.info
#usr/share/man/man1/gcore.1
#usr/share/man/man1/gdb-add-index.1

View File

@@ -124,7 +124,6 @@ usr/bin/locale
#usr/include/bits/netdb.h
#usr/include/bits/param.h
#usr/include/bits/poll.h
#usr/include/bits/platform/features.h
#usr/include/bits/poll2.h
#usr/include/bits/posix1_lim.h
#usr/include/bits/posix2_lim.h
@@ -169,7 +168,6 @@ usr/bin/locale
#usr/include/bits/socket.h
#usr/include/bits/socket2.h
#usr/include/bits/socket_type.h
#usr/include/bits/spawn_ext.h
#usr/include/bits/ss_flags.h
#usr/include/bits/stab.def
#usr/include/bits/stat.h
@@ -178,7 +176,6 @@ usr/bin/locale
#usr/include/bits/statx-generic.h
#usr/include/bits/statx.h
#usr/include/bits/stdint-intn.h
#usr/include/bits/stdint-least.h
#usr/include/bits/stdint-uintn.h
#usr/include/bits/stdio-ldbl.h
#usr/include/bits/stdio.h
@@ -420,7 +417,6 @@ usr/bin/locale
#usr/include/signal.h
#usr/include/spawn.h
#usr/include/stab.h
#usr/include/stdbit.h
#usr/include/stdc-predef.h
#usr/include/stdint.h
#usr/include/stdio.h
@@ -812,7 +808,7 @@ usr/lib/gconv
#usr/lib/libc_nonshared.a
#usr/lib/libdl.a
#usr/lib/libg.a
#usr/lib/libm-2.40.a
#usr/lib/libm-2.38.a
#usr/lib/libm.a
#usr/lib/libm.so
#usr/lib/libmcheck.a
@@ -884,6 +880,20 @@ usr/lib/locale
#usr/lib/locale/aa_ER/LC_PAPER
#usr/lib/locale/aa_ER/LC_TELEPHONE
#usr/lib/locale/aa_ER/LC_TIME
#usr/lib/locale/aa_ER@saaho
#usr/lib/locale/aa_ER@saaho/LC_ADDRESS
#usr/lib/locale/aa_ER@saaho/LC_COLLATE
#usr/lib/locale/aa_ER@saaho/LC_CTYPE
#usr/lib/locale/aa_ER@saaho/LC_IDENTIFICATION
#usr/lib/locale/aa_ER@saaho/LC_MEASUREMENT
#usr/lib/locale/aa_ER@saaho/LC_MESSAGES
#usr/lib/locale/aa_ER@saaho/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/aa_ER@saaho/LC_MONETARY
#usr/lib/locale/aa_ER@saaho/LC_NAME
#usr/lib/locale/aa_ER@saaho/LC_NUMERIC
#usr/lib/locale/aa_ER@saaho/LC_PAPER
#usr/lib/locale/aa_ER@saaho/LC_TELEPHONE
#usr/lib/locale/aa_ER@saaho/LC_TIME
#usr/lib/locale/aa_ET
#usr/lib/locale/aa_ET/LC_ADDRESS
#usr/lib/locale/aa_ET/LC_COLLATE
@@ -2116,20 +2126,6 @@ usr/lib/locale
#usr/lib/locale/cmn_TW/LC_PAPER
#usr/lib/locale/cmn_TW/LC_TELEPHONE
#usr/lib/locale/cmn_TW/LC_TIME
#usr/lib/locale/crh_RU
#usr/lib/locale/crh_RU/LC_ADDRESS
#usr/lib/locale/crh_RU/LC_COLLATE
#usr/lib/locale/crh_RU/LC_CTYPE
#usr/lib/locale/crh_RU/LC_IDENTIFICATION
#usr/lib/locale/crh_RU/LC_MEASUREMENT
#usr/lib/locale/crh_RU/LC_MESSAGES
#usr/lib/locale/crh_RU/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/crh_RU/LC_MONETARY
#usr/lib/locale/crh_RU/LC_NAME
#usr/lib/locale/crh_RU/LC_NUMERIC
#usr/lib/locale/crh_RU/LC_PAPER
#usr/lib/locale/crh_RU/LC_TELEPHONE
#usr/lib/locale/crh_RU/LC_TIME
#usr/lib/locale/crh_UA
#usr/lib/locale/crh_UA/LC_ADDRESS
#usr/lib/locale/crh_UA/LC_COLLATE
@@ -4146,20 +4142,6 @@ usr/lib/locale
#usr/lib/locale/ga_IE@euro/LC_PAPER
#usr/lib/locale/ga_IE@euro/LC_TELEPHONE
#usr/lib/locale/ga_IE@euro/LC_TIME
#usr/lib/locale/gbm_IN
#usr/lib/locale/gbm_IN/LC_ADDRESS
#usr/lib/locale/gbm_IN/LC_COLLATE
#usr/lib/locale/gbm_IN/LC_CTYPE
#usr/lib/locale/gbm_IN/LC_IDENTIFICATION
#usr/lib/locale/gbm_IN/LC_MEASUREMENT
#usr/lib/locale/gbm_IN/LC_MESSAGES
#usr/lib/locale/gbm_IN/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/gbm_IN/LC_MONETARY
#usr/lib/locale/gbm_IN/LC_NAME
#usr/lib/locale/gbm_IN/LC_NUMERIC
#usr/lib/locale/gbm_IN/LC_PAPER
#usr/lib/locale/gbm_IN/LC_TELEPHONE
#usr/lib/locale/gbm_IN/LC_TIME
#usr/lib/locale/gd_GB
#usr/lib/locale/gd_GB.utf8
#usr/lib/locale/gd_GB.utf8/LC_ADDRESS
@@ -4986,20 +4968,6 @@ usr/lib/locale
#usr/lib/locale/ku_TR/LC_PAPER
#usr/lib/locale/ku_TR/LC_TELEPHONE
#usr/lib/locale/ku_TR/LC_TIME
#usr/lib/locale/kv_RU
#usr/lib/locale/kv_RU/LC_ADDRESS
#usr/lib/locale/kv_RU/LC_COLLATE
#usr/lib/locale/kv_RU/LC_CTYPE
#usr/lib/locale/kv_RU/LC_IDENTIFICATION
#usr/lib/locale/kv_RU/LC_MEASUREMENT
#usr/lib/locale/kv_RU/LC_MESSAGES
#usr/lib/locale/kv_RU/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/kv_RU/LC_MONETARY
#usr/lib/locale/kv_RU/LC_NAME
#usr/lib/locale/kv_RU/LC_NUMERIC
#usr/lib/locale/kv_RU/LC_PAPER
#usr/lib/locale/kv_RU/LC_TELEPHONE
#usr/lib/locale/kv_RU/LC_TIME
#usr/lib/locale/kw_GB
#usr/lib/locale/kw_GB.utf8
#usr/lib/locale/kw_GB.utf8/LC_ADDRESS
@@ -5182,20 +5150,6 @@ usr/lib/locale
#usr/lib/locale/lt_LT/LC_PAPER
#usr/lib/locale/lt_LT/LC_TELEPHONE
#usr/lib/locale/lt_LT/LC_TIME
#usr/lib/locale/ltg_LV.utf8
#usr/lib/locale/ltg_LV.utf8/LC_ADDRESS
#usr/lib/locale/ltg_LV.utf8/LC_COLLATE
#usr/lib/locale/ltg_LV.utf8/LC_CTYPE
#usr/lib/locale/ltg_LV.utf8/LC_IDENTIFICATION
#usr/lib/locale/ltg_LV.utf8/LC_MEASUREMENT
#usr/lib/locale/ltg_LV.utf8/LC_MESSAGES
#usr/lib/locale/ltg_LV.utf8/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/ltg_LV.utf8/LC_MONETARY
#usr/lib/locale/ltg_LV.utf8/LC_NAME
#usr/lib/locale/ltg_LV.utf8/LC_NUMERIC
#usr/lib/locale/ltg_LV.utf8/LC_PAPER
#usr/lib/locale/ltg_LV.utf8/LC_TELEPHONE
#usr/lib/locale/ltg_LV.utf8/LC_TIME
#usr/lib/locale/lv_LV
#usr/lib/locale/lv_LV.utf8
#usr/lib/locale/lv_LV.utf8/LC_ADDRESS
@@ -5280,20 +5234,6 @@ usr/lib/locale
#usr/lib/locale/mai_NP/LC_PAPER
#usr/lib/locale/mai_NP/LC_TELEPHONE
#usr/lib/locale/mai_NP/LC_TIME
#usr/lib/locale/mdf_RU
#usr/lib/locale/mdf_RU/LC_ADDRESS
#usr/lib/locale/mdf_RU/LC_COLLATE
#usr/lib/locale/mdf_RU/LC_CTYPE
#usr/lib/locale/mdf_RU/LC_IDENTIFICATION
#usr/lib/locale/mdf_RU/LC_MEASUREMENT
#usr/lib/locale/mdf_RU/LC_MESSAGES
#usr/lib/locale/mdf_RU/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/mdf_RU/LC_MONETARY
#usr/lib/locale/mdf_RU/LC_NAME
#usr/lib/locale/mdf_RU/LC_NUMERIC
#usr/lib/locale/mdf_RU/LC_PAPER
#usr/lib/locale/mdf_RU/LC_TELEPHONE
#usr/lib/locale/mdf_RU/LC_TIME
#usr/lib/locale/mfe_MU
#usr/lib/locale/mfe_MU/LC_ADDRESS
#usr/lib/locale/mfe_MU/LC_COLLATE
@@ -6344,20 +6284,6 @@ usr/lib/locale
#usr/lib/locale/sc_IT/LC_PAPER
#usr/lib/locale/sc_IT/LC_TELEPHONE
#usr/lib/locale/sc_IT/LC_TIME
#usr/lib/locale/scn_IT
#usr/lib/locale/scn_IT/LC_ADDRESS
#usr/lib/locale/scn_IT/LC_COLLATE
#usr/lib/locale/scn_IT/LC_CTYPE
#usr/lib/locale/scn_IT/LC_IDENTIFICATION
#usr/lib/locale/scn_IT/LC_MEASUREMENT
#usr/lib/locale/scn_IT/LC_MESSAGES
#usr/lib/locale/scn_IT/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/scn_IT/LC_MONETARY
#usr/lib/locale/scn_IT/LC_NAME
#usr/lib/locale/scn_IT/LC_NUMERIC
#usr/lib/locale/scn_IT/LC_PAPER
#usr/lib/locale/scn_IT/LC_TELEPHONE
#usr/lib/locale/scn_IT/LC_TIME
#usr/lib/locale/sd_IN
#usr/lib/locale/sd_IN/LC_ADDRESS
#usr/lib/locale/sd_IN/LC_COLLATE
@@ -6736,20 +6662,6 @@ usr/lib/locale
#usr/lib/locale/ss_ZA/LC_PAPER
#usr/lib/locale/ss_ZA/LC_TELEPHONE
#usr/lib/locale/ss_ZA/LC_TIME
#usr/lib/locale/ssy_ER
#usr/lib/locale/ssy_ER/LC_ADDRESS
#usr/lib/locale/ssy_ER/LC_COLLATE
#usr/lib/locale/ssy_ER/LC_CTYPE
#usr/lib/locale/ssy_ER/LC_IDENTIFICATION
#usr/lib/locale/ssy_ER/LC_MEASUREMENT
#usr/lib/locale/ssy_ER/LC_MESSAGES
#usr/lib/locale/ssy_ER/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/ssy_ER/LC_MONETARY
#usr/lib/locale/ssy_ER/LC_NAME
#usr/lib/locale/ssy_ER/LC_NUMERIC
#usr/lib/locale/ssy_ER/LC_PAPER
#usr/lib/locale/ssy_ER/LC_TELEPHONE
#usr/lib/locale/ssy_ER/LC_TIME
#usr/lib/locale/st_ZA
#usr/lib/locale/st_ZA.utf8
#usr/lib/locale/st_ZA.utf8/LC_ADDRESS
@@ -6778,20 +6690,6 @@ usr/lib/locale
#usr/lib/locale/st_ZA/LC_PAPER
#usr/lib/locale/st_ZA/LC_TELEPHONE
#usr/lib/locale/st_ZA/LC_TIME
#usr/lib/locale/su_ID
#usr/lib/locale/su_ID/LC_ADDRESS
#usr/lib/locale/su_ID/LC_COLLATE
#usr/lib/locale/su_ID/LC_CTYPE
#usr/lib/locale/su_ID/LC_IDENTIFICATION
#usr/lib/locale/su_ID/LC_MEASUREMENT
#usr/lib/locale/su_ID/LC_MESSAGES
#usr/lib/locale/su_ID/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/su_ID/LC_MONETARY
#usr/lib/locale/su_ID/LC_NAME
#usr/lib/locale/su_ID/LC_NUMERIC
#usr/lib/locale/su_ID/LC_PAPER
#usr/lib/locale/su_ID/LC_TELEPHONE
#usr/lib/locale/su_ID/LC_TIME
#usr/lib/locale/sv_FI
#usr/lib/locale/sv_FI.utf8
#usr/lib/locale/sv_FI.utf8/LC_ADDRESS
@@ -7156,20 +7054,6 @@ usr/lib/locale
#usr/lib/locale/to_TO/LC_PAPER
#usr/lib/locale/to_TO/LC_TELEPHONE
#usr/lib/locale/to_TO/LC_TIME
#usr/lib/locale/tok
#usr/lib/locale/tok/LC_ADDRESS
#usr/lib/locale/tok/LC_COLLATE
#usr/lib/locale/tok/LC_CTYPE
#usr/lib/locale/tok/LC_IDENTIFICATION
#usr/lib/locale/tok/LC_MEASUREMENT
#usr/lib/locale/tok/LC_MESSAGES
#usr/lib/locale/tok/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/tok/LC_MONETARY
#usr/lib/locale/tok/LC_NAME
#usr/lib/locale/tok/LC_NUMERIC
#usr/lib/locale/tok/LC_PAPER
#usr/lib/locale/tok/LC_TELEPHONE
#usr/lib/locale/tok/LC_TIME
#usr/lib/locale/tpi_PG
#usr/lib/locale/tpi_PG/LC_ADDRESS
#usr/lib/locale/tpi_PG/LC_COLLATE
@@ -7618,20 +7502,6 @@ usr/lib/locale
#usr/lib/locale/yuw_PG/LC_PAPER
#usr/lib/locale/yuw_PG/LC_TELEPHONE
#usr/lib/locale/yuw_PG/LC_TIME
#usr/lib/locale/zgh_MA
#usr/lib/locale/zgh_MA/LC_ADDRESS
#usr/lib/locale/zgh_MA/LC_COLLATE
#usr/lib/locale/zgh_MA/LC_CTYPE
#usr/lib/locale/zgh_MA/LC_IDENTIFICATION
#usr/lib/locale/zgh_MA/LC_MEASUREMENT
#usr/lib/locale/zgh_MA/LC_MESSAGES
#usr/lib/locale/zgh_MA/LC_MESSAGES/SYS_LC_MESSAGES
#usr/lib/locale/zgh_MA/LC_MONETARY
#usr/lib/locale/zgh_MA/LC_NAME
#usr/lib/locale/zgh_MA/LC_NUMERIC
#usr/lib/locale/zgh_MA/LC_PAPER
#usr/lib/locale/zgh_MA/LC_TELEPHONE
#usr/lib/locale/zgh_MA/LC_TIME
#usr/lib/locale/zh_CN
#usr/lib/locale/zh_CN.gb18030
#usr/lib/locale/zh_CN.gb18030/LC_ADDRESS
@@ -8071,6 +7941,7 @@ usr/lib/locale
#usr/share/i18n/locales/POSIX
#usr/share/i18n/locales/aa_DJ
#usr/share/i18n/locales/aa_ER
#usr/share/i18n/locales/aa_ER@saaho
#usr/share/i18n/locales/aa_ET
#usr/share/i18n/locales/ab_GE
#usr/share/i18n/locales/af_ZA
@@ -8133,7 +8004,6 @@ usr/lib/locale
#usr/share/i18n/locales/ckb_IQ
#usr/share/i18n/locales/cmn_TW
#usr/share/i18n/locales/cns11643_stroke
#usr/share/i18n/locales/crh_RU
#usr/share/i18n/locales/crh_UA
#usr/share/i18n/locales/cs_CZ
#usr/share/i18n/locales/csb_PL
@@ -8223,7 +8093,6 @@ usr/lib/locale
#usr/share/i18n/locales/fy_NL
#usr/share/i18n/locales/ga_IE
#usr/share/i18n/locales/ga_IE@euro
#usr/share/i18n/locales/gbm_IN
#usr/share/i18n/locales/gd_GB
#usr/share/i18n/locales/gez_ER
#usr/share/i18n/locales/gez_ER@abegede
@@ -8270,7 +8139,6 @@ usr/lib/locale
#usr/share/i18n/locales/ks_IN
#usr/share/i18n/locales/ks_IN@devanagari
#usr/share/i18n/locales/ku_TR
#usr/share/i18n/locales/kv_RU
#usr/share/i18n/locales/kw_GB
#usr/share/i18n/locales/ky_KG
#usr/share/i18n/locales/lb_LU
@@ -8281,13 +8149,11 @@ usr/lib/locale
#usr/share/i18n/locales/ln_CD
#usr/share/i18n/locales/lo_LA
#usr/share/i18n/locales/lt_LT
#usr/share/i18n/locales/ltg_LV
#usr/share/i18n/locales/lv_LV
#usr/share/i18n/locales/lzh_TW
#usr/share/i18n/locales/mag_IN
#usr/share/i18n/locales/mai_IN
#usr/share/i18n/locales/mai_NP
#usr/share/i18n/locales/mdf_RU
#usr/share/i18n/locales/mfe_MU
#usr/share/i18n/locales/mg_MG
#usr/share/i18n/locales/mhr_RU
@@ -8345,7 +8211,6 @@ usr/lib/locale
#usr/share/i18n/locales/sah_RU
#usr/share/i18n/locales/sat_IN
#usr/share/i18n/locales/sc_IT
#usr/share/i18n/locales/scn_IT
#usr/share/i18n/locales/sd_IN
#usr/share/i18n/locales/sd_IN@devanagari
#usr/share/i18n/locales/se_NO
@@ -8367,9 +8232,7 @@ usr/lib/locale
#usr/share/i18n/locales/sr_RS
#usr/share/i18n/locales/sr_RS@latin
#usr/share/i18n/locales/ss_ZA
#usr/share/i18n/locales/ssy_ER
#usr/share/i18n/locales/st_ZA
#usr/share/i18n/locales/su_ID
#usr/share/i18n/locales/sv_FI
#usr/share/i18n/locales/sv_FI@euro
#usr/share/i18n/locales/sv_SE
@@ -8391,7 +8254,6 @@ usr/lib/locale
#usr/share/i18n/locales/tl_PH
#usr/share/i18n/locales/tn_ZA
#usr/share/i18n/locales/to_TO
#usr/share/i18n/locales/tok
#usr/share/i18n/locales/tpi_PG
#usr/share/i18n/locales/tr_CY
#usr/share/i18n/locales/tr_TR
@@ -8400,7 +8262,6 @@ usr/lib/locale
#usr/share/i18n/locales/translit_cjk_variants
#usr/share/i18n/locales/translit_combining
#usr/share/i18n/locales/translit_compat
#usr/share/i18n/locales/translit_emojis
#usr/share/i18n/locales/translit_font
#usr/share/i18n/locales/translit_fraction
#usr/share/i18n/locales/translit_hangul
@@ -8430,7 +8291,6 @@ usr/lib/locale
#usr/share/i18n/locales/yo_NG
#usr/share/i18n/locales/yue_HK
#usr/share/i18n/locales/yuw_PG
#usr/share/i18n/locales/zgh_MA
#usr/share/i18n/locales/zh_CN
#usr/share/i18n/locales/zh_HK
#usr/share/i18n/locales/zh_SG
@@ -8448,7 +8308,6 @@ usr/lib/locale
#usr/share/info/libc.info-16
#usr/share/info/libc.info-17
#usr/share/info/libc.info-18
#usr/share/info/libc.info-19
#usr/share/info/libc.info-2
#usr/share/info/libc.info-3
#usr/share/info/libc.info-4

View File

@@ -26,7 +26,6 @@ etc/rc.d/init.d/firewall
etc/rc.d/init.d/firstsetup
etc/rc.d/init.d/fsresize
etc/rc.d/init.d/functions
etc/rc.d/init.d/grub-btrfsd
etc/rc.d/init.d/halt
etc/rc.d/init.d/ipsec
etc/rc.d/init.d/leds
@@ -93,11 +92,12 @@ etc/rc.d/init.d/unbound
etc/rc.d/init.d/vnstat
etc/rc.d/init.d/waitdrives
etc/rc.d/init.d/wlanclient
etc/rc.d/init.d/ddos
#etc/rc.d/rc0.d
etc/rc.d/rc0.d/K01grub-btrfsd
#etc/rc.d/rc0.d/K01imspetor
#etc/rc.d/rc0.d/K01motion
#etc/rc.d/rc0.d/K01vdradmin
#etc/rc.d/rc0.d/K02sslh
etc/rc.d/rc0.d/K08fcron
etc/rc.d/rc0.d/K28apache
etc/rc.d/rc0.d/K30sshd
@@ -136,15 +136,15 @@ etc/rc.d/rc3.d/S30sshd
etc/rc.d/rc3.d/S32apache
etc/rc.d/rc3.d/S40fcron
etc/rc.d/rc3.d/S98rc.local
etc/rc.d/rc3.d/S99grub-btrfsd
#etc/rc.d/rc3.d/S98sslh
#etc/rc.d/rc3.d/S99imspetor
#etc/rc.d/rc3.d/S99motion
#etc/rc.d/rc3.d/S99vdradmin
#etc/rc.d/rc6.d
etc/rc.d/rc6.d/K01grub-btrfsd
#etc/rc.d/rc6.d/K01imspetor
#etc/rc.d/rc6.d/K01motion
#etc/rc.d/rc6.d/K01vdradmin
#etc/rc.d/rc6.d/K02sslh
etc/rc.d/rc6.d/K08fcron
etc/rc.d/rc6.d/K28apache
etc/rc.d/rc6.d/K30sshd

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +1,2 @@
boot/uInit-KVER
boot/initramfs-KVER.img
boot/uInit-KVER-ipfire
boot/initramfs-KVER-ipfire.img

View File

@@ -132,6 +132,8 @@ usr/local/bin/update-location-database
usr/sbin/openvpn-metrics
#usr/share
#usr/share/doc
#usr/share/doc/licenses
usr/share/doc/licenses/GPLv3
#usr/share/info
#usr/share/locale
#usr/share/man

View File

@@ -59,8 +59,6 @@ usr/bin/choom
#usr/bin/colrm
#usr/bin/column
usr/bin/eject
usr/bin/enosys
usr/bin/exch
#usr/bin/fadvise
usr/bin/fallocate
usr/bin/fincore
@@ -78,7 +76,6 @@ usr/bin/irqtop
#usr/bin/linux64
usr/bin/logger
#usr/bin/look
usr/bin/lsclocks
usr/bin/lscpu
usr/bin/lsipc
usr/bin/lsirq
@@ -98,14 +95,13 @@ usr/bin/renice
usr/bin/scriptlive
#usr/bin/scriptreplay
#usr/bin/setarch
usr/bin/setpgid
usr/bin/setsid
#usr/bin/setterm
#usr/bin/taskset
usr/bin/uclampset
#usr/bin/ul
#usr/bin/uname26
usr/bin/unshare
#usr/bin/unshare
usr/bin/uuidgen
usr/bin/uuidparse
#usr/bin/waitpid
@@ -164,8 +160,6 @@ usr/sbin/rtcwake
#usr/share/bash-completion/completions/delpart
#usr/share/bash-completion/completions/dmesg
#usr/share/bash-completion/completions/eject
#usr/share/bash-completion/completions/enosys
#usr/share/bash-completion/completions/exch
#usr/share/bash-completion/completions/fadvise
#usr/share/bash-completion/completions/fallocate
#usr/share/bash-completion/completions/fdisk
@@ -195,7 +189,6 @@ usr/sbin/rtcwake
#usr/share/bash-completion/completions/look
#usr/share/bash-completion/completions/losetup
#usr/share/bash-completion/completions/lsblk
#usr/share/bash-completion/completions/lsclocks
#usr/share/bash-completion/completions/lscpu
#usr/share/bash-completion/completions/lsipc
#usr/share/bash-completion/completions/lsirq
@@ -231,7 +224,6 @@ usr/sbin/rtcwake
#usr/share/bash-completion/completions/scriptlive
#usr/share/bash-completion/completions/scriptreplay
#usr/share/bash-completion/completions/setarch
#usr/share/bash-completion/completions/setpgid
#usr/share/bash-completion/completions/setsid
#usr/share/bash-completion/completions/setterm
#usr/share/bash-completion/completions/sfdisk
@@ -265,8 +257,6 @@ usr/sbin/rtcwake
#usr/share/man/man1/column.1
#usr/share/man/man1/dmesg.1
#usr/share/man/man1/eject.1
#usr/share/man/man1/enosys.1
#usr/share/man/man1/exch.1
#usr/share/man/man1/fadvise.1
#usr/share/man/man1/fallocate.1
#usr/share/man/man1/fincore.1
@@ -281,7 +271,6 @@ usr/sbin/rtcwake
#usr/share/man/man1/irqtop.1
#usr/share/man/man1/logger.1
#usr/share/man/man1/look.1
#usr/share/man/man1/lsclocks.1
#usr/share/man/man1/lscpu.1
#usr/share/man/man1/lsfd.1
#usr/share/man/man1/lsipc.1
@@ -301,7 +290,6 @@ usr/sbin/rtcwake
#usr/share/man/man1/script.1
#usr/share/man/man1/scriptlive.1
#usr/share/man/man1/scriptreplay.1
#usr/share/man/man1/setpgid.1
#usr/share/man/man1/setsid.1
#usr/share/man/man1/setterm.1
#usr/share/man/man1/taskset.1
@@ -327,7 +315,6 @@ usr/sbin/rtcwake
#usr/share/man/man3/uuid_unparse.3
#usr/share/man/man5/adjtime_config.5
#usr/share/man/man5/fstab.5
#usr/share/man/man5/scols-filter.5
#usr/share/man/man5/terminal-colors.d.5
#usr/share/man/man8/addpart.8
#usr/share/man/man8/agetty.8

View File

@@ -1,13 +0,0 @@
#usr/include/hs
#usr/include/hs/hs.h
#usr/include/hs/hs_common.h
#usr/include/hs/hs_compile.h
#usr/include/hs/hs_runtime.h
#usr/include/hs/hs_version.h
#usr/lib/libhs.so
usr/lib/libhs.so.5
usr/lib/libhs.so.5.4.11
#usr/lib/libhs_runtime.so
usr/lib/libhs_runtime.so.5
usr/lib/libhs_runtime.so.5.4.11
#usr/lib/pkgconfig/libhs.pc

View File

@@ -45,7 +45,7 @@ usr/bin/apr-1-config
#usr/lib/libapr-1.la
#usr/lib/libapr-1.so
usr/lib/libapr-1.so.0
usr/lib/libapr-1.so.0.7.5
usr/lib/libapr-1.so.0.7.4
#usr/lib/pkgconfig/apr-1.pc
#usr/share/apr-1
#usr/share/apr-1/build

View File

@@ -0,0 +1,8 @@
etc/rc.d/init.d/arpwatch
etc/sysconfig/arpwatch
usr/sbin/arpsnmp
usr/sbin/arpwatch
#usr/share/man/man8/arpsnmp.8
#usr/share/man/man8/arpwatch.8
#var/lib/arpwatch
var/lib/arpwatch/ethercodes.dat

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,6 @@
usr/bin/attr
usr/bin/getfattr
usr/bin/setfattr
#usr/etc
#usr/etc/xattr.conf
#usr/include/attr
#usr/include/attr/attributes.h

Some files were not shown because too many files have changed in this diff Show More