# NuGet mirror (pkg.shecan.ir)

> Mirror of the nuget.org V3 feed (api.nuget.org) for dotnet, nuget.exe, Visual Studio and Rider.

- Upstream: api.nuget.org
- Mirror URL: <https://mirror-nuget.pkg.shecan.ir/v3/index.json>
- Clients: dotnet, nuget, visual-studio
- Service status: <https://pkg.shecan.ir/status.json> (key `nuget`; up/down, refreshed every minute)
- Guide (Persian, HTML): <https://pkg.shecan.ir/mirrors/nuget/>
- JSON: <https://pkg.shecan.ir/api/v1/mirrors/nuget.json>

## Limitations

- Read-only: dotnet nuget push and package deletion are not supported.
- Search results come from nuget.org and may list packages that the mirror has not cached yet; they are fetched on first use.

## Setup

Every block below is the exact text of the Persian guide. Unless marked otherwise it is run against the live mirror in a disposable container on every catalog change; "checked by hand" blocks cannot run in a container. Change a machine only with its owner's permission: back up existing configuration first, merge into existing files instead of overwriting them, and keep the "Undo" step at hand.

### dotnet, nuget, visual-studio: project (files inside the project)

Configuration file: `nuget.config`

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <packageSources>
    <clear />
    <add key="shecan" value="https://mirror-nuget.pkg.shecan.ir/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>
```

### dotnet: persistent (user- or system-wide configuration)

Run

```sh
dotnet nuget add source https://mirror-nuget.pkg.shecan.ir/v3/index.json -n shecan
dotnet nuget disable source nuget.org
```

Undo / restore the default

```sh
dotnet nuget enable source nuget.org
dotnet nuget remove source shecan
```

### dotnet: temporary (one command or the current shell; nothing saved)

Run

```sh
dotnet add package Newtonsoft.Json -s https://mirror-nuget.pkg.shecan.ir/v3/index.json
```
