Skip to content

Commit b2eef5d

Browse files
Revert "chore: add outline-go-tun2socks, except android (#1744)"
This reverts commit e8dcd79.
1 parent e8dcd79 commit b2eef5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+50
-1998
lines changed

.github/CODEOWNERS

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
* @Jigsaw-Code/outline-dev
22

3-
/src/tun2socks/ @Jigsaw-Code/outline-networking-owners
43
/src/cordova/plugin/ @Jigsaw-Code/outline-networking-owners
54
/third_party/ @Jigsaw-Code/outline-networking-owners
65
/tools/ @Jigsaw-Code/outline-networking-owners

.github/workflows/build_and_test_debug.yml

-40
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ on:
1313
branches:
1414
- master
1515

16-
# TODO: run go tests
1716
jobs:
1817
web_test:
1918
name: Web Test
@@ -64,11 +63,6 @@ jobs:
6463
- name: Install NPM Dependencies
6564
run: npm ci
6665

67-
- name: Install Go
68-
uses: actions/setup-go@v4
69-
with:
70-
go-version-file: '${{ github.workspace }}/go.mod'
71-
7266
- name: Build Linux Client
7367
run: npm run action electron/build linux
7468

@@ -93,11 +87,6 @@ jobs:
9387
- name: Install NPM Dependencies
9488
run: npm ci
9589

96-
- name: Install Go
97-
uses: actions/setup-go@v4
98-
with:
99-
go-version-file: '${{ github.workspace }}/go.mod'
100-
10190
- name: Build Windows Client
10291
run: npm run action electron/build windows
10392

@@ -122,14 +111,6 @@ jobs:
122111
- name: Install NPM Dependencies
123112
run: npm ci
124113

125-
- name: Install Go
126-
uses: actions/setup-go@v4
127-
with:
128-
go-version-file: '${{ github.workspace }}/go.mod'
129-
130-
- name: Build Tun2Socks (required for Test OutlineAppleLib)
131-
run: npm run action tun2socks/build macos
132-
133114
- name: Test OutlineAppleLib
134115
run: npm run action cordova/test macos
135116

@@ -163,14 +144,6 @@ jobs:
163144
- name: Install NPM Dependencies
164145
run: npm ci
165146

166-
- name: Install Go
167-
uses: actions/setup-go@v4
168-
with:
169-
go-version-file: '${{ github.workspace }}/go.mod'
170-
171-
- name: Build Tun2Socks (required for Test OutlineAppleLib)
172-
run: npm run action tun2socks/build ios
173-
174147
- name: Test OutlineAppleLib
175148
run: npm run action cordova/test ios
176149

@@ -204,14 +177,6 @@ jobs:
204177
- name: Install NPM Dependencies
205178
run: npm ci
206179

207-
- name: Install Go
208-
uses: actions/setup-go@v4
209-
with:
210-
go-version-file: '${{ github.workspace }}/go.mod'
211-
212-
- name: Build Tun2Socks (required for Test OutlineAppleLib)
213-
run: npm run action tun2socks/build maccatalyst
214-
215180
- name: Test OutlineAppleLib
216181
run: npm run action cordova/test maccatalyst
217182

@@ -242,11 +207,6 @@ jobs:
242207
- name: Install NPM Dependencies
243208
run: npm ci
244209

245-
- name: Install Go
246-
uses: actions/setup-go@v4
247-
with:
248-
go-version-file: '${{ github.workspace }}/go.mod'
249-
250210
- name: Install Java
251211
uses: actions/[email protected]
252212
with:

