基于区块链的毕业设计Go Implementation of WireGuard – WireGuard的Go实现

本文提供基于区块链的毕业设计国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,基于区块链的毕业设计Go Implementation of WireGuard – WireGuard的Go实现 是一篇很好的国外资料

Go Implementation of WireGuard

This is an implementation of WireGuard in Go.

Usage

Most Linux kernel WireGuard users are used to adding an interface with ip link add wg0 type wireguard. With wireguard-go, instead simply run:

$ wireguard-go wg0 

This will create an interface and fork into the background. To remove the interface, use the usual ip link del wg0, or if your system does not support removing interfaces directly, you may instead remove the control socket via rm -f /var/run/wireguard/wg0.sock, which will result in wireguard-go shutting down.

To run wireguard-go without forking to the background, pass -f or --foreground:

$ wireguard-go -f wg0 

When an interface is running, you may use wg(8) to configure it, as well as the usual ip(8) and ifconfig(8) commands.

To run with more logging you may set the environment variable LOG_LEVEL=debug.

Platforms

Linux

This will run on Linux; however you should instead use the kernel module, which is faster and better integrated into the OS. See the installation page for instructions.

macOS

This runs on macOS using the utun driver. It does not yet support sticky sockets, and won’t support fwmarks because of Darwin limitations. Since the utun driver cannot have arbitrary interface names, you must either use utun[0-9]+ for an explicit interface name or utun to have the kernel select one for you. If you choose utun as the interface name, and the environment variable WG_TUN_NAME_FILE is defined, then the actual name of the interface chosen by the kernel is written to the file specified by that variable.

Windows

This runs on Windows, but you should instead use it from the more fully featured Windows app, which uses this as a module.

FreeBSD

This will run on FreeBSD. It does not yet support sticky sockets. Fwmark is mapped to SO_USER_COOKIE.

OpenBSD

This will run on OpenBSD. It does not yet support sticky sockets. Fwmark is mapped to SO_RTABLE. Since the tun driver cannot have arbitrary interface names, you must either use tun[0-9]+ for an explicit interface name or tun to have the program select one for you. If you choose tun as the interface name, and the environment variable WG_TUN_NAME_FILE is defined, then the actual name of the interface chosen by the kernel is written to the file specified by that variable.

Building

This requires an installation of go ≥ 1.16.

$ git clone https://git.zx2c4.com/wireguard-go $ cd wireguard-go $ make 

License

Copyright (C) 2017-2021 WireGuard LLC. All Rights Reserved.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 

使用WireGuard的Go实施

这是Go中WireGuard的一个实现

平台

大多数Linux内核WireGuard用户都习惯于使用ip链接添加wg0类型的WireGuard来添加接口。使用wireguard go,只需运行:

$ wireguard-go wg0 

这将创建一个界面并进入后台。要删除接口,请使用常用的ip链接del wg0,或者如果您的系统不支持直接删除接口,则可以通过rm-f/var/run/wireguard/wg0.sock删除控制套接字,这将导致wireguard go关闭

要运行wireguard go而不分叉到后台,请传递-f或–前台:

$ wireguard-go -f wg0 

当接口正在运行时,您可以使用wg(8)来配置它,以及常用的ip(8)和ifconfig(8)命令

要运行更多日志记录,可以设置环境变量LOGu LEVEL=debug

Linux

macOS

这将在Linux上运行;但是,您应该使用内核模块,它更快、更好地集成到操作系统中。有关说明,请参阅安装页面

macOS

它使用utun驱动程序在macOS上运行。由于达尔文的限制,它还不支持粘性套接字,也不支持fwmarks。由于utun驱动程序不能具有任意接口名,因此必须使用utun[0-9]+作为显式接口名,或者使用utun让内核为您选择一个接口名。如果选择utun作为接口名,并且定义了环境变量WG_TUN_name_FILE,那么内核选择的接口的实际名称将写入该变量指定的文件中

Windows

它在Windows上运行,但您应该从功能更全面的Windows应用程序中使用它,该应用程序将此作为一个模块使用

FreeBSD

这将在FreeBSD上运行。它还不支持粘性套接字。Fwmark映射到SO_用户_COOKIE

OpenBSD

这将在OpenBSD上运行。它还不支持粘性套接字。Fwmark被映射到SO_-RTABLE。由于tun驱动程序不能具有任意接口名称,因此必须使用tun[0-9]+作为显式接口名称,或使用tun让程序为您选择一个接口名称。如果选择tun作为接口名,并且定义了环境变量WG_tun_name_FILE,那么内核选择的接口的实际名称将写入该变量指定的文件中

Building

这需要安装go≥ 1.16.

$ git clone https://git.zx2c4.com/wireguard-go $ cd wireguard-go $ make 

License

Copyright (C) 2017-2021 WireGuard LLC. All Rights Reserved.  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/23954.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » 基于区块链的毕业设计Go Implementation of WireGuard – WireGuard的Go实现

提供最优质的资源集合

立即查看 了解详情