Skip to content

Commit

Permalink
Changed the protocol for messages exchange to WebSocket
Browse files Browse the repository at this point in the history
Changed the protocol for messages exchange, it now uses WebSocket internally.
This change allows running `udptlspipe` server behind a CDN if that CDN
supports WebSocket.
  • Loading branch information
ameshkov committed Feb 5, 2024
1 parent 5c407c0 commit c3177c1
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 128 deletions.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,15 @@ adheres to [Semantic Versioning][semver].

## [Unreleased]

[unreleased]: https://github.com/ameshkov/udptlspipe/compare/v1.1.0...HEAD
[unreleased]: https://github.com/ameshkov/udptlspipe/compare/v1.2.0...HEAD

## [1.2.0] - 2024-02-05

* Changed the protocol for messages exchange, it now uses WebSocket internally.
This change allows running `udptlspipe` server behind a CDN if that CDN
supports WebSocket.

[1.2.0]: https://github.com/ameshkov/udptlspipe/releases/tag/v1.2.0

## [1.1.0] - 2024-02-03

Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@ to keep it that way.

* Cross-platform (Windows/macOS/Linux/Android/*BSD).
* Simple configuration, no complicated configuration files.
* Mimics Google Chrome's TLS ClientHello.
* Mimics Android's okhttp library.
* Active probing protection in server mode.
* Suitable to wrap WireGuard, OpenVPN, and other UDP session.
* Uses WebSocket for data transfer so can be behind
[a CDN that supports WS][cdnwebsocket].

[cdnwebsocket]: https://www.cdnplanet.com/guides/websockets/

<a id="why"></a>

Expand Down Expand Up @@ -226,5 +230,6 @@ Help Options:
* [X] Docker image.
* [X] Certificate configuration.
* [ ] Use WebSocket for transport instead of the custom binary proto.
* [X] Use WebSocket for transport instead of the custom binary proto.
* [ ] Use several upstream connections instead of a single one.
* [ ] Automatic TLS certs generation (let's encrypt, lego).
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,24 @@ go 1.21.6

require (
github.com/AdguardTeam/golibs v0.20.0
github.com/gobwas/ws v1.3.2
github.com/jessevdk/go-flags v1.5.0
github.com/refraction-networking/utls v1.6.2
github.com/stretchr/testify v1.8.4
golang.org/x/net v0.20.0
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gobwas/httphead v0.1.0 // indirect
github.com/gobwas/pool v0.2.1 // indirect
github.com/klauspost/compress v1.17.4 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/quic-go/quic-go v0.40.1 // indirect
golang.org/x/crypto v0.18.0 // indirect
golang.org/x/sys v0.16.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ=
github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI=
github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls=
github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU=
github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM=
github.com/gobwas/pool v0.2.1 h1:xfeeEhW7pwmX8nuLVlqbzVc7udMDrwetjEv+TZIz1og=
github.com/gobwas/pool v0.2.1/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
github.com/gobwas/ws v1.3.2 h1:zlnbNHxumkRvfPWgfXu8RBwyNR1x8wh9cf5PTOCqs9Q=
github.com/gobwas/ws v1.3.2/go.mod h1:hRKAFb8wOxFROYNsT1bqfWnhX+b5MFeJM9r2ZSwg/KY=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
Expand Down Expand Up @@ -43,6 +49,7 @@ golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1m
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
Expand Down
3 changes: 1 addition & 2 deletions internal/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ import (
"syscall"
"time"

tls "github.com/refraction-networking/utls"

"github.com/AdguardTeam/golibs/log"
"github.com/ameshkov/udptlspipe/internal/pipe"
"github.com/ameshkov/udptlspipe/internal/version"
goFlags "github.com/jessevdk/go-flags"
tls "github.com/refraction-networking/utls"
)

// Main is the entry point for the command-line tool.
Expand Down
Loading

0 comments on commit c3177c1

Please sign in to comment.