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: add outline-go-tun2socks, except android #1744

Merged
merged 78 commits into from
Jan 10, 2024

Conversation

daniellacosse
Copy link
Contributor

@daniellacosse daniellacosse commented Oct 5, 2023

For now we're not copying the Android build over until we figure out what's going on there.

Issues

  • Getting this and I'm not sure why? Do we care?
# tools/find_tap_name.go

could not import golang.org/x/sys/windows/registry (no required module provides package "golang.org/x/sys/windows/registry")compiler[BrokenImport](https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#BrokenImport)
error while importing golang.org/x/sys/windows/registry: build constraints exclude all Go files in /Users/daniellacosse/go/pkg/mod/golang.org/x/[email protected]/windows/registrycompiler

is it because it's also package main?

@daniellacosse daniellacosse changed the title init tun2socks chore: add go-tun2socks to the client Oct 5, 2023
@daniellacosse daniellacosse requested a review from fortuna October 5, 2023 15:41
@daniellacosse daniellacosse changed the title chore: add go-tun2socks to the client chore: [WIP] add go-tun2socks to the client Oct 5, 2023
@codecov
Copy link

codecov bot commented Oct 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9133950) 32% compared to head (37f9e14) 32%.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1744   +/-   ##
======================================
  Coverage      32%     32%           
======================================
  Files          45      45           
  Lines        2609    2609           
  Branches      337     337           
======================================
  Hits          859     859           
  Misses       1750    1750           
Flag Coverage Δ
apple 15% <ø> (ø)
ios 15% <ø> (ø)
maccatalyst 15% <ø> (ø)
macos 15% <ø> (ø)
unittests 32% <ø> (ø)
www 40% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

Let's remove the Intra code from this PR.
Only the Outline code should be here.

@fortuna fortuna requested a review from jyyi1 October 5, 2023 23:19
outline/tun2socks/Makefile Outdated Show resolved Hide resolved
@daniellacosse daniellacosse requested a review from fortuna October 6, 2023 15:42
Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

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

Thanks @daniellacosse for the contribution, I have a question, after removing intra, shall we just embed the building process within client's npm build action?

.github/workflows/build_and_test_tun2socks.yml Outdated Show resolved Hide resolved
.github/workflows/build_and_test_tun2socks.yml Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
outline/tun2socks/Makefile Outdated Show resolved Hide resolved
outline/tun2socks/README.md Outdated Show resolved Hide resolved
outline/tun2socks/intra/android/init.go Outdated Show resolved Hide resolved
outline/tun2socks/intra/android/tun.go Outdated Show resolved Hide resolved
outline/tun2socks/tools.go Outdated Show resolved Hide resolved
@daniellacosse
Copy link
Contributor Author

Thanks @daniellacosse for the contribution, I have a question, after removing intra, shall we just embed the building process within client's npm build action?

I was planning on adding it to the build process in the next PR.

I guess with that in consideration, I can simply not add it to CI yet.

@daniellacosse daniellacosse requested a review from jyyi1 October 9, 2023 17:02
third_party/outline-go-tun2socks/LICENSE Outdated Show resolved Hide resolved
src/tun2socks/https/fetch.go Outdated Show resolved Hide resolved
@daniellacosse daniellacosse changed the title chore: [WIP] add go-tun2socks to the client chore: [WIP] add outline-go-tun2socks to the client Nov 13, 2023
@daniellacosse daniellacosse changed the title chore: [WIP] add outline-go-tun2socks to the client chore: [WIP] add outline-go-tun2socks Nov 13, 2023
@daniellacosse daniellacosse added the needs test Pull requests that require tests label Nov 13, 2023
Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

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

Thanks Daniel! This will be very helpful. The code LGTM, please remember to add a TODO comment of running go tests in the GitHub workflow.

'.'
);

return spawnStream('cp', `${buildDir}/tun2socks-windows-386.exe`, `${buildDir}/tun2socks.exe`);
Copy link
Contributor

Choose a reason for hiding this comment

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

I see, maybe add a TODO in case anyone in the future would like to investigate into that?

@daniellacosse daniellacosse requested a review from jyyi1 December 15, 2023 17:50
src/tun2socks/build.action.mjs Outdated Show resolved Hide resolved
@daniellacosse daniellacosse requested a review from fortuna January 9, 2024 14:59
Copy link
Collaborator

@fortuna fortuna left a comment

Choose a reason for hiding this comment

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

Awesome. Thanks for the change! Once we have tun2socks fully in the client it will enable a lot more progress!!! No more need to release outline-go-tun2socks!

Comment on lines +7 to +8
IMPORT_HOST=github.com
IMPORT_PATH=$(IMPORT_HOST)/Jigsaw-Code/outline-client
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ugh, IMPORT_HOST just hurts readability. I see it was already there, no need to change in this PR.

Suggested change
IMPORT_HOST=github.com
IMPORT_PATH=$(IMPORT_HOST)/Jigsaw-Code/outline-client
IMPORT_PATH=github.com/Jigsaw-Code/outline-client

@daniellacosse
Copy link
Contributor Author

daniellacosse commented Jan 9, 2024

Awesome. Thanks for the change! Once we have tun2socks fully in the client it will enable a lot more progress!!! No more need to release outline-go-tun2socks!

@fortuna Do you mind if I modify the Makefile such that it uses go build on the proper platform? Xgo is breaking the Windows CI: https://github.com/Jigsaw-Code/outline-client/actions/runs/7454194624/job/20305511594?pr=1744#step:7:53

Also trying to figure out what happened to the Android NDK.

@fortuna
Copy link
Collaborator

fortuna commented Jan 9, 2024

That's fine for now. Perhaps add a TODO to build windows directly without xgo when on windows.

@daniellacosse
Copy link
Contributor Author

daniellacosse commented Jan 10, 2024

Awesome. Thanks for the change! Once we have tun2socks fully in the client it will enable a lot more progress!!! No more need to release outline-go-tun2socks!

@fortuna Do you mind if I modify the Makefile such that it uses go build on the proper platform? Xgo is breaking the Windows CI: https://github.com/Jigsaw-Code/outline-client/actions/runs/7454194624/job/20305511594?pr=1744#step:7:53

Also trying to figure out what happened to the Android NDK.

Ah, my old friend, -androidapi 19: golang/go#52470 (comment)

Thanks @bemasc !

@daniellacosse daniellacosse requested a review from fortuna January 10, 2024 15:41
@daniellacosse daniellacosse merged commit e8dcd79 into master Jan 10, 2024
16 of 17 checks passed
daniellacosse added a commit that referenced this pull request Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants