🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
Add IPAPI integration for enhanced geolocation data (#606)
Bill Yang7e5ba0094ede
diff --git a/client/public/crawlers/Ahrefs.svg b/client/public/crawlers/Ahrefs.svgnew file mode 100644index 000000000..16475ef1c--- /dev/null+++ b/client/public/crawlers/Ahrefs.svg@@ -0,0 +1,19 @@+<svg version="1.1" id="Logo" xmlns:x="ns_extend;" xmlns:i="ns_ai;" xmlns:graph="ns_graphs;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 67.8 82.6" style="enable-background:new 0 0 67.8 82.6;" xml:space="preserve">+ <style type="text/css">+ .st0{fill:#FF8800;}+ </style>+ <metadata>+ <sfw xmlns="ns_sfw;">+ <slices>+ </slices>+ <sliceSourceBounds bottomLeftOrigin="true" height="82.6" width="67.8" x="48.6" y="47.6">+ </sliceSourceBounds>+ </sfw>+ </metadata>+ <g>+ <path class="st0" d="M7.1,17.9h40.8v11.5l-15.3,1.2C7.8,32.3,0,38.9,0,57.3V61c0,13.5,9.4,21.6,23.9,21.6c11.5,0,18-2.7,26.1-11+ h1.3v8.8h16.3V0H7.1V17.9L7.1,17.9z M47.9,56.6c-5.1,5.1-12.6,8.4-18.9,8.4c-6.7,0-9.6-2.5-9.4-8.1c0.2-7.8,3-9.6,16-10.8L47.9,45+ C47.9,45,47.9,56.6,47.9,56.6z">+ </path>+ </g>+</svg>\ No newline at end of filediff --git a/client/public/crawlers/Apple.svg b/client/public/crawlers/Apple.svgnew file mode 100644index 000000000..3ce2d03ae--- /dev/null+++ b/client/public/crawlers/Apple.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="47.6 0 416.8 512"><path fill="#fff" d="M451.1 174.6c-3 2.3-55.4 31.8-55.4 97.5 0 76 66.7 102.9 68.7 103.5-.3 1.6-10.6 36.8-35.2 72.7-21.9 31.5-44.8 63-79.6 63s-43.8-20.2-84-20.2c-39.2 0-53.1 20.9-84.9 20.9s-54.1-29.2-79.6-65c-29.6-42.1-53.5-107.5-53.5-169.5 0-99.5 64.7-152.3 128.4-152.3 33.8 0 62.1 22.2 83.3 22.2 20.2 0 51.8-23.6 90.3-23.6 14.6 0 67 1.3 101.5 50.8m-119.8-93c15.9-18.9 27.2-45.1 27.2-71.3 0-3.6-.3-7.3-1-10.3-25.9 1-56.7 17.3-75.3 38.8-14.6 16.6-28.2 42.8-28.2 69.4 0 4 .7 8 1 9.3 1.6.3 4.3.7 7 .7 23.2-.1 52.4-15.6 69.3-36.6"/></svg>\ No newline at end of filediff --git a/client/public/crawlers/Baidu.svg b/client/public/crawlers/Baidu.svgnew file mode 100644index 000000000..8099a2066--- /dev/null+++ b/client/public/crawlers/Baidu.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="32.48200000000001 0 961.665 1077.564" width="2156" height="2500"><path fill="#3245DF" d="M184.682 538.759c111.177-23.874 96.03-156.737 92.702-185.776-5.445-44.768-58.102-123.02-129.606-116.831-89.98 8.074-103.126 138.052-103.126 138.052-12.17 60.08 29.132 188.452 140.03 164.555zM302.746 769.86c-3.257 9.331-10.517 33.228-4.234 54.03 12.402 46.677 52.912 48.77 52.912 48.77h58.218V730.35h-62.336c-28.016 8.354-41.535 30.157-44.56 39.51zm88.281-453.898c61.406 0 111.037-70.667 111.037-158.04C502.064 70.643 452.433 0 391.027 0c-61.312 0-111.06 70.643-111.06 157.923 0 87.373 49.77 158.04 111.06 158.04zm264.47 10.447c82.068 10.657 134.84-76.925 145.335-143.31 10.703-66.292-42.256-143.288-100.357-156.527-58.218-13.356-130.909 79.904-137.54 140.704-7.912 74.32 10.633 148.593 92.562 159.133zm201.086 390.213s-126.976-98.24-201.11-204.414C555 355.66 412.272 419.37 364.525 498.993 316.987 578.594 242.9 628.947 232.382 642.28c-10.68 13.124-153.385 90.166-121.694 230.87 31.669 140.612 142.939 137.936 142.939 137.936s81.998 8.074 177.12-13.217c95.168-21.104 177.096 5.26 177.096 5.26s222.284 74.435 283.108-68.852c60.754-143.334-34.368-217.654-34.368-217.654zM476.26 929.88H331.739c-62.406-12.449-87.257-55.03-90.398-62.29-3.072-7.376-20.802-41.604-11.425-99.845 26.968-87.257 103.87-93.516 103.87-93.516h76.926v-94.563l65.524 1V929.88zm269.146-1h-166.3c-64.453-16.614-67.455-62.407-67.455-62.407v-183.89l67.455-1.094v165.276c4.119 17.637 26.015 20.825 26.015 20.825h68.525V682.581h71.76v246.297zm235.408-490.99c0-31.76-26.387-127.394-124.23-127.394-98.008 0-111.108 90.258-111.108 154.06 0 60.894 5.142 145.894 126.883 143.195 121.788-2.7 108.455-137.936 108.455-169.86zm0 0"/></svg>\ No newline at end of filediff --git a/client/public/crawlers/Bing.svg b/client/public/crawlers/Bing.svgnew file mode 100644index 000000000..6b6e98903--- /dev/null+++ b/client/public/crawlers/Bing.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 234 343.41"><defs><linearGradient id="b" x1="-29.25" x2="-23.09" y1="662.02" y2="658.46" gradientTransform="matrix(24.45 0 0 -24.45 967.18 16420.97)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#37bdff"/><stop offset=".18" stop-color="#33bffd"/><stop offset=".36" stop-color="#28c5f5"/><stop offset=".53" stop-color="#15d0e9"/><stop offset=".55" stop-color="#12d1e7"/><stop offset=".59" stop-color="#1cd2e5"/><stop offset=".77" stop-color="#42d8dc"/><stop offset=".91" stop-color="#59dbd6"/><stop offset="1" stop-color="#62dcd4"/></linearGradient><linearGradient id="c" x1="-32.86" x2="-23.89" y1="656.68" y2="656.68" gradientTransform="matrix(24.45 0 0 -24.45 967.18 16420.97)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#39d2ff"/><stop offset=".15" stop-color="#38cefe"/><stop offset=".29" stop-color="#35c3fa"/><stop offset=".43" stop-color="#2fb0f3"/><stop offset=".55" stop-color="#299aeb"/><stop offset=".58" stop-color="#2692ec"/><stop offset=".76" stop-color="#1a6cf1"/><stop offset=".91" stop-color="#1355f4"/><stop offset="1" stop-color="#104cf5"/></linearGradient><linearGradient id="d" x1="-31.2" x2="-31.2" y1="655.9" y2="667.89" gradientTransform="matrix(24.45 0 0 -24.45 967.18 16420.97)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1b48ef"/><stop offset=".12" stop-color="#1c51f0"/><stop offset=".32" stop-color="#1e69f5"/><stop offset=".57" stop-color="#2190fb"/><stop offset="1" stop-color="#26b8f4"/></linearGradient><linearGradient id="a" x1="-31.08" x2="-25.54" y1="654.47" y2="660" gradientTransform="matrix(24.45 0 0 -24.45 967.18 16420.97)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fff"/><stop offset=".37" stop-color="#fdfdfd"/><stop offset=".51" stop-color="#f6f6f6"/><stop offset=".6" stop-color="#ebebeb"/><stop offset=".68" stop-color="#dadada"/><stop offset=".75" stop-color="#c4c4c4"/><stop offset=".81" stop-color="#a8a8a8"/><stop offset=".86" stop-color="#888"/><stop offset=".91" stop-color="#626262"/><stop offset=".95" stop-color="#373737"/><stop offset=".99" stop-color="#090909"/><stop offset="1"/></linearGradient><linearGradient xlink:href="#a" id="h" x1="-31.2" x2="-31.2" y1="668.1" y2="656.02"/><clipPath id="e" transform="translate(-163 -82.94)"><path d="M163.02 288.38h227.17v140.76H163.02z" style="fill:none"/></clipPath><clipPath id="g" transform="translate(-163 -82.94)"><path d="M163.02 82.87h86.51v302.96h-86.51z" style="fill:none"/></clipPath></defs><path d="M397 303.4a92.73 92.73 0 0 1-24.84 63.16 42 42 0 0 0 4.5-6 38 38 0 0 0 2.69-5.08 18 18 0 0 0 .74-1.78 17 17 0 0 0 .65-1.78c.21-.56.39-1.14.55-1.72s.33-1.2.46-1.81l.07-.21c.14-.6.25-1.2.37-1.81s.23-1.25.33-1.88c.09-.58.16-1.16.21-1.76a40 40 0 0 0 .21-4.13 41.4 41.4 0 0 0-5.94-21.49 36.5 36.5 0 0 0-2.85-4.17 40 40 0 0 0-4-4.43 41.5 41.5 0 0 0-12.36-8.28 39 39 0 0 0-6.22-2.14h-.09l-.74-.25-10.81-3.71-28.27-9.72h-.28l-1.77-.65A26.23 26.23 0 0 1 296.29 272L286 245.62l-11.83-30.16-2.27-5.82-.58-1.18a13.4 13.4 0 0 1-1-5.08 12 12 0 0 1 0-1.35 13.19 13.19 0 0 1 18.26-10.79l52.69 27 10.39 5.31A91 91 0 0 1 367 235a92.45 92.45 0 0 1 29.79 61.87c.12 2.19.21 4.35.21 6.53" style="fill:url(#b)" transform="translate(-163 -82.94)"/><path d="M382.91 338.56a43 43 0 0 1-.72 7.82c-.14.67-.28 1.35-.44 2-.3 1.2-.62 2.36-1 3.53-.21.6-.42 1.2-.65 1.78s-.49 1.18-.74 1.78a38 38 0 0 1-2.69 5.08 42 42 0 0 1-4.5 6c-7.68 8.49-33.75 23.63-43.36 29.79l-21.33 13c-15.63 9.63-30.41 16.45-49 16.91h-2.6c-1.2 0-2.39 0-3.57-.07a92.86 92.86 0 0 1-74.92-43.17 91.6 91.6 0 0 1-13.68-38.67 41.13 41.13 0 0 0 60 28.95l.14-.07 2.09-1.25 8.49-5 10.81-6.4v-.3l1.39-.83 96.71-57.29 7.44-4.41.74.25h.09a38.3 38.3 0 0 1 6.22 2.14 41.5 41.5 0 0 1 12.36 8.28 40 40 0 0 1 4 4.43 37 37 0 0 1 2.85 4.17 41.64 41.64 0 0 1 5.87 21.55" style="fill:url(#c)" transform="translate(-163 -82.94)"/><path d="M245.24 147.35v213.29L234.39 367l-8.5 5-2.09 1.27a.24.24 0 0 0-.13.06 41.13 41.13 0 0 1-60-28.94c-.16-.89-.28-1.81-.38-2.7-.13-1.68-.22-3.33-.25-5v-240a13.77 13.77 0 0 1 21.46-11.41l42.07 27.48a5.6 5.6 0 0 0 .73.51 41.14 41.14 0 0 1 17.94 34.08" style="fill:url(#d)" transform="translate(-163 -82.94)"/><g style="opacity:.14900000393390656;isolation:isolate"><g style="clip-path:url(#e)"><path d="M382.91 338.56a43 43 0 0 1-.72 7.82c-.14.67-.28 1.35-.44 2-.3 1.2-.62 2.36-1 3.53-.21.6-.42 1.2-.65 1.78s-.49 1.18-.74 1.78a38 38 0 0 1-2.69 5.08 42 42 0 0 1-4.5 6c-7.68 8.49-33.75 23.63-43.36 29.79l-21.33 13c-15.63 9.63-30.41 16.45-49 16.91h-2.6c-1.2 0-2.39 0-3.57-.07a92.86 92.86 0 0 1-74.92-43.17 91.6 91.6 0 0 1-13.68-38.67 41.13 41.13 0 0 0 60 28.95l.14-.07 2.09-1.25 8.49-5 10.81-6.4v-.3l1.39-.83 96.71-57.29 7.44-4.41.74.25h.09a38.3 38.3 0 0 1 6.22 2.14 41.5 41.5 0 0 1 12.36 8.28 40 40 0 0 1 4 4.43 37 37 0 0 1 2.85 4.17 41.64 41.64 0 0 1 5.87 21.55" style="fill:url(#a)" transform="translate(-163 -82.94)"/></g></g><g style="opacity:.09799999743700027;isolation:isolate"><g style="clip-path:url(#g)"><path d="M245.24 147.35v213.29L234.39 367l-8.5 5-2.09 1.27a.24.24 0 0 0-.13.06 41.13 41.13 0 0 1-60-28.94c-.16-.89-.28-1.81-.38-2.7-.13-1.68-.22-3.33-.25-5v-240a13.77 13.77 0 0 1 21.46-11.41l42.07 27.48a5.6 5.6 0 0 0 .73.51 41.14 41.14 0 0 1 17.94 34.08" style="fill:url(#h)" transform="translate(-163 -82.94)"/></g></g></svg>diff --git a/client/public/crawlers/DuckDuckGo.svg b/client/public/crawlers/DuckDuckGo.svgnew file mode 100644index 000000000..08289aaa1--- /dev/null+++ b/client/public/crawlers/DuckDuckGo.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" id="Layer_1" x="0" y="0" version="1.1" viewBox="0 0 512 512"><style>.st0{fill:#fff}.st4{fill:#2d4f8e}.st8{fill:#65bc46}</style><path d="M497.7 254.3c0 138.2-108.7 250.2-242.7 250.2S12.3 392.5 12.3 254.3 121 4.1 255.1 4.1c134 0 242.6 112 242.6 250.2" class="st0"/><linearGradient id="SVGID_1_" x1="-899.964" x2="-899.964" y1="-1663.394" y2="-1621.436" gradientTransform="matrix(12.2027 0 0 -12.2027 11238.032 -19785.963)" gradientUnits="userSpaceOnUse"><stop offset="0" style="stop-color:#d14427"/><stop offset="1" style="stop-color:#e55225"/></linearGradient><path d="M480 256c0 123.7-100.3 224-224 224S32 379.7 32 256 132.3 32 256 32s224 100.3 224 224m32 0c0 141.4-114.6 256-256 256S0 397.4 0 256 114.6 0 256 0s256 114.6 256 256m-21.1 0c0-129.7-105.2-234.9-234.9-234.9S21.1 126.3 21.1 256 126.3 490.9 256 490.9 490.9 385.7 490.9 256" style="fill:url(#SVGID_1_)"/><defs><path id="SVGID_00000116230508440019795290000007073017068982376630_" d="M480.9 255.4c0 124-100.9 224.8-224.9 224.8S31.2 379.3 31.2 255.4C31.2 131.4 132 30.6 256 30.6s224.9 100.8 224.9 224.8"/></defs><clipPath id="SVGID_00000010284946673283237210000015792187200079878288_"><use xlink:href="#SVGID_00000116230508440019795290000007073017068982376630_" style="overflow:visible"/></clipPath><g style="clip-path:url(#SVGID_00000010284946673283237210000015792187200079878288_)"><path d="M346 582.9c-7.7-35.6-52.6-116-69.6-150.1-17-34-34.1-82-26.3-112.9 1.4-5.6-14.7-48.5-10.1-51.6 36.1-23.6 45.6 2.6 60.1-8 7.5-5.5 17.6 4.5 20.1-4.5 9.3-32.5-12.9-89.1-37.6-113.8-8.1-8.1-20.5-13.1-34.5-15.8-5.4-7.4-14.1-14.4-26.3-20.9-13.8-7.3-43.5-16.9-58.9-19.5-10.7-1.8-13.1 1.2-17.7 2 4.3.4 24.5 10.4 28.4 10.9-3.9 2.7-15.5-.1-22.8 3.2-3.7 1.7-6.5 8.1-6.5 11.1 21.1-2.1 54-.1 73.4 8.6-15.5 1.8-39 3.7-49.1 9-29.4 15.5-42.4 51.6-34.6 95 7.7 43.2 41.8 201 52.6 253.7 10.8 52.6-23.2 86.6-44.9 95.9l23.2 1.6-7.7 17c27.8 3.1 58.8-6.2 58.8-6.2-6.2 17-48 23.2-48 23.2s20.1 6.2 52.6-6.2 52.6-20.1 52.6-20.1l15.5 40.2 29.4-29.4 12.4 30.9c0 .1 23.2-7.7 15.5-43.3" style="fill:#d5d7d8"/><path d="M355.3 575.7c-7.7-35.6-52.6-116-69.6-150.1-17-34-34-82-26.3-112.9 1.4-5.6 1.5-28.6 6.1-31.7 36.1-23.6 33.5-.8 48-11.3 7.5-5.4 13.4-12 16-21.1 9.3-32.5-12.9-89.1-37.6-113.8-8.1-8.1-20.5-13.1-34.4-15.8-5.4-7.4-14-14.4-26.3-20.9-23.1-12.3-51.8-17.2-78.4-12.4 4.2.4 14 9.2 17.9 9.8-5.9 4-21.7 3.5-21.6 12.4 21.1-2.1 44.2 1.2 63.7 9.9-15.5 1.8-29.8 5.6-40 10.9-29.4 15.5-37.1 46.4-29.4 89.7 7.8 43.3 41.8 201.1 52.6 253.7s-23.2 86.6-44.8 95.9l23.2 1.5-7.7 17c27.8 3.1 58.8-6.2 58.8-6.2-6.2 17-48 23.2-48 23.2s20.1 6.2 52.6-6.2 52.6-20.1 52.6-20.1l15.5 40.2 29.4-29.4 12.4 30.9c-.1.1 23.1-7.6 15.3-43.2" class="st0"/><path d="M177.4 220.5c0-9 7.3-16.2 16.2-16.2 9 0 16.2 7.3 16.2 16.2 0 9-7.3 16.2-16.2 16.2-8.9.1-16.1-7.2-16.2-16.2" class="st4"/><path d="M196.7 215.1c0-2.3 1.9-4.2 4.2-4.2s4.2 1.9 4.2 4.2-1.9 4.2-4.2 4.2-4.2-1.9-4.2-4.2" class="st0"/><path d="M288.3 210.9c0-7.7 6.3-13.9 14-13.9s14 6.2 14 14c0 7.7-6.2 14-14 14-7.7-.2-13.9-6.4-14-14.1" class="st4"/><path d="M304.9 206.2c0-2 1.6-3.6 3.6-3.6s3.6 1.6 3.6 3.6-1.6 3.6-3.5 3.6h-.1c-2 0-3.6-1.6-3.6-3.6" class="st0"/><linearGradient id="SVGID_00000148627574217912605100000012656822746852819086_" x1="-907.704" x2="-904.691" y1="-1636.091" y2="-1636.091" gradientTransform="matrix(12.2027 0 0 -12.2027 11238.032 -19785.963)" gradientUnits="userSpaceOnUse"><stop offset=".006" style="stop-color:#6176b9"/><stop offset=".691" style="stop-color:#394a9f"/></linearGradient><path d="M198.3 173.4s-12.2-5.5-24.2 1.9c-11.9 7.5-11.4 15.1-11.4 15.1s-6.3-14.1 10.5-21c16.9-6.8 25.1 4 25.1 4" style="fill:url(#SVGID_00000148627574217912605100000012656822746852819086_)"/><linearGradient id="SVGID_00000004515011562323185290000011359407635172696710_" x1="-898.226" x2="-895.481" y1="-1635.173" y2="-1635.173" gradientTransform="matrix(12.2027 0 0 -12.2027 11238.032 -19785.963)" gradientUnits="userSpaceOnUse"><stop offset=".006" style="stop-color:#6176b9"/><stop offset=".691" style="stop-color:#394a9f"/></linearGradient><path d="M310.7 172.3s-8.8-5-15.6-4.9c-14 .2-17.9 6.4-17.9 6.4s2.4-14.8 20.3-11.8c9.8 1.5 13.2 10.3 13.2 10.3" style="fill:url(#SVGID_00000004515011562323185290000011359407635172696710_)"/></g><path d="M243.4 283.2c1.6-9.8 27-28.4 45-29.6 18-1.1 23.6-.9 38.7-4.5s53.8-13.3 64.5-18.2c10.7-5 56.2 2.5 24.2 20.3-13.9 7.8-51.3 22-78 30s-42.9-7.6-51.7 5.5c-7.1 10.4-1.4 24.7 30.5 27.7 43.1 4 84.4-19.4 88.9-7 4.6 12.4-37 27.9-62.3 28.4s-76.3-16.7-83.9-22c-7.8-5.3-18-17.7-15.9-30.6" style="fill:#fdd20a"/><path d="M262.9 417.5s-60.5-32.3-61.5-19.2 0 66.5 7.1 70.6c7.1 4 57.5-26.2 57.5-26.2zm23.2-2.1s41.3-31.3 50.4-29.2 11.1 66.6 3 69.6-55.4-16.4-55.4-16.4z" class="st8"/><path d="M248.3 420.9c0 21.2-3 30.2 6.1 32.3 9.1 2 26.2 0 32.3-4s1-31.2-1-36.3c-2.2-5.1-37.4-1.1-37.4 8" style="fill:#43a244"/><path d="M252.1 416.2c0 21.2-3 30.3 6.1 32.3 9 2 26.2 0 32.3-4s1-31.2-1-36.3c-2.1-5.1-37.4-1.1-37.4 8" class="st8"/><path d="M309.7 472.1c-18.1 4.6-36.7 6.9-55.4 6.9-20.2 0-39.8-2.7-58.5-7.8l.2 1.8c19 5.1 38.6 7.7 58.3 7.7 19.4 0 38.1-2.5 56.1-7.1z" class="st0"/></svg>\ No newline at end of filediff --git a/client/public/crawlers/Google.svg b/client/public/crawlers/Google.svgnew file mode 100644index 000000000..e9576f74e--- /dev/null+++ b/client/public/crawlers/Google.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 512 512"><path d="M501.8 261.8c0-18.2-1.6-35.6-4.7-52.4H256v99.1h137.8c-6.1 31.9-24.2 58.9-51.4 77V450h83.1c48.3-44.6 76.3-110.2 76.3-188.2" style="fill:#4285f4"/><path d="M256 512c69.1 0 127.1-22.8 169.4-61.9l-83.1-64.5c-22.8 15.4-51.9 24.7-86.3 24.7-66.6 0-123.1-44.9-143.4-105.4H27.5V371C69.6 454.5 155.9 512 256 512" style="fill:#34a853"/><path d="M112.6 304.6c-5.1-15.4-8.1-31.7-8.1-48.6s3-33.3 8.1-48.6v-66.1H27.5C10 175.7 0 214.6 0 256s10 80.3 27.5 114.7L93.8 319c0 .1 18.8-14.4 18.8-14.4" style="fill:#fbbc05"/><path d="M256 101.9c37.7 0 71.2 13 98 38.2l73.3-73.3C382.8 25.4 325.1 0 256 0 155.9 0 69.6 57.5 27.5 141.3l85.2 66.1c20.2-60.5 76.7-105.5 143.3-105.5" style="fill:#ea4335"/><path d="M0 0h512v512H0z" style="fill:none"/></svg>\ No newline at end of filediff --git a/client/public/crawlers/TikTok.svg b/client/public/crawlers/TikTok.svgnew file mode 100644index 000000000..be52a9c53--- /dev/null+++ b/client/public/crawlers/TikTok.svg@@ -0,0 +1,28 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"+ width="884.95px" height="1000px" viewBox="0 0 884.95 1000" enable-background="new 0 0 884.95 1000" xml:space="preserve">+<g>+ <path fill="#FF004F" d="M655.853,360.979c64.565,46.13,143.67,73.274,229.097,73.274V269.94+ c-16.168,0.007-32.294-1.68-48.111-5.033v129.339c-85.422,0-164.513-27.144-229.098-73.274v335.311+ c0,167.738-136.048,303.711-303.864,303.711c-62.614,0-120.814-18.923-169.163-51.368c55.18,56.39,132.13,91.374,217.262,91.374+ c167.828,0,303.883-135.969,303.883-303.718V360.979H655.853z M715.204,195.209c-32.997-36.029-54.659-82.595-59.351-134.076V40+ H610.26C621.735,105.428,660.879,161.327,715.204,195.209L715.204,195.209z M240.855,779.91+ c-18.434-24.158-28.398-53.716-28.353-84.104c0-76.72,62.23-138.92,139.002-138.92c14.306-0.012,28.528,2.187,42.165,6.508V395.41+ c-15.935-2.183-32.015-3.108-48.095-2.768v130.751c-13.644-4.324-27.871-6.519-42.183-6.511+ c-76.773,0-138.998,62.201-138.998,138.929C164.396,710.06,195.5,757.031,240.855,779.91z"/>+ <path d="M607.741,320.973c64.585,46.13,143.676,73.274,229.098,73.274V264.908c-47.682-10.147-89.895-35.056-121.635-69.699+ C660.879,161.327,621.735,105.427,610.26,40H490.5v656.278c-0.271,76.509-62.394,138.455-139.001,138.455+ c-45.145,0-85.251-21.505-110.649-54.822c-45.358-22.879-76.46-69.851-76.46-124.102c0-76.725,62.224-138.926,138.997-138.926+ c14.708,0,28.885,2.291,42.183,6.508V392.642c-164.868,3.404-297.463,138.046-297.463,303.64+ c0,82.66,33.021,157.598,86.607,212.349C183.062,941.078,241.262,960,303.876,960c167.816,0,303.864-135.979,303.864-303.711+ V320.973L607.741,320.973z"/>+ <path fill="#00F2EA" d="M836.838,264.908v-34.974c-43,0.065-85.151-11.97-121.635-34.73+ C747.498,230.542,790.021,254.911,836.838,264.908z M610.26,40c-1.096-6.252-1.938-12.546-2.52-18.867V0H442.384v656.283+ c-0.265,76.5-62.384,138.448-138.998,138.448c-22.496,0-43.728-5.334-62.537-14.821c25.398,33.317,65.504,54.822,110.649,54.822+ c76.602,0,138.731-61.946,139.001-138.455V40H610.26z M345.575,392.643V355.41c-13.817-1.889-27.747-2.833-41.692-2.826+ C136.047,352.583,0,488.56,0,656.283C0,761.44,53.469,854.111,134.72,908.626c-53.587-54.748-86.607-129.687-86.607-212.349+ C48.113,530.691,180.702,396.047,345.575,392.643z"/>+</g>+</svg>diff --git a/client/public/crawlers/Twitter.svg b/client/public/crawlers/Twitter.svgnew file mode 100644index 000000000..d60af2b8c--- /dev/null+++ b/client/public/crawlers/Twitter.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="UTF-8"?>+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 248 204">+ <path fill="#1d9bf0" d="M221.95 51.29c.15 2.17.15 4.34.15 6.53 0 66.73-50.8 143.69-143.69 143.69v-.04c-27.44.04-54.31-7.82-77.41-22.64 3.99.48 8 .72 12.02.73 22.74.02 44.83-7.61 62.72-21.66-21.61-.41-40.56-14.5-47.18-35.07 7.57 1.46 15.37 1.16 22.8-.87-23.56-4.76-40.51-25.46-40.51-49.5v-.64c7.02 3.91 14.88 6.08 22.92 6.32C11.58 63.31 4.74 33.79 18.14 10.71c25.64 31.55 63.47 50.73 104.08 52.76-4.07-17.54 1.49-35.92 14.61-48.25 20.34-19.12 52.33-18.14 71.45 2.19 11.31-2.23 22.15-6.38 32.07-12.26-3.77 11.69-11.66 21.62-22.2 27.93 10.01-1.18 19.79-3.86 29-7.95-6.78 10.16-15.32 19.01-25.2 26.16z"/>+</svg>\ No newline at end of filediff --git a/client/public/crawlers/Yandex.svg b/client/public/crawlers/Yandex.svgnew file mode 100644index 000000000..0f3d9971d--- /dev/null+++ b/client/public/crawlers/Yandex.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="1309" height="1581" version="1.2"><path d="M792.7 1312.1v268.3H518.1V1128L0 .7h286.5l403.7 881.9c77.8 168.5 102.5 227.1 102.5 429.5M1308.9.7 972.1 764.5H693L1029.8.7z" style="fill:#fc3f1d"/></svg>\ No newline at end of filediff --git a/client/public/vpns/AirVPN.svg b/client/public/vpns/AirVPN.svgnew file mode 100644index 000000000..e4bd9bd4b--- /dev/null+++ b/client/public/vpns/AirVPN.svg@@ -0,0 +1,5 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">+ <circle cx="512" cy="512" r="512" style="fill:#26c"/>+ <path d="M506.5 319.8c39-12.5 85.5-3.1 114.1 27 13.5 13.3 23.3 30.8 26.1 49.6 1.3 7.7-.1 15.4-2.2 22.8 5.6-1.5 11.2-3.8 17.1-3.9 11.3-.6 22.6 3.9 31 11.4 10.7 8.3 16.3 23.1 12.4 36.2-1.4 5.9-4.7 11.1-7.4 16.5 28.7.9 58.2 9.7 79.5 29.7 8.8 9.5 16.9 20.1 20.9 32.6 3.6 12 4.1 24.7 3.1 37.1-2.7 18.4-8.9 37.1-21.6 51.1-7.9 8.5-18 15.3-29.2 18.4-11.1 2.9-22.6 4-34.1 3.8-33.9 1-67.9-11.9-92.9-34.7-2.7 5.4-8.1 14.3-18 21.9-14.8 11.4-30.4 12.7-38.4 13.3-7.2.5-31.6 2.2-50.3-14.2-4.4-3.9-7.4-7.8-9.4-10.7-2.5 5.2-4.2 10.9-7.8 15.5-7.5 9.9-18.9 16.8-31.2 19-16 2.8-33.2 1.8-47.5-6.5-8.8-5.3-16.4-12.7-21.4-21.7-9.7-15-13.3-33.5-11.5-51.1 2-21.4 10.5-42.6 25.7-58.1 12.8-13.8 30.5-22.2 48.6-26.7 32.8-7.7 67.3-2.9 98.7 8.1-1.8-3.1-4.6-5.5-7.3-7.7-14.7-12.3-32.9-19.6-51.6-23.5-18.2-3.4-37-4.4-55.1-.1-19.2 4.5-37.9 12.7-52.9 25.7-16.9 13.6-29.3 33.1-33.5 54.5-2.7 12.9-4.4 26.1-4.1 39.3 1 14.5 1.9 29.1 5.8 43.1-15.8 5.6-32.8 7.2-49.5 6.4-12 0-23.7-3.4-34.9-7.7-19-7.8-33.7-23.6-43.1-41.5-13.7-25.1-16.9-57.1-3.6-83 8.6-19.3 25.3-34.5 44.8-42.3 14.8-6 31.7-5.6 46.8-.4-3.6-17.4-.1-36.6 10.7-50.9 7.3-10.6 17.9-18.9 29.9-23.5 13.9-5.9 30-4.4 43.9 1 5.3 1.9 9.8 5.5 15 7.5 8.9-19.7 20.7-38.5 36.5-53.4 13.1-13.7 29.7-24.2 47.9-29.9" style="fill:#fff"/>+</svg>\ No newline at end of filediff --git a/client/public/vpns/ExpressVPN.svg b/client/public/vpns/ExpressVPN.svgnew file mode 100644index 000000000..b4cfb259b--- /dev/null+++ b/client/public/vpns/ExpressVPN.svg@@ -0,0 +1,5 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">+ <circle cx="512" cy="512" r="512" style="fill:#da3940"/>+ <path d="M389.1 717.9c-57.5 0-94.2-32.3-94.2-77.2 0-14.8 4.4-32.8 21.4-69.5H256l55.3-118.3h385c8.8 0 14.8-6.6 14.8-14.2 0-7.7-6-14.2-14.8-14.2H384.7l27.4-58.6c17-36.1 53.7-59.7 93.6-59.7h130.9c75.6 0 131.4 52 131.4 119.9 0 80.5-73.9 145.1-159.3 145.1h-253c-7.7 15.9 1.1 28.5 19.7 28.5h201.5c33.4 0 59.1 23.5 59.1 53.7 0 34.5-33.4 64.6-71.2 64.6H389.1v-.1z" style="fill:#fff"/>+</svg>\ No newline at end of filediff --git a/client/public/vpns/Mullvad.svg b/client/public/vpns/Mullvad.svgnew file mode 100644index 000000000..c2ce3956c--- /dev/null+++ b/client/public/vpns/Mullvad.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" viewBox="0 0 512 512"><path d="M74 1418c0 742.4 602.7 1344 1344 1344s1344-601.6 1344-1344S2160.4 74 1418 74 74 675.6 74 1418" style="fill-rule:evenodd;clip-rule:evenodd;fill:#192e45" transform="translate(-14.095 -14.095)scale(.19048)"/><path d="M328.9 1104.4 253.2 1258l102.4-143c0 1.1-6.4 205.9-6.4 205.9l28.8-154.7c76.8 146.1 246.4 371.2 484.3 538.7 18.1 12.8 41.6 35.2 49.1 43.7 0 0 227.2 115.2 577.1-151.5 3.2-2.1 7.5-4.3 10.7-6.4l5.3 3.2 76.8 51.2c-26.7-7.5-77.9-20.3-77.9-20.3-168.5 194.1-442.7 226.1-589.9 128-6.4-4.3-42.7 10.7-49.1 32-4.3 11.7 0 24.5 5.3 34.1 29.9 55.5 74.7 50.1 53.3 115.2-14.9 35.2-36.3 69.3-59.7 101.3-49.1 66.1-125.9 124.8-118.4 160 347.7 428.8 1131.7 369.1 1430.4-13.9-4.3-55.5-91.7-82.1-152.5-217.6 17.1 5.3 42.7 12.8 42.7 11.7s-72.5-118.4-75.7-130.1l46.9 3.2s-61.9-76.8-64-84.3l62.9-8.5s-78.9-90.7-80-98.1l80 12.8-87.5-105.6h41.6l-49.1-71.5-397.9-156.8c-152.5-94.9-288-211.2-390.4-300.8L946.5 935.8c-197.3-14.9-381.9-9.6-494.9 12.8l72.5-123.7-105.6 125.9c-6.4-2.1-13.9-4.3-13.9-4.3l7.5-160-35.2 149.3z" style="fill-rule:evenodd;clip-rule:evenodd;fill:#d2943b" transform="translate(-14.095 -14.095)scale(.19048)"/><path d="M376.9 935.8c-52.3-24.5-113.1 10.7-123.7 58.7-12.8 45.9 19.2 102.4 75.7 109.9 53.4-33.1 99.2-118.4 48-168.6" style="fill-rule:evenodd;clip-rule:evenodd;fill:#ffcd86" transform="translate(-14.095 -14.095)scale(.19048)"/><path d="M1153.4 819.6c-16-43.7-11.7-100.3 10.7-153.6 32-73.6 92.8-122.7 150.4-122.7 11.7 0 22.4 2.1 33.1 6.4 33.1-29.9 71.5-54.4 114.1-71.5 234.7-93.9 579.2 73.6 667.7 304 42.7 112 29.9 233.6-6.4 345.6-29.9 91.7-138.7 224-98.1 323.2-16-4.3-349.9-117.3-445.9-168.5-150.4-93.9-284.8-209.1-386.1-297.6l-3.2-3.2-341.3-162.1c-4.3-2.1-8.5-4.3-11.7-6.4 46.9 2.1 233.5 24.5 316.7 6.4" style="fill-rule:evenodd;clip-rule:evenodd;fill:#ffd524" transform="translate(-14.095 -14.095)scale(.19048)"/><g transform="translate(-14.095 -14.095)scale(.19048)"><ellipse cx="1287.7" cy="718.2" rx="145.1" ry="86.4" style="fill:#fff" transform="rotate(-66.378 1287.702 718.258)"/><path d="M1355 565.7c-56.5-24.5-132.3 23.5-169.6 107.7-37.3 84.3-20.3 171.7 36.3 197.3 56.5 24.5 132.3-23.5 169.6-107.7s20.3-171.7-36.3-197.3m5.4 184.6c-29.9 67.2-86.4 107.7-125.9 90.7-40.5-18.1-49.1-86.4-19.2-154.7 29.9-67.2 86.4-107.7 126.9-90.7 39.5 18.1 48 87.5 18.2 154.7" style="fill:#192e45"/></g></svg>\ No newline at end of filediff --git a/client/public/vpns/NordVPN.svg b/client/public/vpns/NordVPN.svgnew file mode 100644index 000000000..b28b41ec0--- /dev/null+++ b/client/public/vpns/NordVPN.svg@@ -0,0 +1,5 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">+ <circle cx="512" cy="512" r="512" style="fill:#4687ff"/>+ <path d="M304.7 663.4C274.1 620.9 256 568.6 256 512c0-142.5 114.6-258 256-258s256 115.5 256 258c0 56.6-18.1 108.9-48.7 151.4l-123-201.2-11.9 20.2 12 56.2L512 392.9l-52.3 88.9 12.2 56.8-44.3-76.3-122.9 201.1z" style="fill:#fff"/>+</svg>\ No newline at end of filediff --git a/client/public/vpns/PIA.svg b/client/public/vpns/PIA.svgnew file mode 100644index 000000000..ee8aa8a80--- /dev/null+++ b/client/public/vpns/PIA.svg@@ -0,0 +1,5 @@+<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->+<svg width="800px" height="800px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">+ <circle cx="512" cy="512" r="512" style="fill:#56b14e"/>+ <path data-name="PIA logo (monochrome version by krisu)" d="M486.59 371c0-15.43-18.66-23.16-29.57-12.26s-3.19 29.58 12.24 29.58a17.32 17.32 0 0 0 17.32-17.33m68.18-17.31c-15.43 0-23.18 18.65-12.26 29.57s29.58 3.17 29.57-12.26a17.31 17.31 0 0 0-17.31-17.31m-18.66 45.89a36 36 0 0 1-48.17 0c-4.37-3.69-10.12 2.53-6.09 6.6a44 44 0 0 0 60.37 0 4.5 4.5 0 0 0-6.11-6.6m159.63 67v-.25a36.09 36.09 0 0 0-26.22-34.7v-30.91A152.73 152.73 0 0 0 516.79 248h-5.84a152.73 152.73 0 0 0-152.73 152.71v30.12A36.09 36.09 0 0 0 328.59 466a51.34 51.34 0 0 0-7.09 26v195.85a51.54 51.54 0 0 0 38.1 49.74A37.7 37.7 0 0 0 394.06 760h42.84a37.69 37.69 0 0 0 33.6-20.59h78.59A37.68 37.68 0 0 0 582.66 760h42.85a37.72 37.72 0 0 0 34-21.37 51.57 51.57 0 0 0 43-50.82V492.06a51.31 51.31 0 0 0-6.78-25.49zM559.55 656.36a23.1 23.1 0 0 1-22.84 26.46H487.3a23.12 23.12 0 0 1-22.85-26.44l9.55-64.56a58.61 58.61 0 0 1 31.4-102.87A58.62 58.62 0 0 1 550 591.83zm5.58-215.88h-106A35.88 35.88 0 0 0 434 430.24h-18v-32.06a95.65 95.65 0 0 1 95.62-95.64h4.67a95.65 95.65 0 0 1 95.62 95.64v32.06h-21.6a35.89 35.89 0 0 0-25.18 10.24zm-21.94 219a5.49 5.49 0 0 1-5.37 6.89h-51.33a5.48 5.48 0 0 1-5.36-6.91l9.87-71.23a8.49 8.49 0 0 0-.44-3.13 16 16 0 0 0-3.16-3.21c-.18-.15-.31-.26-.42-.36a42.24 42.24 0 1 1 50.43-.31c0 .07-.16.28-.65.68a16 16 0 0 0-3.16 3.21 5.22 5.22 0 0 0-.32 1.42z" style="fill:#fff"/>+</svg>\ No newline at end of filediff --git a/client/public/vpns/ProtonVPN.svg b/client/public/vpns/ProtonVPN.svgnew file mode 100644index 000000000..2cc935043--- /dev/null+++ b/client/public/vpns/ProtonVPN.svg@@ -0,0 +1 @@+<svg viewBox="-26.7 -8.1 1011.1 895.4000000000001" xmlns="http://www.w3.org/2000/svg" width="2500" height="2176"><linearGradient id="a" gradientTransform="matrix(-617.462 -1064.822 911.335 -528.459 867.992 818.103)" gradientUnits="userSpaceOnUse" x2="1"><stop offset=".066" stop-color="#8effee"/><stop offset=".45" stop-color="#c9c7ff"/><stop offset="1" stop-color="#7341ff"/></linearGradient><radialGradient id="b" cx="0" cy="0" gradientTransform="scale(-979.75) rotate(-86.245 -.142 .285)" gradientUnits="userSpaceOnUse" r="1"><stop offset=".403" stop-color="#6d4aff"/><stop offset=".994" stop-color="#00f0c3"/></radialGradient><path d="M385.6 818.1c36.5 65.6 130.2 69.2 171.6 6.6l386.3-583.9c40.9-61.9 1.7-144.9-72.4-153.3L111.9 1.1C30.9-8.1-26.7 77.3 12.7 148l3.1 5.5 338.7 232-4.1 369.1z" fill="url(#a)"/><path d="M407.4 757l34.2-51.1L702 312.7c22.8-34.3 1.1-80.4-40.1-85.2L15.7 153.4l334.7 601.5c12.2 21.5 43.1 22.7 57 2.1z" fill="url(#b)"/></svg>\ No newline at end of filediff --git a/client/public/vpns/Surfshark.svg b/client/public/vpns/Surfshark.svgnew file mode 100644index 000000000..43cec8216--- /dev/null+++ b/client/public/vpns/Surfshark.svg@@ -0,0 +1,60 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<!-- Created with Inkscape (http://www.inkscape.org/) -->++<svg+ width="127.79517mm"+ height="158.68559mm"+ viewBox="0 0 127.79517 158.68559"+ version="1.1"+ id="svg5"+ inkscape:version="1.1.2 (b8e25be833, 2022-02-05)"+ sodipodi:docname="Surfshark (Icon).svg"+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ xmlns="http://www.w3.org/2000/svg"+ xmlns:svg="http://www.w3.org/2000/svg">+ <sodipodi:namedview+ id="namedview7"+ pagecolor="#ffffff"+ bordercolor="#666666"+ borderopacity="1.0"+ inkscape:pageshadow="2"+ inkscape:pageopacity="0.0"+ inkscape:pagecheckerboard="0"+ inkscape:document-units="mm"+ showgrid="false"+ inkscape:zoom="0.64052329"+ inkscape:cx="810.27499"+ inkscape:cy="115.53054"+ inkscape:window-width="1920"+ inkscape:window-height="1017"+ inkscape:window-x="-8"+ inkscape:window-y="-8"+ inkscape:window-maximized="1"+ inkscape:current-layer="g866" />+ <defs+ id="defs2" />+ <g+ inkscape:label="Layer 1"+ inkscape:groupmode="layer"+ id="layer1"+ transform="translate(19.814728,-55.657626)">+ <g+ style="fill:none"+ id="g866"+ transform="matrix(2.900249,0,0,2.900249,-21.871666,55.657626)">+ <path+ fill-rule="evenodd"+ clip-rule="evenodd"+ d="M 34.375463,0.00481897 C 34.312457,0.00322228 34.249279,0.00162112 34.186102,0 H 21.542482 C 13.265866,0.44651619 9.7867571,5.2549858 8.8533461,7.8158151 5.2263467,18.687672 2.9694415,32.76923 1.3402501,42.934117 c -0.031778,0.198312 -0.063315,0.395075 -0.094612,0.590289 l -0.52931674,4.831283 c -0.0313995,0.762779 0.0398673,1.588737 0.24540126,2.390766 1.01660408,2.947486 4.08185608,5.430523 10.83492738,2.956782 l 7.23e-4,0.0041 C 18.176508,50.925282 25.711862,47.468243 33.504403,43.589962 37.940782,41.024467 44.439472,35.126567 44.772747,27.676769 44.712667,22.151221 44.527611,16.35821 44.152333,10.720474 l -0.0022,0.0043 -1.73e-4,-0.03897 C 44.11915,10.22273 44.08696,9.6868911 44.05356,9.1290858 43.989138,8.0578526 43.919935,6.9055578 43.845568,6.0319331 43.735394,5.4262712 43.594407,4.8787431 43.420367,4.3840466 42.337912,1.9688702 40.217415,0.80423422 37.980548,0.24730003 36.96041,0.07040934 35.707185,0.03861273 34.375463,0.00481897 Z M 33.892937,11.24903 c 0,-0.624908 -0.506626,-1.1315 -1.131517,-1.1315 -7.186586,0 -13.012357,5.825822 -13.012357,13.012374 v 4.355299 c 0,3.862788 -3.131442,6.994299 -6.99423,6.994299 -0.64381,0 -1.165705,0.521947 -1.165705,1.165602 v 3.560327 c 0,0.62489 0.506591,1.131517 1.131499,1.131517 7.186466,0 13.012409,-5.825771 13.012409,-13.012358 v -4.355298 c 0,-3.862788 3.131339,-6.994247 6.994127,-6.994247 0.643827,0 1.165774,-0.521913 1.165774,-1.165705 z"+ fill="#178a9e"+ id="path844"+ style="stroke-width:1.72146" />+ <path+ d="m 32.761248,10.117375 c 0.624891,0 1.131517,0.506592 1.131517,1.1315 v 3.56031 c 0,0.643792 -0.521947,1.165705 -1.165774,1.165705 v 0 c -3.862788,0 -6.994127,3.131442 -6.994127,6.99423 v 4.621608 c 0,7.186587 -5.825771,13.012358 -13.012375,13.012358 v 0 c -0.624907,0 -1.131499,-0.506627 -1.131499,-1.131517 v -3.560327 c 0,-0.643827 0.521895,-1.165602 1.165705,-1.165602 v 0 c 3.862788,0 6.994196,-3.131511 6.994196,-6.994299 v -4.621609 c 0,-7.186534 5.825771,-13.012357 13.012357,-13.012357 z"+ fill="#ffffff"+ id="path846"+ style="stroke-width:1.72146" />+ </g>+ </g>+</svg>diff --git a/client/src/app/[site]/components/shared/Filters/FilterComponent.tsx b/client/src/app/[site]/components/shared/Filters/FilterComponent.tsxindex e50ba764e..33edbf045 100644--- a/client/src/app/[site]/components/shared/Filters/FilterComponent.tsx+++ b/client/src/app/[site]/components/shared/Filters/FilterComponent.tsx@@ -4,6 +4,7 @@ import { Button } from "../../../../../components/ui/button";import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../../../components/ui/select";import { FilterOptions, OperatorOptions } from "./const";import { ValueSelect } from "./ValueSelect";+import { IS_CLOUD } from "../../../../../lib/const";export function FilterComponent({filter,@@ -17,8 +18,10 @@ export function FilterComponent({availableFilters?: FilterParameter[];}) {const availableFilterOptions = availableFilters- ? FilterOptions.filter(option => availableFilters?.includes(option.value))- : FilterOptions;+ ? FilterOptions.filter(option => availableFilters?.includes(option.value)).filter(+ option => IS_CLOUD || !option.cloudOnly+ )+ : FilterOptions.filter(option => IS_CLOUD || !option.cloudOnly);return (<div className="grid grid-cols-[220px_auto] md:grid-cols-[160px_100px_250px_auto] gap-2">diff --git a/client/src/app/[site]/components/shared/Filters/const.tsx b/client/src/app/[site]/components/shared/Filters/const.tsxindex 6bc4b7ae6..1ce228761 100644--- a/client/src/app/[site]/components/shared/Filters/const.tsx+++ b/client/src/app/[site]/components/shared/Filters/const.tsx@@ -2,10 +2,14 @@ import { FilterParameter } from "@rybbit/shared";import {AppWindow,Brain,+ Bug,+ Building,+ Clock,FileText,Flag,FolderInput,Globe,+ Hotel,Languages,Link,LogIn,@@ -20,6 +24,7 @@ import {Radio,Search,Server,+ Shield,TabletSmartphone,Tag,Target,@@ -31,6 +36,7 @@ export const FilterOptions: {label: string;value: FilterParameter;icon: React.ReactNode;+ cloudOnly?: boolean;}[] = [{label: "Path",@@ -50,7 +56,7 @@ export const FilterOptions: {{label: "Hostname",value: "hostname",- icon: <Server className="h-4 w-4" />,+ icon: <Hotel className="h-4 w-4" />,},{label: "User ID",@@ -167,6 +173,65 @@ export const FilterOptions: {value: "lon",icon: <MapPin className="h-4 w-4" />,},+ {+ label: "Timezone",+ value: "timezone",+ icon: <Clock className="h-4 w-4" />,+ },+ {+ label: "VPN",+ value: "vpn",+ icon: <Shield className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "Crawler",+ value: "crawler",+ icon: <Bug className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "Datacenter",+ value: "datacenter",+ icon: <Server className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "Company",+ value: "company",+ icon: <Building className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "Company Type",+ value: "company_type",+ icon: <Building className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "Company Domain",+ value: "company_domain",+ icon: <Building className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "ASN Org",+ value: "asn_org",+ icon: <Building className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "ASN Type",+ value: "asn_type",+ icon: <Building className="h-4 w-4" />,+ cloudOnly: true,+ },+ {+ label: "ASN Domain",+ value: "asn_domain",+ icon: <Building className="h-4 w-4" />,+ cloudOnly: true,+ },];export const OperatorOptions = [diff --git a/client/src/app/[site]/components/shared/Filters/utils.ts b/client/src/app/[site]/components/shared/Filters/utils.tsindex 506ccd453..e5e83a3ef 100644--- a/client/src/app/[site]/components/shared/Filters/utils.ts+++ b/client/src/app/[site]/components/shared/Filters/utils.ts@@ -57,6 +57,26 @@ export function getParameterNameLabel(parameter: FilterParameter) {return "Lon";case "hostname":return "Hostname";+ case "timezone":+ return "Timezone";+ case "vpn":+ return "VPN";+ case "crawler":+ return "Crawler";+ case "datacenter":+ return "Datacenter";+ case "company":+ return "Company";+ case "company_type":+ return "Company Type";+ case "company_domain":+ return "Company Domain";+ case "asn_org":+ return "ASN Org";+ case "asn_type":+ return "ASN Type";+ case "asn_domain":+ return "ASN Domain";default:return parameter;}diff --git a/client/src/app/[site]/components/shared/icons/Crawler.tsx b/client/src/app/[site]/components/shared/icons/Crawler.tsxnew file mode 100644index 000000000..696181643--- /dev/null+++ b/client/src/app/[site]/components/shared/icons/Crawler.tsx@@ -0,0 +1,32 @@+import { Bug } from "lucide-react";+import Image from "next/image";++const CRAWLER_TO_LOGO: Record<string, string> = {+ AhrefsBot: "Ahrefs.svg",+ BingBot: "Bing.svg",+ GoogleBot: "Google.svg",+ YandexBot: "Yandex.svg",+ Applebot: "Apple.svg",+ DuckDuckGoBot: "DuckDuckGo.svg",+ ByteSpider: "TikTok.svg",+ Baiduspider: "Baidu.svg",+ Twitterbot: "Twitter.svg",+};++export function Crawler({ crawler = "" }: { crawler?: string }) {+ return (+ <>+ {CRAWLER_TO_LOGO[crawler] ? (+ <Image+ src={`/crawlers/${CRAWLER_TO_LOGO[crawler]}`}+ alt={crawler || "Other"}+ className="w-4 h-4"+ width={16}+ height={16}+ />+ ) : (+ <Bug className="w-4 h-4" />+ )}+ </>+ );+}diff --git a/client/src/app/[site]/components/shared/icons/VPN.tsx b/client/src/app/[site]/components/shared/icons/VPN.tsxnew file mode 100644index 000000000..8aa67079f--- /dev/null+++ b/client/src/app/[site]/components/shared/icons/VPN.tsx@@ -0,0 +1,24 @@+import { Shield } from "lucide-react";+import Image from "next/image";++const VPN_TO_LOGO: Record<string, string> = {+ AirVPN: "AirVPN.svg",+ NordVPN: "NordVPN.svg",+ Surfshark: "Surfshark.svg",+ ExpressVPN: "ExpressVPN.svg",+ "Private Internet Access": "PIA.svg",+ MullvadVPN: "Mullvad.svg",+ ProtonVPN: "ProtonVPN.svg",+};++export function VPN({ vpn = "" }: { vpn?: string }) {+ return (+ <>+ {VPN_TO_LOGO[vpn] ? (+ <Image src={`/vpns/${VPN_TO_LOGO[vpn]}`} alt={vpn || "Other"} className="w-4 h-4" width={16} height={16} />+ ) : (+ <Shield className="w-4 h-4" />+ )}+ </>+ );+}diff --git a/client/src/app/[site]/main/components/sections/Countries.tsx b/client/src/app/[site]/main/components/sections/Countries.tsxindex 398e91281..9c7735678 100644--- a/client/src/app/[site]/main/components/sections/Countries.tsx+++ b/client/src/app/[site]/main/components/sections/Countries.tsx@@ -10,7 +10,7 @@ import { MapComponent } from "../../../components/shared/Map/MapComponent";import { StandardSection } from "../../../components/shared/StandardSection/StandardSection";import { CountryFlag } from "../../../components/shared/icons/CountryFlag";-type Tab = "countries" | "regions" | "languages" | "cities" | "map";+type Tab = "countries" | "regions" | "languages" | "cities" | "map" | "timezones";function getCountryCity(value: string) {if (value.split("-").length === 2) {@@ -49,6 +49,7 @@ export function Countries() {<TabsTrigger value="cities">Cities</TabsTrigger><TabsTrigger value="languages">Languages</TabsTrigger><TabsTrigger value="map">Map</TabsTrigger>+ <TabsTrigger value="timezones">Timezones</TabsTrigger></TabsList>{tab !== "map" && (<div>@@ -166,6 +167,28 @@ export function Countries() {close={close}/></TabsContent>+ <TabsContent value="timezones">+ <StandardSection+ filterParameter="timezone"+ title="Timezones"+ getValue={e => e.value}+ getKey={e => e.value}+ // getFilterLabel={e => getLanguageName(e.value) ?? ""}+ // getLabel={e => (+ // <div className="flex gap-2 items-center">+ // {getCountryFromLanguage(e.value) ? (+ // <CountryFlag country={getCountryFromLanguage(e.value)!} />+ // ) : (+ // <Globe className="w-5 h-5" />+ // )}+ // {getLanguageName(e.value)}+ // </div>+ // )}+ getLabel={e => e.value}+ expanded={expanded}+ close={close}+ />+ </TabsContent><TabsContent value="map"><MapComponent height="340px" /></TabsContent>diff --git a/client/src/app/[site]/main/components/sections/Events.tsx b/client/src/app/[site]/main/components/sections/Events.tsxindex 2b19a9bc8..416bf1764 100644--- a/client/src/app/[site]/main/components/sections/Events.tsx+++ b/client/src/app/[site]/main/components/sections/Events.tsx@@ -21,7 +21,7 @@ function Events_() {<CardLoader /></div>)}- <div className="relative">+ <div className="relative max-h-[344px] overflow-y-auto"><div className="flex flex-row gap-2 justify-between pr-1 text-xs text-neutral-400 mb-2"><div>Custom Events</div><div>Count</div>@@ -59,7 +59,7 @@ export function Events() {const [expandedOutbound, setExpandedOutbound] = useState(false);return (- <Card>+ <Card className="h-[405px]"><CardContent className="mt-2"><Tabs defaultValue="events" value={tab} onValueChange={value => setTab(value as Tab)}><div className="flex flex-row gap-2 justify-between items-center">diff --git a/client/src/app/[site]/main/components/sections/Network.tsx b/client/src/app/[site]/main/components/sections/Network.tsxnew file mode 100644index 000000000..c3c4ac760--- /dev/null+++ b/client/src/app/[site]/main/components/sections/Network.tsx@@ -0,0 +1,192 @@+"use client";+import { Expand } from "lucide-react";+import { useState } from "react";+import { Favicon } from "../../../../../components/Favicon";+import { Tabs, TabsContent, TabsList, TabsTrigger } from "../../../../../components/ui/basic-tabs";+import { Button } from "../../../../../components/ui/button";+import { Card, CardContent } from "../../../../../components/ui/card";+import { Crawler } from "../../../components/shared/icons/Crawler";+import { VPN } from "../../../components/shared/icons/VPN";+import { StandardSection } from "../../../components/shared/StandardSection/StandardSection";++type Tab =+ | "vpn"+ | "crawler"+ | "datacenter"+ | "company"+ | "company_type"+ | "company_domain"+ | "asn_org"+ | "asn_type"+ | "asn_domain";++export function Network() {+ const [tab, setTab] = useState<Tab>("vpn");+ const [expanded, setExpanded] = useState(false);+ const close = () => {+ setExpanded(false);+ };++ return (+ <Card className="h-[405px]">+ <CardContent className="mt-2">+ <Tabs defaultValue="vpn" value={tab} onValueChange={value => setTab(value as Tab)}>+ <div className="flex flex-row gap-2 justify-between items-center">+ <div className="overflow-x-auto">+ <TabsList>+ <TabsTrigger value="vpn">VPNs</TabsTrigger>+ <TabsTrigger value="crawler">Crawlers</TabsTrigger>+ <TabsTrigger value="datacenter">Datacenters</TabsTrigger>+ <TabsTrigger value="company">Company</TabsTrigger>+ <TabsTrigger value="company_type">Company Type</TabsTrigger>+ <TabsTrigger value="company_domain">Company Domain</TabsTrigger>+ <TabsTrigger value="asn_org">ASN Org</TabsTrigger>+ <TabsTrigger value="asn_type">ASN Type</TabsTrigger>+ <TabsTrigger value="asn_domain">ASN Domain</TabsTrigger>+ </TabsList>+ </div>+ <div className="w-10">+ <Button size="smIcon" onClick={() => setExpanded(!expanded)}>+ <Expand />+ </Button>+ </div>+ </div>+ <TabsContent value="vpn">+ <StandardSection+ filterParameter="vpn"+ title="VPN"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => {+ return (+ <div className="flex gap-2 items-center">+ <VPN vpn={e.value} />+ {e.value}+ </div>+ );+ }}+ />+ </TabsContent>+ <TabsContent value="crawler">+ <StandardSection+ filterParameter="crawler"+ title="Crawler"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => {+ return (+ <div className="flex gap-2 items-center">+ <Crawler crawler={e.value} />+ {e.value}+ </div>+ );+ }}+ />+ </TabsContent>+ <TabsContent value="datacenter">+ <StandardSection+ filterParameter="datacenter"+ title="Datacenter"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => e.value}+ />+ </TabsContent>+ <TabsContent value="company">+ <StandardSection+ filterParameter="company"+ title="Company"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => e.value}+ />+ </TabsContent>+ <TabsContent value="company_type">+ <StandardSection+ filterParameter="company_type"+ title="Company Type"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => e.value}+ />+ </TabsContent>+ <TabsContent value="company_domain">+ <StandardSection+ filterParameter="company_domain"+ title="Company Domain"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLink={e => `https://${e.value}`}+ getLabel={e => (+ <div className="flex items-center">+ <Favicon domain={e.value} className="w-4 mr-2" />+ {e.value ? e.value : "Unknown"}+ </div>+ )}+ />+ </TabsContent>+ <TabsContent value="asn_org">+ <StandardSection+ filterParameter="asn_org"+ title="ASN Org"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => e.value}+ />+ </TabsContent>+ <TabsContent value="asn_type">+ <StandardSection+ filterParameter="asn_type"+ title="ASN Type"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLabel={e => e.value}+ />+ </TabsContent>+ <TabsContent value="asn_domain">+ <StandardSection+ filterParameter="asn_domain"+ title="ASN Domain"+ getValue={e => e.value}+ getKey={e => e.value}+ getFilterLabel={e => e.value}+ expanded={expanded}+ close={close}+ getLink={e => `https://${e.value}`}+ getLabel={e => (+ <div className="flex items-center">+ <Favicon domain={e.value} className="w-4 mr-2" />+ {e.value ? e.value : "Unknown"}+ </div>+ )}+ />+ </TabsContent>+ </Tabs>+ </CardContent>+ </Card>+ );+}diff --git a/client/src/app/[site]/main/page.tsx b/client/src/app/[site]/main/page.tsxindex 89633c6b0..888909d42 100644--- a/client/src/app/[site]/main/page.tsx+++ b/client/src/app/[site]/main/page.tsx@@ -1,11 +1,13 @@"use client";import { useSetPageTitle } from "../../../hooks/useSetPageTitle";+import { IS_CLOUD } from "../../../lib/const";import { useStore } from "../../../lib/store";import { SubHeader } from "../components/SubHeader/SubHeader";import { MainSection } from "./components/MainSection/MainSection";import { Countries } from "./components/sections/Countries";import { Devices } from "./components/sections/Devices";import { Events } from "./components/sections/Events";+import { Network } from "./components/sections/Network";import { Pages } from "./components/sections/Pages";import { Referrers } from "./components/sections/Referrers";import { Weekdays } from "./components/sections/Weekdays";@@ -32,6 +34,7 @@ function MainPageContent() {<Pages /><Referrers /><Countries />+ {IS_CLOUD && <Network />}<Events /><Weekdays /></div>diff --git a/client/src/components/Sessions/SessionDetails.tsx b/client/src/components/Sessions/SessionDetails.tsxindex 65e620dcd..1482edd73 100644--- a/client/src/components/Sessions/SessionDetails.tsx+++ b/client/src/components/Sessions/SessionDetails.tsx@@ -243,12 +243,6 @@ const SessionDetailsTimelineSkeleton = memo(({ itemCount }: { itemCount: number{/* Timeline tab skeleton */}<div className="mb-4">- <div className="flex gap-2 mb-3">- <Skeleton className="h-6 w-32 rounded-sm" />- <Skeleton className="h-6 w-28 rounded-sm" />- <Skeleton className="h-6 w-28 rounded-sm" />- </div>-{/* Timeline items skeleton */}{Array.from({ length: Math.min(itemCount, 100) }).map((_, i) => (<div key={i} className="flex mb-3">diff --git a/docker-compose.cloud.yml b/docker-compose.cloud.ymlindex 1e9e0c5b2..972755ae9 100644--- a/docker-compose.cloud.yml+++ b/docker-compose.cloud.yml@@ -118,6 +118,7 @@ services:- AXIOM_TOKEN=${AXIOM_TOKEN}- MAPBOX_TOKEN=${MAPBOX_TOKEN}- TURNSTILE_SECRET_KEY=${TURNSTILE_SECRET_KEY}+ - IPAPI_KEY=${IPAPI_KEY}depends_on:clickhouse:condition: service_healthydiff --git a/server/src/api/analytics/getErrorNames.ts b/server/src/api/analytics/getErrorNames.tsindex fc62cd6dd..8d7107684 100644--- a/server/src/api/analytics/getErrorNames.ts+++ b/server/src/api/analytics/getErrorNames.ts@@ -140,7 +140,6 @@ export async function getErrorNames(req: FastifyRequest<GetErrorNamesRequest>, rreturn res.send({ data: { data: items, totalCount } });} else {// For non-paginated (StandardSection default) use, return the simpler structure- console.info(items);return res.send({ data: items });}} catch (error) {diff --git a/server/src/api/analytics/query-validation.ts b/server/src/api/analytics/query-validation.tsindex c6845006f..3b5dd9231 100644--- a/server/src/api/analytics/query-validation.ts+++ b/server/src/api/analytics/query-validation.ts@@ -5,52 +5,11 @@ import { z } from "zod";// TIME RELATED SCHEMAS// =============================================================================-/**- * Schema for table parameter in time queries- */-const tableSchema = z.enum(["events", "sessions"]).optional();-/*** Date validation regex for YYYY-MM-DD format*/const dateRegex = /^\d{4}-\d{2}-\d{2}$/;-/**- * Schema for date parameters with time zone- */-const dateParamsSchema = z.object({- startDate: z- .string()- .regex(dateRegex, { message: "Invalid date format. Use YYYY-MM-DD" })- .optional()- .refine(date => !date || !isNaN(Date.parse(date)), {- message: "Invalid date value",- }),- endDate: z- .string()- .regex(dateRegex, { message: "Invalid date format. Use YYYY-MM-DD" })- .optional()- .refine(date => !date || !isNaN(Date.parse(date)), {- message: "Invalid date value",- }),- timeZone: z- .string()- .min(1, { message: "Time zone cannot be empty" })- .refine(- tz => {- try {- // Test if time zone is valid by attempting to format a date with it- Intl.DateTimeFormat(undefined, { timeZone: tz });- return true;- } catch (e) {- return false;- }- },- { message: "Invalid time zone" }- ),- table: tableSchema,-});-/*** Schema for simplified date parameters without table*/@@ -253,6 +212,16 @@ export const filterParamSchema = z.enum(["user_id","lat","lon",+ "timezone",+ "vpn",+ "crawler",+ "datacenter",+ "company",+ "company_type",+ "company_domain",+ "asn_org",+ "asn_type",+ "asn_domain",]);/**diff --git a/server/src/db/clickhouse/clickhouse.ts b/server/src/db/clickhouse/clickhouse.tsindex 555b3f211..46bcf2f69 100644--- a/server/src/db/clickhouse/clickhouse.ts+++ b/server/src/db/clickhouse/clickhouse.ts@@ -57,10 +57,36 @@ export const initializeClickhouse = async () => {ADD COLUMN IF NOT EXISTS inp Nullable(Float64),ADD COLUMN IF NOT EXISTS fcp Nullable(Float64),ADD COLUMN IF NOT EXISTS ttfb Nullable(Float64),- ADD COLUMN IF NOT EXISTS ip Nullable(String)+ ADD COLUMN IF NOT EXISTS ip Nullable(String),+ ADD COLUMN IF NOT EXISTS timezone LowCardinality(String) DEFAULT ''`,});+ if (IS_CLOUD) {+ await clickhouse.exec({+ query: `+ ALTER TABLE events+ ADD COLUMN IF NOT EXISTS company String DEFAULT '',+ ADD COLUMN IF NOT EXISTS company_domain String DEFAULT '',+ ADD COLUMN IF NOT EXISTS company_type LowCardinality(String) DEFAULT '',+ ADD COLUMN IF NOT EXISTS company_abuse_score Nullable(Float64),++ ADD COLUMN IF NOT EXISTS asn Nullable(UInt32),+ ADD COLUMN IF NOT EXISTS asn_org String DEFAULT '',+ ADD COLUMN IF NOT EXISTS asn_domain String DEFAULT '',+ ADD COLUMN IF NOT EXISTS asn_type LowCardinality(String) DEFAULT '',+ ADD COLUMN IF NOT EXISTS asn_abuse_score Nullable(Float64),++ ADD COLUMN IF NOT EXISTS vpn LowCardinality(String) DEFAULT '',+ ADD COLUMN IF NOT EXISTS crawler LowCardinality(String) DEFAULT '',+ ADD COLUMN IF NOT EXISTS datacenter LowCardinality(String) DEFAULT '',+ ADD COLUMN IF NOT EXISTS is_proxy Nullable(Boolean),+ ADD COLUMN IF NOT EXISTS is_tor Nullable(Boolean),+ ADD COLUMN IF NOT EXISTS is_satellite Nullable(Boolean)+ `,+ });+ }+// Create session replay tablesawait clickhouse.exec({query: `diff --git a/server/src/db/geolocation/geolocation.ts b/server/src/db/geolocation/geolocation.tsindex 881862e61..97632ad97 100644--- a/server/src/db/geolocation/geolocation.ts+++ b/server/src/db/geolocation/geolocation.ts@@ -1,23 +1,14 @@-import type { City, SubdivisionsRecord } from "@maxmind/geoip2-node";+import type { City } from "@maxmind/geoip2-node";import { Reader } from "@maxmind/geoip2-node";import { readFile } from "fs/promises";import path from "path";+import { IS_CLOUD } from "../../lib/const.js";import { logger } from "../../lib/logger/logger.js";+import { IPAPIResponse, LocationResponse } from "./types.js";// Adjust path to find the database relative to project rootconst dbPath = path.join(process.cwd(), "GeoLite2-City.mmdb");-interface LocationResponse {- city?: string;- country?: string;- countryIso?: string;- latitude?: number;- longitude?: number;- timeZone?: string;- error?: string;- subdivisions?: SubdivisionsRecord[];-}-let reader: Reader | null = null;// Extend the Reader type to include the city method@@ -34,7 +25,11 @@ async function loadDatabase(dbPath: string) {await loadDatabase(dbPath);// Utility function to extract response data-function extractLocationData(response: City): LocationResponse {+function extractLocationData(response: City | null): LocationResponse {+ if (!response) {+ return null;+ }+return {city: response.city?.names?.en,country: response.country?.names?.en,@@ -42,21 +37,214 @@ function extractLocationData(response: City): LocationResponse {latitude: response.location?.latitude,longitude: response.location?.longitude,timeZone: response.location?.timeZone,- subdivisions: response.subdivisions,+ region: response.subdivisions?.[0]?.isoCode,};}-export async function getLocation(ip: string): Promise<LocationResponse> {- // If reader is not initialized, return empty data- if (!reader) {- return { error: "GeoIP database not available" };+const apiKey = process.env.IPAPI_KEY;++// Cache configuration+const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours in milliseconds+const CLEANUP_INTERVAL_MS = 60 * 60 * 1000; // Run cleanup every hour++interface CacheEntry {+ data: LocationResponse;+ timestamp: number;+}++// In-memory cache for IP geolocation data+const ipCache = new Map<string, CacheEntry>();++// Periodic cleanup function to remove expired entries+function cleanupExpiredEntries(): void {+ const now = Date.now();+ let removedCount = 0;++ for (const [ip, entry] of ipCache.entries()) {+ const age = now - entry.timestamp;+ if (age > CACHE_TTL_MS) {+ ipCache.delete(ip);+ removedCount++;+ }+ }++ if (removedCount > 0) {+ logger.info(`Cleaned up ${removedCount} expired IP cache entries. Current cache size: ${ipCache.size}`);+ }+}++// Start periodic cleanup+const cleanupInterval = setInterval(cleanupExpiredEntries, CLEANUP_INTERVAL_MS);++// Cleanup on process exit+process.on("SIGTERM", () => {+ clearInterval(cleanupInterval);+});+process.on("SIGINT", () => {+ clearInterval(cleanupInterval);+});++function getCachedIP(ip: string): LocationResponse | null {+ const entry = ipCache.get(ip);+ if (!entry) {+ return null;+ }++ const now = Date.now();+ const age = now - entry.timestamp;++ if (age > CACHE_TTL_MS) {+ // Entry expired, remove it+ ipCache.delete(ip);+ return null;+ }++ return entry.data;+}++function setCachedIP(ip: string, data: LocationResponse): void {+ ipCache.set(ip, {+ data,+ timestamp: Date.now(),+ });+}++async function getLocationFromIPAPI(ips: string[]): Promise<Record<string, LocationResponse>> {+ if (!apiKey) {+ logger.warn("IPAPI_KEY not configured for cloud geolocation");+ return {};+ }++ // Check cache first+ const results: Record<string, LocationResponse> = {};+ const uncachedIps: string[] = [];++ for (const ip of ips) {+ const cached = getCachedIP(ip);+ if (cached !== null) {+ results[ip] = cached;+ } else {+ uncachedIps.push(ip);+ }+ }++ // If all IPs were cached, return immediately+ if (uncachedIps.length === 0) {+ return results;+ }++ logger.info(`Cache hit: ${ips.length - uncachedIps.length}/${ips.length}, fetching ${uncachedIps.length} from IPAPI`);++ const localInfo = await getLocationFromLocal(uncachedIps);++ // IPAPI has a limit of 100 IPs per request, so we need to batch them+ const BATCH_SIZE = 100;+ const batches: string[][] = [];++ for (let i = 0; i < uncachedIps.length; i += BATCH_SIZE) {+ batches.push(uncachedIps.slice(i, i + BATCH_SIZE));}try {- const response = await (reader as ExtendedReader).city(ip);- return extractLocationData(response);+ // Process batches sequentially to avoid rate limiting+ for (const batch of batches) {+ const response = await fetch("https://api.ipapi.is/", {+ method: "POST",+ headers: {+ "Content-Type": "application/json",+ },+ body: JSON.stringify({+ ips: batch,+ key: apiKey,+ }),+ });++ if (!response.ok) {+ logger.error(+ `IPAPI request failed for batch of ${batch.length} IPs: ${response.status} ${response.statusText}`+ );+ continue; // Skip this batch but continue with others+ }++ const data = (await response.json()) as Record<string, IPAPIResponse>;++ for (const ip of batch) {+ const item = data[ip];++ if (!item) {+ continue;+ }++ const locationData: LocationResponse = {+ city: item.location?.city,+ country: item.location?.country,+ countryIso: item.location?.country_code,+ region: localInfo[ip]?.region,+ latitude: item.location?.latitude,+ longitude: item.location?.longitude,+ timeZone: item.location?.timezone,+ vpn: item.vpn?.service,+ crawler: typeof item.is_crawler === "string" ? item.is_crawler : undefined,+ datacenter: item.datacenter?.datacenter,+ isProxy: item.is_proxy,+ isTor: item.is_tor,+ isSatellite: item.is_satellite,++ company: {+ name: item.company?.name,+ domain: item.company?.domain,+ type: item.company?.type,+ abuseScore: Number(item.company?.abuser_score?.split(" ")[0]),+ },++ asn: {+ asn: item.asn?.asn,+ org: item.asn?.org,+ domain: item.asn?.domain,+ type: item.asn?.type,+ abuseScore: Number(item.asn?.abuser_score?.split(" ")[0]),+ },+ };++ // Cache the result+ setCachedIP(ip, locationData);+ results[ip] = locationData;+ }+ }++ return results;} catch (error) {- console.error("Error fetching location:", error);- return { error: "Failed to fetch location" };+ logger.error("Error fetching from IPAPI:", error);+ return { ...results, ...localInfo };}}++async function getLocationFromLocal(ips: string[]): Promise<Record<string, LocationResponse>> {+ const responses = await Promise.all(+ ips.map(ip => {+ try {+ return (reader as ExtendedReader).city(ip);+ } catch (error) {+ return null;+ }+ })+ );++ const results: Record<string, LocationResponse> = {};++ responses.forEach((response, index) => {+ results[ips[index]] = extractLocationData(response);+ });++ return results;+}++export async function getLocation(ips: string[], useLocal?: boolean): Promise<Record<string, LocationResponse>> {+ const dedupedIps = [...new Set(ips)];++ if (IS_CLOUD && !useLocal) {+ return getLocationFromIPAPI(dedupedIps);+ }++ return getLocationFromLocal(dedupedIps);+}diff --git a/server/src/db/geolocation/types.ts b/server/src/db/geolocation/types.tsnew file mode 100644index 000000000..3e4448a6e--- /dev/null+++ b/server/src/db/geolocation/types.ts@@ -0,0 +1,113 @@+export type IPAPIResponse = {+ ip: string;+ rir?: string;+ is_bogon?: boolean;+ is_mobile?: boolean;+ is_satellite?: boolean;+ is_crawler?: string | boolean;+ is_datacenter?: boolean;+ is_tor?: boolean;+ is_proxy?: boolean;+ is_vpn?: boolean;+ is_abuser?: boolean;+ elapsed_ms?: number;+ location?: {+ city?: string;+ country?: string;+ country_code?: string;+ latitude?: number;+ longitude?: number;+ timezone?: string;+ state?: string;+ continent?: string;+ continent_code?: string;+ postal_code?: string;+ zip?: string;+ region?: string;+ region_code?: string;+ };+ asn?: {+ asn?: number;+ abuser_score?: string;+ route?: string;+ descr?: string;+ country?: string;+ active?: boolean;+ org?: string;+ domain?: string;+ abuse?: string;+ type?: string;+ created?: string;+ updated?: string;+ rir?: string;+ whois?: string;+ };+ vpn?: {+ ip?: string;+ service?: string;+ url?: string;+ type?: string;+ last_seen?: number;+ last_seen_str?: string;+ exit_node_region?: string;+ country_code?: string;+ city_name?: string;+ latitude?: number;+ longitude?: number;+ };+ datacenter?: {+ datacenter?: string;+ network?: string;+ region?: string;+ country?: string;+ city?: string;+ };+ company?: {+ name?: string;+ abuser_score?: string;+ domain?: string;+ type?: string;+ network?: string;+ whois?: string;+ };+ abuse?: {+ name?: string;+ address?: string;+ country?: string;+ email?: string;+ phone?: string;+ };+};++export type LocationResponse = {+ city?: string;+ country?: string;+ region?: string;+ countryIso?: string;+ latitude?: number;+ longitude?: number;+ timeZone?: string;+ error?: string;++ vpn?: string;+ crawler?: string;+ datacenter?: string;+ isProxy?: boolean;+ isTor?: boolean;+ isSatellite?: boolean;++ company?: {+ name?: string;+ domain?: string;+ type?: string;+ abuseScore?: number;+ };++ asn?: {+ asn?: number;+ org?: string;+ domain?: string;+ type?: string;+ abuseScore?: number;+ };+} | null;diff --git a/server/src/index.ts b/server/src/index.tsindex 3f1304448..aaa30fb7a 100644--- a/server/src/index.ts+++ b/server/src/index.ts@@ -267,7 +267,7 @@ server.addHook("onRequest", async (request, reply) => {const session = await getSessionFromReq(request);if (!session) {- return reply.status(401).send({ error: "Unauthorized 1" });+ return reply.status(401).send({ error: "Unauthorized" });}// Attach session user info to requestdiff --git a/server/src/services/replay/trackingUtils.ts b/server/src/services/replay/trackingUtils.tsindex ddeb926a9..11c5820b1 100644--- a/server/src/services/replay/trackingUtils.ts+++ b/server/src/services/replay/trackingUtils.ts@@ -37,19 +37,13 @@ export async function parseTrackingData(// Parse user agentconst ua = UAParser(userAgent);- // Get geolocation data- let geoData: any = {};- try {- geoData = await getLocation(ipAddress);- } catch (error) {- console.error("Error getting geo data for session replay:", error);- }+ const geoData = await getLocation([ipAddress], true);- const countryCode = geoData?.countryIso || "";- const regionCode = geoData?.subdivisions?.[0]?.isoCode || "";- const latitude = geoData?.latitude || 0;- const longitude = geoData?.longitude || 0;- const city = geoData?.city || "";+ const countryCode = geoData?.[ipAddress]?.countryIso || "";+ const regionCode = geoData?.[ipAddress]?.region || "";+ const latitude = geoData?.[ipAddress]?.latitude || 0;+ const longitude = geoData?.[ipAddress]?.longitude || 0;+ const city = geoData?.[ipAddress]?.city || "";// Clear self-referrer if it's from the same domainif (referrer && hostname) {diff --git a/server/src/services/tracker/pageviewQueue.ts b/server/src/services/tracker/pageviewQueue.tsindex e5819cc97..ac20e1f76 100644--- a/server/src/services/tracker/pageviewQueue.ts+++ b/server/src/services/tracker/pageviewQueue.ts@@ -42,34 +42,18 @@ class PageviewQueue {const batch = this.queue.splice(0, this.batchSize);const ips = [...new Set(batch.map(pv => pv.ipAddress))];- let geoData: Record<string, { data: any }> = {};-- try {- // Process each IP to get geo data using local implementation- const geoPromises = ips.map(async ip => {- const locationData = await getLocation(ip);- return { ip, locationData };- });-- const results = await Promise.all(geoPromises);-- // Format results to match expected structure- results.forEach(({ ip, locationData }) => {- geoData[ip] = { data: locationData };- });- } catch (error) {- this.logger.error(error, "Error getting geo data");- }+ const geoData = await getLocation(ips);// Process each pageview with its geo dataconst processedPageviews = batch.map(pv => {const dataForIp = geoData?.[pv.ipAddress];- const countryCode = dataForIp?.data?.countryIso || "";- const regionCode = dataForIp?.data?.subdivisions?.[0]?.isoCode || "";- const latitude = dataForIp?.data?.latitude || 0;- const longitude = dataForIp?.data?.longitude || 0;- const city = dataForIp?.data?.city || "";+ const countryCode = dataForIp?.countryIso || "";+ const regionCode = dataForIp?.region || "";+ const latitude = dataForIp?.latitude || 0;+ const longitude = dataForIp?.longitude || 0;+ const city = dataForIp?.city || "";+ const timezone = dataForIp?.timeZone || "";// Check if referrer is from the same domain and clear it if solet referrer = clearSelfReferrer(pv.referrer || "", pv.hostname || "");@@ -112,6 +96,22 @@ class PageviewQueue {fcp: pv.fcp || null,ttfb: pv.ttfb || null,ip: pv.storeIp ? pv.ipAddress : null,+ timezone: timezone,+ company: dataForIp?.company?.name || "",+ company_domain: dataForIp?.company?.domain || "",+ company_type: dataForIp?.company?.type || "",+ company_abuse_score: dataForIp?.company?.abuseScore ?? null,+ asn: dataForIp?.asn?.asn || null,+ asn_org: dataForIp?.asn?.org || "",+ asn_domain: dataForIp?.asn?.domain || "",+ asn_type: dataForIp?.asn?.type || "",+ asn_abuse_score: dataForIp?.asn?.abuseScore ?? null,+ vpn: dataForIp?.vpn || "",+ crawler: dataForIp?.crawler || "",+ datacenter: dataForIp?.datacenter || "",+ is_proxy: dataForIp?.isProxy ?? null,+ is_tor: dataForIp?.isTor ?? null,+ is_satellite: dataForIp?.isSatellite ?? null,};});diff --git a/shared/src/filters.ts b/shared/src/filters.tsindex 4185c9af7..15da32777 100644--- a/shared/src/filters.ts+++ b/shared/src/filters.ts@@ -27,7 +27,17 @@ export type FilterParameter =| "operating_system_version"| "user_id"| "lat"- | "lon";+ | "lon"+ | "timezone"+ | "vpn"+ | "crawler"+ | "datacenter"+ | "company"+ | "company_type"+ | "company_domain"+ | "asn_org"+ | "asn_type"+ | "asn_domain";export interface Filter {parameter: FilterParameter;