Giter Club home page Giter Club logo

syncthing-kindle's Introduction

Setup Syncthing on Kindle Touch

  1. You need jailbreak and KULA first.
  2. Download this repository
  3. Download syncthing-linux-arm and copy syncthing binary to syncthing/bin/
  4. Connect Kindle Touch to Your PC
  5. Copy syncthing/ to KINDLE-ROOT/extensions/syncthing/
  6. Select "Open Firewall for Kindle" from KUAL
  7. Select "Start Syncthing INSECURE Admin" from KUAL
  8. Find out your Kindle IP address by type ;711 in search, then open http://IP-ADDRESS:8080 in your browser.
  9. Configure all peers and folders
  10. Ignore kindle auto generated index files: *.sdr
  11. Select "Close INSECURE Admin port" from KUAL (Optional, for security reason)
  12. Select "Stop Syncthing" and then "Start Syncthing" from KUAL
  13. Note: connect kindle to computer or restart kindle will terminate syncthing process and firewall.

syncthing-kindle's People

Contributors

clashthebunny avatar gutenye avatar texkiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

syncthing-kindle's Issues

Can't access GUI despite trying various things

Upon reading about #5

I tried to edit my menu.json to be:

{
        "items": [
                {
                "name": "Syncthing",
                "priority": 0,
                "items": [
                        {"name": "Start Syncthing", "priority": 1, "action": "/mnt/us/extensions/syncthing/bin/syncthing -home=/mnt/us/extensions/syncthing/config &>/mnt/us/syncthing.log"},
                        {"name": "Stop Syncthing", "priority": 2, "action": "killall syncthing"},
                        {"name": "Restart Syncthing", "priority": 3, "action": "killall syncthing; /mnt/us/extensions/syncthing/bin/syncthing -home=/mnt/us/extensions/syncthing/config &> /mnt/us/syncthing.log"},
                        {"name": "Open ALL Firewall ports", "priority": 4, "action": "iptables -A INPUT -i wlan0 -p tcp --dport 8080 -j ACCEPT ; iptables -A INPUT -i wlan0 -p tcp --dport 22000 -j ACCEPT ; iptables -A INPUT -i wlan0 -p tcp --dport 21025 -j ACCEPT"},
                        {"name": "Start Syncthing INSECURE Admin", "priority": 5, "action": "/mnt/us/extensions/syncthing/bin/syncthing -home=/mnt/us/extensions/syncthing/config -gui-address '192.168.0.108:8384' -no-restart &>/mnt/us/syncthing.log"},
                        {"name": "Close INSECURE Admin port", "priority": 6, "action": "iptables -D INPUT -i wlan0 -p tcp --dport 8080 -j ACCEPT"},
                        {"name": "Close ALL Syncthing ports", "priority": 7, "action": "iptables -D INPUT -i wlan0 -p tcp --dport 8080 -j ACCEPT ; iptables -D INPUT -i wlan0 -p tcp --dport 22000 -j ACCEPT ; iptables -D INPUT -i wlan0 -p tcp --dport 21025 -j ACCEPT"}
                  ]
                }
        ]
}`

and  /mnt/us/extensions/syncthing/config so that the line reads

0.0.0.0:8384 FJogQfpn47EDJcp9gvFKvKQogKmqo43t default

And still can't seem to connect to the admin interface to save my life.

Syncthing is definitely running though:

[root@kindle us]# iptables -A INPUT -i wlan0 -p tcp --dport 8080 -j ACCEPT
[root@kindle us]# iptables -A INPUT -i wlan0 -p tcp --dport 8384 -j ACCEPT

[root@kindle us]# ufw
-sh: ufw: not found
[root@kindle us]# tail -f syncthing.log
[IOBUZ] 2023/12/17 14:19:11 INFO: QUIC listener ([::]:22000) starting
[IOBUZ] 2023/12/17 14:19:11 INFO: TCP listener ([::]:22000) starting
[IOBUZ] 2023/12/17 14:19:11 INFO: Completed initial scan of sendreceive folder "Default Folder" (default)
[IOBUZ] 2023/12/17 14:19:11 INFO: GUI and API listening on 192.168.0.108:8384
[IOBUZ] 2023/12/17 14:19:11 INFO: Access the GUI via the following URL: http://192.168.0.108:8384/
[IOBUZ] 2023/12/17 14:19:11 INFO: My name is "kindle"
[IOBUZ] 2023/12/17 14:19:11 WARNING: Syncthing should not run as a privileged or system user. Please consider using a normal user account.
[IOBUZ] 2023/12/17 14:19:21 INFO: quic://0.0.0.0:22000 detected NAT type: Symmetric NAT
[IOBUZ] 2023/12/17 14:19:45 INFO: Detected 1 NAT service
[IOBUZ] 2023/12/17 14:20:19 INFO: Joined relay relay://5.161.229.93:22067

Can't visit GUI

First I'd thank you to maintain this repo, and the readme is very helpful. When I follow the guideline to set up my kindle (it's a kpw3 btw), I was just stuck in the middle and could not visit the syncthing GUI via my browser.

I've already figured it out by myself, and want to share my experience here. Hope it helps anyone who has the same issue.

What I did is are

  1. ssh my kindle first (require USBNetwork)
  2. Manually run the commands to open the firewall for port 8384, i.e., iptables -A INPUT -i wlan0 -p tcp --dport 8384 -j ACCEPT,
  3. Edit the config file: nano /mnt/us/extensions//syncthing/config/config.xml, and change the address 127.0.0.1 to 0.0.0.0 (line 100 approximately). Exit and save. I have this file because I already ran syncthing several times before this, and syncthing has already been initialized.
  4. And then just start syncthing. The command is exactly the same as the option 'start syncthing'.
  5. I changed back the ip address to secure my connection.

I guess there's some problem with the existing JSON file. I just checked my previous log: 'INFO: Access the GUI via the following URL: http://127.0.0.1:8080/'. I suspect that the gui-address argument may not be compatible with the latest syncthing binary anymore.

Autostarting syncthing daemon using upstart

Hello,

for the sake of posterity here is a working /etc/upstart/syncthing.conf which starts syncthing after the device boots:

# syncthing daemon

start on mounted_userstore and framework_ready
stop on (stopping system or ota-update)

export LANG LC_ALL
env STDERR=/tmp/syncthing.err

respawn

script
    source /etc/upstart/env
    exec /mnt/us/extensions/syncthing/bin/syncthing -home=/mnt/us/extensions/syncthing/config 2>> $STDERR
end script

Although it would be more appropriate to relocate syncthing binary and its database somewhere else on the root filesystem, the limited storage (e.g. of the /var/local partition) makes this impractical.

Cheers!

Cannot startup syncthing on Kindle Touch

Hello! I have installed this successfully on a couple of kindle devices, so I'm pretty sure I'm following your instructions correctly, however, I'm having trouble on one device. Below are some details, any help or guidance is appreciated!

Version: Kindle Touch 3G + WiFi (Kindle 5) (U.S. and Canada) [Mostly], Firmware 5.3.7

I have KUAL on my jailbroken kindle. I selected "Open Firewall for Kindle" from KUAL, then selected "Start Syncthing INSECURE Admin" from KUAL. Then I tried to visit the IP address in my browser, and I didn't see anything.

Here is the contents of syncthing.log:

runtime: epollwait on fd 3 failed with 38
fatal error: runtime: netpoll failed

runtime stack:
runtime.throw({0xb63264, 0x17})
	runtime/panic.go:1047 +0x4c fp=0x184d714 sp=0x184d700 pc=0x4edc0
runtime.netpoll(0x0)
	runtime/netpoll_epoll.go:121 +0x414 fp=0x184df78 sp=0x184d714 pc=0x4a8f0
runtime.sysmon()
	runtime/proc.go:5362 +0x4ac fp=0x184dfd8 sp=0x184df78 pc=0x5f0f0
runtime.mstart1()
	runtime/proc.go:1498 +0x7c fp=0x184dfe8 sp=0x184dfd8 pc=0x55184
runtime.mstart0()
	runtime/proc.go:1455 +0x7c fp=0x184dffc sp=0x184dfe8 pc=0x550f8
runtime.mstart()
	runtime/asm_arm.s:210 +0x8 fp=0x184e000 sp=0x184dffc pc=0x8959c

goroutine 1 [runnable, locked to thread]:
runtime.asyncPreempt2()
	runtime/preempt.go:307 +0x38 fp=0x18495c0 sp=0x18495b4 pc=0x506f0
runtime.asyncPreempt()
	runtime/preempt_arm.s:44 +0x98 fp=0x184967c sp=0x18495c0 pc=0x8bcc4
github.com/syndtr/goleveldb/leveldb/storage.init()
	github.com/syndtr/[email protected]/leveldb/storage/file_storage.go:25 fp=0x1849680 sp=0x1849680 pc=0x561bf0
runtime.doInit(0x1426ab8)
	runtime/proc.go:6506 +0x110 fp=0x18497a8 sp=0x1849680 pc=0x61810
runtime.doInit(0x1423b90)
	runtime/proc.go:6483 +0x54 fp=0x18498d0 sp=0x18497a8 pc=0x61754
runtime.doInit(0x14281f0)
	runtime/proc.go:6483 +0x54 fp=0x18499f8 sp=0x18498d0 pc=0x61754
runtime.doInit(0x1426830)
	runtime/proc.go:6483 +0x54 fp=0x1849b20 sp=0x18499f8 pc=0x61754
runtime.doInit(0x14286e0)
	runtime/proc.go:6483 +0x54 fp=0x1849c48 sp=0x1849b20 pc=0x61754
runtime.doInit(0x142c210)
	runtime/proc.go:6483 +0x54 fp=0x1849d70 sp=0x1849c48 pc=0x61754
runtime.doInit(0x1428990)
	runtime/proc.go:6483 +0x54 fp=0x1849e98 sp=0x1849d70 pc=0x61754
runtime.doInit(0x1429ce0)
	runtime/proc.go:6483 +0x54 fp=0x1849fc0 sp=0x1849e98 pc=0x61754
runtime.main()
	runtime/proc.go:233 +0x210 fp=0x1849fec sp=0x1849fc0 pc=0x52058
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x1849fec sp=0x1849fec pc=0x8b198

goroutine 2 [force gc (idle)]:
runtime.gopark(0xd88674, 0x1477fe0, 0x11, 0x14, 0x1)
	runtime/proc.go:381 +0x100 fp=0x183afd8 sp=0x183afc4 pc=0x525d8
runtime.goparkunlock(...)
	runtime/proc.go:387
runtime.forcegchelper()
	runtime/proc.go:305 +0xd4 fp=0x183afec sp=0x183afd8 pc=0x523f8
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183afec sp=0x183afec pc=0x8b198
created by runtime.init.5
	runtime/proc.go:293 +0x1c

goroutine 3 [GC sweep wait]:
runtime.gopark(0xd88674, 0x1478e70, 0xc, 0x14, 0x1)
	runtime/proc.go:381 +0x100 fp=0x183b7c8 sp=0x183b7b4 pc=0x525d8
runtime.goparkunlock(...)
	runtime/proc.go:387
runtime.bgsweep(0x1858000)
	runtime/mgcsweep.go:278 +0x94 fp=0x183b7e4 sp=0x183b7c8 pc=0x39b54
runtime.gcenable.func1()
	runtime/mgc.go:178 +0x28 fp=0x183b7ec sp=0x183b7e4 pc=0x29a90
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183b7ec sp=0x183b7ec pc=0x8b198
created by runtime.gcenable
	runtime/mgc.go:178 +0x74

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xd88674, 0x14792a0, 0xd, 0x14, 0x2)
	runtime/proc.go:381 +0x100 fp=0x183bfb4 sp=0x183bfa0 pc=0x525d8
runtime.goparkunlock(...)
	runtime/proc.go:387
runtime.(*scavengerState).park(0x14792a0)
	runtime/mgcscavenge.go:400 +0x64 fp=0x183bfc8 sp=0x183bfb4 pc=0x36ef0
runtime.bgscavenge(0x1858000)
	runtime/mgcscavenge.go:628 +0x3c fp=0x183bfe4 sp=0x183bfc8 pc=0x377b4
runtime.gcenable.func2()
	runtime/mgc.go:179 +0x28 fp=0x183bfec sp=0x183bfe4 pc=0x29a3c
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183bfec sp=0x183bfec pc=0x8b198
created by runtime.gcenable
	runtime/mgc.go:179 +0xbc

goroutine 5 [finalizer wait]:
runtime.gopark(0xd885ac, 0x148f748, 0x10, 0x14, 0x1)
	runtime/proc.go:381 +0x100 fp=0x183a78c sp=0x183a778 pc=0x525d8
runtime.runfinq()
	runtime/mfinal.go:193 +0xfc fp=0x183a7ec sp=0x183a78c pc=0x28968
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183a7ec sp=0x183a7ec pc=0x8b198
created by runtime.createfing
	runtime/mfinal.go:163 +0x5c

goroutine 6 [chan receive]:
runtime.gopark(0xd88588, 0x18da1f0, 0xe, 0x17, 0x2)
	runtime/proc.go:381 +0x100 fp=0x183c744 sp=0x183c730 pc=0x525d8
runtime.chanrecv(0x18da1c0, 0x183c7d8, 0x1)
	runtime/chan.go:583 +0x538 fp=0x183c790 sp=0x183c744 pc=0x165e4
runtime.chanrecv2(0x18da1c0, 0x183c7d8)
	runtime/chan.go:447 +0x20 fp=0x183c7a4 sp=0x183c790 pc=0x160a0
github.com/syncthing/notify.(*nonrecursiveTree).dispatch(0x18da240, 0x18da1c0)
	github.com/syncthing/[email protected]/tree_nonrecursive.go:36 +0x40 fp=0x183c7e0 sp=0x183c7a4 pc=0x4fbf58
github.com/syncthing/notify.newNonrecursiveTree.func1()
	github.com/syncthing/[email protected]/tree_nonrecursive.go:29 +0x30 fp=0x183c7ec sp=0x183c7e0 pc=0x4fbeec
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183c7ec sp=0x183c7ec pc=0x8b198
created by github.com/syncthing/notify.newNonrecursiveTree
	github.com/syncthing/[email protected]/tree_nonrecursive.go:29 +0x164

goroutine 7 [chan receive]:
runtime.gopark(0xd88588, 0x18da230, 0xe, 0x17, 0x2)
	runtime/proc.go:381 +0x100 fp=0x183cf04 sp=0x183cef0 pc=0x525d8
runtime.chanrecv(0x18da200, 0x183cfb0, 0x1)
	runtime/chan.go:583 +0x538 fp=0x183cf50 sp=0x183cf04 pc=0x165e4
runtime.chanrecv2(0x18da200, 0x183cfb0)
	runtime/chan.go:447 +0x20 fp=0x183cf64 sp=0x183cf50 pc=0x160a0
github.com/syncthing/notify.(*nonrecursiveTree).internal(0x18da240, 0x18da200)
	github.com/syncthing/[email protected]/tree_nonrecursive.go:81 +0x34 fp=0x183cfe0 sp=0x183cf64 pc=0x4fc77c
github.com/syncthing/notify.newNonrecursiveTree.func2()
	github.com/syncthing/[email protected]/tree_nonrecursive.go:30 +0x30 fp=0x183cfec sp=0x183cfe0 pc=0x4fbe90
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183cfec sp=0x183cfec pc=0x8b198
created by github.com/syncthing/notify.newNonrecursiveTree
	github.com/syncthing/[email protected]/tree_nonrecursive.go:30 +0x1c0

goroutine 8 [sleep]:
runtime.gopark(0xd88690, 0x18245d0, 0x13, 0x13, 0x1)
	runtime/proc.go:381 +0x100 fp=0x183d7bc sp=0x183d7a8 pc=0x525d8
time.Sleep(0x1dcd6500)
	runtime/time.go:195 +0x170 fp=0x183d7d8 sp=0x183d7bc pc=0x89288
github.com/syncthing/syncthing/lib/dialer.init.1.func2()
	github.com/syncthing/syncthing/lib/dialer/internal.go:43 +0x24 fp=0x183d7ec sp=0x183d7d8 pc=0x555c54
runtime.goexit()
	runtime/asm_arm.s:831 +0x4 fp=0x183d7ec sp=0x183d7ec pc=0x8b198
created by github.com/syncthing/syncthing/lib/dialer.init.1
	github.com/syncthing/syncthing/lib/dialer/internal.go:42 +0x164

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.