kohanucha

Zero-JS Hypermedia Browser

avatar
kohanucha
kohanucha@siamstr.com
npub1d0gj...0hxg
Back-end developer

Notes (15)

Bug report nostr:nprofile1qqsyv47lazt9h6ycp2fsw270khje5egjgsrdkrupjg27u796g7f5k0spzamhxue69uhhyetvv9ujumn0wd68ytnzv9hxgtcpzemhxue69uhhyetvv9ujuurjd9kkzmpwdejhgwq9tfw Alby go -> transactions page -> scroll down -> app crash ios 26.0.1
2025-11-07 12:06:59 from 1 relay(s) View Thread →
#siamstr มีใครเคยใช้ swap out ของ alby hub มั้ยครับ ผมสงสัยว่า ถ้าเกิด Failed to pay swap invoice แล้วมันจะ unlock funds ของเราตอนไหน image
2025-10-17 00:34:34 from 1 relay(s) View Thread →
ยอดดอยใหม่ใกล้ฉัน #siamstr image
2025-08-14 02:03:53 from 1 relay(s) View Thread →
#siamstr วันนี้มาแจกตัวอย่าง Dockerfile สำหรับ build electrs server docker image เผื่อใครสนใจทำไว้ run เล่นเองที่บ้านครับ Dockerfile ``` FROM rust:slim-bookworm AS build # Declare build args ARG VERSION=master # Install build dependencies RUN apt-get update && apt-get install -qqy \ clang cmake build-essential git pkg-config libssl-dev \ librocksdb-dev # Clone and build electrs RUN git clone https://github.com/romanz/electrs.git /electrs && \ cd /electrs && \ git checkout ${VERSION} && \ cargo build --locked --release FROM debian:bookworm-slim AS runtime # Declare runtime args ARG UID= ARG GID= ARG USERNAME= ARG GROUPNAME= # Create group and user RUN groupadd -g ${GID} ${GROUPNAME} && \ useradd -u ${UID} -g ${GID} -m -s /bin/bash ${USERNAME} && \ mkdir -p /home/${USERNAME}/electrs/bin /home/${USERNAME}/electrs/db /home/${USERNAME}/electrs/bitcoin && \ chown -R ${USERNAME}:${GROUPNAME} /home/${USERNAME} # Copy the built binary COPY --from=build /electrs/target/release/electrs /home/${USERNAME}/electrs/bin/ # Switch to non-root user USER ${USERNAME} WORKDIR /home/${USERNAME}/electrs # Expose port 50001 EXPOSE 50001 # Run the binary CMD ["./bin/electrs"] ``` build.sh ``` #!/bin/bash VERSION=v0.10.9 export VERSION=${VERSION} docker buildx build --build-arg VERSION -t electrs:${VERSION} /path/to/dockerfile ```
2025-07-18 00:56:51 from 1 relay(s) View Thread →
#siamstr มีใครเคยดูหนังเรื่องนี้มั้ยครับ ที่พูดถึงเรื่องของ edward snowden คนที่เปิดโปงว่า NSA กำลังส่องพวกเราอยู่และน่าจะเป็นเหตุการณ์ที่ทำให้มีความกังวลว่า ECDSA secp256r1 curve ที่ออกแบบโดย NSA อาจจะมี backdoor bitcoin จึงใช้ secp256k1 แทนเพราะไม่ไว้ใจ NSA https://youtu.be/QlSAiI3xMh4
2025-06-30 12:06:38 from 1 relay(s) View Thread →
วิธีคร่าว ๆ ถ้าอยาก run bitcoin node docker container โดยให้อยู่หลัง tor ครับ #siamstr 1. Install tor ในเครื่อง server ของเรา ตาม link นี้ https://community.torproject.org/onion-services/setup/install/ 2. ถ้าเอาง่ายสามารถรัน docker container ด้วย network mode host ได้เลยแล้วก็ config tor เหมือนเรา run bitcoin node ในเครื่อง server ได้เลย 3. ถ้าต้องการแยก network ให้สร้าง docker network ขึ้นมาแล้ว config ให้ docker container มาใช้ network ที่เราสร้างเพื่อเชื่อมต่อไปหา tor บน host machine 4. config tor ให้รับ request จาก docker และ authen ด้วย cookie ที่ไฟล์ /etc/tor/torrc ถ้าใช้ docker bridge network ``` SOCKSPort ${DOCKER_HOST_GATEWAY_IP}:9050 ControlPort ${DOCKER_HOST_GATEWAY_IP}:9051 CookieAuthentication 1 CookieAuthFileGroupReadable 1 ``` *** ${DOCKER_HOST_GATEWAY_IP} สามารถดูได้จาก docker network inspect <network-name> ถ้าใช้ network host ``` SOCKSPort 127.0.0.1:9050 ControlPort 127.0.0.1:9051 CookieAuthentication 1 CookieAuthFileGroupReadable 1 ``` 5. config bitcoin node ในไฟล์ bitcoin.conf ให้ใช้ tor (config อาจจะต่างกันในแต่ละ version) ถ้าใช้ docker bridge network ``` debug=tor onlynet=onion proxy=${DOCKER_HOST_GATEWAY_IP}:9050 # where to connect tor SOCKS5 for outgoing connections torcontrol=${DOCKER_HOST_GATEWAY_IP}:9051 # where to connect tor control for hidden bitcoin service bind=0.0.0.0:8334=onion # where to receive incoming peer connections ``` ถ้าใช้ network host ``` debug=tor onlynet=onion proxy=127.0.0.1:9050 torcontrol=127.0.0.1:9051 bind=127.0.0.1:8334=onion ``` 6. เขียน docker-compose.yml file ตัวอย่างผมใช้ image ของ https://github.com/lncm/docker-bitcoind ``` services: bitcoind: container_name: bitcoind image: lncm/bitcoind:v28.0 user: "1000:1000" # run process with user 1000 (bitcoind user in container) group_add: - "${DEBIAN_TOR_GID}" # add user 1000 to debian-tor group (debian-tor group in host machine) to read tor control.authcookie file volumes: - ~/data/bitcoin/:/data/.bitcoin/ # where to store bitcoin data - /run/tor/control.authcookie:/run/tor/control.authcookie:ro # map tor control.authcookie for authentication ports: - "8334:8334" # expose port 8334 to receive incoming peer from tor network networks: - ext_bitcoind_bridge # use external network to prevent ip changing after docker compose down and up again networks: ext_bitcoind_bridge: external: true name: bitcoind_bridge # need to run 'docker network create bitcoind_bridge' before docker compose up ``` 7. docker compose up -d 8. ถ้าใช้ firewall ร่วมด้วยก็ต้องไป allow proxy port กับ control port ของ tor ให้เชื่อมต่อจาก docker network ได้ด้วย
2025-05-01 08:05:15 from 1 relay(s) View Thread →
ChatGPT ยังรู้กำเมียง 5555 แต่ถูกไม่ถูกผมก็ไม่ฮู้นะ #siamstr image
2025-04-01 16:07:22 from 1 relay(s) View Thread →
GM ครับ #siamstr วันนี้การจราจรไม่ติดขัดรวบ transactions กันได้นะครับ image
2025-03-31 01:45:26 from 1 relay(s) View Thread →