Skip to content

Commit

Permalink
revert 554cee5
Browse files Browse the repository at this point in the history
  • Loading branch information
sakai135 committed Jul 29, 2022
1 parent 5e600da commit 4bdb97c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 151 deletions.
13 changes: 0 additions & 13 deletions cmd/gvproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ package main

import (
"context"
"fmt"
"os"
"os/signal"
"syscall"

"github.com/containers/gvisor-tap-vsock/pkg/types"
"github.com/containers/gvisor-tap-vsock/pkg/virtualnetwork"
"github.com/pkg/errors"
"github.com/sakai135/wsl-vpnkit/pkg/services/dns"
"github.com/sakai135/wsl-vpnkit/pkg/transport"
log "github.com/sirupsen/logrus"
"golang.org/x/sync/errgroup"
Expand Down Expand Up @@ -71,17 +69,6 @@ func run(ctx context.Context, g *errgroup.Group, configuration *types.Configurat
return err
}

lnDns, err := vn.Listen("tcp", fmt.Sprintf("%s:53", configuration.GatewayIP))
if err != nil {
return err
}
go func() {
err := dns.ServeListener(lnDns, configuration.DNS)
if err != nil {
log.Error(err)
}
}()

conn := transport.GetStdioConn()
err = vn.AcceptQemu(ctx, conn)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion distro/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN go-licenses save ./cmd/gvproxy --save_path ./licenses/gvproxy && \
go-licenses save ./cmd/vm --save_path ./licenses/vm

FROM alpine:3.15.4
RUN apk add --no-cache openrc iptables bind-tools && \
RUN apk add --no-cache openrc iptables && \
apk list --installed
ARG REF=https://example.com/
ARG VERSION=v0.0.0
Expand Down
112 changes: 0 additions & 112 deletions pkg/services/dns/dns.go

This file was deleted.

19 changes: 0 additions & 19 deletions pkg/services/dns/tcp.go

This file was deleted.

11 changes: 5 additions & 6 deletions wsl-vpnkit
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ check_ping () {

check_dns () {
TYPE=$([ "$1" = "4" ] && echo 'A' || echo 'AAAA')
PROTOCOL=$([ "$4" = "tcp" ] && echo 'tcp' || echo 'notcp')
dig $TYPE $2 @$3 +$PROTOCOL +timeout=1 >/dev/null && \
echo "check: ✔️ dig success for $2 $TYPE $PROTOCOL using $3" || \
echo "check: ❌ dig fail for $2 $TYPE $PROTOCOL using $3"
nslookup -type=$TYPE $2 $3 >/dev/null && \
echo "check: ✔️ nslookup success for $2 $TYPE using $3" || \
echo "check: ❌ nslookup fail for $2 $TYPE using $3"
}

check_https () {
Expand All @@ -140,10 +139,10 @@ check () {
check_dns 4 $CHECK_HOST $VPNKIT_GATEWAY_IP
check_dns 4 $CHECK_HOST $WSL2_GATEWAY_IP
check_dns 4 $CHECK_HOST $CHECK_DNS
check_dns 4 $CHECK_HOST $DNS_IP tcp
check_dns 4 $CHECK_HOST $CHECK_DNS tcp
check_ping 4 'external host' $CHECK_HOST
check_dns 6 $CHECK_HOST $DNS_IP
check_dns 6 $CHECK_HOST $VPNKIT_GATEWAY_IP
check_dns 6 $CHECK_HOST $WSL2_GATEWAY_IP
check_dns 6 $CHECK_HOST $CHECK_DNS
check_ping 6 'external host' $CHECK_HOST
check_https "https://$CHECK_HOST"
Expand Down

0 comments on commit 4bdb97c

Please sign in to comment.