承接 iwalkalone/wgrest-api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

iwalkalone/wgrest-api

最新稳定版本:v1.0

Composer 安装命令:

composer require iwalkalone/wgrest-api

包简介

A class to use wgrest API

README 文档

README

Description

Class to use wgrest API and automate Wireguard.

Install

Install with composer:

composer require iwalkalone/wgrest-api

Or a specific version:

composer require iwalkalone/wgrest-api ^1.0

What supports now

For now it just implements adding and deleting peers.

How to use it

$wgrest = new \iwalkalone\WgRestApi([
    'bearer_token' => 'you-token',
    'base_uri' => 'http://127.0.0.1:8000',
]);
// To add a peer, we just have to pass interface, endpoint and a list of allowed ips
$data = $wgrest->addPeer('wg0', '1.2.3.4:12345', ['10.10.0.0/32']);
// $data contains the response in array format
// you should save url_safe_public_key to delete the peer in the future
// To delete a peer, we just have to pass interface and the public key we just saved
$url_safe_public_key = $data['url_safe_public_key'];
$data = $wgrest->deletePeer('wg0', $url_safe_public_key);

统计信息

  • 总下载量: 28
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2026-03-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固