From 8e3bd95676ae6a5ce6b65079e51a4669df1d96aa Mon Sep 17 00:00:00 2001 From: NetworkCats Date: Wed, 4 Mar 2026 01:10:37 +0800 Subject: [PATCH] feat: add collapsible FAQ section to home page --- static/style.css | 117 ++++++++++++++++++++++++++++++++++++++++ templates/index.html | 124 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 241 insertions(+) diff --git a/static/style.css b/static/style.css index 0d227b5..427a002 100644 --- a/static/style.css +++ b/static/style.css @@ -167,6 +167,111 @@ main { } } +.faq { + margin-block-start: 48px; + + .faq-title { + font-size: 22px; + font-weight: 600; + margin-block-end: 16px; + } + + details { + border-block-start: 1px solid var(--color-separator); + + &:last-child { + border-block-end: 1px solid var(--color-separator); + } + } + + summary { + padding-block: 12px; + font-size: 15px; + font-weight: 600; + color: var(--color-label); + cursor: pointer; + list-style: disclosure-closed; + + &::marker { + color: var(--color-label-secondary); + } + } + + details[open] > summary { + list-style: disclosure-open; + } + + .faq-content { + padding-block-end: 16px; + font-size: 14px; + line-height: 1.6; + color: var(--color-label-secondary); + + p { + margin-block-end: 12px; + + &:last-child { + margin-block-end: 0; + } + } + + a { + color: var(--color-link); + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + code { + font-family: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, monospace; + font-size: 0.9em; + padding-inline: 4px; + padding-block: 1px; + border-radius: 4px; + background: var(--color-bg-secondary); + } + + pre { + margin-block-end: 12px; + padding: 12px; + border-radius: 6px; + background: var(--color-bg-secondary); + overflow-x: auto; + + &:last-child { + margin-block-end: 0; + } + + code { + padding: 0; + border-radius: 0; + background: none; + font-size: 13px; + line-height: 1.5; + } + } + + ul { + margin-block-end: 12px; + padding-inline-start: 20px; + + &:last-child { + margin-block-end: 0; + } + + li { + margin-block-end: 6px; + + &:last-child { + margin-block-end: 0; + } + } + } + } +} + @media (max-width: 480px) { main { margin-block-start: 40px; @@ -185,6 +290,18 @@ main { .info-table td { font-size: 14px; } + + .faq { + margin-block-start: 32px; + + summary { + font-size: 14px; + } + + .faq-content { + font-size: 13px; + } + } } @media (max-width: 360px) { diff --git a/templates/index.html b/templates/index.html index 9594d32..4aa8a1f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -79,6 +79,130 @@ + +
+

FAQ

+ +
+ How to use this service from the command line +
+

You can use various command-line tools such as curl, httpie, and wget to use this service. Taking the most popular one, curl, as an example:

+

Query current IP:

+
curl {{ site_domain }}
+

Query information for your own IP:

+
curl {{ site_domain }}/asn
+
+curl {{ site_domain }}/org
+
+curl {{ site_domain }}/country
+
+curl {{ site_domain }}/city
+
+curl {{ site_domain }}/proxy
+
+curl {{ site_domain }}/vpn
+
+curl {{ site_domain }}/hosting
+
+curl {{ site_domain }}/tor
+

Or display all information in JSON format:

+
curl {{ site_domain }}/json
+{
+  "ip": "1.1.1.1",
+  "continent": { ... },
+  "country": { ... },
+  "city": { ... },
+  "location": { ... },
+  "asn": { ... },
+  "proxy": { ... }
+}
+

Query information for a specific IP:

+
curl {{ site_domain }}/json?ip=1.1.1.1
+{
+  "ip": "1.1.1.1",
+  "continent": { ... },
+  "country": { ... },
+  "city": { ... },
+  "location": { ... },
+  "asn": { ... },
+  "proxy": { ... }
+}
+
+
+ +
+ How to force the display of my IPv4 or IPv6 address? +
+

You can use curl -4 or curl -6 to view only your IPv4 or IPv6 address respectively.

+
+
+ +
+ How to get a JSON format response? +
+

You can send a request to the /json endpoint, or send a request with an application/json header.

+
+
+ +
+ Can I automate calls to your service via programs? +
+

Certainly, but you must adhere to our rate limits. Under normal conditions, the rate limit is 30 RPM (Requests Per Minute); under high load, we will increase the restriction to 10-5 RPM.

+

Our API is only suitable for manual calls or small-scale projects. If your website uses our API to query visitor IPs, please ensure you use a message queue to send requests to avoid blocking. If your project has high traffic or is latency-sensitive, please use our open-source offline database: Merged IP Database, which is the same database used by this project.

+
+
+ +
+ Where does the IP data come from? +
+

IP geographic data primarily comes from the free databases of MaxMind and DB-IP; AS data comes from IPinfo's free database; and IP proxy data comes from my own OpenProxyDB database.

+

Data Attributions:

+ +
+
+ +
+ Can I run my own service? +
+

Yes, the source code and database for this project are both open-source and hosted on GitHub:

+ +
+
+ +
+ How is this website different from other IP lookup sites? +
+

The biggest difference is that our database includes proxy-related information, and the proxy intelligence we provide is highly accurate. We have privately compared it with commercial proxy detection databases like IPinfo; our database's precision is fully comparable to commercial ones, and it is even more accurate in detecting residential proxies.

+

Secondly, our geographic coverage for IPv6 is more comprehensive because we merge multiple databases to provide more complete data.

+

Our UX is also better than any IP lookup site on the market. The site runs without any JavaScript, and we only load a minimal amount of external resources (fonts, icons), making the initial load speed extremely fast.

+
+
+ +
+ Is this service stable? +
+

The business logic of this service is written entirely in Rust, offering excellent performance that ensures the site remains operational even under L7 DDoS attacks. The site runs on a VPS with 2 cores and 2 GB of RAM, which is already overkill for this setup -- unless we encounter a massive L7 DDoS attack, though we have Cloudflare in front of us.

+

Running this website only costs me $18.00 per month. Because the cost is so low, I will not stop operations due to hardware costs in the foreseeable future, nor will I add any advertisements.

+

Rest assured, this service will definitely not "Rug Pull."

+
+
+ +
+ How can I sponsor this service? +
+

I accept cryptocurrency donations. If you would like to sponsor, please contact: networkcatlol@gmail.com

+
+
+