统一源码风格, 去除敏感信息

This commit is contained in:
aixiao 2024-02-22 10:36:59 +08:00
parent 1ea21b7bc6
commit ced52a63ce
8 changed files with 12 additions and 13 deletions

View File

@ -8,7 +8,7 @@
make clean; make
# test
root@NIUYULING:/mnt/c/Users/niuyuling/Desktop/libssh2-tunnel# ./forward-tunnel -h
aixiao@NIUYULING:/mnt/c/Users/niuyuling/Desktop/libssh2-tunnel$ ./forward-tunnel -h
STunnel SSH forward tunnel
Author: AIXIAO@AIXIAO.ME
Version: 1.0
@ -25,6 +25,7 @@
-? -h : help information
Mar 24 2023 17:46:41 Compile、link.
Jan 3 2024 09:18:55 Compile、link.
aixiao@NIUYULING:/mnt/c/Users/niuyuling/Desktop/libssh2-tunnel$
root@NIUYULING:/mnt/c/Users/niuyuling/Desktop/libssh2-tunnel#

Binary file not shown.

View File

@ -3,9 +3,9 @@
const char *keyfile1 = "/home/aixiao/.ssh/id_rsa.pub";
const char *keyfile2 = "/home/aixiao/.ssh/id_rsa";
char *server_ssh_ip = "47.108.253.59";
char *server_ssh_ip = "127.0.0.1";
int server_ssh_port = 22;
char *server_ssh_user = "root";
char *server_ssh_user = "aixiao";
char *server_ssh_passwd = "123456";
const char *local_listenip = "0.0.0.0";
@ -437,5 +437,6 @@ shutdown:
free(server_ssh_user);
if (server_ssh_passwd)
free(server_ssh_passwd);
return 0;
}

View File

@ -15,14 +15,11 @@
#include <sys/select.h>
#include <signal.h>
#include <pthread.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/poll.h>
#define MAX_EVENTS 1024
#define BUILD(fmt...) do { fprintf(stderr,"%s %s ",__DATE__,__TIME__); fprintf(stderr, ##fmt); } while(0)
#ifndef INADDR_NONE

Binary file not shown.

Binary file not shown.

View File

@ -26,12 +26,12 @@
#define INADDR_NONE (in_addr_t)-1
#endif
const char *keyfile1 = "/home/username/.ssh/id_rsa.pub";
const char *keyfile2 = "/home/username/.ssh/id_rsa";
const char *username = "root";
const char *keyfile1 = "/home/aixiao/.ssh/id_rsa.pub";
const char *keyfile2 = "/home/aixiao/.ssh/id_rsa";
const char *username = "aixiao";
const char *password = "12345";
const char *server_ip = "47.240.75.93";
const char *server_ip = "127.0.0.1";
const char *remote_listenhost = "0.0.0.0"; /* resolved by the remote server */
int remote_wantport = 33;

Binary file not shown.