mirror of
https://github.com/bolkedebruin/rdpgw.git
synced 2026-03-27 22:46:37 +00:00
Testing
This commit is contained in:
@@ -143,6 +143,7 @@ func (s *Server) Process(ctx context.Context) error {
|
|||||||
go forward(s.Remote, s.Session.TransportOut)
|
go forward(s.Remote, s.Session.TransportOut)
|
||||||
s.State = SERVER_STATE_CHANNEL_CREATE
|
s.State = SERVER_STATE_CHANNEL_CREATE
|
||||||
case PKT_TYPE_DATA:
|
case PKT_TYPE_DATA:
|
||||||
|
log.Printf("Data received")
|
||||||
if s.State < SERVER_STATE_CHANNEL_CREATE {
|
if s.State < SERVER_STATE_CHANNEL_CREATE {
|
||||||
log.Printf("Data received while in wrong state %d != %d", s.State, SERVER_STATE_CHANNEL_CREATE)
|
log.Printf("Data received while in wrong state %d != %d", s.State, SERVER_STATE_CHANNEL_CREATE)
|
||||||
return errors.New("wrong state")
|
return errors.New("wrong state")
|
||||||
@@ -167,6 +168,8 @@ func (s *Server) Process(ctx context.Context) error {
|
|||||||
s.Session.TransportIn.Close()
|
s.Session.TransportIn.Close()
|
||||||
s.Session.TransportOut.Close()
|
s.Session.TransportOut.Close()
|
||||||
s.State = SERVER_STATE_CLOSED
|
s.State = SERVER_STATE_CLOSED
|
||||||
|
log.Printf("Channel closed")
|
||||||
|
return nil
|
||||||
default:
|
default:
|
||||||
log.Printf("Unknown packet (size %d): %x", sz, pkt)
|
log.Printf("Unknown packet (size %d): %x", sz, pkt)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ RUN adduser --disabled-password --gecos "" --home /opt/rdpgw --uid 1001 rdpgw
|
|||||||
# build rdpgw and set rights
|
# build rdpgw and set rights
|
||||||
RUN git clone https://github.com/bolkedebruin/rdpgw.git /app && \
|
RUN git clone https://github.com/bolkedebruin/rdpgw.git /app && \
|
||||||
cd /app && \
|
cd /app && \
|
||||||
go mod tidy && \
|
go mod tidy -compat=1.17 && \
|
||||||
CGO_ENABLED=0 GOOS=linux go build -trimpath -tags '' -ldflags '' -o '/opt/rdpgw/rdpgw' ./cmd/rdpgw && \
|
CGO_ENABLED=0 GOOS=linux go build -trimpath -tags '' -ldflags '' -o '/opt/rdpgw/rdpgw' ./cmd/rdpgw && \
|
||||||
chmod +x /opt/rdpgw/rdpgw && \
|
chmod +x /opt/rdpgw/rdpgw && \
|
||||||
chown -R 1001 /opt/rdpgw
|
chown -R 1001 /opt/rdpgw
|
||||||
|
|||||||
Reference in New Issue
Block a user