Skip to content

Commit fd493db

Browse files
bmartins-unitip-rwdependabot[bot]Rajpratik71jpillora
authored andcommitted
RDNET-798 update chisel from upstream (#5)
* Set ServerName (SNI) to *hostname. Useful for spoofing our way through restrictive gateways. * Bump actions/checkout from 2 to 3.1.0 Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3.1.0) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Added --sni switch to control the ServerName when connecting with TLS. Makes 'domain fronting' possible. * feat: dependabot workflow automation for updating dependency Signed-off-by: Pratik Raj <[email protected]> * Bump github.com/fsnotify/fsnotify from 1.4.9 to 1.6.0 (jpillora#389) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * UDP buffer size override with CHISEL_UDP_MAX_SIZE environment variable (jpillora#367) * Add locking around the connection count to fix a data race. (jpillora#342) Co-authored-by: andres-portainer <[email protected]> * fix: small typo error in main.go (jpillora#334) * Respond to /health and /version by request path rather than by the whole url string (jpillora#328) Co-authored-by: bar <[email protected]> * Update version.go (jpillora#288) * Providing chisel's client with a logger level (jpillora#281) Co-authored-by: Barak Sharoni <[email protected]> Co-authored-by: barak-sharoni-velocity <[email protected]> * add EnvBool * Fix jpillora#390: Use code to generate certificates for client & server (jpillora#400) * docker alpine->google-distroless * docker to use scratch * Fix missing NetDialContext: c.config.DialContext (jpillora#398) * actions: setup go v3 * switch to scratch image * update dependabot * move chisel to flyio * update from upstream --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Pratik Raj <[email protected]> Co-authored-by: ip-rw <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pratik Raj <[email protected]> Co-authored-by: Jaime Pillora <[email protected]> Co-authored-by: fsiegmund <[email protected]> Co-authored-by: andres-portainer <[email protected]> Co-authored-by: andres-portainer <[email protected]> Co-authored-by: 0xflotus <[email protected]> Co-authored-by: BigSully <[email protected]> Co-authored-by: bar <[email protected]> Co-authored-by: invist <[email protected]> Co-authored-by: zuzgon <[email protected]> Co-authored-by: Barak Sharoni <[email protected]> Co-authored-by: barak-sharoni-velocity <[email protected]> Co-authored-by: Jaime Pillora <[email protected]> Co-authored-by: Guillaume SMAHA <[email protected]>
1 parent bfe919a commit fd493db

File tree

4 files changed

+24
-29
lines changed

4 files changed

+24
-29
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,26 +11,24 @@ jobs:
1111
name: Build & Test
1212
strategy:
1313
matrix:
14-
# optionally test/build across multiple platforms/Go-versions
15-
go-version: ["stable"] # '1.16', '1.17', '1.18,
14+
go-version: [1.18.x, 1.19.x]
1615
platform: [ubuntu-latest, macos-latest, windows-latest]
1716
runs-on: ${{ matrix.platform }}
1817
steps:
19-
- name: Checkout
20-
uses: actions/checkout@v3
21-
with:
22-
fetch-depth: 0
23-
- name: Set up Go
18+
- name: Install Go
2419
uses: actions/setup-go@v3
2520
with:
2621
go-version: ${{ matrix.go-version }}
27-
check-latest: true
22+
- name: Checkout code
23+
uses: actions/checkout@v3
2824
- name: Build
2925
run: go build -v -o /dev/null .
3026
- name: Test
3127
run: go test -v ./...
3228
# ================
33-
# RELEASE BINARIES (on push "v*" tag)
29+
# RELEASE JOBS
30+
# runs after a success test
31+
# only runs on push "v*" tag
3432
# ================
3533
release_binaries:
3634
name: Release Binaries
@@ -48,9 +46,6 @@ jobs:
4846
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4947
with:
5048
args: release --config .github/goreleaser.yml
51-
# ================
52-
# RELEASE DOCKER IMAGES (on push "v*" tag)
53-
# ================
5449
release_docker:
5550
name: Release Docker Images
5651
needs: test
@@ -69,7 +64,7 @@ jobs:
6964
username: jpillora
7065
password: ${{ secrets.DOCKERHUB_TOKEN }}
7166
- name: Docker meta
72-
id: meta
67+
id: docker_meta
7368
uses: docker/metadata-action@v4
7469
with:
7570
images: jpillora/chisel

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go 1.19
44

55
require (
66
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
7-
github.com/fsnotify/fsnotify v1.4.9
7+
github.com/fsnotify/fsnotify v1.6.0
88
github.com/gorilla/websocket v1.4.2
99
github.com/jpillora/backoff v1.0.0
1010
github.com/jpillora/requestlog v1.0.0
@@ -18,7 +18,7 @@ require (
1818
github.com/andrew-d/go-termutil v0.0.0-20150726205930-009166a695a2 // indirect
1919
github.com/jpillora/ansi v1.0.2 // indirect
2020
github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce // indirect
21-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 // indirect
21+
golang.org/x/sys v0.0.0-20220908164124-27713097b956 // indirect
2222
golang.org/x/text v0.3.7 // indirect
2323
)
2424

go.sum

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPd
44
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
55
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
66
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
7-
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
8-
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
9-
github.com/jpillora/ansi v1.0.3 h1:nn4Jzti0EmRfDxm7JtEs5LzCbNwd5sv+0aE+LdS9/ZQ=
10-
github.com/jpillora/ansi v1.0.3/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY=
7+
github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
8+
github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
9+
github.com/jpillora/ansi v1.0.2 h1:+Ei5HCAH0xsrQRCT2PDr4mq9r4Gm4tg+arNdXRkB22s=
10+
github.com/jpillora/ansi v1.0.2/go.mod h1:D2tT+6uzJvN1nBVQILYWkIdq7zG+b5gcFN5WI/VyjMY=
1111
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
1212
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
1313
github.com/jpillora/requestlog v1.0.0 h1:bg++eJ74T7DYL3DlIpiwknrtfdUA9oP/M4fL+PpqnyA=
@@ -22,9 +22,8 @@ golang.org/x/net v0.0.0-20221004154528-8021a29435af h1:wv66FM3rLZGPdxpYL+ApnDe2H
2222
golang.org/x/net v0.0.0-20221004154528-8021a29435af/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
2323
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ=
2424
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
25-
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
26-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10 h1:WIoqL4EROvwiPdUtaip4VcDdpZ4kha7wBWZrbVKCIZg=
27-
golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
25+
golang.org/x/sys v0.0.0-20220908164124-27713097b956 h1:XeJjHH1KiLpKGb6lvMiksZ9l0fVUh+AmGcm0nOMEBOY=
26+
golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
2827
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
2928
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
3029
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=

test/e2e/cert_utils_test.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"crypto/x509/pkix"
1212
"encoding/pem"
1313
"fmt"
14+
"io/ioutil"
1415
"math/big"
1516
"net"
1617
"os"
@@ -52,7 +53,7 @@ func newTestTLSConfig() (*tlsConfig, error) {
5253
return nil, err
5354
}
5455

55-
tlsConfig.tmpDir, err = os.MkdirTemp("", "")
56+
tlsConfig.tmpDir, err = ioutil.TempDir("", "")
5657
if err != nil {
5758
return nil, err
5859
}
@@ -62,7 +63,7 @@ func newTestTLSConfig() (*tlsConfig, error) {
6263
return nil, err
6364
}
6465
pathServerCACrt := path.Join(dirServerCA, "client.crt")
65-
if err := os.WriteFile(pathServerCACrt, clientCertPEM, 0666); err != nil {
66+
if err := ioutil.WriteFile(pathServerCACrt, clientCertPEM, 0666); err != nil {
6667
return nil, err
6768
}
6869

@@ -71,7 +72,7 @@ func newTestTLSConfig() (*tlsConfig, error) {
7172
return nil, err
7273
}
7374
pathClientCACrt := path.Join(dirClientCA, "server.crt")
74-
if err := os.WriteFile(pathClientCACrt, serverCertPEM, 0666); err != nil {
75+
if err := ioutil.WriteFile(pathClientCACrt, serverCertPEM, 0666); err != nil {
7576
return nil, err
7677
}
7778

@@ -80,11 +81,11 @@ func newTestTLSConfig() (*tlsConfig, error) {
8081
return nil, err
8182
}
8283
pathServerCrtCrt := path.Join(dirServerCrt, "server.crt")
83-
if err := os.WriteFile(pathServerCrtCrt, serverCertPEM, 0666); err != nil {
84+
if err := ioutil.WriteFile(pathServerCrtCrt, serverCertPEM, 0666); err != nil {
8485
return nil, err
8586
}
8687
pathServerCrtKey := path.Join(dirServerCrt, "server.key")
87-
if err := os.WriteFile(pathServerCrtKey, serverKeyPEM, 0666); err != nil {
88+
if err := ioutil.WriteFile(pathServerCrtKey, serverKeyPEM, 0666); err != nil {
8889
return nil, err
8990
}
9091

@@ -93,11 +94,11 @@ func newTestTLSConfig() (*tlsConfig, error) {
9394
return nil, err
9495
}
9596
pathClientCrtCrt := path.Join(dirClientCrt, "client.crt")
96-
if err := os.WriteFile(pathClientCrtCrt, clientCertPEM, 0666); err != nil {
97+
if err := ioutil.WriteFile(pathClientCrtCrt, clientCertPEM, 0666); err != nil {
9798
return nil, err
9899
}
99100
pathClientCrtKey := path.Join(dirClientCrt, "client.key")
100-
if err := os.WriteFile(pathClientCrtKey, clientKeyPEM, 0666); err != nil {
101+
if err := ioutil.WriteFile(pathClientCrtKey, clientKeyPEM, 0666); err != nil {
101102
return nil, err
102103
}
103104

0 commit comments

Comments
 (0)