█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

Miasma

एक छोटा Rust server जो AI वेब scrapers को ज़हरीले training data और खुद की ओर इशारा करने वाले links के अंतहीन चक्र में फँसा देता है

Web Scraping & Crawlingओपन सोर्स
भाषा
Rust
लाइसेंस
GPL-3.0
कवरेज
1 story
$cargo install miasma
संक्षेप में

Miasma क्या है?

Miasma एक छोटा Rust server जो AI वेब scrapers को ज़हरीले training data और खुद की ओर इशारा करने वाले links के अंतहीन चक्र में फँसा देता है. यह Data & Labeling टूल्स की Web Scraping & Crawling श्रेणी में आता है; ओपन सोर्स है, Rust में लिखा गया है और GPL-3.0 लाइसेंस के तहत है।

सारांश

Miasma web crawling का defensive पहलू है: एक self-hosted server, जिस पर आप गड़बड़ी करने वाला scraper traffic भेजते हैं। इसका हर page "poison fountain" (rnsaffn.com) से proxy किया गया poisoned training data और कई self-referential links रखता है, इसलिए जो crawler इन्हें फॉलो करता है, वह उसी तरह का माल लेता रहता है। इसके README के अनुसार यह "slop मशीनों के लिए slop का अंतहीन buffet" है, जो उन site owners के लिए बना है जो नहीं चाहते कि AI कंपनियाँ उनके काम को training data के रूप में उठाएँ।

Hand-drawn flow chart: a scraper visits a site, follows a hidden /naughty-bots link while ignoring robots.txt, the path proxies to Miasma, Miasma returns poisoned training data plus more /naughty-bots links, and the scraper follows every one back into the loop
The trap loop: hidden links lead rule-breaking scrapers into Miasma, and every page they get back points to more of the same.Miasma README ↗

Trap को सामान्य web plumbing से जोड़ा जाता है। आप अपनी site पर कुछ hidden links जोड़ते हैं (`display: none`, `aria-hidden` और `tabindex="-1"` के साथ, ताकि इंसान, screen readers और keyboard users इन्हें कभी न देखें), उस path को अपने reverse proxy से Miasma की ओर route करते हैं, और `robots.txt` में वही path disallow करते हैं ताकि अच्छे bots और search engines दूर रहें। अंदर सिर्फ़ वही crawlers पहुँचते हैं जो `robots.txt` को नज़रअंदाज़ करते हैं और अदृश्य links को फॉलो करते हैं; वहाँ Miasma के links उन्हें proxy के ज़रिए बार-बार उसी चक्र में घुमाते रहते हैं।

Miasma Rust में लिखा गया है, GPL-3.0 लाइसेंस के तहत है, और कम memory footprint के साथ तेज़ चलने के लिए बना है। Memory `max-in-flight` limit के हिसाब से बढ़ती है, और README के उदाहरण के अनुसार 50 connections पर 50–60 MB peak अपेक्षित है। इसे `cargo install miasma` से, pre-built binary के रूप में, आधिकारिक `austinweeks/miasma` Docker image के रूप में, या किसी मौजूदा Rust server के अंदर library के रूप में इंस्टॉल किया जा सकता है। प्रोजेक्ट चेतावनी देता है कि इसे deploy करने में अंतर्निहित जोखिम है: यह poison fountain से संबद्ध नहीं है, उस स्रोत की सामग्री की गारंटी नहीं दे सकता, और आपको कभी भी असली users को अपने Miasma path पर नहीं भेजना चाहिए।

यह क्या करता है

  • configurable `poison-source` (डिफ़ॉल्ट रूप से poison fountain) से poisoned training data परोसता है; response caching को बंद किया जा सकता है
  • हर response में आपके चुने `link-prefix` के तहत configurable संख्या में self-directing links (`link-count`) होते हैं, ताकि scrapers आपके proxy के ज़रिए वापस घूमते रहें
  • `max-depth` एक तय depth के बाद scrapers को छोड़ देता है, जिससे आप तय कर सकते हैं कि हर एक से आपकी लागत में कितना poison और egress जुड़े
  • `max-in-flight` एक साथ होने वाले requests को सीमित करता है और overflow पर तुरंत 429 लौटाता है; `force-gzip` egress घटाने के लिए हर response को compress करता है
  • वैकल्पिक रूप से हर User-Agent के हिसाब से request metrics, जो एक local SQLite file में सहेजे जाते हैं और basic-auth से सुरक्षित endpoint पर उपलब्ध होते हैं
  • CLI flags या YAML, TOML या JSON config file से configure होता है; poison source से आने वाला HTML डिफ़ॉल्ट रूप से escape किया जाता है

शुरू करें

README में `/naughty-bots` नाम के path पर Nginx reverse proxy के पीछे scrapers को फँसाने की प्रक्रिया बताई गई है; यही नतीजा दूसरे setups के साथ भी मिलता है।

Miasma इंस्टॉल करें

Cargo सबसे अनुशंसित तरीका है; pre-built binaries GitHub releases page पर उपलब्ध हैं और कई package managers के लिए community packages मौजूद हैं।

bashbash
cargo install miasma

# start with the default configuration
miasma

# list every configuration option
miasma --help

या Docker image चलाएँ

आधिकारिक image वही flags लेता है जो local binary लेती है।

bashbash
docker run --rm -p 9999:9999 austinweeks/miasma:latest \
    --link-prefix '/naughty-bots' \
    --max-in-flight 30

अपनी site में hidden links embed करें

ये attributes link को human visitors के लिए अदृश्य रखते हैं और screen readers तथा keyboard navigation द्वारा इग्नोर करवाते हैं — इसे सिर्फ़ scrapers देखते हैं।

टेक्स्टटेक्स्ट
<a
  href="/naughty-bots/"
  style="display: none;"
  aria-hidden="true"
  tabindex="-1"
>
  Amazing high quality data here!
</a>

Trap path को Miasma तक proxy करें

हर `/naughty-bots` variant को Miasma पर route करें (यहाँ port 9855 पर), और per-User-Agent aggressive rate limiting लगाएँ ताकि आप खुद पर DDoS न कर बैठें।

टेक्स्टटेक्स्ट
http {
  # Reserve 8MB memory for tracking user agents
  limit_req_zone $http_user_agent zone=miasma:8m rate=1r/s;

  server {
    location = /naughty-bots {
      port_in_redirect off;
      return 301 /naughty-bots/;
    }
    location /naughty-bots/ {
      # Rate limit via the 'miasma' zone with no queueing
      limit_req_status 429;
      limit_req zone=miasma burst=5 nodelay;

      # Proxy requests to Miasma
      proxy_pass http://localhost:9855/;
    }
  }
}

मेल खाते prefix के साथ Miasma शुरू करें

50 in-flight connections, forced gzip, और depth 8 तक हर page पर पाँच links — README का अनुमान है कि scrapers लगभग ~100K poisoned pages के बाद छोड़ दिए जाते हैं, हर एक लगभग 250 MB का।

bashbash
miasma --link-prefix '/naughty-bots' -p 9855 -c 50 --force-gzip --link-count 5 --max-depth 8
Animated terminal log of Miasma answering a stream of GET requests to /naughty-bots/<uuid> paths with HTTP 200 for scraper user agents
Miasma's request log as trapped scrapers keep following /naughty-bots links.Miasma README ↗

robots.txt में अच्छे bots को सुरक्षित रखें

Trap path को disallow करें ताकि search engines और compliant crawlers कभी उसमें प्रवेश न करें।

टेक्स्टटेक्स्ट
User-agent: *
Disallow: /naughty-bots

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • robots.txt को नज़रअंदाज़ करने वाले AI training crawlers को, आपकी सामग्री के बजाय poisoned pages परोसकर, किसी personal site या blog को scrape करने की कीमत चुकाने पर मजबूर करें
  • Miasma के per-User-Agent request metrics की मदद से पहचानें कि कौन से bots किसी site पर सबसे ज़्यादा request भेजते हैं
  • Miasma को library के रूप में इस्तेमाल करके किसी मौजूदा Rust web server में scraper tarpit जोड़ें
  • Nginx (या दूसरे reverse-proxy) setup के साथ कम memory वाला trap चलाएँ, जिसका egress max-depth और force gzip से सीमित रहता है

How Miasma compares

Miasma alongside other open-source web scraping & crawling tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
Firecrawl★ 215kकिसी भी वेबसाइट को अपने LLM ऐप्स के लिए साफ़ Markdown या स्ट्रक्चर्ड JSON में बदलें
Agent Reach★ 117kपहले से कॉन्फ़िगर की गई वेब-एक्सेस लेयर, जो CLI एजेंट को उन साइटों के लिए रीडर देती है जहाँ उसकी पहुँच नहीं है
Scrapling★ 108kएडैप्टिव Python वेब स्क्रैपिंग, जो साइट में बदलाव के बावजूद काम करती रहे और anti-bot सिस्टम को बायपास करे
Crawl4AI★ 88.4kवेब पेजों को साफ़, LLM के लिए तैयार Markdown में बदलने वाला ओपन सोर्स वेब क्रॉलर
Scrapy★ 65.7kबड़े पैमाने पर वेबसाइट क्रॉल करने और संरचित डेटा निकालने के लिए एक Python फ़्रेमवर्क
changedetection.io★ 36.2kLLM-फ़िल्टर्ड अलर्ट के साथ सेल्फ-होस्टेड वेब पेज चेंज मॉनिटरिंग
ScrapeGraphAI★ 33kसादी अंग्रेज़ी के प्रॉम्प्ट से LLM और ग्राफ़ पाइपलाइन द्वारा संरचित वेब डेटा निकालें
Miasma★ 1.5kएक छोटा Rust server जो AI वेब scrapers को ज़हरीले training data और खुद की ओर इशारा करने वाले links के अंतहीन चक्र में फँसा देता है