Skip to content

Commit

Permalink
Revert "chore: add outline-go-tun2socks, except android (#1744)"
Browse files Browse the repository at this point in the history
This reverts commit e8dcd79.
  • Loading branch information
daniellacosse authored Jan 11, 2024
1 parent e8dcd79 commit b2eef5d
Show file tree
Hide file tree
Showing 41 changed files with 50 additions and 1,998 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
* @Jigsaw-Code/outline-dev

/src/tun2socks/ @Jigsaw-Code/outline-networking-owners
/src/cordova/plugin/ @Jigsaw-Code/outline-networking-owners
/third_party/ @Jigsaw-Code/outline-networking-owners
/tools/ @Jigsaw-Code/outline-networking-owners
Expand Down
40 changes: 0 additions & 40 deletions .github/workflows/build_and_test_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ on:
branches:
- master

# TODO: run go tests
jobs:
web_test:
name: Web Test
Expand Down Expand Up @@ -64,11 +63,6 @@ jobs:
- name: Install NPM Dependencies
run: npm ci

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Linux Client
run: npm run action electron/build linux

Expand All @@ -93,11 +87,6 @@ jobs:
- name: Install NPM Dependencies
run: npm ci

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Windows Client
run: npm run action electron/build windows

Expand All @@ -122,14 +111,6 @@ jobs:
- name: Install NPM Dependencies
run: npm ci

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action tun2socks/build macos

- name: Test OutlineAppleLib
run: npm run action cordova/test macos

Expand Down Expand Up @@ -163,14 +144,6 @@ jobs:
- name: Install NPM Dependencies
run: npm ci

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action tun2socks/build ios

- name: Test OutlineAppleLib
run: npm run action cordova/test ios

Expand Down Expand Up @@ -204,14 +177,6 @@ jobs:
- name: Install NPM Dependencies
run: npm ci

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Build Tun2Socks (required for Test OutlineAppleLib)
run: npm run action tun2socks/build maccatalyst

- name: Test OutlineAppleLib
run: npm run action cordova/test maccatalyst

Expand Down Expand Up @@ -242,11 +207,6 @@ jobs:
- name: Install NPM Dependencies
run: npm ci

- name: Install Go
uses: actions/setup-go@v4
with:
go-version-file: '${{ github.workspace }}/go.mod'

