-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
feat: ✨ add OutlineDevice API that uses Outline SDK #1698
Conversation
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #1698 +/- ##
=======================================
- Coverage 45% 36% -9%
=======================================
Files 39 45 +6
Lines 1943 2749 +806
Branches 312 312
=======================================
+ Hits 885 1006 +121
- Misses 1058 1743 +685
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
outline/config/config.go
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to restrict the use of this config as much as possible.
Could you put it in an internal/ folder for now?
We should go straight from config string to objects, no need for intermediate formats.
Actually, for now it can live as a private function under device, since it's not needed anywhere else.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved to a private type in device
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I'm excited to move away from outline-go-tun2socks!!!!
} | ||
|
||
// NewOutlineDevice creates a new [OutlineDevice] that can relay traffic to a remote Outline server. | ||
func NewOutlineDevice(configJSON string) (d *OutlineDevice, err error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for future: think about how we should handle dynamic keys and expiration
In this PR, I added
OutlineDevice
APIs that can be used by Outline Client to replace the old outline-go-tun2socks'sOutlineTunnel
. TheOutlineDevice
API uses the latest outline-sdk v0.0.2 as well.