
सुरक्षा उपकरण जो URL के rel लिंक्स के माध्यम से कूद को ट्रेस करके अंतिम URL प्राप्त करता है।
Hoper किसी URL द्वारा अपने अंतिम गंतव्य तक पहुँचने तक गुज़रने वाले प्रत्येक हॉप (रीडायरेक्ट) को दिखाता है — यह URL शॉर्टनर, ईमेल में ट्रैकिंग लिंक, SSO फ़्लो, या रीडायरेक्ट नियमों को डीबग करने के लिए उपयोगी है।
$ hoper http://github.com
Tracing http://github.com
1. → 301 Moved Permanently http://github.com/ 81ms
2. ✔ 200 OK https://github.com/ 50ms
1 redirect → https://github.com/
HEAD का उपयोग करता है (कोई body download नहीं) और उन servers के लिए स्वचालित रूप से GET पर fallback करता है जो इसे अस्वीकार करते हैं।HTTP_PROXY / HTTPS_PROXY / NO_PROXY और NO_COLOR का पालन करता है।Ruby 3.1 या नया आवश्यक है।
gem install hoper
Windows पर, RubyInstaller के साथ Ruby इंस्टॉल करें और फिर वही कमांड चलाएँ।
hoper [options] URL [URL...]
-m, --max-hops N Maximum redirects to follow (default: 20)
-t, --timeout SECONDS Timeout per request (default: 10)
-X, --method METHOD HTTP method: HEAD or GET (default: HEAD)
-A, --user-agent UA User-Agent header to send
-H, --header 'NAME: VALUE' Extra request header (repeatable)
-k, --insecure Do not verify TLS certificates
-j, --json Output results as JSON
--[no-]color Force/disable colored output
-v, --version Print version and exit
-h, --help Show this help
यदि स्कीम छोड़ दी जाती है, तो https:// मान लिया जाता है (hoper example.com)।
hoper --json http://github.com
{
"start_url": "http://github.com/",
"final_url": "https://github.com/",
"final_status": 200,
"redirects": 1,
"hops": [
{ "url": "http://github.com/", "status": 301, "reason": "Moved Permanently", "location": "https://github.com/", "duration_ms": 81 },
{ "url": "https://github.com/", "status": 200, "reason": "OK", "duration_ms": 50 }
]
}
कई URLs के साथ आउटपुट एक array होता है।
| Code | Meaning |
|---|---|
| 0 | प्रत्येक URL एक non-error (< 400) अंतिम response में resolve हुआ |
| 1 | कम से कम एक URL विफल रहा (network error, loop, बहुत अधिक hops, 4xx/5xx) |
| 2 | अमान्य उपयोग / options |
require "hoper"
result = Hoper.trace("https://bit.ly/example", max_hops: 10)
result.hops.each { |hop| puts "#{hop.status} #{hop.url}" }
result.final_url # => "https://example.com/"
result.success? # => true
bundle install
bundle exec rake test
CI, Ubuntu, macOS और Windows (Ruby 4.0) पर टेस्ट सूट चलाता है, साथ ही Ubuntu पर सबसे पुराने समर्थित Ruby (3.1) पर भी। टेस्ट एक स्थानीय इन-प्रोसेस HTTP सर्वर का उपयोग करते हैं, इसलिए उन्हें नेटवर्क एक्सेस की आवश्यकता नहीं होती।
रिलीज़ GitHub Actions और RubyGems Trusted Publishing के साथ स्वचालित हैं:
lib/hoper/version.rb को बंप करें और CHANGELOG.md में एक सेक्शन जोड़ें; master में मर्ज करें।
टैग करें और पुश करें:
git tag v1.2.3 && git push origin v1.2.3
Release workflow टैग को संस्करण से मिलान की जाँच करता है, परीक्षण चलाता है, gem को RubyGems.org पर प्रकाशित करता है और CHANGELOG नोट्स के साथ एक GitHub Release बनाता है।
बग रिपोर्ट और pull requests का GitHub पर https://github.com/gabamnml/hoper पर स्वागत है। यह परियोजना सहयोग के लिए एक सुरक्षित, स्वागतपूर्ण स्थान बनाने के उद्देश्य से है, और योगदानकर्ताओं से अपेक्षा की जाती है कि वे Contributor Covenant आचार संहिता का पालन करें।
यह gem MIT License की शर्तों के अंतर्गत ओपन सोर्स के रूप में उपलब्ध है।
हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।
अभी तक कोई लोकप्रियता डेटा नहीं है।