Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Hiro
GetTor
Commits
28f71d53
Commit
28f71d53
authored
Mar 01, 2019
by
Hiro
🏄
Browse files
Update README and requirements.txt
parent
bff816b0
Changes
5
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
28f71d53
...
...
@@ -30,6 +30,24 @@ Here is a list of the main goals the new GetTor should accomplish:
*
Language and provider friendly. It should be easy to support new languages
and to add new providers for storing packages and generate links.
Installing GetTor
=================
WORKON_HOME=${HOME}/.virtualenvs
export WORKON_HOME
mkdir -p $WORKON_HOME
source $(which virtualenvwrapper.sh)
git clone https://git.torproject.org/gettor.git && cd gettor
mkvirtualenv -a $PWD -r requirements.txt --unzip-setuptools --setuptools gettor
From now on, to use BridgeDB's virtualenv, just do
``$ workon gettor``
(after sourcing virtualenvwrapper.sh, as before). To exit the virtualenv
without exiting the shell, do
``$ deactivate``
.
export PYTHONPATH=$PYTHONPATH:${VIRTUAL_ENV}/lib/python/site-packages
$ ./bin/gettor_service start
How does the new GetTor works?
==============================
...
...
@@ -65,7 +83,10 @@ this:
--- END FILE ---
You can also check providers/dropbox.links for a better example.
WORKON_HOME=${HOME}/.virtualenvs
export WORKON_HOME
mkdir -p $WORKON_HOME
source $(which virtualenvwrapper.sh)
*Core*
: the heart of GetTor. Receives requests for links for a certain OS and
language and respond accordingly. It also presents an easy way for scripts
to create links file.
...
...
@@ -86,7 +107,7 @@ if necessary and respond to the user in the specified language. Unfinished.
to keep count of the number of requests per person and avoid malicious users
that try to collapse the service. It also keeps count of how many requests
GetTor has received during its lifetime. A lot of other data was being saved
in the original gsoc project, but it was changed to save the minimum.
in the original gsoc project, but it was changed to save the minimum.
*Blacklist*
: Provide a mechanism to avoid flood and deny interaction to
malicious users.
...
...
@@ -119,7 +140,7 @@ should use the trac[0] and select the GetTor component. Some neat ideas we
could use are the following:
*
Report bugs!
*
Create script for new providers, namely: Google Drive, Github. Check
*
Create script for new providers, namely: Google Drive, Github. Check
providers.txt
*
Create a new module for distributing links. Check distribution_methods.txt
*
Finish the Twitter module.
...
...
@@ -131,4 +152,3 @@ References
===========
[0] https://trac.torproject.org/projects/tor/query?status=accepted&status=assigned&status=needs_information&status=needs_review&status=needs_revision&status=new&status=reopened&component=GetTor&col=id&col=summary&col=component&col=status&col=type&col=priority&col=milestone&order=priority
bin/gettor_service
View file @
28f71d53
...
...
@@ -11,6 +11,7 @@
# :license: This is Free Software. See LICENSE for license information.
source
venv/bin/activate
alias
twistd3
=
"venv/bin/twistd"
case
"
$1
"
in
start
)
...
...
requirements.txt
View file @
28f71d53
service_identity
=18.1.0
pydkim
=0.3
pyopenssl
=19.0.0
dnspython
=1.16.0
validate_email
=1.3
twisted
=18.9.0
scripts/process_email
0 → 100755
View file @
28f71d53
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of GetTor, a Tor Browser distribution system.
#
# :authors: isra <ilv@torproject.org>
# see also AUTHORS file
#
# :license: This is Free Software. See LICENSE for license information.
import
sys
sys
.
path
.
insert
(
0
,
'..'
)
from
twisted.python
import
log
from
twisted.internet
import
defer
,
reactor
from
gettor
import
EMAIL_PARSER_LOGFILE
from
gettor.parse.email
import
EmailParser
,
AddressError
,
DKIMError
@
defer
.
inlineCallbacks
def
process_email
(
message
):
try
:
ep
=
EmailParser
(
"gettor+test@torproject.org"
)
yield
defer
.
maybeDeferred
(
ep
.
parse
,
message
).
addCallback
(
ep
.
parse_callback
).
addErrback
(
ep
.
parse_errback
)
except
AddressError
as
e
:
log
.
err
(
"Address error: {}"
.
format
(
e
),
system
=
"process email"
)
reactor
.
stop
()
except
DKIMError
as
e
:
log
.
err
(
"DKIM error: {}"
.
format
(
e
),
system
=
"process email"
)
reactor
.
stop
()
reactor
.
stop
()
def
main
():
incoming_email
=
sys
.
stdin
.
read
()
reactor
.
callWhenRunning
(
process_email
,
incoming_email
)
reactor
.
run
()
if
__name__
==
'__main__'
:
log
.
startLogging
(
open
(
EMAIL_PARSER_LOGFILE
,
'a'
))
log
.
msg
(
"New email request received."
,
system
=
"process email"
)
main
()
log
.
msg
(
"Email request processed."
,
system
=
"process email"
)
sendmail.cfg
0 → 100644
View file @
28f71d53
[credentials]
addr: gettor+test@torproject.org
[general]
interval: 10
max_help_requests: 10
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment