Skip to content

Commit

Permalink
Merge branch 'main' into fortuna-socks
Browse files Browse the repository at this point in the history
  • Loading branch information
amircybersec authored Jul 26, 2024
2 parents 470a929 + e157b30 commit 74c5857
Show file tree
Hide file tree
Showing 28 changed files with 2,468 additions and 201 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
test:
strategy:
matrix:
# Use windows-2019, which is a lot faster than windows-2022:
# https://github.com/actions/runner-images/issues/5166
os: [ubuntu-latest, macos-latest, windows-2019]
os: [ubuntu-latest, macos-latest, windows-latest]

runs-on: ${{ matrix.os }}
env:
Expand All @@ -28,32 +26,40 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'
go-version-file: '${{ github.workspace }}/x/go.mod'

- name: Build SDK
run: go build -v ./...

- name: Build X
run: go build -C x -o "${{ env.OUTPUT_DIR }}/" -v ./...
run: go build -C x -tags psiphon -o "${{ env.OUTPUT_DIR }}/" -v ./...

- name: Build Go Mobile
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
run: go build -C x -o "${{ env.OUTPUT_DIR }}/" golang.org/x/mobile/cmd/gomobile golang.org/x/mobile/cmd/gobind

- name: Build Mobileproxy (Android)
if: matrix.os == 'ubuntu-latest'
run: PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -v -target=android -androidapi=21 -o "${{ env.OUTPUT_DIR }}/mobileproxy.aar" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy
working-directory: ${{ github.workspace }}/x
run: PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -v -target=android -androidapi=21 -o "${{ env.OUTPUT_DIR }}/mobileproxy.aar" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy

- name: Build Mobileproxy (iOS)
if: matrix.os == 'macos-latest'
run: PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -v -target=ios -iosversion=11.0 -o "${{ env.OUTPUT_DIR }}/mobileproxy.xcframework" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy
working-directory: ${{ github.workspace }}/x
run: PATH="${{ env.OUTPUT_DIR }}:$PATH" gomobile bind -ldflags='-s -w' -v -target=ios -iosversion=11.0 -o "${{ env.OUTPUT_DIR }}/mobileproxy.xcframework" github.com/Jigsaw-Code/outline-sdk/x/mobileproxy

- name: Check SDK licenses
# We allow only "notice" type of licenses.
run: go run github.com/google/go-licenses check --ignore=golang.org/x --allowed_licenses=Apache-2.0,Apache-3,BSD-3-Clause,BSD-4-Clause,CC0-1.0,MIT ./...

- name: Check x licenses
env: {GO_FLAGS: -C x}
run: go run github.com/google/go-licenses check --ignore=golang.org/x --allowed_licenses=Apache-2.0,Apache-3,BSD-3-Clause,BSD-4-Clause,CC0-1.0,MIT ./...

- name: Test SDK
# Enable nettests, which executes external network requests.
run: go test -v -race -bench '.' ./... -benchtime=100ms -tags nettest
run: go test -tags nettest -race -bench '.' ./... -benchtime=100ms

- name: Test X
- name: Test x
# Enable nettests, which executes external network requests.
run: go test -C x -v -race -bench '.' ./... -benchtime=100ms -tags nettest
run: go test -C x -tags nettest,psiphon -race -bench '.' ./... -benchtime=100ms
26 changes: 23 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.20

require (
github.com/eycorsican/go-tun2socks v1.16.11
github.com/google/go-licenses v1.6.0
github.com/google/gopacket v1.1.19
github.com/shadowsocks/go-shadowsocks2 v0.1.5
github.com/stretchr/testify v1.8.4
Expand All @@ -14,11 +15,30 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/kr/pretty v0.1.0 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/emirpasic/gods v1.12.0 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/licenseclassifier v0.0.0-20210722185704-3043a050f148 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/otiai10/copy v1.6.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3 // indirect
github.com/sergi/go-diff v1.2.0 // indirect
github.com/spf13/cobra v1.6.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/src-d/gcfg v1.4.0 // indirect
github.com/xanzy/ssh-agent v0.2.1 // indirect
go.opencensus.io v0.23.0 // indirect
golang.org/x/mod v0.8.0 // indirect
golang.org/x/sys v0.16.0 // indirect
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/tools v0.6.0 // indirect
gopkg.in/src-d/go-billy.v4 v4.3.2 // indirect
gopkg.in/src-d/go-git.v4 v4.13.1 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
)
Loading

0 comments on commit 74c5857

Please sign in to comment.