Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Vivekvardhan Jilkara <>
Subject: Why there are no API exposed to connect or disconnect the network interface
Date: Sat, 1 May 2021 09:49:58 +0530
Message-ID: <> (raw)

Hi team,

I have been going through the wireguard-windows module to understand
its usage for one of my requirements.

My requirement is as follows.
1. Create the virtual network interface/ network tunnel. This I can
achieve by calling, CreateTun
2. Eventually, based on some trigger points, I want to open this
created tunnel and then do the

Following are my queries.

1. Like the CreatTun method, I expected a method called
GetTun(string), which would simply call the OpenAdapter method(in the
wintun package) and return the instance of the device.
Is there any reason for not providing this?

2. In the device interface(in tun package), the APIs that are provided
are operating on the adapter against the tunnel.
I thought, if this interface would have had APIs, something called
StartSession and EndSession, using those APIs I could have connected
or disconnected the connection for that tunnel.
Is there any reason for not providing these?

Also, I am doubting whether the expectations that I set are incorrect. If YES,
I request you to help me to understand the reason AND
please guide me if there is any way to achieve the above requirements
without these APIs being expected.

Thanks in advance.


                 reply	other threads:[~2021-05-02 11:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ \
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone