Skip to content
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
20 changes: 1 addition & 19 deletions cmd/deskconn-router/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,35 +370,17 @@ func main() {
}
fmt.Printf("Registered procedure %s\n", procedureRemoveRealm)

yamuxAddress, ok := os.LookupEnv("DESKCONN_ROUTER_YAMUX_ADDRESS")
if !ok || yamuxAddress == "" {
yamuxAddress = "0.0.0.0:8081"
}

registry := newStreamBroker()

server := xconn.NewServer(router, NewAuthenticator(session), &xconn.ServerConfig{
KeepAliveInterval: 30 * time.Second,
KeepAliveTimeout: 10 * time.Second,
})

listener, err := server.ListenAndServeWebSocket(xconn.NetworkTCP, address)
if err != nil {
log.Fatal(err)
}
log.Printf("listening websocket on %s", listener.Addr().String())
log.Printf("listening on %s", listener.Addr().String())
defer listener.Close()

yamuxListener, err := server.ListenAndServeYamux(xconn.NetworkTCP, yamuxAddress)
if err != nil {
log.Fatal(err)
}
log.Printf("listening yamux on %s", yamuxListener.Addr().String())
defer yamuxListener.Close()

go registry.trackDevices(yamuxListener.Conns)
go registry.relayStreams(yamuxListener.Streams)

// Close server if SIGINT (CTRL-c) received.
closeChan := make(chan os.Signal, 1)
signal.Notify(closeChan, os.Interrupt)
Expand Down
172 changes: 0 additions & 172 deletions cmd/deskconn-router/relay.go

This file was deleted.

1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,4 @@ services:
- "host.docker.internal:host-gateway"
ports:
- "8080:8080"
- "8081:8081"
restart: unless-stopped
1 change: 0 additions & 1 deletion example.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
DESKCONN_POSTGRES_HOST=localhost
DESKCONN_POSTGRES_URL=postgres://username:password@${DESKCONN_POSTGRES_HOST}:5432/deskconn_account_service?sslmode=disable&search_path=deskconn
DESKCONN_ROUTER_ADDRESS=localhost:8080
DESKCONN_ROUTER_YAMUX_ADDRESS=localhost:8081
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/joho/godotenv v1.5.1
github.com/sirupsen/logrus v1.9.3
github.com/xconnio/wampproto-go v0.0.0-20251205113711-968e34250b9a
github.com/xconnio/xconn-go v0.1.1-0.20260608144341-36e5dbeba4aa
github.com/xconnio/xconn-go v0.0.0-20251108143232-364781a4f29a
gorm.io/driver/postgres v1.6.0
gorm.io/gorm v1.31.1
)
Expand All @@ -19,7 +19,6 @@ require (
github.com/gobwas/ws v1.4.0 // indirect
github.com/hashicorp/go-immutable-radix/v2 v2.1.0 // indirect
github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/jackc/pgpassfile v1.0.0 // indirect
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
github.com/jackc/pgx/v5 v5.6.0 // indirect
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C
github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro=
github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k=
github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM=
github.com/hashicorp/yamux v0.1.2 h1:XtB8kyFOyHXYVFnwT5C3+Bdo8gArse7j2AQ0DA0Uey8=
github.com/hashicorp/yamux v0.1.2/go.mod h1:C+zze2n6e/7wshOZep2A70/aQU6QBRWJO/G6FT1wIns=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
Expand Down Expand Up @@ -62,8 +60,8 @@ github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/xconnio/wampproto-go v0.0.0-20251205113711-968e34250b9a h1:BKFEdKgWDc01F2gC6ELmA8kclQaax+mN+0bDTWAfJa0=
github.com/xconnio/wampproto-go v0.0.0-20251205113711-968e34250b9a/go.mod h1:k2I4x+dOyJq5XW6SHbnwrqJEuRf/lO9rbF5habINuMM=
github.com/xconnio/xconn-go v0.1.1-0.20260608144341-36e5dbeba4aa h1:0WvSOFkguyD6D5wDzXhu5YVflwlPAE5WhPSIVDR+LJw=
github.com/xconnio/xconn-go v0.1.1-0.20260608144341-36e5dbeba4aa/go.mod h1:SUMn1kdyvQOLKabYyewKFf2gz3hD7FKsRbz3WF607CQ=
github.com/xconnio/xconn-go v0.0.0-20251108143232-364781a4f29a h1:Yj50wOwocWtMZZ7marGK0s1NsRlhZIC1C2sk4xBDX8w=
github.com/xconnio/xconn-go v0.0.0-20251108143232-364781a4f29a/go.mod h1:8tnNmQgOIlEqF/QesbPQMP2NeI42LP/6lIJG6vq4TwQ=
github.com/yusufpapurcu/wmi v1.2.4 h1:zFUKzehAFReQwLys1b/iSMl+JQGSCSjtVqQn9bBrPo0=
github.com/yusufpapurcu/wmi v1.2.4/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
Expand Down
Loading