Git Product home page Git Product logo

outline-sdk's People

Contributors

amircybersec avatar daniellacosse avatar dependabot[bot] avatar fortuna avatar gghazinouri avatar grbit avatar hilary-ops avatar jyyi1 avatar maddyhof avatar nimaadib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

outline-sdk's Issues

The Outline CLI references to the invalid version of Outline SDK

Hi guys.

  1. Looks like the Outline CLI references to the invalid version of Outline SDK.
    If I run go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@latest -transport "ss://<outline-server-access-key>" under the root I get the rrorr:

go: downloading github.com/Jigsaw-Code/outline-sdk v0.0.12-0.20240117212550-6cd87709dc1e
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/examples/outline-cli/outline_packet_proxy.go:21:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/examples/outline-cli/outline_device.go:24:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/examples/outline-cli/outline_packet_proxy.go:23:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/examples/outline-cli/outline_device.go:25:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/examples/outline-cli/outline_device.go:26:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/config/shadowsocks.go:25:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/config/config.go:25:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/config/config.go:26:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/config/tls.go:23:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770
/root/go/pkg/mod/github.com/!jigsaw-!code/outline-sdk/[email protected]/config/config.go:27:2: github.com/Jigsaw-Code/[email protected]: invalid version: unknown revision 6cd8770

  1. This commit hash works: go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@7294484 -transport "ss://<outline-server-access-key> but https://www.dnsleaktest.com/ shows the dns leaks.

Not able to access services on Shadowsocks server when using Outline CLI

I've just installed Outline Cli and it does work on Debian 10. But there's a problem. After I run:

outline-cli -transport "ss://....?outline=1"

The server becomes inaccessible over the network.

I have Debian 10 with Ethernet interface called ens192 with public IP x.x.x.x. My gateway is x.x.x.1. Whenever i start outline new interface appears: outline233 with IP 10.233.233.1. Nothing changes is routes, them are same before and after connection:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         x.x.x.1     0.0.0.0         UG    0      0        0 ens192
x.x.x.0     0.0.0.0         255.255.255.0   U     0      0        0 ens192

Nothing changes is iptables - no new rules or smth. But after connecting with outline I can have outgoing traffic from server but can't connect or even ping the server itself via x.x.x.x.

How can I avoid this?

Add host() and port() to mobileproxy

Currently mobileproxy.RunProxy returns a mobileproxy.Proxy with a address getter, which returns a host:port string.
However, most code to configure the network stack needs separate host string and port number. This means the client has to split the string, and convert the port to number.

To make it easier on the client, we should provide Proxy.host() and Proxy.port() instead.
Or perhaps return an Address type with those methods.

Does this bypass US sanctions?

I came across an article suggesting that this method could potentially assist Iranians in circumventing censorship imposed in Iran. However, as a developer residing in Iran, I can't help but feel the impact of discrimination caused by the US technology sanctions. Numerous third-party libraries yield a 403 error, and it's rather ironic that US-based companies, particularly those operating in the blockchain realm, prominently feature the term "decentralized" on their websites, all while they have imposed IP address restrictions on Iranians. WalletConnect serves as a prime example. My inquiry revolves around whether this approach can also aid in bypassing US sanctions?

href doesnt work

this button open new tab with url https://getoutline.org/ru/ruhttps://github.com/Jigsaw-Code/outline-sdk
v

изображение

OutlineCLI: Failed to create tun device

Full error: failed to create tun device: failed to create TUN/TAP device: ioctl: device or resource busy

The issue occurs after stopping and starting the service again. I guess that it happens because of incorrect service stopping (just closing the terminal) but I didn't find any info about a correct way.

Commit 49ebf7c is breaking `httpproxy` with `ss` dialer

I am not so sure what is causing this but this commit is breaking httpproxy with ss transport.

49ebf7c

Background

The current fyne-proxy implementation in examples works with the following go.mod setup

require (
	fyne.io/fyne/v2 v2.4.3
	github.com/Jigsaw-Code/outline-sdk v0.0.12-0.20240117212231-233d1898e1db
	github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20240117212231-233d1898e1db
)

