Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/ooni/minivpn

A minimalistic OpenVPN implementation in Go
https://github.com/ooni/minivpn

refactor: expose public API (#70)

Expose config and tunnel as a public API.

This refactor tries to expose all the useful functi...

41e4e0b75abfcd3d901660939826630fc53ee111 authored 8 months ago by Ain Ghazal <[email protected]>
tests: update unit tests (#68)

Additionally, I'm instrumenting the integration test, and merging the
coverage profile so that ...

9de722704c8b294f2ca970bc13922da2cec018ef authored 8 months ago by Ain Ghazal <[email protected]>
tests: adapt integration tests to run against the refactored code (#65)

As part of a previous commit ($64), I reverted a recent "fix" that was
inverting the local-remo...

e0ec8b012826172fca655f56c273d8f53d14024c authored 9 months ago by Ain Ghazal <[email protected]>
feat: replace minivpn binary (#66)

# Checklist

* [x] I have read the contribution guidelines
* [x] Iff you changed code related...

f6ce6c295dfb34a4b9e1b483074bfd6360855e2c authored 9 months ago by Ain Ghazal <[email protected]>
feat: add ability to trace handshake (#64)

In order to allo tracing of events, we refactor the configuration handling. We move
options to ...

aa16602eb1ea97aa449108849f9a105d26819bc6 authored 9 months ago by Ain Ghazal <[email protected]>
tests: add tests for reliable service under packet loss (#63)

Exercise reliable service passing a vector of packet ID to simulate
packet loss.

Additionall...

35a5529f44f8e3938209e07404eccde0b88ea87c authored 9 months ago by Ain Ghazal <[email protected]>
tests: add utility script to convert pcap into test sequence (#62)

Add a utility script to convert a pcap containing a reference OpenVPN
handshake into a string c...

c74c9a3cba49d346e89d77966783798fbf3d8876 authored 9 months ago by Ain Ghazal <[email protected]>
tests: reliable workers tests for reordering and acks (#60)

Tests for down and up workers in reliable service, covering reordering
towards the upper layer ...

a3610f7735f038459b515c761638b5d2308c7134 authored 9 months ago by Ain Ghazal <[email protected]>
feat: implement reliable transport (#57)

# Checklist

* [x] I have read the contribution guidelines
* [x] Iff you changed code related...

86b986120855a0e11b3d809a57d861f6e5b5b845 authored 9 months ago by Ain Ghazal <[email protected]>
ci: enable test suite for pull requests too (#61)

# Checklist

* [x] I have read the contribution guidelines
* [x] Iff you changed code related...

f359d87d1ba762306f10d90f0130fc111b452587 authored 9 months ago by Ain Ghazal <[email protected]>
refactor: pass logger to tls (#59)

# Checklist

* [x] I have read the contribution guidelines
* [x] Iff you changed code related...

2e2be95f4d939d83ae1aebb3fd76ce45a1480f51 authored 9 months ago by Ain Ghazal <[email protected]>
refactor: add documentation to the layered architecture (#56)

This is a follow-up to the ongoing architectural refactor after the last
merged layer (#54).

...

c4c9b5a5760d061f5ca494ca3066b73b71dd5253 authored 10 months ago by Ain Ghazal <[email protected]>
feat: track netmask passed by the remote (#55)

We were not tracking the netmask passed by the remote (in the ifconfig
option). This will be us...

cddc436225f89544373a16a11a2115043cb03214 authored 10 months ago by Ain Ghazal <[email protected]>
refactor: introduce tun (#54)

This is the seventh (and in a sense, last) commit in the series of
incremental refactoring of t...

b90d50a0f78f1bd2d83fdbc5ba1103c4672ee42b authored 10 months ago by Ain Ghazal <[email protected]>
refactor: introduce data channel layer (#53)

This is the sixth commit in the series of incremental refactoring of the
current minivpn tree.
...

6c0c4cd5875cea4950bc1b8c39deb89f8211ef61 authored 10 months ago by Ain Ghazal <[email protected]>
refactor: introduce tls state manager (#52)

This is the fifth commit in the series of incremental refactoring of the
current minivpn tree.
...

dc271adf2cd8c4249520f18708cdf258785264ef authored 10 months ago by Ain Ghazal <[email protected]>
refactor: introduce controlchannel implementation (#51)

This is the fourth commit in the series of incremental refactoring of
the current minivpn tree....

1c76bec31344226dfc6093ebc5dfc1b360207364 authored 10 months ago by Ain Ghazal <[email protected]>
refactor: introduce reliable transport layer (#50)

This is the third commit in the series of incremental refactoring of the
current minivpn tree.
...

d525579d162b3f225017ec13496a6e3ab6cf8ea6 authored 10 months ago by Ain Ghazal <[email protected]>
refactor: introduce the packetmuxer layer (#49)

This is the second commit in the series of incremental refactoring of
the current minivpn tree....

4d0ca1359e084e3ef46adcec527c60f8ec2efff7 authored 10 months ago by Ain Ghazal <[email protected]>
ci: bump the version to 1.20

d976c5ab4eb66f4f3b3b811ae0ce325a2adaa809 authored 10 months ago by ain ghazal <[email protected]>
refactor: introduce the networkio layer (#46)

This commit introduces the lower layer in the new layered minivpn architecture. This new archite...

06dfeaf0c451e0ac03dfff6242bd8b065fee825a authored 10 months ago by Ain Ghazal <[email protected]>
refactor: delete duplicated cmd (#44)

728bed44c05dc6e7481dd990ac210b9fc29d80a8 authored over 1 year ago by Ain Ghazal <[email protected]>
refactor: move entrypoint to cmd (#43)

06d680b52cfc4c186b593c9cf2fe4be51732f10b authored over 1 year ago by Ain Ghazal <[email protected]>
pkg: adapt to new signature for tun

7216b3eed4504f2289fd0cf603bdc6c812e625ec authored over 1 year ago by Ain Ghazal <[email protected]>
pkg: go mod tidy

b62e339e064667ca78b944670e0e109ebd5ca3a5 authored over 1 year ago by Ain Ghazal <[email protected]>
refactor: treat events as uint8

minor change, but we've updated the backend to allocate only a uint8.
255 network events should ...

b36702e8e3aff3ab8f9257953939075757052146 authored over 1 year ago by Ain Ghazal <[email protected]>
bug: add parse option for compression empty

6f7183555f4b4fb0888ae9837d34a1a2e5332325 authored over 1 year ago by Ain Ghazal <[email protected]>
docs: add pointer to security audit

545ba9a10dbe201ea5e169f920ab7848ea859485 authored almost 2 years ago by Ain Ghazal <[email protected]>
bug: avoid panic with negative block size

1e1965a474e47bad1baad63b6f57e3096427d6db authored almost 2 years ago by Ain Ghazal <[email protected]>
refactor: use hash.Reset() and Size()

this was a pending refactor: we really don't need to instatiate the hmac
each time.

we also don...

868a98233a1e334faad88a3ca869dd065711bdc5 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: correctly acount for compression offset in cbc mode

decompression was only working for AEAD (GCM) before.
the compress=stub case seems not to be wor...

691c3efcf7ac86733f8138ace323662dba57b0a6 authored about 2 years ago by Ain Ghazal <[email protected]>
feat: use P_DATA_V2 format

As pointed out by the security audit, the use of P_DATA_V1 format was
too conspicuous. In order ...

197ce1a6c5f1ae35daaac1f161f89d42329726f9 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: incorrect boundary check for non-aead ciphers

MIV-01-005: Possible DoS via Slice Bounds Out of Range (High)
During the fuzzing process of the ...

9782a3764138f23511798466d4891bdd4541ce98 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: uTLS does not pick tls min/max version from the passed spec

Revert a change by which we had ceased to explicitely set min and max
TLS version. Apparently uT...

52ae13aad58c64d4fe251fd6b37c3962a6cca087 authored about 2 years ago by Ain Ghazal <[email protected]>
feat: try a range of ports if the required port is in use

Here I add a simple retry strategy that increments the port by one if
the default or configured ...

5e7586fe3341e96cfc2a75287da2bd3558a6e910 authored about 2 years ago by Ain Ghazal <[email protected]>
harden binary build

On the topic of the canary stack protections, check
https://github.com/golang/go/issues/21871#is...

1bf975ce58fa451ce62d0891b4548a0bc3e88e4f authored about 2 years ago by Ain Ghazal <[email protected]>
bug: validate user input against known list of providers

Otherwise, bogus provider names will lead to the creation of arbitrary
folders.

- Reference: MI...

b8da995529057be80e9a97d496eb663eec141c96 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: fix file disclosure via error messages

MIV-01-008 Possible File Disclosure via Error Messages (Info)

It was found that the minivpn cli...

dc6bceddaf667459fdf961e8ffe66ad7f7cc5562 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: index out of range in maybeAddCompressPadding

MIV-01-004: Possible DoS via Index Out of Range (Medium)
During the fuzzing process of the miniv...

fc1a97eaf64cebbc68575ef3b895932c59952fab authored about 2 years ago by Ain Ghazal <[email protected]>
bug: nil pointer dereference on EncryptAndEncodePayload

MIV-01-003: Possible DoS via nil Pointer Dereference (Medium)
During the fuzzing process of the ...

7644dbec96bca7466e1c7c2ad2de25802811a115 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: integer division by zero

During the fuzzing process of the minivpn/vpn package, it was found that
the bytesPadPKCS7 funct...

c1af37e7901175c4ab5881fe6f77c2fb8338f413 authored about 2 years ago by Ain Ghazal <[email protected]>
bug: index out of range in parseServerHardResetPacket

MIV-01-001: Possible DoS via index out of range (Low)
During the fuzzing process of the minivpn/...

8c107d5f528b461707d04d71a1d9f6f32eabdcd2 authored about 2 years ago by Ain Ghazal <[email protected]>
feat: parse route and route-gateway options

both ways are valid ways of specifying a tunnel gateway

7c3d1cad2e3e3eb8a243ce61c090b66fd6b5f4c6 authored about 2 years ago by Ain Ghazal <[email protected]>
feat: parse auth-user-pass

The credentials file is now limited to a subdirectory of the base dir.
While there, the parsing ...

60b4dbb92c1732ef2fc72ba1e0ab75530125f790 authored about 2 years ago by Ain Ghazal <[email protected]>
docs: add riseup ca for convenience

eec494a863904d96d0bbf4dca8f5cffb16a57791 authored about 2 years ago by Ain Ghazal <[email protected]>
feat(ping): improvements on data export and error handling

- store rtt as time.Duration
- improve error handling

the current backoff mechanism for read re...

d0b8306f54befb62d0ef41d75fcc72adcb0b2d5c authored about 2 years ago by Ain Ghazal <[email protected]>
feat(ping): allow pinger to reuse an existing vpn.Client connection

To allow serial use, Pinger needs a new constructor to avoid
closing the underlying connection.

bfbf55d442ce266d0316bb58bb2d68d141883aa9 authored about 2 years ago by Ain Ghazal <[email protected]>
feat: add observability for tunnel events

- add listener channel so that we can subscribe to event transitions
from the outside.
- parse...

903660cc4f94d65ccb71689672911ec72a067099 authored about 2 years ago by Ain Ghazal <[email protected]>
docs: fix missing markup in readme

f2ab8d1db8170564c3fc24156d155f44ffdd0d01 authored about 2 years ago by Ain Ghazal <[email protected]>
refactor: cleanup public API

Clean up the public interface and remove the unnecessary indirection
layer caused by RawDialer.
...

76de8e9101f3a3dc989b7df1640e6ed9d4e3de8f authored about 2 years ago by Ain Ghazal <[email protected]>
feat(ping): gather rtts & ttls

c0375a91c80d982deb046955c8f2440d8d27ae0a authored about 2 years ago by Ain Ghazal <[email protected]>
feat: parse inline certs

while doing this, I also attempted to improve tests around client
and muxer, mainly to keep test...

deed06cb6e7c769a89ebd8507038ce8ae392a80f authored about 2 years ago by Ain Ghazal <[email protected]>
pkg: add target to build x-platform binaries

67151c19ac5bab78aa25abfa1376fb004841b08c authored over 2 years ago by Ain Ghazal <[email protected]>
test: run only integration tests in integration step

ba33083efc4237a74c33ec0f64f477956662734f authored over 2 years ago by Ain Ghazal <[email protected]>
chore(ci): supress gosec hard failure

until I figure out what the vcs timestamp in the gosec step is about.

ac62cf4a547c4954f5346e6b79df5691bac1e36b authored over 2 years ago by Ain Ghazal <[email protected]>
chore: bump go version to 1.18

wireguard/tun/netstack depends in net/netip which has only landed in Go
stdlib in 1.18.

7666779ba0c84f03834ff9ff34d75e16b9f859f9 authored over 2 years ago by Ain Ghazal <[email protected]>
chore: update all deps

7cb21ed356f6148098cd1bb1057649b953995266 authored over 2 years ago by Ain Ghazal <[email protected]>
feat: improve robustness of extras/pinger (#12)

Make the implementation in extras/pinger more robust. For this:

* I vendored the icmp-ping im...

0aca51a384bffe08c8c77e16635da19b2f71706b authored over 2 years ago by Ain Ghazal <[email protected]>
feat: implement custom verification for mutual TLS auth (#10)

The regular TLS verification does not work for VPN gateways, because we don't know the common na...

a174f303d02efa6caf525377d1ddce89fae2c2ea authored over 2 years ago by Ain Ghazal <[email protected]>
feat: disable max version in TLS

this didn't make much sense when we're embracing uTLS

c8763f6b5078bb1e710a699ead8b0d52aa5e6313 authored over 2 years ago by Ain Ghazal <[email protected]>
[feat] add uTLS for parroting tls handshake

a clientHello has been captured from the standard openvpn
implementation, and we make use of uTL...

849d7b03f45a8ef4e595c0294aee73909f09aa8f authored over 2 years ago by Ain Ghazal <[email protected]>
chore: gofmt

ea507aece11c816710d909a5bcc7fac36541b698 authored over 2 years ago by Ain Ghazal <[email protected]>
style: minor misspellings

700d538e8752c146fa938e2a09681f2b1f27fc64 authored over 2 years ago by Ain Ghazal <[email protected]>
chore: update import path to be github.com/ooni/minivpn

765b6645a991121613a3d279a1af79166dd7ceb4 authored over 2 years ago by Simone Basso <[email protected]>
wording

86bcf7253ef8ed68bee6fbe14e162604f8553c42 authored over 2 years ago by Ain Ghazal <[email protected]>
document TLS_NOVERIFY flag

e80a4e010c45dc7d92be96e983c54102ff878cb2 authored over 2 years ago by Ain Ghazal <[email protected]>
small tests in random places

84916ce51739ebb060d1b0b9d1858e6cee7ae584 authored over 2 years ago by Ain Ghazal <[email protected]>
diminishing returns on options tests

5caabadf49772ebf9d97ee07256cbad341cd67eb authored over 2 years ago by Ain Ghazal <[email protected]>
small tests for client

17251d04ac7f95e6b93941f901d0c132176e4948 authored over 2 years ago by Ain Ghazal <[email protected]>
test for packet parsing

df9f658fdca818a3c36be18bfe654b00cee9c6e4 authored over 2 years ago by Ain Ghazal <[email protected]>
some juggling to test tls handshake

40f61f0ca882d08e86cfbe20c293231de57cbb70 authored over 2 years ago by Ain Ghazal <[email protected]>
tests for failure loading tls certs

600a391fcbfaecc6684b3ce5d6787b3417829d07 authored over 2 years ago by Ain Ghazal <[email protected]>
tests for handleIncoming, corner cases in tls

364ba44fab6257516bbd3a9c5c6381a67b58a6a5 authored over 2 years ago by Ain Ghazal <[email protected]>
get rid of stop method (YAGNI)

300814b79d9c098ae7837145ae9f72132014a370 authored over 2 years ago by Ain Ghazal <[email protected]>
more transport tests

f81268675b6b16739e53439d5d9e8e1b5fde518b authored over 2 years ago by Ain Ghazal <[email protected]>
small refactor in transport for testability

ffec75f657fa035193e37c9116a8322a88bee3fe authored over 2 years ago by Ain Ghazal <[email protected]>
more dialer tests

a3bc39763742f321edb4962bc86e5056d579a027 authored over 2 years ago by Ain Ghazal <[email protected]>
first tests for dialer

359d23ffdc167446ca5eab138982b7b5291c94ca authored over 2 years ago by Ain Ghazal <[email protected]>
test tlsconn.Write

96c7379c2948c86234d9dd83a37fafd6064c0611 authored over 2 years ago by Ain Ghazal <[email protected]>
simplify long read function

9b9b0d98ebc1727b9f3b7f4852659023a0981f14 authored over 2 years ago by Ain Ghazal <[email protected]>
test transport r/w packet

e251a9d3187d47c5641401a2d8c967ab47c6023e authored over 2 years ago by Ain Ghazal <[email protected]>
test tls trasnport proxy methods

e677f59ab63b999c50fe5df536130d1ec92b9157 authored over 2 years ago by Ain Ghazal <[email protected]>
test handshake with mocks

96294d1d7b221dd759572bd2178e44deeb20d0e7 authored over 2 years ago by Ain Ghazal <[email protected]>
test for muxer.Read

77fe0769f3bf72ea9c1cf2270842406ac7cb3add authored over 2 years ago by Ain Ghazal <[email protected]>
add gosec check

03f361307678362f2dbb4418425487f926c083e7 authored over 2 years ago by Ain Ghazal <[email protected]>
fix gosec errors

1433260abaf1b41d39676478ca9b9c337342ab01 authored over 2 years ago by Ain Ghazal <[email protected]>
add linter target

9a1f7c8205bf8f23757e8357b96ed38acc22dd17 authored over 2 years ago by Ain Ghazal <[email protected]>
add more tests for packet.go

5979b5dcb95429de720cdecfcad8f25aa8cf3e45 authored over 2 years ago by Ain Ghazal <[email protected]>
test readPacket udp, new tls conn

e9a344a084408998f1632e093457a1b40ae72390 authored over 2 years ago by Ain Ghazal <[email protected]>
test tls init

41a73bddecaee3810836b320bf494639e0c4677f authored over 2 years ago by Ain Ghazal <[email protected]>
add coverage check to the pipeline

4a0cf8121f003b709e66c7698695c1ffa4faca20 authored over 2 years ago by Ain Ghazal <[email protected]>
test newMuxer

ac91a59f27e908b34d7f991738e359b12f17ca08 authored over 2 years ago by Ain Ghazal <[email protected]>
simplify dialer

After review today with bassosimone, I think much of the comlexity of
the dialer can be removed....

0a46fd6d856d5c574596a17fd748a0f7d844c42f authored over 2 years ago by Ain Ghazal <[email protected]>
more tests on data

3828d75c0cfe8645062f038d5b675245fedba1b0 authored over 2 years ago by Ain Ghazal <[email protected]>
add -race to the test-short target

3e5c34b12f8ab97802b53e8627ef198b00b25e55 authored over 2 years ago by Ain Ghazal <[email protected]>
test a few more funcs in options.go

9ab7f04a54112fe28f096f7e29da9ed231f8ad4c authored over 2 years ago by Ain Ghazal <[email protected]>
cleanup

d774059a922e9443f393905e9cad3199fe508543 authored over 2 years ago by Ain Ghazal <[email protected]>
vpn.Client is a net.Conn

d4bdff95fc0e1c60961d9772a95deb13bdf78be8 authored over 2 years ago by Ain Ghazal <[email protected]>
tests for decompress

2279fa7208d58a5775f4c6523719ee10ce9b74f3 authored over 2 years ago by Ain Ghazal <[email protected]>
cleanup

721026462659701ac1458c0da0d0cef15de1e75c authored over 2 years ago by Ain Ghazal <[email protected]>