squid on the windows

Squid is a very popular proxy server.

It is usually running on the Linux.

But sometimes we will install it on the Windows because this method is easy and quickly.

After install it on the windows.

I want to set the cache.

Squid have two type cache. Memory cache and Disk cache.

Next is demo how to set disk cache on the windows.

  1. Right-click the squid icon in the windows tray .

2.Select the “Open Squid Configuration” Menu

3.In the opened “squid.conf” text file, find the “cache_dir” line.Uncomment the line .Then change the default value. for example , you want to save the cache file in the “c:\squid\cache” directory. after changed it like follow.

1
cache_dir aufs C:\Squid\cache 3000 16 256
  1. Save it and stop the Squid service through the menu right-click the icon in the tray.

5.Run “ squid Terminal “ as administator. which usually on the desktop.

6.In the command line. run the next command.

1
squid -z

7.Start Squid services.

That’s all.

Have a enjoy.

set wampserver on the windows

Sometimes we need the php environment on the windows.

Because it is quickly and easily than on the linux.

Next is the step on the windows.

  1. install wampserver.

2.if you install by default ,when install complete,open the web browser,for example google chrome then visit the localhost

1
http://127.0.0.1

3.on the webpage ,click “Add a virtual Host” under the Tools.

4.on the opened webpage ,text all information that required.In this page the important information is Listen port.In the wapserver ,It is distinguish different virtual host by listen port.

  1. listen port in the dropbox from next image.It is very import.it is waste me many times.

6.remember allow listen port for access on the firewall.

7.That’s all.have enjoy.

windows remote control ubuntu 24.04 and install chinese input method

Recently,i want to install ubuntu .So i find the latest version in the ubuntu website. The latest ubuntu version is 24.04.

when i install the ubuntu desktop version. I want remote control it from my windows 11.In the latest ubuntu ,it’s include remote control services.

The next step is how to set up it used to be control by windows11.

  1. open the settings,find the “system” and “Remote Desktop” on the right panel.

2.in the opened dialog.enable “Desktop Sharing” and “Remote Control” two options. then set “Username” and “Password” in the Login Details group. Attention password in this is not login ubuntu’s password.you can click the eye to see it.and click the pen button to change it.

3.Do all the two steps.you can remote control it from your windows 11.

Ubuntu 24.04 default input manage is ibus.after i install some chinese input method.i can not see it in the input sources yet.So i install the fcitx5 on the ubuntu. Next is how to install fcitx5 on the ubuntu 24.04.

1
2
1. sudo apt update`
`2. sudo apt install fcitx5 fcitx5-chinese-addons fcitx5-config-qt fcitx5-configtool

fcitx5-chinese-addons includes Pinyin and Shuangpin support.

1
3. im-config -n fcitx5

Then log out and log back in.

Open Fcitx 5 Configuration (fcitx5-configtool) from the application menu.

Click “+” to add a new input method.

Search for Pinyin (or your preferred Chinese method) and add it.

use proxy in the windows cmd console

Sometimes we need use proxy in the windows cmd console. for example pip install some package in the python environment.

next is how to set proxy temporary.

  1. check if you can visit google in cmd console.if you see the picture ,that’s mean you can’t visit the google.

  2. in the opened cmd console. use the next command to set temporary proxy.

1
2
set HTTP_PROXY=http://192.168.0.110:3128
set HTTPS_PROXY=http://192.168.0.110:3128

3.then use the next command to check if the temporary proxy is enabled.

1
curl -I www.google.com

if you the as shown in the figure below,it is mean the temporary proxy is enabled.

Install vmtools on windows7 in vmware workstation

when i installed windows 7 in wmware workstation which running in the windows 11.

i find i can’t install vmtools.because the install vmare tools menu is gray.

after i try,the next is the fix step.

  1. remove the flopy driver in the vmware workstation hardware config.
  2. after step 1, you will find the install vmtools menu is enabled.
  3. but when i installing the vmtools in the windows7. it will occour some error so install vmware tools fail.
  4. then , you must install a update for this bug. follow is the update link https://catalog.update.microsoft.com/search.aspx?q=kb4474419
  5. after install the update .reboot the virtual windows 7. then install vmware tools. it is all right.

change windows 2016 stand evaluation to stand

After National Day, two server that install windows server 2016 will shut down every two hours.

first,i doubt that the tempurate is too high so the server shut down itself to protect it.so i open the air conditioner.