I upgraded SDK to version v0.0.15 and re-tested it and it still functioned properly.

➜  go get github.com/Jigsaw-Code/outline-sdk@latest
go: upgraded github.com/Jigsaw-Code/outline-sdk v0.0.12-0.20240117212231-233d1898e1db => v0.0.15
go: upgraded golang.org/x/crypto v0.17.0 => v0.18.0
go: upgraded golang.org/x/net v0.19.0 => v0.20.0
go: upgraded golang.org/x/sys v0.15.0 => v0.16.0

➜ go mod tidy
require (
	fyne.io/fyne/v2 v2.4.3
	github.com/Jigsaw-Code/outline-sdk v0.0.15
	github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20240117212231-233d1898e1db
)

How to reproduce:

However after updating x to the latest version fyne-proxy stops working:

> go get github.com/Jigsaw-Code/outline-sdk/x@latest
> go mod tidy
require (
	fyne.io/fyne/v2 v2.4.3
	github.com/Jigsaw-Code/outline-sdk v0.0.15
	github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20240402215738-49ebf7c26e14
)

Then use a valid ss link to connect. Nope that the issue is related to httpproxy package used in fyne-proxy example. I am using fyne-proxy since it is easier for debugging.

Extra context and debugging efforts:

  1. please note that if I use split:1 or tlsfrag:1 to configure the transport, the proxy works fine. However it breaks if I use ss transport. Using wireshark, I see a lot of TCP Acked Unseen segment messages.
Screenshot 2024-04-03 at 10 26 17 AM
  1. If the 'x' package is rolled back to github.com/Jigsaw-Code/outline-sdk/x v0.0.0-20240402154916-48d8a48b34a6 version, which is one commit behind 49ebf7c, the issue disappears.

WIP [Enhancement] Getting GUI app to run on physical Android device requires changes to setup

Tags

  • Outline Connectivity Tester GUI app (Android)
  • Enhancement
  • WIP

Overview

I have been fiddling wih setup/configuration and exploring different ways to run the app for debug/development on a physical android device.

The current procedure works well with running the app on Emulator but if I run the app on device the front-end cannot reach local vite server to communicate with the backend.

Below I outline two approaches that worked for me. Each approach requires making changes to config files in the project and some manual commands. Perhaps, we can automate this processes or simply include the steps in the README documentation since this is very specific to Android physical device.

Method 1

Step 1: Add --host flag to vite in file mobile_app/package.json such that "watch:frontend": "vite --host",
Step 2:
In capacitor config.ts, change the IP_ADDRESS value with local IP address of the host computer. Please note that it is assumed that the physical android device is connected to the same WiFi network as the development computer.

  case "android":
    config.server =  {
      url: "http://IP_ADDRESS:3000",
      cleartext: true
    };

Please note that when you run vite with --host flag, the backend server will be exposed to the whole network which can be considered a security risk. This should be fine if devices are on an isolated or private network though.

Finally you can use WiFi or USB debugging to run the app on a physical device.

Method 2

This method is more secure than previous one but requires a few more steps. In this approach, all IP addresses in capacitor config.ts must be set to localhost.

import { CapacitorConfig } from '@capacitor/cli';

let config: CapacitorConfig = {
  appId: "org.getoutline.sdk.example.connectivity",
  appName: "@outline_sdk_connectivity_demo/app_mobile",
  webDir: "output/frontend",
  server: {
    url: "http://localhost:3000"
  }
}

switch (process.env.CAPACITOR_PLATFORM) {
  case "android":
    config.server =  {
      url: "http://localhost:3000",
      cleartext: true,
    };
    break;
  case "ios":
  default:
    config.server =  {
      url: "http://localhost:3000"
    };
    break;
}

export default config;

Then, in terminal run:

adb -s DEVICE_NAME reverse tcp:3000 tcp:3000

where DEVICE_NAME is the name of the device returned by adb devices command. You do not need to specify the device name if adb devices only return one result. However if emulator is running in addition to physical device, you get two devices in the result. For examople:

$ adb devices
List of devices attached
adb-2A101FDH200FF3-9WeC8L._adb-tls-connect._tcp device
emulator-5554   device

