Compare commits
8 commits
2f131165b3
...
90eb4c8e85
Author | SHA1 | Date | |
---|---|---|---|
Jan-Erik Rediger | 90eb4c8e85 | ||
Jan-Erik Rediger | 7cfb57b9b8 | ||
Jan-Erik Rediger | ddcdd7a0cb | ||
Jan-Erik Rediger | 2f30ad0967 | ||
Jan-Erik Rediger | 51bf1e479c | ||
Jan-Erik Rediger | 0976ac25f2 | ||
Jan-Erik Rediger | 7f925b58dd | ||
Jan-Erik Rediger | 97fa04f2d9 |
|
@ -2,6 +2,7 @@
|
|||
permalink: "/{{ year }}/{{ month }}/{{ day }}/blog-static"
|
||||
title: "blog? static!"
|
||||
published_date: "2011-01-15 15:54:00 +0100"
|
||||
layout: post.liquid
|
||||
data:
|
||||
route: blog
|
||||
---
|
||||
|
|
|
@ -22,6 +22,7 @@ You can find the script here: [watch.js](http://tmp.fnordig.de/watch.js). It's m
|
|||
|
||||
The small app.js is just this:
|
||||
|
||||
```javascript
|
||||
socket = new io.Socket('localhost');
|
||||
socket.connect();
|
||||
socket.on('message', function(data){
|
||||
|
@ -29,6 +30,6 @@ The small app.js is just this:
|
|||
if(data.reload)
|
||||
window.location.reload();
|
||||
});
|
||||
{:lang="javascript"}
|
||||
```
|
||||
|
||||
So next thing: individual pages for posts, maybe templates.
|
||||
|
|
|
@ -19,6 +19,7 @@ As I really like [node.js](http://nodejs.org/) I wanted to know how it handles v
|
|||
|
||||
It's as easy as this:
|
||||
|
||||
```javascript
|
||||
var http = require('http');
|
||||
var server = http.createServer(function (request, response) {
|
||||
response.writeHead(200, {"Content-Type":"text/plain"});
|
||||
|
@ -27,13 +28,14 @@ It's as easy as this:
|
|||
});
|
||||
server.listen(80, "2a01:xxxx:xxxx:xxxx::2");
|
||||
console.log("Server running on localhost at port 80");
|
||||
{:lang="javascript"}
|
||||
```
|
||||
|
||||
Just pass the IPv6 address as the host parameter to `server.listen`.
|
||||
This listens on just one IP; it's possible to listen on all, similar to the `0.0.0.0` for IPv4:
|
||||
|
||||
```javascript
|
||||
server.listen(80, "::0");
|
||||
{:lang="javascript"}
|
||||
```
|
||||
|
||||
Other things worth to mention:
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ Adding syntax-highlighted code in your post now works like this:
|
|||
even multi-line
|
||||
and define language after code block
|
||||
{:lang="ruby"}
|
||||
{:lang="text"}
|
||||
|
||||
And now some real highlighting to show it in action:
|
||||
|
||||
|
|
|
@ -15,10 +15,11 @@ My SSL certificate is signed by [cacert][] (they approved me at last year's FrOS
|
|||
|
||||
If you're using nginx, all you need to do is adding the following lines to your config:
|
||||
|
||||
```
|
||||
listen 443 ssl;
|
||||
ssl_certificate /path/to/your/cert.pem;
|
||||
ssl_certificate_key /path/to/your/key.pem;
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
|
||||
If you followed some of the latest news around the scene, you probably heard of the [diginotar debacle][diginotar]. This should make clear how broken the system is and how unsecure these SSL certificates can be with all those CAs around.
|
||||
|
|
|
@ -33,15 +33,17 @@ etherpad runs as an own user named `etherpad` and is monitored by monit.
|
|||
|
||||
The monitoring is as simple as that, `/etc/monit/apps/etherpad.monit`:
|
||||
|
||||
```
|
||||
check process etherpad
|
||||
with pidfile /var/run/etherpad-lite.pid
|
||||
start program = "/home/etherpad/etherpad-lite/daemon.sh start"
|
||||
stop program = "/home/etherpad/etherpad-lite/daemon.sh stop"
|
||||
if totalmem is greater than 300 MB for 10 cycles then restart # eating up memory?
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
And the nginx is nothing fancy at all, `/usr/local/nginx/conf/vhosts/pad.fnordig.de.conf`:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
@ -60,7 +62,7 @@ And the nginx is nothing fancy at all, `/usr/local/nginx/conf/vhosts/pad.fnordig
|
|||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
My etherpad is currently running for about 22 days without any problems. I don't really use it myself and have no current statistics on outside usage of [pad.fnordig.de](https://pad.fnordig.de/).
|
||||
|
||||
|
|
|
@ -37,20 +37,22 @@ end
|
|||
|
||||
and start it with
|
||||
|
||||
```
|
||||
proxymachine -h 0.0.0.0 -p 1234 -c your_socks_config.rb
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
Tada! You got your own [SOCKS4](http://en.wikipedia.org/wiki/SOCKS#SOCKS4) Proxy up and running.
|
||||
|
||||
[@nerdsein](https://twitter.com/#!/nerdsein/status/120258441041297409) got another solution: [Mocks](http://sourceforge.net/projects/mocks/), "**M**y **O**wn so**CK**s **S**erver."
|
||||
Download it over at Sourceforge, unpack it and compile the code with:
|
||||
|
||||
```
|
||||
gcc -lnsl -o mocks child.c error.c misc.c socksd.c up_proxy.c
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
You can configure a little bit more than with proxymachine, but you can stick with the default config for now:
|
||||
|
||||
|
||||
```
|
||||
PORT = 10080
|
||||
MOCKS_ADDR = 0.0.0.0
|
||||
LOG_FILE = mocks.log
|
||||
|
@ -64,19 +66,22 @@ You can configure a little bit more than with proxymachine, but you can stick wi
|
|||
MAX_CONNECTIONS = 50
|
||||
|
||||
FILTER_POLICY = ALLOW
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
See the README and the config file in the archive for comments on it. Then start it with:
|
||||
|
||||
```
|
||||
src/mocks -c mocks.config start
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
and kill it with:
|
||||
|
||||
```
|
||||
src/mocks -c mocks.config shutdown
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
Oh, and in case you have the possibility to just ssh to the server, you can start up a SOCKS proxy on this connection, too:
|
||||
|
||||
```
|
||||
ssh -D1234 example.com
|
||||
{:lang="text"}
|
||||
```
|
||||
|
|
|
@ -16,8 +16,9 @@ Complete taking down the machine and reinstalling everything was not an option,
|
|||
|
||||
By default the jabber server listens on all IPv6 addresses of the host machine, so all I needed to do here was enabling ssl-serving over IPv6 for it:
|
||||
|
||||
```
|
||||
<tls port="5223">2001:0db8:85a3:08d3:1319:8a2e:0370:7344</tls>
|
||||
{:lang="text"}
|
||||
```
|
||||
(this is a completeley random ipv6 addresses ;)
|
||||
|
||||
Now to the "hard" part: the bitlbee thing.
|
||||
|
@ -28,24 +29,28 @@ But, as I told before, the server is a rather old installation and uses `netkit-
|
|||
|
||||
So I had to replace this one:
|
||||
|
||||
```
|
||||
apt-get install netbsd-inetd
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
One line in `/etc/inetd.conf` reads as the following:
|
||||
|
||||
```
|
||||
9999 stream tcp nowait bitlbee /usr/bin/stunnel stunnel -v 0 -l /usr/sbin/bitlbee
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
This needs to be duplicated and changed to listen on v6, too.
|
||||
|
||||
```
|
||||
9999 stream tcp6 nowait bitlbee /usr/bin/stunnel stunnel -v 0 -l /usr/sbin/bitlbee
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
And that's it.
|
||||
|
||||
```
|
||||
/etc/init.d/netbsd-inetd start
|
||||
/etc/init.d/jabberd14 restart
|
||||
{:lang="text"}
|
||||
```
|
||||
|
||||
and you should be ready to go.
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ But is just to much overhead if I just need one command. So I took half an hour
|
|||
|
||||
Or read here:
|
||||
|
||||
```
|
||||
# original: http://tridex.net/2011-06-19/linux-netzwerke-ohne-ifconfig/
|
||||
# text version by @badboy_ (fnordig.de)
|
||||
|
||||
|
@ -46,3 +47,4 @@ Or read here:
|
|||
| route del -net 192.168.2.0 | ip route del 192.168.2.0/24 | Netzwerk-Route löschen |
|
||||
| netmask 255.255.255.0 | via 192.168.1.100 dev eth0 | |
|
||||
| gw 192.168.1.100 dev eth0 | | |
|
||||
```
|
||||
|
|
|
@ -21,10 +21,7 @@ Except I would just repeat what I have said back then for my Bachelor Thesis.
|
|||
|
||||
So instead let me collect some statistics.
|
||||
|
||||
<center>
|
||||
![Contributions to master](https://tmp.fnordig.de/ma/commits.png)
|
||||
Contributions to master
|
||||
</center>
|
||||
|
||||
I created the repository for all thesis work just 2 days after my birthday in 2016.
|
||||
Back then it should have been a completely different thesis topic, but due to some unexpected difficulties I had to drop the first topic before even beginning and went on to search for another.
|
||||
|
@ -34,10 +31,7 @@ None of that code ended up in the final application of course.
|
|||
My commit frequency was quite different from back in my Bachelor thesis days.
|
||||
A lot less night shifts, but still nothing early in the morning.
|
||||
|
||||
<center>
|
||||
![Frequency of commits by time of day](https://tmp.fnordig.de/ma/punchcard.png)
|
||||
Frequency of commits by time of day
|
||||
</center>
|
||||
|
||||
My application ended with about 4000 lines of C code, plus another 2000 lines of code in examples, tests and experiments.
|
||||
I also wrote some small helper tools in Rust, e.g. [ebpf-disasm](https://github.com/badboy/ebpf-disasm/) and a library and another tool, which I will make public in the next days.
|
||||
|
|
|
@ -12,8 +12,6 @@ A couple of weeks ago I received my final grade and thus reached the academic de
|
|||
|
||||
This also means I can now make the thesis public:
|
||||
|
||||
<center>
|
||||
[Network Function Offloading in Virtualized Environments](https://tmp.fnordig.de/uni/master-thesis/nf-offloading-in-virtualized-environments_jan-erik_rediger.pdf) (PDF)
|
||||
</center>
|
||||
|
||||
If you have questions regarding anything in that thesis, contact me [on Twitter](https://twitter.com/badboy_) or [via email](mailto:janerik\ at\ fnordig\ dot\ de).
|
||||
If you have questions regarding anything in that thesis, contact me [on Twitter](https://twitter.com/badboy_) or [via email](mailto:janerik@fnordig.de).
|
||||
|
|
|
@ -20,12 +20,12 @@ Given how simple that sounds, I decided to implement a minimal DOH client in Rus
|
|||
I present to you:
|
||||
|
||||
<center>
|
||||
### [dnsoverhttps][]
|
||||
<h3><a href="https://github.com/badboy/dnsoverhttps">dnsoverhttps</a></h3>
|
||||
</center>
|
||||
|
||||
It exports one function to resolve a hostname to its IPv6 and IPv4 addresses:
|
||||
|
||||
```
|
||||
```rust
|
||||
extern crate dnsoverhttps;
|
||||
|
||||
fn main() {
|
||||
|
|
|
@ -35,7 +35,7 @@ This makes for a very pleasant development experience.
|
|||
|
||||
Add the dependency to your `Cargo.toml`:
|
||||
|
||||
```ini
|
||||
```toml
|
||||
[dependencies]
|
||||
redis = "0.11.0"
|
||||
```
|
||||
|
|
|
@ -27,7 +27,7 @@ Let's deploy it on [fly.io].
|
|||
We start by creating a new Fly app.
|
||||
We stick to a generated name and put it into Frankfurt.
|
||||
|
||||
```bash
|
||||
```shell
|
||||
$ mkdir -p Documents/gotosocial-fly
|
||||
$ cd Documents/gotosocial-fly
|
||||
$ fly launch
|
||||
|
|
|
@ -81,7 +81,7 @@ I trimmed that down just slightly and swapped in Ruby 2.7 (here's the [list of a
|
|||
|
||||
The important line is this:
|
||||
|
||||
```
|
||||
```nix
|
||||
ruby = pkgs."ruby-2.7.8";
|
||||
```
|
||||
|
||||
|
@ -89,7 +89,7 @@ ruby = pkgs."ruby-2.7.8";
|
|||
|
||||
Now on to installing it into a shell:
|
||||
|
||||
```
|
||||
```bash
|
||||
nix develop
|
||||
```
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ data:
|
|||
{% assign phrase = " minute read" | prepend: reading_time %}
|
||||
<time pubdate="pubdate">{{ post.published_date | date: "%b %d, %Y" }} · {{ phrase }}</time>
|
||||
|
||||
{% if post.data and post.data.tags -%}
|
||||
{%- for tag in post.data.tags %}
|
||||
{% if post.data and post.tags -%}
|
||||
{%- for tag in post.tags %}
|
||||
· <a href="/tagged/{{ tag }}.html">{{ tag }}</a>
|
||||
{%- endfor %}
|
||||
{%- endif -%}
|
||||
|
|
|
@ -11,7 +11,7 @@ data:
|
|||
<table>
|
||||
{%- for post in collections.posts.pages %}
|
||||
{%- assign postyear = post.published_date | date: "%Y" %}
|
||||
{%- if post.data.tags and post.data.tags contains "mozilla" -%}
|
||||
{%- if post.tags and post.tags contains "mozilla" -%}
|
||||
<tr>
|
||||
<td>{{ post.published_date | date: "%d. %b %Y"}}</td>
|
||||
<td><a href="/{{post.permalink }}">{{post.title}}</a></td>
|
||||
|
|
|
@ -8,7 +8,7 @@ permalink: /tagged/mozilla.xml
|
|||
<link>https://fnordig.de</link>
|
||||
<description>fnordig - posts tagged with 'mozilla'</description>
|
||||
{% for post in collections.posts.pages %}
|
||||
{%- if post.data.tags and post.data.tags contains "mozilla" -%}
|
||||
{%- if post.tags and post.tags contains "mozilla" -%}
|
||||
<item>
|
||||
<title>{{ post.title | escape }}</title>
|
||||
<link>https://fnordig.de/{{ post.permalink }}</link>
|
||||
|
|
|
@ -11,7 +11,7 @@ data:
|
|||
<table>
|
||||
{%- for post in collections.posts.pages %}
|
||||
{%- assign postyear = post.published_date | date: "%Y" %}
|
||||
{%- if post.data.tags and post.data.tags contains "nix" -%}
|
||||
{%- if post.tags and post.tags contains "nix" -%}
|
||||
<tr>
|
||||
<td>{{ post.published_date | date: "%d. %b %Y"}}</td>
|
||||
<td><a href="/{{post.permalink }}">{{post.title}}</a></td>
|
||||
|
|
|
@ -8,7 +8,7 @@ permalink: /tagged/nix.xml
|
|||
<link>https://fnordig.de</link>
|
||||
<description>fnordig - post tagged with 'nix'</description>
|
||||
{% for post in collections.posts.pages %}
|
||||
{%- if post.data.tags and post.data.tags contains "nix" -%}
|
||||
{%- if post.tags and post.tags contains "nix" -%}
|
||||
<item>
|
||||
<title>{{ post.title | escape }}</title>
|
||||
<link>https://fnordig.de/{{ post.permalink }}</link>
|
||||
|
|
|
@ -11,7 +11,7 @@ data:
|
|||
<table>
|
||||
{%- for post in collections.posts.pages %}
|
||||
{%- assign postyear = post.published_date | date: "%Y" %}
|
||||
{%- if post.data.tags and post.data.tags contains "rust" -%}
|
||||
{%- if post.tags and post.tags contains "rust" -%}
|
||||
<tr>
|
||||
<td>{{ post.published_date | date: "%d. %b %Y"}}</td>
|
||||
<td><a href="/{{post.permalink }}">{{post.title}}</a></td>
|
||||
|
|
|
@ -8,7 +8,7 @@ permalink: /tagged/rust.xml
|
|||
<link>https://fnordig.de</link>
|
||||
<description>fnordig - post tagged with 'rust'</description>
|
||||
{% for post in collections.posts.pages %}
|
||||
{%- if post.data.tags and post.data.tags contains "rust" -%}
|
||||
{%- if post.tags and post.tags contains "rust" -%}
|
||||
<item>
|
||||
<title>{{ post.title | escape }}</title>
|
||||
<link>https://fnordig.de/{{ post.permalink }}</link>
|
||||
|
|
Loading…
Reference in a new issue