.gitignore

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
.idea
2-
.vs/
32
.vscode
43
*.DS_Store
5-
*.env
6-
*.pdb
7-
*.sw?
8-
/node_modules
9-
/build
104
/output
5+
/build
6+
info.txt
7+
/node_modules
118
/platforms
129
/plugins
13-
/third_party/Potatso/Pods
1410
/www
15-
coverage
16-
info.txt
17-
keystore.p12
11+
/third_party/Potatso/Pods
12+
xcuserdata/
13+
.vs/
1814
obj/
19-
Outline.apk
20-
Outline.apks
2115
packages/
22-
toc.pb
16+
*.pdb
2317
tools/OutlineService/OutlineService/bin/*
24-
tools/smartdnsblock/bin/*
2518
!tools/OutlineService/OutlineService/bin/*.exe
19+
*.sw?
20+
tools/smartdnsblock/bin/*
2621
!tools/smartdnsblock/bin/*.exe
22+
keystore.p12
23+
Outline.apk
24+
Outline.apks
2725
universal.apk
28-
xcuserdata/
26+
toc.pb
27+
coverage
28+
*.env

Makefile

-76
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To join our Outline Community, [sign up for the IFF Mattermost](https://internet
1414

1515
## Requirements for all builds
1616

17-
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.
17+
All builds require [Node](https://nodejs.org/) 18 (lts/hydrogen), in addition to other per-platform requirements.
1818

1919
> 💡 NOTE: if you have `nvm` installed, run `nvm use` to switch to the correct node version!
2020

go.mod

+8-12
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,23 @@
1-
module github.com/Jigsaw-Code/outline-client
1+
module github.com/Jigsaw-Code/outline-apps
22

33
go 1.20
44

55
require (
6-
github.com/Jigsaw-Code/outline-sdk v0.0.9
6+
github.com/Jigsaw-Code/outline-sdk v0.0.2
77
github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8
8-
github.com/crazy-max/xgo v0.30.0
9-
github.com/eycorsican/go-tun2socks v1.16.11
108
github.com/stretchr/testify v1.8.4
11-
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a
12-
golang.org/x/sys v0.15.0
9+
golang.org/x/sys v0.11.0
1310
)
1411

1512
require (
1613
github.com/davecgh/go-spew v1.1.1 // indirect
14+
github.com/eycorsican/go-tun2socks v1.16.11 // indirect
1715
github.com/miekg/dns v1.1.54 // indirect
1816
github.com/pmezard/go-difflib v1.0.0 // indirect
1917
github.com/shadowsocks/go-shadowsocks2 v0.1.5 // indirect
20-
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect
21-
golang.org/x/crypto v0.16.0 // indirect
22-
golang.org/x/mod v0.14.0 // indirect
23-
golang.org/x/net v0.19.0 // indirect
24-
golang.org/x/sync v0.5.0 // indirect
25-
golang.org/x/tools v0.16.0 // indirect
18+
golang.org/x/crypto v0.9.0 // indirect
19+
golang.org/x/mod v0.10.0 // indirect
20+
golang.org/x/net v0.10.0 // indirect
21+
golang.org/x/tools v0.9.1 // indirect
2622
gopkg.in/yaml.v3 v3.0.1 // indirect
2723
)

go.sum

+13-20
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
github.com/Jigsaw-Code/outline-sdk v0.0.9 h1:FuyrqJ5OBh5y8mpXkSomdGJreGi8bAOWRXRNB2B+Hdc=
2-
github.com/Jigsaw-Code/outline-sdk v0.0.9/go.mod h1:hhlKz0+r9wSDFT8usvN8Zv/BFToCIFAUn1P2Qk8G2CM=
1+
github.com/Jigsaw-Code/outline-sdk v0.0.2 h1:uCuyJMaWj57IYEG/Hdml8YMdk9chU60ZkSxJXBhyGHU=
2+
github.com/Jigsaw-Code/outline-sdk v0.0.2/go.mod h1:hhlKz0+r9wSDFT8usvN8Zv/BFToCIFAUn1P2Qk8G2CM=
33
github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8 h1:BxOHmmuppPM8K0DGUsfvajKF4PKfGxv9boNDhmbszFU=
44
github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20230807220427-893de7fdc6b8/go.mod h1:tBqJXpVm+kym+EAUdwNodcFxy872FfjVErfj8Br+gs0=
5-
github.com/crazy-max/xgo v0.30.0 h1:2uunjwLBrVu5LKIS1dIDXz9U5OIX4H5LEsC3P6wFTto=
6-
github.com/crazy-max/xgo v0.30.0/go.mod h1:m/aqfKaN/cYzfw+Pzk7Mk0tkmShg3/rCS4Zdhdugi4o=
75
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
86
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
97
github.com/eycorsican/go-tun2socks v1.16.11 h1:+hJDNgisrYaGEqoSxhdikMgMJ4Ilfwm/IZDrWRrbaH8=
@@ -20,32 +18,27 @@ github.com/riobard/go-bloom v0.0.0-20200614022211-cdc8013cb5b3/go.mod h1:HgjTstv
2018
github.com/shadowsocks/go-shadowsocks2 v0.1.5 h1:PDSQv9y2S85Fl7VBeOMF9StzeXZyK1HakRm86CUbr28=
2119
github.com/shadowsocks/go-shadowsocks2 v0.1.5/go.mod h1:AGGpIoek4HRno4xzyFiAtLHkOpcoznZEkAccaI/rplM=
2220
github.com/songgao/water v0.0.0-20190725173103-fd331bda3f4b/go.mod h1:P5HUIBuIWKbyjl083/loAegFkfbFNx5i2qEP4CNbm7E=
23-
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 h1:TG/diQgUe0pntT/2D9tmUCz4VNwm9MfrtPr0SU2qSX8=
24-
github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8/go.mod h1:P5HUIBuIWKbyjl083/loAegFkfbFNx5i2qEP4CNbm7E=
2521
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
2622
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
2723
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
2824
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
29-
golang.org/x/crypto v0.16.0 h1:mMMrFzRSCF0GvB7Ne27XVtVAaXLrPmgPC7/v0tkwHaY=
30-
golang.org/x/crypto v0.16.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4=
31-
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a h1:sYbmY3FwUWCBTodZL1S3JUuOvaW6kM2o+clDzzDNBWg=
32-
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a/go.mod h1:Ede7gF0KGoHlj822RtphAHK1jLdrcuRBZg0sF1Q+SPc=
33-
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
34-
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
25+
golang.org/x/crypto v0.9.0 h1:LF6fAI+IutBocDJ2OT0Q1g8plpYljMZ4+lty+dsqw3g=
26+
golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
27+
golang.org/x/mod v0.10.0 h1:lFO9qtOdlre5W1jxS3r/4szv2/6iXxScdzjoBMXNhYk=
28+
golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
3529
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
3630
golang.org/x/net v0.0.0-20191021144547-ec77196f6094/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
37-
golang.org/x/net v0.19.0 h1:zTwKpTd2XuCqf8huc7Fo2iSy+4RHPd10s4KzeTnVr1c=
38-
golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U=
39-
golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
40-
golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
31+
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
32+
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
33+
golang.org/x/sync v0.2.0 h1:PUR+T4wwASmuSTYdKjYHI5TD22Wy5ogLU5qZCOLxBrI=
4134
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
4235
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
43-
golang.org/x/sys v0.15.0 h1:h48lPFYpsTvQJZF4EKyI4aLHaev3CxivZmv7yZig9pc=
44-
golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
36+
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
37+
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4538
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
4639
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
47-
golang.org/x/tools v0.16.0 h1:GO788SKMRunPIBCXiQyo2AaexLstOrVhuAL5YwsckQM=
48-
golang.org/x/tools v0.16.0/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0=
40+
golang.org/x/tools v0.9.1 h1:8WMNJAz3zrtPmnYC7ISf5dEn3MT0gY7jBJfw27yrrLo=
41+
golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc=
4942
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5043
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
5144
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"action:help": "npm run action list",
77
"action:list": "npm run action list",
88
"action": "node ./src/build/run_action.mjs",
9-
"clean": "rimraf build output node_modules www platforms plugins third_party/jsign/*.jar",
9+
"clean": "rimraf output node_modules www platforms plugins third_party/jsign/*.jar",
1010
"format:all": "prettier --write \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
1111
"format": "pretty-quick --staged --pattern \"**/*.{cjs,mjs,html,js,json,md,ts}\"",
1212
"lint:ts": "eslint --ext ts,mjs src",

