In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you how to achieve intranet penetration and oss text file preview, the content is concise and easy to understand, absolutely can make your eyes bright, through the detailed introduction of this article, I hope you can get something.
I. Intranet penetration requirements
In the process of research and development, applications need to be debugged, but due to the limitations of the network environment, the machines behind the NAT can not be accessed directly by the public outside.
There are two proven solutions:
Ssh reverse proxy
Self-built ngrokd server
The first method is as follows:
Create a new reverse proxy tunnel on the private network CVM:
Ssh-p 22-qngfNTR 6766:localhost:22 public network machine user @ public network machine IP
Ssh-p 6766 intranet user @ localhost
Parameter explanation:
-M is the autossh parameter, and-CqTfnN-D is the ssh parameter
-M 5678: responsible for monitoring connection status through port 5678 and automatically reconnecting when there is a problem with the connection
-C: start data compression transfer
-Q: run in quiet mode, ignoring prompts and errors
-T: do not occupy shell
-f: running in the background
-n: used with-f parameter
-N: do not execute remote commands and are tailored for port forwarding
-D 192.168.0.2 7070: specify a local machine for "dynamic" application port forwarding. If no IP address is added, only 127.0.0.1 will be listened by default.
The second method process:
1. Install the ngrokd service
You can quickly build a ngrokd server based on docker
two。 Use your own compiled ngrok client
If you use the client of the official website, there will be a problem (the custom host is invalid)
Change the project needs to rely on: https://github.com/jteeuwen/go-bindata
It is easy to disconnect when downloading the go package in China, so you can use an agent to install it.
For example, through the socks5 of the American server and so on.
Just make it.
After that, survive the following files
Specific uses of ngrok are as follows:
. / ngrok-subdomain heidsoft-config=ngtoken.cfg-proto=http 8080
After that, the host can be accessed on the external network through the link after the launch of ngrok.
Ngrok supports protocols such as tcp http.
II. Preview of oss text files
The main thing is to set the header of the uploaded file, which can be set to text/html.
By default, OSS matches the type of file you upload, and it is automatically recognized as an image file based on the type of file you upload, such as jpg. The steps to set and change the MIME type in OSS are as follows:
Log in to the OSS Management console.
Locate the target file you want to set and click the corresponding setting HTTP header link.
In the set HTTP header dialog box, set the value of the Content-Type parameter.
The above content is how to achieve intranet penetration and oss text file preview, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.