## Information

**ID:** 102

**PHID:** PHID-TASK-buo4lmumyhknvqpjbj7e

**Author:** Patrick

**Status at Migration Time:** resolved

**Priority at Migration Time:** Normal

## Description

**Requirements**:

- Not using
`libcurl`

(because that’s a C binding, then we’d have no security enhancement and could just stick to`curl`

). - force use TLSv1, not SSL
- Download head only. (Similar to
`curl`

s`--head`

.) - Features. With example.

```
/usr/lib/sdwdate/url_to_unixtime \
--max-time 180 \
--socks5-hostname 10.152.152.10:9108 \
--tls true \
https://check.torproject.org
```

Expected output, unixtime, example:

`1413814230`

**Bonus**:

```
--max-file-size-bytes 2097152
--user-agent
--verbose
```

**SSL**:

Depending on the outcome of this we might not need SSL support.

**date_to_unixtime**:

The code for date to unixtime is already done:

https://github.com/Whonix/sdwdate/blob/master/usr/lib/sdwdate/date_to_unixtime

**python-requests**:

Implementing this using the `python-requests`

library was trivial, but unfortunately, `python-requests`

does not support socks proxies yet, which is a deal breaker for Whonix.

**urllib3**:

Has no yet socks proxy support either.

**TODO**:

So we have to find some python library that has socks proxy as well as TLSv1 support, that is installable from Debian repository. Does this exist?

## Comments

#### troubadour

2015-01-23 23:33:38 UTC

#### Patrick

2015-01-24 02:46:18 UTC

#### Patrick

2015-01-24 03:00:27 UTC

#### troubadour

2015-01-24 09:01:05 UTC

#### troubadour

2015-01-24 14:36:36 UTC

#### Patrick

2015-01-24 17:44:41 UTC

#### Patrick

2015-01-24 17:49:09 UTC

#### troubadour

2015-01-24 19:40:44 UTC

#### troubadour

2015-01-24 19:45:04 UTC

#### Patrick

2015-01-24 20:08:30 UTC

#### troubadour

2015-01-24 20:47:14 UTC

#### troubadour

2015-01-25 09:41:13 UTC

#### troubadour

2015-01-25 09:46:40 UTC

#### Patrick

2015-01-25 16:18:03 UTC

#### troubadour

2015-01-26 14:14:26 UTC

#### Patrick

2015-01-26 21:44:17 UTC

#### troubadour

2015-01-27 13:24:11 UTC

#### Patrick

2015-01-27 15:21:50 UTC

#### troubadour

2015-01-28 10:20:42 UTC

#### Patrick

2015-01-29 01:02:26 UTC

#### Patrick

2015-01-29 01:04:45 UTC

#### Patrick

2015-01-29 01:11:26 UTC

#### Patrick

2015-01-29 01:19:46 UTC

#### Patrick

2015-01-29 01:44:41 UTC

#### troubadour

2015-01-30 20:50:16 UTC

#### Patrick

2015-01-30 22:25:50 UTC

#### troubadour

2015-01-31 15:12:17 UTC

#### Patrick

2015-01-31 17:21:17 UTC

#### Patrick

2015-01-31 17:45:53 UTC

#### troubadour

2015-02-01 10:02:15 UTC

#### Patrick

2015-02-01 13:48:34 UTC

#### troubadour

2015-02-02 16:44:00 UTC

#### troubadour

2015-02-02 16:47:23 UTC

#### Patrick

2015-02-02 16:58:06 UTC

#### Patrick

2015-02-02 17:09:25 UTC

#### Patrick

2015-02-02 19:46:00 UTC

#### Patrick

2015-02-02 20:02:22 UTC

#### Patrick

2015-02-04 20:37:58 UTC

#### Patrick

2015-02-05 13:52:04 UTC

#### troubadour

2015-02-15 20:35:05 UTC

#### troubadour

2015-02-15 21:39:59 UTC

#### Patrick

2015-02-16 07:57:37 UTC

#### Patrick

2015-02-16 09:20:40 UTC