Skip to content

Instantly share code, notes, and snippets.

View imorteza's full-sized avatar
🏠
Working from home

Morteza imorteza

🏠
Working from home
View GitHub Profile
@imorteza
imorteza / facebok ip list
Created May 19, 2024 06:47 — forked from Whitexp/facebok ip list
facebook ip list
31.13.24.0/21
31.13.64.0/19
31.13.64.0/24
31.13.69.0/24
31.13.70.0/24
31.13.71.0/24
31.13.72.0/24
31.13.73.0/24
31.13.75.0/24
31.13.76.0/24
{
"info": {
"_postman_id": "f5181ce8-7779-4308-9a22-e0c2a359dc44",
"name": "MHSanaei",
"description": "This collection was gathered to assist developers in gaining a better understanding of the API and the necessary parameters to send to the X-UI server.\n\nI have performed extensive testing on the routes, parameters, and responses that may be required or returned by the XUI server.\n\nBy utilizing this collection, developers can easily examine the expected responses without the need to connect an actual XUI server to Postman.\n\nIf you wish to live test the API, you can modify each of the collection variables based on your own settings. This will enable the collection to display live responses from your own server.\n\nHowever, please note that live testing should only be conducted in a development or testing environment to avoid any potential issues in a production environment.\n\n### [Github Repository](https://github.com/MHSanaei/3x-ui)",
"schema": "https://schema.getpostman.com/json/coll
#!/bin/sh
OS=`uname -m`;
sudo wget -O /usr/bin/badvpn-udpgw "https://raw.githubusercontent.com/daybreakersx/premscript/master/badvpn-udpgw"
if [ "$OS" == "x86_64" ]; then
sudo wget -O /usr/bin/badvpn-udpgw "https://raw.githubusercontent.com/daybreakersx/premscript/master/badvpn-udpgw64"
fi
sudo touch /etc/rc.local
sudo echo "\nscreen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300" >> /etc/rc.local
sudo chmod +x /usr/bin/badvpn-udpgw
sudo screen -AmdS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300
@imorteza
imorteza / client.c
Created April 12, 2023 17:07 — forked from inaz2/client.c
IPv6 server & client in C
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
void ping(int s, char *message)
{
char buf[8192];
@imorteza
imorteza / CMakeLists.txt
Created April 7, 2023 11:37 — forked from jirihnidek/CMakeLists.txt
Example of IPv6 TCP client-server application(s) using blocking sockets
# Main CMakeFile.txt
# Minimal version of CMake
cmake_minimum_required (VERSION 2.6)
# Build type
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to 'Debug' as none was specified.")
set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE)
# Set the possible values of build type for cmake-gui
@imorteza
imorteza / tun-ping-win.py
Created February 18, 2023 04:43 — forked from glacjay/tun-ping-win.py
Reading/Writing OpenVPN's TUN/TAP Device under Windows using Python.
import _winreg as reg
import win32file
adapter_key = r'SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}'
def get_device_guid():
with reg.OpenKey(reg.HKEY_LOCAL_MACHINE, adapter_key) as adapters:
try:
@imorteza
imorteza / HttpServer.cs
Created March 15, 2021 08:17 — forked from define-private-public/HttpServer.cs
A Simple HTTP server in C#
// Filename: HttpServer.cs
// Author: Benjamin N. Summerton <define-private-public>
// License: Unlicense (http://unlicense.org/)
using System;
using System.IO;
using System.Text;
using System.Net;
using System.Threading.Tasks;
@imorteza
imorteza / nginx-tuning.md
Created August 11, 2020 06:35 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

~r~ = Red
~b~ = Blue
~g~ = Green
~y~ = Yellow
~p~ = Purple
~o~ = Orange
~c~ = Grey?
~m~ = Darker Grey
~u~ = Black
~n~ = New Line
@imorteza
imorteza / fivem_keys.lua
Created July 3, 2020 10:32 — forked from KingCprey/fivem_keys.lua
FiveM IsControlPressed keys
--IsControlPressed(0,x)
local keys={}
keys[34]="A"
keys[29]="B"
keys[26]="C"
keys[30]="D"
keys[46]="E"
keys[49]="F"
keys[47]="G"
keys[74]="H"