Git Product home page Git Product logo

Comments (14)

alexlii1971 avatar alexlii1971 commented on August 26, 2024

Hello,

I got the post at https://github.com/Jigsaw-Code/outline-sdk/blob/main/x/examples/outline-cli/README.md

Outline VPN Command-Line Client

A CLI interface of Outline VPN client for Linux.

Usage

go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@latest -transport "ss://<outline-server-access-key>"
  • -transport : the Outline server access key from the service provider, it should start with "ss://"

Build

You can use the following command to build the CLI.

cd outline-sdk/x/examples/
go build -o outline-cli  -ldflags="-extldflags=-static" ./outline-cli

💡 cgo will pull in the C runtime. By default, the C runtime is linked as a dynamic library. Sometimes this can cause problems when running the binary on different versions or distributions of Linux. To avoid this, we have added the -ldflags="-extldflags=-static" option. But if you only need to run the binary on the same machine, you can omit this option.

You know, we would run it on server temporally, and we need stop outline service running on server after deploy the project.

so, any way to get VPN client outline and down, and stop running?

from outline-sdk.

alexlii1971 avatar alexlii1971 commented on August 26, 2024

Hello,

Here is the error on Ubuntu, anyway to fix?

go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@latest -transport "ss://[email protected]:44194/?outline=1>"

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

go/pkg/mod/github.com/!jigsaw-!code/[email protected]/transport/happyeyeballs.go:90:22: undefined: atomic.Int32
go/pkg/mod/github.com/!jigsaw-!code/[email protected]/transport/happyeyeballs.go:194:24: undefined: errors.Join
go/pkg/mod/github.com/!jigsaw-!code/[email protected]/transport/happyeyeballs.go:242:22: undefined: errors.Join

from outline-sdk.

jyyi1 avatar jyyi1 commented on August 26, 2024

Hi @alexlii1971 , sorry about the inconvenience, if @latest does not work for you, you can always use the commit ID tag instead, for example:

go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@7294484

from outline-sdk.

cinsort avatar cinsort commented on August 26, 2024

Hi @jyyi1, having troubles running previous command on Ubuntu 22.04:

# github.com/Jigsaw-Code/outline-sdk/network/lwip2transport
go/pkg/mod/github.com/!jigsaw-!code/[email protected]/network/lwip2transport/device.go:35:13: undefined: lwip.LWIPStack
go/pkg/mod/github.com/!jigsaw-!code/[email protected]/network/lwip2transport/device.go:83:15: undefined: lwip.NewLWIPStack
go/pkg/mod/github.com/!jigsaw-!code/[email protected]/network/lwip2transport/device.go:90:7: undefined: lwip.RegisterOutputFn

from outline-sdk.

jyyi1 avatar jyyi1 commented on August 26, 2024

Hi @cinsort , this seems to be a Go or C/C++ compiler issue. We are using a native LwIP network stack defined here: https://github.com/eycorsican/go-tun2socks/blob/master/core/lwip.go#L21-L25 . That requires CGO_ENABLED=1 and a native C/C++ compiler installed in the system. And also GOOS needs to be linux as well.

You may confirm these setting by running go env. Also, please use go version 1.21+ to run the command.

from outline-sdk.

ElGrats avatar ElGrats commented on August 26, 2024

Hi @cinsort , this seems to be a Go or C/C++ compiler issue. We are using a native LwIP network stack defined here: https://github.com/eycorsican/go-tun2socks/blob/master/core/lwip.go#L21-L25 . That requires CGO_ENABLED=1 and a native C/C++ compiler installed in the system. And also GOOS needs to be linux as well.

You may confirm these setting by running go env. Also, please use go version 1.21+ to run the command.

and what to do?

from outline-sdk.

ElGrats avatar ElGrats commented on August 26, 2024

[ERROR] 2024/05/28 05:30:05 failed to configure system DNS: failed to backup DNS config file '/etc/resolv.conf.head' to '/etc/resolv.head.outlinecli.backup': rename /etc/resolv.conf.head /etc/resolv.head.outlinecli.backup: no such file or directory

from outline-sdk.

jyyi1 avatar jyyi1 commented on August 26, 2024

[ERROR] 2024/05/28 05:30:05 failed to configure system DNS: failed to backup DNS config file '/etc/resolv.conf.head' to '/etc/resolv.head.outlinecli.backup': rename /etc/resolv.conf.head /etc/resolv.head.outlinecli.backup: no such file or directory

Hi @ElGrats , this is a known issue and there is a PR to fix it: #203. It's not quite ready yet, but feel free to contribute to it!

In the meantime, you can work-around the problem by creating an empty file named /etc/resolv.conf.head.

from outline-sdk.

adequacy1 avatar adequacy1 commented on August 26, 2024

What do I do with this error?

# go run github.com/Jigsaw-Code/outline-sdk/x/examples/outline-cli@latest -transport "ss://Y2hhY2hh[...hidden...]wNzU0#127+%D0%92%D1%81%D1%8F%D0%BA%D0%B8%D0%B9"
OutlineVPN CLI (experimental)
[INFO] 2024/07/24 22:06:25 updated global IPv6 support: false
[INFO] 2024/07/24 22:06:25 updated global IPv6 support: true
[ERROR] 2024/07/24 22:06:25 failed to create OutlineDevice: invalid server hostname: lookup Y2hhY2hh[...hidden...]wNzU0: no such host

It looks like it's trying to resolve the entire encoded string as a hostname.

from outline-sdk.

jyyi1 avatar jyyi1 commented on August 26, 2024

Hi @adequacy1 , please make sure you are using a valid Outline access key (example key: ss://Y2hhY2hhMjAtaWV0Zi1wb2x5MTMwNTo1UkVmeFRqbHR6Mkw@outline-server.example.com:17178/?outline=1). I don't see any @ or : or port numbers in your key, and they are all required.

from outline-sdk.

adequacy1 avatar adequacy1 commented on August 26, 2024

Got it. This is the key to VPN Generator (vpngen.org). I thought it was your colleagues. But no, they changed the format of the key and thus made it impossible to use them on many linux distributions. It's just strange that the same key is normally accepted by your other Outline GUI clients.
Update: Added missing parameters to the key, outline-cli starts, but no connection, no site opens. Arch linux updated. Is there any way to do debugging?

from outline-sdk.

jyyi1 avatar jyyi1 commented on August 26, 2024

I see, we don't have any information about vpngen.org. It's possible their new keys don't work with Outline. For troubleshooting, check the source code here: https://github.com/Jigsaw-Code/outline-sdk/blob/main/x/examples/outline-cli/app_linux.go

Maybe double check your DNS settings (no internet if using a local DNS like 192.168.x.x) and, whether the server supports
TCP/UDP over Shadowsocks.

from outline-sdk.

adequacy1 avatar adequacy1 commented on August 26, 2024

Now vpngen.org has corrected the issuing of keys and they started to work normally with outline-cli. But I found it more convenient to use shadowsocks-rust client in socks-proxy mode (the same keys work with it). Thank you for your answers, it made a lot of sense!

from outline-sdk.

jyyi1 avatar jyyi1 commented on August 26, 2024

Thanks for the information, I will close this issue.

from outline-sdk.

Related Issues (20)

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.