minor fixes
* fix #4 * fix examples * update go module Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
1dfe199fe9
commit
b1cfa9ee45
2
LICENSE
2
LICENSE
@ -3,7 +3,7 @@ MIT License
|
||||
Copyright (c) 2013 Mitchell Hashimoto
|
||||
Copyright (c) 2016-2017 Kate Ward
|
||||
Copyright (c) 2017 Vasiliy Tolstov
|
||||
Copyright (c) 2018 sdstack
|
||||
Copyright (c) 2018 unistack
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
vnc "github.com/sdstack/go-rfb"
|
||||
vnc "github.com/unistack-org/go-rfb"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -27,7 +27,7 @@ func main() {
|
||||
PixelFormat: vnc.PixelFormat32bit,
|
||||
ClientMessageCh: cchClient,
|
||||
ServerMessageCh: cchServer,
|
||||
ServerMessages: vnc.DefaultServerMessages,
|
||||
Messages: vnc.DefaultServerMessages,
|
||||
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
|
||||
ErrorCh: errorCh,
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
vnc "github.com/sdstack/go-rfb"
|
||||
vnc "github.com/unistack-org/go-rfb"
|
||||
)
|
||||
|
||||
type Auth struct {
|
||||
@ -53,7 +53,7 @@ func newConn(hostport string, password []byte) (vnc.Conn, chan vnc.ClientMessage
|
||||
PixelFormat: vnc.PixelFormat32bit,
|
||||
ClientMessageCh: cchClient,
|
||||
ServerMessageCh: cchServer,
|
||||
ServerMessages: vnc.DefaultServerMessages,
|
||||
Messages: vnc.DefaultServerMessages,
|
||||
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
|
||||
ErrorCh: errorCh,
|
||||
}
|
||||
@ -78,7 +78,7 @@ func handleIO(cli vnc.Conn, inp chan vnc.ClientMessage, out chan vnc.ServerMessa
|
||||
ccfg := cli.Config().(*vnc.ClientConfig)
|
||||
defer cli.Close()
|
||||
var conns []vnc.Conn
|
||||
var prepared bool
|
||||
//var prepared bool
|
||||
|
||||
for {
|
||||
select {
|
||||
@ -247,7 +247,7 @@ func main() {
|
||||
PixelFormat: vnc.PixelFormat32bit,
|
||||
ClientMessageCh: schClient,
|
||||
ServerMessageCh: schServer,
|
||||
ClientMessages: vnc.DefaultClientMessages,
|
||||
Messages: vnc.DefaultClientMessages,
|
||||
DesktopName: []byte("vnc proxy"),
|
||||
}
|
||||
scfg.Handlers = append(scfg.Handlers, vnc.DefaultServerHandlers...)
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
vnc "github.com/sdstack/go-rfb"
|
||||
vnc "github.com/unistack-org/go-rfb"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@ -26,18 +26,15 @@ func main() {
|
||||
defer tick.Stop()
|
||||
|
||||
cfg := &vnc.ServerConfig{
|
||||
Width: 800,
|
||||
Height: 600,
|
||||
VersionHandler: vnc.ServerVersionHandler,
|
||||
SecurityHandler: vnc.ServerSecurityHandler,
|
||||
SecurityHandlers: []vnc.SecurityHandler{&vnc.ClientAuthNone{}},
|
||||
ClientInitHandler: vnc.ServerClientInitHandler,
|
||||
ServerInitHandler: vnc.ServerServerInitHandler,
|
||||
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
|
||||
PixelFormat: vnc.PixelFormat32bit,
|
||||
ClientMessageCh: chServer,
|
||||
ServerMessageCh: chClient,
|
||||
ClientMessages: vnc.DefaultClientMessages,
|
||||
Width: 800,
|
||||
Height: 600,
|
||||
Handlers: vnc.DefaultServerHandlers,
|
||||
SecurityHandlers: []vnc.SecurityHandler{&vnc.ClientAuthNone{}},
|
||||
Encodings: []vnc.Encoding{&vnc.RawEncoding{}},
|
||||
PixelFormat: vnc.PixelFormat32bit,
|
||||
ClientMessageCh: chServer,
|
||||
ServerMessageCh: chClient,
|
||||
Messages: vnc.DefaultClientMessages,
|
||||
}
|
||||
go vnc.Serve(context.Background(), ln, cfg)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user