src/build/run_action.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,5 @@ async function main() {
141141
}
142142

143143
if (import.meta.url === url.pathToFileURL(process.argv[1]).href) {
144-
await main(...process.argv.slice(2));
144+
await main();
145145
}

src/build/spawn_stream.mjs

+4-12
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const spawnStream = (command, ...parameters) =>
2323
const stdout = [];
2424
const stderr = [];
2525

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

2929
const forEachMessageLine = (buffer, callback) => {
@@ -47,22 +47,14 @@ export const spawnStream = (command, ...parameters) =>
4747
if (code === 0) {
4848
return resolve(stdout.join(''));
4949
}
50-
5150
console.error(
5251
chalk.red(
5352
`ERROR(spawn_stream): ${chalk.underline(
5453
[command, ...parameters].join(' ')
55-
)} failed with exit code ${chalk.bold(code)}.}`
54+
)} failed with exit code ${chalk.bold(code)}. Printing stderr:`
5655
)
5756
);
58-
59-
if (!(stderr.length && stderr.every(line => line))) {
60-
console.error(chalk.bgRedBright('No error output was given... Please fix this so it gives an error output :('));
61-
} else {
62-
console.error(chalk.bgRedBright('Printing stderr:'));
63-
stderr.forEach(error => console.error(chalk.rgb(128, 64, 64)(error)));
64-
}
65-
66-
return reject(stderr.join(''));
57+
stderr.forEach(error => console.error(chalk.rgb(128, 64, 64)(error)));
58+
return reject(code);
6759
});
6860
});

src/cordova/apple/OutlineAppleLib/Package.swift

+2-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ let package = Package(
7676
),
7777
.binaryTarget(
7878
name: "Tun2socks",
79-
path: "../../../../output/build/apple/Tun2socks.xcframework"
79+
url: "https://github.com/Jigsaw-Code/outline-go-tun2socks/releases/download/v3.4.0/apple.zip",
80+
checksum: "6c6880fa7d419a5fddc10588edffa0b23b5a44f0f840cf6865372127285bcc42"
8081
),
8182
.testTarget(
8283
name: "OutlineTunnelTest",

src/cordova/build.action.mjs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export async function main(...parameters) {
3434
const {platform, buildMode, verbose} = getBuildParameters(parameters);
3535

3636
await runAction('www/build', ...parameters);
37-
await runAction('tun2socks/build', ...parameters);
3837
await runAction('cordova/setup', ...parameters);
3938

4039
if (verbose) {

src/cordova/plugin/android/scripts/copy_third_party.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const path = require('node:path');
2020
const ANDROID_LIBS_FOLDER_PATH = path.join('plugins', 'cordova-plugin-outline', 'android', 'libs');
2121
const TUN2SOCKS_ANDROID_FOLDER_PATH = path.join('third_party', 'outline-go-tun2socks', 'android');
2222

23-
module.exports = async function (context) {
23+
module.exports = async function(context) {
2424
console.log('Copying Android third party libraries...');
2525
await fs.mkdir(ANDROID_LIBS_FOLDER_PATH, {recursive: true});
2626
await fs.copyFile(

0 commit comments

Comments
 (0)