%% Copyright (c) 2021 The Tor Project, inc. All rights reserved.
%% Use of this source code is governed by a BSD-style
%% license that can be found in the LICENSE file.
\documentclass[aspectratio=169,12pt]{beamer}

\usepackage[utf8]{inputenc}

\usetheme{onion}

\usepackage[shortlabels]{enumitem}

\setlist[description]{align=parleft, labelwidth=3cm}
\setlist[enumerate]{1., font=\color{OnionDarkPurple}}
\setlist[itemize]{label=$\bullet$, font=\color{OnionDarkPurple}}
\setlist[itemize,2]{label=$\circ$, font=\color{OnionDarkPurple}}

\usepackage{csvsimple}
\usepackage[scale=2]{ccicons}
\usepackage{pgfplots}
\usepackage{xcolor}
\usepackage{booktabs}
\usepackage{fontawesome}

%% We do not set footer number since we async needs to record the slides and we might want to reorder them later.
%% \setbeamertemplate{footline}{\raisebox{5pt}{\makebox[\paperwidth]{\hfill\makebox[20pt]{\color{gray}\scriptsize\insertframenumber}}}\hspace*{5pt}}

\newcommand{\highlight}[1]{%
    \textbf{\alert{#1}}
}

\newcommand{\colorhref}[3][OnionBlack]{%
    \href{#2}{\color{#1}{#3}}
}

\title{Onionprobe}
\author{Silvio Rhatto}
\date{2022-03-23}

\institute{}

\titlegraphic{\onionlogocolor}

\setlength{\parskip}{3mm}

\AtBeginPart{
    \let\insertpartnumber\relax
    \let\partname\relax
    \frame{\partpage}
}

\AtBeginSection{
    \let\insertsectionnumber\relax
    \let\sectionname\relax
    \frame{\sectionpage}
}

\AtBeginSubsection{
    \let\insertsubsectionnumber\relax
    \let\subsectionname\relax
    \frame{\subsectionpage}
}

\begin{document}

%% Title Page.
\begin{frame}[plain,noframenumbering]
    \titlepage
\end{frame}

\begin{frame}
  \frametitle{About}
  \begin{itemize}
    \item What: Monitors Onion Services from "the outside".

    \item Goal: Be a generic monitoring tool for Onion Services.

    \item Where: \href{https://gitlab.torproject.org/tpo/onion-services/onionprobe/}{https://gitlab.torproject.org/tpo/onion-services/onionprobe}

    \item Status: WARNING: alpha stage! It's only about a week old!
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Current features}

  \begin{itemize}
    \item Check if can get .onion descriptor.
    \item Check if can make a HTTP request to the service.
    \item Can run continuously.
    \item Cache is cleared before each probe!
    \item Configurable using YAML.
    \item Built-in Prometheus exporter.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Current use cases}

  \begin{itemize}
    \item
      Planned to monitor existing deployments.
    \item
      Sample configuration has all
      \href{https://onion.torproject.org}{https://onion.torproject.org}
      services and can be an alternative monitoring instance.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Demo}

  \begin{itemize}
    \item Using docker-compose and Prometheus exporting/aggregation.
    \item Using the command line.
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Planned improvements}

  \begin{itemize}
    \item Better metrics.
    \item Enhanced UX (command line etc).
    \item See the task list :)
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Existing alternatives}

  \begin{itemize}
    \item \href{https://onionscan.org}{https://onionscan.org}
    \item \href{https://github.com/systemli/prometheus-onion-service-exporter/}{https://github.com/systemli/prometheus-onion-service-exporter/}
  \end{itemize}
\end{frame}

\begin{frame}
  \frametitle{Questions}

  \begin{itemize}
    \item How to get the descriptor from different HSDirs? Does this already happens
          item automatically as each probing uses a fresh cache?

    \item How to choose an specific introduction point when connecting to an .onion?

    \item What functionality you would like to have?

    \item Where should the repository live?
  \end{itemize}
\end{frame}

\begin{frame}[c, plain, noframenumbering]{}
    \centering

    \vfill
    \huge Questions?
    \vfill

    \normalsize

    \begin{itemize}
      \item This work is licensed under a
            \href{https://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons Attribution-ShareAlike 4.0 International License}

      \item Thanks irl and hiro for the ideas, specs and suggestions.

      \item Thanks to ahf and anarcat for the presentation templates.
    \end{itemize}

    \centering
    \vfill
    \ccbysa
    \vfill

\end{frame}

\end{document}
