{"id":13639353,"url":"https://github.com/ciniml/WireGuard-ESP32-Arduino","last_synced_at":"2025-04-19T22:32:19.082Z","repository":{"id":39647178,"uuid":"387251671","full_name":"ciniml/WireGuard-ESP32-Arduino","owner":"ciniml","description":"WireGuard implementation for ESP32 Arduino","archived":false,"fork":false,"pushed_at":"2024-04-01T13:57:36.000Z","size":76,"stargazers_count":857,"open_issues_count":31,"forks_count":80,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-04-12T16:55:25.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ciniml.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}},"created_at":"2021-07-18T19:14:08.000Z","updated_at":"2025-04-11T22:03:30.000Z","dependencies_parsed_at":"2024-05-27T19:00:04.051Z","dependency_job_id":"cece1fa4-8fa2-4747-8055-28770bedfff1","html_url":"https://github.com/ciniml/WireGuard-ESP32-Arduino","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciniml%2FWireGuard-ESP32-Arduino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciniml%2FWireGuard-ESP32-Arduino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciniml%2FWireGuard-ESP32-Arduino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ciniml%2FWireGuard-ESP32-Arduino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ciniml","download_url":"https://codeload.github.com/ciniml/WireGuard-ESP32-Arduino/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249822200,"owners_count":21329935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-08-02T01:00:59.822Z","updated_at":"2025-04-19T22:32:18.809Z","avatar_url":"https://github.com/ciniml.png","language":"C","funding_links":[],"categories":["C","Projects"],"sub_categories":["Alternative Implementations"],"readme":"# WireGuard Implementation for ESP32 Arduino\n\nThis is an implementation of the [WireGuard\u0026reg;](https://www.wireguard.com/) for ESP32 Arduino.\n\nAlmost all of this code is based on the [WireGuard Implementation for lwIP](https://github.com/smartalock/wireguard-lwip), but some potion of the code is adjusted to build with ESP32 Arduino.\n\n## How to use \n\n1. Include `WireGuard-ESP32.h` at the early part of the sketch.\n\n```c++\n#include \u003cWireGuard-ESP32.h\u003e\n```\n\n2. Define the instance of the `WireGuard` class at module level.\n\n```c++\nstatic WireGuard wg;\n```\n\n3. Connect to WiFi AP by using `WiFi` class.\n\n```c++\nWiFi.begin(ssid, password);\nwhile( !WiFi.isConnected() ) {\n    delay(1000);\n}\n```\n\n4. Sync the system time via NTP.\n\n```c++\nconfigTime(9 * 60 * 60, 0, \"ntp.jst.mfeed.ad.jp\", \"ntp.nict.jp\", \"time.google.com\");\n```\n\n5. Start the WireGuard interface.\n\n```c++\nwg.begin(\n    local_ip,           // IP address of the local interface\n    private_key,        // Private key of the local interface\n    endpoint_address,   // Address of the endpoint peer.\n    public_key,         // Public key of the endpoint peer.\n    endpoint_port);     // Port pf the endpoint peer.\n```\n\nYou can see an example sketch `uptime_post.ino`, which connects SORACOM Arc WireGuard endpoint and post uptime to SORACOM Harvest via WireGuard connection.\n\n## License\n\nThe original WireGuard implementation for lwIP is licensed under BSD 3 clause license so the code in this repository also licensed under the same license.\n\nOriginal license is below:\n\nThe code is copyrighted under BSD 3 clause Copyright (c) 2021 Daniel Hope (www.floorsense.nz)\n\nSee LICENSE for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciniml%2FWireGuard-ESP32-Arduino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciniml%2FWireGuard-ESP32-Arduino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciniml%2FWireGuard-ESP32-Arduino/lists"}