diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index b7d512c0..e3958c8c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -16,7 +16,7 @@ Double check that you are running the latest version, see [the releases page](ht # Check if your issue is in the known issues list -The known issues list is available here: +The known issues list is available here: # OS/Distribution diff --git a/README.md b/README.md index e7ef7134..5f9f21d9 100644 --- a/README.md +++ b/README.md @@ -1,36 +1,13 @@ -# Linux eduVPN client +# eduVPN for Linux -This is the GNU/Linux desktop client for eduVPN. It interacts with NetworkManager to set up the VPN and it supports OpenVPN + WireGuard. +This is the Linux desktop client for eduVPN. -Read more about eduVPN on the eduVPN website http://eduvpn.org/. +Read more about the eduVPN project on the eduVPN website https://www.eduvpn.org/. -# Installation +# Documentation -The recommended way to install the eduVPN client for Linux is using one of the packages for your Linux distribution. See the installation document: - -https://python-eduvpn-client.readthedocs.io/en/latest/installation.html - -# Reporting an issue - -To report an issue you can make an issue in this repository: - -https://github.com/eduvpn/python-eduvpn-client/issues/new/choose - -Make sure to follow the issue template closely. - -If you prefer e-mail, you can send one to: - -mailto:eduvpn-support@lists.geant.org - -# Other documentation - -The full documentation for this client is available on: - -https://python-eduvpn-client.readthedocs.io/ - -if you're looking for eduVPN server documentation, see: - -https://docs.eduvpn.org/ +The docs for this client are available on: +https://docs.eduvpn.org/client/linux # License diff --git a/doc/.gitignore b/doc/.gitignore index e6b110ed..46ff2463 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,2 +1 @@ -_build/ -_static/ +/site/ diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 8994227c..00000000 --- a/doc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = python -msphinx -SPHINXPROJ = python-eduvpn-client -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/doc/_static/.phony b/doc/_static/.phony deleted file mode 100644 index e69de29b..00000000 diff --git a/doc/build.sh b/doc/build.sh new file mode 100755 index 00000000..365bd767 --- /dev/null +++ b/doc/build.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +mkdocs build diff --git a/doc/conf.py b/doc/conf.py deleted file mode 100644 index e9d3aec9..00000000 --- a/doc/conf.py +++ /dev/null @@ -1,195 +0,0 @@ -# -*- coding: utf-8 -*- -# -# python-eduvpn-client documentation build configuration file, created by -# sphinx-quickstart on Wed Aug 2 15:37:37 2017. -# -# This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys -from typing import Dict -from unittest.mock import MagicMock - -sys.path.insert(0, os.path.abspath('..')) -from eduvpn import __version__ - - -class Mock(MagicMock): - @classmethod - def __getattr__(cls, name): - m = MagicMock() - - -MOCK_MODULES = ['pygtk', 'gtk', 'gobject', 'nacl', 'NetworkManager', - 'dbus', 'nacl.encoding', 'nacl.signing', 'dbus.service', - 'cryptography', 'cryptography.x509', 'cryptography.x509.oid', - 'cryptography', 'cryptography.hazmat', - 'cryptography.hazmat.backends', 'OpenSSL.crypto', - 'OpenSSL.SSL',] - - -sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES) - - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autodoc', - 'sphinx.ext.coverage', - 'sphinx.ext.napoleon', -] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = u'python-eduvpn-client' -author = u'Jeroen Wijenbergh' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = __version__ -# The full version, including alpha/beta/rc tags. -release = __version__ - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -html_theme = 'sphinx_rtd_theme' - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', - 'donate.html', - ] -} - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'python-eduvpn-clientdoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements: Dict[str, str] = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'python-eduvpn-client.tex', u'python-eduvpn-client Documentation', - u'Gijs Molenaar', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'python-eduvpn-client', u'python-eduvpn-client Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'python-eduvpn-client', u'python-eduvpn-client Documentation', - author, 'python-eduvpn-client', 'One line description of project.', - 'Miscellaneous'), -] - - -# Example configuration for intersphinx: refer to the Python standard library. -intersphinx_mapping = {'https://docs.python.org/': None} diff --git a/doc/developer.rst b/doc/developer.rst deleted file mode 100644 index 963097a6..00000000 --- a/doc/developer.rst +++ /dev/null @@ -1,87 +0,0 @@ -Developer notes -=============== - -Notes about code ----------------- - -Use the decorator ``eduvpn.utils.run_in_background_thread`` to schedule long running action -in the background to avoid blocking the main thread. - -Never call GTK functions directly from a background thread, -use ``eduvpn.utils.run_in_main_gtk_thread`` to decorate functions -that must run on the main thread (eg. UI updates). - -This library closely follows eduvpn-common. To see the API for that, -`see here -`_ - -Most of the interaction with this library is in ``eduvpn.app``, the ui -is in ``eduvpn.ui.ui`` and the cli in ``eduvpn.cli``. In these files -you can see lots of state transitions defined. The state transitions -that are used are closely in line with the Finite State machine from -the eduvpn-common library. A figure for this state machine can be -`found here -`_. - - -Running the tests ------------------ - -To run the automated tests, -use the following command from the root of the project. - -.. code-block:: console - - $ pytest - -How to make a release ---------------------- - -Prepare the code -^^^^^^^^^^^^^^^^ - -* Determine version number (for example 4.1.3) - -* Compose a list of changes (check issue tracker) - -* Make sure the test suite runs with python3 - -* Set version number in ``setup.py``, and ``eduvpn.spec`` and ensure eduvpn-common has the targeted version set - -* add changes to CHANGES.md - -* Commit - -* Press release button on github. List all changes here also - -* Check if GitHub Actions builds. - -* The release will trigger a build on readthedocs, but the active version still needs to be set manually here: - https://readthedocs.org/projects/python-eduvpn-client/versions/ - -Upload to PyPi -^^^^^^^^^^^^^^ - -do a manual wheel upload using `twine `_: - -.. code-block:: console - - $ rm dist/* - $ python setup.py bdist_wheel sdist - $ twine upload dist/* - -There is also a make shortcut: - -.. code-block:: console - - $ make twine-upload - -You should also make sure that eduvpn-common is updated in PyPi! Update in the test PyPi first so that CI passes. - -Building RPMs -^^^^^^^^^^^^^^^^^^^^^^ -We use `builder.rpm `_, to build the RPM packages. - -Build Debian packages -^^^^^^^^^^^^^^^^^^^^^ -We use `nbuilder.deb `_, to build the DEB packages. diff --git a/doc/eduvpn_theme/css/screen.css b/doc/eduvpn_theme/css/screen.css new file mode 100644 index 00000000..5dedb9d4 --- /dev/null +++ b/doc/eduvpn_theme/css/screen.css @@ -0,0 +1,26 @@ +:root { + --accent: #e24301; +} + +div.page-footer { + text-align: center; + font-size: small; +} + +@media screen and (min-width: 800px) { + body > header { + background-image: url("../img/eduvpn_logo.png"); + background-repeat: no-repeat; + background-position: 5% 50%; + } + + @media (prefers-color-scheme: dark) { + body > header { + background-image: url("../img/eduvpn_logo_dark.png"); + } + } +} + +main a.headerlink { + margin-left: 0.15em; +} diff --git a/doc/eduvpn_theme/css/simple.css b/doc/eduvpn_theme/css/simple.css new file mode 100644 index 00000000..fd0fbddb --- /dev/null +++ b/doc/eduvpn_theme/css/simple.css @@ -0,0 +1,685 @@ +/* Global variables. */ +:root, +::backdrop { + /* Set sans-serif & mono fonts */ + --sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir, + "Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica, + "Helvetica Neue", sans-serif; + --mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace; + --standard-border-radius: 5px; + + /* Default (light) theme */ + --bg: #fff; + --accent-bg: #f5f7ff; + --text: #212121; + --text-light: #585858; + --border: #898EA4; + --accent: #0d47a1; + --code: #d81b60; + --preformatted: #444; + --marked: #ffdd33; + --disabled: #efefef; +} + +/* Dark theme */ +@media (prefers-color-scheme: dark) { + :root, + ::backdrop { + color-scheme: dark; + --bg: #212121; + --accent-bg: #2b2b2b; + --text: #dcdcdc; + --text-light: #ababab; + --accent: #ffb300; + --code: #f06292; + --preformatted: #ccc; + --disabled: #111; + } + /* Add a bit of transparency so light media isn't so glaring in dark mode */ + img, + video { + opacity: 0.8; + } +} + +/* Reset box-sizing */ +*, *::before, *::after { + box-sizing: border-box; +} + +/* Reset default appearance */ +textarea, +select, +input, +progress { + appearance: none; + -webkit-appearance: none; + -moz-appearance: none; +} + +html { + /* Set the font globally */ + font-family: var(--sans-font); + scroll-behavior: smooth; +} + +/* Make the body a nice central block */ +body { + color: var(--text); + background-color: var(--bg); + font-size: 1.15rem; + line-height: 1.5; + display: grid; + grid-template-columns: 1fr min(60rem, 90%) 1fr; + margin: 0; +} +body > * { + grid-column: 2; +} + +/* Make the header bg full width, but the content inline with body */ +body > header { + background-color: var(--accent-bg); + border-bottom: 1px solid var(--border); + text-align: center; + padding: 0 0.5rem 2rem 0.5rem; + grid-column: 1 / -1; +} + +body > header h1 { + max-width: 1200px; + margin: 1rem auto; +} + +body > header p { + max-width: 40rem; + margin: 1rem auto; +} + +/* Add a little padding to ensure spacing is correct between content and header > nav */ +main { + padding-top: 1.5rem; +} + +body > footer { + margin-top: 4rem; + padding: 2rem 1rem 1.5rem 1rem; + color: var(--text-light); + font-size: 0.9rem; + text-align: center; + border-top: 1px solid var(--border); +} + +/* Format headers */ +h1 { + font-size: 3rem; +} + +h2 { + font-size: 2.6rem; + margin-top: 3rem; +} + +h3 { + font-size: 2rem; + margin-top: 3rem; +} + +h4 { + font-size: 1.44rem; +} + +h5 { + font-size: 1.15rem; +} + +h6 { + font-size: 0.96rem; +} + +p { + margin: 1.5rem 0; +} + +/* Prevent long strings from overflowing container */ +p, h1, h2, h3, h4, h5, h6 { + overflow-wrap: break-word; +} + +/* Fix line height when title wraps */ +h1, +h2, +h3 { + line-height: 1.1; +} + +/* Reduce header size on mobile */ +@media only screen and (max-width: 720px) { + h1 { + font-size: 2.5rem; + } + + h2 { + font-size: 2.1rem; + } + + h3 { + font-size: 1.75rem; + } + + h4 { + font-size: 1.25rem; + } +} + +/* Format links & buttons */ +a, +a:visited { + color: var(--accent); +} + +a:hover { + text-decoration: none; +} + +button, +.button, +a.button, /* extra specificity to override a */ +input[type="submit"], +input[type="reset"], +input[type="button"], +label[type="button"] { + border: 1px solid var(--accent); + background-color: var(--accent); + color: var(--bg); + padding: 0.5rem 0.9rem; + text-decoration: none; + line-height: normal; +} + +.button[aria-disabled="true"], +input:disabled, +textarea:disabled, +select:disabled, +button[disabled] { + cursor: not-allowed; + background-color: var(--disabled); + border-color: var(--disabled); + color: var(--text-light); +} + +input[type="range"] { + padding: 0; +} + +/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */ +abbr[title] { + cursor: help; + text-decoration-line: underline; + text-decoration-style: dotted; +} + +button:enabled:hover, +.button:not([aria-disabled="true"]):hover, +input[type="submit"]:enabled:hover, +input[type="reset"]:enabled:hover, +input[type="button"]:enabled:hover, +label[type="button"]:hover { + filter: brightness(1.4); + cursor: pointer; +} + +.button:focus-visible, +button:focus-visible:where(:enabled), +input:enabled:focus-visible:where( + [type="submit"], + [type="reset"], + [type="button"] +) { + outline: 2px solid var(--accent); + outline-offset: 1px; +} + +/* Format navigation */ +header > nav { + font-size: 1rem; + line-height: 2; + padding: 1rem 0 0 0; +} + +/* Use flexbox to allow items to wrap, as needed */ +header > nav ul, +header > nav ol { + align-content: space-around; + align-items: center; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; + list-style-type: none; + margin: 0; + padding: 0; +} + +/* List items are inline elements, make them behave more like blocks */ +header > nav ul li, +header > nav ol li { + display: inline-block; +} + +header > nav a, +header > nav a:visited { + margin: 0 0.5rem 1rem 0.5rem; + border: 1px solid var(--border); + border-radius: var(--standard-border-radius); + color: var(--text); + display: inline-block; + padding: 0.1rem 1rem; + text-decoration: none; +} + +header > nav a:hover, +header > nav a.current, +header > nav a[aria-current="page"] { + border-color: var(--accent); + color: var(--accent); + cursor: pointer; +} + +/* Reduce nav side on mobile */ +@media only screen and (max-width: 720px) { + header > nav a { + border: none; + padding: 0; + text-decoration: underline; + line-height: 1; + } +} + +/* Consolidate box styling */ +aside, details, pre, progress { + background-color: var(--accent-bg); + border: 1px solid var(--border); + border-radius: var(--standard-border-radius); + margin-bottom: 1rem; +} + +aside { + font-size: 1rem; + width: 30%; + padding: 0 15px; + margin-inline-start: 15px; + float: right; +} +*[dir="rtl"] aside { + float: left; +} + +/* Make aside full-width on mobile */ +@media only screen and (max-width: 720px) { + aside { + width: 100%; + float: none; + margin-inline-start: 0; + } +} + +article, fieldset, dialog { + border: 1px solid var(--border); + padding: 1rem; + border-radius: var(--standard-border-radius); + margin-bottom: 1rem; +} + +article h2:first-child, +section h2:first-child { + margin-top: 1rem; +} + +section { + border-top: 1px solid var(--border); + border-bottom: 1px solid var(--border); + padding: 2rem 1rem; + margin: 3rem 0; +} + +/* Don't double separators when chaining sections */ +section + section, +section:first-child { + border-top: 0; + padding-top: 0; +} + +section:last-child { + border-bottom: 0; + padding-bottom: 0; +} + +details { + padding: 0.7rem 1rem; +} + +summary { + cursor: pointer; + font-weight: bold; + padding: 0.7rem 1rem; + margin: -0.7rem -1rem; + word-break: break-all; +} + +details[open] > summary + * { + margin-top: 0; +} + +details[open] > summary { + margin-bottom: 0.5rem; +} + +details[open] > :last-child { + margin-bottom: 0; +} + +/* Format tables */ +table { + border-collapse: collapse; + margin: 1.5rem 0; +} + +td, +th { + border: 1px solid var(--border); + text-align: start; + padding: 0.5rem; +} + +th { + background-color: var(--accent-bg); + font-weight: bold; +} + +tr:nth-child(even) { + /* Set every other cell slightly darker. Improves readability. */ + background-color: var(--accent-bg); +} + +table caption { + font-weight: bold; + margin-bottom: 0.5rem; +} + +/* Format forms */ +textarea, +select, +input, +button, +.button { + font-size: inherit; + font-family: inherit; + padding: 0.5rem; + margin-bottom: 0.5rem; + border-radius: var(--standard-border-radius); + box-shadow: none; + max-width: 100%; + display: inline-block; +} +textarea, +select, +input { + color: var(--text); + background-color: var(--bg); + border: 1px solid var(--border); +} +label { + display: block; +} +textarea:not([cols]) { + width: 100%; +} + +/* Add arrow to drop-down */ +select:not([multiple]) { + background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%), + linear-gradient(135deg, var(--text) 51%, transparent 49%); + background-position: calc(100% - 15px), calc(100% - 10px); + background-size: 5px 5px, 5px 5px; + background-repeat: no-repeat; + padding-inline-end: 25px; +} +*[dir="rtl"] select:not([multiple]) { + background-position: 10px, 15px; +} + +/* checkbox and radio button style */ +input[type="checkbox"], +input[type="radio"] { + vertical-align: middle; + position: relative; + width: min-content; +} + +input[type="checkbox"] + label, +input[type="radio"] + label { + display: inline-block; +} + +input[type="radio"] { + border-radius: 100%; +} + +input[type="checkbox"]:checked, +input[type="radio"]:checked { + background-color: var(--accent); +} + +input[type="checkbox"]:checked::after { + /* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */ + content: " "; + width: 0.18em; + height: 0.32em; + border-radius: 0; + position: absolute; + top: 0.05em; + left: 0.17em; + background-color: transparent; + border-right: solid var(--bg) 0.08em; + border-bottom: solid var(--bg) 0.08em; + font-size: 1.8em; + transform: rotate(45deg); +} +input[type="radio"]:checked::after { + /* creates a colored circle for the checked radio button */ + content: " "; + width: 0.25em; + height: 0.25em; + border-radius: 100%; + position: absolute; + top: 0.125em; + background-color: var(--bg); + left: 0.125em; + font-size: 32px; +} + +/* Makes input fields wider on smaller screens */ +@media only screen and (max-width: 720px) { + textarea, + select, + input { + width: 100%; + } +} + +/* Set a height for color input */ +input[type="color"] { + height: 2.5rem; + padding: 0.2rem; +} + +/* do not show border around file selector button */ +input[type="file"] { + border: 0; +} + +/* Misc body elements */ +hr { + border: none; + height: 1px; + background: var(--border); + margin: 1rem auto; +} + +mark { + padding: 2px 5px; + border-radius: var(--standard-border-radius); + background-color: var(--marked); + color: black; +} + +mark a { + color: #0d47a1; +} + +img, +video { + max-width: 100%; + height: auto; + border-radius: var(--standard-border-radius); +} + +figure { + margin: 0; + display: block; + overflow-x: auto; +} + +figcaption { + text-align: center; + font-size: 0.9rem; + color: var(--text-light); + margin-bottom: 1rem; +} + +blockquote { + margin-inline-start: 2rem; + margin-inline-end: 0; + margin-block: 2rem; + padding: 0.4rem 0.8rem; + border-inline-start: 0.35rem solid var(--accent); + color: var(--text-light); + font-style: italic; +} + +cite { + font-size: 0.9rem; + color: var(--text-light); + font-style: normal; +} + +dt { + color: var(--text-light); +} + +/* Use mono font for code elements */ +code, +pre, +pre span, +kbd, +samp { + font-family: var(--mono-font); + color: var(--code); +} + +kbd { + color: var(--preformatted); + border: 1px solid var(--preformatted); + border-bottom: 3px solid var(--preformatted); + border-radius: var(--standard-border-radius); + padding: 0.1rem 0.4rem; +} + +pre { + padding: 1rem 1.4rem; + max-width: 100%; + overflow: auto; + color: var(--preformatted); +} + +/* Fix embedded code within pre */ +pre code { + color: var(--preformatted); + background: none; + margin: 0; + padding: 0; +} + +/* Progress bars */ +/* Declarations are repeated because you */ +/* cannot combine vendor-specific selectors */ +progress { + width: 100%; +} + +progress:indeterminate { + background-color: var(--accent-bg); +} + +progress::-webkit-progress-bar { + border-radius: var(--standard-border-radius); + background-color: var(--accent-bg); +} + +progress::-webkit-progress-value { + border-radius: var(--standard-border-radius); + background-color: var(--accent); +} + +progress::-moz-progress-bar { + border-radius: var(--standard-border-radius); + background-color: var(--accent); + transition-property: width; + transition-duration: 0.3s; +} + +progress:indeterminate::-moz-progress-bar { + background-color: var(--accent-bg); +} + +dialog { + max-width: 40rem; + margin: auto; +} + +dialog::backdrop { + background-color: var(--bg); + opacity: 0.8; +} + +@media only screen and (max-width: 720px) { + dialog { + max-width: 100%; + margin: auto 1em; + } +} + +/* Superscript & Subscript */ +/* Prevent scripts from affecting line-height. */ +sup, sub { + vertical-align: baseline; + position: relative; +} + +sup { + top: -0.4em; +} + +sub { + top: 0.3em; +} + +/* Classes for notices */ +.notice { + background: var(--accent-bg); + border: 2px solid var(--border); + border-radius: 5px; + padding: 1.5rem; + margin: 2rem 0; +} diff --git a/doc/eduvpn_theme/img/eduvpn_logo.png b/doc/eduvpn_theme/img/eduvpn_logo.png new file mode 100644 index 00000000..839addfb Binary files /dev/null and b/doc/eduvpn_theme/img/eduvpn_logo.png differ diff --git a/doc/eduvpn_theme/img/eduvpn_logo_dark.png b/doc/eduvpn_theme/img/eduvpn_logo_dark.png new file mode 100644 index 00000000..f1cd43df Binary files /dev/null and b/doc/eduvpn_theme/img/eduvpn_logo_dark.png differ diff --git a/doc/eduvpn_theme/main.html b/doc/eduvpn_theme/main.html new file mode 100644 index 00000000..7e2adaac --- /dev/null +++ b/doc/eduvpn_theme/main.html @@ -0,0 +1,52 @@ + + + + + + + + {% if page.title %}{{ page.title }} - {% endif %}{{ config.site_name }} + + +
+

{{ config.site_name }}

+{% if config.site_description %} +

{{ config.site_description }}

+{% endif %} +{% if nav|length>0 %} + +{% endif %} +
+
+{% if page.toc %} + +{% endif %} + {{ page.content }} +
+ +
+

{{ config.site_name }} - {{ config.site_description }}

+
+ + diff --git a/doc/flow.dia b/doc/flow.dia deleted file mode 100644 index 32b39813..00000000 Binary files a/doc/flow.dia and /dev/null differ diff --git a/doc/flow.png b/doc/flow.png deleted file mode 100644 index e7d859c2..00000000 Binary files a/doc/flow.png and /dev/null differ diff --git a/doc/index.rst b/doc/index.rst deleted file mode 100644 index d077a95c..00000000 --- a/doc/index.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. python-eduvpn-client documentation master file, created by - sphinx-quickstart on Wed Aug 2 15:37:37 2017. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to python-eduvpn-client's documentation! -================================================ - -This is the documentation for the GNU/Linux desktop client and Python API for eduVPN. The Desktop client only works on -Linux, but the command-line interface and most parts of the API are usable on other platforms also. Python 3.6+ is -required. - - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - installation - updating - usage - developer - knownissues - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/doc/installation.rst b/doc/installation.rst deleted file mode 100644 index 313828cd..00000000 --- a/doc/installation.rst +++ /dev/null @@ -1,234 +0,0 @@ -============ -Installation -============ - -The Desktop client only works on Linux. Python 3.6+ is required. It is -recommended to use a deb or rpm package to install the eduVPN client. -You can also install using pip from pypi or directly from Github. We -distribute RPM packages for Fedora, and deb packages for Debian and -Ubuntu. - -.. note:: - - If your target is not supported you can make an issue on the `GitHub `_ and we will see if we can provide it. Right now we only provide `x86_64` packages (we use a compiled dependency), if you want an ARM package for a certain target you can also make an issue. - - -Debian 11 -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ bullseye main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Debian 12 -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ bookworm main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Ubuntu 20.04 -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ focal main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Ubuntu 22.04 -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ jammy main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Ubuntu 22.10 -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ kinetic main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Ubuntu 23.04 -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ lunar main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Linux Mint 20.x -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ focal main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Linux Mint 21.x -====================================== - -.. code-block:: console - - $ sudo apt update - $ sudo apt install apt-transport-https wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ jammy main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt install eduvpn-client - -Fedora (37 & 38) -==================== - -.. code-block:: console - - $ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc - $ sudo rpm --import app+linux@eduvpn.org.asc - $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo - [python-eduvpn-client_v4] - name=eduVPN for Linux 4.x (Fedora $releasever) - baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch - gpgcheck=1 - EOF - $ sudo dnf install eduvpn-client - -CentOS (Stream 9) -================= - -.. code-block:: console - - $ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc - $ sudo rpm --import app+linux@eduvpn.org.asc - $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo - [python-eduvpn-client_v4] - name=eduVPN for Linux 4.x (CentOS Stream 9) - baseurl=https://app.eduvpn.org/linux/v4/rpm/centos-stream+epel-next-9-$basearch - gpgcheck=1 - EOF - $ sudo dnf install eduvpn-client - -Arch (Unofficial) -================= - -There is an unofficial package in the `Arch User Repository (AUR) `_. - - -Pip installation -========================== -We also provide pip packages. These are useful if your distro is not officially supported in our packaging (yet). - -Dependencies ------------- - -To manually install the eduVPN package via Pip you first need to satisfy the dependencies. - -For Debian or Ubuntu: - -.. code-block:: console - - $ sudo apt update - $ sudo apt install \ - gir1.2-nm-1.0 \ - gir1.2-secret-1 \ - gir1.2-gtk-3.0 \ - gir1.2-notify-0.7 \ - libgirepository1.0-dev \ - libdbus-glib-1-dev \ - python3-gi \ - python3-setuptools \ - python3-pytest \ - python3-wheel \ - python3-dbus \ - network-manager-openvpn-gnome - -For Fedora: - -.. code-block:: console - - $ sudo dnf install \ - libnotify \ - libsecret \ - gtk3 \ - python3-dbus \ - python3-gobject \ - python3-pytest \ - python3-cairo-devel \ - gobject-introspection-devel \ - cairo-gobject-devel \ - dbus-python-devel - -Pip commands ------------- - -You can then continue with installing via Pip: - -.. code-block:: console - - $ pip install "eduvpn-client[gui]" - -Or, if you want to try out the bleeding edge development version: - -.. code-block:: console - - $ pip install git+https://github.com/eduvpn/python-eduvpn-client.git - - -Issues -====== - -If you experience any issues you could and should report them at our -`issue tracker `_. Please don't forget to mention your OS, -method of installation, eduVPN client version and instructions on how to reproduce the problem. If you have a problem -enabling your VPN connection please also examine the `journalctl -u NetworkManager` logs. The log file of the eduVPN app -can also help us figure out the problem, running the gui or cli in debug mode (-d) flag will print debug logging to the log file -located at: ~/.config/eduvpn/log or ~/.config/letsconnect/log for Let's Connect!. - - -Source code -=========== - - -Development of this project takes place on `github `_. You -can find the source code and all releases there. - -Contributing -============ - -Contributions are more than welcome! If you experience any problems let us know in the bug tracker. We accept patches -in the form of github pull requests. Please make sure your code works with python3 and is pycodestyle (formerly pep8) compatible. -Also make sure the test suite actually passes all tests. Translations are also welcome! - - -.. _Makefile: https://github.com/eduvpn/python-eduvpn-client/blob/master/Makefile diff --git a/doc/knownissues.rst b/doc/knownissues.rst deleted file mode 100644 index 1312ca58..00000000 --- a/doc/knownissues.rst +++ /dev/null @@ -1,60 +0,0 @@ -============ -Known issues -============ - -This chapter contains some known issues for the Linux client that are not possible or hacky to fix in the client itself - -OpenVPN <= 2.5.7 and OpenSSL 3 -============================== - -When your distribution uses OpenSSL 3 and an OpenVPN version before 2.5.8, you might get the following error in the NetworkManager logging after connecting to a server that uses OpenVPN: - -.. code-block:: console - - $ Cipher BF-CBC not supported - -This means that OpenVPN is trying to initialize this legacy/deprecated cipher, even though it is not used in the config. The fix is in OpenVPN version starting at 2.5.8. - -Could not find source connection/NetworkManager not managing connections -======================================================================== - -It could be the case where the client does not work due to the fact that NetworkManager does not manage your connections. - -You could see errors such as: - -.. code-block:: console - - $ nm-manager-error-quark: Could not find source connection. - -To fix this, make sure that NetworkManager is managing your primary interface. -For e.g. Debian systems you can follow the instructions on `The Debian Wiki `_ and then reboot. Pull requests are welcome to make the client work without NetworkManager. - -Version GLIBC_2.32 not found -============================ - -If you install the client using instructions for a different distribution, you can have these GLIBC errors showing when the client is trying to load eduvpn-common. To fix this make sure to uninstall *all* the packages you currently have installed (Pip, DEB/RPM) and then follow the instructions for your appropriate distribution. See `Installation <./installation.html>`_. - -If you have followed the right instructions and are still getting these errors you can make an issue. - - -GUI does not launch due to getting attribute errors -=================================================== - -If your GUI does not launch and you get errors such as: - -.. code-block:: console - - $ File "/usr/lib/python3/dist-packages/eduvpn/ui/ui.py", line 165, in setup - $ self.common_version.set_text(f"{commonver}") - $ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - $ AttributeError: 'NoneType' object has no attribute 'set_text' - -It can mean that you have installed multiple versions of the client. If you're trying to use the DEB/RPM version see if: - -.. code-block:: console - - $ pip uninstall eduvpn-client[gui] - -Does anything. - -Otherwise, if there are files in `~/.local/share/eduvpn` try to move them to e.g. `~/.local/share/eduvpn2`. If the client then still doesn't launch you can make an issue. diff --git a/doc/md/img/configured.png b/doc/md/img/configured.png new file mode 100644 index 00000000..241eca21 Binary files /dev/null and b/doc/md/img/configured.png differ diff --git a/doc/md/img/connected.png b/doc/md/img/connected.png new file mode 100644 index 00000000..ddb79705 Binary files /dev/null and b/doc/md/img/connected.png differ diff --git a/doc/md/img/desktopentry.png b/doc/md/img/desktopentry.png new file mode 100644 index 00000000..00834dad Binary files /dev/null and b/doc/md/img/desktopentry.png differ diff --git a/doc/md/index.md b/doc/md/index.md new file mode 100644 index 00000000..7e79ca82 --- /dev/null +++ b/doc/md/index.md @@ -0,0 +1,10 @@ +# About + +This is the documentation about the eduVPN for Linux client. + +This documentation provides an end-user installation, usage and troubleshooting guide. + +Read more about the eduVPN project on the [eduVPN website](https://www.eduvpn.org/). + +![eduVPN configured](./img/configured.png) +![eduVPN connected](./img/connected.png) diff --git a/doc/md/installation.md b/doc/md/installation.md new file mode 100644 index 00000000..6942d807 --- /dev/null +++ b/doc/md/installation.md @@ -0,0 +1,193 @@ +# Installation + +The Desktop client only works on Linux. It is recommended to use a Deb +or RPM package to install the eduVPN client. You can also install +using Pip from PyPi or directly from GitHub. We distribute RPM +packages for Fedora, and Deb packages for Debian and Ubuntu. + +> **Note** +> If your target is not supported you can make an issue on the +> [GitHub repository](https://github.com/eduvpn/python-eduvpn-client) and we will see +> if we can provide it. Right now we only provide x86_64 +> packages (we use a compiled dependency), if you want an ARM package for +> a certain target you can also make an issue. + +## Debian 11 + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ bullseye main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Debian 12 + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ bookworm main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Ubuntu 20.04 + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ focal main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Ubuntu 22.04 + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ jammy main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Ubuntu 22.10 + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ kinetic main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Ubuntu 23.04 + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ lunar main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Linux Mint 20.x + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ focal main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Linux Mint 21.x + +``` console +$ sudo apt update +$ sudo apt install apt-transport-https wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ jammy main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt install eduvpn-client +``` + +## Fedora (37 & 38) + +``` console +$ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc +$ sudo rpm --import app+linux@eduvpn.org.asc +$ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo +[python-eduvpn-client_v4] +name=eduVPN for Linux 4.x (Fedora $releasever) +baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch +gpgcheck=1 +EOF +$ sudo dnf install eduvpn-client +``` + +## CentOS (Stream 9) + +``` console +$ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc +$ sudo rpm --import app+linux@eduvpn.org.asc +$ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo +[python-eduvpn-client_v4] +name=eduVPN for Linux 4.x (CentOS Stream 9) +baseurl=https://app.eduvpn.org/linux/v4/rpm/centos-stream+epel-next-9-$basearch +gpgcheck=1 +EOF +$ sudo dnf install eduvpn-client +``` + +## Arch (Unofficial) + +There is an unofficial package in the [Arch User Repository +(AUR)](https://aur.archlinux.org/packages/python-eduvpn-client/). + +## Pip installation + +We also provide Pip packages. These are useful if your distro is not +officially supported in our packaging (yet). + +### Dependencies + +To manually install the eduVPN package via Pip you first need to satisfy +the dependencies. + +For Debian or Ubuntu: + +``` console +$ sudo apt update +$ sudo apt install \ + gir1.2-nm-1.0 \ + gir1.2-secret-1 \ + gir1.2-gtk-3.0 \ + gir1.2-notify-0.7 \ + libgirepository1.0-dev \ + libdbus-glib-1-dev \ + python3-gi \ + python3-setuptools \ + python3-pytest \ + python3-wheel \ + python3-dbus \ + network-manager-openvpn-gnome +``` + +For Fedora: + +``` console +$ sudo dnf install \ + libnotify \ + libsecret \ + gtk3 \ + python3-dbus \ + python3-gobject \ + python3-pytest \ + python3-cairo-devel \ + gobject-introspection-devel \ + cairo-gobject-devel \ + dbus-python-devel +``` + +### Pip commands + +You can then continue with installing via Pip: + +``` console +$ pip install "eduvpn-client[gui]" +``` + +Or, if you want to try out the bleeding edge development version: + +``` console +$ pip install git+https://github.com/eduvpn/python-eduvpn-client.git +``` diff --git a/doc/md/support.md b/doc/md/support.md new file mode 100644 index 00000000..f6057ec5 --- /dev/null +++ b/doc/md/support.md @@ -0,0 +1,96 @@ +# Support + +If you experience any issues you could and should report them at our +[issue tracker](https://github.com/eduvpn/python-eduvpn-client/issues). +Please don't forget to mention: + +- Your distribution +- Method of installation +- The eduVPN client version +- Instructions on how to reproduce the problem. + +If you +have a problem enabling your VPN connection please also examine the +`journalctl -u NetworkManager` logs. + +The log file of the +eduVPN app can also help us figure out the problem, running the gui or +cli in debug mode (-d) flag will print debug logging to the log file +located at: `~/.config/eduvpn/log` or `~/.config/letsconnect/log` for +Let's Connect!. + +If you prefer e-mail, you can send one, with the same details, to: + +[eduvpn-support@lists.geant.org](mailto:eduvpn-support@lists.geant.org) + +See the section below for any known issues. + +## Known issues + +### OpenVPN <= 2.5.7 and OpenSSL 3 + +When your distribution uses OpenSSL 3 and an OpenVPN version before +2.5.8, you might get the following error in the NetworkManager logging +after connecting to a server that uses OpenVPN: + +``` console +Cipher BF-CBC not supported +``` + +This means that OpenVPN is trying to initialize this legacy/deprecated +cipher, even though it is not used in the config. The fix is in OpenVPN +version starting at 2.5.8. + +### Could not find source connection + +It could be the case where the client does not work due to the fact that +NetworkManager does not manage your connections. + +You could see errors such as: + +``` console +nm-manager-error-quark: Could not find source connection. +``` + +To fix this, make sure that NetworkManager is managing your primary +interface. For e.g. Debian systems you can follow the instructions on +[The Debian +Wiki](https://wiki.debian.org/NetworkManager#Enabling_Interface_Management) +and then reboot. Pull requests are welcome to make the client work +without NetworkManager. + +### Version GLIBC_2.32 not found + +If you install the client using instructions for a different +distribution, you can have these GLIBC errors showing when the client is +trying to load eduvpn-common. To fix this make sure to uninstall *all* +the packages you currently have installed (Pip, Deb/RPM) and then follow +the instructions for your appropriate distribution. See +[Installation](./installation.md). + +If you have followed the right instructions and are still getting these +errors you can make an issue. + +### GUI does not launch due to getting attribute errors + +If your GUI does not launch and you get errors such as: + +``` console +File "/usr/lib/python3/dist-packages/eduvpn/ui/ui.py", line 165, in setup +self.common_version.set_text(f"{commonver}") +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +AttributeError: 'NoneType' object has no attribute 'set_text' +``` + +It can mean that you have installed multiple versions of the client. If +you\'re trying to use the Deb/RPM version see if: + +``` console +pip uninstall eduvpn-client[gui] +``` + +Does anything. + +Otherwise, if there are files in `~/.local/share/eduvpn` +try to move them to e.g. `~/.local/share/eduvpn2`. If the +client then still doesn't launch you can make an issue. diff --git a/doc/md/updating.md b/doc/md/updating.md new file mode 100644 index 00000000..4f6dd51a --- /dev/null +++ b/doc/md/updating.md @@ -0,0 +1,81 @@ +# Updating + +Depending on the client that you want to update from, there might be +some manual steps required before/after installing. + +For most version updates you can simply do an update with your package +manager. + +## Additional instructions when coming from 3.x + +When upgrading from version 3 to the newest version (currently 4.x), +there are some manual steps needed for updating. The main part is that +we have moved to a new repository for this major version update. We will +go over the distro specific update instructions (distros that are not +listed here do not need specific instructions, go to +[Installation](./installation.md)). + +Before you continue, it might be wise to close the client if you have it +open. Note that once the new client is installed, you will have to add +your servers again. + +### Debian and Ubuntu (both x86_64) + +First we must remove the old files, repository and associated signing +keys: + +``` console +$ rm -r ~/.config/eduvpn +$ sudo rm /etc/apt/sources.list.d/eduvpn.list +$ sudo rm /etc/apt/trusted.gpg.d/eduvpn-client.gpg +$ sudo rm /usr/share/keyrings/eduvpn.gpg +$ sudo apt-key del 9BF9BF69E5DDE77F5ABE20DC966A924CE91888D2 +``` + +It\'s fine if you get errors that some of these entries don\'t exist. + +You can then continue installing the new client by adding the new +repository if you have Ubuntu 20.04, \>= 22.04 or Debian 11/12: + +``` console +$ sudo apt install apt-transport-https lsb-release wget +$ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null +$ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list +$ sudo apt update +$ sudo apt upgrade +``` + +For other Debian based distros, you can use Pip . If you do the upgrade +via Pip, remove the old client first with: + +``` console +$ sudo apt purge eduvpn-client +$ sudo apt autoremove +``` + +Then install via Pip, see [Pip Installation](./installation.md#pip-installation) + +### Fedora (37 & 38, x86_64) + +First we must remove the old files, repository and associated signing +keys: + +``` console +$ rm -r ~/.config/eduvpn +$ sudo dnf copr remove @eduvpn/eduvpn-client +``` + +You can then continue installing the new client by adding the new +repository: + +``` console +$ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc +$ sudo rpm --import app+linux@eduvpn.org.asc +$ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo +[python-eduvpn-client_v4] +name=eduVPN for Linux 4.x (Fedora $releasever) +baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch +gpgcheck=1 +EOF +$ sudo dnf --refresh update +``` diff --git a/doc/md/usage.md b/doc/md/usage.md new file mode 100644 index 00000000..110c5186 --- /dev/null +++ b/doc/md/usage.md @@ -0,0 +1,31 @@ +# Usage + +## Graphical User Interface + +If you have used a RPM or Deb package to install eduVPN, a desktop entry +is available: + +![eduVPN desktop entry](./img/desktopentry.png) + +If you installed the package by hand with for example pip, you can run +it manually: + +``` bash +$ eduvpn-gui +``` + +## Command Line Interface + +There is also a command line interface available for eduVPN since 2.0. +To see the available subcommands: + +``` bash +$ eduvpn-cli --help +``` + +There is also an interactive mode that is aimed to be more user +friendly. + +``` bash +$ eduvpn-cli interactive +``` diff --git a/doc/mkdocs.yml b/doc/mkdocs.yml new file mode 100644 index 00000000..dd06fda5 --- /dev/null +++ b/doc/mkdocs.yml @@ -0,0 +1,21 @@ +site_name: Documentation +site_description: eduVPN for Linux +docs_dir: md +site_dir: site +theme: + name: null + custom_dir: 'eduvpn_theme/' + navigation_depth: 3 +nav: + - 'About': index.md + - 'Installation': installation.md + - 'Usage': usage.md + - 'Support': support.md +use_directory_urls: False +markdown_extensions: + - smarty + - sane_lists + - toc: + permalink: "#" + baselevel: 1 + toc_depth: 2-3 \ No newline at end of file diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index 9452ecf3..00000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,7 +0,0 @@ -sphinx_rtd_theme -future -six -oauthlib -requests -requests_oauthlib -python-dateutil diff --git a/doc/screenshot.png b/doc/screenshot.png deleted file mode 100644 index 554df868..00000000 Binary files a/doc/screenshot.png and /dev/null differ diff --git a/doc/updating.rst b/doc/updating.rst deleted file mode 100644 index 1eb5e62b..00000000 --- a/doc/updating.rst +++ /dev/null @@ -1,74 +0,0 @@ -============ -Updating -============ - -Depending on the client that you want to update from, there might be some manual steps required before/after installing. - -For most version updates you can simply do an update with your package manager. - -Additional instructions when coming from 3.x --------------------------------------------- - -When upgrading from version 3 to the newest version (currently 4.x), there are some manual steps needed for updating. The main part is that we have moved to a new repository for this major version update. We will go over the distro specific update instructions (distros that are not listed here do not need specific instructions, go to `Installation <./installation.html>`_). - -Before you continue, it might be wise to close the client if you have it open. Note that once the new client is installed, you will have to add your servers again. - - -Debian and Ubuntu (both x86_64) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First we must remove the old files, repository and associated signing keys: - -.. code-block:: console - - $ rm -r ~/.config/eduvpn - $ sudo rm /etc/apt/sources.list.d/eduvpn.list - $ sudo rm /etc/apt/trusted.gpg.d/eduvpn-client.gpg - $ sudo rm /usr/share/keyrings/eduvpn.gpg - $ sudo apt-key del 9BF9BF69E5DDE77F5ABE20DC966A924CE91888D2 - -It's fine if you get errors that some of these entries don't exist. - - -You can then continue installing the new client by adding the new repository if you have Ubuntu 20.04, >= 22.04 or Debian 11/12: - -.. code-block:: console - - $ sudo apt install apt-transport-https lsb-release wget - $ wget -O- https://app.eduvpn.org/linux/v4/deb/app+linux@eduvpn.org.asc | gpg --dearmor | sudo tee /usr/share/keyrings/eduvpn-v4.gpg >/dev/null - $ echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/eduvpn-v4.gpg] https://app.eduvpn.org/linux/v4/deb/ $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/eduvpn-v4.list - $ sudo apt update - $ sudo apt upgrade - -For other Debian based distros, you can use Pip . If you do the upgrade via Pip, remove the old client first with: - -.. code-block:: console - - $ sudo apt purge eduvpn-client - $ sudo apt autoremove - -Then install via Pip, see `Pip Installation <./installation.html#pip-installation>`_ - -Fedora (37 & 38, x86_64) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -First we must remove the old files, repository and associated signing keys: - -.. code-block:: console - - $ rm -r ~/.config/eduvpn - $ sudo dnf copr remove @eduvpn/eduvpn-client - -You can then continue installing the new client by adding the new repository: - -.. code-block:: console - - $ curl -O https://app.eduvpn.org/linux/v4/rpm/app+linux@eduvpn.org.asc - $ sudo rpm --import app+linux@eduvpn.org.asc - $ cat << 'EOF' | sudo tee /etc/yum.repos.d/python-eduvpn-client_v4.repo - [python-eduvpn-client_v4] - name=eduVPN for Linux 4.x (Fedora $releasever) - baseurl=https://app.eduvpn.org/linux/v4/rpm/fedora-$releasever-$basearch - gpgcheck=1 - EOF - $ sudo dnf --refresh update diff --git a/doc/upload.sh b/doc/upload.sh new file mode 100755 index 00000000..9d87db5f --- /dev/null +++ b/doc/upload.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +# Add these lines to ${HOME}/.ssh/known-hosts (without leading "#") +#ams-cdn.eduvpn.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXDSpq0Q17KijNPTEvhKPDSnx6WC73giHaYidD8eZk2 +#eduvpn-cdn-2.deic.dk ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEFcLZ2N48aiTQ3o6Du9K9OuVfP+/S5BD4DJH/aRwqFr + +UPLOAD_SERVER_PATH_LIST=" + docs@ams-cdn.eduvpn.org:/var/www/docs.eduvpn.org/client/linux + docs@eduvpn-cdn-2.deic.dk:/var/www/docs.eduvpn.org/client/linux +" + +for UPLOAD_SERVER_PATH in ${UPLOAD_SERVER_PATH_LIST}; do + echo "${UPLOAD_SERVER_PATH}..." + rsync -e ssh -rltO --delete site/ "${UPLOAD_SERVER_PATH}" --progress --exclude '.git' || echo "FAIL ${SERVER}" +done diff --git a/doc/usage.rst b/doc/usage.rst deleted file mode 100644 index 57da2184..00000000 --- a/doc/usage.rst +++ /dev/null @@ -1,34 +0,0 @@ -===== -Usage -===== - -Graphical User Interface -======================== - -If you have used a RPM or DEB package to install eduVPN, a desktop entry is available: - -.. image:: screenshot.png - :target: _images/flow.png - :alt: The eduVPN desktop entry - -If you installed the package by hand with for example pip, you can run it manually: - -.. code-block:: bash - - $ eduvpn-gui - - -Command Line Interface -====================== - -There is also a command line interface available for eduVPN since 2.0. To see the available subcommands: - -.. code-block:: bash - - $ eduvpn-cli --help - -There is also an interactive mode that is aimed to be more user friendly. - -.. code-block:: bash - - $ eduvpn-cli interactive