Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(client): move outline/device and rename tun2socks to backend #1962

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
* @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
/client/tools/ @Jigsaw-Code/outline-networking-owners
/client/src/backend/ @Jigsaw-Code/outline-networking-owners
/client/src/cordova/plugin/ @Jigsaw-Code/outline-networking-owners
/client/src/www/model/ @fortuna

/src/www/model/ @fortuna
/third_party/ @Jigsaw-Code/outline-networking-owners
12 changes: 6 additions & 6 deletions .github/workflows/build_and_test_debug_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ jobs:
with:
go-version-file: '${{ github.workspace }}/go.mod'

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

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test macos
Expand Down Expand Up @@ -173,8 +173,8 @@ jobs:
with:
go-version-file: '${{ github.workspace }}/go.mod'

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

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test ios
Expand Down Expand Up @@ -215,8 +215,8 @@ jobs:
with:
go-version-file: '${{ github.workspace }}/go.mod'

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

- name: Test OutlineAppleLib
run: npm run action client/src/cordova/test maccatalyst
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ IMPORT_PATH=$(IMPORT_HOST)/Jigsaw-Code/outline-apps

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can move the Makefile in another PR

all: android apple linux windows

ROOT_PKG=client/src/tun2socks
ROOT_PKG=client/src/backend

android: $(BUILDDIR)/android/tun2socks.aar

Expand All @@ -37,7 +37,7 @@ $(BUILDDIR)/apple/Tun2socks.xcframework: $(BUILDDIR)/ios/Tun2socks.xcframework $
XGO=$(GOBIN)/xgo
TUN2SOCKS_VERSION=v1.16.11
XGO_LDFLAGS='-w -X main.version=$(TUN2SOCKS_VERSION)'
ELECTRON_PKG="./client/src/tun2socks/outline/electron"
ELECTRON_PKG="./client/src/backend/outline/electron"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please double confirm this won't change the final binary name (it should be tun2socks for Linux and tun2socks.exe for Windows).

Or maybe we should actually update it to backend and backend.exe? It's up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do this in a later pr, I'm trying to minimize breakage.

I can't build tun2socks until @fortuna's pr fixing the xgo issue is merged. Do you mind confirming?


# TODO: build directly when on linux
LINUX_BUILDDIR=$(BUILDDIR)/linux
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export async function main(...parameters) {
'build',
'-o',
`output/build/${targetPlatform}/tun2socks${targetPlatform === 'windows' ? '.exe' : ''}`,
'github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/electron'
'github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/electron'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"net/http"
"time"

"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/neterrors"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/neterrors"
"github.com/Jigsaw-Code/outline-sdk/transport"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"syscall"
"time"

"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/internal/utf8"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/neterrors"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/shadowsocks"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/tun2socks"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/internal/utf8"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/neterrors"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/shadowsocks"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/tun2socks"
"github.com/eycorsican/go-tun2socks/common/log"
_ "github.com/eycorsican/go-tun2socks/common/log/simple" // Register a simple logger.
"github.com/eycorsican/go-tun2socks/core"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (
"strconv"
"time"

"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/connectivity"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/internal/utf8"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/connectivity"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/internal/utf8"
"github.com/Jigsaw-Code/outline-sdk/transport"
"github.com/Jigsaw-Code/outline-sdk/transport/shadowsocks"
"github.com/eycorsican/go-tun2socks/common/log"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (

"github.com/Jigsaw-Code/outline-sdk/transport"

"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/connectivity"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/tunnel"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/connectivity"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/tunnel"
)

// Tunnel represents a tunnel from a TUN device to a server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ package tun2socks
import (
"runtime/debug"

"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/shadowsocks"
"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/tunnel"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/shadowsocks"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/tunnel"
"github.com/eycorsican/go-tun2socks/common/log"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"runtime/debug"
"time"

"github.com/Jigsaw-Code/outline-apps/client/src/tun2socks/outline/shadowsocks"
"github.com/Jigsaw-Code/outline-apps/client/src/backend/outline/shadowsocks"
)

// TunWriter is an interface that allows for outputting packets to the TUN (VPN).
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion client/src/cordova/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function main(...parameters) {
const {platform, buildMode, verbose} = getBuildParameters(parameters);

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

if (verbose) {
Expand Down
2 changes: 1 addition & 1 deletion client/src/cordova/setup.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function main(...parameters) {
const {platform, buildMode, verbose, buildNumber, versionName} = getBuildParameters(parameters);

await runAction('client/src/www/build', ...parameters);
await runAction('client/src/tun2socks/build', ...parameters);
await runAction('client/src/backend/build', ...parameters);

await rmfr(path.resolve(getRootDir(), 'platforms'));
await rmfr(path.resolve(getRootDir(), 'plugins'));
Expand Down
2 changes: 1 addition & 1 deletion src/electron/build.action.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export async function main(...parameters) {
}

await runAction('client/src/www/build', ...parameters);
await runAction('client/src/tun2socks/build', ...parameters);
await runAction('client/src/backend/build', ...parameters);
await runAction('src/electron/build_main', ...parameters);

await copydir.sync(
Expand Down
Loading