在客户端终端运行命令
ssh-keygen -t rsa
rsa 是一种密码算法,证书登录常用 rsa。
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <errno.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> | |
| #include <arpa/inet.h> | |
| #include <unistd.h> | |
| #include <sys/socket.h> | |
| #include <ev.h> |
假设你远程公网主机的 IP 是 123.45.67.89, 首先登录进你的主机
ssh [email protected] -p 22 -i '/your/ssh/key/file.key'
用 vim 编辑 ssh 服务器的配置文件
sudo vi /etc/ssh/sshd_config
| import http.server, ssl | |
| server_ip = "0.0.0.0" | |
| server_port = 4443 | |
| server_key = '/fakesite_cert/domain.key' | |
| server_cert = '/fakesite_cert/chained.pem' | |
| httpd = http.server.HTTPServer( | |
| (server_ip, server_port), | |
| http.server.SimpleHTTPRequestHandler) |
| import tweepy | |
| consumer_key = u"" | |
| consumer_secret = u"" | |
| access_token = u"" | |
| access_token_secret = u"" | |
| auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
| auth.set_access_token(access_token, access_token_secret) |
| cmake_minimum_required(VERSION 3.4.1) | |
| project(afunix) | |
| add_executable( afsocket server.c client.c main.c ) | |
| target_link_libraries( afsocket pthread ) |
| git clone --recurse-submodules https://github.com/ShadowsocksR-Live/shadowsocksr-native.git ssr-n | |
| mkdir .\ssr-n\build | |
| cd .\ssr-n\build | |
| cmake .. | |
| cmake --build . --config Release |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <sys/types.h> | |
| #if defined(_MSC_VER) | |
| #include <WinSock2.h> | |
| #include <ws2tcpip.h> | |
| #include <wepoll.h> |
install
sudo apt-get install -y build-essential gobjc gobjc++ gnustep gnustep-devel libgnustep-base-devsample.m
#import <Foundation/Foundation.h>
@interface C| use std::net::SocketAddr; | |
| // tokio = { version = "1.12.0", features = ["full" ] } | |
| use tokio::{ | |
| io::{AsyncBufReadExt, AsyncWriteExt, BufReader}, | |
| net::TcpListener, | |
| sync::broadcast, | |
| }; | |
| #[tokio::main] |