Skip to content

Instantly share code, notes, and snippets.

@ViRb3
ViRb3 / wireguard-internet-vpn-linux.md
Last active August 5, 2018 00:15
WireGuard Internet VPN

1. Set up WireGuard

Set up a WireGuard connection following this quick start guide.

2. Enable IP Forwarding on the server

This tells the computer that it should pass along any traffic that is meant for a different computer on its network.

We modify /etc/sysctl.conf:

net.ipv4.ip_forward = 1
@ViRb3
ViRb3 / Linux-Reverse-Tunnel.md
Last active September 28, 2019 23:13
Set up a Linux box as reverse tunnel

I got my Raspberry Pi 3. I hooked it up to my university's Wi-Fi... and then realized - I have no way to SSH into it. Or connect to it at all. The university does not maintain a client-to-client network, and of course, you cannot port-forward. I tried some third-party solutions (ngrik, remot3.it), and while they worked, I wanted something free, unlimited, with my own static domain, which was also very fast. Given I already have a VPS, I turned it into a reverse tunnel to my RPi3.

General diagram

[‾‾‾‾‾‾‾‾]     SSH request    [‾‾‾‾‾‾‾‾]     SSH request    [‾‾‾‾‾‾‾‾]
|        |  --------------->  |        |  --------------->  |        |
| Anyone |      port 6000     |   VPS  |       port 22      |  RPi3  |
|        |                    |        |                    |        |
|        |     SSH response   |        |     SSH response   |        |
[________]  <---------------  [________]  <---------------  [________]
@ViRb3
ViRb3 / OpenVPN Internet Proxy Windows.md
Last active April 18, 2024 16:04
Create an OpenVPN Windows server that proxies internet traffic
Tested on Windows 10 x64, Anniversary Update
17.09.2017

Set up OpenVPN

  1. Set up an OpenVPN connection following this guide

  2. Generate a TA key and place it in the same folder as the other certificates/keys:

@ViRb3
ViRb3 / ConvertToCStyleArray.kt
Created July 22, 2017 22:15
Convert to CStyle Array Kotlin
fun ConvertToCStyleArray(text: String): String {
var result = ""
var singleByte = ""
for(i in text)
{
singleByte += i
if(singleByte.length > 1) {
result += "\\x" + singleByte
using System;
using System.Drawing;
using System.Windows.Forms;
namespace APlusGenerator
{
internal class EditableListView : ListView
{
private const int WM_HSCROLL = 0x114;
private const int WM_VSCROLL = 0x115;