{"id":49636512,"url":"https://github.com/libdns/websupport","last_synced_at":"2026-05-05T15:03:39.216Z","repository":{"id":337526299,"uuid":"1113922694","full_name":"libdns/websupport","owner":"libdns","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-11T08:17:16.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T21:40:37.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libdns.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-10T16:45:08.000Z","updated_at":"2026-01-05T05:24:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/libdns/websupport","commit_stats":null,"previous_names":["libdns/websupport"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/libdns/websupport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdns%2Fwebsupport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdns%2Fwebsupport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdns%2Fwebsupport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdns%2Fwebsupport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libdns","download_url":"https://codeload.github.com/libdns/websupport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libdns%2Fwebsupport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32654618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-05T15:03:36.961Z","updated_at":"2026-05-05T15:03:39.201Z","avatar_url":"https://github.com/libdns.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# libdns-websupport: Websupport DNS Provider (libdns)\r\n\r\nThis project implements a [libdns](https://github.com/libdns/libdns) provider for [Websupport](https://rest.websupport.sk/v2/docs) DNS.  \r\nImplements the [libdns](https://github.com/libdns/libdns) interfaces for Websupport's DNS API so you can manage TXT records for ACME DNS-01 and other use cases.\r\n\r\nImportant: This repo includes a Windows-friendly test app (`main.go`) that can:\r\n- Create/delete TXT records via Websupport API\r\n- Generate a self‑signed certificate for `libdns.example.com` for local testing\r\n- Simulate an ACME DNS‑01 workflow (create/verify/cleanup)\r\n\r\n---\r\n\r\n## Import path note\r\n\r\nYou may notice imports like `github.com/libdns/websupport/websupport` (double `websupport`).\r\nThis is because the provider implementation lives in the `websupport/` subdirectory of the repository.\r\n\r\n- The module path is `github.com/libdns/websupport` (the repository root).\r\n- The package that implements the provider is in the `websupport` subfolder, so the full import path becomes `github.com/libdns/websupport/websupport`.\r\n\r\nIf you prefer a single-segment import (for example `github.com/libdns/websupport`), we can reorganize the repository so the provider package is at the repository root and move the test application into `cmd/` (recommended). Let me know if you want me to do that.\r\n\r\n\r\n## Features\r\n\r\n- **ACME DNS-01 Support**: Solve DNS challenges for Let's Encrypt and other ACME providers\r\n- **Full libdns Interface**: Implements `RecordAppender`, `RecordDeleter`, and `RecordGetter` interfaces\r\n- **TXT Record Management**: Create, retrieve, and delete DNS TXT records\r\n- **Basic Authentication**: Secure API communication using Websupport API credentials\r\n- **Context Support**: Full context cancellation support for timeouts and cancellations\r\n\r\n---\r\n\r\n## Installation\r\n\r\nTo use this provider in your project, add it as a dependency:\r\n\r\n```bash\r\ngo get github.com/libdns/websupport\r\n```\r\n\r\nAlternatively, clone the repository:\r\n\r\n```bash\r\ngit clone https://github.com/libdns/websupport.git\r\ncd websupport\r\ngo mod download\r\n```\r\n\r\n---\r\n\r\n## Usage\r\n\r\n### Basic Setup\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"context\"\r\n    \"github.com/libdns/libdns\"\r\n    \"github.com/libdns/websupport/websupport\"\r\n    \"time\"\r\n)\r\n\r\nfunc main() {\r\n    // Create a provider with your Websupport credentials\r\n    // SECURITY: Do NOT hardcode real API keys. Prefer environment variables.\r\n    provider := \u0026websupport.Provider{\r\n        APIKey:    os.Getenv(\"WEBSUPPORT_API_KEY\"),\r\n        APISecret: os.Getenv(\"WEBSUPPORT_API_SECRET\"),\r\n        APIBase:   \"https://rest.websupport.sk/v2\",\r\n    }\r\n\r\n    ctx := context.Background()\r\n    zone := \"example.com\"\r\n\r\n    // Create a TXT record for ACME challenge\r\n    records := []libdns.Record{\r\n        \u0026libdns.TXT{\r\n            Name: \"_acme-challenge\",\r\n            Text: \"challenge-value\",\r\n            TTL:  120 * time.Second,\r\n        },\r\n    }\r\n\r\n    // Append records\r\n    created, err := provider.AppendRecords(ctx, zone, records)\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n    \r\n    // ... use created records ...\r\n\r\n    // Delete records when done\r\n    deleted, err := provider.DeleteRecords(ctx, zone, created)\r\n    if err != nil {\r\n        panic(err)\r\n    }\r\n}\r\n```\r\n\r\n---\r\n\r\n## Configuration\r\n\r\n### Environment Variables\r\n\r\nYou can configure the provider using environment variables:\r\n\r\n```bash\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\nexport WEBSUPPORT_SERVICE_ID=\"your-service-id\"  # Required: Numeric ID for your domain\r\nexport WEBSUPPORT_TEST_ZONE=\"example.com\"       # Your domain name (not subdomain)\r\n```\r\n\r\n**Important Notes:**\r\n- `WEBSUPPORT_TEST_ZONE` is your **root domain** (e.g., `example.com`), NOT a subdomain\r\n- `WEBSUPPORT_SERVICE_ID` is **required** - this is the numeric ID for your domain\r\n- When creating records for subdomains like `test.example.com`, use `Name: \"test\"` in the record\r\n\r\n**Why is WEBSUPPORT_SERVICE_ID required?**\r\n\r\nThe Websupport REST API v2 uses service-based endpoints (`/v2/service/{id}/dns/record`) rather than domain-based endpoints. The API does not provide a working endpoint to automatically discover service IDs from domain names, so you must provide it manually.\r\n\r\n**How to find your Service ID:**\r\n\r\n1. Log in to [Websupport Admin Panel](https://admin.websupport.sk/)\r\n2. Click on your domain from the services list\r\n3. Look at the URL in your browser address bar\r\n4. The service ID is the number at the end of the URL\r\n\r\nExample: `https://admin.websupport.sk/en/dashboard/service/1234567` → Service ID is `1234567`\r\n\r\n### Testing the Provider\r\n\r\nTo test the provider with your credentials:\r\n\r\n```bash\r\n# Build the project\r\ngo build .\r\n\r\n# Set environment variables\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\nexport WEBSUPPORT_SERVICE_ID=\"your-service-id\"\r\nexport WEBSUPPORT_TEST_ZONE=\"your-domain.com\"\r\n\r\n# Run tests\r\n./libdns-websupport test\r\n```\r\n\r\n**Complete test command example:**\r\n```bash\r\ncd /path/to/websupport \u0026\u0026 \\\r\n  go build . \u0026\u0026 \\\r\n  export WEBSUPPORT_API_KEY=\"your-api-key\" \u0026\u0026 \\\r\n  export WEBSUPPORT_API_SECRET=\"your-api-secret\" \u0026\u0026 \\\r\n  export WEBSUPPORT_TEST_ZONE=\"example.com\" \u0026\u0026 \\\r\n  export WEBSUPPORT_SERVICE_ID=\"1234567\" \u0026\u0026 \\\r\n  ./libdns-websupport test\r\n```\r\n\r\n### Provider Struct\r\n\r\n```go\r\ntype Provider struct {\r\n    APIKey     string        // Websupport API Key\r\n    APISecret  string        // Websupport API Secret\r\n    APIBase    string        // API Base URL (default: https://rest.websupport.sk/v2)\r\n    ServiceID  string        // Service ID for the domain (required)\r\n    HTTPClient *http.Client  // Custom HTTP client (optional)\r\n    Timeout    time.Duration // Request timeout (default: 30s)\r\n}\r\n```\r\n\r\n---\r\n\r\n## API Reference\r\n\r\n### AppendRecords\r\n\r\nCreates DNS records in the zone. Used for adding ACME challenge records.\r\n\r\n```go\r\nfunc (p *Provider) AppendRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)\r\n```\r\n\r\n- **Parameters**:\r\n  - `ctx`: Context for cancellation and timeouts\r\n  - `zone`: Domain name (e.g., \"example.com\")\r\n  - `recs`: Records to create (typically `libdns.TXT` records)\r\n- **Returns**: Created records with populated IDs and any errors\r\n\r\n### DeleteRecords\r\n\r\nRemoves DNS records from the zone by ID.\r\n\r\n```go\r\nfunc (p *Provider) DeleteRecords(ctx context.Context, zone string, recs []libdns.Record) ([]libdns.Record, error)\r\n```\r\n\r\n- **Parameters**:\r\n  - `ctx`: Context for cancellation and timeouts\r\n  - `zone`: Domain name\r\n  - `recs`: Records to delete (must have valid IDs from creation)\r\n- **Returns**: Deleted records and any errors\r\n\r\n### GetRecords\r\n\r\nRetrieves all DNS records from the zone.\r\n\r\n```go\r\nfunc (p *Provider) GetRecords(ctx context.Context, zone string) ([]libdns.Record, error)\r\n```\r\n\r\n- **Parameters**:\r\n  - `ctx`: Context for cancellation and timeouts\r\n  - `zone`: Domain name\r\n- **Returns**: All TXT records in the zone and any errors\r\n\r\n---\r\n\r\n## Examples\r\n\r\n### Complete ACME Challenge Workflow\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n    \"context\"\r\n    \"fmt\"\r\n    \"time\"\r\n\r\n    \"github.com/libdns/libdns\"\r\n    \"github.com/libdns/websupport/websupport\"\r\n)\r\n\r\nfunc main() {\r\n    provider := \u0026websupport.Provider{\r\n      APIKey:    os.Getenv(\"WEBSUPPORT_API_KEY\"),\r\n      APISecret: os.Getenv(\"WEBSUPPORT_API_SECRET\"),\r\n      APIBase:   \"https://rest.websupport.sk/v2\",\r\n    }\r\n\r\n    ctx := context.Background()\r\n    zone := \"example.com\"\r\n\r\n    // Step 1: Create challenge record\r\n    challengeRecord := \u0026libdns.TXT{\r\n        Name: \"_acme-challenge\",\r\n        Text: \"your-challenge-token\",\r\n        TTL:  120 * time.Second,\r\n    }\r\n\r\n    created, err := provider.AppendRecords(ctx, zone, []libdns.Record{challengeRecord})\r\n    if err != nil {\r\n        fmt.Printf(\"Failed to create record: %v\\n\", err)\r\n        return\r\n    }\r\n    fmt.Printf(\"Created record: %+v\\n\", created[0])\r\n\r\n    // Step 2: Wait for DNS propagation\r\n    time.Sleep(5 * time.Second)\r\n\r\n    // Step 3: Verify record exists\r\n    records, err := provider.GetRecords(ctx, zone)\r\n    if err != nil {\r\n        fmt.Printf(\"Failed to get records: %v\\n\", err)\r\n        return\r\n    }\r\n    fmt.Printf(\"Found %d records\\n\", len(records))\r\n\r\n    // Step 4: Clean up\r\n    deleted, err := provider.DeleteRecords(ctx, zone, created)\r\n    if err != nil {\r\n        fmt.Printf(\"Failed to delete record: %v\\n\", err)\r\n        return\r\n    }\r\n    fmt.Printf(\"Deleted %d records\\n\", len(deleted))\r\n}\r\n```\r\n\r\n### Integration with Caddy (example JSON)\r\n\r\nThis provider can be integrated with Caddy's DNS plugin system via CertMagic:\r\n\r\n```json\r\n{\r\n  \"apps\": {\r\n    \"tls\": {\r\n      \"automation\": {\r\n        \"policies\": [\r\n          {\r\n            \"issuers\": [\r\n              {\r\n                \"module\": \"acme\",\r\n                \"challenges\": {\r\n                  \"dns\": {\r\n                    \"provider\": {\r\n                      \"name\": \"websupport\",\r\n                      \"api_key\": \"${WEBSUPPORT_API_KEY}\",\r\n                      \"api_secret\": \"${WEBSUPPORT_API_SECRET}\"\r\n                    }\r\n                  }\r\n                }\r\n              }\r\n            ]\r\n          }\r\n        ]\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n---\r\n\r\n## Testing\r\n\r\nThe project includes a comprehensive test application that allows you to validate the DNS provider functionality and generate test certificates.\r\n\r\n### Test Commands\r\n\r\nEnvironment variables used by the test app:\r\n\r\n- `WEBSUPPORT_API_KEY` — Your Websupport API key (required)\r\n- `WEBSUPPORT_API_SECRET` — Your Websupport API secret (required)\r\n- `WEBSUPPORT_SERVICE_ID` — Numeric service ID for your domain (required)\r\n- `WEBSUPPORT_TEST_ZONE` — Your root domain (e.g., `example.com`) - NOT a subdomain\r\n- `WEBSUPPORT_TEST_DOMAIN` — FQDN for cert/tests (default: `libdns.example.com`)\r\n\r\n**Important:** `WEBSUPPORT_TEST_ZONE` should be your **root domain** like `example.com`, not a subdomain like `test.example.com`.\r\n\r\nThe test application supports three commands:\r\n\r\n#### 1. Basic DNS Operations Test\r\n\r\nTests creating, retrieving, and deleting DNS records:\r\n\r\n**Linux/Mac:**\r\n```bash\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\nexport WEBSUPPORT_SERVICE_ID=\"1234567\"\r\nexport WEBSUPPORT_TEST_ZONE=\"example.com\"\r\n./libdns-websupport test\r\n```\r\n\r\n**Windows:**\r\n```powershell\r\n$env:WEBSUPPORT_API_KEY = \"your-api-key\"\r\n$env:WEBSUPPORT_API_SECRET = \"your-api-secret\"\r\n$env:WEBSUPPORT_SERVICE_ID = \"1234567\"\r\n$env:WEBSUPPORT_TEST_ZONE = \"example.com\"\r\n.\\libdns-websupport.exe test\r\n```\r\n\r\nThis will:\r\n- Create a test TXT record\r\n- Retrieve all records from your zone\r\n- Delete the test record\r\n- Display success/failure information\r\n\r\n#### 2. Create Self-Signed Certificate (Local Testing Only)\r\n\r\nGenerates a **self-signed certificate** for local testing purposes. This is NOT a real Let's Encrypt certificate and will show security warnings in browsers.\r\n\r\n**Linux/Mac:**\r\n```bash\r\n./libdns-websupport create-cert\r\n```\r\n\r\n**Windows:**\r\n```powershell\r\n.\\libdns-websupport.exe create-cert\r\n```\r\n\r\nThis will:\r\n- Generate a 2048-bit RSA private key\r\n- Create a **self-signed certificate** (NOT trusted by browsers, for testing only)\r\n- Certificate is valid for 1 year\r\n- Save certificate to: `~/.caddy/certificates/libdns.example.com.crt` (Linux/Mac) or `C:\\Users\\\u003cYourUsername\u003e\\.caddy\\certificates\\libdns.example.com.crt` (Windows)\r\n- Save private key to: `~/.caddy/certificates/libdns.example.com.key` (Linux/Mac) or `C:\\Users\\\u003cYourUsername\u003e\\.caddy\\certificates\\libdns.example.com.key` (Windows)\r\n\r\n**Important:** This creates a self-signed certificate for testing purposes only. To get real, trusted SSL/TLS certificates, see the \"Obtaining Real Let's Encrypt Certificates\" section below.\r\n\r\n#### 3. ACME DNS-01 Challenge Test (Simulation Only)\r\n\r\nSimulates a complete ACME DNS-01 challenge workflow **WITHOUT** contacting Let's Encrypt. This tests that the DNS provider can create and clean up challenge records correctly.\r\n\r\n**Linux/Mac:**\r\n```bash\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\nexport WEBSUPPORT_SERVICE_ID=\"1234567\"\r\nexport WEBSUPPORT_TEST_ZONE=\"example.com\"\r\n./libdns-websupport acme-test\r\n```\r\n\r\n**Windows:**\r\n```powershell\r\n$env:WEBSUPPORT_API_KEY = \"your-api-key\"\r\n$env:WEBSUPPORT_API_SECRET = \"your-api-secret\"\r\n$env:WEBSUPPORT_SERVICE_ID = \"1234567\"\r\n$env:WEBSUPPORT_TEST_ZONE = \"example.com\"\r\n.\\libdns-websupport.exe acme-test\r\n```\r\n\r\nThis will:\r\n1. Create a DNS challenge record (`_acme-challenge` TXT record)\r\n2. Wait for DNS propagation\r\n3. Verify the record via public DNS lookup\r\n4. Retrieve records from the API\r\n5. Clean up the challenge record\r\n\r\n**Important:** This command only **simulates** the ACME workflow for testing purposes. It does NOT contact Let's Encrypt and does NOT issue a real certificate. See the section below for obtaining real certificates.\r\n\r\n---\r\n\r\n## Obtaining Real Let's Encrypt Certificates\r\n\r\n**None of the built-in test commands (`test`, `create-cert`, `acme-test`) obtain real Let's Encrypt certificates.** They are only for testing the DNS provider functionality.\r\n\r\nTo obtain **real, trusted SSL/TLS certificates** from Let's Encrypt for your domain or subdomains, you need to use this provider with an ACME client.\r\n\r\n### Recommended ACME Clients\r\n\r\nThis provider works with any ACME client that supports the libdns interface:\r\n\r\n1. **[Caddy](https://caddyserver.com/)** - Automatic HTTPS server (easiest option)\r\n2. **[Traefik](https://traefik.io/)** - Reverse proxy with automatic HTTPS\r\n3. **[Certbot](https://certbot.eff.org/)** - Official Let's Encrypt client\r\n4. **[acme.sh](https://github.com/acmesh-official/acme.sh)** - Shell script ACME client\r\n5. **[Lego](https://go-acme.github.io/lego/)** - Go-based ACME client\r\n\r\n### For Subdomains\r\n\r\nWhen obtaining certificates for subdomains like `test.example.com`:\r\n\r\n1. Set `WEBSUPPORT_TEST_ZONE` to your **root domain** (e.g., `example.com`)\r\n2. The ACME challenge will create `_acme-challenge.test.example.com` automatically\r\n3. The provider will create the TXT record with `Name: \"_acme-challenge.test\"` in your root domain\r\n\r\n**Example for subdomain certificate:**\r\n```bash\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\nexport WEBSUPPORT_SERVICE_ID=\"1234567\"\r\nexport WEBSUPPORT_TEST_ZONE=\"example.com\"  # Root domain, NOT subdomain\r\n\r\n# In your ACME client configuration, request cert for:\r\n# - test.example.com\r\n# - *.example.com (wildcard)\r\n# - example.com (root)\r\n```\r\n\r\n### Using with Traefik\r\n\r\nTraefik can use this provider for automatic certificate generation. Example configuration:\r\n\r\n```yaml\r\ncertificatesResolvers:\r\n  letsencrypt:\r\n    acme:\r\n      email: your-email@example.com\r\n      storage: /acme.json\r\n      dnsChallenge:\r\n        provider: websupport\r\n        resolvers:\r\n          - \"1.1.1.1:53\"\r\n          - \"8.8.8.8:53\"\r\n\r\n# Environment variables for Traefik:\r\n# WEBSUPPORT_API_KEY=your-api-key\r\n# WEBSUPPORT_API_SECRET=your-api-secret\r\n# WEBSUPPORT_SERVICE_ID=1234567\r\n```\r\n\r\n### Using with Caddy\r\n\r\nCaddy can automatically obtain certificates using this DNS provider. You'll need to build Caddy with the Websupport DNS module or use the libdns interface directly.\r\n\r\n---\r\n\r\n## Building from Source\r\n\r\n**Linux/Mac:**\r\n```bash\r\ngit clone https://github.com/libdns/websupport.git\r\ncd websupport\r\ngo build .\r\n```\r\n\r\n**Windows:**\r\n```powershell\r\ngit clone https://github.com/libdns/websupport.git\r\ncd websupport\r\ngo build .\r\n```\r\n\r\n# Simulate ACME challenge\r\n.\\libdns-websupport.exe acme-test\r\n```\r\n\r\n---\r\n\r\n## Testing (Linux)\r\n\r\nThe test app works the same on Linux. Replace PowerShell with bash and note that files are written to `~/.caddy/certificates`.\r\n\r\n### Test Commands\r\n\r\nEnvironment variables used by the test app (optional but recommended):\r\n\r\n- `WEBSUPPORT_TEST_ZONE` — your zone (default: `example.com`)\r\n- `WEBSUPPORT_TEST_DOMAIN` — FQDN for cert/tests (default: `libdns.example.com`)\r\n\r\n#### 1. Basic DNS Operations Test\r\n\r\n```bash\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\n## Task Runners\r\n\r\n### Linux/macOS (Makefile)\r\n\r\nCommon tasks:\r\n\r\n```bash\r\n# Build binary\r\nmake build\r\n\r\n# Run locally\r\nmake run\r\n\r\n# Run tests\r\nmake test\r\n\r\n# Create self-signed certificate (writes to ~/.caddy/certificates)\r\nmake cert\r\n\r\n# DNS operations test (requires API env vars)\r\nmake dns-test\r\n\r\n# ACME simulation (requires API env vars)\r\nmake acme-test\r\n```\r\n\r\n### Windows (PowerShell)\r\n\r\nUse the provided `make.ps1` script:\r\n\r\n```powershell\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\n./libdns-websupport test\r\n```\r\n\r\n#### 2. Create Self-Signed Certificate\r\n\r\n```bash\r\n./libdns-websupport create-cert\r\nls -l ~/.caddy/certificates/libdns.example.com.*\r\n```\r\n\r\nExpected files:\r\n\r\n- `~/.caddy/certificates/libdns.example.com.crt`\r\n- `~/.caddy/certificates/libdns.example.com.key`\r\n\r\n#### 3. ACME DNS-01 Challenge Test\r\n\r\n\r\n```bash\r\nexport WEBSUPPORT_API_KEY=\"your-api-key\"\r\nexport WEBSUPPORT_API_SECRET=\"your-api-secret\"\r\n./libdns-websupport acme-test\r\n```\r\n\r\n### Building from Source\r\n\r\n```bash\r\ngit clone https://github.com/goozoon/libdns-websupport.git\r\ncd libdns-websupport\r\ngo build .\r\n```\r\n\r\n### Quick Run\r\n\r\n```bash\r\ngo run .\r\n```\r\n\r\n---\r\n\r\n## Development\r\n\r\n### Project Layout\r\n\r\n```\r\nlibdns-websupport/\r\n├── go.mod                  # Go module definition\r\n├── go.sum                  # Go module checksums\r\n├── main.go                 # Test application\r\n├── readme.md               # This file\r\n└── websupport/\r\n    └── provider.go         # libdns provider implementation\r\n```\r\n\r\n### Building\r\n\r\n```bash\r\ngo build ./websupport\r\n```\r\n\r\n### Quick Run\r\n\r\n```powershell\r\ngo run .\r\n```\r\n\r\n### Running Tests\r\n\r\n```bash\r\ngo test ./...\r\n```\r\n\r\n---\r\n\r\n## Security \u0026 Publishing Checklist\r\n\r\n- **Credentials**: Never hardcode API credentials. Use environment variables or a secrets vault.\r\n- **HTTPS**: All API calls use HTTPS for secure communication\r\n- **Basic Auth**: Credentials are sent via HTTP Basic Authentication\r\n- **Rate Limiting**: Be mindful of Websupport's API rate limits when managing records\r\n- **GitHub Safety**: Before publishing, search the repo for your domain or secrets and remove any accidental commits.\r\n- **Local Testing**: The `create-cert` command generates a self‑signed cert; do not use it in production.\r\n\r\n---\r\n\r\n## Resources\r\n\r\n- [libdns Documentation](https://pkg.go.dev/github.com/libdns/libdns)\r\n- [Websupport API Documentation](https://rest.websupport.sk/v2/docs)\r\n- [Caddy Documentation](https://caddyserver.com/docs/)\r\n- [ACME DNS-01 Challenge](https://letsencrypt.org/docs/challenge-types/#dns-01)\r\n\r\n---\r\n\r\n## License\r\n\r\nThis project is open source and available under the MIT License.\r\n\r\n---\r\n\r\n## Contributing\r\n\r\nContributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.\r\n\r\n---\r\n\r\n## Support\r\n\r\nFor issues, questions, or suggestions, please open an issue on GitHub.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibdns%2Fwebsupport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibdns%2Fwebsupport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibdns%2Fwebsupport/lists"}