mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-03 02:37:15 +08:00
[testing] tor: update to 0.3.3.9
This commit is contained in:
parent
dffe5acb82
commit
74ded3961d
60
tor/PKGBUILD
60
tor/PKGBUILD
@ -1,56 +1,48 @@
|
||||
pkgname=tor
|
||||
pkgver=0.3.3.8
|
||||
pkgver=0.3.3.9
|
||||
pkgrel=1
|
||||
pkgdesc="Anonymizing overlay network"
|
||||
arch=('x86_64')
|
||||
url="http://www.torproject.org/"
|
||||
url="https://www.torproject.org/"
|
||||
license=('BSD')
|
||||
depends=('openssl' 'libevent' 'torsocks' 'bash' 'libseccomp')
|
||||
makedepends=('ca-certificates')
|
||||
backup=('etc/tor/torrc' 'etc/tor/torrc-dist')
|
||||
conflicts=('vidalia') # to enforce removal of unsupported software, not really conflicts
|
||||
categories=('network')
|
||||
install=$pkgname.install
|
||||
option=('!docs' '!emptydirs')
|
||||
source=("http://www.torproject.org/dist/"${srcdir}/${pkgname}-${pkgver}".tar.gz"{,.asc}
|
||||
'torrc')
|
||||
md5sums=('492c31afb03ec39aaf354658682fbf68'
|
||||
backup=('etc/tor/torrc'
|
||||
'etc/tor/torrc-dist')
|
||||
source=("https://www.torproject.org/dist/${pkgname}-${pkgver}.tar.gz"{,.asc}
|
||||
'torrc'
|
||||
'tor.service'
|
||||
'tor.sysusers'
|
||||
'tor.tmpfiles')
|
||||
md5sums=('16b24bda0772dc3d5c4c05254ec4bce7'
|
||||
'SKIP'
|
||||
'173621ad48f0052b95eb9786a1c0302c')
|
||||
validpgpkeys=('B35BF85BF19489D04E28C33C21194EBB165733EA'
|
||||
'2133BC600AB133E1D826D173FE43009C4607B1FB')
|
||||
'c1dd4004c63edaeaa829e01be5413cfc'
|
||||
'503cedd9679f9817b2c27916ba989a74'
|
||||
'5de6b0aff2a152a03d8eb7a473edc5ff'
|
||||
'30e307d882c818cb44bcb2d6b81789a3')
|
||||
validpgpkeys=('2133BC600AB133E1D826D173FE43009C4607B1FB' # Nick Mathewson
|
||||
'F65CE37F04BA5B360AE6EE17C218525819F78451') # Roger Dingledine
|
||||
|
||||
build() {
|
||||
cd $pkgname-$pkgver
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--enable-systemd
|
||||
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
cd $pkgname-$pkgver
|
||||
make test
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
cd $pkgname-$pkgver
|
||||
|
||||
make DESTDIR=$pkgdir install
|
||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||
|
||||
install -dm0700 $pkgdir/var/lib/tor
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
# Install config files
|
||||
install -Dm0644 ../torrc $pkgdir/etc/tor/torrc
|
||||
# install -Dm0644 ../tor.conf.d $pkgdir/etc/conf.d/tor
|
||||
|
||||
# Install systemd service file
|
||||
sed -i 's/WatchdogSec=1m/#WatchdogSec=1m/g' contrib/dist/tor.service
|
||||
install -Dm0644 contrib/dist/tor.service $pkgdir/usr/lib/systemd/system/tor.service
|
||||
mv "${pkgdir}/etc/tor/torrc.sample" "${pkgdir}/etc/tor/torrc-dist"
|
||||
install -Dm0644 "${srcdir}/torrc" "${pkgdir}/etc/tor/torrc"
|
||||
install -Dm0644 "${srcdir}/tor.service" "${pkgdir}/usr/lib/systemd/system/tor.service"
|
||||
install -Dm0644 "${srcdir}/tor.sysusers" "${pkgdir}/usr/lib/sysusers.d/tor.conf"
|
||||
install -Dm0644 "${srcdir}/tor.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/tor.conf"
|
||||
|
||||
# Install license
|
||||
install -Dm0644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
|
||||
install -Dm0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
post_install() {
|
||||
groupadd -g 43 tor &>/dev/null
|
||||
useradd -u 43 -g tor -d /var/lib/tor -s /bin/false tor &> /dev/null
|
||||
}
|
15
tor/tor.service
Normal file
15
tor/tor.service
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Anonymizing Overlay Network
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=tor
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/tor -f /etc/tor/torrc
|
||||
ExecReload=/usr/bin/kill -HUP $MAINPID
|
||||
KillSignal=SIGINT
|
||||
LimitNOFILE=8192
|
||||
PrivateDevices=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
tor/tor.sysusers
Normal file
1
tor/tor.sysusers
Normal file
@ -0,0 +1 @@
|
||||
u tor 43 - /var/lib/tor
|
1
tor/tor.tmpfiles
Normal file
1
tor/tor.tmpfiles
Normal file
@ -0,0 +1 @@
|
||||
d /var/lib/tor 0700 tor tor - -
|
82
tor/torrc
82
tor/torrc
@ -1,5 +1,5 @@
|
||||
## Configured for Chakra Linux - 2016.11
|
||||
## Last updated 22 September 2015 for Tor 0.2.7.3-alpha.
|
||||
## Configuration file for a typical Tor user
|
||||
## Last updated 22 April 2012 for Tor 0.2.3.14-alpha.
|
||||
## (may or may not work for much older or much newer versions of Tor.)
|
||||
##
|
||||
## Lines that begin with "## " try to explain what's going on. Lines
|
||||
@ -12,20 +12,19 @@
|
||||
## Tor will look for this file in various places based on your platform:
|
||||
## https://www.torproject.org/docs/faq#torrc
|
||||
|
||||
## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't
|
||||
## configure one below. Set "SOCKSPort 0" if you plan to run Tor only
|
||||
## Tor opens a socks proxy on port 9050 by default -- even if you don't
|
||||
## configure one below. Set "SocksPort 0" if you plan to run Tor only
|
||||
## as a relay, and not make any local application connections yourself.
|
||||
#SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections.
|
||||
#SOCKSPort 192.168.0.1:9100 # Bind to this address:port too.
|
||||
#SocksPort 9050 # Default: Bind to localhost:9050 for local connections.
|
||||
#SocksPort 192.168.0.1:9100 # Bind to this adddress:port too.
|
||||
|
||||
## Entry policies to allow/deny SOCKS requests based on IP address.
|
||||
## First entry that matches wins. If no SOCKSPolicy is set, we accept
|
||||
## all (and only) requests that reach a SOCKSPort. Untrusted users who
|
||||
## can access your SOCKSPort may be able to learn about the connections
|
||||
## First entry that matches wins. If no SocksPolicy is set, we accept
|
||||
## all (and only) requests that reach a SocksPort. Untrusted users who
|
||||
## can access your SocksPort may be able to learn about the connections
|
||||
## you make.
|
||||
#SOCKSPolicy accept 192.168.0.0/16
|
||||
#SOCKSPolicy accept6 FC00::/7
|
||||
#SOCKSPolicy reject *
|
||||
#SocksPolicy accept 192.168.0.0/16
|
||||
#SocksPolicy reject *
|
||||
|
||||
## Logs go to stdout at level "notice" unless redirected by something
|
||||
## else, like one of the below lines. You can have as many Log lines as
|
||||
@ -46,9 +45,7 @@ Log notice syslog
|
||||
## Uncomment this to start the process in the background... or use
|
||||
## --runasdaemon 1 on the command line. This is ignored on Windows;
|
||||
## see the FAQ entry if you want Tor to run as an NT service.
|
||||
RunAsDaemon 1
|
||||
User tor
|
||||
Group tor
|
||||
#RunAsDaemon 1
|
||||
|
||||
## The directory for keeping all the keys/etc. By default, we store
|
||||
## things in $HOME/.tor on Unix, and in Application Data\tor on Windows.
|
||||
@ -104,32 +101,28 @@ DataDirectory /var/lib/tor
|
||||
|
||||
## Define these to limit how much relayed traffic you will allow. Your
|
||||
## own traffic is still unthrottled. Note that RelayBandwidthRate must
|
||||
## be at least 20 kilobytes per second.
|
||||
## Note that units for these config options are bytes (per second), not
|
||||
## bits (per second), and that prefixes are binary prefixes, i.e. 2^10,
|
||||
## 2^20, etc.
|
||||
#RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps)
|
||||
#RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb)
|
||||
## be at least 20 KB.
|
||||
## Note that units for these config options are bytes per second, not bits
|
||||
## per second, and that prefixes are binary prefixes, i.e. 2^10, 2^20, etc.
|
||||
#RelayBandwidthRate 100 KB # Throttle traffic to 100KB/s (800Kbps)
|
||||
#RelayBandwidthBurst 200 KB # But allow bursts up to 200KB/s (1600Kbps)
|
||||
|
||||
## Use these to restrict the maximum traffic per day, week, or month.
|
||||
## Note that this threshold applies separately to sent and received bytes,
|
||||
## not to their sum: setting "40 GB" may allow up to 80 GB total before
|
||||
## not to their sum: setting "4 GB" may allow up to 8 GB total before
|
||||
## hibernating.
|
||||
##
|
||||
## Set a maximum of 40 gigabytes each way per period.
|
||||
#AccountingMax 40 GBytes
|
||||
## Set a maximum of 4 gigabytes each way per period.
|
||||
#AccountingMax 4 GB
|
||||
## Each period starts daily at midnight (AccountingMax is per day)
|
||||
#AccountingStart day 00:00
|
||||
## Each period starts on the 3rd of the month at 15:00 (AccountingMax
|
||||
## is per month)
|
||||
#AccountingStart month 3 15:00
|
||||
|
||||
## Administrative contact information for this relay or bridge. This line
|
||||
## can be used to contact you if your relay or bridge is misconfigured or
|
||||
## something else goes wrong. Note that we archive and publish all
|
||||
## descriptors containing these lines and that Google indexes them, so
|
||||
## spammers might also collect them. You may want to obscure the fact that
|
||||
## it's an email address and/or generate a new address for this purpose.
|
||||
## Contact info to be published in the directory, so we can contact you
|
||||
## if your relay is misconfigured or something else goes wrong. Google
|
||||
## indexes this, so spammers might also collect it.
|
||||
#ContactInfo Random Person <nobody AT example dot com>
|
||||
## You might also include your PGP or GPG fingerprint if you have one:
|
||||
#ContactInfo 0xFFFFFFFF Random Person <nobody AT example dot com>
|
||||
@ -155,20 +148,14 @@ DataDirectory /var/lib/tor
|
||||
## using more than one of your relays in a single circuit. See
|
||||
## https://www.torproject.org/docs/faq#MultipleRelays
|
||||
## However, you should never include a bridge's fingerprint here, as it would
|
||||
## break its concealability and potentially reveal its IP/TCP address.
|
||||
## break its concealability and potentionally reveal its IP/TCP address.
|
||||
#MyFamily $keyid,$keyid,...
|
||||
|
||||
## A comma-separated list of exit policies. They're considered first
|
||||
## to last, and the first match wins.
|
||||
##
|
||||
## If you want to allow the same ports on IPv4 and IPv6, write your rules
|
||||
## using accept/reject *. If you want to allow different ports on IPv4 and
|
||||
## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules
|
||||
## using accept/reject *4.
|
||||
##
|
||||
## If you want to _replace_ the default exit policy, end this with either a
|
||||
## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to)
|
||||
## the default exit policy. Leave commented to just use the default, which is
|
||||
## to last, and the first match wins. If you want to _replace_
|
||||
## the default exit policy, end this with either a reject *:* or an
|
||||
## accept *:*. Otherwise, you're _augmenting_ (prepending to) the
|
||||
## default exit policy. Leave commented to just use the default, which is
|
||||
## described in the man page or at
|
||||
## https://www.torproject.org/documentation.html
|
||||
##
|
||||
@ -180,15 +167,11 @@ DataDirectory /var/lib/tor
|
||||
## users will be told that those destinations are down.
|
||||
##
|
||||
## For security, by default Tor rejects connections to private (local)
|
||||
## networks, including to the configured primary public IPv4 and IPv6 addresses,
|
||||
## and any public IPv4 and IPv6 addresses on any interface on the relay.
|
||||
## See the man page entry for ExitPolicyRejectPrivate if you want to allow
|
||||
## "exit enclaving".
|
||||
## networks, including to your public IP address. See the man page entry
|
||||
## for ExitPolicyRejectPrivate if you want to allow "exit enclaving".
|
||||
##
|
||||
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more
|
||||
#ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy
|
||||
#ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy
|
||||
#ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy
|
||||
#ExitPolicy accept *:6660-6667,reject *:* # allow irc ports but no more
|
||||
#ExitPolicy accept *:119 # accept nntp as well as default exit policy
|
||||
#ExitPolicy reject *:* # no exits allowed
|
||||
|
||||
## Bridge relays (or "bridges") are Tor relays that aren't listed in the
|
||||
@ -203,3 +186,4 @@ DataDirectory /var/lib/tor
|
||||
## a private bridge, for example because you'll give out your bridge
|
||||
## address manually to your friends, uncomment this line:
|
||||
#PublishServerDescriptor 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user