<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hossein Naghdbishi</title><link>https://hossein.naghdbishi.com/</link><description>Recent content on Hossein Naghdbishi</description><generator>Hugo</generator><language>en-us</language><managingEditor>hossein@naghdbishi.com (Hossein Naghdbishi)</managingEditor><webMaster>hossein@naghdbishi.com (Hossein Naghdbishi)</webMaster><lastBuildDate>Wed, 02 Sep 2026 12:33:08 +0330</lastBuildDate><atom:link href="https://hossein.naghdbishi.com/index.xml" rel="self" type="application/rss+xml"/><item><title>My Take on Procrastination</title><link>https://hossein.naghdbishi.com/posts/en/goal-orientation-and-procrastination/</link><pubDate>Wed, 02 Sep 2026 12:33:08 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/goal-orientation-and-procrastination/</guid><description>&#10;&lt;p&gt;&#10;I have always read in every book and article that procrastination is caused by failing to regulate our emotions. That seems right, but most books stop at that point and do not give further information. Today I read about &lt;a href="https://edpsych.pressbooks.sunycreate.cloud/chapter/goal-orientation-theory/"&gt;Goal Orientation Theory&lt;/a&gt;, and I think by connecting procrastination to this framework, we may gain a better understanding of ourselves and procrastination.&lt;/p&gt;&#10;&lt;img src="https://hossein.naghdbishi.com/images/goal-orientation.svg" alt="2x2 Achievement Goal Framework matrix showing doubts in each region of Mastery vs Performance and Approach vs Avoidance" title="/images/goal-orientation.svg" style="height:100%;width:100%;"/&gt;&#10;&lt;p&gt;&#10;The image explains goal orientation theory and is taken from &lt;a href="https://www.youtube.com/watch?v=BZt8htsrf2k"&gt;this YouTube video&lt;/a&gt;. Your definition of competence is on the X axis: you either measure competence intrinsically, by an absolute measure related to the task itself (Mastery), or extrinsically using comparison with others (Performance). The Y axis indicates your motivation, whether you pursue a goal in order to avoid a negative outcome (Avoidance), or because you wish to attain a desirable outcome (Approach).&lt;/p&gt;&#10;&lt;p&gt;&#10;Now, I wish to boil down the human mind to the simplest model possible: a human brain tries to avoid pain and attain pleasure. If we&amp;#39;re steering away from what&amp;#39;s clearly beneficial for us then there should be some pain involved. A pain that&amp;#39;s lurking in a corner that we can&amp;#39;t see, but it&amp;#39;s preventing us from doing what&amp;#39;s in our best interest anyway. Looking at this through the lens of goal orientation, the emotional pain caused by tasks that we face could take three shapes. The joy, one.&lt;/p&gt;&#10;&lt;div id="outline-container-headline-1" class="outline-3"&gt;&#10;&lt;h3 id="headline-1"&gt;&#10;Mastery-Avoidance (fantasized perfection): I fear not being good enough&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-1" class="outline-text-3"&gt;&#10;&lt;p&gt;Authors of &amp;#34;&lt;a href="https://hossein.naghdbishi.com/posts/en/the-courage-to-be-disliked-summary"&gt;The Courage to Be Disliked&lt;/a&gt;&amp;#34; explain this a lot better than I. We do not go after change and happiness because we&amp;#39;re scared. The real reason we don&amp;#39;t do something that is so clearly important for our life&amp;#39;s mission is this — more often than not:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;I have a young friend who dreams of becoming a novelist, but he never seems to be able to complete his work. According to him, his job keeps him too busy, and he can never find enough time to write novels, and that’s why he can’t complete work and enter it for writing awards. But is that the real reason? No! It’s actually that he wants to leave the possibility of “I can do it if I try” open, by not committing to anything. He doesn’t want to expose his work to criticism, and he certainly doesn’t want to face the reality that he might produce an inferior piece of writing and face rejection. He wants to live inside that realm of possibilities, where he can say that he could do it if he only had the time, or that he could write if he just had the proper environment, and that he really does have the talent for it.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;All of us possess a self-image, someone who we think we are. I personally feel like a great writer, someone else might think they&amp;#39;re really good at math. This self-image has nothing to do with reality, I have not much to back up my claim. Being destined to become a great writer is just a story I tell myself. However, we usually cling to an unrealistic self-image desperately and way more than we should. I cannot come up with the name of a single society where people are celebrated for being ordinary, making mistakes, or being bad at something but giving it a shot anyway. So it hurts a lot when we realize that we&amp;#39;re not exceptionally talented or special. We like to think of ourselves as special, at least at some things, and an existential crisis might happen at the moment we realize that we&amp;#39;re mediocre and just like everyone else.&lt;/p&gt;&#10;&lt;p&gt;&#10; Once we commit to an action, we shatter all the fantasies of our self-image and are faced with something concrete, and most of the time, the fact is that we suck; while what we fantasized was supposed to be easy for us to do but not for others, was supposed to bring us fame, cheerings of others, and high acclaim. So we tarry.&lt;/p&gt;&#10;&lt;p&gt;&#10; But as Ira Glass puts it, there is no way we can achieve that ideal stage in our work, unless we endure the &amp;#34;slog&amp;#34;, keep creating, keep putting ourselves out there, and keep growing:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Nobody tells this to people who are beginners, I wish someone told me. All of us who do creative work, we get into it because we have good taste. But there is this gap. For the first couple years you make stuff, it’s just not that good. It’s trying to be good, it has potential, but it’s not. But your taste, the thing that got you into the game, is still killer. And your taste is why your work disappoints you. A lot of people never get past this phase, they quit. Most people I know who do interesting, creative work went through years of this. We know our work doesn’t have this special thing that we want it to have. We all go through this. And if you are just starting out or you are still in this phase, you gotta know its normal and the most important thing you can do is do a lot of work. Put yourself on a deadline so that every week you will finish one story. It is only by going through a volume of work that you will close that gap, and your work will be as good as your ambitions. And I took longer to figure out how to do this than anyone I’ve ever met. It’s gonna take awhile. It’s normal to take awhile. You’ve just gotta fight your way through.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;&#10; If you spot any of these thoughts during your inner dialogues, you&amp;#39;re facing Mastery-Avoidance:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;What if I fail to uphold the previous (successful) image I created for myself (in my mind and/or in other people&amp;#39;s minds)?&lt;/li&gt;&#10;&lt;li&gt;What if I am not good enough?&lt;/li&gt;&#10;&lt;li&gt;What if I make mistakes?&lt;/li&gt;&#10;&lt;li&gt;What if I can&amp;#39;t make it?&lt;/li&gt;&#10;&lt;li&gt;What if what I do is not perfect?&lt;/li&gt;&#10;&lt;li&gt;What if I&amp;#39;m not smart/privileged/… enough to complete this task?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-2" class="outline-3"&gt;&#10;&lt;h3 id="headline-2"&gt;&#10;Performance-Avoidance (avoiding humiliation): I fear how I compare to others. I care too much about what other people think.&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-2" class="outline-text-3"&gt;&#10;&lt;p&gt;&#10;This is a big one. Each time we see someone in our field with the same age and background, who has achieved something significant, it is very easy to ask &amp;#34;Why not me?&amp;#34;. While a moderate amount of this is healthy as long as it is spent on retrospection and learning, and not berating oneself, it could take a dark turn and make us lose self-esteem and self-confidence.&lt;/p&gt;&#10;&lt;p&gt;&#10;I love the motto &amp;#34;&lt;a href="https://hossein.naghdbishi.com/posts/en/the-courage-to-be-disliked-summary/#headline-4"&gt;Life is not a competition&amp;#34;&lt;/a&gt;. We have to remind ourselves that while we should try our best, no two people are the same, and we are worthy in and of ourselves regardless of our achievements. Comparing achievements is a losing game anyway, there is always someone richer, prettier, …er than us. The world is a big place! Always remember: you&amp;#39;re unique and bring to the world and your community invaluable benefits that even you may not recognize. No need to spoil what great things you offer to the world and fail to notice, with another person&amp;#39;s highlights of life.&lt;/p&gt;&#10;&lt;p&gt;&#10;Each attempt at growth is going out on a limb, and we perform all this in front of a society. It takes courage to go out on a limb. It takes high self-esteem to make yourself vulnerable, to make mistakes in front of an audience, and to learn from them.&lt;/p&gt;&#10;&lt;p&gt;&#10;If you spot any of these thoughts during your inner dialogues, you&amp;#39;re facing Performance-Avoidance:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;What if I try and make a fool out of myself in front of others?&lt;/li&gt;&#10;&lt;li&gt;What if other people berate me for how little I have achieved?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;When these questions are asked, we conclude that it&amp;#39;s better to stall and stay invisible so that we don&amp;#39;t give others a reason to judge or expose us, proving that our self-image has been a fraud all along. Due to attaching our worth to the judgment of others, we naturally self-handicap. This is something we&amp;#39;ll arrive at shortly, but in its simplest form, if we wait until the last minute, poor quality looks like a lack of time rather than a lack of ability. We and others could be given a reason to be gentler in our harsh judgments.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-3" class="outline-3"&gt;&#10;&lt;h3 id="headline-3"&gt;&#10;Performance-Approach (winner&amp;#39;s ego):&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-3" class="outline-text-3"&gt;&#10;&lt;p&gt;&#10;This is a double-edged sword as it can help some people procrastinate less, and it is a necessary part of life in moderation. But it could also cause anxiety by asking these questions:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;What if I try my best but still am not the best?&lt;/li&gt;&#10;&lt;li&gt;What if I&amp;#39;m not smart/privileged/… enough to be better than others in this task?&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Asking these questions, we have to worry about whether we&amp;#39;re valuable at all, when compared with others.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-4" class="outline-3"&gt;&#10;&lt;h3 id="headline-4"&gt;&#10;Self-worth and Self-handicap&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-4" class="outline-text-3"&gt;&#10;&lt;p&gt;In all of the scenarios discussed above, the pain is created by doing something and the ensuing judgment. With these mindsets whatever we do, we never truly win. There is always some better &amp;#39;true potential&amp;#39;, better &amp;#39;person&amp;#39; to compare ourselves to. If our self-worth is constantly questioned and pain is created by doing something, we could just as easily resort to not doing anything; or when we absolutely have to, we could take a second approach: &lt;a href="https://psychologyfanatic.com/self-handicapping/"&gt;self-handicapping&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;&#10;Self-handicapping occurs when a person creates an intentional obstacle for themselves in the path of achieving their goals. Why would we do this? Because it makes the hounds of judgments unleashed on us by ourselves or other people gentler. We can forgive ourselves more easily if the goal is &amp;#34;hard&amp;#34; to achieve; it doesn&amp;#39;t matter if this hardship comes from our doing or the external world.&lt;/p&gt;&#10;&lt;p&gt;&#10;The more we attach our self-worth to the extraneous, the lower our self-esteem. With low self-esteem, we&amp;#39;re more susceptible to feeling bad after failing to achieve. We fear failure and being unworthy. We sense shame about who we are, and ultimately we self-handicap more — trying hard to maintain a good self-image by pitying ourselves with if-onlys.&lt;/p&gt;&#10;&lt;p&gt;&#10;Following this rationale, it is very natural and smart to self-handicap. We procrastinate and put what matters off till the last minute where a perfect achievement is impossible, or keep telling other people that we expect to fail for this and that reason.&#10;In both scenarios, by setting ourselves up for failure, we protect our self-image, and even better, if we produce something good, we bolster our self-image because this achievement happened despite the self-handicap. The root cause of self-handicapping is nothing but caring about some image. We want to make the world have a better image of us. And what better way to create it than by self-handicapping? But it&amp;#39;s a downward spiral.&lt;/p&gt;&#10;&lt;p&gt;&#10;When our self-esteem is attached to some external outcomes, we won&amp;#39;t give anything our 100% so that our illusion of potential remains intact. If we never begin a task, or begin but do not commit to it, then we never truly failed our own standards, and preserve our self-image as a result. This makes us not learn from our failures because we believe we never failed, just didn&amp;#39;t commit to it enough. And sadly preserving one&amp;#39;s self-image comes at the cost of an unlived life.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-5" class="outline-3"&gt;&#10;&lt;h3 id="headline-5"&gt;&#10;Mastery-Approach (letting go of the ego): I believe my self-worth is independent of the outcome. Every failure to achieve is a chance to learn and grow.&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-5" class="outline-text-3"&gt;&#10;&lt;p&gt;Following the logic of a simple reward-pain brain, we introduced different forms of pain so far. But how about joy? The joy could be framed as Mastery-Approach.&lt;/p&gt;&#10;&lt;p&gt;&#10;Mastery-Approach goes hand in hand with a growth mindset: I am a valuable, capable human being regardless of my material gains or achievements. When I take risks, and when I start doing something, I will grow as a person. I enjoy the process of learning. Making mistakes is natural and a sign that I&amp;#39;m stretching the boundaries of myself and growing. I don&amp;#39;t need to do this better than anyone; I just need to try to grow and be better than my previous self.&lt;/p&gt;&#10;&lt;p&gt;&#10;So the antidote is Mastery-Approach: to play for the love of the game itself, for improving ourselves compared with our previous selves, to live according to our values not to achieve some arbitrary standards, to take risks and do things (even badly) because it helps us grow, to have a long-term vision, to value growth over material gain or other people&amp;#39;s opinion of us. To quote Sting:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;He deals the cards as a meditation&lt;/p&gt;&#10;&lt;p&gt;&#10;And those he plays never suspect&lt;/p&gt;&#10;&lt;p&gt;&#10;He doesn&amp;#39;t play for the money he wins&lt;/p&gt;&#10;&lt;p&gt;&#10;He doesn&amp;#39;t play for respect&lt;/p&gt;&#10;&lt;p&gt;&#10;He deals the cards to find the answer&lt;/p&gt;&#10;&lt;p&gt;&#10;The sacred geometry of chance&lt;/p&gt;&#10;&lt;p&gt;&#10;The hidden laws of a probable outcome&lt;/p&gt;&#10;&lt;p&gt;&#10;The numbers lead a dance&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-6" class="outline-3"&gt;&#10;&lt;h3 id="headline-6"&gt;&#10;Definition of Success and Attitude Toward Failing to Achieve&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-6" class="outline-text-3"&gt;&#10;&lt;p&gt;&#10;I have this idea that perhaps procrastination, and more broadly the quality of our life, how much we get to actually live instead of going wherever the wind takes us, is closely related to our attitude toward making mistakes. Everyone makes mistakes. But if you set perfectionist standards and judge yourself too harshly when you think about past actions, it naturally makes you tend to hesitate and withdraw. It makes you hide more and live in your head. After all, sins of omission are easier to rationalize, less obvious as errors, and no one can directly point to an action you have never committed.&lt;/p&gt;&#10;&lt;p&gt;&#10;How do you perceive failure to achieve? To some people, failure of achievement is a form of success. &lt;a href="https://www.youtube.com/watch?v=OZEPbyIA8XI"&gt;Here&lt;/a&gt;&amp;#39;s the Spanx founder explaining the correct attitude toward making mistakes:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Growing up, my father used to ask my brother and me what we had failed at at the dinner table, which was so interesting. And he&amp;#39;d celebrate it, and he&amp;#39;d actually be disappointed if I didn&amp;#39;t have something that I failed at that week.&lt;/p&gt;&#10;&lt;p&gt;&#10;So I can remember saying, &amp;#34;Dad, Dad, I tried out for this, and I was horrible.&amp;#34; And he would actually high-five me and say, &amp;#34;Congratulations, way to go!&amp;#34; And what it did was just reframe my definition of failure.&lt;/p&gt;&#10;&lt;p&gt;&#10;&lt;strong&gt;Failure for me became not trying versus the outcome.&lt;/strong&gt; So so many people don&amp;#39;t take risks for fear of failure. They don&amp;#39;t start the business, they don&amp;#39;t go create the art they want to create, or they don&amp;#39;t go try out to be in the play, or whatever it is, for the fear of failure. And once you redefine that for yourself and realize that failure is just not trying, then life opens up to you in many ways.&lt;/p&gt;&#10;&lt;p&gt;&#10;And I would also—my dad would encourage me anytime something didn&amp;#39;t go the way I expected it to, or maybe I got embarrassed by a situation, &lt;strong&gt;to write down where the hidden gifts were and what I got out of it. And I started realizing, in everything, there was some amazing nugget that I wouldn&amp;#39;t have wanted to pass up.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;&#10;Like I said, most people equate success with trying and achieving what they wanted. But success is to make the best choice available to you at the moment, taking risks, having tried, and learned from the outcome, whatever it may be.&lt;/p&gt;&#10;&lt;p&gt;&#10;Failure to achieve does not need to also be failure to grow and learn. Each failure to achieve is a success and a step in the right direction so long as we learn. The real failure is failure to commit. In this view, we reframe pain and put the guilt in failing to act, not in acting and failing to achieve. This sounds simple to say but could be life-altering.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-7" class="outline-3"&gt;&#10;&lt;h3 id="headline-7"&gt;&#10;Msic Notes&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-7" class="outline-text-3"&gt;&#10;&lt;p&gt;[2026-09-11]: Updated to add self-handicapping and integrate attitude toward mistakes.&lt;/p&gt;&#10;&lt;div id="outline-container-headline-8" class="outline-4"&gt;&#10;&lt;h4 id="headline-8"&gt;&#10;Practical Advice&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-8" class="outline-text-4"&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Be aware of your emotions and thoughts. Each time you procrastinate identify which of the three you&amp;#39;re facing.&lt;/li&gt;&#10;&lt;li&gt;Make tasks so easy and so well defined they&amp;#39;re not intimidating.&lt;/li&gt;&#10;&lt;li&gt;Lower your standards and allow yourself to deliver imperfect rather than perfect. (volume of photography over quality story)&lt;/li&gt;&#10;&lt;li&gt;Lower your standards and allow yourself (in fact force yourself) to publish things despite knowing that they could be better if you just changed a few more things… (simonw)&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-9" class="outline-4"&gt;&#10;&lt;h4 id="headline-9"&gt;&#10;TODO&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-9" class="outline-text-4"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Write a blog post about how changing happens by telling ourselves a new story about ourselves: &amp;#39;We can choose and be whoever we want living moment by moment. Some would say that pretending. Kurt Vonnegut said : “We are what we pretend to be, so we must be very careful about what we pretend to be” to change tell yourself a different story.&amp;#39; and the connection between self-image and &amp;#34;living in bad faith&amp;#34; of Sartre.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-10" class="outline-4"&gt;&#10;&lt;h4 id="headline-10"&gt;&#10;Sources&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-10" class="outline-text-4"&gt;&#10;&lt;p&gt;The contents of this post was somewhat complemented by content from &lt;a href="https://swapnilchauhan.com/blog/procrastination-and-the-fear-of-not-being-good-enough/"&gt;this blog post&lt;/a&gt; and &lt;a href="https://gwern.net/on-really-trying"&gt;this one.&lt;/a&gt;&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>How To Tunnel All Your VPS Traffic Through WireGuard without Losing SSH</title><link>https://hossein.naghdbishi.com/posts/en/tunnel-all-vps-traffic-through-wireguard/</link><pubDate>Mon, 10 Aug 2026 15:17:52 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/tunnel-all-vps-traffic-through-wireguard/</guid><description>&#10;&lt;div id="outline-container-headline-1" class="outline-3"&gt;&#10;&lt;h3 id="headline-1"&gt;&#10;Intro&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-1" class="outline-text-3"&gt;&#10;&lt;p&gt;When we enable a WireGuard tunnel at system-level, i.e. not using implementations such as wireguard-go, each outgoing packet of our system could use either our VPS&amp;#39;s physical interface or the WireGuard&amp;#39;s. The packets going through the first, would carry our own IP as their source IP, the latter the VPN&amp;#39;s IP address.&lt;/p&gt;&#10;&lt;p&gt;&#10;Clearly, we want to maximize anonymity by making every outgoing packet show a different IP than ours. But if every outgoing packet were set to use the VPN&amp;#39;s IP, then we wouldn&amp;#39;t be able to accept any incoming connections to our server. A client that starts a connection with our VPS, expects a response from the same address it requested the connection from.&lt;/p&gt;&#10;&lt;p&gt;&#10;So, for our VPS to be able to respond to incoming connections and act as a server, it needs to reply to incoming connections aimed at its physical interface as itself. By default, turning on a WireGuard connection that has &lt;code class="verbatim"&gt;AllowedIPs = 0.0.0.0/0, ::/0&lt;/code&gt;, changes the routes in Linux in such a way that &lt;em&gt;all&lt;/em&gt; packets go out using WireGuard, this is what we&amp;#39;ve asked of it after all. Unfortunately, it also means our server is incapable of accepting any incoming connections on its own IP.&lt;/p&gt;&#10;&lt;p&gt;&#10;If you have ever tried tunneling all your VPS traffic through WireGuard, you may have learned what I just said the hard way. Because as soon as you enable a WireGuard VPN, you will lose all ingress connections to your VPS, including SSH. You also won&amp;#39;t have the ability to use your VPS, unless you have out-of-band VNC access or force a reboot. So what&amp;#39;s the solution?&lt;/p&gt;&#10;&lt;p&gt;&#10;There are multiple solutions, including &lt;a href="https://hossein.naghdbishi.com/quicknotes/vps-traffic-tunnel/"&gt;one that I had written about earlier&lt;/a&gt;, but in this post, we will solve this issue using a stateful marking approach. We will:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&lt;em&gt;Mark the connections initiated from the physical interface:&lt;/em&gt; Use nftables to mark all the incoming connections aimed at our physical interface.&lt;/li&gt;&#10;&lt;li&gt;&lt;em&gt;Mark the connection&amp;#39;s packets:&lt;/em&gt; Use nftables to mark the individual packets of the previously marked &lt;em&gt;connections&lt;/em&gt;, prior to an outgoing routing decision.&lt;/li&gt;&#10;&lt;li&gt;&lt;em&gt;Route the packets:&lt;/em&gt; Execute iproute2 commands to use Linux&amp;#39;s policy-based routing, sending the packets from incoming connections to where they were initiated using our real IP.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-2" class="outline-3"&gt;&#10;&lt;h3 id="headline-2"&gt;&#10;Step One: Marking Incoming Connections as Soon as They Hit Our Physical Interface&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-2" class="outline-text-3"&gt;&#10;&lt;p&gt;This happens in the &lt;del&gt;input&lt;/del&gt; &lt;code class="verbatim"&gt;prerouting&lt;/code&gt; chain of our ruleset, we use the &lt;code class="verbatim"&gt;prerouting&lt;/code&gt; chain and not the input chain because we need to mark these connections as they hit our physical interface. If we had used the &lt;code class="verbatim"&gt;input&lt;/code&gt; chain, we would not have the ability to keep track of incoming connections to containers. The &lt;code class="verbatim"&gt;input&lt;/code&gt; chain is triggered only before a packet is delivered to an app inside our host, and container networks have their own dedicated bridges, so their packets traverse the &lt;code class="verbatim"&gt;forward&lt;/code&gt; chain, not the &lt;code class="verbatim"&gt;input&lt;/code&gt; chain:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;chain prerouting {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; type filter hook prerouting priority mangle; policy accept;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # mark **connections** incoming on our host to keep track of them&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;enp0s6&amp;#34; ct mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-3" class="outline-3"&gt;&#10;&lt;h3 id="headline-3"&gt;&#10;Step Two: Mark the Connection&amp;#39;s Packets Before the Outgoing Routing Decision Takes Place&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-3" class="outline-text-3"&gt;&#10;&lt;p&gt;As I mentioned, when enabling WireGuard, every packet goes out of the Wireguard interface. We must manually manage our egress traffic, and steer our outgoing packets to the right interface. To do this, we mark the individual packets of a connection before the outgoing routing decision takes place. The ones we mark will go out of our VPS&amp;#39;s gateway, instead of the VPN&amp;#39;s.&lt;/p&gt;&#10;&lt;p&gt;&#10;We already marked the connections in the previous step, so we know which connections should bypass WireGuard. The &lt;code class="verbatim"&gt;ct mark&lt;/code&gt; marks connections, and at this step we need to mark the &lt;em&gt;packets&lt;/em&gt; of these connections before they go out.&lt;/p&gt;&#10;&lt;p&gt;&#10;Interestingly, this marking should happen at two different chains. The fact that I learned in this journey is that the meaning of &lt;code class="verbatim"&gt;input&lt;/code&gt; and &lt;code class="verbatim"&gt;output&lt;/code&gt; are not what you would expect. &lt;code class="verbatim"&gt;input&lt;/code&gt; is specifically the packets that go into a &lt;strong&gt;process&lt;/strong&gt;, not the input of our physical IP address, and &lt;code class="verbatim"&gt;output&lt;/code&gt; are the packets that come out of a &lt;strong&gt;process&lt;/strong&gt; not the outgoing packets of the server. A container is not a process, so while we use &lt;code class="verbatim"&gt;output&lt;/code&gt; for our local processes, a different chain is needed for handling container traffic. Try to guess which one before reading on.&lt;/p&gt;&#10;&lt;div id="outline-container-headline-4" class="outline-4"&gt;&#10;&lt;h4 id="headline-4"&gt;&#10;Packets that go out of our physical interface&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-4" class="outline-text-4"&gt;&#10;&lt;p&gt;Once the incoming traffic is consumed by the processes, they produce some packets in response. We know which of the requests should be responded using our real IP address, because we have already marked their connections.&lt;/p&gt;&#10;&lt;p&gt;&#10;We write our rules in the &lt;code class="verbatim"&gt;output&lt;/code&gt; chain, but to force a re-routing decision, the type of the chain should be &lt;code class="verbatim"&gt;route&lt;/code&gt; and not &lt;code class="verbatim"&gt;filter&lt;/code&gt;.&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; chain output {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; type route hook output priority mangle; policy accept;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # Restore meta mark for locally generated host traffic&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-5" class="outline-4"&gt;&#10;&lt;h4 id="headline-5"&gt;&#10;Packets that come out of containers&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-5" class="outline-text-4"&gt;&#10;&lt;p&gt;For packets that go out of docker containers, which chain do you think we will use? &lt;code class="verbatim"&gt;prerouting&lt;/code&gt;, &lt;code class="verbatim"&gt;input&lt;/code&gt;, &lt;code class="verbatim"&gt;forward&lt;/code&gt;, or &lt;code class="verbatim"&gt;output&lt;/code&gt;?&lt;/p&gt;&#10;&lt;p&gt;&#10;While it may seem counterintuitive, we catch these packets at the &lt;code class="verbatim"&gt;prerouting&lt;/code&gt; chain! Docker and other container technologies use Linux bridges. Both our host system and the containers have their own dedicated IPs on their shared bridge. As our host acts as the containers&amp;#39; gateway to the Internet, each outgoing packet from a container is an incoming packet for our host on that bridge.&lt;/p&gt;&#10;&lt;p&gt;&#10;The nftables on our host sees outgoing packets from these containers as &lt;em&gt;incoming&lt;/em&gt; packets on its bridge. So just like how our &lt;code class="verbatim"&gt;enp0s6&lt;/code&gt; (or &lt;code class="verbatim"&gt;eth0&lt;/code&gt;) is an interface, so is our &lt;code class="verbatim"&gt;docker&lt;/code&gt; bridge, and other bridges. The exact chain that we used previously to mark connections, will be used to catch packets going out of the containers (coming in our host):&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;chain prerouting {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; type filter hook prerouting priority mangle; policy accept;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # mark **connections** incoming on our host to keep track of them&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;enp0s6&amp;#34; ct mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # mark **packets** going out of containers, before the routing decision&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;docker*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;br-*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;tun0&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;incus*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;veth*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-6" class="outline-4"&gt;&#10;&lt;h4 id="headline-6"&gt;&#10;Final result&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-6" class="outline-text-4"&gt;&#10;&lt;p&gt;This nftables table is what we have at the end:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;table inet keep_conn {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; chain prerouting {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; type filter hook prerouting priority mangle; policy accept;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # mark **connections** incoming on our host to keep track of them&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; iifname &amp;#34;enp0s6&amp;#34; ct mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # mark **packets** going out of containers, before the routing decision&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;iifname &amp;#34;docker*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;iifname &amp;#34;br-*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;iifname &amp;#34;tun0&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;iifname &amp;#34;incus*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#9;iifname &amp;#34;veth*&amp;#34; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; chain output {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; type route hook output priority mangle; policy accept;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # Restore meta mark for locally generated host traffic&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ct mark 0x34 meta mark set 0x34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-7" class="outline-3"&gt;&#10;&lt;h3 id="headline-7"&gt;&#10;Step Three: Policy-based Routing&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-7" class="outline-text-3"&gt;&#10;&lt;p&gt;Now that each incoming connection, and outgoing packet is marked excellently, all we have to do is steer them toward the VPS&amp;#39;s gateway instead of the VPN&amp;#39;s.&lt;/p&gt;&#10;&lt;p&gt;&#10;First, we create a table named &lt;code class="verbatim"&gt;keep_connections&lt;/code&gt; that routes all the traffic through our VPS&amp;#39;s gateway, then we will send all the marked packets towards it.&lt;/p&gt;&#10;&lt;p&gt;&#10;The first script, at &lt;code class="verbatim"&gt;/usr/local/bin/wg-post-up.sh&lt;/code&gt;, creates the routing table and forces the marked packets to use it.&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#!/bin/bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;set -xeu&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RTTABLE=&amp;#34;52 keep_connections&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;grep -qxF &amp;#34;$RTTABLE&amp;#34; /etc/iproute2/rt_tables || echo &amp;#34;$RTTABLE&amp;#34; &amp;gt;&amp;gt; /etc/iproute2/rt_tables&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GW4=$(ip route show default dev enp0s6 | awk &amp;#39;{print $3}&amp;#39;)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;if [ -z &amp;#34;$GW4&amp;#34; ]; then&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &amp;#34;wg-post-up: no default gateway found on enp0s6, aborting&amp;#34; &amp;gt;&amp;amp;2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; exit 1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fi&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip route replace default via &amp;#34;$GW4&amp;#34; dev enp0s6 table keep_connections&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# Priority 40: must beat wg-quick&amp;#39;s own rule so marked&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# traffic bypasses the tunnel instead of racing it.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip rule add fwmark 52 table keep_connections priority 40 2&amp;gt;/dev/null || true&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# You can whitelist any destination IP you like to see your original IP whether the traffic is generated from processes in your host or containers, here 9.9.9.9 is white-listed as an example:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip route replace table 51820 9.9.9.9 via 10.0.0.1 dev enp0s6 || true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;The second script, at &lt;code class="verbatim"&gt;/usr/local/bin/wg-pre-down.sh&lt;/code&gt; removes the white-listed IP rule from WireGuard&amp;#39;s table:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#!/bin/bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip route del table 51820 9.9.9.9 || true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;The last script, at &lt;code class="verbatim"&gt;/usr/local/bin/wg-post-down.sh&lt;/code&gt;, removes the rule and table we have created, making our system treat the marked packets as normal ones.&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#!/bin/bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;set -xeu&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip rule del fwmark 52 table keep_connections 2&amp;gt;/dev/null || true&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip route flush table keep_connections 2&amp;gt;/dev/null || true&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;Using these scripts and making them executable by running &lt;code class="verbatim"&gt;chmod +x =/usr/local/bin/wg*&lt;/code&gt;, we change our WireGuard config to run them:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Interface]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;#...&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Table = 51820&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PostUp = /usr/local/bin/wg-post-up.sh&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PreDown = /usr/local/bin/wg-pre-down.sh&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PostDown = /usr/local/bin/wg-post-down.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;and at last, we&amp;#39;re ready to start the WireGuard on our server safely by running &lt;code class="verbatim"&gt;sudo systemctl start wg-quick@wg0&lt;/code&gt;&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-8" class="outline-3"&gt;&#10;&lt;h3 id="headline-8"&gt;&#10;AI-generated stuff&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-8" class="outline-text-3"&gt;&#10;&lt;p&gt;I didn&amp;#39;t use AI to write this blog post, but here are some niceties to have from AI:&lt;/p&gt;&#10;&lt;div id="outline-container-headline-9" class="outline-4"&gt;&#10;&lt;h4 id="headline-9"&gt;&#10;Flowchart of Our Packets&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-9" class="outline-text-4"&gt;&#10;&lt;img src="https://hossein.naghdbishi.com/images/wg-routing.svg" alt="This figure shows how a packet is handled in our setup." title="/images/wg-routing.svg" style="height:100%;width:100%;color:red;"/&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-10" class="outline-4"&gt;&#10;&lt;h4 id="headline-10"&gt;&#10;AI-generated nftables Primer&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-10" class="outline-text-4"&gt;&#10;&lt;p&gt;nftables organizes rules into &lt;strong&gt;tables&lt;/strong&gt;, which hold &lt;strong&gt;chains&lt;/strong&gt;, which hold &lt;strong&gt;rules&lt;/strong&gt;. A chain only runs if it&amp;#39;s attached to a &lt;strong&gt;hook&lt;/strong&gt; — a point in the kernel&amp;#39;s packet-processing path. The five hooks, in the order a packet can pass through them:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;prerouting&lt;/code&gt; — before any routing decision, sees every packet arriving on any interface (including bridges for containers)&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;input&lt;/code&gt; — packets destined for a local process on this host&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;forward&lt;/code&gt; — packets being routed through this host to somewhere else (this is what containers behind a bridge normally use)&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;output&lt;/code&gt; — packets generated by a local process on this host&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;postrouting&lt;/code&gt; — right before a packet leaves an interface&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Each chain also has a &lt;strong&gt;priority&lt;/strong&gt; (we used &lt;code class="verbatim"&gt;mangle&lt;/code&gt;, which runs early — before NAT and filtering) and a &lt;strong&gt;type&lt;/strong&gt;: &lt;code class="verbatim"&gt;filter&lt;/code&gt; for normal accept/drop decisions, &lt;code class="verbatim"&gt;route&lt;/code&gt; for chains that need to trigger a fresh routing lookup after you touch the packet, only &lt;code class="verbatim"&gt;output&lt;/code&gt; chain can have type &lt;code class="verbatim"&gt;route&lt;/code&gt;.&lt;/p&gt;&#10;&lt;p&gt;&#10;Two mark types matter here, and mixing them up is the most common source of bugs:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;ct mark&lt;/code&gt; — attached to the &lt;strong&gt;connection&lt;/strong&gt; (persists for its lifetime, shared by every packet in that flow)&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;meta mark&lt;/code&gt; (often just called the packet mark, or fwmark) — attached to an individual &lt;strong&gt;packet&lt;/strong&gt;, and it&amp;#39;s the only one &lt;code class="verbatim"&gt;ip rule&lt;/code&gt; can actually match on&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The pattern in this post is exactly that split: mark the &lt;strong&gt;connection&lt;/strong&gt; once when it arrives (&lt;code class="verbatim"&gt;ct mark&lt;/code&gt;), then on every subsequent packet copy that connection mark onto the &lt;strong&gt;packet&lt;/strong&gt; mark (&lt;code class="verbatim"&gt;meta mark&lt;/code&gt;) right before a routing decision happens, so &lt;code class="verbatim"&gt;ip rule fwmark ...&lt;/code&gt; can catch it.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>How to tunnel all your traffic through a socks5 proxy in Linux?</title><link>https://hossein.naghdbishi.com/quicknotes/how-to-tunnel-everything-through-socks5-using-wireguard/</link><pubDate>Mon, 25 May 2026 15:14:38 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/how-to-tunnel-everything-through-socks5-using-wireguard/</guid><description>&lt;p&gt;&#10;Ever wanted to traffic all your traffic through a socks5 proxy and couldn&amp;#39;t? Well you&amp;#39;re in luck!&#10;Here&amp;#39;s the script that creates two files:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;An xray json file you can run using &lt;code class="verbatim"&gt;xray -c config.json&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;A WireGuard config that connects to the locally-served wireguard server set up by the command above, which you can fire up by `wg-quick client up`&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/usr/bin/env bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Check if wg utility is installed&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; ! command -v wg &amp;amp;&amp;gt; /dev/null; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Error: &amp;#39;wg&amp;#39; command not found. Please install wireguard-tools.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; exit &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# 1. Configuration &amp;amp; Key Generation&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;LISTEN_PORT&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;51820&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SERVER_IP&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;127.0.0.1&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOCKS_OUT_ADDR&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;127.0.0.1&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SOCKS_OUT_PORT&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;30808&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FWMARK&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;51820&lt;/span&gt; &lt;span style="color:#75715e"&gt;# Used to break the routing loop&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ASSETS_DIR&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;HOME&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;/.config/my_proxies&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Generate Server Keys&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SERVER_PRIV&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;wg genkey&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SERVER_PUB&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$SERVER_PRIV&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; | wg pubkey&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Generate Client Keys&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CLIENT_PRIV&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;wg genkey&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;CLIENT_PUB&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$CLIENT_PRIV&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; | wg pubkey&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# 2. Generate Xray config.json (The Server Side)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat &lt;span style="color:#e6db74"&gt;&amp;lt;&amp;lt;EOF &amp;gt; config.json&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;{&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;log&amp;#34;: { &amp;#34;loglevel&amp;#34;: &amp;#34;warning&amp;#34; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;inbounds&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;port&amp;#34;: $LISTEN_PORT,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;protocol&amp;#34;: &amp;#34;wireguard&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;settings&amp;#34;: {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;secretKey&amp;#34;: &amp;#34;$SERVER_PRIV&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;peers&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;publicKey&amp;#34;: &amp;#34;$CLIENT_PUB&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;allowedIPs&amp;#34;: [&amp;#34;10.0.0.2/32&amp;#34;]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ],&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;kernelMode&amp;#34;: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;tag&amp;#34;: &amp;#34;wg-in&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ],&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;outbounds&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;protocol&amp;#34;: &amp;#34;socks&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;settings&amp;#34;: {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;servers&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;address&amp;#34;: &amp;#34;$SOCKS_OUT_ADDR&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;port&amp;#34;: $SOCKS_OUT_PORT&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;tag&amp;#34;: &amp;#34;socks-out&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;protocol&amp;#34;: &amp;#34;freedom&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;settings&amp;#34;: {},&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;streamSettings&amp;#34;: {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;sockopt&amp;#34;: {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;mark&amp;#34;: $FWMARK&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;tag&amp;#34;: &amp;#34;direct&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ],&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;routing&amp;#34;: {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;domainStrategy&amp;#34;: &amp;#34;IPIfNonMatch&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;rules&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;type&amp;#34;: &amp;#34;field&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;inboundTag&amp;#34;: [&amp;#34;wg-in&amp;#34;],&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;outboundTag&amp;#34;: &amp;#34;direct&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;domain&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;ext:geosite.dat:ir&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;type&amp;#34;: &amp;#34;field&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;inboundTag&amp;#34;: [&amp;#34;wg-in&amp;#34;],&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;outboundTag&amp;#34;: &amp;#34;direct&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;ip&amp;#34;: [&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;ext:geoip.dat:ir&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; },&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;type&amp;#34;: &amp;#34;field&amp;#34;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;inboundTag&amp;#34;: [&amp;#34;wg-in&amp;#34;],&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; &amp;#34;outboundTag&amp;#34;: &amp;#34;socks-out&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; ]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;EOF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# 3. Generate client.conf (For the WireGuard App)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat &lt;span style="color:#e6db74"&gt;&amp;lt;&amp;lt;EOF &amp;gt; client.conf&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;[Interface]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;PrivateKey = $CLIENT_PRIV&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;Address = 10.0.0.2/24&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;DNS = 9.9.9.9&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;FwMark = $FWMARK&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;[Peer]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;PublicKey = $SERVER_PUB&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;Endpoint = $SERVER_IP:$LISTEN_PORT&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;AllowedIPs = 0.0.0.0/0&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;EOF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;---------------------------------------------------&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Success! Configuration files have been generated:&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;1. config.json -&amp;gt; Move this to your Xray config folder.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;2. client.conf -&amp;gt; Import this into your WireGuard client.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;---------------------------------------------------&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;⚠️ CRITICAL: ASSET PATH CORRECTION&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Xray does NOT support setting geoip paths inside config.json.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;You MUST start Xray with this environment variable so it finds your DAT files:&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34; export XRAY_LOCATION_ASSET=\&amp;#34;&lt;/span&gt;$ASSETS_DIR&lt;span style="color:#e6db74"&gt;\&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34; xray run -c config.json&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;---------------------------------------------------&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;⚠️ REMINDER: PREVENT ROUTING LOOPS FOR SOCKS&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Because your WireGuard endpoint is pointed to localhost (&lt;/span&gt;$SERVER_IP&lt;span style="color:#e6db74"&gt;),&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;you MUST manually add a route for your actual proxy server&amp;#39;s physical IP&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;through your original local default gateway.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Run this command on your host machine before starting the tunnel:&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34; sudo ip r add &amp;lt;PROXY_SERVER_PUBLIC_IP&amp;gt; via &amp;lt;YOUR_DEFAULT_GATEWAY_IP&amp;gt; dev &amp;lt;YOUR_NETWORK_INTERFACE&amp;gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;---------------------------------------------------&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;If you use NixOS&amp;#39;s firewall you may need to enter this:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo sysctl -w net.ipv4.conf.all.rp_filter&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo nft chain inet nixos-fw rpfilter &lt;span style="color:#f92672"&gt;{&lt;/span&gt; policy accept &lt;span style="color:#ae81ff"&gt;\;&lt;/span&gt; &lt;span style="color:#f92672"&gt;}&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# and when you&amp;#39;re done:&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo nft chain inet nixos-fw rpfilter &lt;span style="color:#f92672"&gt;{&lt;/span&gt; policy drop &lt;span style="color:#ae81ff"&gt;\;&lt;/span&gt; &lt;span style="color:#f92672"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;And like the script says never forget to bypass your connection to your proxy:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo ip r add &amp;lt;PROXY_SERVER_PUBLIC_IP&amp;gt; via &amp;lt;YOUR_DEFAULT_GATEWAY_IP&amp;gt; dev &amp;lt;YOUR_NETWORK_INTERFACE&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>The Courage to Be Disliked Summary</title><link>https://hossein.naghdbishi.com/posts/en/the-courage-to-be-disliked-summary/</link><pubDate>Mon, 11 May 2026 23:19:04 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/the-courage-to-be-disliked-summary/</guid><description>&#10;&lt;p&gt;&#10;The Courage to Be Disliked is a book written in a dialogue form between a young man and a philosopher. The book uses this Socratic form to teach us about Adlerian psychology.&lt;/p&gt;&#10;&lt;div id="outline-container-headline-1" class="outline-2"&gt;&#10;&lt;h2 id="headline-1"&gt;&#10;We are All Subjective Beings&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;&#10;&lt;p&gt;The book posists that we can never escape from our subjectivity, and that we ourselves choose how to interpret what we see and what meaning to attribute to it. For example a person who is short can see it as an advantage or a disadvantage, it&amp;#39;s totally up to them. A diamond, too, could be seen as nothing but a small stone. Objective facts cannot be altered, but we can change our subjective interpretation as much as we like. Therefore, our attitude, how we see the world, is of utmost importance. Our present is not determined by our experiences in the past, but by the meaning we have attributed to them: “No matter what has occurred in your life up to this point, it should have no bearing at all on how you live from now on.”&lt;/p&gt;&#10;&lt;p&gt;&#10;The most important thing is not in what circumstances we were born, but on how we utilize the hands we&amp;#39;re dealt. “It’s not what one is born with but what use one makes of that equipment”. Instead of focusing on the past and what could have been, we must focus on what we can do with our current equipment:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Freudian etiology is a psychology of possession, and eventually it arrives at determinism. Adlerian psychology, on the other hand, is a psychology of use, and it is you who decides it.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-2" class="outline-2"&gt;&#10;&lt;h2 id="headline-2"&gt;&#10;Etiology vs Teleology&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;&#10;&lt;p&gt;We can approach psychology either through etiology or teleology (then there is logotherapy which focuses on the future). In Freudian psychology we tell ourselves stories of the past to study why we behave in a certain way. Etiology is studying the past to understand the causes of a behavior. In Adlerian psychology, however, it is suggested that we decide our behavior right now, and any decision on our part is because we have chosen to benefit from it.&#10;For example, the reason a NEET doesn&amp;#39;t leave the house is not because of a past trauma or fear, but rather because they enjoy the comfort and attention they are paid by their parents, even if they&amp;#39;re miserable in all other respects. The book stresses that there is no such thing as trauma and every one of our behaviors is used for a purpose. Studying what we hope to achieve by our current behavior is teleology, in other words: &lt;strong&gt;&amp;#34;People are not driven by past causes, but move toward goals that they themselves set&amp;#34;&lt;/strong&gt;. Instead of asking &amp;#39;Why am I like this?&amp;#39; (Etiology), Adler asks &amp;#39;What is my goal in acting this way?&amp;#39; (Teleology). This shifts the power back to the individual.&#10;Another example is being unhappy. If we&amp;#39;re unhappy, it&amp;#39;s because we actively choose being unhappy, and that we&amp;#39;ve judged it to be good for us. If there&amp;#39;s something we want to change in ourselves, again, we&amp;#39;re always able to do so, and the only reason we don&amp;#39;t is because we are making the decision not to. By holding this view, we don&amp;#39;t wait for others to change or the situation to change, we take the first step ourselves. The past and how we got here don&amp;#39;t matter, and how we do from here on is our responsibilty.&#10;Here&amp;#39;s another example from the book, about the son of a father who hit him in his childhood:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;As long as I use etiology to think, It is because he hit me that I have a bad relationship with my father, it would be a matter that was impossible for me to do anything about. But if I can think, I brought out the memory of being hit because I don’t want my relationship with my father to get better, then I will be holding the card to repair relations. Because if I can just change the goal, that fixes everything.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;&#10;&amp;#34;Lifestyle&amp;#34;, one&amp;#39;s worldview and outlook on life, is something the person chooses for themselves. If we don&amp;#39;t change it, it&amp;#39;s mostly because we&amp;#39;ve grow accustomed to it, and we fear that by going to uncharted territories we may get hurt. &lt;strong&gt;Anxiety is generated by changing, and disappointment by not changing, and most people usually choose the latter.&lt;/strong&gt; In other words, most people are lacking in the courage to change and be happy.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-3" class="outline-2"&gt;&#10;&lt;h2 id="headline-3"&gt;&#10;Apparent Cause and Effect&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-3" class="outline-text-2"&gt;&#10;&lt;p&gt;The book offecs a poignant observation on &amp;#34;apparent cause and effect&amp;#34;—the way we contruct logical-sounding excuses to justify our stagnation. For example the book tells the story of a girl who created a fear of blushing to avoid proposing to a boy she liked and risking rejection. Many of us are guilty of the same crime. We come up with excuses every day, and force ourselves to see a as door closed, in order to escape the pain of trying and risking.&lt;/p&gt;&#10;&lt;p&gt;&#10;A parabole for an unwritten and procrastinating life itself:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;I have a young friend who dreams of becoming a novelist, but he never seems to be able to complete his work. According to him, his job keeps him too busy, and he can never find enough time to write novels, and that’s why he can’t complete work and enter it for writing awards. But is that the real reason? No! It’s actually that he wants to leave the possibility of “I can do it if I try” open, by not committing to anything. He doesn’t want to expose his work to criticism, and he certainly doesn’t want to face the reality that he might produce an inferior piece of writing and face rejection. He wants to live inside that realm of possibilities, where he can say that he could do it if he only had the time, or that he could write if he just had the proper environment, and that he really does have the talent for it. In another five or ten years, he will probably start using other excuses like “I’m not young anymore” or “I’ve got a family to think about now.”&#10;YOUTH: I can relate all too well to how he must feel.&#10;PHILOSOPHER: He should just enter his writing for an award, and if he gets rejected, so be it. If he did, he might grow, or discover that he should pursue something different. Either way, he would be able to move on. That is what changing your current lifestyle is about. He won’t get anywhere by not submitting anything.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-4" class="outline-2"&gt;&#10;&lt;h2 id="headline-4"&gt;&#10;Life Is Not a Competition&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-4" class="outline-text-2"&gt;&#10;&lt;p&gt;Human beings are equal but not the same; this means that a math genius is no more valuable than a child who can&amp;#39;t do simple arithmetic, or even a bedridden person with no activity. If we have a view that leads us to believe there is a competition going on, it will make us say words like &amp;#34;I lost to that person&amp;#34; or &amp;#34;I beat that person&amp;#34;. In turn, we will see other people as enemies. We can&amp;#39;t celebrate their happiness because their victory is our defeat, and this deprives us of a sense of community.&lt;/p&gt;&#10;&lt;p&gt;&#10;But every person has a sense that they need to grow even more, and a small amount of feeling lacking in a good quality is healthy for growth. Since we&amp;#39;re equals, this healthy sense comes not from comparing ourselves with other people, but with comparing us with our ideal selves. &lt;strong&gt;Life is not a competition&lt;/strong&gt; and we should move forward without competing with others. However, a problem is created when a healthy sense of inferiority becomes inferiority complex. In this case, we will use our sense of inferiority as an excuse, we will say things like &amp;#34;A happened so B can&amp;#39;t&amp;#34;, or &amp;#34;If it only weren&amp;#39;t for A, I could have achieved B&amp;#34;. These are all excuses/life-lies.&lt;/p&gt;&#10;&lt;p&gt;&#10;One may even not aim for success—perhaps to protect their leisure time or out of a deep-seated fear of failure. So while one might claim &amp;#34;the reality is that having a good education makes it easier to be successful in society.&amp;#34; but &amp;#34;The real issue is how one confronts that reality. If what you are thinking is, I’m not well educated, so I can’t succeed, then instead of I can’t succeed, you should think, I don’t want to succeed.&amp;#34;&#10;If we don&amp;#39;t lack the courage, we will be diligent and find a solution to our problem. However, if we lack the courage, we will either boast about our misfortunes (saying things like &amp;#39;you don&amp;#39;t know what I&amp;#39;ve been through&amp;#39;, like a baby who rules with his weakness), or get caught up in a superiority complex, boasting about the memories past.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-5" class="outline-2"&gt;&#10;&lt;h2 id="headline-5"&gt;&#10;Life-tasks&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-5" class="outline-text-2"&gt;&#10;&lt;p&gt;According to Adler, all problems are interpersonal problems. But not only our unhappiness is caused by interpersonal relationship, so is our happiness.&lt;/p&gt;&#10;&lt;p&gt;&#10;In Adlerian psychology, there are 2 objectives for human behavior: to be self-reliant, and to live in harmony with the society, which are supported by the two objectives of psychology: &amp;#34;I have the ability&amp;#34; and &amp;#34;People are my comrades&amp;#34;. These two objectives can be achieved by facing &amp;#34;life tasks&amp;#34;: tasks of work, tasks of love and tasks of friendship, all of which involve interpersonal relationships.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-6" class="outline-2"&gt;&#10;&lt;h2 id="headline-6"&gt;&#10;Courage and Worth&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-6" class="outline-text-2"&gt;&#10;&lt;p&gt;If one is not following through with their life-tasks, it is not because they&amp;#39;re not able to, but because they have lost the &lt;em&gt;courage&lt;/em&gt; to face their tasks. They should first realize that it is them who holds all the cards and decides what to do with them (have a teleological attitude and change the goal), and other people who want to help should use &amp;#39;encouragement&amp;#39;. They should not judge the person or let assistance become intervention, but show by gratitude that they believe in them, that they value their relationship with them, and respect them. In Adler&amp;#39;s view, &amp;#34;It is only when a person is able to feel that he has worth that he can possess courage&amp;#34;, and courage is a prerequisite to change.&#10;But how can one feel like they have worth? It is when they feel &amp;#34;I am beneficial and making a contribution to the community&amp;#34; or that &amp;#34;I am of use to someone&amp;#34;. However this feeling of worthiness doesn&amp;#39;t have to be something at the level of acts, but &lt;strong&gt;at the level of being&lt;/strong&gt;. We love our grandparents just by them being present, not but the things that they do for us. The same can be true for anyone, even NEETs. “People can be of use to someone else simply by being alive, and have a true sense of their worth just by being alive.”&lt;/p&gt;&#10;&lt;p&gt;&#10;How should we increase courage then? Acceptance, Confidence, Focusing on the Strength.&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;We should first accept who we are, just the way we are, and feel at ease with ourselves. We should also believe in ourselves and have the courage to take the step forward regardless of the outcome. This focus on the process of growth and journey, rather than the outcome is called encouragement.&lt;/li&gt;&#10;&lt;li&gt;We should form a belief within, that we&amp;#39;re capable and we&amp;#39;re &amp;#39;enough&amp;#39; as long as we have the courage try. It is the antidote to inferiority complex and moves us from praise based on the outcome &amp;#34;I like it when I/you do well/achieve.&amp;#34; to &amp;#34;I believe in my/your ability to handle this.&amp;#34;, &amp;#34;I am worthy because I had the courage, regardless of the outcome&amp;#34;.&lt;/li&gt;&#10;&lt;li&gt;By noticing on every small step that we get right, our confidence in ourselves increases and we may grow even more.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;&amp;#34;The state of coming up with all manner of pretexts [excuses] in order to avoid the life tasks&amp;#34; is a “life-lie”. And life-lies aren&amp;#39;t about being bad or evil, but about lacking courage. When telling a life-lie:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;One shifts one’s responsibility for the situation one is currently in to someone else. One is running away from one’s life tasks by saying that everything is the fault of other people, or the fault of one’s environment. It’s exactly the same as with the story I mentioned earlier about the female student with the fear of blushing. One lies to oneself, and one lies to the people around one, too. When you really think about it, it’s a pretty severe term.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-7" class="outline-2"&gt;&#10;&lt;h2 id="headline-7"&gt;&#10;Happiness&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-7" class="outline-text-2"&gt;&#10;&lt;p&gt;Happiness deeply relates to the matter of self-acceptance. We are the unhappiest of all when we dislike ourself, but we can begin to like ourselves by using the feeling of community and being of use to other people, and by self-acceptance. Our effect of contribution need not be visible either, its just a feeling that we decide to have:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Does one accept oneself on the level of acts, or on the level of being? This is truly a question that relates to the courage to be happy&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;and&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;You are not the one who decides if your contributions are of use. That is the task of other people, and is not an issue in which you can intervene. In principle, there is not even any way you can know whether you have really made a contribution. That is to say, when we are engaging in this contribution to others, the contribution does not have to be a visible one—all we need is &lt;strong&gt;the subjective sense&lt;/strong&gt; that “I am of use to someone,” or in other words, a feeling of contribution.&#10;…&#10;All human beings can be happy. But it must be understood that this does not mean all human beings are happy. Whether it is on the level of acts or on the level of being, one needs to feel that one is of use to someone. That is to say, one needs a feeling of contribution.&#10;…&#10;In a word, happiness is &lt;em&gt;the feeling&lt;/em&gt; of contribution. That is the definition of happiness.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Note that this sense of being of use to the community is intrinsic, and is deeply different from being recognized and valued by others.&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;If one really has a feeling of contribution, one will no longer have any need for recognition from others. Because one will already have the real awareness that “I am of use to someone,” without needing to go out of one’s way to be acknowledged by others. In other words, a person who is obsessed with the desire for recognition does not have any community feeling yet, and has not managed to engage in self-acceptance, confidence in others, or contribution to others.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-8" class="outline-2"&gt;&#10;&lt;h2 id="headline-8"&gt;&#10;Separation of Tasks, and Avoiding of Judgement&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-8" class="outline-text-2"&gt;&#10;&lt;p&gt;Adlerian psychology denies the need for recognition from others, and states that one should neither rebuke, nor praise. If we seek recognition from others, we are living other people&amp;#39;s lives, and letting them have the interpersonal relationship cards. &amp;#34;If you don&amp;#39;t live your life, who is going to live it for you?&amp;#34; One might imagine that we at least need recognition from our parents, or God to live a good life, but this is false.&lt;/p&gt;&#10;&lt;p&gt;&#10;We need to continually separate our tasks from those of others. A simple way to see whose task it is, is to ask who&amp;#39;s going to ultimately get the result from the choice being made. Even things that seem mundane, such as urging a child to study is not recommended, it is not the parent&amp;#39;s tasks to study, just to lend a hand whenever they&amp;#39;re asked. The child has no obligation to fulfill their parents&amp;#39; expectations either. When doing the right thing, how people construe our actions and feel as a result is not our task either, it is their task to choose their attitude. Also, we must be astute enough to know when to resign, if it is not our task, or if we&amp;#39;re unable to change something, we must know when to resign. To be able to do so shows that we have a firm grasp on the truth of things.&lt;/p&gt;&#10;&lt;p&gt;&#10;Freedom is being disliked by other people. We must not be afraid of being disliked. Behaving in a decent manner is our task, but whether other people like us or not is not. It is not our task to fulfill other people&amp;#39;s expectations.&#10;Freedom is resisting one&amp;#39;s instincts and impulses, a stone is powerless once it has begun to roll downhill, but we are not stones.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-9" class="outline-2"&gt;&#10;&lt;h2 id="headline-9"&gt;&#10;Community&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-9" class="outline-text-2"&gt;&#10;&lt;p&gt;Adler put great emphasis on the feeling of community, on the feeling of &amp;#34;having one&amp;#39;s refuge&amp;#34; and &amp;#34;it&amp;#39;s okay to be here&amp;#34;, that other people (and even animals and objects) are our comrades. It is when we realize that &amp;#34;I&amp;#34; is not the center of the world and when we switch from self-interest to concern for others that are we are the most happy. It is through active commitment to the community of one&amp;#39;s accord that this happens, not by simply being there. Instead of &amp;#34;What will this person give me?&amp;#34;, we will ask &amp;#34;What can I give to this person&amp;#34;.&lt;/p&gt;&#10;&lt;p&gt;&#10;The relationships we build in the community should be horizontal, meaning that in its basis we must treat and be treated as equals. It is for this reason that we don&amp;#39;t praise other people, praising (as well as rebuke) is a form of manipulation. We must not praise or rebuke, but encourage and express confidence in one another and gratitude. We could even treat our friends in a vertical manner:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Even if you are not treating them in a boss-or-subordinate kind of way, it is as if you are saying, “A is above me, and B is below me,” for example, or “I’ll follow A’s advice, but ignore what B says,” or “I don’t mind breaking my promise to C.”&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;But this undermines the very purpose of relationships, as &amp;#34;the final goal of interpersonal relationships is a feeling of community&amp;#34;.&lt;/p&gt;&#10;&lt;p&gt;&#10;For community feeling, &amp;#34;self-acceptance&amp;#34;, &amp;#34;confidence in others&amp;#34;, and &amp;#34;contribution to others&amp;#34; is required.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Self-acceptance is not &amp;#34;I can&amp;#34; or &amp;#34;I am strong&amp;#34;, it is not self-affirmation, but acknowledging our not being perfect and trying anyway.&lt;/li&gt;&#10;&lt;li&gt;Confidence is different from trust, in the sense that confidence is a form of belief that requires no surety and is unconditional. The opposite of confidence is doubt, and one should not doubt the ability of their friends and loved ones.&lt;/li&gt;&#10;&lt;li&gt;Contribution to others happens not as a self-sacrifice which is something Adler denies, but as a way to get a sense of community, and feeling worthy, dedicated to a cause greater than ourselves.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;table&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Concept&lt;/td&gt;&#10;&lt;td&gt;Definition&lt;/td&gt;&#10;&lt;td&gt;The &amp;#34;Shift&amp;#34;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;—&lt;/td&gt;&#10;&lt;td&gt;—&lt;/td&gt;&#10;&lt;td&gt;—&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;strong&gt;&lt;strong&gt;Self-Acceptance&lt;/strong&gt;&lt;/strong&gt;&lt;/td&gt;&#10;&lt;td&gt;Acknowledging imperfection without self-affirmation lies.&lt;/td&gt;&#10;&lt;td&gt;From &amp;#34;I must be special&amp;#34; to &amp;#34;I am enough as I am.&amp;#34;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;strong&gt;&lt;strong&gt;Confidence&lt;/strong&gt;&lt;/strong&gt;&lt;/td&gt;&#10;&lt;td&gt;Unconditional belief in others without requiring surety.&lt;/td&gt;&#10;&lt;td&gt;From &amp;#34;I trust you if…&amp;#34; to &amp;#34;I believe in you regardless.&amp;#34;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;strong&gt;&lt;strong&gt;Contribution&lt;/strong&gt;&lt;/strong&gt;&lt;/td&gt;&#10;&lt;td&gt;The subjective sense of being of use to the community.&lt;/td&gt;&#10;&lt;td&gt;From &amp;#34;What do I get?&amp;#34; to &amp;#34;What can I give?&amp;#34;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;&lt;strong&gt;&lt;strong&gt;Teleology&lt;/strong&gt;&lt;/strong&gt;&lt;/td&gt;&#10;&lt;td&gt;The study of the purpose behind current behaviors.&lt;/td&gt;&#10;&lt;td&gt;From &amp;#34;I am stuck because of my past&amp;#34; to &amp;#34;I choose this for a goal.&amp;#34;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-10" class="outline-2"&gt;&#10;&lt;h2 id="headline-10"&gt;&#10;Life is a Series of Dots&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-10" class="outline-text-2"&gt;&#10;&lt;p&gt;There is much merit in accepting to be normal, and normal doesn&amp;#39;t mean incapable. Both children that try to get excellent grades and those who try to attract attention by problem behavior are in search of being a &amp;#34;special being&amp;#34;. However, pursuit of superiority is an unhealthy attitude. Avoiding perfectionism and accepting to be a normal being is an important part of self-acceptance. People who pursue superiority are tentative in their being, &amp;#39;en route&amp;#39; to some destination. They can&amp;#39;t rest until they arrive, but life is not a competition but a journey to be enjoyed. Life is not a line (kinetic) but a series of dots (energeial). If you finished a marathon using a helicopter that&amp;#39;d be pretty meaningless, so life is not a marathon, but a dance:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Life is a series of moments, which one lives as if one were dancing, right now, around and around each passing instant. And when one happens to survey one’s surroundings, one realizes, I guess I’ve made it this far. Among those who have danced the dance of the violin, there are people who stay the course and become professional musicians. Among those who have danced the dance of the bar examination, there are people who become lawyers. There are people who have danced the dance of writing and become authors. Of course, it also happens that people end up in entirely different places. But none of these lives came to an end “en route.” It is enough if one finds fulfillment in the here and now one is dancing.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;In a dance one is engaged in each moment, and it is enough that we do what we can do now, earnestly and conscientiously, but in doing so we must not get too serious and keep our lives simple.&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;For example, one wants to get into a university but makes no attempt to study. This an attitude of not living earnestly here and now. Of course, maybe the entrance examination is still far off. Maybe one is not sure what needs to be studied or how thoroughly, and one finds it troublesome. However, it is enough to do it little by little—every day one can work out some mathematical formulas, one can memorize some words. In short, one can dance the dance. By doing so, one is sure to have a sense of “this is what I did today”; this is what today, this single day, was for. Clearly, today is not for an entrance examination in the distant future.&#10;…&#10;And the same may be said with regard to your own life. You set objectives for the distant future, and think of now as your preparatory period. You think, I really want to do this, and I’ll do it when the time comes. This is a way of living that postpones life. As long as we postpone life, we can never go anywhere and will pass our days only one after the next in dull monotony, because we think of here and now as just a preparatory period, as a time for patience. But a “here and now” in which one is studying for an entrance examination in the distant future, for example, is the real thing.&#10;…&#10;&lt;strong&gt;The greatest life-lie of all is to not live here and now.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;&#10;Life&amp;#39;s meaning is what we attribute to it. We have freedom in the meaning we assign to it and the choices we make, and our guiding star in these is contributing to the community:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Regardless of the circumstances, we must take some form of action. We must stand up to Kant’s “inclination.”&#10;Now, suppose one experiences a major natural disaster, and one’s response is to look back at the past in an etiological manner and say, “What could have caused such a thing to happen?” How meaningful would that be? An experience of hardship should be an opportunity to look ahead and think, What can I do from now on?&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-11" class="outline-2"&gt;&#10;&lt;h2 id="headline-11"&gt;&#10;Misc&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-11" class="outline-text-2"&gt;&#10;&lt;p&gt;Adler believed in holism, meaning that we can&amp;#39;t separate ourselves from our emotion, or somehow make us think of us as being cosisted of different systems.&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;PHILOSOPHER: Suppose, for instance, that there is a certain Mr. A whom you don’t like because he has some flaws that are hard to forgive.&#10;YOUTH: Ha-ha, if we’re looking for people I don’t like, there’s no shortage of candidates.&#10;PHILOSOPHER: But it isn’t that you dislike Mr. A because you can’t forgive his flaws. You had the goal of taking a dislike to Mr. A beforehand and then started looking for the flaws to satisfy that goal.&#10;YOUTH: That’s ridiculous! Why would I do that?&#10;PHILOSOPHER: So that you could avoid an interpersonal relationship with Mr. A.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>Summary of Man's Search for Meaning</title><link>https://hossein.naghdbishi.com/posts/en/mans-search-for-meaning-summary/</link><pubDate>Sun, 10 May 2026 14:54:47 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/mans-search-for-meaning-summary/</guid><description>&lt;p&gt;&#10;&amp;#34;Man&amp;#39;s Search for Meaning&amp;#34; is about the experiences and philosophy of Viktor Frankl, a concentration camp survivor. As a psychiatrist who endured many atrocities, he uses his observations in the camp to claim that life remains meaningful and worthwhile even under the most extreme circumstances. As we have freedom, not in conditions of life, but in how we respond to life, we get to choose to become a saint or a swine, not as the effect of the environment, but because of our freedom to choose. One&amp;#39;s attitude is the ultimate liberty that cannot be taken away from us, and what makes life meaningful under the most extreme circumstances.&lt;/p&gt;&#10;&lt;p&gt;&#10;His answer to the famous question of &amp;#34;life&amp;#39;s meaning&amp;#34; is similar to that of Tolstoy&amp;#39;s famous &amp;#39;&lt;a href="https://en.wikipedia.org/wiki/The_Three_Questions"&gt;Three Questions&lt;/a&gt;&amp;#39; story. Just like a chess game that has no &lt;em&gt;best move&lt;/em&gt; in general, but a best move at every moment, so does life. The best thing we can do, and the meaning of our life is determined by the moment we are facing now and how we decide to respond to life&amp;#39;s circumstances. Therefore, it is not that we ask what&amp;#39;s the meaning of life, but that we get to know what life asks of us, and whether we wish to endure hardships and live it with much dignity.&lt;/p&gt;&#10;&lt;p&gt;&#10;He claims that human life usually derives its meaning from one of these:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Being creative and actually creating something, such as authoring a book&lt;/li&gt;&#10;&lt;li&gt;Interpersonal relationships, like the joy of seeing one&amp;#39;s child, or loving another person&lt;/li&gt;&#10;&lt;li&gt;While the most important thing is to be creative and change the root cause of our suffering, if need be, just facing an unchangeable hardship with great dignity and courage, learning to change ourselves and grow spiritually as a result is a worthy meaning.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;As a result, life remains valuable in all circumstances, and we can &amp;#34;say yes to life, in spite of everything&amp;#34;. One reason that every life is valuable and meaningful is that we don&amp;#39;t know everything. He points out that since we do not know everything about this world, there might be a supermeaning to our life, a meaning beyond our comprehension. Therefore, we must try our best at all times.&lt;/p&gt;&#10;&lt;p&gt;&#10;He also warns against trying to live in the past. While one can do so in moderation, doing so excessively may cause us to lose sight of the opportunity of growth that is in front of us. Every difficulty is a chance to test our inner strength and a chance to grow and reach inner triumph.&#10;It is of utmost importance that we &lt;strong&gt;believe&lt;/strong&gt; (a belief, a kind of faith as William James would put it) in the future. &amp;#34;The prisoner who had lost faith in the future—his future—was doomed. With his loss of belief in the future, he also lost his spiritual hold; he let himself decline and became subject to mental and physical decay.&amp;#34;&lt;/p&gt;&#10;&lt;p&gt;&#10;Frankl believes that human&amp;#39;s main concern is not to seek pleasure or avoid pain, but to see a meaning in one&amp;#39;s life. He reports that it wasn&amp;#39;t the bulky men who survived at the end, but those who had a goal beyond themselves such as writing a book only they could write, or seeing their children again.&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;That is why people sometimes even choose to suffer. And it is how one can restore a man’s inner strength in the camp, by showing him some future goal. Nietzsche’s words, “He who has a why to live for can bear with almost any how,” could be the guiding motto for all psychotherapeutic and psychohygienic efforts regarding prisoners. Whenever there was an opportunity for it, one had to give them a why—an aim—for their lives, in order to strengthen them to bear the terrible how of their existence. Woe to him who saw no more sense in his life, no aim, no purpose, and therefore no point in carrying on. He was soon lost. The typical reply with which such a man rejected all encouraging arguments was, “I have nothing to expect from life any more.” What sort of answer can one give to that?&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;What was really needed was a fundamental change in our attitude toward life. We had to learn ourselves and, furthermore, we had to teach the despairing men, that it did not really matter what we expected from life, but rather what life expected from us. We needed to stop asking about the meaning of life, and instead to think of ourselves as those who were being questioned by life—daily and hourly. Our answer must consist, not in talk and meditation, but in right action and in right conduct. Life ultimately means taking the responsibility to find the right answer to its problems and to fulfill the tasks which it constantly sets for each individual.&amp;#34;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;&#10;Frankl&amp;#39;s philosophy extends beyond the camps. Jerry Long is another logotherapist. He, a quadriplegic who became a university professor, says:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;Once, after speaking to a large audience, I was asked if I ever felt sad because I could no longer walk. I replied, &amp;#34;Professor Frankl can hardly see, I cannot walk at all, and many of you can hardly cope with life. What is crucial to remember is this - We don&amp;#39;t need just our eyes, just our legs, or just our minds. All we need are the wings of our souls and together we can fly.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;&#10;Reading this book I think I found my answer to a question I have had for a long time. While people are equal and cannot be compared due to different circumstances, ceteris paribus, what makes another person better than the other? &amp;#34;It is a question of the attitude one takes toward life’s challenges and opportunities, both large and small.&amp;#34; People should be an active designer of their life story by making good decisions in every single moment of their life, determining how they want their life to look like.&lt;/p&gt;&#10;</description></item><item><title>How to copy text from remote server to clipboard?</title><link>https://hossein.naghdbishi.com/quicknotes/copy-from-remote-server-to-clipboard/</link><pubDate>Thu, 19 Mar 2026 13:06:02 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/copy-from-remote-server-to-clipboard/</guid><description>&lt;p&gt;&#10;First define this bash function:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Add to remote ~/.bashrc&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;clip&lt;span style="color:#f92672"&gt;()&lt;/span&gt; &lt;span style="color:#f92672"&gt;{&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# Read from stdin, encode to base64 (disable wrapping with -w 0), &lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# and wrap in the OSC 52 escape sequence.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; local b64&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; b64&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#66d9ef"&gt;$(&lt;/span&gt;cat | base64 -w 0&lt;span style="color:#66d9ef"&gt;)&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; printf &lt;span style="color:#e6db74"&gt;&amp;#34;\033]52;c;%s\a&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$b64&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#f92672"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;or for fish:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;function clip&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # Read from stdin, encode to base64, and save to a local variable&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; set -l b64 (cat | base64 -w 0)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; # Output the OSC 52 sequence directly to the terminal&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; printf &amp;#34;\033]52;c;%s\a&amp;#34; &amp;#34;$b64&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;Then you can easily run:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat file.txt | clip&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;Note that if you use tmux you should allow clipboard:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;set-clipboard on&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>How to Allocate swap in GNU/Linux?</title><link>https://hossein.naghdbishi.com/quicknotes/falloc-swap-gnulinux/</link><pubDate>Thu, 19 Feb 2026 14:17:41 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/falloc-swap-gnulinux/</guid><description>&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/usr/bin/env bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;set -euo pipefail&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SIZE&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;1G&amp;#34;&lt;/span&gt; &lt;span style="color:#75715e"&gt;# To be determined by the user: either B or G&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;SWAP_ADDR&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;/swapfile&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;FSTAB&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;/etc/fstab&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt; &lt;span style="color:#e6db74"&gt;${&lt;/span&gt;UID&lt;span style="color:#e6db74"&gt;}&lt;/span&gt; -ne &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt; &lt;span style="color:#f92672"&gt;]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Must run as root&amp;#34;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; exit &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[&lt;/span&gt; -e &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Swapfile already exists&amp;#34;&lt;/span&gt; &amp;gt;&amp;amp;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; exit &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Allocating &lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SIZE&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt; at &lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;fallocate -l &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SIZE&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Setting permissions...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;chmod &lt;span style="color:#ae81ff"&gt;600&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Enabling swap...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkswap &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;swapon &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; grep -qF &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;SWAP_ADDR&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$FSTAB&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Entry already present&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Adding the entry to &lt;/span&gt;&lt;span style="color:#e6db74"&gt;${&lt;/span&gt;FSTAB&lt;span style="color:#e6db74"&gt;}&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; printf &lt;span style="color:#e6db74"&gt;&amp;#34;%s\t\tnone\t\tswap\t\trkswap\t0\t0\n&amp;#34;&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$SWAP_ADDR&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &amp;gt;&amp;gt; &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$FSTAB&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Added.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Current status:&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;swapon --show&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>NixOS Python Packages that Depend on C shared libraries</title><link>https://hossein.naghdbishi.com/quicknotes/nixos-python-pip-libc/</link><pubDate>Wed, 18 Feb 2026 15:48:27 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/nixos-python-pip-libc/</guid><description>&lt;p&gt;&#10;If you see this error:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Importing the numpy C-extensions failed. This error can happen for&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;many reasons, often due to issues with your setup or how NumPy was&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;installed.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;We have compiled some common reasons and troubleshooting tips at:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; https://numpy.org/devdocs/user/troubleshooting-importerror.html&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Please note and check the following:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * The Python version is: Python 3.13 from &amp;#34;&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; * The NumPy version is: &amp;#34;2.4.2&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;and make sure that they are the versions you expect.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Please carefully study the information and documentation linked above.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;This is unlikely to be a NumPy issue but will be caused by a bad install&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;or environment on your machine.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Original error was: libstdc++.so.6: cannot open shared object file: No such file or directory&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;Install appimage-run and then run this:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;export LD_LIBRARY_PATH&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;/nix/store/vfsghxsap24k8gcg4z4dbp42av6hdbr0-appimage-run-fhsenv-rootfs/usr/lib64&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>مانع</title><link>https://hossein.naghdbishi.com/posts/fa/resistence/</link><pubDate>Sun, 15 Feb 2026 15:58:31 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/resistence/</guid><description>&lt;p&gt;&#10;مثالی که در مورد کارهای سخت در قوانینم نوشتم اینه:‌«کارهای سخت مثل دوش آب سردن، بعد از ۵ ثانیه‌ی اول انجامشون آسون میشه». من اصولا دوش آب سرد می‌گیرم،‌ یعنی جهت شیر آب همیشه به صورت تمام و کمال به سمت آب سرده مگر اینکه سرماخورده باشم. امروز بعد چند مدت دوش با آب گرم به علت سرماخوردگی، برگشتم به آب سرد. نکته اینجا بود که چون از این عادت فاصله گرفته بودم، انجامش برام سخت‌تر از پیش بود. از خودم می‌پرسیدم که اصلا این کار چه ضرورتی داره؟‌ آیا لازمه به خودم سختی بدم در حالی که زندگیم در نقاط دیگه‌اش به اندازهٔ کافی سختی داره؟ سعی داشتم خودم رو منصرف کنم. از طرفی عمیقا تردید داشتم که بتونم واقعا دوش آب سرد بگیرم. می‌دونستم که بارها این کار رو کردم، زیر آب‌های سرد خوابگاه یا آب‌های خیلی سرد خونه دووم اورده بودم، از پنج ثانیه تا مدت‌های طولانی و چندین دقیقه، ولی باز هم به طرز عجیبی به خودم شک داشتم. نکنه چون مدتیه فاصله گرفتم دیگه نمی‌تونم دوش آب سرد بگیرم؟&#10;در عین حال قانون همیشگیم رو به خودم یادآوری کردم: «فقط ۵ ثانیه میرم زیر دوش آب سرد و دیگه نمیرم.» ۵ ثانیه رفتم و سخت بود، بعد از ۵ ثانیه از زیر آب خودم رو کنار کشیدم. با این حال همون ۵ ثانیه بهم شهامت داد و تردید رو کنار گذاشتم. توی این شستشو هم مثل بقیهٔ حمام‌رفتن‌های قبل از سرماخوردگیم، از آب گرم هیچ استفاده‌ای نکردم.&#10;حالا تمام این‌ها رو ننوشتم که روایت شستن خودم رو بازگو کنم، نوشتم که از «مانع» یا اون چیزی که خارجی‌ها بهش مقاومت یا Resistance می‌گن بگم. وقتی داشتم با یکی درمورد اهمال‌کاری و انجام‌دادن‌ کارهای با اولویت پایین می‌گفتم، اون به چیزهایی مثل ترس از شکست، ترس از شکستن تجسم خود بی‌نقص، گفتن اینکه «من تمام تلاشم رو نکردم پس این من نیستم که خفن نیست بلکه فقط نمیخواستم و تلاش نکردم» اشاره می‌کرد. نکته اینجا بود که من مدت‌هاست هیچ‌وقت هیچ‌کدوم رو با صدای بلند به خودم نگفتم. مطمئن نبودم که آیا درست میگه یا نه چون هیچ مدرکی از این افکار در من نبود. بعد به اون مانع و سد ذهنی قبل از رفتن زیر دوش آب سرد فکر کردم. توی لحظاتی که آدم مردده که بره زیر دوش آب سرد یا نه، ذهن خالیِ خالیه. هیچ اثری از فکر درش نیست. فقط بدوی‌ترین احساساتن که توی زمان‌هایی که ذهنت خالیه، تردید داری و نزدیک آب سردی فریاد می‌زنن رفتن زیر دوش آب سرد دردناکه. حتی ذهن هم خودش تصویرسازی می‌کنه برات که اگر بری زیر دوش آب سرد و آب بریزه روی پشتت قطره قطره‌اش قراره اذیت کنه. هیچ کدوم از این احساسات تبدیل به فکر نمی‌شن، خیلی قبل‌تر از اون برات یک مانع می‌سازن. اینکه بری رمزگشایی کنی که چه احساساتی برات مانع میسازن با خودته،‌ ولی خبر خوب اینه که راه حل معلومه: کافیه پنج ثانیه به هر طریقی که شده خودت رو بندازی توی دل ترست.&lt;/p&gt;&#10;</description></item><item><title>ترجمهٔ فارسی Todo Cambia</title><link>https://hossein.naghdbishi.com/posts/fa/todo-cambia-persian-translation/</link><pubDate>Tue, 20 Jan 2026 00:19:29 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/todo-cambia-persian-translation/</guid><description>&lt;p&gt;&#10;یک آهنگ بسیار زیبای اسپانیایی هست که توی ذهنم پخش میشه و دوست دارم براتون ترجمه‌اش کنم. ممکنه براتون سوال شه آیا اسپانیایی بلدم؟ جواب اینه که نه D:&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia lo superficial&lt;/p&gt;&#10;&lt;p&gt;&#10;آنچه سطحی است دگرگون می‌شود&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia también lo profundo&lt;/p&gt;&#10;&lt;p&gt;&#10;آنچه عمیق است نیز دگرگون می‌شود&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el modo de pensar&lt;/p&gt;&#10;&lt;p&gt;&#10;شیوه تفکر آدم‌ها عوض می‌شود&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia todo en este mundo&lt;/p&gt;&#10;&lt;p&gt;&#10;همهٔ موجودات دنیا تغییر می‌کنند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el clima con los años&lt;/p&gt;&#10;&lt;p&gt;&#10;آب و هوا با گذر سال‌ها تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el pastor su rebaño&lt;/p&gt;&#10;&lt;p&gt;&#10;چوپان گله‌اش را تغییر می‌دهد&lt;/p&gt;&#10;&lt;p&gt;&#10;Y así como todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;و از آنجایی که همه چیز باید تغییر کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Que yo cambie no es extraño&lt;/p&gt;&#10;&lt;p&gt;&#10;اینکه من تغییر کنم عجیب نیست&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el más fino brillante&lt;/p&gt;&#10;&lt;p&gt;&#10;زیباترین درخشش تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;De mano en mano su brillo&lt;/p&gt;&#10;&lt;p&gt;&#10;هنگامی که از دستی به دستی دیگر می‌رود&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el nido el pajarillo&lt;/p&gt;&#10;&lt;p&gt;&#10;پرندهٔ کوچک لانه‌اش را تغییر می‌دهد&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el sentir un amante&lt;/p&gt;&#10;&lt;p&gt;&#10;احساسات یک عاشق هم تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el rumbo el caminante&lt;/p&gt;&#10;&lt;p&gt;&#10;رَه‌رو مسیرش را تغییر می‌دهد&lt;/p&gt;&#10;&lt;p&gt;&#10;Aunque esto le cause daño&lt;/p&gt;&#10;&lt;p&gt;&#10;اگرچه ممکن است برایش آسیب‌زا باشد&lt;/p&gt;&#10;&lt;p&gt;&#10;Y así como todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;و از آنجایی که همه چیز باید تغییر کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Que yo cambie no es extraño&lt;/p&gt;&#10;&lt;p&gt;&#10;اینکه من تغییر کنم عجیب نیست&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia, todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;تغییر می‌کند، همه چیز تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia, todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;تغییر می‌کند، همه چیز تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia, todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;تغییر می‌کند، همه چیز تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia, todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;تغییر می‌کند، همه چیز تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el sol en su carrera&lt;/p&gt;&#10;&lt;p&gt;&#10;خورشید در مسیر خود تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cuando la noche subsiste&lt;/p&gt;&#10;&lt;p&gt;&#10;وقتی که شب پایدار می‌ماند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia la planta y se viste&lt;/p&gt;&#10;&lt;p&gt;&#10;گیاه تغییر می‌کند و جامه‌ی&lt;/p&gt;&#10;&lt;p&gt;&#10;De verde en la primavera&lt;/p&gt;&#10;&lt;p&gt;&#10;سبز رنگ بهاری‌اش را از تن به در می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el pelaje la fiera&lt;/p&gt;&#10;&lt;p&gt;&#10;پوستین حیوانات تغییر می‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Cambia el cabello el anciano&lt;/p&gt;&#10;&lt;p&gt;&#10;موی افراد سالخورده نیز؛&lt;/p&gt;&#10;&lt;p&gt;&#10;Y así como todo cambia&lt;/p&gt;&#10;&lt;p&gt;&#10;و از آنجایی که همه چیز باید تغییر کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Que yo cambie no es extraño&lt;/p&gt;&#10;&lt;p&gt;&#10;اینکه من تغییر کنم عجیب نیست&lt;/p&gt;&#10;&lt;p&gt;&#10;Pero no cambia mi amor&lt;/p&gt;&#10;&lt;p&gt;&#10;اما عشق من تغییر نمی‌کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Por más lejos que me encuentre&lt;/p&gt;&#10;&lt;p&gt;&#10;هرچقدر هم که به دوردست‌ها سفر کرده باشم&lt;/p&gt;&#10;&lt;p&gt;&#10;Ni el recuerdo ni el dolor&lt;/p&gt;&#10;&lt;p&gt;&#10; نه خاطره و نه دردِ&lt;/p&gt;&#10;&lt;p&gt;&#10;De mi pueblo y de mi gente&lt;/p&gt;&#10;&lt;p&gt;&#10;هم‌وطنانم و دیارم تغییری نمی‌کنند&lt;/p&gt;&#10;&lt;p&gt;&#10;Lo que cambió ayer&lt;/p&gt;&#10;&lt;p&gt;&#10;آنچه دیروز تغییر کرد&lt;/p&gt;&#10;&lt;p&gt;&#10;Tendrá que cambiar mañana&lt;/p&gt;&#10;&lt;p&gt;&#10;باید فردا نیز تغییر کند&lt;/p&gt;&#10;&lt;p&gt;&#10;Así como cambio yo&lt;/p&gt;&#10;&lt;p&gt;&#10;همان‌طور که من تغییر می‌کنم&lt;/p&gt;&#10;&lt;p&gt;&#10;En esta tierra lejana&lt;/p&gt;&#10;&lt;p&gt;&#10;در این سرزمین دور&lt;/p&gt;&#10;</description></item><item><title>منابع اینترانت ایران</title><link>https://hossein.naghdbishi.com/quicknotes/iranian-intranet-resources/</link><pubDate>Wed, 07 Jan 2026 20:27:21 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/iranian-intranet-resources/</guid><description>&#10;&lt;div id="outline-container-headline-1" class="outline-2"&gt;&#10;&lt;h2 id="headline-1"&gt;&#10;DNS&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;ریشه (فقط ریشه):&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;I: &lt;code class="verbatim"&gt;192.36.148.17&lt;/code&gt; &lt;code class="verbatim"&gt;2001:7fe::53&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;K: &lt;code class="verbatim"&gt;193.0.14.129&lt;/code&gt; &lt;code class="verbatim"&gt;2001:7fd::1&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;فیزیک نظری:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;194.255.152.12&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;194.255.152.10&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;زیرساخت:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;217.218.127.127&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;217.218.155.155&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;وزارت ارتباطات:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;10.202.10.10&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;10.202.10.11&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;مبین‌نت&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;10.202.10.10&lt;/code&gt; &lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;10.44.8.8&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;آسیاتک&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;185.51.200.2&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;185.51.200.3&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;شاتل&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;91.239.100.100&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;89.233.43.71&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;85.15.1.14&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;85.15.1.15&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;همراه اول&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;208.67.220.200&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;208.67.222.222&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;ایرانسل&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;10.255.255.254&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;109.69.8.51&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;74.82.42.42&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;مخابرات&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;2.188.21.90&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;2.188.21.100&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;2.188.21.240&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;الکترو&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;78.157.42.100&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;78.157.42.101&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;پیشگامان&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;5.202.100.101&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;5.202.100.100&lt;/code&gt; &lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.127.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.127.105&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.127.106&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.155.105&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.155.105&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.155.106&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.0.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.96.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.192.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.128.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.224.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.64.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.160.104&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.157.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.72.194&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.185.239.133&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.185.239.134&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.185.239.136&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.185.239.137&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.185.239.138&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.185.239.139&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.103.5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;78.38.23.216&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;85.185.6.3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.132.88&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.133.21&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;80.191.209.105&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;80.191.40.41&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;93.115.231.100&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;95.80.184.184&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.109.74.85&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.164.73.148&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.164.73.180&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.250.200&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.250.201&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.250.202&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.64.179.89&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;194.60.210.66&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.145.112.38&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.145.112.39&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;89.144.144.144&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.219.187.3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.200.200.200&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.186.242.161&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;78.39.101.186&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.229.29.214&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.229.29.215&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.23.131.73&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.156.29.27&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.130.180.120&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.113.59.253&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.47.37.35&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.47.37.92&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;79.175.176.42&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;80.75.5.100&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.234.221&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;194.36.174.161&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;78.38.122.12&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;85.185.85.6&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;80.191.233.17&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;80.191.233.33&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.127.127&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;217.218.155.155&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;213.176.123.5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.187.84.15&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;194.225.62.80&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;92.42.49.43&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.128.139.128&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.128.139.139&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.51.200.10&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.51.200.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.51.200.50&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.51.200.6&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.161.112.33&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.161.112.34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.161.112.38&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.234.34&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.234.35&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.234.37&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;94.139.190.190&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;81.163.3.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;81.163.3.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;45.159.151.220&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;82.99.202.164&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;91.98.124.109&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;91.98.64.222&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;82.99.242.155&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;91.99.101.12&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;91.99.96.158&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.55.225.25&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.55.226.26&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.53.143.3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;81.91.144.190&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.19.90.62&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.19.90.65&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;91.245.229.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;91.245.229.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;94.183.42.232&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;188.158.158.158&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;188.159.159.159&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.20.163.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;95.38.61.50&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.188.166.22&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.160.211.66&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;178.22.122.100&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.98.113.113&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.98.114.114&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.98.115.135&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.156.145.18&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.156.145.21&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.156.145.229&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;77.238.109.196&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.81.41.81&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.202.100.100&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.202.100.101&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.202.100.102&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.202.100.99&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;5.202.122.222&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;46.224.1.42&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;46.224.1.43&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.200.1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.200.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.200.3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;31.24.200.4&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;178.215.3.142&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;78.38.117.206&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;85.185.67.235&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;171.22.26.14&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.8.173.236&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;78.157.40.157&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;78.157.40.158&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;194.225.125.12&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;194.225.152.10&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;194.225.73.141&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.11.70.174&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.83.197.154&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;85.185.157.2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.231.182.126&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.97.117.187&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.189.44.44&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;2.188.21.130&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;81.91.144.116&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;87.107.110.108&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;37.32.5.60&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;46.245.89.51&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;185.143.235.253&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;212.80.20.243&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;212.80.20.244&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;To open google&amp;#39;s services if google is whitelisted:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 youtube.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 i.ytimg.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.youtube.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 content-autofill.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 signaler-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 waa-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 addons-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 drivefrontend-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 peoplestack-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 people-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 lh3.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 drive-thirdparty.googleusercontent.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 play.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 android.clients.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 calendar.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 mail.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 gmail.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 accounts.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 accounts.youtube.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 oauth2.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 youtube.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.google-analytics.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 colab.research.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 ssl.gstatic.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 fonts.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 drive.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 appsgenaiserver-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 feedback-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.google-analytics.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 appsgrowthpromo-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 meet.turns.goog.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 meet.turns.goog&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 meet.turns.google&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 signaler-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 lh3.googleusercontent.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 fonts.gstatic.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 onepick-opensocial.googleusercontent.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.gstatic.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 www.googletagmanager.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 clients1.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 clients2.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 clients3.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 clients4.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 clients5.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 ogads-pa.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 optimizationguide-pa.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 play.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 apis.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 hangouts.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 meetings.clients6.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 ogs.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 meetings.googleapis.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 meet.google.com &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 lh3.googleusercontent.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 gemini.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 console.cloud.google.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;216.239.38.120 contacts.google.com&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-2" class="outline-2"&gt;&#10;&lt;h2 id="headline-2"&gt;&#10;Mirrors&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;&#10;&lt;div id="outline-container-headline-3" class="outline-3"&gt;&#10;&lt;h3 id="headline-3"&gt;&#10;Programming Languages&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-3" class="outline-text-3"&gt;&#10;&lt;div id="outline-container-headline-4" class="outline-4"&gt;&#10;&lt;h4 id="headline-4"&gt;&#10;Rust&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-4" class="outline-text-4"&gt;&#10;&lt;p&gt;&lt;a href="https://index.rust-meetup.ir/"&gt;https://index.rust-meetup.ir/&lt;/a&gt;&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-5" class="outline-3"&gt;&#10;&lt;h3 id="headline-5"&gt;&#10;Docker&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-5" class="outline-text-3"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://linuxmirrors.ir/docker/"&gt;https://linuxmirrors.ir/docker/&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://runflare.com/mirrors/docker-mirror/"&gt;https://runflare.com/mirrors/docker-mirror/&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://mirror2.chabokan.net"&gt;https://mirror2.chabokan.net&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://repo.mecan.ir"&gt;https://repo.mecan.ir&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>proxychains-ng Alternative</title><link>https://hossein.naghdbishi.com/quicknotes/proxychains-alternative/</link><pubDate>Mon, 05 Jan 2026 01:32:24 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/proxychains-alternative/</guid><description>&lt;p&gt;&#10;Use Tor project&amp;#39;s &lt;a href="https://blog.torproject.org/introducing-oniux-tor-isolation-using-linux-namespaces/"&gt;oniux&lt;/a&gt; instead (maybe in the future, it hasn&amp;#39;t worked for me yet)&lt;/p&gt;&#10;</description></item><item><title>Poor Man's VPN: How to Use Reverse SSH for Quick NAT Traversal</title><link>https://hossein.naghdbishi.com/posts/en/poor-mans-vpn-autossh/</link><pubDate>Sat, 03 Jan 2026 23:53:49 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/poor-mans-vpn-autossh/</guid><description>&lt;p&gt;&#10;Suppose you want to connect from PC &lt;em&gt;A&lt;/em&gt; to PC &lt;em&gt;B&lt;/em&gt;, and neither have a pubilc IP. How can you do that? One way is to use &lt;a href="https://github.com/rustonbsd/iroh-ssh"&gt;iroh-ssh&lt;/a&gt;, it&amp;#39;s neat but currently they don&amp;#39;t support custom relays so it&amp;#39;s a deadend in more restricted networks. But if you own a VPS, you can actually can connect these two.&lt;/p&gt;&#10;&lt;p&gt;&#10;Assuming you have installed &lt;code class="verbatim"&gt;autossh&lt;/code&gt; on &lt;em&gt;B&lt;/em&gt;, create a systemd service on it as well &lt;code class="verbatim"&gt;/etc/systemd/system/autossh-ssh.service&lt;/code&gt;:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Unit]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Description=AutoSSH Service&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;After=network.target&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Service]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Type=simple&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;User=user&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Environment=AUTOSSH_GATETIME=0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ExecStart=/usr/bin/autossh -M 0 -N -o &amp;#34;ServerAliveInterval 30&amp;#34; -o &amp;#34;ServerAliveCountMax 10&amp;#34; -o &amp;#34;ExitOnForwardFailure yes&amp;#34; -o &amp;#34;AddressFamily inet&amp;#34; -o &amp;#34;TCPKeepAlive no&amp;#34; -R localhost:REMOTE_SSH_PORT_ON_VPS:localhost:SSH_PORT_OF_B -i YOUR_KEY_ADDRESS USER@VPS -p VPS_SSH_PORT&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;Restart=always&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;RestartSec=5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;KillMode=process # Ensure child processes are not killed&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Install]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;WantedBy=multi-user.target&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;Then enable it using &lt;code class="verbatim"&gt;sudo systemctl enable autossh-ssh&lt;/code&gt;. Now it will always keep a connection to your VPS and expose its SSH port on your VPS&amp;#39;s &lt;code class="verbatim"&gt;localhost:REMOTE_SSH_PORT_ON_VPS&lt;/code&gt; (localhost can be changed to your VPS&amp;#39;s static IP if that&amp;#39;s what you need). Now you can connect to &lt;em&gt;B&lt;/em&gt; on your VPS.&lt;/p&gt;&#10;&lt;p&gt;&#10;If you need &lt;em&gt;B&lt;/em&gt;&amp;#39;s SSH port on &lt;em&gt;A&lt;/em&gt;, you have to port forward: &lt;code class="verbatim"&gt;ssh user@VPS_IP -p VP_SSH_PORT -L localhost:REMOTE_SSH_PORT_ON_A:localhost:REMOTE_SSH_PORT_ON_VPS&lt;/code&gt;, which means you can connect to &lt;em&gt;B&lt;/em&gt; from &lt;em&gt;A&lt;/em&gt;: &lt;code class="verbatim"&gt;ssh user@localhost -P REMOTE_SSH_PORT_ON_A&lt;/code&gt;.&#10;Q.E.D!&lt;/p&gt;&#10;&lt;p&gt;&#10;Side note: If for whatever reason you can&amp;#39;t connect to &lt;em&gt;B&lt;/em&gt;, then go to your VPS, kill the SSH that is responsible for the &lt;code class="verbatim"&gt;REMOTE_SSH_PORT_ON_VPS&lt;/code&gt;. After some time &lt;em&gt;B&lt;/em&gt; will create a fresh connection which has a better likelihood of good connection.&lt;/p&gt;&#10;&lt;p&gt;&#10;Side note: If you own a VPS maybe you&amp;#39;re not so poor monetarily but rather temporarily, since you don&amp;#39;t have time to deal with Wireguard and so on.&lt;/p&gt;&#10;&lt;p&gt;&#10;Update: Just use &lt;a href="https://yggdrasil-network.github.io/"&gt;yggdrasil&lt;/a&gt; instead.&lt;/p&gt;&#10;</description></item><item><title>Bluetooth Audio Troubleshooting in Linux</title><link>https://hossein.naghdbishi.com/quicknotes/bluetooth-troubleshoot-linux-log/</link><pubDate>Fri, 02 Jan 2026 01:41:43 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/bluetooth-troubleshoot-linux-log/</guid><description>&lt;p&gt;&#10;Assuming you use pipewire:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;journalctl --user -f -u pipewire -u wireplumber&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;pw-top&lt;/code&gt; (look for error column) &lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;btmgmt --index 0 info&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;btmon&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;journalctl -u bluetooth&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;From &lt;a href="https://linuxmusicians.com/viewtopic.php?t=25768"&gt;here&lt;/a&gt;:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;pw-metadata -n settings 0 clock.force-rate &amp;lt;samplerate&amp;gt;&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;pw-metadata -n settings 0 clock.force-quantum &amp;lt;buffersize&amp;gt;&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;Confirm the actuall sample rate and buffer size? &lt;code class="verbatim"&gt;pw-metadata -n settings&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Kernel related:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;sudo dmesg | grep -i blue&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;lsmod | grep bt&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;modinfo -p btusb&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;grep . /sys/module/btusb/parameters/*&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;lsusb | grep -i blue&lt;/code&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;</description></item><item><title>پسوند «یک» در فارسی، و «وک» در نیشابوری</title><link>https://hossein.naghdbishi.com/posts/fa/ique-suffix-in-nishapuri-language/</link><pubDate>Sat, 20 Dec 2025 19:55:18 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/ique-suffix-in-nishapuri-language/</guid><description>&lt;p&gt;&#10;توی گویش نیشابوری یک پسوند هست که در فارسی اونقدر پررنگ نیست. اونم «ـوک» ه تلفظشم مثل ok در took توی انگلیسیه تقریبا. توی فارسی معادلش ـیک ه. مثلا شما تار/نزد رو دارید بعد ازش تاریک/نزدیک رو می‌گیرید. جوری که توی وب خوندم خود این پسوند از فارسی میانه میاد و با ique مثل تکنولوژیک فرانسوی هم‌ریشه است.&lt;/p&gt;&#10;&lt;p&gt;&#10;خلاصه با همین پسوند که توی فارسی مرده، میشه خیلی چیزا ساخت. پسوند ـی برای ساخت صفت از اسم توی خیلی جاها جواب نمیده. سر همین مثلا پیشنهاد دادن به‌جای گرفتن «بیضوی» از بیضی و «هذلولوی» از هذلولی بگیم «بیضیک» و «هذلولیک». یک سری کلمه‌های خوشگل و باکلاس هم میشه ساخت با این پسوند، مثل «دانشیک» به‌معنی علمی.&lt;/p&gt;&#10;&lt;p&gt;&#10;توی گویش نیشابوری هم چندین تا کلمه هست که ساختشون جالبه.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;پیر -&amp;gt; پیروک (پیرمانند مثلا پوستی که چروکیده باشه)&lt;/li&gt;&#10;&lt;li&gt;باد -&amp;gt; بَدوک (کسی که پرباده، پر از فخرفروشیه)&lt;/li&gt;&#10;&lt;li&gt;جیغ -&amp;gt; جیغوک (کسی که زیاد فریاد میزنه)&lt;/li&gt;&#10;&lt;li&gt;ترسو -&amp;gt; تُرسُنوک (کسی که زیاد می‌ترسه)&lt;/li&gt;&#10;&lt;li&gt;پورچَنه (پرچانه) -&amp;gt; پورچُنوک (کسی که زیاد حرف میزنه)&lt;/li&gt;&#10;&lt;li&gt;چرب -&amp;gt; چوربوک (صفت ظرفای چرب)&lt;/li&gt;&#10;&lt;li&gt;چسبنده -&amp;gt; چُسبُندُنوک (نوچ، چسب‌مانند)&lt;/li&gt;&#10;&lt;li&gt;زرد &amp;gt; زردوک (بیمار)&lt;/li&gt;&#10;&lt;li&gt;گوز -&amp;gt; گَوزوک (گوزو 😁) / چس -&amp;gt; چسّوک (به همین معنی)&lt;/li&gt;&#10;&lt;li&gt;ریخ (فضولات انسانی) -&amp;gt; ریخوک (آنکه زیاد بریند)&lt;/li&gt;&#10;&lt;li&gt;خیل (آب دماغ) -&amp;gt; خیلّوک (کسی که آب دماغش میزنه بیرون)&lt;/li&gt;&#10;&lt;li&gt;عَل‌لُ‌توک (یعنی مریض نمیدونم از چی ساخته شده، احتمالا از علیل میاد)&lt;/li&gt;&#10;&lt;li&gt;لپوک (هندونه یا خربزه رسیده)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;حدس‌های بی‌ربط خودم:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;چوب‌جیک (پرنده‌ای که روی چوب جیک‌جیک می‌کند) بدهد چوب‌جیغک که بدهد -&amp;gt; چغوک (گنجشک)&lt;/li&gt;&#10;&lt;li&gt;ناز -&amp;gt; نَزوک (که بدهد همون نازک فارسی)&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;ایدهٔ وبسایت: اگر کسی حال داشت می‌تونه بهم پیام بده خرد خرد و در درازمدت با هم یک سایت بسازیم برای گردآوری لهجه‌های مختلف ایران.&lt;/p&gt;&#10;</description></item><item><title>PWN Cheatsheet</title><link>https://hossein.naghdbishi.com/posts/en/pwn-cheatsheet/</link><pubDate>Sun, 16 Nov 2025 23:30:51 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/pwn-cheatsheet/</guid><description>&#10;&lt;div id="outline-container-headline-1" class="outline-2"&gt;&#10;&lt;h2 id="headline-1"&gt;&#10;x86_64 Assembly&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;%rax&lt;/code&gt; is a reference to &lt;code class="verbatim"&gt;rax&lt;/code&gt; register.&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;$0x4&lt;/code&gt; is a constant.&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;0(%esp)&lt;/code&gt; or &lt;code class="verbatim"&gt;(%esp)&lt;/code&gt; is the value loaded from the memory address that is stored in &lt;code class="verbatim"&gt;%esp&lt;/code&gt;. &lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;12(%esp)&lt;/code&gt; dereferences memory 12 bytes above the address contained in ESP&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;code class="verbatim"&gt;mov A,B&lt;/code&gt;, B is changed to become A. A&amp;#39;s value is -&amp;gt; put into B.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;This is AT&amp;amp;T x86 syntax (what GDB uses). In this syntax the destination register comes last. In RISC-V assembly the opposite is true.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;push A&lt;/code&gt; adds &lt;code class="verbatim"&gt;A&lt;/code&gt; as the last element of the stack, decreases the value of &lt;code class="verbatim"&gt;rsp/esp&lt;/code&gt; by one word (since the stack grows from high to low).&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;pop rax/eax&lt;/code&gt; removes the last element of the stack, copies into &lt;code class="verbatim"&gt;rax/eax&lt;/code&gt; increases the value of &lt;code class="verbatim"&gt;rsp/esp&lt;/code&gt; by one word (since the stack grows from high to low).&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;jmp&lt;/code&gt; is equivalent to &lt;code class="verbatim"&gt;mov rip, target_address&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;call&lt;/code&gt; is equivalent to &lt;code class="verbatim"&gt;push rip(old return address)&lt;/code&gt; and &lt;code class="verbatim"&gt;jmp dst_func.&lt;/code&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;ret&lt;/code&gt; is equivalent to &lt;code class="verbatim"&gt;pop rip(old return address)&lt;/code&gt; which is &lt;code class="verbatim"&gt;jmp src_func&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Because stack grows from high addresses to low addresses:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;sub $8,%rsp&lt;/code&gt; increases stack size.&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;add $8,%rsp&lt;/code&gt; decreases stack size.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-2" class="outline-2"&gt;&#10;&lt;h2 id="headline-2"&gt;&#10;Stack&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;&#10;&lt;div id="outline-container-headline-3" class="outline-3"&gt;&#10;&lt;h3 id="headline-3"&gt;&#10;Stack&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-3" class="outline-text-3"&gt;&#10;&lt;img src="https://hossein.naghdbishi.com/images/stack.svg" alt="This figure shows the memory layout created by C." title="/images/stack.svg" style="height:100%;width:100%;"/&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-4" class="outline-3"&gt;&#10;&lt;h3 id="headline-4"&gt;&#10;Backgroud&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-4" class="outline-text-3"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Each byte is 8 bits.&lt;/li&gt;&#10;&lt;li&gt;Each word is 4 bytes in 32-bit systems and 8 bytes in 64-bit systems.&lt;/li&gt;&#10;&lt;li&gt;Each register can store one word.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-5" class="outline-3"&gt;&#10;&lt;h3 id="headline-5"&gt;&#10;Registers&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-5" class="outline-text-3"&gt;&#10;&lt;div id="outline-container-headline-6" class="outline-4"&gt;&#10;&lt;h4 id="headline-6"&gt;&#10;Pointing to the code section&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-6" class="outline-text-4"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;rip/eip&lt;/code&gt; is the instruction pointer, and it stores the address of the machine instruction currently being executed (code section). In RISC-V, this register is called the PC (program counter).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-7" class="outline-4"&gt;&#10;&lt;h4 id="headline-7"&gt;&#10;Pointing to the stack section&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-7" class="outline-text-4"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;rbp/ebp&lt;/code&gt; is the base pointer, and it stores the address of the base of the current stack frame. In RISC-V systems, this register is called the FP (frame pointer).&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;rsp/esp&lt;/code&gt; is the stack pointer, and it stores the address of the last element of the current stack frame. In RISC-V, this register is called the SP (stack pointer).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-8" class="outline-4"&gt;&#10;&lt;h4 id="headline-8"&gt;&#10;General Purpose Registers&#10;&lt;/h4&gt;&#10;&lt;div id="outline-text-headline-8" class="outline-text-4"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;16 general purpose registers in 64-bit systems: &lt;code class="verbatim"&gt;RAX&lt;/code&gt;, &lt;code class="verbatim"&gt;RBX&lt;/code&gt;, &lt;code class="verbatim"&gt;RCX&lt;/code&gt;, &lt;code class="verbatim"&gt;RDX&lt;/code&gt;, &lt;code class="verbatim"&gt;RSI&lt;/code&gt;, &lt;code class="verbatim"&gt;RDI&lt;/code&gt; and &lt;code class="verbatim"&gt;R8&lt;/code&gt; to &lt;code class="verbatim"&gt;R15&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;6 general puprose registers in 32-bit systems: &lt;code class="verbatim"&gt;EAX&lt;/code&gt;, &lt;code class="verbatim"&gt;EBX&lt;/code&gt;, &lt;code class="verbatim"&gt;ECX&lt;/code&gt;, &lt;code class="verbatim"&gt;EDX&lt;/code&gt;, &lt;code class="verbatim"&gt;ESI&lt;/code&gt;, &lt;code class="verbatim"&gt;EDI&lt;/code&gt;.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;table style="height:80%;width:50%; text-align:center; margin:auto;"&gt;&#10;&lt;thead&gt;&#10;&lt;tr&gt;&#10;&lt;th&gt;Argument&lt;/th&gt;&#10;&lt;th&gt;Register (64-bit)&lt;/th&gt;&#10;&lt;/tr&gt;&#10;&lt;/thead&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Arg 1&lt;/td&gt;&#10;&lt;td&gt;%rdi&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Arg 2&lt;/td&gt;&#10;&lt;td&gt;%rsi&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Arg 3&lt;/td&gt;&#10;&lt;td&gt;%rdx&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Arg 4&lt;/td&gt;&#10;&lt;td&gt;%rcx&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Arg 5&lt;/td&gt;&#10;&lt;td&gt;%r8&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Arg 6&lt;/td&gt;&#10;&lt;td&gt;%r9&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-9" class="outline-3"&gt;&#10;&lt;h3 id="headline-9"&gt;&#10;Little Endian or Big Endian&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-9" class="outline-text-3"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Address numbers point to bytes.&lt;/li&gt;&#10;&lt;li&gt;Using little endian &lt;code class="verbatim"&gt;0x44332211&lt;/code&gt; will be stored like &lt;code class="verbatim"&gt;0x11 0x22 0x33 0x44&lt;/code&gt; in memory, meaning that the most signifcant byte has the highest address number (the memory starts from &lt;code class="verbatim"&gt;0x0&lt;/code&gt; to &lt;code class="verbatim"&gt;0x3&lt;/code&gt;, and &lt;code class="verbatim"&gt;0x44&lt;/code&gt; is stored at &lt;code class="verbatim"&gt;0x3&lt;/code&gt;).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-10" class="outline-2"&gt;&#10;&lt;h2 id="headline-10"&gt;&#10;Function Call in x86&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-10" class="outline-text-2"&gt;&#10;&lt;p alt="This figure shows the memory layout created by C, after the function foo below is called (almost)." style="height:100%;width:100%;"&gt;&lt;img src="https://hossein.naghdbishi.com/images/stack-func-call.svg" alt="/images/stack-func-call.svg" title="/images/stack-func-call.svg"/&gt;&#10;See the photos in &lt;a href="https://textbook.cs161.org/memory-safety/x86.html"&gt;UC Berkeley&amp;#39;s CS161 Textbook&lt;/a&gt; &lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Function args are pushed into the stack. (or onto the general registers such as &lt;code class="verbatim"&gt;rdi&lt;/code&gt;, &lt;code class="verbatim"&gt;rsi&lt;/code&gt;, &lt;code class="verbatim"&gt;rdx&lt;/code&gt;, &lt;code class="verbatim"&gt;rcx&lt;/code&gt; if SysV x86-64)&lt;/li&gt;&#10;&lt;li&gt;Return address (old &lt;code class="verbatim"&gt;rip&lt;/code&gt;) is pushed into the stack. &lt;/li&gt;&#10;&lt;li&gt;Function jump happens (&lt;code class="verbatim"&gt;rip&lt;/code&gt; = new &lt;code class="verbatim"&gt;rip&lt;/code&gt;)&lt;/li&gt;&#10;&lt;li&gt;The new function pushes old &lt;code class="verbatim"&gt;rbp&lt;/code&gt; onto the stack.&lt;/li&gt;&#10;&lt;li&gt;Previous frame&amp;#39;s &lt;code class="verbatim"&gt;rbp&lt;/code&gt; becomes the current &lt;code class="verbatim"&gt;rsp&lt;/code&gt; (old function&amp;#39;s last element is the new functions bottom)&lt;/li&gt;&#10;&lt;li&gt;&lt;code class="verbatim"&gt;rsp&lt;/code&gt; is grown to fit the new function.&lt;/li&gt;&#10;&lt;li&gt;The new function does whatever it does&lt;/li&gt;&#10;&lt;li&gt;At the end of the new function&amp;#39;s run, we are at its &lt;code class="verbatim"&gt;rbp&lt;/code&gt;, which is the old one&amp;#39;s &lt;code class="verbatim"&gt;rsp&lt;/code&gt;. Previous frame&amp;#39;s &lt;code class="verbatim"&gt;rsp&lt;/code&gt; is the present frame&amp;#39;s &lt;code class="verbatim"&gt;rbp&lt;/code&gt;.&lt;/li&gt;&#10;&lt;li&gt;Old &lt;code class="verbatim"&gt;rbp&lt;/code&gt; is poped back.&lt;/li&gt;&#10;&lt;li&gt;Old &lt;code class="verbatim"&gt;rip&lt;/code&gt; is poped back.&lt;/li&gt;&#10;&lt;li&gt;Decrease the size of the stack by the size of args.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;div id="outline-container-headline-11" class="outline-3"&gt;&#10;&lt;h3 id="headline-11"&gt;&#10;Example C code&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-11" class="outline-text-3"&gt;&#10;&lt;div class="src src-c"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c" data-lang="c"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;foo&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; a, &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; b) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; bar[&lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;];&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;main&lt;/span&gt;(&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt;) {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#a6e22e"&gt;foo&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;, &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;);&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;return&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Which gives the following assembly:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;0000000000001129 &amp;lt;foo&amp;gt;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1129:&#9;55 &#9;push %rbp // Step 4. RBP is saved on the stack right below RIP (saved in the previous step).&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 112a:&#9;48 89 e5 &#9;mov %rsp,%rbp // Step 5. The new stack base is the previous stack pointer.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 112d:&#9;89 7d ec &#9;mov %edi,-0x14(%rbp) // Foo saves first arg into its own stack to free up %edi &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1130:&#9;89 75 e8 &#9;mov %esi,-0x18(%rbp) // Foo saves second arg into its own stack to free up %esi&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1133:&#9;90 &#9;nop // Alignment, could be Step 6. =sub $N, %rsp= &amp;amp; Step. 7 if our function involved anything.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; // Since Step. 6 didn&amp;#39;t take place, rsp didn&amp;#39;t change.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; // therefore =mov %rsp, %rbp= (Step 8) is not run either.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; // We could change this behavior using gcc flag -mno-red-zone&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1134:&#9;5d &#9;pop %rbp // Step 9. Old RBP is restored&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1135:&#9;c3 &#9;ret // == pop %rip which is Step 10. Old RIP is restored&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; // Step 11. doesn&amp;#39;t happen since in the x86-64 ABI, since the caller&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; // passed arguments in registers, there is nothing on the stack for&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; // the caller to clean up&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;0000000000001136 &amp;lt;main&amp;gt;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1136:&#9;55 &#9;push %rbp // This is step 4 since main is not the starting function and is being called from _start&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1137:&#9;48 89 e5 &#9;mov %rsp,%rbp // this is also step 5 but we don&amp;#39;t analyze main.&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 113a:&#9;be 02 00 00 00 &#9;mov $0x2,%esi // Step 1. Saving args (from right to left): 2 &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 113f:&#9;bf 01 00 00 00 &#9;mov $0x1,%edi // Step 1. Saving args (from right to left): 1 &#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1144:&#9;e8 e0 ff ff ff &#9;call 1129 &amp;lt;foo&amp;gt; // Step 2. RIP is pushed on the stack. Step 3. RIP is changed to the func address of foo (00001129).&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 1149:&#9;b8 00 00 00 00 &#9;mov $0x0,%eax&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 114e:&#9;5d &#9;pop %rbp&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 114f:&#9;c3 &#9;ret&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-12" class="outline-2"&gt;&#10;&lt;h2 id="headline-12"&gt;&#10;Binary Background Check&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-12" class="outline-text-2"&gt;&#10;&lt;table&gt;&#10;&lt;tbody&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Purpose&lt;/td&gt;&#10;&lt;td&gt;Command&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Check security properties (NX bit, dynamic vs static)&lt;/td&gt;&#10;&lt;td&gt;&lt;code class="verbatim"&gt;rabin2 -I a.out&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;List functions imported from shared libraries&lt;/td&gt;&#10;&lt;td&gt;&lt;code class="verbatim"&gt;rabin2 -i a.out&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Find functions likely written by the programmer&lt;/td&gt;&#10;&lt;td&gt;&lt;code class="verbatim"&gt;rabin2 -qs a.out&lt;/code&gt; piped to &lt;code class="verbatim"&gt;grep -ve imp -e &amp;#39; 0 &amp;#39;&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;tr&gt;&#10;&lt;td&gt;Find strings&lt;/td&gt;&#10;&lt;td&gt;&lt;code class="verbatim"&gt;strings a.out&lt;/code&gt; or (better) &lt;code class="verbatim"&gt;rabin2 -z split&lt;/code&gt;&lt;/td&gt;&#10;&lt;/tr&gt;&#10;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-13" class="outline-2"&gt;&#10;&lt;h2 id="headline-13"&gt;&#10;Return Oriented Programming&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-13" class="outline-text-2"&gt;&#10;&lt;div id="outline-container-headline-14" class="outline-3"&gt;&#10;&lt;h3 id="headline-14"&gt;&#10;Finding ROPs&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-14" class="outline-text-3"&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;With ROPGadget:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ROPgadget --binary libc.so.6 --only &lt;span style="color:#e6db74"&gt;&amp;#34;add|jmp&amp;#34;&lt;/span&gt; &amp;gt; output &lt;span style="color:#75715e"&gt;# in case you&amp;#39;re looking for add followed by jump for example, otherwise remove&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat output | grep &lt;span style="color:#e6db74"&gt;&amp;#39;add rdi, 0x10 ; jmp rc&amp;#39;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;With Ropper:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ropper --file ./libc.so.6 --search &lt;span style="color:#e6db74"&gt;&amp;#34;add rdi, 0x10; jmp rcx&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-15" class="outline-2"&gt;&#10;&lt;h2 id="headline-15"&gt;&#10;Misc&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-15" class="outline-text-2"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;PLT (Procedure Linkage Table): a small trampoline in the binary used for calls to external (dynamically linked) functions. Calls in the code go to func@plt; the PLT entry jumps to the real function address found in the GOT (or invokes the dynamic resolver on first call).&lt;/li&gt;&#10;&lt;li&gt;GOT (Global Offset Table): a writable table of addresses in the binary. Each GOT slot holds the runtime address of a library function (or other dynamic symbol). The dynamic linker/loader fills GOT entries the first time a PLT entry is used (or at load time, depending on RELRO).&lt;/li&gt;&#10;&lt;li&gt;They let the loader resolve and redirect calls to shared-library functions without embedding fixed library addresses in the code (works with ASLR and dynamic linking).&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;div id="outline-container-headline-16" class="outline-3"&gt;&#10;&lt;h3 id="headline-16"&gt;&#10;Memory Alignment&#10;&lt;/h3&gt;&#10;&lt;div id="outline-text-headline-16" class="outline-text-3"&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Why it happens: &lt;a href="https://stackoverflow.com/a/381368"&gt;to give data to the CPU/CPU cache in one read instead of two&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-17" class="outline-2"&gt;&#10;&lt;h2 id="headline-17"&gt;&#10;Sources&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-17" class="outline-text-2"&gt;&#10;&lt;p&gt;Disclaimer: Some of the sentences here are a direct copy of the links below, so I don&amp;#39;t own their copyright. Follow the original sources.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://ropemporium.com/guide.html"&gt;https://ropemporium.com/guide.html&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://stackoverflow.com/questions/7060970/substitutes-for-x86-assembly-call-instruction"&gt;https://stackoverflow.com/questions/7060970/substitutes-for-x86-assembly-call-instruction&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://textbook.cs161.org/memory-safety/x86.html#fnref:2"&gt;https://textbook.cs161.org/memory-safety/x86.html#fnref:2&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>How To Run Any CLI Program Over a TCP Socket, or How To Run a CTF?</title><link>https://hossein.naghdbishi.com/quicknotes/run-cli-apps-over-tcp-sockets/</link><pubDate>Fri, 14 Nov 2025 19:08:32 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/run-cli-apps-over-tcp-sockets/</guid><description>&lt;p&gt;&#10;If you want to run a CTF sometimes you&amp;#39;d like to give telnet access to a program to the participants. How do people do that?&lt;/p&gt;&#10;&lt;p&gt;&#10;Well here&amp;#39;s the gist of it. Run the following docker build file using &lt;code class="verbatim"&gt;docker compose build&lt;/code&gt; and you&amp;#39;ll be done. The binary file &lt;code class="verbatim"&gt;chal&lt;/code&gt;, and &lt;code class="verbatim"&gt;flag.txt&lt;/code&gt; should be in the same directory.&lt;/p&gt;&#10;&lt;div class="src src-dockerfile"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-dockerfile" data-lang="dockerfile"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;FROM&lt;/span&gt; &lt;span style="color:#e6db74"&gt;debian:latest&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENV&lt;/span&gt; DEBIAN_FRONTEND noninteractive&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;RUN&lt;/span&gt; apt-get update -y &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; apt-get install -y socat &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; apt-get clean &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;\&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; rm -rf /var/lib/apt/lists/*&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;RUN&lt;/span&gt; useradd -u &lt;span style="color:#ae81ff"&gt;1001&lt;/span&gt; -d /home/user -s /bin/bash user&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;WORKDIR&lt;/span&gt; &lt;span style="color:#e6db74"&gt;/home/user&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;COPY&lt;/span&gt; chall /home/user/&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;COPY&lt;/span&gt; flag.txt /home/user/&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;RUN&lt;/span&gt; chmod &lt;span style="color:#ae81ff"&gt;111&lt;/span&gt; /home/user/chall&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;RUN&lt;/span&gt; chmod &lt;span style="color:#ae81ff"&gt;444&lt;/span&gt; /home/user/flag.txt&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;RUN&lt;/span&gt; chmod -R &lt;span style="color:#ae81ff"&gt;555&lt;/span&gt; /home/user&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;EXPOSE&lt;/span&gt; &lt;span style="color:#e6db74"&gt;1337&lt;/span&gt;&lt;span style="color:#960050;background-color:#1e0010"&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;ENTRYPOINT&lt;/span&gt; [&lt;span style="color:#e6db74"&gt;&amp;#34;socat&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;TCP-LISTEN:1337,reuseaddr,fork,nodelay,su=user&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;EXEC:&amp;#39;timeout 180 ./chall&amp;#39;&amp;#34;&lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;You could change &lt;code class="verbatim"&gt;./chall&lt;/code&gt; part to &lt;code class="verbatim"&gt;yes&lt;/code&gt; for example and see that any client that connects to that socket over telnet sees a lot of &amp;#34;y&amp;#34;s :)&lt;/p&gt;&#10;</description></item><item><title>نظرات خواندنی هکرنیوز درمورد تحریم‌ها بر ایرانیان</title><link>https://hossein.naghdbishi.com/posts/fa/irans-sanctions/</link><pubDate>Mon, 27 Oct 2025 16:59:24 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/irans-sanctions/</guid><description>&lt;p&gt;&#10;یک آقای مهربون ایرانی توی اینترنت &lt;a href="https://news.ycombinator.com/item?id=45343108"&gt;درمورد تجربه‌ی تلخ ما ایرانی‌ها زیر تحریم نوشته&lt;/a&gt; و حسابی دیده شده و صحبت شده درموردش. دوست داشتید ببینید.&lt;/p&gt;&#10;&lt;p&gt;&#10;و خب جالبه که ما صدایی نداریم. یعنی بار اوله دارم می‌بینم درمورد اثر تحریم‌ها بر زندگی ایرانی‌های صحبت بشه توی جامعه‌ی فنی خارجی‌ها.&lt;/p&gt;&#10;&lt;p&gt;&#10;بحث خارجی‌ها درمورد تحریم‌ها جالبه ولی خود مطالب دوستمون برای هر ایرانی خاطره است. با این حال چیزی که از خوندنش یاد گرفتم اینه:&#10;تحریم باید با پاسخ HTTP شماره‌ی ۴۵۱ (منع قانونی) گفته بشه نه ۴۰۳ (منع کلی). عدد ۴۵۱ هم از کتاب بسیار معروف «فارنهایت ۴۵۱» میاد که درمورد کتاب‌سوزی و سانسوره :)&lt;/p&gt;&#10;&lt;p&gt;&#10;نظر نمونه:&lt;/p&gt;&#10;&lt;blockquote style="direction:ltr !important; text-align: left !important;"&gt;&#10;&lt;p&gt;The sad part about living in Iran from a technology perspective is you are often blocked from both sides. Often you have to circumvent the government&amp;#39;s aggressive internal firewall and other times you will have to hide your IP from the service providers.&lt;/p&gt;&#10;&lt;p&gt;&#10;On the bright side, your average Iranian grandma can immediately work as a network engineer given the amount of experience she has with VPN protocols.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;😂😂😂&lt;/p&gt;&#10;</description></item><item><title>How to apply SOCKS5 proxy for docker pull?</title><link>https://hossein.naghdbishi.com/quicknotes/docker-socks5-proxy-howto/</link><pubDate>Sun, 26 Oct 2025 17:06:24 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/docker-socks5-proxy-howto/</guid><description>&lt;p&gt;&#10;First open &lt;code class="verbatim"&gt;/etc/docker/config.json&lt;/code&gt; then add the following data in it:&lt;/p&gt;&#10;&lt;div class="src src-json"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-json" data-lang="json"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;proxies&amp;#34;&lt;/span&gt;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;default&amp;#34;&lt;/span&gt;:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; {&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;httpProxy&amp;#34;&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;socks5h://127.0.0.1:30808&amp;#34;&lt;/span&gt;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;httpsProxy&amp;#34;&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;socks5h://127.0.0.1:30808&amp;#34;&lt;/span&gt;,&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#f92672"&gt;&amp;#34;noProxy&amp;#34;&lt;/span&gt;: &lt;span style="color:#e6db74"&gt;&amp;#34;localhost,127.0.0.1&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;After restarting your docker service using &lt;code class="verbatim"&gt;systemctl restart docker&lt;/code&gt; the change will be done.&lt;/p&gt;&#10;&lt;p&gt;&#10;For &lt;code class="verbatim"&gt;docker build&lt;/code&gt; the story is different and you can use the following command to apply it per command, &lt;code class="verbatim"&gt;docker run&lt;/code&gt; example is included too:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker build --build-arg HTTP_PROXY&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://127.0.0.1:30808&amp;#34;&lt;/span&gt; .&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;docker run --env HTTP_PROXY&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://127.0.0.1:30808&amp;#34;&lt;/span&gt; redis&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;If these methods don&amp;#39;t work, you can also do this:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir -p /etc/systemd/system/docker.service.d&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cat &amp;gt; /etc/systemd/system/docker.service.d/proxy.conf &lt;span style="color:#e6db74"&gt;&amp;lt;&amp;lt;EOF&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;[Service]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;Environment=&amp;#34;HTTP_PROXY=socks5://127.0.0.1:30808&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;Environment=&amp;#34;HTTPS_PROXY=socks5://127.0.0.1:30808&amp;#34;&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt;EOF&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl daemon-reload&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;systemctl restart docker docker.service&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>How to Highlight the Syntax of Code in Anki Flash Cards?</title><link>https://hossein.naghdbishi.com/quicknotes/anki-syntax-highlighting/</link><pubDate>Thu, 18 Sep 2025 12:32:52 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/anki-syntax-highlighting/</guid><description>&lt;p&gt;&#10;Are you looking for a way to highlight the syntax of code in your Anki flash cards? Use &lt;a href="https://prismjs.com"&gt;prismjs.com&lt;/a&gt;&amp;#39;s libraries.&lt;/p&gt;&#10;&lt;p&gt;&#10;Here&amp;#39;s a guide: &lt;a href="https://www.ganesshkumar.com/articles/2023-06-10-enhancing-anki-decks-with-prismjs/"&gt;https://www.ganesshkumar.com/articles/2023-06-10-enhancing-anki-decks-with-prismjs/&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>مستند پایتون، و زنان در فناوری</title><link>https://hossein.naghdbishi.com/posts/fa/python-and-pyladies/</link><pubDate>Wed, 17 Sep 2025 19:26:32 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/python-and-pyladies/</guid><description>&lt;p&gt;&#10;امروز بالاخره وقت کردم و مستند پایتون رو دیدم. مستند جالبیه توضیح میده زبان پایتون چه شکلی به‌وجود اومده و همه‌ی این مسائل.&lt;/p&gt;&#10;&lt;img src="https://esmithy.net/images/pycon-guido.jpg" alt="تصویری از خالق زبان پایتون با یک تی‌شرت که روی آن به انگلیسی نوشته شده است پایتون برای دختران است." title="https://esmithy.net/images/pycon-guido.jpg" style="height:70%;width:90%;"/&gt;&#10;&lt;p&gt;&#10;تصویر برگرفته از &lt;a href="https://esmithy.net/2016/06/01/pycon-2016-day-2/"&gt;اینجا&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&#10;ولی جدا از مسائل تاریخچه‌ای، سه نکته‌ی جالب داشت برام:&lt;/p&gt;&#10;&lt;p&gt;&#10;یکم، خالق پایتون، آقای خیدو فان روسوم در اصل هلندیه و زمانی که زبان رو خلق می‌کنه در هلند زندگی می‌کرده. خودش توی مستند می‌گه که وقتی پایتون رو منتشر کردم ۹۹٪ آدمایی که باهاشون صحبت می‌کردم توی آمریکا بودن پس برای پیشرفت بیشتر مهاجرت کردم به آمریکا.&lt;/p&gt;&#10;&lt;p&gt;&#10;دوم، با اینکه زبان پایتون تا سال ۲۰۱۸ تمامی تصمیماتش توسط شخص آقای خیدو گرفته می‌شده ولی سال ۲۰۱۸ استعفا میده از مقامش و الان تصمیمات زبان پایتون رو یک کمیته‌ی ۵ نفره می‌گیرن که با رای‌گیری انتخاب می‌شن.&lt;/p&gt;&#10;&lt;p&gt;&#10;سوم، یک قسمت مستند که به شخصه برام خیلیییی زیبا بود دیدنش؛ و حکایت از شخصیت بسیار عالی خالق پایتون داره، قسمتی مرتبط با حضور زنان بود. حتما سعی کنید اصلش رو از یوتیوب ببینید (از &lt;a href="https://youtu.be/GfH4QL4VqJ0?t=3329"&gt;این ثانیه&lt;/a&gt;)، یک بخش مستقله و نیازی نیست قبلش رو ببینید. اگر ندیدید، خلاصه‌ی زیر رو بخونید:&lt;/p&gt;&#10;&lt;p&gt;&#10;سازنده‌ی زبان پایتون آقای خیدو فان روسوم، داشته توی گوگل کار می‌کرده (نصف وقتش رو برای توسعه‌ی زبان پایتون میذاشته و نیمی از وقتش رو برای کارهاش در گوگل) که یک روز یک تی‌شرت توی جعبه‌ی پستیش در گوگل می‌گیره که روش نوشته Python is for girls. اون موقع متوجه میشه که چقدر جای زنان توی جامعه‌ی پایتون خالیه و مثلا فقط ۱٪ ارائه‌دهنده‌های کنفرانس پایتون توی سال ۲۰۱۱ خانم بودن. مشکل رو پی می‌گیره و این عدد توی سال ۲۰۱۶ به ۴۰٪ می‌رسه 🚀&lt;/p&gt;&#10;&lt;p&gt;&#10;توی سال ۲۰۱۵ هم آقای خیدو توی ارائه‌اش در کنفرانس پایتون اعلام می‌کنه که هدفش اینه که سال بعدی حداقل دوتا خانم توسعه‌دهندهٔ هسته‌ی پایتون باشن. و حاضره حتی خودش هر هفته وقت بذاره و اون خانم رو آموزش بده. خانمی به اسم ماریتا اونجا بوده و با خودش می‌گه که نه من ارزشش رو ندارم و نمی‌تونم. سال ۲۰۱۶ که دوباره کنفرانس برگزار میشه، خیدو میگه هیچ خانمی اعلام آمادگی نکرده و هنوزم حاضره که اگر خانمی داوطلب بشه آموزش بده. ماریتا داوطلب میشه و یک سال بعدش دسترسی commit به هسته‌ی پایتون می‌گیره 🎉&lt;/p&gt;&#10;&lt;p&gt;&#10;دیدن ویدئو حال و هوایی دیگه داره چون قشنگ میشه استرس و اون احساسات منفی‌ای که باعث می‌شده اون خانم و خانمای دیگه داوطلب نشن برای این کار رو توی چهره‌ی ماریتا خوند.&#10;خلاصه دم آقای خیدو گرم هم بابت زبان پایتون و هم بابت شخصیت بزرگش.&lt;/p&gt;&#10;&lt;p&gt;&#10;و در نهایت هم باید بگم که تازه کشف کردم اسم زبان پایتون از &lt;a href="https://fa.wikipedia.org/wiki/%D9%85%D8%A7%D9%86%D8%AA%DB%8C_%D9%BE%D8%A7%DB%8C%D8%AA%D8%A7%D9%86"&gt;گروه کمدی مانتی‌پایتون&lt;/a&gt; میاد و نه مار پایتون :) ولی بسته‌ی آناکوندا علت نام‌گذاریش اینه که توی حیطه‌ی کلان‌داده است و آناکوندا هم یک مار بزرگه.&lt;/p&gt;&#10;&lt;p&gt;&#10;مطلب زیر هم با اجازه از صاحب متن، &lt;a href="https://t.me/crimson_diary/122"&gt;از این کانال تلگرامی&lt;/a&gt; برداشتم و به نظرم خیلی درسته:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;«چند روز پیش توی محل کار به شوخی صحبت این شد که تیممون (خصوصا بعد از مهاجرت دو تا از دخترهای تیم به خارج از کشور) چقدر مردونه شده و یه مشت انسان مذکر دور هم جمع شدیم و واسه تیم‌سازی حتی می‌تونیم بریم استخر و پارک آبی و خلاصه هی با هم شوخی‌های لوس و بی‌مزه می‌کردیم و هارهار می‌خندیدیم.&#10;.&#10;بعدتر من فکری شدم که چرا دایورسیتی جنسیتی کلا بخش‌های فنی یه دست نیست. نه توی شرکت ما که توی اکثر شرکت‌های Tech اگه دقت کنی، بیشتر نیروهای فنی (و البته مدیریتی) آقا هستند و خانم‌ها توی بخش‌های دیگه مثل HR یا بخش مالی و اداری و … حضور پررنگ‌تری دارن؟&lt;/p&gt;&#10;&lt;p&gt;&#10;این گوشه ذهنتون باشه تا یه چیز دیگه بگم…&lt;/p&gt;&#10;&lt;p&gt;&#10;خیلیا می‌دونن که من قدیم‌ترها سالیان سال توی مدارس تیزهوشان تدریس برنامه‌نویسی می‌کردم و البته توی چند سال اخیر علارغم میل شخصی، فرصت نشده دیگه هیچ‌ مدرسه‌ای برم و صرفا تک و توک پنج‌شنبه جمعه‌ها برای تنوع و حال دل خودم، خصوصی تدریس کردم. تقریبا درصد خیلی زیادی از شاگردهای من پسر بودن. و  به ندرت به دخترها درس می‌دادم. معمولا هم اولیا و خود بچه‌ها از نحوه تدریسم راضی بودن و من هیچ وقت، هیچ جا و به هیچ‌ شکلی، تبلیغی برای کلاسام نداشتم و همگی معرفی خود خونواده ها به همدیگه بوده.&lt;/p&gt;&#10;&lt;p&gt;&#10;منتهی به نظر خودم اقبالی که بین پسرها داشتم، پیش دخترها نداشتم. یعنی از نحوه پیشرفت کلاسم با دخترها کمتر راضی بودم.&#10;این مشکل رو معمولا به این ربط می‌دادم که احتمالا ذهن دخترها آمادگی کمتری برای پیشرفت توی مباحث منطقی و الگوریتمی داره و یحتمل توی جاهای دیگه قوی‌تره. یه درصدی از مشکل رو هم البته کنار گذاشته بودم که چون با پسرها راحت‌تر هستم و البته تجربه خیلی بیشتری دارم، پس خروجی کارم هم در مورد پسرها بهتره و واسه دخترا هنوز قلق کار دستم نیومده!&#10;.&#10;مدت کمیه با یه دختری کلاس دارم. دختر خیلی باهوشی که فرانسه و انگلیسیش عالیه و از جلسه اول هم هوش و استعدادش مشخص بود. منتهی توی این یکی دو ماهی که باهاش کار کرده بودم، هر سری از سختی سوالات و تمرین‌ها شاکی بود و گاهی بود که هی می‌گفت که آٍقا من اینو تقریبا بلد بودم. بعد من می‌گفتم پس چرا هیچ کدی نزدی؟ که معمولا جواب درستی براش نداشت.&#10;امروز پنج‌شنبه تصادفا از روی یکی از draft های کدش فهمیدم که این بشر چیزای خوبی هم می‌نوشته و تا حد خوبی به جواب نزدیک می‌شده و بعد پاکش می‌کرده و همش غر می‌زده که هیچی نمی‌فهمه! و من خیلی شانسی اینو کشف کردم!&lt;/p&gt;&#10;&lt;p&gt;&#10;این اعصابم رو یکم خط‌خطی کرد که چرا باید این مدلی باشه و دختری با این استعداد اعتماد به نفس کافی رو نداشته که اون برنامه نصفه نیمه رو به من نشون بده!&#10;یکم سرچ کردم و یه تدتالک جالبی پیدا کردم که توی پست بعدی خلاصشو و لینکشو می‌ذارم و تقریبا حس می‌کنم تا حد خوبی جواب این مساله همین باشه و برای خودم زیبا و جالب بود.&lt;/p&gt;&#10;&lt;p&gt;&#10;تصویر بالا متعلق به خانومیه به اسم Reshma Saujani که یه خانم آمریکاییه که البته همونطور که از اسمشم مشخصه یکم رگ و ریشه هندی هم داره و زن باکمالاتیه.&#10;کارای زیادی کرده و کله‌اش زیاد باد داشته که حالا ما کاری نداریم. ولی گویا اینم این مشکل شکاف جنیستی رو توی شرکت های فناوری درک کرده و به همین خاطر سال ۲۰۱۲ یه سازمان تاسیس کرده به اسم Girls Who Code. که هدفش این بوده که با آموزش مهارت های برنامه نویسی به دخترا و برگزاری سمینار و کارگاه و کوفت و زهرمار این شکاف رو یکم پر کنه.&lt;/p&gt;&#10;&lt;p&gt;&#10;توی این تدتالکی که ایشون صحبت کرده و من در ادامه لینکشو می‌ذارم، مشخصه طرف مثل من پرحرفه و توی سخنرانیش هم بنده خدا از هر دری یه صحبتی می کنه. ولی یه بخشیش که فوکوس می‌کنه روی این مساله ضعف دخترها توی برنامه نویسی، خیلی جالبه.&lt;/p&gt;&#10;&lt;p&gt;&#10;می گفت که مشکل اصلی اینه که نگاه تربیتی ما به پسرها اینه که باید شجاع بار بیان، ریسک کنن و از اشتباه نترسن. اما برعکس در مورد دخترها نگاه غالب اینه که بی نقص باشن و این ارزش رو براشون بولد می‌کنن.&#10;و به زیبایی می‌گه که خیلیا توی آمریکا نگران کسری بودجه فدرال هستن ولی من نگران کسری شجاعت هستم!&lt;/p&gt;&#10;&lt;p&gt;&#10;و صحبت از یه آزمایش روانشناسی می‌کنه که خیلی سال پیش انجام شده در مورد دانش آموزای کلاس پنجمی که نتیجه‌اش این بوده که دخترهای باهوش خیلی زودتر مساله و چالشی که باهاش درگیر هستن رو رها می‌کنن و هرچی ضریب هوشی‌شون بالاتر، احتمال رها کردن کار هم بیشتره!&#10;برعکس پسرها که کلا حال می‌کنن کار سخت رو باهاش درگیر بشن و ازش انرژی می‌گیرن و تازه وقتی گیر کنن خیلی بیشتر تلاش می‌کنن. چون کلا روحیشون از اول برای ریسک‌پذیری آماده شده برعکس دخترها که به واسطه ارزش بی‌نقص بودن مجبور بودن که همیشه محتاط‌تر باشن.&lt;/p&gt;&#10;&lt;p&gt;&#10;یه جای حرفش هم برای من خیلی جالب بود و شبیه تجربه‌ام توی کلاس خودم بود.&#10;می‌گفت که توی موسسه‌اش یکی از دخترها اومده به معلمش گفته من اصن نمی‌دونم چه دستوری باید بنویسم؟ و معلم هم به صفحش نیگاه کرده و دیده که کلا صفحش خالیه و تصور می کنه که کل زمانی که اون دختر فرصت داشته رو انگار به صفحه خالی زل زده! ولی بعد چندباری دکمه کنترل زد رو می‌زنه و می بینه که دانش آموزش چندین بار برنامه رو نوشته و گاهی خیلی هم به جواب نزدیک شده بوده ولی به خاطر یکی دو تا مشکل کلشو پاک کرده بوده چون جواب دقیق و کامل رو به دست نیاورده بوده. و در واقع ترجیح داده به جای اینکه روندی که توی حل مساله پیش رفته رو نشون بده، هیچ چیزی نشون نده!&lt;/p&gt;&#10;&lt;p&gt;&#10;حتی یه مثال جالبی زده از استاد یه دانشگاه کلمبیا که جاوا تدریس می‌کرده. و می‌گفته که وقتی پسرها توی یه تکلیف به مشکل می‌خوردن، با یه ادبیاتی شبیه اینکه «استاد یه مشکلی توی کد من هست» سوالشونو مطرح می‌کردن. ولی دخترا معمولا اینجوری می‌گفتن که «استاد من یه مشکلی دارم!» و همین هم تفاوت نگاه پسرها و دخترها رو تا یه حدی نشون میده.&lt;/p&gt;&#10;&lt;p&gt;&#10;و خلاصه آخرش زیبا نتیجه گرفته که برای دخترها فقط آموزش برنامه نویسی کافی نیست و باید اون‌قدر شجاعتشون رو زیاد کنیم که از برنامه اشتباه نترسن. از سوال کردن و راهنمایی گرفتن هم نترسن. و اینجوریه که احتمالا به جایگاه واقعیشون توی جامعه نزدیک‌تر بشن.&lt;/p&gt;&#10;&lt;p&gt;&#10;پی‌نوشت:&#10;اگه فرصتشو داشتید فیلم صحبت‌ها رو کامل ببینید چون مثال‌های جالب دیگه ای هم داشت.&#10;.&#10;و در کل اگه دور و برتون توی دوست و آشنا دختر جوونی هست که اول راهه، خیلی خوبه که تشویقش کنید که جسارتشو زیاد کنه. ریسک پذیر باشه و از سوال کردن و نشون دادن مشکلش نترسه. باشد که آینده‌ی بهتری در انتظارش باشه.&lt;/p&gt;&#10;&lt;p&gt;&#10;لینک ویدیوی تدتالک:&#10;&lt;a href="https://www.youtube.com/watch?v=fC9da6eqaqg"&gt;https://www.youtube.com/watch?v=fC9da6eqaqg&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&#10;لینک موسسه‌ای که اون خانومه راه انداخته:&#10;&lt;a href="https://girlswhocode.com/"&gt;https://girlswhocode.com/&lt;/a&gt;&#10;»&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;</description></item><item><title>How to fix SVGs for dark mode?</title><link>https://hossein.naghdbishi.com/quicknotes/svg-in-dark-mode-fix/</link><pubDate>Tue, 16 Sep 2025 18:30:06 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/svg-in-dark-mode-fix/</guid><description>&lt;p&gt;&#10;This one&amp;#39;s easy. I&amp;#39;m assuming that SVG is imported using an img tag.&lt;/p&gt;&#10;&lt;p&gt;&#10;Open your SVG file in beloved VIM or Emacs&amp;#39;s evil mode.&#10;Do this:&lt;/p&gt;&#10;&lt;div class="src src-vim"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-vim" data-lang="vim"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;:%&lt;span style="color:#a6e22e"&gt;s&lt;/span&gt;&lt;span style="color:#e6db74"&gt;/stroke=&amp;#34;rgb(0,0,0)&amp;#34;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;stroke&lt;/span&gt;=&lt;span style="color:#e6db74"&gt;&amp;#34;currentColor&amp;#34;&lt;/span&gt;/&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;:%&lt;span style="color:#a6e22e"&gt;s&lt;/span&gt;&lt;span style="color:#e6db74"&gt;/fill=&amp;#34;rgb(0,0,0)&amp;#34;/&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;fill&lt;/span&gt;=&lt;span style="color:#e6db74"&gt;&amp;#34;currentColor&amp;#34;&lt;/span&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;Or you could just use sed. Anyway, then add&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;style=&amp;#34;background: #ffffff; background-color: light-dark(#ffffff, var(--ge-dark-color, #000000)); color-scheme: light dark;&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;to the top of your SVG file in your svg tag, here&amp;#39;s a diff from my own blog&amp;#39;s commits:&lt;/p&gt;&#10;&lt;div class="src src-svg"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-svg" data-lang="svg"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;-&lt;span style="color:#f92672"&gt;&amp;lt;svg&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;version=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;1.2&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;width=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;44.92mm&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;height=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;130.98mm&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;viewBox=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;0 0 4492 13098&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preserveAspectRatio=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;xMidYMid&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;fill-rule=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;evenodd&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;stroke-width=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;28.222&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;stroke-linejoin=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;round&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://www.w3.org/2000/svg&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:ooo=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://xml.openoffice.org/svg/export&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:xlink=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://www.w3.org/1999/xlink&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:presentation=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://sun.com/xmlns/staroffice/presentation&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:smil=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://www.w3.org/2001/SMIL20/&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:anim=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;urn:oasis:names:tc:opendocument:xmlns:animation:1.0&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:svg=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xml:space=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;preserve&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;+&lt;span style="color:#f92672"&gt;&amp;lt;svg&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;style=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;background: #ffffff; background-color: light-dark(#ffffff, var(--ge-dark-color, #000000)); color-scheme: light dark;&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;version=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;1.2&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;width=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;44.92mm&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;height=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;130.98mm&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;viewBox=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;0 0 4492 13098&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;preserveAspectRatio=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;xMidYMid&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;fill-rule=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;evenodd&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;stroke-width=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;28.222&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;stroke-linejoin=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;round&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://www.w3.org/2000/svg&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:ooo=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://xml.openoffice.org/svg/export&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:xlink=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://www.w3.org/1999/xlink&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:presentation=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://sun.com/xmlns/staroffice/presentation&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:smil=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;http://www.w3.org/2001/SMIL20/&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:anim=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;urn:oasis:names:tc:opendocument:xmlns:animation:1.0&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xmlns:svg=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0&amp;#34;&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;xml:space=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;preserve&amp;#34;&lt;/span&gt;&lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>باور</title><link>https://hossein.naghdbishi.com/posts/fa/believe/</link><pubDate>Thu, 04 Sep 2025 14:48:09 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/believe/</guid><description>&#10;&lt;p&gt;&#10;قسمت اول، یادداشت‌برداری بسیار نامرتب من از &lt;a href="https://en.wikipedia.org/wiki/The_Will_to_Believe"&gt;متن آقای ویلیام جیمز درمورد باوره&lt;/a&gt; و قسمت دوم از مقالهٔ &lt;a href="https://en.wikisource.org/wiki/The_Will_to_Believe_and_Other_Essays_in_Popular_Philosophy/Is_Life_Worth_Living"&gt;ارزش زندگی&lt;/a&gt;ه. برای قسمت دوم &lt;a href="https://reasonandmeaning.com/2015/10/30/william-james-faith-and-the-meaning-of-life"&gt;این متن&lt;/a&gt; خلاصه‌ی زیباتریه.&lt;/p&gt;&#10;&lt;div id="outline-container-headline-1" class="outline-2"&gt;&#10;&lt;h2 id="headline-1"&gt;&#10;باور بدون مدرک&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;نمیشه با اراده باور کرد (مثلا که ابراهام لینکلن واقعی نیست یا درد نداریم وقتی چاقو خوردیم)&lt;/li&gt;&#10;&lt;li&gt;با اینکه به بعضی چیزا باور داریم ولی نمیدونیم چرا. احتمالا تاثیر محیط اطرافه. مثلا به ملکول باور داریم چون پرستیژ باورداشتن بهش خوبه. اکثر اوقات باورمون به باور داشتن اطرافیان وابسته است.&lt;/li&gt;&#10;&lt;li&gt;حتی اینکه یک حقیقت وجود داره رو هم نمیشه مطمئن بود (Pyrrhonistic) و برای این بهش باور داریم که جامعه ازمون همایت می‌کنه.&lt;/li&gt;&#10;&lt;li&gt;پس ما به چیزهایی باور نداریم که به کارمون نمیاد. مثلا برای یک نفر مسیحیت به دردش نمیخوره پس بهش باور نداره. اگر یکی بیاد مثلا بگه تله‌پاتی هست ممکنه دانشمندها مسخره‌اش کنن ولی اگر بیاد این رو همراه با یک کاربرد به دانشمندها بگه یا کاری که بتونن باهاش بکنن دانشمندا بهش توجه می‌کنن.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;نتیجه‌گیری «بخش‌های غیرانتلکتی ما، بر باورهای ما اثرگذارند»&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;بعضی از تمایلات و کشش‌ها به سمت بعضی باورها فقط بعد از یک باور رخ میدن مثلا شرط پاسکال اینطوریه که برای یک مسیحی باعث تقویت ایمان میتونه باشه و بسیار باورپذیر ولی برای بقیه نه.&lt;/li&gt;&#10;&lt;li&gt;برای یک شواهدگرا مهم نیست که یک منشا ایده اشتباه بوده یا درست، ‌مهم اینه که آیا مشاهدات بعدیش تاییدش می‌کنن یا نه و ادامه میده به درست بودن اون ایده یا نه. اگر ادامه داد پس برای اون شخص درسته.&lt;/li&gt;&#10;&lt;li&gt;دو شیوه‌ی فکر کردن وجود داره:‌ یکی اینکه باید حقیقت رو پیدا کنیم، یکی اینکه باید از خطا بپرهیزیم. توی عقیده‌ی کسایی که با مسیحیت مخالفن میگن که باید حتما دلایل کافی داشت تا باور کرد و تا مدارک کافی نباشه، باور کردن اشتباهه. این طرز تفکر باعث میشه که انسان به کمتر چیزی باور داشته باشه. ولی اونایی که از خطا پرهیز می‌کنن میتونن حدس‌های زیادی درمورد حقیقت بزنن و باور داشته باشن، و باورهاشون رو در مسیر اگر با مدرک اشتباه بودن مواجه شدن عوض کنن.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;در واقع نویسنده بر این باوره که بهتره از اشتباه نترسید. مثل ژنرالی نباشید که به سربازهاش میگه که نجنگید که زخمی نشید. بهتره رفت و باور داشت اگر غلط بود ضربه دید و بعد باور رو عوض کرد.&#10;هر زمان که فرق بین از دست دادن حقیقت و به‌دست آوردنش مهم نباشه، میتونیم تصمیم بگیریم که تا زمان به دست اوردن مدرک قطعی کلا بیخیال حقیقت شیم تا اقلا فریب نخوریم، توی کار یک قاضی معمولا این شکلیه و تصمیم‌نگرفتن میتونه یک گزینه باشه، یا درمورد روابط انسانی اینکه یک گزینه رو انتخاب کنیم ولی مدام حواسمون به مدارک له و علیهش هم باشه.&#10;علم دقیقا اینطوریه و همیشه هر دو جانب رو به دقت نگاه می‌کنه و بیشتر علاقه‌مند به اینه که بشه به صورت تکنیکی چیزی رو تایید کرد. و قدرتش هم از همین میاد.&lt;/p&gt;&#10;&lt;p&gt;&#10;زمانی که مجبور به انتخاب نیستیم، بهترین شیوه همین شکاک بودنه تا اینکه فریب نخوریم. اما سوال اینه که در زمان‌هایی که باید انتخاب کنیم، آیا عاقلانه است که بی‌عمل باشیم و تا زمانی که مدارک پیدا نشه دست به انتخاب نزنیم؟&lt;/p&gt;&#10;&lt;p&gt;&#10;درمورد سوال‌های اخلاقی، زمانی برای یافتن پاسخ با مدرک وجود نداره، چون علم می‌تونه به ما بگه که «چه چیزی وجود دارد» ولی پاسخ اینکه چه چیزی ارزشمندتره رو نداره. در این موقع ما باید اونطور که پاسکال می‌گه به قلبمون گوش کنیم. (پاسکال: La coeur a ses raisons que la raison ne cannait pas)&#10;اینکه آیا باید باورهای اخلاقی داشته باشیم یا نه با اراده‌ی ما مشخص می‌شه. آیا ترجیحات اخلاقی درستن یا غلط، آیا خوب و بد برای ما فقط تعریف میشه درحالی که در واقعیت امور بی‌تفاوتن؟ تنها با مغز نمیشه تصمیم گرفت. اگر قلب شما نخواد به دنیای اخلاقی باور کنه مغزتون هم نخواهد پذیرفت. مشابه اینکه در زمینه‌ی دانش میشه شکاک بود، در زمینه‌ی اخلاق هم میشه همینطور بود.&lt;/p&gt;&#10;&lt;p&gt;&#10;حالا اگر روابط انسانی رو در نظر بگیریم، مثلا این سوال که آیا از من خوشت میاد یا نه، علاقه هیچ وقت تحقق پیدا نمی‌کنه مگر اینکه حدی از اعتماد رو نشون بدی، (رویکرد اینکه اول باور می‌کنم و سعی می‌کنم با دیدن شواهد بعدی گول نخورم در مقابل رویکرد اینکه اول مدرک بیاد تا باور کنم) اگر منتظر مدارک بمونی عمل نخواهی کرد و علاقه‌ای هم شکل نخواهد گرفت. بنای اکثر گروه‌های اجتماعی هم همین شکلیه. مثلا اگر یک گروه باور داشته باشن که انقلاب میشه میشه و اگر فکر کنن که با بیان انقلاب قطعا سرکوب میشن و صدمه می‌بینن سمت این کار نمیرن.&#10;بنا براین مواردی وجود دارند که «یک حقیقت نمیتونه واقعیت پیدا کنه مگر اینکه از پیش باوری به تحققش وجود داشته باشه» در این حالات «باور به یک حقیقت اون حقیقت رو محقق می‌کنه»&#10;بنابراین برای حقایقی که وابسته به کنش‌های شخصی ماست، ایمان مبتنی بر خواستن، کاملا مجاز و احتمالا بخش جدانشدنی‌ای از زندگیه.&#10;قاعده‌ی فکر کردنی که مرا از باور به برخی حقایقی که ممکن است درست باشند باز بدارد، قاعده‌ی بدی است.&#10;ما حق داریم که با ریسک خودمان، به فرضیاتی که برای ما به‌اندازه‌ی کافی «زنده» و جذاب هستند تا اراده‌ی ما را وسوسه‌کنند، باور داشته باشیم.&#10;اگر ما مطلق‌گرا بودیم(مدعی بودیم که میدانیم و زمانی که قطعا حقیقت را پیدا کرده‌ایم متوجه می‌شویم)، مشکلی نبود که صبر کنیم تا مدارک کافی پیدا شود ولی از آنجایی که مدرک‌گرا هستیم، اگر تعلل کنیم، همانقدری از دست می‌دهیم که اگر باور نکنیم.&lt;/p&gt;&#10;&lt;blockquote style="direction:ltr !important; text-align: left !important;"&gt;&#10;&lt;p&gt;What do you think of yourself? What do you think of the world?… These are questions with which all must deal as it seems good to them. They are riddles of the Sphinx, and in some way or other we must deal with them…. In all important transactions of life we have to take a leap in the dark…. If we decide to leave the riddles unanswered, that is a choice; if we waver in our answer, that, too, is a choice: but whatever choice we make, we make it at our peril. If a man chooses to turn his back altogether on God and the future, no one can prevent him; no one can show beyond reasonable doubt that he is mistaken. If a man thinks otherwise and acts as he thinks, I do not see that any one can prove that he is mistaken. Each must act as he thinks best; and if he is wrong, so much the worse for him. We stand on a mountain pass in the midst of whirling snow and blinding mist, through which we get glimpses now and then of paths which may be deceptive. If we stand still we shall be frozen to death. If we take the wrong road we shall be dashed to pieces. We do not certainly know whether there is any right one. What must we do? &amp;#39;Be strong and of a good courage.&amp;#39; Act for the best, hope for the best, and take what comes…. If death ends all, we cannot meet death better.&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;div id="outline-container-headline-2" class="outline-2"&gt;&#10;&lt;h2 id="headline-2"&gt;&#10;آیا زندگی ارزش زیستن داره؟&#10;&lt;/h2&gt;&#10;&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;&#10;&lt;p&gt;بعضیا دیدگاهشون اونقدر خوش‌بینانه است که زندگیشون جز شادی چیزی نداره، اگر زندگی اینطور باشه سوال اینکه آیا زندگی ارزش زیستن داره بی‌‌معنیه چون خود زندگی به اون اثبات ارزش زیستن. مثلا شعر والت ویتمن اینطوریه سبک دیدگاهش.&#10;حتی اگر چنین دیدگاهی داریم خوبه که زندگی افراد پرغم رو تصور کنیم چون ساخت ما با اون‌ها یکسانه.&lt;/p&gt;&#10;&lt;p&gt;&#10;حالا بیاید انسانی رو تصور کنیم که انقدر بداقبال بوده و پر رنج که جز فکر اینکه هر وقت خواست میتونه زندگی رو پایان بده چیزی تسکینش نمیده، چه چیزی میشه به این شخص گفت تا دوباره بار زندگی رو به دوش بکشه؟&#10;از دید اشخاص دیندار معتقد به قوانین آسونه: باید بگین خدا خودکشی رو منع کرده.&#10;از دید اشخاص دیگه چی؟‌ ویلیام جیمز ادعا می‌کنه که لازمه که باور داشته باشیم (بدون هیچ مدرک و شاهدی) که این اعمال ما در دنیا، اثراتی تا ابد ماندگار دارن و به نتایجی ابدی ختم می‌شن، در این حالت می‌شه در بدترین شرایط هم زیست و خوشحال بود، چون مادامی که هدف نیک بودن، نیکی کردن و زیستن اخلاقی در این دنیا تأمین بشه، زندگی ارزشمند خواهد بود.&lt;/p&gt;&#10;&lt;blockquote style="direction:ltr !important; text-align: left !important;"&gt;&#10;&lt;p&gt;Not a victory is gained, not a deed of faithfulness or courage is done, except upon a maybe; not a service, not a sally of generosity, not a scientific exploration or experiment or text-book, that may not be a mistake. It is only by risking our persons from one hour to another that we live at all. And often enough our faith beforehand in an uncertified result is the only thing that makes the result come true.&#10;Suppose, for example, that I am climbing in the Alps, and have had the ill-luck to work myself into a position from which the only escape is by a terrible leap. Being without similar experience, I have no evidence of my ability to perform it successfully; but hope and confidence in myself make me sure I shall not miss my aim, and nerve my feet to execute what without those subjective emotions would perhaps have been impossible. But suppose that, on the contrary, the emotions of fear and mistrust preponderate; or suppose that, having just read the Ethics of Belief, I feel it would be sinful to act upon an assumption unverified by previous experience,—why, then I shall hesitate so long that at last, exhausted and trembling, and launching myself in a moment of despair, I miss my foothold and roll into the abyss. In this case (and it is one of an immense class) the part of wisdom clearly is to believe what one desires; for the belief is one of the indispensable preliminary conditions of the realization of its object. There are then cases where faith creates its own verification. Believe, and you shall be right, for you shall save yourself; doubt, and you shall again be right, for you shall perish. The only difference is that to believe is greatly to your advantage.&lt;/p&gt;&#10;&lt;p&gt;&#10;For here possibilities, not finished facts, are the realities with which we have actively to deal; and to quote my friend William Salter, of the Philadelphia Ethical Society, &amp;#34;as the essence of courage is to stake one&amp;#39;s life on a possibility, so the essence of faith is to believe that the possibility exists.&amp;#34;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;blockquote style="direction:ltr !important; text-align: left !important;"&gt;&#10;&lt;p&gt;These, then, are my last words to you: Be not afraid of life. Believe that life is worth living, and your belief will help create the fact. The &amp;#39;scientific proof&amp;#39; that you are right may not be clear before the day of judgment (or some stage of being which that expression may serve to symbolize) is reached. But the faithful fighters of this hour, or the beings that then and there will represent them, may then turn to the faint-hearted, who here decline to go on, with words like those with which Henry IV. greeted the tardy Crillon after a great victory had been gained: &amp;#34;Hang yourself, brave Crillon! we fought at Arques, and you were not there.&amp;#34;&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>توصیه‌هایی درمورد انتخاب رشته</title><link>https://hossein.naghdbishi.com/posts/fa/choosing-a-major/</link><pubDate>Thu, 04 Sep 2025 14:38:09 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/choosing-a-major/</guid><description>&lt;img src="https://hossein.naghdbishi.com/images/jobvision-uni-comparison.jpg" alt="نمودار جاب‌ویژن درباره‌ی میزان رضایت از دانشگاه و سطح حقوق دانشجویان هر دانشگاه" title="/images/jobvision-uni-comparison.jpg"/&gt;&#10;&lt;p&gt;&#10;در باب انتخاب رشته:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;سایت جاب‌ویژن با همکاری گزینه دو &lt;a href="https://jobvision.ir/reports/education-field-selection"&gt;گزارشی&lt;/a&gt; گذاشته از رتبه‌های قبولی، رضایت از دانشگاه و درآمدها، حتما ببینید. مثلا عکس بالا از این گزارش اومده. کلی نمودار جالب قابل تأمل دیگه هم داره.&lt;/li&gt;&#10;&lt;li&gt;سایت «مرکز آمار کار دولت آمریکا» گزارش جامعی داره. توش درمورد پیش‌بینی رشد ۱۰ ساله رشد یک شغل و درآمد میانه‌اش در آمریکا نوشته. مثلا درآمد، پیش‌بینی رشد و … شغلای مرتبط با کامپیوتر &lt;a href="https://www.bls.gov/ooh/Computer-and-Information-Technology/"&gt;اینجا&lt;/a&gt;ست. که در کل دید خوبی هم می‌ده، مثلا مشاغل مرتبط با وب درآمدشون کمتره نسبت به امنیت‌کارها. و پولدارترین‌ها توی آمریکا پزشکن، حتی از خلبان‌ها هم بیشتر در میارن :)&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://t.me/Sharif_prm/15526"&gt;ویژه‌نامه شریف&lt;/a&gt; درمورد رشته‌های مختلف این دانشگاه&lt;/li&gt;&#10;&lt;li&gt;یک سری &lt;a href="https://t.me/Qotbnama_Community/21"&gt;کانال تصادفی تلگرامی&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;</description></item><item><title>اعمال تحریم بر دانشگاه شریف توسط گیت‌هاب</title><link>https://hossein.naghdbishi.com/posts/fa/github-sharif-sanctions/</link><pubDate>Thu, 04 Sep 2025 14:36:09 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/github-sharif-sanctions/</guid><description>&lt;img src="https://hossein.naghdbishi.com/images/sharif-github-sanctions.jpg" alt="تصویری از محیط مرورگر فایرفاکس که در آن گیت‌هاب ایمیل منتهی به @sharif.edu را نمی‌پذیرد" title="/images/sharif-github-sanctions.jpg"/&gt;&#10;&lt;p&gt;&#10;خبر آنکه:&#10;گیت‌هاب ایمیل شریف نمی‌پذیره و نمی‌شه دیگه باهاش حساب دانشجویی ساخت.&lt;/p&gt;&#10;&lt;p&gt;&#10;مدیر عامل گیت‌هاب اخیرا استعفا کرده و الان کنترل گیت‌هاب خیلی بیشتر از قبل دست مایکروسافته. اینه که اگر تا الان به فکر نبودید، بد نیست به جایگزین‌های گیت‌هاب فکر کنید. کلا مخربه که کد نرم‌افزار آزاد بیفته دست یک سکو که خودش آزاد نیست.&lt;/p&gt;&#10;&lt;p&gt;&#10;مثلا &lt;a href="https://codeberg.org"&gt;codeberg.org&lt;/a&gt; جای خوبیه یا &lt;a href="https://framagit.org"&gt;framagit.org&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&#10;مهاجرت کنید 🚀&lt;/p&gt;&#10;</description></item><item><title>حادثهٔ گویآنیا</title><link>https://hossein.naghdbishi.com/posts/fa/goiania-accident/</link><pubDate>Thu, 04 Sep 2025 14:33:09 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/goiania-accident/</guid><description>&lt;img src="https://imgs.xkcd.com/comics/cesium.png" alt="یک کمیک xkcd درمورد میگوهای آلوده به مواد رادیواکتیو" title="https://imgs.xkcd.com/comics/cesium.png"/&gt;&#10;&lt;p&gt;&#10;توی برزیل، سال ۱۹۸۴، یک درمانگاه پرتودرمانی منتقل می‌شه به یک مکان جدید. به خاطر دعوای حقوقی درمانگاه و مالک زمین، وسایل پزشکی، توی ساختمون قدیمی رها میشن به امان خدا.&#10;مسئولین درمانگاه میدونستن باید وسایل رادیواکتیو رو خارج کنن، ولی به دستور دادگاه، پلیس نمیذاشته و یک نگهبان هم گذاشتن جلوی در که نه چیزی وارد شه و نه چیزی خارج.&lt;/p&gt;&#10;&lt;p&gt;&#10;خلاصه نزدیک‌های پاییز، نگهبان نرفت نگهبانی بده و موند خونه. دوتا دزد محترم هم رفتن از درمانگاه پرتودرمانی دزدی کردن. وسایل رو گذاشتن توی فرغون! و بردن خونه‌شون تا تیکه‌تیکه کنن و بفروشن.&lt;/p&gt;&#10;&lt;p&gt;&#10;بعد هم که وسایل رو تیکه تیکه کردن دیدن عه چه ماده‌های قشنگی، پودرای خوشگل که از خودشون نور آبی ساطع می‌کنن.&#10;اینا رو هی مالیدن به خودشون و اینور اونور، که آدمای مختلفی مریض شدن. موقع اعلام شدن ماجرا، همه ترسیدن و دولت برزیل مجبور شد جمعا ۱۱۲,۰۰۰ نفر رو معاینه کنه، که ۲۴۹ نفرشون هم به مواد رادیواکتیو آلوده بودن.&lt;/p&gt;&#10;&lt;p&gt;&#10;نتیجه اخلاقی: برای انتخاب محل دزدی هم شیمی دبیرستان لازمه.&lt;/p&gt;&#10;&lt;p&gt;&#10;&lt;a href="https://explainxkcd.com/3131/"&gt;توضیح تصویر&lt;/a&gt;: اخیرا یک سری میگوی یخ‌زده توی اندونزی هم آلوده به مواد رادیواکتیو شدن و FDA درخواست جمع‌آوری‌شون رو داده.&lt;/p&gt;&#10;&lt;p&gt;&#10;&lt;a href="https://en.wikipedia.org/wiki/Goi%C3%A2nia_accident"&gt;منبع&lt;/a&gt;&lt;/p&gt;&#10;</description></item><item><title>آزمون دانش شما درمورد رایانامه</title><link>https://hossein.naghdbishi.com/posts/fa/email-quiz/</link><pubDate>Thu, 04 Sep 2025 14:32:09 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/fa/email-quiz/</guid><description>&lt;img src="https://hossein.naghdbishi.com/images/email-wtf.jpg" alt="یک کمیک xkcd درمورد میگوهای آلوده به مواد رادیواکتیو" title="/images/email-wtf.jpg" style="width:35%;"/&gt;&#10;&lt;p&gt;&#10;اگر میخواید دانشتون رو درمورد RFCهای رایانامه (ایمیل) بسنجید بشتابید.&lt;/p&gt;&#10;&lt;p&gt;&#10;سایت &lt;a href="https://e-mail.wtf"&gt;e-mail.wtf&lt;/a&gt; یک بازیه که ازتون می‌خواد مشخص کنید چه آدرس ایمیلی معتبره، و چه آدرسی نه. آخرشم بهتون امتیاز میده.&lt;/p&gt;&#10;&lt;p&gt;&#10;دلم نمیاد مثال بزنم، پس برید و خودتون رو محک بزنید 😇&lt;/p&gt;&#10;&lt;p&gt;&#10;خودم ۱۱ از ۲۱ شدم، ‌شما چطور؟&lt;/p&gt;&#10;</description></item><item><title>How to tunnel all your outgoing traffic using WireGuard, but keep your connection to your VPS</title><link>https://hossein.naghdbishi.com/quicknotes/vps-traffic-tunnel/</link><pubDate>Thu, 04 Sep 2025 12:58:17 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/vps-traffic-tunnel/</guid><description>&lt;p&gt;&#10;Add this to your wireguard config:&lt;/p&gt;&#10;&lt;div class="src src-text"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-text" data-lang="text"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;[Interface]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;# under interface add:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PostUp = /etc/wireguard/post-up.sh&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PostDown = /etc/wireguard/post-down.sh&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;Fill in the variables and use these AI-written bash scripts, post up:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# This script is executed by WireGuard&amp;#39;s PostUp hook.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# It creates a new routing table and rules to ensure that traffic&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# originating from the server&amp;#39;s public IP is routed through the&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# public gateway, preserving new and established connections.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Configuration - PLEASE FILL IN THESE VALUES&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Your server&amp;#39;s public IPv4 address.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: PUBLIC_IPV4=&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PUBLIC_IPV4&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Your server&amp;#39;s public IPv6 address (optional, leave blank if none).&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: PUBLIC_IPV6=&amp;#34;2001:db8::1&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PUBLIC_IPV6&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Your server&amp;#39;s public-facing network interface.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Find with: ip a | grep &amp;#39;state UP&amp;#39;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: PUBLIC_INTERFACE=&amp;#34;eth0&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PUBLIC_INTERFACE&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;eth0&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# The gateway for your public IPv4 address.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Find with: ip route | grep default&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: GATEWAY_IPV4=&amp;#34;198.51.100.1&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GATEWAY_IPV4&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# The gateway for your public IPv6 address (optional, leave blank if none).&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Find with: ip -6 route | grep default&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: GATEWAY_IPV6=&amp;#34;2001:db8::ffff&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;GATEWAY_IPV6&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# --- Advanced Configuration ---&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# A unique ID for the custom routing table. Choose a number between 1 and 252&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# that is not already in use in /etc/iproute2/rt_tables.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE_ID&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;52&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE_NAME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;keep_connections&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# The priority for the routing rule. Lower numbers are checked first.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PRIORITY&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1000&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Script Logic - DO NOT EDIT BELOW THIS LINE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;set -e &lt;span style="color:#75715e"&gt;# Exit immediately if a command exits with a non-zero status.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;--- [WG PostUp] Maintaining public connectivity ---&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;mkdir -p /etc/iproute2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;touch /etc/iproute2/rt_tables&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Add a named routing table for clarity. This makes it easier to identify its purpose.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; ! grep -q &lt;span style="color:#e6db74"&gt;&amp;#34;^\s*&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;\s*&lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;\s*&lt;/span&gt;$&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; /etc/iproute2/rt_tables; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Adding routing table &amp;#39;&lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#39; to /etc/iproute2/rt_tables&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# Using tee with sudo to ensure we have permission to write to the file&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt; &lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; | sudo tee -a /etc/iproute2/rt_tables &amp;gt; /dev/null&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# --- Add routes to the custom table ---&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# These routes define how to send traffic out through the public interface.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# IPv4&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$GATEWAY_IPV4&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Adding IPv4 default route to table &amp;#39;&lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#39;...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip route add default via &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$GATEWAY_IPV4&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; dev &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_INTERFACE&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Skipping IPv4 route configuration (address or gateway not set).&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# IPv6&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;amp;&amp;amp;&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$GATEWAY_IPV6&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Adding IPv6 default route to table &amp;#39;&lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#39;...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip -6 route add default via &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$GATEWAY_IPV6&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; dev &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_INTERFACE&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Skipping IPv6 route configuration (address or gateway not set).&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# --- Add policy routing rules ---&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# These rules tell the kernel to use our custom table for any traffic coming *from* the public IP.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# IPv4&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; ! ip rule list | grep -q &lt;span style="color:#e6db74"&gt;&amp;#34;from &lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt; lookup &lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Adding IPv4 policy rule...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip rule add from &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt;/32&amp;#34;&lt;/span&gt; table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; priority &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PRIORITY&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;IPv4 policy rule already exists.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# IPv6&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; ! ip -6 rule list | grep -q &lt;span style="color:#e6db74"&gt;&amp;#34;from &lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt; lookup &lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Adding IPv6 policy rule...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip -6 rule add from &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;/128&amp;#34;&lt;/span&gt; table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; priority &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PRIORITY&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;else&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;IPv6 policy rule already exists.&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;--- [WG PostUp] Script finished successfully ---&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;&lt;p&gt;&#10;post down:&lt;/p&gt;&#10;&lt;div class="src src-bash"&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#!/bin/bash&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;#&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# This script is executed by WireGuard&amp;#39;s PostDown hook.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# It cleans up the rules and routes created by the PostUp script&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# to restore the server&amp;#39;s default routing behavior.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Configuration - MUST MATCH YOUR PostUp SCRIPT&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Your server&amp;#39;s public IPv4 address.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: PUBLIC_IPV4=&amp;#34;198.51.100.5&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PUBLIC_IPV4&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Your server&amp;#39;s public IPv6 address (optional, leave blank if none).&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Example: PUBLIC_IPV6=&amp;#34;2001:db8::1&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PUBLIC_IPV6&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# --- Advanced Configuration ---&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE_ID&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;52&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;TABLE_NAME&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;keep_connections&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;PRIORITY&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1000&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Script Logic - DO NOT EDIT BELOW THIS LINE&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# ==============================================================================&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;set -e &lt;span style="color:#75715e"&gt;# Exit immediately if a command exits with a non-zero status.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;--- [WG PreDown] Cleaning up routing rules ---&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# --- Remove policy routing rules ---&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# IPv4&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;# Use a loop to be safe, in case a rule was added multiple times by mistake.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;while&lt;/span&gt; ip rule list | grep -q &lt;span style="color:#e6db74"&gt;&amp;#34;from &lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt;.*lookup &lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Removing IPv4 policy rule...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip rule del from &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV4&lt;span style="color:#e6db74"&gt;/32&amp;#34;&lt;/span&gt; table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; priority &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PRIORITY&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# IPv6&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;while&lt;/span&gt; ip -6 rule list | grep -q &lt;span style="color:#e6db74"&gt;&amp;#34;from &lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;.*lookup &lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;do&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; echo &lt;span style="color:#e6db74"&gt;&amp;#34;Removing IPv6 policy rule...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip -6 rule del from &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;/128&amp;#34;&lt;/span&gt; table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; priority &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PRIORITY&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;done&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# --- Flush the custom routing table ---&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# This removes the default routes we added to our custom table.&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;Flushing routing table &amp;#39;&lt;/span&gt;$TABLE_NAME&lt;span style="color:#e6db74"&gt;&amp;#39;...&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;ip route flush table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; &lt;span style="color:#f92672"&gt;[[&lt;/span&gt; -n &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$PUBLIC_IPV6&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt; &lt;span style="color:#f92672"&gt;]]&lt;/span&gt;; &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; ip -6 route flush table &lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;$TABLE_ID&lt;span style="color:#e6db74"&gt;&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;fi&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;echo &lt;span style="color:#e6db74"&gt;&amp;#34;--- [WG PostDown] Script finished successfully ---&amp;#34;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;/div&gt;&#10;</description></item><item><title>How to migrate torrent files from one qBittorrent cilent to another?</title><link>https://hossein.naghdbishi.com/quicknotes/qbittorrent-migration/</link><pubDate>Sat, 16 Aug 2025 11:13:49 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/quicknotes/qbittorrent-migration/</guid><description>&lt;p&gt;&#10;I have had this problem where I reinstalled my OS and qBittorrent forgot all about my downloaded torrents. I was facing a brand-new, blank page in qBIttorrent. I could not seed the files I already had. Here&amp;#39;s how I solved it.&lt;/p&gt;&#10;&lt;p&gt;&#10;For me, all files downloaded from torrent go inside a single directory, without any change in their name (except some that have naming conflicts, for those that have conflicting names I create a separate folder and put both of them in it, then I&amp;#39;ll have to change their address manually and my automation doesn&amp;#39;t work). So here&amp;#39;s how I do migration for those that are not exceptions:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;Redownload all the .torrent files I have the files for.&lt;/li&gt;&#10;&lt;li&gt;Put all of them in a single directory. Now this directory contains all the .torrent files my qBittorrent client needs.&lt;/li&gt;&#10;&lt;li&gt;Press (Alt + O) inside qBittorrent (or go to Tools -&amp;gt; Preferences inside it).&lt;/li&gt;&#10;&lt;li&gt;From the left pane choose Downloads.&lt;/li&gt;&#10;&lt;li&gt;Under &amp;#34;Saving Management&amp;#34; change the &amp;#34;Default Save Path&amp;#34; to the folder that contains all your downloaded files in a single directory. This is where the actual downloaded files are, not where the .torrent files are. These are two separate directories.&lt;/li&gt;&#10;&lt;li&gt;Now go a little below, look for &amp;#34;Automatically add torrents from:&amp;#34;&lt;/li&gt;&#10;&lt;li&gt;Press &amp;#34;Add&amp;#34; and add your folder that has &lt;em&gt;all your .torrent files&lt;/em&gt; in it, press &amp;#34;OK&amp;#34;, now all your torrents are automatically added to qBittorrent without any hassle, directing it to look at Default Save Path for the files.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;If all goes well, your qBittorrent will realize that files are already downloaded, if it doesn&amp;#39;t, then you&amp;#39;ve probably made a mistake, or have changed the name of the folders/files.&lt;/p&gt;&#10;&lt;p&gt;&#10;For my method to work, or for any torrent client to realize you&amp;#39;re pointing to an already downloaded file, it&amp;#39;s really important not to change the file/folder names at all. The name in the torrent file and the folders/files on your PC should match. If you have changed the names or have made an arbitrary folder structure, you need to ask AI to write you a python script to reverse your directory structure (for example move everything from A B C D … Z folders back to a single directory) or if you&amp;#39;ve really changed everything, to extract the folder/file names from torrent files and automatically revert them back to normal.&lt;/p&gt;&#10;</description></item><item><title>How to Share a Secret: Summary of Shamir's Paper</title><link>https://hossein.naghdbishi.com/posts/en/how-to-share-a-secret/</link><pubDate>Mon, 11 Aug 2025 13:15:47 +0330</pubDate><author>hossein@naghdbishi.com (Hossein Naghdbishi)</author><guid>https://hossein.naghdbishi.com/posts/en/how-to-share-a-secret/</guid><description>&lt;p&gt;&#10;In his 1979 paper, Adi Shamir explains an ingenious way to share a secret between &lt;code class="verbatim"&gt;n&lt;/code&gt; people, such that only if &lt;code class="verbatim"&gt;k&lt;/code&gt; of them cooperate will the secret be revealed. And that even if &lt;code class="verbatim"&gt;k-1&lt;/code&gt; people cooperated, nothing would be revealed.&lt;/p&gt;&#10;&lt;p&gt;&#10;How it works is simple.&#10;For a polynomial of degree 1 (i.e, $f(x)=a_{1}x+a_{0}$), how many &lt;code class="verbatim"&gt;(x,y)&lt;/code&gt; points do you need to find $a_{1}$ and $a_{0}$? Two. If you had only one point, you could find a relationship between $a_{0}$ and $a_{1}$ but that would be all.&#10;For a polynomial of degree 2 (i.e, $f(x)=a_{2}x^2+a_{1}x+a_{0}$), how many &lt;code class="verbatim"&gt;(x,y)&lt;/code&gt; points do you need to find $a_{2}, a_{1}$ and $a_{0}$? Three. If you had only two points, there would still be an infinite pairs of $a_{2}$, $a_{1}$ and $a_{0}$.&lt;/p&gt;&#10;&lt;p&gt;&#10;Knowing what we know about polynomials, suppose &lt;code class="verbatim"&gt;n&lt;/code&gt; people need to be able to be part of our trusted group, such that if &lt;code class="verbatim"&gt;k&lt;/code&gt; of them cooperated, they could work out the secret.&lt;/p&gt;&#10;&lt;p&gt;&#10;We set $a_{0}$ as our secret. We generate a polynomial of degree &lt;code class="verbatim"&gt;k-1&lt;/code&gt; so there are &lt;code class="verbatim"&gt;k&lt;/code&gt; coefficients and at least &lt;code class="verbatim"&gt;k&lt;/code&gt; points or cooperating members are needed. Except for $a_{0}$ which is our secret, we generate the coefficients ($a_{1}$ to $a_{n}$) randomly. Then we index our &lt;code class="verbatim"&gt;n&lt;/code&gt; members give them each the &lt;code class="verbatim"&gt;f(x)&lt;/code&gt; of their index, so member one gets &lt;code class="verbatim"&gt;f(1)&lt;/code&gt;, member two gets &lt;code class="verbatim"&gt;f(2)&lt;/code&gt; and so on up to member n who gets &lt;code class="verbatim"&gt;f(n)&lt;/code&gt;. Now if any &lt;code class="verbatim"&gt;k&lt;/code&gt; members cooperate, they&amp;#39;ll have the numbers to find out all the coefficients, and work out $a_{0}$. Easy as that. We will also use modulo arithmetic for our polynomial equations so every number is equally likely in it.&lt;/p&gt;&#10;</description></item></channel></rss>