socks_proxy icon indicating copy to clipboard operation
socks_proxy copied to clipboard

[showcase] a build once run anywhere binary

Open mochaaP opened this issue 3 years ago • 0 comments

demo

prebuilt binary: main.com.gz supported: Linux, NetBSD, FreeBSD, OpenBSD, Mac OS X, Windows

2,19d1
< #include <sys/types.h>
< #include <stdio.h>
< #include <stdarg.h>
< #include <time.h>
< #include <errno.h>
< #include <unistd.h>
< #include <signal.h>
< #include <stdlib.h>
< #include <stdint.h>
< #include <string.h>
< #include <sys/socket.h>
< #include <sys/fcntl.h>
< #include <sys/stat.h>
< #include <netdb.h>
< #include <sys/select.h>
< #include <arpa/inet.h>
< #include <netinet/tcp.h>
< #include <pthread.h>
110c92,93
< 				buf += nread;
---
> 				char* buf_c = (char*)buf;
> 				buf_c += nread;
130c113,114
< 				buf += nwrite;
---
> 				char* buf_c = (char*)buf;
> 				buf_c += nwrite;

mochaaP avatar Nov 26 '22 14:11 mochaaP