mirror of
https://github.com/amitbet/vncproxy.git
synced 2025-05-01 20:33:31 +00:00
Merge pull request #9 from exoscale/go-mod-compatible
global: make the whole package go mod ready
This commit is contained in:
commit
33be77dedc
client
common
encodings
enc-copy-rect.goenc-corre.goenc-cursor-pseudo.goenc-hextile.goenc-led-state.goenc-pseudo.goenc-raw.goenc-rre.goenc-tight.goenc-tightpng.goenc-zlib.goenc-zrle.go
go.modgo.sumplayer
proxy
recorder
server
@ -7,8 +7,8 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
"unicode"
|
"unicode"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A ServerMessage implements a message sent from the server to the client.
|
// A ServerMessage implements a message sent from the server to the client.
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
func readPixelFormat(r io.Reader, result *common.PixelFormat) error {
|
func readPixelFormat(r io.Reader, result *common.PixelFormat) error {
|
||||||
|
@ -6,9 +6,9 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgFramebufferUpdate consists of a sequence of rectangles of
|
// MsgFramebufferUpdate consists of a sequence of rectangles of
|
||||||
|
@ -2,8 +2,8 @@ package client
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type WriteTo struct {
|
type WriteTo struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var TightMinToCompress = 12
|
var TightMinToCompress = 12
|
||||||
|
@ -3,7 +3,7 @@ package encodings
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CopyRectEncoding struct {
|
type CopyRectEncoding struct {
|
||||||
|
@ -3,7 +3,7 @@ package encodings
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CoRREEncoding struct {
|
type CoRREEncoding struct {
|
||||||
|
@ -3,7 +3,7 @@ package encodings
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type EncCursorPseudo struct {
|
type EncCursorPseudo struct {
|
||||||
|
@ -2,8 +2,8 @@ package encodings
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -2,8 +2,8 @@ package encodings
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type EncLedStatePseudo struct {
|
type EncLedStatePseudo struct {
|
||||||
|
@ -2,7 +2,7 @@ package encodings
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type PseudoEncoding struct {
|
type PseudoEncoding struct {
|
||||||
|
@ -3,7 +3,7 @@ package encodings
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RawEncoding is raw pixel data sent by the server.
|
// RawEncoding is raw pixel data sent by the server.
|
||||||
|
@ -3,7 +3,7 @@ package encodings
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RREEncoding struct {
|
type RREEncoding struct {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
var TightMinToCompress int = 12
|
var TightMinToCompress int = 12
|
||||||
|
@ -3,8 +3,8 @@ package encodings
|
|||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type TightPngEncoding struct {
|
type TightPngEncoding struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ZLibEncoding struct {
|
type ZLibEncoding struct {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ZRLEEncoding struct {
|
type ZRLEEncoding struct {
|
||||||
|
3
go.mod
Normal file
3
go.mod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module github.com/amitbet/vncproxy
|
||||||
|
|
||||||
|
require golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76
|
2
go.sum
Normal file
2
go.sum
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76 h1:xx5MUFyRQRbPk6VjWjIE1epE/K5AoDD8QUN116NCy8k=
|
||||||
|
golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
@ -4,11 +4,11 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/player"
|
"github.com/amitbet/vncproxy/player"
|
||||||
"vncproxy/server"
|
"github.com/amitbet/vncproxy/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -5,10 +5,10 @@ import (
|
|||||||
|
|
||||||
"io"
|
"io"
|
||||||
"time"
|
"time"
|
||||||
"vncproxy/client"
|
"github.com/amitbet/vncproxy/client"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/server"
|
"github.com/amitbet/vncproxy/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VncStreamFileReader interface {
|
type VncStreamFileReader interface {
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type FbsReader struct {
|
type FbsReader struct {
|
||||||
|
@ -3,10 +3,10 @@ package player
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/server"
|
"github.com/amitbet/vncproxy/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestServer(t *testing.T) {
|
func TestServer(t *testing.T) {
|
||||||
|
@ -4,8 +4,8 @@ import (
|
|||||||
"flag"
|
"flag"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
vncproxy "vncproxy/proxy"
|
vncproxy "github.com/amitbet/vncproxy/proxy"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
package proxy
|
package proxy
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"vncproxy/client"
|
"github.com/amitbet/vncproxy/client"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/server"
|
"github.com/amitbet/vncproxy/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ClientUpdater struct {
|
type ClientUpdater struct {
|
||||||
|
@ -5,13 +5,13 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
"vncproxy/client"
|
"github.com/amitbet/vncproxy/client"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/player"
|
"github.com/amitbet/vncproxy/player"
|
||||||
listeners "vncproxy/recorder"
|
listeners "github.com/amitbet/vncproxy/recorder"
|
||||||
"vncproxy/server"
|
"github.com/amitbet/vncproxy/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
type VncProxy struct {
|
type VncProxy struct {
|
||||||
|
@ -5,11 +5,11 @@ import (
|
|||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
"vncproxy/client"
|
"github.com/amitbet/vncproxy/client"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/recorder"
|
"github.com/amitbet/vncproxy/recorder"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
@ -5,9 +5,9 @@ import (
|
|||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
"vncproxy/server"
|
"github.com/amitbet/vncproxy/server"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Recorder struct {
|
type Recorder struct {
|
||||||
|
@ -2,9 +2,9 @@ package recorder
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
"vncproxy/client"
|
"github.com/amitbet/vncproxy/client"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RfbRequester struct {
|
type RfbRequester struct {
|
||||||
|
@ -3,7 +3,7 @@ package server
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Key represents a VNC key press.
|
// Key represents a VNC key press.
|
||||||
|
@ -3,10 +3,10 @@ package server
|
|||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
"fmt"
|
"fmt"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
|
|
||||||
"io"
|
"io"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
const ProtoVersionLength = 12
|
const ProtoVersionLength = 12
|
||||||
|
@ -6,7 +6,7 @@ import (
|
|||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"errors"
|
"errors"
|
||||||
"log"
|
"log"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SecurityType uint8
|
type SecurityType uint8
|
||||||
|
@ -5,8 +5,8 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"sync"
|
"sync"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ServerConn struct {
|
type ServerConn struct {
|
||||||
|
@ -5,7 +5,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
var DefaultClientMessages = []common.ClientMessage{
|
var DefaultClientMessages = []common.ClientMessage{
|
||||||
|
@ -3,8 +3,8 @@ package server
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"testing"
|
"testing"
|
||||||
"vncproxy/common"
|
"github.com/amitbet/vncproxy/common"
|
||||||
"vncproxy/encodings"
|
"github.com/amitbet/vncproxy/encodings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func newServerConnHandler(cfg *ServerConfig, conn *ServerConn) error {
|
func newServerConnHandler(cfg *ServerConfig, conn *ServerConn) error {
|
||||||
|
@ -4,7 +4,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
"vncproxy/logger"
|
"github.com/amitbet/vncproxy/logger"
|
||||||
|
|
||||||
"golang.org/x/net/websocket"
|
"golang.org/x/net/websocket"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user