<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>TCP &#8211; Simon</title>
	<atom:link href="https://www.luisimon.com/tag/tcp/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.luisimon.com</link>
	<description>blog</description>
	<lastBuildDate>Sun, 08 Sep 2024 05:08:21 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>

<image>
	<url>https://www.luisimon.com/wp-content/uploads/2019/09/cbrks-x5t4i-001.ico</url>
	<title>TCP &#8211; Simon</title>
	<link>https://www.luisimon.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>WinSCP和SecureCRT开启心跳，保持连接</title>
		<link>https://www.luisimon.com/2024/09/08/912/</link>
		
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Sun, 08 Sep 2024 05:08:19 +0000</pubDate>
				<category><![CDATA[Linux日记]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Putty]]></category>
		<category><![CDATA[SecureCRT]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[WinSCP]]></category>
		<category><![CDATA[心跳]]></category>
		<category><![CDATA[断线]]></category>
		<category><![CDATA[断连]]></category>
		<category><![CDATA[服务器]]></category>
		<category><![CDATA[运维]]></category>
		<guid isPermaLink="false">https://www.luisimon.com/?p=912</guid>

					<description><![CDATA[WinSCP和SecureCRT是服务器运维人员常用的两个软件工具，用于连接登录Linux服务器。但是，在连接 ... <a title="WinSCP和SecureCRT开启心跳，保持连接" class="read-more" href="https://www.luisimon.com/2024/09/08/912/" aria-label="继续阅读WinSCP和SecureCRT开启心跳，保持连接">阅读更多</a>]]></description>
										<content:encoded><![CDATA[
<p>WinSCP和SecureCRT是服务器运维人员常用的两个软件工具，用于连接登录Linux服务器。但是，在连接公网的服务器时，如果比较长时间不操作，电信运营商会丢弃长时间没有没有数据传输的TCP连接，这样会导致我们需要频繁重新登录服务器。</p>



<p></p>



<p class="has-medium-font-size"><strong>WinSCP设置心跳</strong></p>



<p>在登录窗口选择你要设置心跳的服务器，点击【编辑】</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="640" height="430" src="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123847.png" alt="" class="wp-image-913" srcset="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123847.png 640w, https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123847-300x202.png 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p>然后点击【高级】</p>



<figure class="wp-block-image size-full"><img decoding="async" width="640" height="430" src="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123902.png" alt="" class="wp-image-914" srcset="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123902.png 640w, https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123902-300x202.png 300w" sizes="(max-width: 640px) 100vw, 640px" /></figure>



<p>选择【连接】设置，如下图开启【Keeplives】</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="567" height="461" src="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123908.png" alt="" class="wp-image-915" style="width:647px;height:auto" srcset="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123908.png 567w, https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908123908-300x244.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></figure>



<p></p>



<p class="has-medium-font-size"><strong>SecureCRT设置心跳</strong></p>



<p>选择要设置心跳的服务器，右键菜单点击【Properties】(属性)</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="376" height="354" src="https://www.luisimon.com/wp-content/uploads/2024/09/Screenshot-2024-09-08-125053.png" alt="" class="wp-image-916" style="width:644px;height:auto" srcset="https://www.luisimon.com/wp-content/uploads/2024/09/Screenshot-2024-09-08-125053.png 376w, https://www.luisimon.com/wp-content/uploads/2024/09/Screenshot-2024-09-08-125053-300x282.png 300w" sizes="auto, (max-width: 376px) 100vw, 376px" /></figure>



<p>选择【Terminal】(终端)设置，开启【Send Protocol NO-OP】，时间间隔一般设置30秒</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="543" height="512" src="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908125711.png" alt="" class="wp-image-917" style="width:659px;height:auto" srcset="https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908125711.png 543w, https://www.luisimon.com/wp-content/uploads/2024/09/微信图片_20240908125711-300x283.png 300w" sizes="auto, (max-width: 543px) 100vw, 543px" /></figure>



<p></p>



<p>这样设置后就可以很大程度避免断线的问题啦</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Nginx流量转发配置（教程）</title>
		<link>https://www.luisimon.com/2022/03/18/597/</link>
		
		<dc:creator><![CDATA[Simon]]></dc:creator>
		<pubDate>Fri, 18 Mar 2022 14:33:32 +0000</pubDate>
				<category><![CDATA[Linux日记]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[TCP]]></category>
		<category><![CDATA[web]]></category>
		<guid isPermaLink="false">https://www.luisimon.xyz/?p=597</guid>

					<description><![CDATA[yum install nginx -y 如果提示“No package nginx available.”则 ... <a title="Nginx流量转发配置（教程）" class="read-more" href="https://www.luisimon.com/2022/03/18/597/" aria-label="继续阅读Nginx流量转发配置（教程）">阅读更多</a>]]></description>
										<content:encoded><![CDATA[
<p><strong>yum install nginx -y</strong></p>



<p>如果提示“No package nginx available.”则执行以下安装，在重新执行上一句安装nginx</p>



<p><strong>yum install epel-release -y</strong></p>



<p>安装stream模块</p>



<p><strong>yum install nginx-mod-stream -y</strong></p>



<p>使用以下命令禁用（SELinux for NGINX）,否会出现监听端口失败</p>



<p><strong>semanage permissive -a httpd_t</strong></p>



<p>配置文件</p>



<p><strong>与http节点同级添加stream节点</strong>，如下</p>



<p><em>以下是格式例子</em></p>



<pre class="wp-block-code"><code>stream{
	upstream group_1151 {
		 hash $remote_addr consistent;
		 server www.yourserver.com:1151  max_fails=3 fail_timeout=10s;
	 }
	server {
	  listen 1151;
	  listen 1151 udp;
	  proxy_connect_timeout 20s;
	  proxy_timeout 5m;
	  proxy_pass group_1151;
	}
}</code></pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
