Skip to content

Commit

Permalink
release modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianosela committed Mar 15, 2024
1 parent 66c2cfd commit 2aa9519
Show file tree
Hide file tree
Showing 36 changed files with 88 additions and 86 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VncProxy [![CircleCI](https://circleci.com/gh/amitbet/vncproxy/tree/master.svg?style=shield)](https://circleci.com/gh/amitbet/vncproxy/tree/master) [![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/CircleCI-Public/circleci-demo-go/master/LICENSE.md)
# VncProxy [![CircleCI](https://circleci.com/gh/adrianosela/vncproxy/tree/master.svg?style=shield)](https://circleci.com/gh/adrianosela/vncproxy/tree/master) [![MIT Licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/CircleCI-Public/circleci-demo-go/master/LICENSE.md)

An RFB proxy, written in go that can save and replay FBS files
* Supports all modern encodings & most useful pseudo-encodings
Expand Down Expand Up @@ -42,7 +42,7 @@ An RFB proxy, written in go that can save and replay FBS files

## **Architecture**

![Image of Arch](https://github.com/amitbet/vncproxy/blob/master/architecture/proxy-arch.png?raw=true)
![Image of Arch](https://github.com/adrianosela/vncproxy/blob/master/architecture/proxy-arch.png?raw=true)

Communication to vnc-server & vnc-client are done in the RFB binary protocol in the standard ways.
Internal communication inside the proxy is done by listeners (a pub-sub system) that provide a stream of bytes, parsed by delimiters which provide information about RFB message start & type / rectangle start / communication closed, etc.
Expand All @@ -61,6 +61,6 @@ This listener system was chosen over direct use of channels, since it allows the
The Recorder uses channels and runs in parallel to avoid hampering the communication through the proxy.


![Image of Arch](https://github.com/amitbet/vncproxy/blob/master/architecture/player-arch.png?raw=true)
![Image of Arch](https://github.com/adrianosela/vncproxy/blob/master/architecture/player-arch.png?raw=true)

The code is based on several implementations of go-vnc including the original one by *Mitchell Hashimoto*, and the recentely active fork by *Vasiliy Tolstov*.
4 changes: 2 additions & 2 deletions client/client-conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"encoding/binary"
"fmt"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
"io"
"net"
"unicode"
Expand Down
2 changes: 1 addition & 1 deletion client/pixel-format.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

func readPixelFormat(r io.Reader, result *common.PixelFormat) error {
Expand Down
6 changes: 3 additions & 3 deletions client/server-messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"fmt"
"io"
"strings"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/encodings"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/encodings"
"github.com/adrianosela/vncproxy/logger"
)

// MsgFramebufferUpdate consists of a sequence of rectangles of
Expand Down
4 changes: 2 additions & 2 deletions client/write-to.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package client

import (
"io"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
)

type WriteTo struct {
Expand Down
2 changes: 1 addition & 1 deletion common/rfb-reader-helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"encoding/binary"
"errors"
"io"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/logger"
)

var TightMinToCompress = 12
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-copy-rect.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package encodings
import (
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type CopyRectEncoding struct {
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-corre.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package encodings
import (
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type CoRREEncoding struct {
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-cursor-pseudo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package encodings
import (
"io"
"math"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type EncCursorPseudo struct {
Expand Down
4 changes: 2 additions & 2 deletions encodings/enc-hextile.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package encodings

import (
"io"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions encodings/enc-led-state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package encodings

import (
"io"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
)

type EncLedStatePseudo struct {
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-pseudo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package encodings

import (
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type PseudoEncoding struct {
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package encodings
import (
"bytes"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

// RawEncoding is raw pixel data sent by the server.
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-rre.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package encodings
import (
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type RREEncoding struct {
Expand Down
4 changes: 2 additions & 2 deletions encodings/enc-tight.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"bytes"
"errors"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
)

var TightMinToCompress int = 12
Expand Down
4 changes: 2 additions & 2 deletions encodings/enc-tightpng.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package encodings
import (
"fmt"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
)

type TightPngEncoding struct {
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-zlib.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type ZLibEncoding struct {
Expand Down
2 changes: 1 addition & 1 deletion encodings/enc-zrle.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"bytes"
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

type ZRLEEncoding struct {
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/amitbet/vncproxy
module github.com/adrianosela/vncproxy

go 1.22.0

require golang.org/x/net v0.0.0-20181129055619-fae4c4e3ad76
14 changes: 7 additions & 7 deletions player/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"flag"
"fmt"
"os"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/encodings"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/player"
"github.com/amitbet/vncproxy/server"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/encodings"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/player"
"github.com/adrianosela/vncproxy/server"
)

func main() {
Expand Down Expand Up @@ -64,8 +64,8 @@ func main() {
}

cfg.NewConnHandler = func(cfg *server.ServerConfig, conn *server.ServerConn) error {
//fbs, err := loadFbsFile("/Users/amitbet/Dropbox/recording.rbs", conn)
//fbs, err := loadFbsFile("/Users/amitbet/vncRec/recording.rbs", conn)
//fbs, err := loadFbsFile("/Users/adrianosela/Dropbox/recording.rbs", conn)
//fbs, err := loadFbsFile("/Users/adrianosela/vncRec/recording.rbs", conn)
fbs, err := player.ConnectFbsFile(*fbsFile, conn)

if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions player/fbs-play-listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (

"io"
"time"
"github.com/amitbet/vncproxy/client"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/server"
"github.com/adrianosela/vncproxy/client"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/server"
)

type VncStreamFileReader interface {
Expand All @@ -33,7 +33,7 @@ func ConnectFbsFile(filename string, conn *server.ServerConn) (*FbsReader, error
logger.Error("failed to open fbs reader:", err)
return nil, err
}
//NewFbsReader("/Users/amitbet/vncRec/recording.rbs")
//NewFbsReader("/Users/adrianosela/vncRec/recording.rbs")
initMsg, err := fbs.ReadStartSession()
if err != nil {
logger.Error("failed to open read fbs start session:", err)
Expand Down
6 changes: 3 additions & 3 deletions player/fbs-reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"encoding/binary"
"io"
"os"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/encodings"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/encodings"
"github.com/adrianosela/vncproxy/logger"
)

type FbsReader struct {
Expand Down
14 changes: 7 additions & 7 deletions player/player_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"testing"
"time"

"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/encodings"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/server"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/encodings"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/server"
)

func TestServer(t *testing.T) {
Expand Down Expand Up @@ -41,9 +41,9 @@ func TestServer(t *testing.T) {
}

cfg.NewConnHandler = func(cfg *server.ServerConfig, conn *server.ServerConn) error {
//fbs, err := loadFbsFile("/Users/amitbet/Dropbox/recording.rbs", conn)
//fbs, err := loadFbsFile("/Users/amitbet/vncRec/recording.rbs", conn)
fbs, err := ConnectFbsFile("/Users/amitbet/vncRec/recording.rbs", conn)
//fbs, err := loadFbsFile("/Users/adrianosela/Dropbox/recording.rbs", conn)
//fbs, err := loadFbsFile("/Users/adrianosela/vncRec/recording.rbs", conn)
fbs, err := ConnectFbsFile("/Users/adrianosela/vncRec/recording.rbs", conn)

if err != nil {
logger.Error("TestServer.NewConnHandler: Error in loading FBS: ", err)
Expand Down
4 changes: 2 additions & 2 deletions proxy/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"path/filepath"

"github.com/amitbet/vncproxy/logger"
vncproxy "github.com/amitbet/vncproxy/proxy"
"github.com/adrianosela/vncproxy/logger"
vncproxy "github.com/adrianosela/vncproxy/proxy"
)

func main() {
Expand Down
8 changes: 4 additions & 4 deletions proxy/message-listeners.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package proxy

import (
"github.com/amitbet/vncproxy/client"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/server"
"github.com/adrianosela/vncproxy/client"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/server"
)

type ClientUpdater struct {
Expand Down
14 changes: 7 additions & 7 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import (
"sync"
"time"

"github.com/amitbet/vncproxy/client"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/encodings"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/player"
listeners "github.com/amitbet/vncproxy/recorder"
"github.com/amitbet/vncproxy/server"
"github.com/adrianosela/vncproxy/client"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/encodings"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/player"
listeners "github.com/adrianosela/vncproxy/recorder"
"github.com/adrianosela/vncproxy/server"
)

type VncProxy struct {
Expand Down
12 changes: 6 additions & 6 deletions recorder/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import (
"net"
"os"
"time"
"github.com/amitbet/vncproxy/client"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/encodings"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/recorder"
"github.com/adrianosela/vncproxy/client"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/encodings"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/recorder"
)

func main() {
Expand Down Expand Up @@ -58,7 +58,7 @@ func main() {
//vncSrvMessagesChan := make(chan common.ServerMessage)

//rec, err := recorder.NewRecorder("c:/Users/betzalel/recording.rbs")
rec, err := recorder.NewRecorder(*recordDir) //"/Users/amitbet/vncRec/recording.rbs")
rec, err := recorder.NewRecorder(*recordDir) //"/Users/adrianosela/vncRec/recording.rbs")
if err != nil {
logger.Errorf("error creating recorder: %s", err)
return
Expand Down
6 changes: 3 additions & 3 deletions recorder/recorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"encoding/binary"
"os"
"time"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/amitbet/vncproxy/server"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
"github.com/adrianosela/vncproxy/server"
)

type Recorder struct {
Expand Down
6 changes: 3 additions & 3 deletions recorder/rfb-requester.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package recorder

import (
"time"
"github.com/amitbet/vncproxy/client"
"github.com/amitbet/vncproxy/common"
"github.com/amitbet/vncproxy/logger"
"github.com/adrianosela/vncproxy/client"
"github.com/adrianosela/vncproxy/common"
"github.com/adrianosela/vncproxy/logger"
)

type RfbRequester struct {
Expand Down
2 changes: 1 addition & 1 deletion server/client-messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package server
import (
"encoding/binary"
"io"
"github.com/amitbet/vncproxy/common"
"github.com/adrianosela/vncproxy/common"
)

// Key represents a VNC key press.
Expand Down
Loading

0 comments on commit 2aa9519

Please sign in to comment.