The command adb reverse tcp:3000 tcp:3000 open a listening socket on the mobile device (localhost:3000) and it passes all traffic to it to the computer on network that is running vite. In this approach --host flag is not needed.

To stop reverse port forwaring, run:

adb -s DEVICE_Name reverse --remove tcp:3000

Connectivity GUI App: Please include minimum or recommended nodejs and yarn version

I am running Ubuntu (uname -a Linux 17Z990-R-AAS7U1 6.2.0-34-generic #34~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 7 13:12:03 UTC 2 x86_64 x86_64 x86_64 GNU/Linux) and managed to get the following working to run the Android Connectivity Mobile App:


> yarn --version 
1.22.19
> npm -v
9.8.0
> node -v
v20.5.1

I had to fiddle with it to get it working. The main contributing factor is that Nodejs version on Ubuntu default repos are outdated and node needs to be re-installed with the new way! Anyways, I thought it might be helpful to have a record of successful installation, and perhaps provide recommendations for minimum version numbers.

ReInstall OutLine Manager

"I reinstalled the operating system on my computer -> reinstalled Outline Manager. How can I get the link (magical green line) for connection without reinstalling the entire server?"

No exported names in the package

I used gomobile bind to integrate the Outline SDK into my app.

I have this error :

no exported names in the package "github.com/Jigsaw-Code/outline-internal-sdk"

Also this is the command: gomobile bind -target=android -androidapi 30 <path to root of outline package>

ndk verrsion: 25.2.9519653

Outline-cli does not support ssconf:// link

I've built outline-cli from source as described in the readme, however, I get the following error when providing `ssconf://' argument:

failed to create OutlineDevice: config must start with 'ss://'

Is support for this functionality coming soon?

Add yarn scripts for watching individual platforms for GUI connectivity example app

On my development workflow, I don't have Xcode installed (Ubuntu) and I am just building for android.

In package.json file in shared_backend directory, there's a line that says:

"build": "concurrently 'yarn:build:*' --kill-others-on-fail",

The --kill-others-on-fail flag sends a SIGTERM signal to other processes if one build process fails. Since I don't have Xcode installed, the following build process fails:

"build:ios": "gomobile bind -target ios,iossimulator -o output/SharedBackend.xcframework github.com/Jigsaw-Code/outline-sdk/x/examples/outline-connectivity-app/shared_backend",

This causes the other processes, including build:android to get killed.

As a result, the SharedBackend.aar & SharedBackend-sources.jar files don't get generated.

Please see the yarn log below:

[shared_backend]: [ios] gomobile: -target="ios,iossimulator" requires Xcode
[shared_backend]: [ios] yarn run build:ios exited with code 1
[shared_backend]: --> Sending SIGTERM to other processes..
[shared_backend]: [android] yarn run build:android exited with code SIGTERM
[shared_backend]: [nodemon] app crashed - waiting for file changes before starting...

In Android Studio, the following error is thrown:

Null extracted folder for artifact: ResolvedArtifact(componentIdentifier=SharedBackend.aar, variant=local file, variantName=null, artifactFile=/home/amir/ICFP/outline-sdk/x/examples/outline-connectivity-app/shared_backend/output/SharedBackend.aar, isTestFixturesArtifact=false, extractedFolder=null, publishedLintJar=null, dependencyType=ANDROID, isWrappedModule=false, buildMapping={__current_build__=/home/amir/ICFP/outline-sdk/x/examples/outline-connectivity-app/app_mobile/android})

Potential solution

I tried removing the --kill-others-on-fail flag and it seemed to work. I am not sure about the repercussions of this and whether there's a better solution.

OutlineCLI blocks docker

Hello, I'm really appreciated to use outline-cli after .appimage version stopped working. But I've encountered this issue that routing rules of cli are blocking traffic for docker containers. Not really expert in that, but is it possible to configure somehow the cli itself or add specific ip routes to bypass vpn for docker containers? I've validated that before I was able to utilize containers (when worked with .appimage), also on windows and macos with desktop app everything is fine

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.