Ecosyste.ms: OpenCollective
An open API service for software projects hosted on Open Collective.
github.com/SagerNet/wireguard-go
Mirror only. Official repository is at https://git.zx2c4.com/wireguard-go
https://github.com/SagerNet/wireguard-go
This is a similar treatment to the handling of the encryption
channel found a few commits ago: U...
This keeps the output minimal and focused on the benchmark results.
Signed-off-by: Josh Bleeche...
8a304155554a16285b5334ae4a02e09adfb0bde1 authored about 4 years ago
Any io.Reader will do, and there are no performance concerns here.
This is technically backwards...
This prevents linking to wintun.dll until it's actually needed, which
should improve startup tim...
This is particularly problematic on mobile,
where there is a fixed number of elements.
If most o...
People are actually hitting this condition, so make it uniform. Also,
change a printf into a pri...
Co-authored-by: David Anderson <[email protected]>
Signed-off-by: Josh Bleecher Snyder <jo...
Switch from *testing.T to testing.TB.
Signed-off-by: Josh Bleecher Snyder <[email protected]>
cdaf4e9a76ed9485ff67c1601a947fcb8089a680 authored about 4 years ago
In each case, the starting waitgroup did nothing but ensure
that the goroutine has launched.
No...
c9e4a859ae8cdd7046a467afe8b50c5364c2cfc7 authored about 4 years agoSO_REUSEADDR does not make sense for unicast UDP sockets.
Signed-off-by: Jason A. Donenfeld <Ja...
890cc06ed577420b04676d4b2d7a7daae5fb0030 authored about 4 years ago
When running many concurrent test processing using
https://godoc.org/golang.org/x/tools/cmd/stre...
Signed-off-by: Josh Bleecher Snyder <[email protected]>
d0f8e9477c14a1c92f84beb46cd17b91c56fae44 authored about 4 years ago
One of the first rules of WaitGroups is that you call wg.Add
outside of a goroutine, not inside ...
Signed-off-by: Jason A. Donenfeld <[email protected]>
40dfc85defd8d47b9d371becc36796d6edc43d05 authored about 4 years agoPersnickety consumers can now do:
func init() {
tun.WintunPool, _ = wintun.MakePool...
Found by the race detector and existing tests.
To avoid introducing a lock into this hot path,
...
It doesn't really matter, because it is only used in tests,
but it does remove some noise from p...
This doesn't cause any practical problems as it is,
but vet (rightly) flags this code as copying...
Signed-off-by: Josh Bleecher Snyder <[email protected]>
d3ff2d6b62b095f37582affe84e267d7e5be88c6 authored about 4 years agoMinor code cleanup; no functional changes.
Signed-off-by: Josh Bleecher Snyder <josh@tailscale....
01d3aaa7f418dd0ca86643ddcc8c82544cb8398b authored about 4 years agoSigned-off-by: Jason A. Donenfeld <[email protected]>
b6303091fc8c11cf86b92e9c4287c0ba74e77e87 authored about 4 years ago
Which really shouldn't happen. But it is a useful information for
troubleshooting.
Signed-off-b...
c9fabbd5bf12b7abae6f00fe666edec3a8af7106 authored about 4 years agoSigned-off-by: Simon Rozman <[email protected]>
4cc7a7a455b0796d6300a6f3ef69e9041ec900d4 authored about 4 years agoda19db415a588e72fb8b13e5b5aa0b97db7cc30b authored about 4 years ago
Signed-off-by: Jason A. Donenfeld <[email protected]>
52c834c4469f4f6e33c97c7294faffabfcbf114a authored about 4 years agofix panic: send on closed channel when remove peer
Signed-off-by: Haichao Liu <liuhaichao@byted...
913f68ce3820801e045632cb05c6f11e0df50b47 authored about 4 years agoWe let people loading this from resources opt in via:
go build -tags load_wintun_from_rsrc
...
Signed-off-by: Jason A. Donenfeld <[email protected]>
82128c47d90a54faded017ad3e5bc61eb0c641db authored about 4 years agoSigned-off-by: Jason A. Donenfeld <[email protected]>
c192b2eeec5dc8e21e8a6deb5e6dcceda91d649c authored about 4 years ago
Signed-off-by: Simon Rozman <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Simon Rozman <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Rather than having every application using Wintun driver reinvent the
wheel, the Wintun device/a...
Signed-off-by: Jason A. Donenfeld <[email protected]>
5ca1218a5c16fb9b5e99b61c0b5758f66087e2e4 authored about 4 years ago
Direct syscalls using unix.Syscall(unix.SYS_*, ...) are discouraged on
macOS and might not be su...
Direct syscalls using unix.Syscall(unix.SYS_*, ...) are discouraged on
macOS and might not be su...
This adds the fixes for golang/go#41868 which are needed to build
wireguard without direct sysca...
Direct syscalls using unix.Syscall(unix.SYS_*, ...) are discouraged on
macOS and might not be su...
Direct syscalls using unix.Syscall(unix.SYS_*, ...) are discouraged on
macOS and might not be su...
Signed-off-by: Brad Fitzpatrick <[email protected]>
[Jason: ran go mod tidy.]
Signed-off-by...
Signed-off-by: Frank Werner <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Riobard Zhan <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Riobard Zhan <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
c8fe925020de61b30eec2bc016fb7f45df78dc6c authored over 4 years ago
Bits / Bytes-per-Word misses the step of also dividing by Bits-per-Byte,
which we need in order ...
Signed-off-by: Sina Siadat <[email protected]>
Signed-off-by: Jason A. Donenfeld <[email protected]>
Both wireguard-windows and wireguard-android access Bind
directly for these methods now.
Signed...
507f148e1c42d2deaac524e759115a1b02730207 authored over 4 years agoSigned-off-by: Brad Fitzpatrick <[email protected]>
31b574ef99a79fb654085693423f48a3bf0e7f81 authored over 4 years ago
Use the RTMGRP_IPV4_ROUTE const from x/sys/unix instead of using the
corresponding RTNLGRP_IPV4_...
Peers are currently removed after Device's goroutines are signaled to stop,
but without waiting ...
Signed-off-by: David Crawshaw <[email protected]>
b84f1d4db25e6e7de29551d3fd9c3c10e0b731e1 authored over 4 years agoSigned-off-by: David Crawshaw <[email protected]>
dfb28757f799e02840e8939ca739107f2560f53f authored over 4 years agoSigned-off-by: David Crawshaw <[email protected]>
00bcd865e6996f932ea0dcacf7df015f79307153 authored over 4 years agoSigned-off-by: Jason A. Donenfeld <[email protected]>
f28a6d244b5133439d408b9fe13e12e9917f9646 authored over 4 years agoAnother thing never tested ever.
Signed-off-by: Jason A. Donenfeld <[email protected]>
c403da6a39c876123c096113d08d0d3019b4a07e authored over 4 years agoSigned-off-by: Jason A. Donenfeld <[email protected]>
d6de6f3ce6c24841d29b563d3283a0fd85e437ac authored over 4 years agoThis was evidently never tested before committing.
Signed-off-by: Jason A. Donenfeld <Jason@zx2...
59e556f24ec7503eda8ff15f026b2df44e096b6f authored over 4 years agoSigned-off-by: Jason A. Donenfeld <[email protected]>
31faf4c1598c67ba3b2ade4471e0a80ee4b0c968 authored over 4 years ago
Reported-by: Jayakumar S <[email protected]>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c...
In the presence of preemption, the current test may fail transiently.
This uses static test data...
Signed-off-by: Jason A. Donenfeld <[email protected]>
da9d300cf8b50d1cf629b7fa4423d122a74a6871 authored over 4 years ago
Due to the use of the new errors module, we now require at least 1.13
instead of 1.12.
Signed-o...
59c99297141fe247e9b3fa895b3f779d9ac6eadf authored over 4 years agoSigned-off-by: Jason A. Donenfeld <[email protected]>
db0aa39b765243c6a4ac9a2e348311df9517c0bf authored over 4 years agoCleans up and splits out UAPIOpen to its own file.
Signed-off-by: David Crawshaw <crawshaw@tail...
bc77de2acaebe8589193e621933aa42783926aad authored over 4 years agoos.MkdirAll never returns an os.IsExist error.
Signed-off-by: David Crawshaw <crawshaw@tailscal...
c8596328e7f769fdd313f981bb3b2de38b40c80c authored over 4 years ago
Go's GC semantics might not always guarantee the safety of this, and the
race detector gets upse...
It was just returning "no such file or directory" (the String of the
syscall.Errno returned by C...
Useful in testing when bad network stacks repeat or
batch large numbers of packets.
Signed-off-...
d60857e1a7d82735c01f893f644455fc7ccc423f authored over 4 years ago
c85e4a410f27986a2967a49c0155633c716bf3ca introduced preliminary HWID
checking to speed up Wintun...
Signed-off-by: Simon Rozman <[email protected]>
250b9795f3670981f5e276773307e9638ec0aee2 authored over 4 years ago
This makes uapi.go's public API conform to Go style in terms
of error types.
Signed-off-by: Dav...
f2c6faad44fa70cdc8ef80385ca9826bbf0468d9 authored over 4 years agoAnd unexport handshake constants.
Signed-off-by: David Crawshaw <[email protected]>
de374bfb44945e241d93ca821f35f6e3078e506b authored over 4 years agoSigned-off-by: Brad Fitzpatrick <[email protected]>
abd287159e7eb7d20ee46c03d1a8cb9a645735e4 authored over 4 years ago
The sticky socket code stays in the device package for now,
as it reaches deeply into the peer l...
Signed-off-by: Brad Fitzpatrick <[email protected]>
85a45a9651d2b38e3616a7899800601656cf143e authored over 4 years agoThis code is useful to other packages writing tests.
Signed-off-by: David Crawshaw <crawshaw@ta...
1a1c3d096888816c94cf1eb7c2747e83f008549f authored over 4 years ago
This works around a startup race condition when competing with
HackListener, which is trying to ...
Adds a test that will fail consistently on 32-bit platforms if the
struct ever changes again to ...
Signed-off-by: Avery Pennarun <[email protected]>
6aefb61355c9da539383dd0c2bc5f2bb3dbb3963 authored over 4 years ago
This lets us include the package on those platforms in a
followup commit where we split out a co...
The existing test would occasionally flake out with:
--- FAIL: TestRatelimiter (0.12s)
ra...
ae88e2a2cda0faab68ad667223cd26ffd54d1bee authored almost 5 years ago
4739708ca4fa68e2dd1915618d8cba113dac9312 authored almost 5 years ago
Update the golang.org/x/sys/unix dependency and use the newly introduced
RTMGRP_* consts instead...
Don't divide by zero.
9cbcff10dd3e04671d31ab224526f3d22a7ba665 authored almost 5 years agocb4bb63030d09afe7ee78fd49613b86709fdc006 authored almost 5 years ago
6ed56ff2dfd57ba47cdf604eb3c455acb553c0df authored almost 5 years ago
05b03c675090df893e8317983702c9661dfc319b authored about 5 years ago
Coauthored-by: Andrej Mihajlov <[email protected]>
caebdfe9d05901230dd7c6b7569be2903fd8ac87 authored about 5 years ago4fa2ea6a2dabad50eb5585d0a56c3a6966604fa6 authored about 5 years ago
89dd065e53e986234289a0ace66539873be8b075 authored about 5 years ago
So we take a new granular lock to prevent concurrent writes from
racing.
WARNING: DATA RACE
Wri...
It's large and Go's garbage collector doesn't deal with it especially
well.
Discussed-with: Mathias Hall-Andersen <[email protected]>
4cdf805b29b1aaca1fab317ca4fce54c7fd69bf6 authored about 5 years agoSigned-off-by: Jonathan Tooker <[email protected]>
f7d0edd2ecf5f7f5aed188823de0a122691a7de6 authored over 5 years agoffffbbcc8a3344a45c45884f11a1aee1407615ab authored over 5 years ago
47b02c618bcd4f65726bc2c57538296e430a842c authored over 5 years ago
fd23c66fcdc6b105bda2aea24f595b9c356c3670 authored over 5 years ago
ae492d1b359918d20fda817e31675f126c7a7837 authored over 5 years ago
95fbfccf60b7d8528e5f89bcf01d132516af5817 authored over 5 years ago
Some devices take ~2 seconds to enumerate on Windows if we try to get
their instance name. The ...