Skip to content

Instantly share code, notes, and snippets.

@rinex20
rinex20 / gost_install.sh
Last active May 14, 2022 04:43
gost installer for network
#!/bin/bash
# https://raw.githubusercontent.com/sunpma/doubi/master/iptables-pf.sh 一键转发
# sudo curl -o install.sh http://192.168.90.227/gost/install.sh | sudo bash install.sh
set -ex
mkdir -p /etc/gost && \
cd /etc/gost
@rinex20
rinex20 / gost-tun-tap-guide.md
Last active May 17, 2022 15:27
Gost应用--Tun/Tap篇

GOST tun/tap 应用指南

准备工作

  1. 需要有一台VPS作为服务端,Linux发行版都可以,没特别要求,但是要确认支持tun/tap驱动,至于如何确认,后面会讲到。
  2. Windows和Linux/Mac上都可以运行客户端。其中tap模式,不支持Mac。

工作原理

以tun模式为例。 服务端运行后,创建P2P的tun网卡,IP为10.168.10.1.

@rinex20
rinex20 / Synology-Diskstation-Git.md
Created October 22, 2023 05:39 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@rinex20
rinex20 / gcc compiler optimization for arm systems.md
Created November 3, 2023 02:05 — forked from fm4dd/gcc compiler optimization for arm systems.md
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@rinex20
rinex20 / snat_dnat_advantech.md
Created December 18, 2023 02:06 — forked from tomasinouk/snat_dnat_advantech.md
examples of SNAT, DNAT with iptables for Advantech, Conel routers, with comments (probably will work on other routers where iptables can be manipulated, care needs to be taken on applying these commands after reboot).

Some examples of SNAT, DNAT with iptables with comments

mainly used in start-up script

How to test 'safely'

When we play with iptables aka firewall we might end up in situation, where we execute rule, which has unforseen impact - lock yourself out. Recovering from this situation is necessity.

How to:

  • Enable reboot via SMS.
  • Test all commands in shell first before putting them into Start-up script. This way the command will be wiped out, when unit is rebooted.

masquarade all outgoing packets to be WLAN0 IP