QQ群:397745473
300_neko搭建记录
是一个聊天室形式的在线浏览器
按官方的教程搭建总是在国内连不上国外能直接连
几经折腾找到了一个文档中记录下搭建步骤
准备 参考文档:
1 https://neko.m1k1o.net/#/getting-started/
docker 环境安装:
1 2 3 4 curl -sSL https://get.docker.com/ | CHANNEL=stable bash sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
Firefox docker-compose docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 version: "3.4" services: neko: image: "m1k1o/neko:firefox" restart: "unless-stopped" shm_size: "2gb" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
单行命令 增加了文件上传功能
1 2 3 4 5 6 7 8 docker run -d --name neko -p 8080:8080 -p 8082:8082/tcp -p 8082:8082/udp -e NEKO_SCREEN=1920x1080@30 \ -e NEKO_PASSWORD=neko \ -e NEKO_PASSWORD_ADMIN=admin \ -e NEKO_TCPMUX=8082 \ -e NEKO_UDPMUX=8082 \ -e NEKO_ICELITE=1 \ -e NEKO_FILE_TRANSFER_ENABLED=1 \ m1k1o/neko:firefox
与宝塔结合使用 docker :
1 docker run -d --name neko -p 9991:9991 -p 9992:9992/tcp -p 9993:9993/udp --cap-add SYS_ADMIN -e NEKO_SCREEN=1920x1080@30 -e NEKO_PASSWORD=neko -e NEKO_PASSWORD_ADMIN=admin -e NEKO_TCPMUX=9992 -e NEKO_UDPMUX=9993 -e NEKO_FILE_TRANSFER_ENABLED=1 -e NEKO_DEBUG=1 -e NEKO_PATH_PREFIX="/neko/" -e NEKO_BIND=":9991" m1k1o/neko:firefox
nginx :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 location /neko/ { proxy_pass http://127.0.0.1:9991/neko/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade ; proxy_set_header Connection "upgrade" ; proxy_read_timeout 86400; proxy_set_header Host $host ; proxy_set_header X-Real-IP $remote_addr ; proxy_set_header X-Forwarded-For $remote_addr ; proxy_set_header X-Forwarded-Host $host ; proxy_set_header X-Forwarded-Port $server_port ; proxy_set_header X-Forwarded-Protocol $scheme ; set $static_fileiCKVxWsj 0; if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" ) { set $static_fileiCKVxWsj 1; expires 1m; } if ( $static_fileiCKVxWsj = 0 ) { add_header Cache-Control no-cache; } }
套上warp解锁chatGPT 手动脚本和一键脚本选一个就可以了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 docker exec -it neko bash apt-get update -y;apt-get upgrade -y apt-get -y install curl tmux procps bash <(curl -fsSL git.io/warp.sh) s5 tmux new -n warp -s warp warp-svc warp-cli register warp-cli set-mode proxy warp-cli set-proxy-port 40000 warp-cli settings warp-cli connect warp-cli warp-stats wget -N https://raw.githubusercontent.com/fscarmen/warp/main/menu.sh && bash menu.sh c 5. 安装 CloudFlare Client 并设置为 Proxy 模式 (bash menu.sh c) 13. 安装 wireproxy,让 WARP 在本地创建一个 socks5 代理 (bash menu.sh w) 连接 Client (warp r) 连接 WirePorxy (warp y) curl --socks5-hostname 127.0.0.1:40000 -v https://ipinfo.io curl --socks5-hostname 127.0.0.1:4444 -v https://ipinfo.io https://www.cloudflare.com/cdn-cgi/trace mv /usr/lib/firefox/distribution/policies.json /usr/lib/firefox/distribution/policies.json_bak wget -O "/usr/lib/firefox/distribution/policies.json" https://raw.githubusercontent.com/m1k1o/neko-vpn/673f25b4ef38fa8b6827d370fc575d32c2338e39/neko/policies.json sed -i 's/"HTTPProxy": "vpn:3128"/"SOCKSProxy": "127.0.0.1:4444"/g' /usr/lib/firefox/distribution/policies.json sed -i 's/"UseHTTPProxyForAllProtocols": true/"UseHTTPProxyForAllProtocols": false/g' /usr/lib/firefox/distribution/policies.json sed -i 's/"Locked": true/"Locked": false/g' /usr/lib/firefox/distribution/policies.json "HTTPProxy" : "vpn:3128" , --> "SOCKSProxy" : "127.0.0.1:4444" ,"UseHTTPProxyForAllProtocols" : true , --> "UseHTTPProxyForAllProtocols" : false ,"Locked" : true , --> "Locked" : false docker restart neko docker exec -it neko bash warp y warp r
连接成功后需要在浏览器中设置代理如下图
Chromium docker-compose 注意:
- for Chromium (needs --cap-add=SYS_ADMIN
, see the security implications ).
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 version: "3.4" services: neko: image: "m1k1o/neko:chromium" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
Google Chrome docker-compose 注意:
- for Google Chrome (needs --cap-add=SYS_ADMIN
, see the security implications ).
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 version: "3.4" services: neko: image: "m1k1o/neko:google-chrome" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
ungoogled-chromium docker-compose 注意:
- for Ungoogled Chromium (needs --cap-add=SYS_ADMIN
, see the security implications ) (by @whalehub).
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 version: "3.4" services: neko: image: "m1k1o/neko:ungoogled-chromium" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
Microsoft Edge docker-compose 注意:
- for Microsoft Edge (needs --cap-add=SYS_ADMIN
, see the security implications ).
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 version: "3.4" services: neko: image: "m1k1o/neko:microsoft-edge" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
Brave Browser docker-compose 注意:
- for Brave Browser (needs --cap-add=SYS_ADMIN
, see the security implications ).
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 version: "3.4" services: neko: image: "m1k1o/neko:brave" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
Vivaldi Browser docker-compose 注意:
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 version: "3.4" services: neko: image: "m1k1o/neko:vivaldi" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
Opera Browser docker-compose 注意:
测试了一下没有成功, 打不开网站
docker-compose.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 version: "3.4" services: neko: image: "m1k1o/neko:opera" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1
remmina docker-compose 直接支持远程连接的镜像
这个还没有测试成功
- for remote desktop connection (by @lowne).
Pass env var REMMINA_URL=<proto>://[<username>[:<password>]@]server[:port]
(proto being vnc
, rdp
or spice
).
Or create your custom configuration with remmina locally (it’s saved in ~/.local/share/remmina/path_to_profile.remmina
) and bind-mount it, then pass env var REMMINA_PROFILE=<path_to_profile.remmina>
.
docker-compose.yml
下面是 rdp 配置 还支持vnc spice等
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 version: "3.4" services: neko: image: "m1k1o/neko:remmina" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1 NEKO_FILE_TRANSFER_ENABLED: 1 REMMINA_PROFILE: /root/remmina/remmina.config
remmina.config
1 rdp://admin:admin@8.8.8.8:8888
shared desktop docker-compose (推荐) 注意:
- for a shared desktop / installing shared software.
m1k1o/neko:xfce
m1k1o/neko:kde
m1k1o/neko:base
docker-compose.yml
xfce 这个很好用
xfce 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 version: "3.4" services: neko: image: "m1k1o/neko:xfce" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1 NEKO_FILE_TRANSFER_ENABLED: 1
声音没有测试成功
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 version: "3.4" services: neko: image: "m1k1o/neko:xfce" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN devices: - "/dev/snd:/dev/snd" environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1 NEKO_FILE_TRANSFER_ENABLED: 1
kde 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 version: "3.4" services: neko: image: "m1k1o/neko:kde" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1 NEKO_FILE_TRANSFER_ENABLED: 1
base 这个里面就一个桌面。什么都没有
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 version: "3.4" services: neko: image: "m1k1o/neko:base" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1 NEKO_FILE_TRANSFER_ENABLED: 1
直接使用docker命令
注意:
需要开以下端口
TCP: 8080/tcp 8082/tcp
UDP: 8082/udp
1 2 3 4 5 6 7 8 9 docker run -d --name neko -p 8080:8080 -p 8082:8082/tcp -p 8082:8082/udp --cap-add SYS_ADMIN \ -e NEKO_SCREEN=1920x1080@30 \ -e NEKO_PASSWORD=neko \ -e NEKO_PASSWORD_ADMIN=admin \ -e NEKO_TCPMUX=8082 \ -e NEKO_UDPMUX=8082 \ -e NEKO_ICELITE=1 \ -e NEKO_FILE_TRANSFER_ENABLED=1 \ m1k1o/neko:xfce
注意:
需要开以下端口
TCP: 8080/tcp 8081/tcp
UDP: 8082/udp
1 2 3 4 5 6 7 8 9 docker run -d --name neko -p 8080:8080 -p 8081:8081/tcp -p 8082:8082/udp --cap-add SYS_ADMIN \ -e NEKO_SCREEN=1920x1080@30 \ -e NEKO_PASSWORD=neko \ -e NEKO_PASSWORD_ADMIN=admin \ -e NEKO_TCPMUX=8081 \ -e NEKO_UDPMUX=8082 \ -e NEKO_ICELITE=1 \ -e NEKO_FILE_TRANSFER_ENABLED=1 \ m1k1o/neko:xfce
这个静态有点意, 可以直接在上面播放视频文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 version: "3.4" services: neko: image: "m1k1o/neko:vlc" restart: "unless-stopped" ports: - "8080:8080" - "8081:8081/tcp" - "8082:8082/udp" cap_add: - SYS_ADMIN environment: NEKO_SCREEN: 1920x1080@30 NEKO_PASSWORD: neko NEKO_PASSWORD_ADMIN: admin NEKO_TCPMUX: 8081 NEKO_UDPMUX: 8082 NEKO_ICELITE: 1 NEKO_FILE_TRANSFER_ENABLED: 1 VLC_MEDIA: "/media"
其他功能 可以用以下方式自动登陆和开启传文件的功能
1 2 Automatic Login with custom url args. (add ?usr=<your-user-name>&pwd=<room-pass> to the url.) Bidirectional file transfer (if enabled) With NEKO_FILE_TRANSFER_ENABLED=true:
更多镜像 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 - `m1k1o/neko:latest` or `m1k1o/neko:firefox` - for Firefox. - `m1k1o/neko:chromium` - for Chromium (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)). - `m1k1o/neko:google-chrome` - for Google Chrome (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)). - `m1k1o/neko:ungoogled-chromium` - for [Ungoogled Chromium](https://github.com/Eloston/ungoogled-chromium) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)) (by @whalehub). - `m1k1o/neko:microsoft-edge` - for Microsoft Edge (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)). - `m1k1o/neko:brave` - for [Brave Browser](https://brave.com/) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)). - `m1k1o/neko:vivaldi` - for [Vivaldi Browser](https://vivaldi.com/) (needs `--cap-add=SYS_ADMIN`, see the [security implications](https://www.redhat.com/en/blog/container-tidbits-adding-capabilities-container)) (by @Xeddius). - `m1k1o/neko:opera` for [Opera Browser](https://opera.com/) (requires extra steps to enable DRM, see instructions [here](https://www.reddit.com/r/operabrowser/wiki/opera/linux_widevine_config/). libffmpeg is already configured.) (by @prophetofxenu) - `m1k1o/neko:tor-browser` - for Tor Browser. - ``` m1k1o/neko:remmina
- for remote desktop connection (by @lowne).
Pass env var REMMINA_URL=<proto>://[<username>[:<password>]@]server[:port]
(proto being vnc
, rdp
or spice
).
Or create your custom configuration with remmina locally (it’s saved in ~/.local/share/remmina/path_to_profile.remmina
) and bind-mount it, then pass env var REMMINA_PROFILE=<path_to_profile.remmina>
.
m1k1o/neko:vlc
- for VLC Video player (needs volume mounted to /media
with local video files, or setting VLC_MEDIA=/media
path).
m1k1o/neko:xfce
or m1k1o/neko:kde
- for a shared desktop / installing shared software.
m1k1o/neko:base
- for custom base.
1 2 3 4 5 6 7 8 9 # 启动 ```bash docker-compose up -d
问题解决 swap 设置 1 wget https://raw.githubusercontent.com/51sec/swap/main/swap.sh && bash swap.sh
字体安装 1 2 3 4 apt -y update apt -y install ttf-wqy-zenhei exit docker-compose restart
浏览器安装 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy firefox-esr sudo dpkg-reconfigure locales sudo apt-get install language-pack-ja language-pack-zh* language-pack-ko sudo apt-get install japan* chinese* korean* sudo apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb sudo dpkg --install google-chrome-stable_current_amd64.deb sudo apt install --assume-yes --fix-broken 文档: https://coder.com/docs/code-server/latest/FAQ https://code.visualstudio.com/Download https://github.com/coder/code-server/releases wget https://github.com/coder/code-server/releases/download/v4.11.0/code-server-4.11.0-linux-amd64.tar.gz tar -xf code-server-4.11.0-linux-amd64.tar.gz chmod 755 ./bin/code-server ./bin/code-server -p 8443 或者 PASSWORD=12345678 ./bin/code-server ../ --bind-addr localhost:3000
QQ群:397745473