Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix VPN issues on CI and Windows #1703

Merged
merged 4 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docker/images/visor/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

if type apt >/dev/null; then
apt-get update && apt-get install -y --no-install-recommends \
ca-certificates &&
ca-certificates iptables &&
rm -rf /var/lib/apt/lists/*
fi

if type apk >/dev/null; then
apk update
apk add --no-cache ca-certificates openssl iproute2 bash
apk add --no-cache ca-certificates openssl iproute2 bash iptables
update-ca-certificates --fresh
fi
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
golang.org/x/net v0.14.0
golang.org/x/sync v0.3.0
golang.org/x/sys v0.11.0
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1
golang.zx2c4.com/wireguard v0.0.0-20230223181233-21636207a675
)

require (
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 h1:B82qJJgjvYKsXS9jeunTOisW56dUokqW/FOteYJJ/yg=
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2/go.mod h1:deeaetjYA+DHMHg+sMSMI58GrEteJUUzzw7en6TJQcI=
golang.zx2c4.com/wireguard v0.0.0-20230223181233-21636207a675 h1:/J/RVnr7ng4fWPRH3xa4WtBJ1Jp+Auu4YNLmGiPv5QU=
golang.zx2c4.com/wireguard v0.0.0-20230223181233-21636207a675/go.mod h1:whfbyDBt09xhCYQWtO2+3UVjlaq6/9hDZrjg2ZE6SyA=
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1 h1:EY138uSo1JYlDq+97u1FtcOUwPpIU6WL1Lkt7WpYjPA=
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1/go.mod h1:tqur9LnfstdR9ep2LaJT4lFUl0EjlHtge+gAjmsHUG4=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
Expand Down
6 changes: 2 additions & 4 deletions internal/vpn/tun_device_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,11 @@ func newTUNDevice() (TUNDevice, error) {
}

func (t *tunDevice) Read(buf []byte) (int, error) {
validBuf := [][]byte{buf}
return t.tun.Read(validBuf, []int{len(buf) + 1}, 0)
return t.tun.Read(buf, 0)
}

func (t *tunDevice) Write(buf []byte) (int, error) {
validBuf := [][]byte{buf}
return t.tun.Write(validBuf, 0)
return t.tun.Write(buf, 0)
}

func (t *tunDevice) Close() error {
Expand Down
6 changes: 2 additions & 4 deletions scripts/win_installer/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
<Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>

<Upgrade Id="cd7955bc-304e-470f-9c24-eb9f429a8085">
<UpgradeVersion Minimum="1.0.0" OnlyDetect="yes" Property="NEWERVERSIONDETECTED"/>
<UpgradeVersion Minimum="0.0.0" Maximum="1.0.0" IncludeMinimum="yes" IncludeMaximum="no"
Property="OLDERVERSIONBEINGUPGRADED"/>
<UpgradeVersion Minimum="1.3.14" OnlyDetect="yes" IncludeMaximum="yes" Property="NEWERVERSIONDETECTED"/>=
</Upgrade>
<Condition Message="A newer version of this software is already installed.">NOT NEWERVERSIONDETECTED</Condition>
<Condition Message="A newer version of this software is already installed.">NEWERVERSIONDETECTED</Condition>

<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)">
Expand Down
Loading
Loading