File: activity_second_relay.puml

package info (click to toggle)
sbws 2.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 16,084 kB
  • sloc: python: 10,432; sh: 146; makefile: 38
file content (78 lines) | stat: -rw-r--r-- 1,713 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@startuml

start

:relay_as_entry = True;
if (consensus has `cc_alg=2`) then (yes)
  if (consensus has `bwscanner_cc>=1`) then (yes)
    if (relay to measure is exit AND has `FlowCtrl=2`) then (yes)
      :relay_as_entry = False;
    endif
  'no bwscanner>=1
  else (no)
    if (relay to measure is exit AND has NOT `FlowCtrl=2`) then (yes)
      :relay_as_entry = False;
    endif
  endif
' no cc_alg=2
else (no)
  if (relay to measure is exit?) then (yes)
      :relay_as_entry = False;
  endif
endif


if (consensus has `cc_alg=2`) then (yes)
  if (consensus has `bwscanner_cc>=1`) then (yes)
    if (relay to measure is exit AND has `FlowCtrl=2` AND NOT relay_as_entry) then (yes)
      :obtain non-exits;
    else (no)
      :obtain exits
      with proto `FlowCtrol=2`
      without bad flag
      that can exit
      to port 443;
    endif
  'no bwscanner>=1
  else (no)
    if (relay to measure is exit AND has NOT `FlowCtrl=2` AND NOT relay_as_entry) then (yes)
      :obtain non-exits;
    else (no)
      :obtain exits
      with proto `FlowCtrol!=2`
      without bad flag
      that can exit
      to port 443;
    endif
  endif
' no cc_alg=2
else (no)
  if (relay to measure is exit AND NOT relay_as_entry?) then (yes)
    :obtain non-exits;
  else (no)
    :obtain exits
    without bad flag
    that can exit
    to port 443;
  endif
endif


:potential second relays;
:obtain a relay
from potential
sencond relays
randomly;
if (second relay has 2x bandwidth?) then (yes)
elseif (other second relay has 1.5x bandwidth?) then (yes)
elseif (other second relay has 1x bandwidth?) then (yes)
else (nothing)
  stop
endif
:second relay selected!;
:Build a circuit
whith exit as
second hop;
stop

@enduml