feat(vpn服务器): VPN 服务器的简单实现
WebSocket的数据写入网卡,将网卡读取的数据写入WebSocket
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -1,13 +1,20 @@
|
||||
from docker.yuchat.top/golang:1.21-alpine AS builder
|
||||
workdir /app
|
||||
COPY . .
|
||||
RUN go mod tidy && go build -o yuchat-proxy-server server/main.go
|
||||
RUN echo "nameserver 114.114.114.114" > /etc/resolv.conf
|
||||
RUN apk add --no-cache \
|
||||
libpcap-dev \
|
||||
build-base
|
||||
|
||||
RUN go mod tidy
|
||||
RUN go build -o yuchat-proxy-server server/main.go
|
||||
|
||||
from docker.yuchat.top/alpine:3.11
|
||||
|
||||
workdir /app
|
||||
expose 8080
|
||||
|
||||
RUN echo "nameserver 114.114.114.114" > /etc/resolv.conf
|
||||
RUN apk add --no-cache libpcap
|
||||
copy --from=builder /app/yuchat-proxy-server /app/yuchat-proxy-server
|
||||
|
||||
entrypoint ["./yuchat-proxy-server"]
|
||||
Reference in New Issue
Block a user