Code Monkey home page Code Monkey logo

fynetailscale's Introduction

fynetailscale

A set of widgets to make it easier to write Fyne application that connect to a tailscale network

Login

To automatically display a QRCode and HyperLink pointing to the tailscale authentication service when joining a tailscale network, you can use the following helper:

func NewLogin(ctx context.Context, win fyne.Window, lc *tailscale.LocalClient, done func(succeeded bool)) io.Closer

This helper will display a dialog with an infinite progress bar until tailscale indicate that the user should login by following an URL to tailscale. This URL will be displayed in the form of a QR code and an hyperlink. This give the possibility to easily use a different device to log in and never type a password on the machine joining the tailscale network. Clicking on the hyperlink will use the default browser of the machine the fyne application is running on to authenticate to tailscale.

Status

This provide the ability to monitor the connection to the tailscale network and display it in a Fyne widget.Label.

func NewStatus(ctx context.Context, lc *tailscale.LocalClient) *widget.Label

It is possible to get a String data binding that you can use how you want to get the tailscale connection status.

func NewStatusBinding(ctx context.Context, lc *tailscale.LocalClient) binding.String

QR code

This helper are here to facilitate displaying an URL in the form of a QRCode along with a Fyne widget.Hyperlink.

func NewQRCode(u *url.URL) (*QRCode, error)

func (r *QRCode) SetURL(url *url.URL) error

Example

For a demo, you can install the provided application that allow you to do HTTP Get inside your tailscale network with the following command:

$ go install github.com/fyne-labs/fynetailscale/cmd/demo@latest

demo

fynetailscale's People

Contributors

bluebugs avatar

Stargazers

Daniil Zuev avatar

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.