Git Product home page Git Product logo

openconnect-rs's Introduction

OpenConnect for Rust

GitHub License Crates.io Version GitHub Release

GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Actions Workflow Status GitHub Actions Workflow Status

This is a cross-platform GUI client for OpenConnect, written in Rust and designed to work seamlessly on Windows, Linux, and macOS desktop systems. The program utilizes various technologies including MSYS2, Tauri, React, and NextUI. It provides a user-friendly interface for connecting to VPN servers using both password and OIDC authentication methods.

Features

  • Cross-platform compatibility (Windows, Linux, macOS)
  • Easy-to-use GUI interface
  • Support for both password and OIDC authentication
  • Built with MSYS2, Tauri, React, and NextUI

Screenshots

Main

Edit

Connect

Installation of Client

  • GUI:

    • Supports Windows(x64), Linux(x64), and macOS(aarch64, x64)

    • Download can be found in Releases

  • CLI install:

    • Only supports Linux(x64) and macOS(aarch64, x64)

    • Run the following command in your terminal:

      curl -sL https://raw.githubusercontent.com/hlhr202/Openconnect-RS/main/install-cli.sh | bash

Usage of CLI client

  • Run the following command in your terminal:

    openconnect --help

    This will print the following help message:

    A CLI client to connect to VPN using OpenConnect
    
    Usage: openconnect <COMMAND>
    
    Commands:
      start         Connect to a VPN server and run in daemon mode [aliases: connect, run]
      status        Get the current VPN connection status [aliases: info, stat]
      stop          Close the current connection and exit the daemon process [aliases: kill, disconnect]
      add           Add new VPN server configuration to local config file [aliases: new, create, insert]
      import        Import VPN server configurations from a base64 encoded string
      export        Export VPN server configurations to a base64 encoded string
      delete        Delete a VPN server configuration from local config file [aliases: rm, remove, del]
      list          List all VPN server configurations in local config file [aliases: ls, l]
      logs          Show logs of the daemon process [aliases: log]
      gen-complete  Generate shell completion script
      help          Print this message or the help of the given subcommand(s)
    
    Options:
      -h, --help     Print help
      -V, --version  Print version
    
  • For each subcommand, you can run openconnect <COMMAND> --help to get more information

    For example:

    openconnect start --help

    This will print the following help message:

    Connect to a VPN server and run in daemon mode
    
    Usage: openconnect start [OPTIONS] <NAME>
    
    Arguments:
      <NAME>  The server name saved in local config file to connect to
    
    Options:
      -c, --config-file <CONFIG_FILE>  The path to the local config file
      -h, --help                       Print help
    

Generate shell completion script

  • ZSH (Oh My Zsh!)

    mkdir -p ~/.oh-my-zsh/custom/plugins/openconnect
    openconnect gen-complete zsh > ~/.oh-my-zsh/custom/plugins/openconnect/openconnect.plugin.zsh

    Then add openconnect to the plugins array in your ~/.zshrc file:

  • Bash

    mkdir -p ~/.bash_completion
    openconnect gen-complete bash > ~/.bash_completion/openconnect
    echo "source ~/.bash_completion/openconnect" >> ~/.bashrc

Build

  • Read the System Requirements for environment setup
  • Modify it to fit your environment (For automatic setup, its WIP)
  • For windows, since openconnect provides GNU automake, we currently only support MSYS2-MINGW64 and x86_64-pc-windows-gnu toolchain
    • Install MSYS2
    • Install x86_64-pc-windows-gnu toolchain with command rustup default stable-x86_64-pc-windows-gnu
    • Run cargo under MINGW64 shell

License

Since Openconnect is released under LGPL license, the core libraries (openconnect-core and openconnect-sys) of this project is licensed under the GNU Lesser General Public License (LGPL). See the LICENSE file for details.

For some part of this library (openconnect-oidc), it is licensed under the MIT license.

Acknowledgements

Special thanks to (MORE THAN) the following projects and technologies for making this project possible:

Roadmap

Openconnect sys

  • Automatically build openconnect
  • Automatically search library path
    • Optimize search path for more cases
  • better docs

Openconnect core

  • implement safe ffi
  • implement username + password login
  • implement cookie login
  • implement ssl certificate validation
  • implement public key login
  • implement various auth methods
  • better docs

Client

  • implement username + password login
  • implement oidc login
  • implement logs
    • tracing file rotation
    • optimize log search
  • implement CLI
    • Add/Remove configurations
    • Daemon mode
    • Password login
    • OIDC login

openconnect-rs's People

Contributors

dependabot[bot] avatar hlhr202 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

openconnect-rs's Issues

Linux GUI?

Hi there,

Thanks for the tool, just wondering if is it a Linux GUI installation? as I can't find it on the releases.

Cheers

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.