- name: Install Java
uses: actions/[email protected]
with:
Expand Down
30 changes: 15 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
.idea
.vs/
.vscode
*.DS_Store
*.env
*.pdb
*.sw?
/node_modules
/build
/output
/build
info.txt
/node_modules
/platforms
/plugins
/third_party/Potatso/Pods
/www
coverage
info.txt
keystore.p12
/third_party/Potatso/Pods
xcuserdata/
.vs/
obj/
Outline.apk
Outline.apks
packages/
toc.pb
*.pdb
tools/OutlineService/OutlineService/bin/*
tools/smartdnsblock/bin/*
!tools/OutlineService/OutlineService/bin/*.exe
*.sw?
tools/smartdnsblock/bin/*
!tools/smartdnsblock/bin/*.exe
keystore.p12
Outline.apk
Outline.apks
universal.apk
xcuserdata/
toc.pb
coverage
*.env
76 changes: 0 additions & 76 deletions Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To join our Outline Community, [sign up for the IFF Mattermost](https://internet

## Requirements for all builds

All builds require [Node](https://nodejs.org/) 18 (lts/hydrogen), and [Go](https://golang.org/) 1.20 installed in addition to other per-platform requirements.
All builds require [Node](https://nodejs.org/) 18 (lts/hydrogen), in addition to other per-platform requirements.

> 💡 NOTE: if you have `nvm` installed, run `nvm use` to switch to the correct node version!
Expand Down
20 changes: 8 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
module github.com/Jigsaw-Code/outline-client
module github.com/Jigsaw-Code/outline-apps

go 1.20

require (
github.com/Jigsaw-Code/outline-sdk v0.0.9
github.com/Jigsaw-Code/outline-sdk v0.0.2
github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8
github.com/crazy-max/xgo v0.30.0
github.com/eycorsican/go-tun2socks v1.16.11
github.com/stretchr/testify v1.8.4
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a
golang.org/x/sys v0.15.0
golang.org/x/sys v0.11.0
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eycorsican/go-tun2socks v1.16.11 // indirect
github.com/miekg/dns v1.1.54 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/shadowsocks/go-shadowsocks2 v0.1.5 // indirect
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect
golang.org/x/crypto v0.16.0 // indirect
golang.org/x/mod v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/tools v0.16.0 // indirect
golang.org/x/crypto v0.9.0 // indirect
golang.org/x/mod v0.10.0 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/tools v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
33 changes: 13 additions & 20 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
github.com/Jigsaw-Code/outline-sdk v0.0.9 h1:FuyrqJ5OBh5y8mpXkSomdGJreGi8bAOWRXRNB2B+Hdc=
github.com/Jigsaw-Code/outline-sdk v0.0.9/go.mod h1:hhlKz0+r9wSDFT8usvN8Zv/BFToCIFAUn1P2Qk8G2CM=
github.com/Jigsaw-Code/outline-sdk v0.0.2 h1:uCuyJMaWj57IYEG/Hdml8YMdk9chU60ZkSxJXBhyGHU=
github.com/Jigsaw-Code/outline-sdk v0.0.2/go.mod h1:hhlKz0+r9wSDFT8usvN8Zv/BFToCIFAUn1P2Qk8G2CM=
github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8 h1:BxOHmmuppPM8K0DGUsfvajKF4PKfGxv9boNDhmbszFU=
github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8/go.mod h1:tBqJXpVm+kym+EAUdwNodcFxy872FfjVErfj8Br+gs0=
github.com/crazy-max/xgo v0.30.0 h1:2uunjwLBrVu5LKIS1dIDXz9U5OIX4H5LEsC3P6wFTto=
github.com/crazy-max/xgo v0.30.0/go.mod h1:m/aqfKaN/cYzfw+Pzk7Mk0tkmShg3/rCS4Zdhdugi4o=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/eycorsican/go-tun2socks v1.16.11 h1:+hJDNgisrYaGEqoSxhdikMgMJ4Ilfwm/IZDrWRrbaH8=
Expand All @@ -20,32 +18,27 @@ github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstv
github.com/shadowsocks/go-shadowsocks2 v0.1.5 h1:PDSQv9y2S85Fl7VBeOMF9StzeXZyK1HakRm86CUbr28=
github.com/shadowsocks/go-shadowsocks2 v0.1.5/go.mod h1:AGGpIoek4HRno4xzyFiAtLHkOpcoznZEkAccaI/rplM=
github.com/songgao/water v0.0.0-20190725173103-fd331bda3f4b/go.mod h1:P5HUIBuIWKbyjl083/loAegFkfbFNx5i2qEP4CNbm7E=
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 h1:TG/diQgUe0pntT/2D9tmUCz4VNwm9MfrtPr0SU2qSX8=
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8/go.mod h1:P5HUIBuIWKbyjl083/loAegFkfbFNx5i2qEP4CNbm7E=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a h1:sYbmY3FwUWCBTodZL1S3JUuOvaW6kM2o+clDzzDNBWg=
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a/go.mod h1:Ede7gF0KGoHlj822RtphAHK1jLdrcuRBZg0sF1Q+SPc=
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"action:help": "npm run action list",
"action:list": "npm run action list",
"action": "node ./src/build/run_action.mjs",
"clean": "rimraf build output node_modules www platforms plugins third_party/jsign/*.jar",
"clean": "rimraf output node_modules www platforms plugins third_party/jsign/*.jar",
"format:all": "prettier --write \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
"format": "pretty-quick --staged --pattern \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
"lint:ts": "eslint --ext ts,mjs src",
Expand Down
2 changes: 1 addition & 1 deletion src/build/run_action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,5 @@ async function main() {
}

if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
await main(...process.argv.slice(2));
await main();
}
16 changes: 4 additions & 12 deletions src/build/spawn_stream.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const spawnStream = (command, ...parameters) =>
const stdout = [];
const stderr = [];

console.debug(chalk.gray(`Running [${[command, ...parameters.map(e => `'${e}'`)].join(' ')}]...`));
console.debug(`Running [${[command, ...parameters.map(e => `'${e}'`)].join(' ')}]`);
const childProcess = spawn(command, parameters, {env: process.env});

const forEachMessageLine = (buffer, callback) => {
Expand All @@ -47,22 +47,14 @@ export const spawnStream = (command, ...parameters) =>
if (code === 0) {
return resolve(stdout.join(''));
}

console.error(
chalk.red(
`ERROR(spawn_stream): ${chalk.underline(
[command, ...parameters].join(' ')
)} failed with exit code ${chalk.bold(code)}.}`
)} failed with exit code ${chalk.bold(code)}. Printing stderr:`
)
);

if (!(stderr.length && stderr.every(line => line))) {
console.error(chalk.bgRedBright('No error output was given... Please fix this so it gives an error output :('));
} else {
console.error(chalk.bgRedBright('Printing stderr:'));
stderr.forEach(error => console.error(chalk.rgb(128, 64, 64)(error)));
}

return reject(stderr.join(''));
stderr.forEach(error => console.error(chalk.rgb(128, 64, 64)(error)));
return reject(code);
});
});
3 changes: 2 additions & 1 deletion src/cordova/apple/OutlineAppleLib/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ let package = Package(
),
.binaryTarget(
name: "Tun2socks",
path: "../../../../output/build/apple/Tun2socks.xcframework"
url: "https://github.com/Jigsaw-Code/outline-go-tun2socks/releases/download/v3.4.0/apple.zip",
checksum: "6c6880fa7d419a5fddc10588edffa0b23b5a44f0f840cf6865372127285bcc42"
),
.testTarget(
name: "OutlineTunnelTest",
Expand Down
1 change: 0 additions & 1 deletion src/cordova/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export async function main(...parameters) {
const {platform, buildMode, verbose} = getBuildParameters(parameters);

await runAction('www/build', ...parameters);
await runAction('tun2socks/build', ...parameters);
await runAction('cordova/setup', ...parameters);

if (verbose) {
Expand Down
2 changes: 1 addition & 1 deletion src/cordova/plugin/android/scripts/copy_third_party.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const path = require('node:path');
const ANDROID_LIBS_FOLDER_PATH = path.join('plugins', 'cordova-plugin-outline', 'android', 'libs');
const TUN2SOCKS_ANDROID_FOLDER_PATH = path.join('third_party', 'outline-go-tun2socks', 'android');

module.exports = async function (context) {
module.exports = async function(context) {
console.log('Copying Android third party libraries...');
await fs.mkdir(ANDROID_LIBS_FOLDER_PATH, {recursive: true});
await fs.copyFile(
Expand Down
Loading

0 comments on commit b2eef5d

Please sign in to comment.