but it is shut down like i don’t open the air conditioner.

so i check the system log through system event viewer. in the system event viewer.i find the realy reason.

the server shutdown because windows 2016 server is evalution version and it is out of date. so it shut down every a period of time.

so i need to change it to stand version.

the follow step is how to resolve it.

  1. open the command line , need administrator privileges.
  2. Run the next command
  3. DISM /online /Get-CurrentEdition
  4. DISM /online /Set-Edition:ServerStandard /ProductKey:WC2BQ-8NRM3-FDDYY-2BFGV-KHKQY /AcceptEula

when the command run complete . after restart it .the version will change to stand.

then you can active the windows 2016 server too otherwise the evaluation version can not active.

capture the network package used by tcpdump

In linux you can capture the network package used by tcpdump

  1. sudo install tcpdmp,if you use debian .you can install it with
1
apt install tcpdump
  1. capture the newtork package used next command ,the network_interface_name can find by ip command.
1
sudo tcpdump -i netwrok_interface_name -w capture_name.pcap
  1. download the capture_name.pcap and opened it with wireshark.

login ubuntu VPS by key-based

one day ,when i login to my ubuntu vps. i found my vps server login two session one time by follow command.

1
ss -tnp | grep sshd

then ,i realize that my server has been hacked.

so , i decide to do somthing to protect my server.

the first thing is to configuremy server to use key-based ssh login instead of login with a username and password method.

first, i generate the ssh key using the follow command.

1
ssh-keygen -t ed25519 -C "joey@itech.sh"

if you use the default settings to answer the previous question. two files will be generated in the following directory.

~/.ssh/id_ed25519 ← (private key)
~/.ssh/id_ed25519.pub ← (public key)

and then ,what i need to do is upload he publick key to my server.so i use the following command to accomplish this.

1
ssh-copy-id root@memos.ifish.blog

in the above command , root@memos.ifish.blog is the vps server domain and username.after the command complete ,the public key will be uploaded in the vps’s root directory

once you finish the ablove steps. i can login my vps server now.

but if i want to use putty to login to my server. i need to convert the private key to a format use puttygen that putty can read .

this process is simple.so i won’t want explain here.

when do this step complete.you need to deny user user username and password to login the VPS.

so ,you need to edit the /etc/ssh/sshd_config file follow.

1
2
3
4
PasswordAuthentication no`
`ChallengeResponseAuthentication no`
`UsePAM no`
`PubkeyAuthentication yes

when edited the file. please restart the ssh service use the follow command

1
sudo systemctl restart sshd

install xfce4 and xrdp in the debian vps

Some times we need desktop environment instead of ssh.

So i record how to install xfcd and xrdp here. this document demo in the Debian 12.

  1. update system
1
2
apt update
apt upgrade

2.install xfce desktop environment

1
apt install xfce4 xfce4-goodies

3.install xrdp service

1
apt install xrdp

4.check xrdp if installed successful

1
systemctl status xrdp

5.add xrdp user into ssl-cert group

1
adduser xrdp ssl-cert

6.restart xrdp

1
systemctl restart xrdp

7.config firewall allow 3389

1
ufw allow 3389
  1. connect vps use windows remote desktop connection
1
mstc

9.please wait a moment when the mouse display , because sometime it is slowly.

  1. install firefox
1
2
3
4
5
apt update
apt upgrade
apt install snapd
snap install core
snap install firefox
  1. restart vps

12.open firefox from the system menu.

Install openTap

After Opentap update,Opentap editor community version is offline. Instead of it is Opentap editor.when install the opentap editor,must register to keysight website and active community version. and when you use the software ,run any test plan,the software will automatic to connect keysight website to verify or collection your information.It is unfriendly when you have not internet connection when you used in the factory line.

After a period of exploration,i find the older community version. so i record it follow.

1
2
3
4
5
6
7
8
1. install dotnet9.0 runtime
2. install OpenTap9.31.1
3. set the PC dns to 127.0.0.1 (Import,other wise, you will wait long long time )
4. unzip PackageCache.zip and copy the unzip files to "C:\Users\<Your PC longin name>\AppData\Local\OpenTap\PackageCache".if the "OpenTap\PackageCache" directory is not exist.you can enter the directory that opentap software installed directory,and run "tap package list" command. the directory will create automatic.
5. run the command "tap package install "Editor CE"
6. enjoy it.


the file in step 4 , please download it from

https://wwbeh.lanzouu.com/iQSry3hl02va