Commit 7a2bc39e by Michael Pastushkov

initial commit

parents
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19yy name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.
2024-09-15
* First public release.
all:
$(MAKE) -C src
install:
$(MAKE) -C src install
uninstall:
$(MAKE) -C src uninstall
clean:
$(MAKE) -C src clean
FLAGS=CC=i586-mingw32msvc-g++ LD=i586-mingw32msvc-g++ LDFLAGS=-lws2_32 NAME=bytevia.exe
all:
$(MAKE) -C src $(FLAGS)
install:
$(MAKE) -C src $(FLAGS) install
uninstall:
$(MAKE) -C src $(FLAGS) uninstall
clean:
$(MAKE) -C src $(FLAGS) clean
bytevia is a TCP and UDP proxy with built-in encryption (obfuscation) to avoid protocol detection and bypass any censorship in the middle
## Help
```
$ bytevia --help
Usage: bytevia [options]
Options:
--version
--help
--local-port=PORT local port
--remote-port=PORT remote port
--remote-host=HOST remote host
--bind-address=IP bind address
--client-address=IP only accept connections from this IP address
--buffer-size=BYTES buffer size
--fork fork-based concurrency
--log=LEVEL 0 - no logging, 3 - maximum logging
--stay-alive don't exit on errors
--mode=MODE 0 - client side, 1 - server side ()
--encryption=ALG 0 - no encryption, 1 - time-based obfuscation
```
## Building
### For Unix
```
$ git clone https://github.com/XXX/bytevia.git
$ cd bytevia
$ ./configure
$ make
$ ./bytevia --version
$ ./bytevia --help
```
### For Mac OS X
You will need the [Command Line Tools for Xcode](https://developer.apple.com/xcode/) to build bytevia under Mac OS X.
```
$ uname -mrs
Darwin 12.5.0 x86_64
$ git clone https://github.com/XXX/bytevia.git
$ cd bytevia
$ ./configure --prefix=/usr/bin
$ make
$ ./bytevia --version
$ ./bytevia --help
$ file bytevia
bytevia: Mach-O 64-bit executable x86_64
```
### For Mac OS X (Homebrew)
Thanks to [Edward Samson's](https://github.com/esamson) [pull request](https://github.com/Homebrew/homebrew/pull/23977), you can also use [Homebrew](http://brew.sh/) to install bytevia under Mac OS X.
```
$ uname -mrs
Darwin 12.5.0 x86_64
$ brew --version
0.9.5
$ brew update
$ brew info bytevia
$ brew install bytevia
$ bytevia --version
$ bytevia --help
$ file $(which bytevia)
/usr/local/bin/bytevia: Mach-O 64-bit executable x86_64
```
### For Windows (Cygwin)
You will need the Cygwin environment for Windows from http://www.cygwin.com/ with the following additional packages installed:
* gcc
* git
* make
```
$ uname -a
CYGWIN_NT-6.1-WOW64 computer 1.7.25(0.270/5/3) 2013-08-31 20:39 i686 Cygwin
$ git clone git://github.com/XXX/bytevia.git
$ cd bytevia
$ ./configure
$ make
$ ./bytevia --version
$ ./bytevia --help
$ file bytevia.exe
bytevia.exe: PE32 executable (console) Intel 80386, for MS Windows
```
### For Windows (MinGW32)
You will need MinGW32 to cross-compile bytevia. Please see http://www.mingw.org/ for more details. If you are using a Debian-based distribution then you will need to install the following packages:
* mingw32
* mingw32-binutils
* mingw32-runtime
```
$ apt-get install mingw32 mingw32-binutils mingw32-runtime
$ git clone https://github.com/XXX/bytevia.git
$ cd bytevia
$ ./configure
$ make -f Makefile.MinGW32
$ file bytevia.exe
bytevia.exe: PE32 executable (console) Intel 80386, for MS Windows
```
Note: The MinGW32-based version does not support the fork-based concurrent client handling. If you need this feature under Windows, then you should use the Cygwin-based version.
## ChangeLog
See [ChangeLog](https://raw.github.com/XXX/bytevia/master/ChangeLog).
## License
Copyright (c) 2000-2021 Clemens Fuchslocher,
Copyright (c) 2024 Michael Pastushkov,
released under the GPL.
#!/bin/sh
# Help option?
HELP=`echo $* | sed -n -e 's/.*--help.*/HELP/p'`
if [ "$HELP" = "HELP" ]; then
cat << END
Usage: configure [options]
Options:
--prefix=PATH
--help
END
exit 1
fi
# Prefix option?
PREFIX=`echo $* | sed -n -e 's/.*--prefix=\([^\ ]*\).*/\1/p'`
if [ ! "$PREFIX" ]; then
PREFIX="/usr/local/bin/"
fi
PREFIX=`sh -c "echo $PREFIX"` # eval PREFIX=$PREFIX
if [ ! -d "$PREFIX" ]; then
echo "configure: error: $PREFIX isn't a directory."
exit 1
fi
OS=`uname -s 2> /dev/null`
case "$OS" in
FreeBSD)
;;
Linux)
;;
HP-UX)
;;
SunOS)
LDFLAGS='-lxnet'
;;
esac
echo "checking host system type... $OS"
PREFIX=`echo $PREFIX | sed 's#\/#\\\/#g'`
LDFLAGS=`echo $LDFLAGS | sed 's#\/#\\\/#g'`
sed -n -e "s/@PREFIX@/$PREFIX/g;" \
-e "s/@LDFLAGS@/$LDFLAGS/g;" \
-e "w ./src/Makefile" \
./src/Makefile.in
echo "configure: configure complete, now type 'make' and 'make install'."
#!/bin/sh
make clean && make && ./bytevia temp/1984-proxy2-tcp.ovpn --local-port=12345 --remote-host=p4pn.net --remote-port=3389
#!/bin/sh
make clean && make && ./bytevia --local-port=3389 --remote-host=172.31.13.132 --remote-port=1194 --mode=server
\ No newline at end of file
#!/bin/sh
make clean && make && ./bytevia --local-port=1984 --remote-host=p4pn.net --remote-port=3389 --proto=udp --secret=52341
\ No newline at end of file
#!/bin/sh
make clean && make && ./bytevia --local-port=3389 --remote-host=172.31.13.132 --remote-port=1194 --mode=server --proto=udp --secret=52341
\ No newline at end of file
NAME = bytevia
CC = gcc
LD = gcc
CFLAGS = -Wall -I./
LDFLAGS =
OBJS = bytevia.o
BINDIR = /usr/local/bin/
INSTALL = install
STRIP = strip
RM = /bin/rm -f
CP = cp
all: bytevia
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
bytevia: $(OBJS)
@echo $(CC)
$(LD) -o $(NAME) $(OBJS) $(LDFLAGS)
$(CP) $(NAME) ..
install:
$(INSTALL) -d $(BINDIR)
$(INSTALL) -m 0755 $(NAME) $(BINDIR)
$(STRIP) $(BINDIR)/$(NAME)
uninstall:
$(RM) $(BINDIR)/$(NAME)
clean:
$(RM) *.o *~ $(NAME) ../$(NAME)
NAME = bytevia
CC = gcc
LD = gcc
CFLAGS = -Wall -I./
LDFLAGS = @LDFLAGS@
OBJS = bytevia.o
BINDIR = @PREFIX@
INSTALL = install
STRIP = strip
RM = /bin/rm -f
CP = cp
all: bytevia
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
bytevia: $(OBJS)
@echo $(CC)
$(LD) -o $(NAME) $(OBJS) $(LDFLAGS)
$(CP) $(NAME) ..
install:
$(INSTALL) -d $(BINDIR)
$(INSTALL) -m 0755 $(NAME) $(BINDIR)
$(STRIP) $(BINDIR)/$(NAME)
uninstall:
$(RM) $(BINDIR)/$(NAME)
clean:
$(RM) *.o *~ $(NAME) ../$(NAME)
/*
* Copyright (C) 2024 Michael Pastushkov <michael@pastushkov.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
*/
#include <errno.h>
#include <getopt.h>
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#ifdef __MINGW32__
#include <winsock2.h>
#else
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#endif
#include "bytevia.h"
struct struct_rc rc;
struct struct_options options;
static struct option long_options[] = {
{"local-port", required_argument, NULL, LOCAL_PORT_OPTION},
{"remote-host", required_argument, NULL, REMOTE_HOST_OPTION},
{"remote-port", required_argument, NULL, REMOTE_PORT_OPTION},
{"bind-address", required_argument, NULL, BIND_ADDRESS_OPTION},
{"client-address", required_argument, NULL, CLIENT_ADDRESS_OPTION},
{"buffer-size", required_argument, NULL, BUFFER_SIZE_OPTION},
#ifndef __MINGW32__
{"fork", no_argument, NULL, FORK_OPTION},
#endif
{"log", required_argument, NULL, LOG_OPTION},
{"stay-alive", no_argument, NULL, STAY_ALIVE_OPTION},
{"mode", required_argument, NULL, MODE_OPTION},
{"encrypt", required_argument, NULL, ENCRYPT_OPTION},
{"secret", required_argument, NULL, SECRET_OPTION},
{"proto", required_argument, NULL, PROTO_OPTION},
{"help", no_argument, NULL, HELP_OPTION},
{"version", no_argument, NULL, VERSION_OPTION},
{0, 0, 0, 0}};
const char *name = NAME;
unsigned char cipher[256];
int cipher_day;
char *get_current_timestamp(void) {
static char date_str[20];
time_t date;
time(&date);
strftime(date_str, sizeof(date_str), "%Y-%m-%d %H:%M:%S", localtime(&date));
return date_str;
}
unsigned int xorshift32(unsigned int *state) {
unsigned int x = *state;
x ^= x << 13;
x ^= x >> 17;
x ^= x << 5;
*state = x;
return x;
}
void shuffle(unsigned char *array, int n, unsigned int seed) {
unsigned int state = seed;
srand(seed);
for (int i = n - 1; i > 0; i--) {
int j = xorshift32(&state) % (i + 1);
int temp = array[i];
array[i] = array[j];
array[j] = temp;
}
}
unsigned int get_hash(unsigned int source) {
unsigned int hash = source;
hash = (hash ^ 61) ^ (hash >> 16);
hash = hash + (hash << 3);
hash = hash ^ (hash >> 4);
hash = hash * 0x27d4eb2d;
hash = hash ^ (hash >> 15);
return hash;
}
int get_utc_day_of_month() {
time_t now = time(NULL);
struct tm *utc_time = gmtime(&now);
return utc_time->tm_mday;
}
void update_cipher() {
int i;
unsigned int seed;
int day = get_utc_day_of_month();
if (day == cipher_day)
return;
for (i = 0; i < 256; i++)
cipher[i] = i;
seed = get_hash(options.secret * day);
shuffle(cipher, sizeof(cipher), seed);
if (options.log) {
printf("%s new cipher %i\n", get_current_timestamp(), day);
if (options.log > 2) {
for (i=0; i<256; i++) {
printf("%d ", cipher[i]);
if ((i + 1) % 16 == 0)
printf("\n");
}
}
}
cipher_day = day;
}
int encode(unsigned char* buf, int len) {
int i;
if (!options.encrypt)
return 0;
update_cipher();
for (i=0; i<len; i++)
buf[i] = cipher[buf[i]];
if (options.log) {
printf("\r%-50s", " ");
printf("\r%s encode %i bytes ", get_current_timestamp(), len);
fflush(stdout);
}
return 0;
}
int decode(unsigned char* buf, int len) {
int i, j;
if (!options.encrypt)
return 0;
update_cipher();
for (i=0; i<len; i++) {
for (j=0; j<256; j++) {
if (cipher[j] == buf[i]) {
buf[i] = j;
break;
}
}
}
if (options.log) {
printf("\r%-50s", " ");
printf("\r%s decode %i bytes ", get_current_timestamp(), len);
fflush(stdout);
}
return 0;
}
int build_udp(void) {
/* Create local socket */
rc.client_socket = socket(AF_INET, SOCK_DGRAM, 0);
if ((rc.client_socket) < 0) {
perror("build_udp: local socket()");
return 1;
}
memset(&rc.client_addr, 0, sizeof(rc.client_addr));
rc.client_addr.sin_family = AF_INET;
rc.client_addr.sin_addr.s_addr = inet_addr(options.bind_address);
rc.client_addr.sin_port = htons(options.local_port);
if (bind(rc.client_socket, (struct sockaddr *)&rc.client_addr, sizeof(rc.client_addr)) < 0) {
perror("build_udp: bind()");
return 1;
}
return 0;
}
int build_tcp(void) {
memset(&rc.server_addr, 0, sizeof(rc.server_addr));
rc.server_addr.sin_port = htons(options.local_port);
rc.server_addr.sin_family = AF_INET;
rc.server_addr.sin_addr.s_addr = INADDR_ANY;
rc.server_socket = socket(AF_INET, options.proto, 0);
if (rc.server_socket < 0) {
perror("build_tcp: socket()");
return 1;
}
int optval = 1;
#ifdef __MINGW32__
if (setsockopt(rc.server_socket, SOL_SOCKET, SO_REUSEADDR, (const char *) &optval, sizeof(optval)) < 0)
#else
if (setsockopt(rc.server_socket, SOL_SOCKET, SO_REUSEADDR, &optval, sizeof(optval)) < 0)
#endif
{
perror("build_tcp: setsockopt(SO_REUSEADDR)");
return 1;
}
if (options.bind_address) {
rc.server_addr.sin_addr.s_addr = inet_addr(options.bind_address);
}
if (bind(rc.server_socket, (struct sockaddr *) &rc.server_addr, sizeof(rc.server_addr)) < 0) {
perror("build_server: bind()");
return 1;
}
if (listen(rc.server_socket, 1) < 0) {
perror("build_server: listen()");
return 1;
}
return 0;
}
int wait_for_clients(void) {
#if defined(__MINGW32__) || defined(__CYGWIN__)
int client_addr_size;
#else
unsigned int client_addr_size;
#endif
if (options.proto == SOCK_DGRAM)
return 0;
client_addr_size = sizeof(struct sockaddr_in);
rc.client_socket = accept(rc.server_socket, (struct sockaddr *) &rc.client_addr, &client_addr_size);
if (rc.client_socket < 0) {
if (errno != EINTR)
perror("wait_for_clients: accept()");
return 1;
}
if (options.client_address && (strcmp(inet_ntoa(rc.client_addr.sin_addr), options.client_address) != 0)) {
if (options.log)
printf("%s refused request from %s\n", get_current_timestamp(), inet_ntoa(rc.client_addr.sin_addr));
close(rc.client_socket);
return 1;
}
if (options.log)
printf("%s request from %s\n", get_current_timestamp(), inet_ntoa(rc.client_addr.sin_addr));
return 0;
}
int build_tunnel(void) {
rc.remote_host = gethostbyname(options.remote_host);
if (rc.remote_host == NULL) {
perror("build_tunnel: gethostbyname()");
return 1;
}
memset(&rc.remote_addr, 0, sizeof(rc.remote_addr));
rc.remote_addr.sin_family = AF_INET;
rc.remote_addr.sin_port = htons(options.remote_port);
memcpy(&rc.remote_addr.sin_addr.s_addr, rc.remote_host->h_addr, rc.remote_host->h_length);
rc.remote_socket = socket(AF_INET, options.proto, 0);
if (rc.remote_socket < 0) {
perror("build_tunnel: socket()");
return 1;
}
if (options.proto == SOCK_STREAM) {
if (connect(rc.remote_socket, (struct sockaddr *)&rc.remote_addr, sizeof(rc.remote_addr)) < 0) {
perror("build_tunnel: connect()");
return 1;
}
}
return 0;
}
int use_tunnel(void)
{
fd_set io;
unsigned char buffer[options.buffer_size];
struct sockaddr_in client_addr;
socklen_t addr_len = sizeof(client_addr);
int count_recv, count_sent;
for (;;)
{
FD_ZERO(&io);
FD_SET(rc.client_socket, &io);
FD_SET(rc.remote_socket, &io);
int max_fd = (rc.client_socket > rc.remote_socket) ? rc.client_socket : rc.remote_socket;
/* Waiting for data */
if (select(max_fd+1, &io, NULL, NULL, NULL) < 0) {
perror("use_tunnel: select()");
break;
}
if (FD_ISSET(rc.client_socket, &io))
{
/* Processing request from local, sending it to remote*/
count_recv = (options.proto == SOCK_DGRAM) ?
recvfrom(rc.client_socket, buffer, sizeof(buffer), 0, (struct sockaddr *)&client_addr, &addr_len) :
recv(rc.client_socket, buffer, sizeof(buffer), 0);
if (count_recv < 0) {
perror("use_tunnel: recv(rc.client_socket)");
close(rc.client_socket);
close(rc.remote_socket);
return 1;
}
if (count_recv == 0) {
close(rc.client_socket);
close(rc.remote_socket);
return 0;
}
(options.mode == MODE_SERVER) ?
decode(buffer, count_recv) :
encode(buffer, count_recv);
count_sent = (options.proto == SOCK_DGRAM) ?
sendto(rc.remote_socket, buffer, count_recv, 0, (struct sockaddr *)&rc.remote_addr, sizeof(rc.remote_addr)) :
send(rc.remote_socket, buffer, count_recv, 0);
if (options.log > 2)
printf("forwarded %d / %d bytes from local to remote\n", count_recv, count_sent);
}
if (FD_ISSET(rc.remote_socket, &io))
{
/* Processing response from remote, sending it back to local */
count_recv = (options.proto == SOCK_DGRAM) ?
recvfrom(rc.remote_socket, buffer, sizeof(buffer), 0, NULL, NULL) :
recv(rc.remote_socket, buffer, sizeof(buffer), 0);
if (count_recv < 0) {
perror("use_tunnel: recv(rc.remote_socket)");
close(rc.client_socket);
close(rc.remote_socket);
return 1;
}
if (count_recv == 0) {
close(rc.client_socket);
close(rc.remote_socket);
return 0;
}
(options.mode == MODE_SERVER) ?
encode(buffer, count_recv) :
decode(buffer, count_recv);
count_sent = (options.proto == SOCK_DGRAM) ?
sendto(rc.client_socket, buffer, count_recv, 0, (struct sockaddr *)&client_addr, addr_len) :
send(rc.client_socket, buffer, count_recv, 0);
if (options.log > 2)
printf("forwarded %d / %d bytes from remote to local\n", count_recv, count_sent);
}
}
return 0;
}
void handle_tunnel(void) {
if (build_tunnel() == 0)
use_tunnel();
}
void handle_client(void) {
#ifdef __MINGW32__
handle_tunnel();
#else
if (options.fork) {
if (fork() == 0) {
close(rc.server_socket);
handle_tunnel();
exit(0);
}
close(rc.client_socket);
}
else {
handle_tunnel();
}
#endif
}
void print_usage(void) {
printf("Usage: %s [config_path] [options]\n", name);
}
void print_helpinfo(void) {
printf("Try `%s --help' for more options\n", name);
}
void print_help(void) {
fprintf(stderr, "\
Options:\n\
--version\n\
--help\n\
--local-port=PORT local port\n\
--remote-port=PORT remote port\n\
--remote-host=HOST remote host\n\
--bind-address=IP bind address\n\
--client-address=IP only accept connections from this address\n\
--buffer-size=BYTES buffer size\n"
#ifndef __MINGW32__
" --fork fork-based concurrency (tcp-only)\n"
#endif
" --log=LEVEL 0-3\n\
--stay-alive don't exit on network errors\n\
--mode=MODE client [default] or server\n\
--encrypt=ALG 0 - no encryption, 1 - time-based obfuscation\n\
--secret number used for obfuscation, must the same same client and server\n\
--proto=PROTO tcp [default] or udp\n\
\n");
}
void print_version(void) {
fprintf(stderr, "\n\
bytevia v" VERSION " \n\n\
Copyright (C) 2024 Michael Pastushkov \n\n\
This program is distributed in the hope that it will be useful,\n\
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
GNU General Public License for more details.\n\n\
Written by by Michael Pastushkov <michael@pastushkov.com>\n\n\
");
}
void init_options() {
memset(&options, 0, sizeof(options));
/* defaults */
options.buffer_size = MINIMUM_BUFFER_SIZE;
options.bind_address = "0.0.0.0";
options.proto = SOCK_STREAM;
options.log = 1;
options.encrypt = 1;
options.stay_alive = 1;
options.secret = 1;
}
void set_options(int argc, char *argv[]) {
int opt;
int index;
do {
opt = getopt_long(argc, argv, "", long_options, &index);
switch (opt)
{
case LOCAL_PORT_OPTION:
options.local_port = atoi(optarg);
break;
case REMOTE_HOST_OPTION:
options.remote_host = optarg;
break;
case REMOTE_PORT_OPTION:
options.remote_port = atoi(optarg);
break;
case BIND_ADDRESS_OPTION:
options.bind_address = optarg;
break;
case BUFFER_SIZE_OPTION:
options.buffer_size = atoi(optarg);
break;
case CLIENT_ADDRESS_OPTION:
options.client_address = optarg;
break;
case FORK_OPTION:
options.fork = 1;
break;
case LOG_OPTION:
options.log = atoi(optarg);
break;
case STAY_ALIVE_OPTION:
options.stay_alive = 1;
break;
case MODE_OPTION:
options.mode = (strcmp(optarg, "server") == 0) ? MODE_SERVER : MODE_CLIENT;
break;
case ENCRYPT_OPTION:
options.encrypt = atoi(optarg);
break;
case SECRET_OPTION:
options.secret = atoi(optarg);
break;
case PROTO_OPTION:
options.proto = (strcmp(optarg, "udp") == 0) ? SOCK_DGRAM : SOCK_STREAM;
break;
case HELP_OPTION:
print_usage();
print_help();
exit(0);
case VERSION_OPTION:
print_version();
exit(0);
case '?':
print_usage();
print_helpinfo();
exit(0);
}
} while (opt != -1);
}
void check_options() {
int opt_error = 0;
/* Required options */
if (!options.local_port) {
printf("%s: %s\n", name, "missing '--local-port=' option.");
opt_error++;
}
if (!options.remote_port) {
printf("%s: %s\n", name, "missing '--remote-port=' option.");
opt_error++;
}
if (!options.remote_host) {
printf("%s: %s\n", name, "missing '--remote_address=' option.");
opt_error++;
}
if (opt_error) {
print_usage();
print_help();
exit(-1);
}
/* Consistency checkss */
if (options.proto == SOCK_DGRAM && options.fork) {
printf("%s: %s\n", name, "option --fork is not supported with --proto=udp, ignored");
options.fork = 0;
}
if (options.mode == MODE_SERVER && !options.stay_alive) {
printf("%s: %s\n", name, "option --stay-alive is switched on with --mode=server");
options.stay_alive = 0;
}
}
#define MAX_ARGC 20
#define MAX_LINE_LENGTH 256
void read_config(char *path) {
int argc = 0;
char *argv[MAX_ARGC];
char line[MAX_LINE_LENGTH];
FILE *file = fopen(path, "r");
if (!file) {
perror("cannot read config file");
return;
}
while (fgets(line, sizeof(line), file)) {
if (strncmp(line, NAME, sizeof(NAME)-1) == 0) {
char *token = strtok(line, " \t\n");
while (token && argc < MAX_ARGC) {
argv[argc++] = strdup(token);
token = strtok(NULL, " \t\n");
}
}
}
optind = 0; /* this global var needs to be reset!! */
set_options(argc, argv);
}
int main(int argc, char *argv[]) {
int i, ret;
#ifdef __MINGW32__
WSADATA info;
if (WSAStartup(MAKEWORD(1,1), &info) != 0)
{
perror("main: WSAStartup()");
exit(1);
}
#endif
init_options();
set_options(argc, argv);
for (i=1; i<argc; i++) {
if (strncmp(argv[i], "--", 2) != 0) {
read_config(argv[i]);
break;
}
}
check_options();
ret = (options.proto == SOCK_STREAM) ?
build_tcp() :
build_udp();
if (ret != 0)
exit(1);
#ifndef __MINGW32__
signal(SIGCHLD, SIG_IGN);
#endif
if (options.log) {
printf("%s %s started %s\n", NAME, VERSION, get_current_timestamp());
printf(" protocol: %s\n", options.proto == SOCK_DGRAM ? "udp" : "tcp");
printf(" local: %s:%d\n", options.bind_address, options.local_port);
printf(" remote: %s:%d\n", options.remote_host, options.remote_port);
printf(" mode: %s\n", options.mode == MODE_SERVER ? "server" : "client");
printf(" encrypt: %s\n", options.encrypt ? "yes" : "no");
}
do
{
if (wait_for_clients() == 0)
{
handle_client();
}
}
while (options.stay_alive);
if (rc.server_socket)
close(rc.server_socket);
return 0;
}
#ifndef bytevia_H
#define bytevia_H
#define NAME "bytevia"
#define VERSION "1.0"
#define LOCAL_PORT_OPTION 'a'
#define REMOTE_HOST_OPTION 'b'
#define REMOTE_PORT_OPTION 'c'
#define BIND_ADDRESS_OPTION 'd'
#define CLIENT_ADDRESS_OPTION 'e'
#define BUFFER_SIZE_OPTION 'f'
#define FORK_OPTION 'g'
#define LOG_OPTION 'h'
#define STAY_ALIVE_OPTION 'i'
#define HELP_OPTION 'j'
#define VERSION_OPTION 'k'
#define MODE_OPTION 'l'
#define ENCRYPT_OPTION 'm'
#define SECRET_OPTION 'n'
#define PROTO_OPTION 'o'
#define MODE_CLIENT 0
#define MODE_SERVER 1
#define MINIMUM_BUFFER_SIZE 4096
#define PATH_SEPARATOR '/'
struct struct_options {
unsigned int local_port;
char *remote_host;
unsigned int remote_port;
char *bind_address;
char *client_address;
unsigned int buffer_size;
unsigned int fork;
unsigned int log;
unsigned int stay_alive;
unsigned int mode;
unsigned int encrypt;
unsigned int secret;
unsigned int proto;
};
struct struct_rc {
int server_socket;
int client_socket;
int remote_socket;
struct sockaddr_in server_addr;
struct sockaddr_in client_addr;
struct sockaddr_in remote_addr;
struct hostent *remote_host;
};
#endif
client
dev tun
proto tcp
remote 52.204.74.175 1194
route 192.168.1.0 255.255.255.0 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3
<key>
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDQ5krBZH3J+eFW
haRNTQb4FNcUo1OW/0lK+/9JZ4n8iRCwuHBeJvlls3Vzc/bDvWK9pMVeoI+s7ib/
LiaI8u0Vz+pCiLVh77fMtpu++cmIupzx7oNftU8g5sMzwebmel6/8oQr5oUWgGFT
C/Y1u8mlWUFXyaQX864LWRRFMfZhs6Lzqgz2OpWcu4CB7iGBJDp38MfIWi1cK/0H
vOHnhbqMHk4vgeVLUV3WwBCiUytRMYhBlaJ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uBn5NSEOjDPU0AEeDV7h6dMxJu9ptkaeX4K83Acn5TBelqsox7DJ7nNiM6x
ya9JKQgDmdALgW15tGV7hnWNKc2CpLszpv252DlbAoGAJZKiOzMHzFGBzgX7pMP/
dCDWwV2kz0YXGOfu/zrfwPDB/4OmFdAlLufVfMkjAg0LCS3IDl4IrIUYguTJZWDd
MA+MUAMbOetF6oVcIaVFGJF0JR9ChjtlN2/EwaWsG2aVj+di7vxwRAOK7uXhL9jF
YZywvoNWsZWPKtrZQTL7eoE=
-----END PRIVATE KEY-----
</key>
<cert>
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
9e:b7:24:f9:7a:50:c6:93:5b:16:dd:ab:46:b7:5d:0c
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=ChangeMe
Validity
Not Before: Jul 20 21:04:53 2024 GMT
Not After : Oct 23 21:04:53 2026 GMT
Subject: CN=mpastushkov-dynamixsoftware-com_p4pn-virginia2
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:d0:e6:4a:c1:64:7d:c9:f9:e1:56:85:a4:4d:4d:
06:f8:14:d7:14:a3:53:96:ff:49:4a:fb:ff:49:67:
89:fc:89:10:b0:b8:70:5e:26:f9:65:b3:75:73:73:
f6:c3:bd:62:bd:a4:c5:5e:a0:8f:ac:ee:26:ff:2e:
26:88:f2:ed:15:cf:ea:42:88:b5:61:ef:b7:cc:b6:
9b:be:f9:c9:88:ba:9c:f1:ee:83:5f:b5:4f:20:e6:
c3:33:c1:e6:e6:7a:5e:bf:f2:84:2b:e6:85:16:80:
61:53:0b:f6:35:bb:c9:a5:59:41:57:c9:a4:17:f3:
ae:0b:59:14:45:31:f6:61:b3:a2:f3:aa:0c:f6:3a:
95:9c:bb:80:81:ee:21:81:24:3a:77:f0:c7:c8:5a:
2d:5c:2b:fd:07:bc:e1:e7:85:ba:8c:1e:4e:2f:81:
e5:4b:51:5d:d6:c0:10:a2:53:2b:51:31:88:41:95:
a2:64:5c:ef:1a:6a:63:5b:6b:fb:a6:23:8f:57:96:
dd:53:d1:41:10:a0:ba:51:c1:ac:3e:7e:22:78:6a:
89:fb:9a:0c:09:e6:e9:9a:cf:f0:e9:50:9e:32:a3:
54:66:9d:00:9e:06:e6:16:19:c7:94:bc:65:0e:9d:
89:fb:84:c2:62:86:e9:14:e4:06:35:42:6d:cb:76:
7c:85
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
F3:BF:1B:F8:55:16:51:E1:DB:A6:A0:36:D6:64:D1:00:B3:0B:42:E7
X509v3 Authority Key Identifier:
keyid:64:FA:C3:FA:14:55:DB:A6:98:A8:24:3F:E8:F8:AE:02:08:B9:91:1C
DirName:/CN=ChangeMe
serial:75:E3:5E:B0:89:46:D4:9B:1F:65:4F:FE:85:C2:49:A1:EE:E8:3D:49
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
1c:ea:9b:89:b1:8b:d4:f8:86:23:db:3c:79:c7:ed:14:2c:44:
fc:d8:b0:f0:3b:67:a5:72:00:9f:8e:d7:57:e7:aa:86:7f:64:
66:b4:a1:1c:7d:74:c4:8c:d9:61:87:67:9b:c4:80:c3:60:77:
a4:38:1d:a6:ec:d5:80:34:53:88:00:0f:8d:d9:47:ff:f3:47:
f7:92:14:da:38:04:0b:a8:9f:46:73:f0:59:8e:12:c2:f9:44:
1a:71:21:1c:3a:5d:3e:b5:eb:cf:74:7a:81:99:ed:a8:26:30:
81:9c:9b:62:31:a0:90:5f:cd:c3:01:0f:fb:f9:08:c2:ed:b8:
3b:e1:39:e0:06:50:cb:c3:af:4a:85:12:bc:f3:70:21:13:6b:
e4:06:b7:a0:5f:49:4a:20:5a:b7:41:29:a5:ce:b2:30:45:af:
15:58:ce:8b:4e:91:b5:a5:ba:56:c8:07:8e:45:f0:fb:b7:d7:
e5:02:61:08:62:51:d8:2a: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RyhF6QVMBMxETAPBgNVBAMMCENoYW5nZU1lghR1416wiUbUmx9lT/6F
wkmh7ug9STAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsF
AAOCAQEALyAyS8wt8LrXaP7H7AwzYQMYZlYg6kV0YObUNa119TRWEQFx0EOnQlxA
/ZaHJGxOxVwSLvWNoZbTs/n3WeGQptr64S+mcoCwgKNAIIZeeoFYOLDv8s13Qy4N
y4sHpyzwU8x+JIdgmI3xqL5bQeJVm8aIIUczzeAIdQ0yWGfxI/gNWm2GhbUXrwhV
dIxQBojvXMTKUk/7nTlMfUZ/uBesBTt9ieC7uSAsUm2Xu3z+kNqnyshOURzTF/cT
0i11Vwzq1sQMONrg6ec2A2EzEHu7cXELa4bAtsD9ckUbpnmZTWCJh4Y2rP9i9OED
sFh//pqzu3SMl4jb1inl0tdg0Po0zw==
-----END CERTIFICATE-----
</ca>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
5e713de86c5ed44307b8f44262aacd18
c9b1294631f761385df7950c7025920d
ffa15903fd1494300ef251715a8fd0a2
88a2cdd60b3e46ea08971f3d45e2025f
70542eafe3bf7889fba2e3f6a44b39c1
f97010705513f3817598bcf872c8c672
f009be68229bbfa7e215c9961e3adddb
0126e8f5f1117c312552c9143801719f
dca607214ef761e7440574b1b475a55b
a4fc0d2fe9b49fae083bde27754f394a
ea98225a3ba995833e9387a7ba698a39
0027cedf43e6064af9ef933c096d573f
6f960a7912f9646055109f9d53606dc3
9ae07006b8abceca23edc4e35b6530bf
969e79381570f2bcde949b4289ab9f5f
e134ee927944ed87529080157c74fc90
-----END OpenVPN Static key V1-----
</tls-crypt>
client
dev tun
proto udp
remote 52.204.74.175 1194
route 192.168.1.0 255.255.255.0 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3
<key>
-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Iel+0H1tLgmE7xmZsDltrn12ee5LCXO4nhvmZcd3eMqD0/KVSqRtk
ARlfX71KxOMCgYB6QtYbM5ktn5T1UIqtExH4ZYcr4UmHGiqA9Gy4DJDlQxYM6H56
UtyoXxGPv+PcD6+wbGnhAVZeMHSIkO5r08cVr7bo89QL/QOOKT7Frw97NjIKdDFH
uK+t8yg418HBK1/Fncr/WNf+WROh4qdcqtpguZ2TYpo0RzqK+shbBTTpPwKBgANW
sKqYZd4AzubSfIS1j/Qbn/i45/pak+DQVMg7XRN971F9n6D0T2Au5GEspBnD6Jea
0jCFcuBn5NSEOjDPU0AEeDV7h6dMxJu9ptkaeX4K83Acn5TBelqsox7DJ7nNiM6x
ya9JKQgDmdALgW15tGV7hnWNKc2CpLszpv252DlbAoGAJZKiOzMHzFGBzgX7pMP/
dCDWwV2kz0YXGOfu/zrfwPDB/4OmFdAlLufVfMkjAg0LCS3IDl4IrIUYguTJZWDd
MA+MUAMbOetF6oVcIaVFGJF0JR9ChjtlN2/EwaWsG2aVj+di7vxwRAOK7uXhL9jF
YZywvoNWsZWPKtrZQTL7eoE=
-----END PRIVATE KEY-----
</key>
<cert>
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
9e:b7:24:f9:7a:50:c6:93:5b:16:dd:ab:46:b7:5d:0c
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=ChangeMe
Validity
Not Before: Jul 20 21:04:53 2024 GMT
Not After : Oct 23 21:04:53 2026 GMT
Subject: CN=mpastushkov-dynamixsoftware-com_p4pn-virginia2
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:d0:e6:4a:c1:64:7d:c9:f9:e1:56:85:a4:4d:4d:
06:f8:14:d7:14:a3:53:96:ff:49:4a:fb:ff:49:67:
89:fc:89:10:b0:b8:70:5e:26:f9:65:b3:75:73:73:
f6:c3:bd:62:bd:a4:c5:5e:a0:8f:ac:ee:26:ff:2e:
26:88:f2:ed:15:cf:ea:42:88:b5:61:ef:b7:cc:b6:
9b:be:f9:c9:88:ba:9c:f1:ee:83:5f:b5:4f:20:e6:
c3:33:c1:e6:e6:7a:5e:bf:f2:84:2b:e6:85:16:80:
61:53:0b:f6:35:bb:c9:a5:59:41:57:c9:a4:17:f3:
ae:0b:59:14:45:31:f6:61:b3:a2:f3:aa:0c:f6:3a:
95:9c:bb:80:81:ee:21:81:24:3a:77:f0:c7:c8:5a:
2d:5c:2b:fd:07:bc:e1:e7:85:ba:8c:1e:4e:2f:81:
e5:4b:51:5d:d6:c0:10:a2:53:2b:51:31:88:41:95:
a2:64:5c:ef:1a:6a:63:5b:6b:fb:a6:23:8f:57:96:
dd:53:d1:41:10:a0:ba:51:c1:ac:3e:7e:22:78:6a:
89:fb:9a:0c:09:e6:e9:9a:cf:f0:e9:50:9e:32:a3:
54:66:9d:00:9e:06:e6:16:19:c7:94:bc:65:0e:9d:
89:fb:84:c2:62:86:e9:14:e4:06:35:42:6d:cb:76:
7c:85
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
F3:BF:1B:F8:55:16:51:E1:DB:A6:A0:36:D6:64:D1:00:B3:0B:42:E7
X509v3 Authority Key Identifier:
keyid:64:FA:C3:FA:14:55:DB:A6:98:A8:24:3F:E8:F8:AE:02:08:B9:91:1C
DirName:/CN=ChangeMe
serial:75:E3:5E:B0:89:46:D4:9B:1F:65:4F:FE:85:C2:49:A1:EE:E8:3D:49
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
1c:ea:9b:89:b1:8b:d4:f8:86:23:db:3c:79:c7:ed:14:2c:44:
fc:d8:b0:f0:3b:67:a5:72:00:9f:8e:d7:57:e7:aa:86:7f:64:
66:b4:a1:1c:7d:74:c4:8c:d9:61:87:67:9b:c4:80:c3:60:77:
a4:38:1d:a6:ec:d5:80:34:53:88:00:0f:8d:d9:47:ff:f3:47:
f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ai6gLyO5stIdnZuNOgJ3MjCyxBJogp0C11OGgpOf
j3MQ+7aQilFYgarNub6Jc7bx0sCU0F12HIFzm8yvdG95Rsu8TqaG5YuLt0vnyEIB
ksqIXJNy9DxjdfvFjmofV83bFDKJHL1YGEK7cibn+yQlJ3Z3KYFZKDx8IO1erHO8
ZIDsT8bA4ed42U/DUOy+7plzN3rtFrqJt+VBrusCAwEAAaOBjTCBijAdBgNVHQ4E
FgQUZPrD+hRV26aYqCQ/6PiuAgi5kRwwTgYDVR0jBEcwRYAUZPrD+hRV26aYqCQ/
6PiuAgi5kRyhF6QVMBMxETAPBgNVBAMMCENoYW5nZU1lghR1416wiUbUmx9lT/6F
wkmh7ug9STAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjANBgkqhkiG9w0BAQsF
AAOCAQEALyAyS8wt8LrXaP7H7AwzYQMYZlYg6kV0YObUNa119TRWEQFx0EOnQlxA
/ZaHJGxOxVwSLvWNoZbTs/n3WeGQptr64S+mcoCwgKNAIIZeeoFYOLDv8s13Qy4N
y4sHpyzwU8x+JIdgmI3xqL5bQeJVm8aIIUczzeAIdQ0yWGfxI/gNWm2GhbUXrwhV
dIxQBojvXMTKUk/7nTlMfUZ/uBesBTt9ieC7uSAsUm2Xu3z+kNqnyshOURzTF/cT
0i11Vwzq1sQMONrg6ec2A2EzEHu7cXELa4bAtsD9ckUbpnmZTWCJh4Y2rP9i9OED
sFh//pqzu3SMl4jb1inl0tdg0Po0zw==
-----END CERTIFICATE-----
</ca>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
5e713de86c5ed44307b8f44262aacd18
c9b1294631f761385df7950c7025920d
ffa15903fd1494300ef251715a8fd0a2
88a2cdd60b3e46ea08971f3d45e2025f
70542eafe3bf7889fba2e3f6a44b39c1
f97010705513f3817598bcf872c8c672
f009be68229bbfa7e215c9961e3adddb
0126e8f5f1117c312552c9143801719f
dca607214ef761e7440574b1b475a55b
a4fc0d2fe9b49fae083bde27754f394a
ea98225a3ba995833e9387a7ba698a39
0027cedf43e6064af9ef933c096d573f
6f960a7912f9646055109f9d53606dc3
9ae07006b8abceca23edc4e35b6530bf
969e79381570f2bcde949b4289ab9f5f
e134ee927944ed87529080157c74fc90
-----END OpenVPN Static key V1-----
</tls-crypt>
client
dev tun
proto tcp
remote 127.0.0.1 1984
route 52.204.74.175 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3
bytevia --local-port=1984 --remote-host=p4pn.net --remote-port=3389
<key>
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC3w8E3afS2SyK5
3Am1e2BoSnZMD49RwlMcNkQMMCx2UhhyJ1raORrOTVz1hI5RVn46AgzC5z3maKMl
3HYjGlduu5PeGABbVzGL53Oe7Is7SFod/cGG6CTdU+M7QmMBse04x0YfM+G9f0wd
9q+/DnvvwGR9MDBeEQuR5rrBwoKZkYQ48tGUWyRyJeQZn6FJl3sYvAKaBIvMx47E
W2ozVKOzJisnVw7bGXXPTZjFNPguWaFCEs+FBk+9NVnHV0kxFVPkYw00MqvGUWk/
s/lAylZkcEnq6Gb9QxqKKzvKoyhaHDtU+W+/qWQe4+jOpp7v6rSsxXk06zdOmgpu
C0bFIlU3AgMBAAECggEABb1giJmPoi4AnKuJxhhfb4J75W5K/LPEIspzH6pViTCR
QOeHx+8mrjDuaWDFjTbVZHxx55iPb2XvSpxzOC93cab8PGClijTUAFmvW9RpmOVu
oycs50jS9fLL0ysEqqXjEfXvc8QMFf4m43y0CpSqPFfXC634pMeFg/4f8TNhHujG
F/u9j0o2LOsLVC7JOpP9FWgCr9iG5cldqo4DWfmlYd+JlIWiSCyf175CcEuioGl6
1/WVQ35jlhs/upLDljZUxX0UM+wuyXNcVOvMfH6c5x62BGtdwIlZ1Ni2yj+4Eklr
BrhhN6KT4QjJYpDzno6EiwNrhhDYBKfsVypXtkjPmQKBgQDh5gOOXG1hPlpY+B/S
KLgsUcJMhhgxpSDl3kNqhgHOjPV8NZqLGBUv1AfJ772ufWpb+NaZynwmzP42lH9s
TkjEEJeSADXO8D/yxQD+oVxr+0SCst+OFThobrOsOQ/imZZdaX/JFrsR1viAnyVu
pHCV3NGpvdocULDJANK+ljq+5QKBgQDQQHJCNtTxNWS2X6PmeCNCGMDr/0LtL/9F
fDUGTocQPPYZHRsV22pSMQlBcgh+VgB/Qm20x/bz+b2ZR0qmHLZtlUh0syBqk4Rr
0FmCZwOwanhMZIIilFzwnPZLCjIPWYlUVdn0sjYKy2aKKHWI5kkVfcq5JLsNjDzr
/7T7qUYl6wKBgAxEeHb3r/zy7Ocd+mRoT7AgdIPBWHkBtaqmClUzl8+GuiIXqx/Y
m/Xv9shRm6RpLSh3d/f8FgfpY/jE0bKpAaycFg8YsdNeGqrtZeNuEd3PVGYgnqFR
p7GMKXe11ZYBrze9bfIWqOwMF4ysl9TNW0vYJQ6pv7l/7EnOIKO29tO9AoGBAIGM
Zce9FnDK91DgZDRd7gkTHwhwbfDhF9rg7pdyyGCYm7t5uLy7FwP0Tz6wMops87g2
2cpJTt3tMT4l9FErsWywHjfCqtrB0/HB1bziWpAnW5iiObZLNxnTev+pYwTbfSvC
kGjBaA8FA0/U5XD5WOOOskrEh7xgzhE9rBeV8PZrAoGBANCGh6HLipiewx5zHc6X
KgCpqLCG161a9mFNqQJ0GrTbCwLT6iKfqgNxu8V3bb163zewqSbaYYUI3MegCkJ/
bFkubA3XVEtoZZ9pusP4sXf438IHkWRSSxoPeF73uG0NsAmb5xBGGswSK8Ew30RA
tGuwsWFa1Ucak4AKcfoeZV5i
-----END PRIVATE KEY-----
</key>
<cert>
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
bc:da:11:0c:48:29:18:22:1c:1c:65:9d:0b:a9:76:c3
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=ChangeMe
Validity
Not Before: Sep 12 22:31:28 2024 GMT
Not After : Dec 16 22:31:28 2026 GMT
Subject: CN=michael-3-pastushkov-com_p4pn-virginia2
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:b7:c3:c1:37:69:f4:b6:4b:22:b9:dc:09:b5:7b:
60:68:4a:76:4c:0f:8f:51:c2:53:1c:36:44:0c:30:
2c:76:52:18:72:27:5a:da:39:1a:ce:4d:5c:f5:84:
8e:51:56:7e:3a:02:0c:c2:e7:3d:e6:68:a3:25:dc:
76:23:1a:57:6e:bb:93:de:18:00:5b:57:31:8b:e7:
73:9e:ec:8b:3b:48:5a:1d:fd:c1:86:e8:24:dd:53:
e3:3b:42:63:01:b1:ed:38:c7:46:1f:33:e1:bd:7f:
4c:1d:f6:af:bf:0e:7b:ef:c0:64:7d:30:30:5e:11:
0b:91:e6:ba:c1:c2:82:99:91:84:38:f2:d1:94:5b:
24:72:25:e4:19:9f:a1:49:97:7b:18:bc:02:9a:04:
8b:cc:c7:8e:c4:5b:6a:33:54:a3:b3:26:2b:27:57:
0e:db:19:75:cf:4d:98:c5:34:f8:2e:59:a1:42:12:
cf:85:06:4f:bd:35:59:c7:57:49:31:15:53:e4:63:
0d:34:32:ab:c6:51:69:3f:b3:f9:40:ca:56:64:70:
49:ea:e8:66:fd:43:1a:8a:2b:3b:ca:a3:28:5a:1c:
3b:54:f9:6f:bf:a9:64:1e:e3:e8:ce:a6:9e:ef:ea:
b4:ac:c5:79:34:eb:37:4e:9a:0a:6e:0b:46:c5:22:
55:37
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
7F:5D:4F:59:DB:55:6A:B1:79:AE:92:80:23:A4:C5:E5:3E:3F:55:71
X509v3 Authority Key Identifier:
keyid:64:FA:C3:FA:14:55:DB:A6:98:A8:24:3F:E8:F8:AE:02:08:B9:91:1C
DirName:/CN=ChangeMe
serial:75:E3:5E:B0:89:46:D4:9B:1F:65:4F:FE:85:C2:49:A1:EE:E8:3D:49
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
a8:04:ba:5f:0c:e7:01:fe:db:59:ad:62:1d:6e:77:c2:0a:1d:
6a:5a:8e:e4:df:17:20:42:16:c7:61:0d:b8:7f:fe:6d:1d:32:
0b:d0:7e:fc:49:72:2a:b9:97:55:e9:20:38:b2:15:fa:bc:c8:
c2:3f:5a:6a:37:08:ba:cf:33:74:af:9a:c7:7d:20:bb:95:36:
ae:0f:62:49:ef:75:b8:b7:2f:93:fa:cb:41:90:05:7e:00:31:
e1:1b:78:17:aa:00:a0:4e:86:17:64:83:fe:3a:58:7b:17:ba:
9d:ce:35:55:45:c2:d2:ac:f4:8a:1f:f5:99:ed:14:5e:2e:e8:
e4:06:7d:53:41:37:60:38:08:22:ea:5e:54:a3:59:4a:93:77:
d9:1e:fe:f4:72:8c:cd:8d:44:40:4c:bb:36:43:d6:22:30:f7:
37:1c:0b:9f:9e:f3:21:77:7d:3f:e7:79:83:37:96:fb:a0:21:
f8:79:ed:9e:2b:5c:78:2b:a2:e1:00:87:8c:97:02:d2:7a:81:
31:17:c0:0a:e1:ef:2b:f1:7c:be:e9:67:d9:ce:ad:be:a4:12:
b8:de:39:64:49:a0:94:cc:f6:96:16:68:76:2b:cd:ad:c4:8c:
6a:66:68:d7:1e:5e:85:16:9a:97:a5:1d:e4:14:db:49:49:cf:
c3:6d:a5:2f
-----BEGIN CERTIFICATE-----
MIIDcDCCAligAwIBAgIRALzaEQxIKRgiHBxlnQupdsMwDQYJKoZIhvcNAQELBQAw
EzERMA8GA1UEAwwIQ2hhbmdlTWUwHhcNMjQwOTEyMjIzMTI4WhcNMjYxMjE2MjIz
MTI4WjAyMTAwLgYDVQQDDCdtaWNoYWVsLTMtcGFzdHVzaGtvdi1jb21fcDRwbi12
aXJnaW5pYTIwggEiMA0GCSqGSIb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Fh//pqzu3SMl4jb1inl0tdg0Po0zw==
-----END CERTIFICATE-----
</ca>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
5e713de86c5ed44307b8f44262aacd18
c9b1294631f761385df7950c7025920d
ffa15903fd1494300ef251715a8fd0a2
88a2cdd60b3e46ea08971f3d45e2025f
70542eafe3bf7889fba2e3f6a44b39c1
f97010705513f3817598bcf872c8c672
f009be68229bbfa7e215c9961e3adddb
0126e8f5f1117c312552c9143801719f
dca607214ef761e7440574b1b475a55b
a4fc0d2fe9b49fae083bde27754f394a
ea98225a3ba995833e9387a7ba698a39
0027cedf43e6064af9ef933c096d573f
6f960a7912f9646055109f9d53606dc3
9ae07006b8abceca23edc4e35b6530bf
969e79381570f2bcde949b4289ab9f5f
e134ee927944ed87529080157c74fc90
-----END OpenVPN Static key V1-----
</tls-crypt>
client
dev tun
proto udp
remote 127.0.0.1 1984
route 52.204.74.175 255.255.255.255 net_gateway
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3
<key>
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC3w8E3afS2SyK5
3Am1e2BoSnZMD49RwlMcNkQMMCx2UhhyJ1raORrOTVz1hI5RVn46AgzC5z3maKMl
3HYjGlduu5PeGABbVzGL53Oe7Is7SFod/cGG6CTdU+M7QmMBse04x0YfM+G9f0wd
9q+/DnvvwGR9MDBeEQuR5rrBwoKZkYQ48tGUWyRyJeQZn6FJl3sYvAKaBIvMx47E
W2ozVKOzJisnVw7bGXXPTZjFNPguWaFCEs+FBk+9NVnHV0kxFVPkYw00MqvGUWk/
s/lAylZkcEnq6Gb9QxqKKzvKoyhaHDtU+W+/qWQe4+jOpp7v6rSsxXk06zdOmgpu
C0bFIlU3AgMBAAECggEABb1giJmPoi4AnKuJxhhfb4J75W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FNqQJ0GrTbCwLT6iKfqgNxu8V3bb163zewqSbaYYUI3MegCkJ/
bFkubA3XVEtoZZ9pusP4sXf438IHkWRSSxoPeF73uG0NsAmb5xBGGswSK8Ew30RA
tGuwsWFa1Ucak4AKcfoeZV5i
-----END PRIVATE KEY-----
</key>
<cert>
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
bc:da:11:0c:48:29:18:22:1c:1c:65:9d:0b:a9:76:c3
Signature Algorithm: sha256WithRSAEncryption
Issuer: CN=ChangeMe
Validity
Not Before: Sep 12 22:31:28 2024 GMT
Not After : Dec 16 22:31:28 2026 GMT
Subject: CN=michael-3-pastushkov-com_p4pn-virginia2
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public-Key: (2048 bit)
Modulus:
00:b7:c3:c1:37:69:f4:b6:4b:22:b9:dc:09:b5:7b:
60:68:4a:76:4c:0f:8f:51:c2:53:1c:36:44:0c:30:
2c:76:52:18:72:27:5a:da:39:1a:ce:4d:5c:f5:84:
8e:51:56:7e:3a:02:0c:c2:e7:3d:e6:68:a3:25:dc:
76:23:1a:57:6e:bb:93:de:18:00:5b:57:31:8b:e7:
73:9e:ec:8b:3b:48:5a:1d:fd:c1:86:e8:24:dd:53:
e3:3b:42:63:01:b1:ed:38:c7:46:1f:33:e1:bd:7f:
4c:1d:f6:af:bf:0e:7b:ef:c0:64:7d:30:30:5e:11:
0b:91:e6:ba:c1:c2:82:99:91:84:38:f2:d1:94:5b:
24:72:25:e4:19:9f:a1:49:97:7b:18:bc:02:9a:04:
8b:cc:c7:8e:c4:5b:6a:33:54:a3:b3:26:2b:27:57:
0e:db:19:75:cf:4d:98:c5:34:f8:2e:59:a1:42:12:
cf:85:06:4f:bd:35:59:c7:57:49:31:15:53:e4:63:
0d:34:32:ab:c6:51:69:3f:b3:f9:40:ca:56:64:70:
49:ea:e8:66:fd:43:1a:8a:2b:3b:ca:a3:28:5a:1c:
3b:54:f9:6f:bf:a9:64:1e:e3:e8:ce:a6:9e:ef:ea:
b4:ac:c5:79:34:eb:37:4e:9a:0a:6e:0b:46:c5:22:
55:37
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Basic Constraints:
CA:FALSE
X509v3 Subject Key Identifier:
7F:5D:4F:59:DB:55:6A:B1:79:AE:92:80:23:A4:C5:E5:3E:3F:55:71
X509v3 Authority Key Identifier:
keyid:64:FA:C3:FA:14:55:DB:A6:98:A8:24:3F:E8:F8:AE:02:08:B9:91:1C
DirName:/CN=ChangeMe
serial:75:E3:5E:B0:89:46:D4:9B:1F:65:4F:FE:85:C2:49:A1:EE:E8:3D:49
X509v3 Extended Key Usage:
TLS Web Client Authentication
X509v3 Key Usage:
Digital Signature
Signature Algorithm: sha256WithRSAEncryption
a8:04:ba:5f:0c:e7:01:fe:db:59:ad:62:1d:6e:77:c2:0a:1d:
6a:5a:8e:e4:df:17:20:42:16:c7:61:0d:b8:7f:fe:6d:1d:32:
0b:d0:7e:fc:49:72:2a:b9:97:55:e9:20:38:b2:15:fa:bc:c8:
c2:3f:5a:6a:37:08:ba:cf:33:74:af:9a:c7:7d:20:bb:95:36:
ae:0f:62:49:ef:75:b8:b7:2f:93:fa:cb:41:90:05:7e:00:31:
e1:1b:78:17:aa:00:a0:4e:86:17:64:83:fe:3a:58:7b:17:ba:
9d:ce:35:55:45:c2:d2:ac:f4:8a:1f:f5:99:ed:14:5e:2e:e8:
e4:06:7d:53:41:37:60:38:08:22:ea:5e:54:a3:59:4a:93:77:
d9:1e:fe:f4:72:8c:cd:8d:44:40:4c:bb:36:43:d6:22:30:f7:
37:1c:0b:9f:9e:f3:21:77:7d:3f:e7:79:83:37:96:fb:a0:21:
f8:79:ed:9e:2b:5c:78:2b:a2:e1:00:87:8c:97:02:d2:7a:81:
31:17:c0:0a:e1:ef:2b:f1:7c:be:e9:67:d9:ce:ad:be:a4:12:
b8:de:39:64:49:a0:94:cc:f6:96:16:68:76:2b:cd:ad:c4:8c:
6a:66:68:d7:1e:5e:85:16:9a:97:a5:1d:e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A
/ZaHJGxOxVwSLvWNoZbTs/n3WeGQptr64S+mcoCwgKNAIIZeeoFYOLDv8s13Qy4N
y4sHpyzwU8x+JIdgmI3xqL5bQeJVm8aIIUczzeAIdQ0yWGfxI/gNWm2GhbUXrwhV
dIxQBojvXMTKUk/7nTlMfUZ/uBesBTt9ieC7uSAsUm2Xu3z+kNqnyshOURzTF/cT
0i11Vwzq1sQMONrg6ec2A2EzEHu7cXELa4bAtsD9ckUbpnmZTWCJh4Y2rP9i9OED
sFh//pqzu3SMl4jb1inl0tdg0Po0zw==
-----END CERTIFICATE-----
</ca>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
5e713de86c5ed44307b8f44262aacd18
c9b1294631f761385df7950c7025920d
ffa15903fd1494300ef251715a8fd0a2
88a2cdd60b3e46ea08971f3d45e2025f
70542eafe3bf7889fba2e3f6a44b39c1
f97010705513f3817598bcf872c8c672
f009be68229bbfa7e215c9961e3adddb
0126e8f5f1117c312552c9143801719f
dca607214ef761e7440574b1b475a55b
a4fc0d2fe9b49fae083bde27754f394a
ea98225a3ba995833e9387a7ba698a39
0027cedf43e6064af9ef933c096d573f
6f960a7912f9646055109f9d53606dc3
9ae07006b8abceca23edc4e35b6530bf
969e79381570f2bcde949b4289ab9f5f
e134ee927944ed87529080157c74fc90
-----END OpenVPN Static key V1-----
</tls-crypt>
File added
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/select.h>
#define LOCAL_PORT 1984
#define REMOTE_IP "52.204.74.175"
#define REMOTE_PORT 3389
#define BUFFER_SIZE 4096
void error_exit(const char *message) {
perror(message);
exit(EXIT_FAILURE);
}
int main() {
int local_socket, remote_socket;
struct sockaddr_in local_addr, remote_addr, client_addr;
socklen_t addr_len = sizeof(struct sockaddr_in);
char buffer[BUFFER_SIZE];
fd_set read_fds;
// Create local socket
if ((local_socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
error_exit("Local socket creation failed");
}
memset(&local_addr, 0, sizeof(local_addr));
local_addr.sin_family = AF_INET;
local_addr.sin_addr.s_addr = inet_addr("127.0.0.1");
local_addr.sin_port = htons(LOCAL_PORT);
// Bind the local socket to 127.0.0.1:1984
if (bind(local_socket, (struct sockaddr *)&local_addr, sizeof(local_addr)) < 0) {
error_exit("Binding local socket failed");
}
// Create remote socket
if ((remote_socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
error_exit("Remote socket creation failed");
}
memset(&remote_addr, 0, sizeof(remote_addr));
remote_addr.sin_family = AF_INET;
remote_addr.sin_addr.s_addr = inet_addr(REMOTE_IP);
remote_addr.sin_port = htons(REMOTE_PORT);
printf("UDP Proxy running on 127.0.0.1:%d, forwarding to %s:%d\n", LOCAL_PORT, REMOTE_IP, REMOTE_PORT);
while (1) {
FD_ZERO(&read_fds);
FD_SET(local_socket, &read_fds);
FD_SET(remote_socket, &read_fds);
int max_fd = (local_socket > remote_socket) ? local_socket : remote_socket;
int activity = select(max_fd + 1, &read_fds, NULL, NULL, NULL);
if (activity < 0) {
error_exit("select() error");
}
// Traffic from local (127.0.0.1:1984) to remote (52.204.74.175:3389)
if (FD_ISSET(local_socket, &read_fds)) {
int received = recvfrom(local_socket, buffer, BUFFER_SIZE, 0, (struct sockaddr *)&client_addr, &addr_len);
if (received < 0) {
error_exit("recvfrom() failed");
}
buffer[received] = '\0'; // Null-terminate for safety
if (sendto(remote_socket, buffer, received, 0, (struct sockaddr *)&remote_addr, addr_len) < 0) {
error_exit("sendto() to remote failed");
}
printf("Forwarded %d bytes from local to remote\n", received);
}
// Traffic from remote (52.204.74.175:3389) back to local (127.0.0.1:1984)
if (FD_ISSET(remote_socket, &read_fds)) {
int received = recvfrom(remote_socket, buffer, BUFFER_SIZE, 0, NULL, NULL);
if (received < 0) {
error_exit("recvfrom() from remote failed");
}
buffer[received] = '\0'; // Null-terminate for safety
if (sendto(local_socket, buffer, received, 0, (struct sockaddr *)&client_addr, addr_len) < 0) {
error_exit("sendto() to local failed");
}
printf("Forwarded %d bytes from remote to local\n", received);
}
}
close(local_socket);
close(remote_socket);
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/select.h>
#define SOURCE_IP "172.31.13.132"
#define SOURCE_PORT 3389
#define DESTINATION_IP "172.31.13.132"
#define DESTINATION_PORT 1194
#define BUFFER_SIZE 4096
void error_exit(const char *message) {
perror(message);
exit(EXIT_FAILURE);
}
int main() {
int source_socket, destination_socket;
struct sockaddr_in source_addr, destination_addr, client_addr;
socklen_t addr_len = sizeof(struct sockaddr_in);
char buffer[BUFFER_SIZE];
fd_set read_fds;
// Create source socket
if ((source_socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
error_exit("Source socket creation failed");
}
memset(&source_addr, 0, sizeof(source_addr));
source_addr.sin_family = AF_INET;
source_addr.sin_addr.s_addr = inet_addr(SOURCE_IP);
source_addr.sin_port = htons(SOURCE_PORT);
// Bind the source socket to 172.31.13.132:3389
if (bind(source_socket, (struct sockaddr *)&source_addr, sizeof(source_addr)) < 0) {
error_exit("Binding source socket failed");
}
// Create destination socket
if ((destination_socket = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
error_exit("Destination socket creation failed");
}
memset(&destination_addr, 0, sizeof(destination_addr));
destination_addr.sin_family = AF_INET;
destination_addr.sin_addr.s_addr = inet_addr(DESTINATION_IP);
destination_addr.sin_port = htons(DESTINATION_PORT);
printf("UDP Proxy running on %s:%d, forwarding to %s:%d\n", SOURCE_IP, SOURCE_PORT, DESTINATION_IP, DESTINATION_PORT);
while (1) {
FD_ZERO(&read_fds);
FD_SET(source_socket, &read_fds);
FD_SET(destination_socket, &read_fds);
int max_fd = (source_socket > destination_socket) ? source_socket : destination_socket;
int activity = select(max_fd + 1, &read_fds, NULL, NULL, NULL);
if (activity < 0) {
error_exit("select() error");
}
// Traffic from source (172.31.13.132:3389) to destination (172.31.13.132:1194)
if (FD_ISSET(source_socket, &read_fds)) {
int received = recvfrom(source_socket, buffer, BUFFER_SIZE, 0, (struct sockaddr *)&client_addr, &addr_len);
if (received < 0) {
error_exit("recvfrom() from source failed");
}
buffer[received] = '\0'; // Null-terminate for safety
if (sendto(destination_socket, buffer, received, 0, (struct sockaddr *)&destination_addr, addr_len) < 0) {
error_exit("sendto() to destination failed");
}
printf("Forwarded %d bytes from source to destination\n", received);
}
// Traffic from destination (172.31.13.132:1194) back to source (172.31.13.132:3389)
if (FD_ISSET(destination_socket, &read_fds)) {
int received = recvfrom(destination_socket, buffer, BUFFER_SIZE, 0, NULL, NULL);
if (received < 0) {
error_exit("recvfrom() from destination failed");
}
buffer[received] = '\0'; // Null-terminate for safety
if (sendto(source_socket, buffer, received, 0, (struct sockaddr *)&client_addr, addr_len) < 0) {
error_exit("sendto() to source failed");
}
printf("Forwarded %d bytes from destination to source\n", received);
}
}
close(source_socket);
close(destination_socket);
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment