Skip to content

Instantly share code, notes, and snippets.

View AuthorProxy's full-sized avatar
👾
Don't worry, be happy :)

Alex Kostyukov AuthorProxy

👾
Don't worry, be happy :)
View GitHub Profile
@AuthorProxy
AuthorProxy / telegram-mtproxy.md
Created March 24, 2026 12:36 — forked from rameerez/telegram-mtproxy.md
Telegram Proxy How-To: complete and up-to-date MTProxy tutorial

How to set up a Telegram Proxy (MTProxy)

This tutorial will teach you how to set up a Telegram MTProxy on an Ubuntu 22.04 sever using AWS Lightsail, although you can use any other Linux distribution and cloud provider.

Using a Telegram proxy is a safe, easy and effective way of overcoming Telegram bans. It's useful, for example, to keep using Telegram under tyrannical regimes, or to circumvent judges' decisions to block Telegram.

Telegram proxies are a built-in feature in all Telegram apps (both mobile and desktop). It allows Telegram users to connect to a proxy in just one or two clicks / taps.

Telegram proxies are safe: Telegram sends messages using their own MTProto secure protocol, and the proxy can only see encrypted traffic – there's no way for a proxy to decrypt the traffic and read the messages. The proxy does not even know which Telegram users are using the proxy, all the proxy sees is just a list of IPs.

docker container rm -f $(docker container ls -aq)
docker image rm -f $(docker image ls -aq)
docker volume rm -f $(docker volume ls -q)
docker builder prune -f
docker system prune -f --all --volumes
@AuthorProxy
AuthorProxy / typescript-enums.ts
Created July 24, 2021 00:50
3 types of TypeScript Enums
//////////////////////////////////////////////////////////////
export const buttonSizes_1 = ['small', 'medium'] as const
export type ButtonSize_1 = typeof buttonSizes_1[number]
function test_1(_: ButtonSize_1) {
console.assert(buttonSizes_1.includes(_))
}
test_1('medium') // we can do this
test_1(ButtonSize_1.small) // we can't do this
@AuthorProxy
AuthorProxy / 101-rx-samples.md
Created October 10, 2020 19:54 — forked from omnibs/101-rx-samples.md
101 Rx Samples in C#

101 Rx Samples in C#

This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.

Here's the unedited original, translated to Github Markdown glory:

101 Rx Samples - a work in progress

@AuthorProxy
AuthorProxy / JsonNetResult.cs
Last active September 21, 2016 21:55 — forked from rorymurphy/JsonNetValueProviderFactory.cs
ASP.NET MVC Value Provider Factory using JSON.NET
using Newtonsoft.Json;
using System;
using System.Web.Mvc;
namespace Proxy.Mvc.Extensions.ActionResults
{
public class JsonNetResult<T> : JsonResult
{
public JsonNetResult(T data)
{
var a = 'один аргумент';
console.log(a);
console.log('много аргументов', 12, true, [1,2,3], {a:1,b:2});
console.log('Node', document.getElementsByTagName('body'));
console.log('DOM', document);
console.log('функция', alert);
console.log('прочее', NaN, null, undefined);
console.log('У Пети было %d %s',10,'яблок');
console.log('Пи равно %f',Math.PI);
@AuthorProxy
AuthorProxy / disable-scroll-events.css
Created August 23, 2014 09:59
Disable events while scrolling page
.disable-hover {
pointer-events: none;
}
@AuthorProxy
AuthorProxy / OpenXMLSample.cs
Created August 19, 2014 11:39
OpenXML SDK Sample: Find and replace marks with text
using System;
using System.Collections.Generic;
using System.Linq;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
namespace OpenXML_ReadAndReplaceMarks
{
class Program
{
@AuthorProxy
AuthorProxy / PrepareConsole.cs
Created August 19, 2014 11:08
Prepare console for use with windows forms application
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32.SafeHandles;
namespace ConsoleUI
{
/// <summary>
/// Configure console to use with WF
@AuthorProxy
AuthorProxy / DateTimeConvertions.cs
Created August 19, 2014 11:06
Testing different formats for date and time
using System;
using System.Globalization;
using System.Threading;
namespace Program
{
public class Program
{
private static void thread_test()
{